summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AconfigFlags.bp23
-rw-r--r--apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java2
-rw-r--r--cmds/bootanimation/BootAnimation.cpp2
-rw-r--r--cmds/idmap2/idmap2/Lookup.cpp2
-rw-r--r--cmds/incidentd/src/IncidentService.cpp2
-rw-r--r--core/api/current.txt74
-rw-r--r--core/api/system-current.txt18
-rw-r--r--core/api/test-current.txt5
-rw-r--r--core/java/Android.bp5
-rw-r--r--core/java/android/app/Activity.java9
-rw-r--r--core/java/android/app/ActivityOptions.java3
-rw-r--r--core/java/android/app/ActivityThread.java101
-rw-r--r--core/java/android/app/ApplicationPackageManager.java14
-rw-r--r--core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java43
-rw-r--r--core/java/android/app/servertransaction/ActivityLifecycleItem.java13
-rw-r--r--core/java/android/app/servertransaction/ActivityRelaunchItem.java58
-rw-r--r--core/java/android/app/servertransaction/ActivityResultItem.java45
-rw-r--r--core/java/android/app/servertransaction/ActivityTransactionItem.java89
-rw-r--r--core/java/android/app/servertransaction/ClientTransactionItem.java16
-rw-r--r--core/java/android/app/servertransaction/DestroyActivityItem.java34
-rw-r--r--core/java/android/app/servertransaction/EnterPipRequestedItem.java32
-rw-r--r--core/java/android/app/servertransaction/LaunchActivityItem.java120
-rw-r--r--core/java/android/app/servertransaction/MoveToDisplayItem.java36
-rw-r--r--core/java/android/app/servertransaction/NewIntentItem.java42
-rw-r--r--core/java/android/app/servertransaction/PauseActivityItem.java54
-rw-r--r--core/java/android/app/servertransaction/PipStateTransactionItem.java56
-rw-r--r--core/java/android/app/servertransaction/RefreshCallbackItem.java31
-rw-r--r--core/java/android/app/servertransaction/ResumeActivityItem.java44
-rw-r--r--core/java/android/app/servertransaction/StartActivityItem.java41
-rw-r--r--core/java/android/app/servertransaction/StopActivityItem.java32
-rw-r--r--core/java/android/app/servertransaction/TopResumedActivityChangeItem.java33
-rw-r--r--core/java/android/app/servertransaction/TransactionExecutorHelper.java6
-rw-r--r--core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java52
-rw-r--r--core/java/android/companion/CompanionDeviceManager.java36
-rw-r--r--core/java/android/companion/ICompanionDeviceManager.aidl7
-rw-r--r--core/java/android/content/Context.java15
-rw-r--r--core/java/android/content/Intent.java2
-rw-r--r--core/java/android/content/pm/IPackageArchiverService.aidl29
-rw-r--r--core/java/android/content/pm/IPackageInstaller.aidl7
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl3
-rw-r--r--core/java/android/content/pm/PackageArchiver.java129
-rw-r--r--core/java/android/content/pm/PackageInfo.java4
-rw-r--r--core/java/android/content/pm/PackageInstaller.java92
-rw-r--r--core/java/android/content/pm/PackageManager.java22
-rw-r--r--core/java/android/content/pm/flags.aconfig15
-rw-r--r--core/java/android/database/DatabaseUtils.java124
-rw-r--r--core/java/android/database/sqlite/SQLiteConnection.java5
-rw-r--r--core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl3
-rw-r--r--core/java/android/hardware/fingerprint/IFingerprintService.aidl3
-rw-r--r--core/java/android/hardware/usb/DisplayPortAltModeInfo.java38
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java23
-rw-r--r--core/java/android/inputmethodservice/NavigationBarController.java11
-rw-r--r--core/java/android/inputmethodservice/SoftInputWindow.java3
-rw-r--r--core/java/android/nfc/NfcAntennaInfo.java4
-rw-r--r--core/java/android/os/BinderProxy.java2
-rw-r--r--core/java/android/os/ServiceManager.java2
-rw-r--r--core/java/android/os/flags.aconfig14
-rw-r--r--core/java/android/security/FileIntegrityManager.java2
-rw-r--r--core/java/android/security/TEST_MAPPING16
-rw-r--r--core/java/android/security/flags.aconfig7
-rw-r--r--core/java/android/service/voice/VoiceInteractionService.java8
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java2
-rw-r--r--core/java/android/text/BoringLayout.java22
-rw-r--r--core/java/android/text/Layout.java20
-rw-r--r--core/java/android/text/flags/no_break_no_hyphenation_span.aconfig8
-rw-r--r--core/java/android/text/style/LineBreakConfigSpan.java22
-rw-r--r--core/java/android/util/FeatureFlagUtils.java18
-rw-r--r--core/java/android/view/HandwritingInitiator.java34
-rw-r--r--core/java/android/view/HapticScrollFeedbackProvider.java26
-rw-r--r--core/java/android/view/InputWindowHandle.java12
-rw-r--r--core/java/android/view/InsetsController.java2
-rw-r--r--core/java/android/view/InsetsSource.java13
-rw-r--r--core/java/android/view/InsetsState.java4
-rw-r--r--core/java/android/view/MotionEvent.java12
-rw-r--r--core/java/android/view/ScrollFeedbackProvider.java147
-rw-r--r--core/java/android/view/ViewConfiguration.java48
-rw-r--r--core/java/android/view/ViewTreeObserver.java9
-rw-r--r--core/java/android/view/inputmethod/TEST_MAPPING3
-rw-r--r--core/java/android/widget/AbsListView.java6
-rw-r--r--core/java/android/widget/ScrollView.java6
-rw-r--r--core/java/android/widget/TextView.java20
-rw-r--r--core/java/android/widget/ToastPresenter.java27
-rw-r--r--core/java/android/widget/inline/TEST_MAPPING3
-rw-r--r--core/java/android/window/flags/windowing_frontend.aconfig8
-rw-r--r--core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java6
-rw-r--r--core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java40
-rw-r--r--core/java/com/android/internal/app/ChooserActivity.java15
-rw-r--r--core/java/com/android/internal/app/ChooserListAdapter.java10
-rw-r--r--core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java2
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java4
-rw-r--r--core/java/com/android/internal/app/ResolverAppPredictorCallback.java55
-rw-r--r--core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java2
-rw-r--r--core/java/com/android/internal/jank/InteractionJankMonitor.java7
-rw-r--r--core/java/com/android/internal/policy/DecorView.java5
-rw-r--r--core/java/com/android/internal/policy/PhoneWindow.java6
-rw-r--r--core/java/com/android/internal/policy/TransitionAnimation.java5
-rw-r--r--core/java/com/android/internal/usb/DumpUtils.java12
-rw-r--r--core/jni/com_android_internal_os_Zygote.cpp13
-rw-r--r--core/proto/android/service/usb.proto6
-rw-r--r--core/res/AndroidManifest.xml9
-rw-r--r--core/res/res/values-am/strings.xml3
-rw-r--r--core/res/res/values-as/strings.xml3
-rw-r--r--core/res/res/values-b+sr+Latn/strings.xml2
-rw-r--r--core/res/res/values-be/strings.xml5
-rw-r--r--core/res/res/values-bn/strings.xml3
-rw-r--r--core/res/res/values-ca/strings.xml7
-rw-r--r--core/res/res/values-da/strings.xml7
-rw-r--r--core/res/res/values-de/strings.xml3
-rw-r--r--core/res/res/values-es-rUS/strings.xml4
-rw-r--r--core/res/res/values-es/strings.xml7
-rw-r--r--core/res/res/values-et/strings.xml2
-rw-r--r--core/res/res/values-eu/strings.xml3
-rw-r--r--core/res/res/values-fa/strings.xml3
-rw-r--r--core/res/res/values-fi/strings.xml3
-rw-r--r--core/res/res/values-fr-rCA/strings.xml10
-rw-r--r--core/res/res/values-fr/strings.xml5
-rw-r--r--core/res/res/values-gl/strings.xml3
-rw-r--r--core/res/res/values-gu/strings.xml3
-rw-r--r--core/res/res/values-hi/strings.xml7
-rw-r--r--core/res/res/values-hr/strings.xml2
-rw-r--r--core/res/res/values-hy/strings.xml3
-rw-r--r--core/res/res/values-in/strings.xml2
-rw-r--r--core/res/res/values-is/strings.xml3
-rw-r--r--core/res/res/values-it/strings.xml30
-rw-r--r--core/res/res/values-iw/strings.xml3
-rw-r--r--core/res/res/values-kk/strings.xml7
-rw-r--r--core/res/res/values-kn/strings.xml4
-rw-r--r--core/res/res/values-ko/strings.xml3
-rw-r--r--core/res/res/values-ky/strings.xml9
-rw-r--r--core/res/res/values-lo/strings.xml3
-rw-r--r--core/res/res/values-lv/strings.xml3
-rw-r--r--core/res/res/values-mn/strings.xml6
-rw-r--r--core/res/res/values-mr/strings.xml7
-rw-r--r--core/res/res/values-ms/strings.xml2
-rw-r--r--core/res/res/values-my/strings.xml2
-rw-r--r--core/res/res/values-nb/strings.xml9
-rw-r--r--core/res/res/values-ne/strings.xml3
-rw-r--r--core/res/res/values-nl/strings.xml10
-rw-r--r--core/res/res/values-or/strings.xml5
-rw-r--r--core/res/res/values-pa/strings.xml5
-rw-r--r--core/res/res/values-pl/strings.xml3
-rw-r--r--core/res/res/values-ro/strings.xml3
-rw-r--r--core/res/res/values-ru/strings.xml5
-rw-r--r--core/res/res/values-si/strings.xml3
-rw-r--r--core/res/res/values-sk/strings.xml5
-rw-r--r--core/res/res/values-sl/strings.xml2
-rw-r--r--core/res/res/values-sq/strings.xml27
-rw-r--r--core/res/res/values-sr/strings.xml2
-rw-r--r--core/res/res/values-sv/strings.xml3
-rw-r--r--core/res/res/values-ta/strings.xml3
-rw-r--r--core/res/res/values-te/strings.xml2
-rw-r--r--core/res/res/values-tr/strings.xml5
-rw-r--r--core/res/res/values-uk/strings.xml5
-rw-r--r--core/res/res/values-ur/strings.xml3
-rw-r--r--core/res/res/values-vi/strings.xml3
-rw-r--r--core/res/res/values-watch/config.xml9
-rw-r--r--core/res/res/values-watch/dimens_material.xml3
-rw-r--r--core/res/res/values-watch/themes_device_defaults.xml69
-rw-r--r--core/res/res/values-watch/themes_material.xml17
-rw-r--r--core/res/res/values/config.xml4
-rw-r--r--core/res/res/values/config_telephony.xml25
-rw-r--r--core/res/res/values/strings.xml5
-rw-r--r--core/res/res/values/symbols.xml3
-rw-r--r--core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java17
-rw-r--r--core/tests/coretests/src/android/app/activity/ActivityThreadTest.java26
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java2
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java168
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/TestUtils.java80
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java8
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java108
-rw-r--r--core/tests/coretests/src/android/database/DatabaseUtilsTest.java44
-rw-r--r--core/tests/coretests/src/android/provider/DeviceConfigTest.java8
-rw-r--r--core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java395
-rw-r--r--core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java21
-rw-r--r--core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java19
-rw-r--r--core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java45
-rw-r--r--core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java108
-rw-r--r--data/etc/privapp-permissions-platform.xml1
-rw-r--r--data/etc/services.core.protolog.json12
-rw-r--r--data/keyboards/qwerty.idc28
-rw-r--r--data/keyboards/qwerty.kcm508
-rw-r--r--data/keyboards/qwerty.kl131
-rw-r--r--data/keyboards/qwerty2.idc28
-rw-r--r--data/keyboards/qwerty2.kcm505
-rw-r--r--graphics/java/android/graphics/text/LineBreakConfig.java136
-rw-r--r--graphics/java/android/graphics/text/MeasuredText.java5
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java7
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java1
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java1
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java13
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java1
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java11
-rw-r--r--libs/WindowManager/Shell/Android.bp1
-rw-r--r--libs/WindowManager/Shell/aconfig/Android.bp12
-rw-r--r--libs/WindowManager/Shell/aconfig/multitasking.aconfig8
-rw-r--r--libs/WindowManager/Shell/res/values-af/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-am/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ar/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-as/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-az/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-be/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-bg/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-bn/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-bs/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ca/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-cs/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-da/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-de/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-el/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-en-rAU/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-en-rCA/strings.xml2
-rw-r--r--libs/WindowManager/Shell/res/values-en-rGB/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-en-rIN/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-en-rXC/strings.xml2
-rw-r--r--libs/WindowManager/Shell/res/values-es-rUS/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-es/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-et/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-eu/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-fa/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-fi/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-fr-rCA/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-fr/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-gl/strings.xml13
-rw-r--r--libs/WindowManager/Shell/res/values-gu/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-hi/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-hr/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-hu/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-hy/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-in/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-is/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-it/strings.xml6
-rw-r--r--libs/WindowManager/Shell/res/values-iw/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ja/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ka/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-kk/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-km/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-kn/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ko/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ky/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-lo/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-lt/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-lv/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-mk/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ml/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-mn/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-mr/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ms/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-my/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-nb/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ne/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-nl/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-or/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-pa/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-pl/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-pt-rBR/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-pt-rPT/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-pt/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ro/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ru/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-si/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sk/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sl/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sq/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sr/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sv/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-sw/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ta/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-te/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-television/config.xml11
-rw-r--r--libs/WindowManager/Shell/res/values-th/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-tl/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-tr/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-uk/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-ur/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-uz/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-vi/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rCN/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rHK/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rTW/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values-zu/strings.xml4
-rw-r--r--libs/WindowManager/Shell/res/values/config.xml5
-rw-r--r--libs/WindowManager/Shell/res/values/strings.xml4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java44
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java (renamed from packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt)18
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java49
-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/SplitScreenConstants.java32
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt39
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java32
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java36
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java25
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java38
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java68
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java34
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java22
-rw-r--r--libs/WindowManager/Shell/tests/flicker/Android.bp26
-rw-r--r--libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt5
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt1
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt)17
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt)19
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt95
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt)4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt)2
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt)4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt)4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt (renamed from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt)4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt2
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt2
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt2
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt2
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt1
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java8
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java14
-rw-r--r--libs/androidfw/AssetManager.cpp12
-rw-r--r--libs/androidfw/AssetManager2.cpp2
-rw-r--r--libs/androidfw/ResourceTypes.cpp6
-rw-r--r--libs/hwui/Android.bp1
-rw-r--r--libs/hwui/HardwareBitmapUploader.cpp3
-rw-r--r--libs/hwui/jni/text/MeasuredText.cpp9
-rw-r--r--libs/hwui/renderthread/CacheManager.cpp14
-rw-r--r--libs/hwui/renderthread/HintSessionWrapper.cpp86
-rw-r--r--libs/hwui/renderthread/HintSessionWrapper.h24
-rw-r--r--libs/hwui/renderthread/VulkanManager.cpp2
-rw-r--r--libs/hwui/tests/unit/HintSessionWrapperTests.cpp151
-rw-r--r--libs/protoutil/include/android/util/ProtoOutputStream.h2
-rw-r--r--libs/protoutil/src/ProtoOutputStream.cpp4
-rw-r--r--media/java/android/media/AudioFormat.java3
-rw-r--r--media/java/android/media/flags/media_better_together.aconfig20
-rw-r--r--media/jni/android_media_MediaCodec.cpp12
-rw-r--r--media/jni/android_media_MediaDescrambler.cpp2
-rw-r--r--media/jni/android_media_MediaPlayer.cpp2
-rw-r--r--native/android/obb.cpp2
-rw-r--r--packages/CarrierDefaultApp/res/values-sq/strings.xml4
-rw-r--r--packages/CredentialManager/Android.bp43
-rw-r--r--packages/CredentialManager/horologist/OWNERS4
-rw-r--r--packages/CredentialManager/horologist/README.md3
-rw-r--r--packages/CredentialManager/res/values-b+sr+Latn/strings.xml4
-rw-r--r--packages/CredentialManager/res/values-in/strings.xml2
-rw-r--r--packages/CredentialManager/res/values-sq/strings.xml2
-rw-r--r--packages/CredentialManager/res/values-sr/strings.xml4
-rw-r--r--packages/CredentialManager/shared/OWNERS4
-rw-r--r--packages/CredentialManager/shared/README.md2
-rw-r--r--packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt2
-rw-r--r--packages/CredentialManager/wear/AndroidManifest.xml45
-rw-r--r--packages/CredentialManager/wear/OWNERS4
-rw-r--r--packages/CredentialManager/wear/README.md1
-rw-r--r--packages/CredentialManager/wear/profile.txt.prof0
-rw-r--r--packages/CredentialManager/wear/res/values/strings.xml (renamed from packages/SystemUI/res/layout/auth_biometric_face_view.xml)19
-rw-r--r--packages/CredentialManager/wear/res/values/themes.xml (renamed from packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml)22
-rw-r--r--packages/CredentialManager/wear/res/xml/backup_rules.xml13
-rw-r--r--packages/CredentialManager/wear/res/xml/data_extraction_rules.xml19
-rw-r--r--packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt33
-rw-r--r--packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt16
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/BrowseActivity.kt29
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt40
-rw-r--r--packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt20
-rw-r--r--packages/SettingsLib/res/values-af/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-am/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ar/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-as/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-az/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-b+sr+Latn/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-be/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-bg/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-bn/strings.xml12
-rw-r--r--packages/SettingsLib/res/values-bs/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-ca/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-cs/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-da/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-de/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-el/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-en-rAU/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-en-rCA/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-en-rGB/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-en-rIN/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-en-rXC/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-es-rUS/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-es/strings.xml12
-rw-r--r--packages/SettingsLib/res/values-et/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-eu/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-fa/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-fi/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-fr-rCA/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-fr/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-gl/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-gu/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-hi/strings.xml18
-rw-r--r--packages/SettingsLib/res/values-hr/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-hu/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-hy/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-in/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-is/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-it/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-iw/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ja/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-ka/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-kk/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-km/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-kn/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-ko/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-ky/strings.xml16
-rw-r--r--packages/SettingsLib/res/values-lo/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-lt/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-lv/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-mk/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ml/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-mn/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-mr/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ms/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-my/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-nb/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-ne/strings.xml18
-rw-r--r--packages/SettingsLib/res/values-nl/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-or/strings.xml14
-rw-r--r--packages/SettingsLib/res/values-pa/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-pl/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-pt-rBR/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-pt-rPT/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-pt/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ro/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ru/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-si/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-sk/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-sl/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-sq/strings.xml16
-rw-r--r--packages/SettingsLib/res/values-sr/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-sv/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-sw/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-ta/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-te/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-th/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-tl/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-tr/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-uk/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-ur/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-uz/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-vi/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-zh-rCN/strings.xml8
-rw-r--r--packages/SettingsLib/res/values-zh-rHK/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-zh-rTW/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-zu/strings.xml6
-rw-r--r--packages/SettingsLib/res/values/strings.xml8
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java8
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java15
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/Utils.java64
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java19
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java14
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java3
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java2
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java32
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java23
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java52
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java45
-rw-r--r--packages/Shell/AndroidManifest.xml1
-rw-r--r--packages/SystemUI/Android.bp10
-rw-r--r--packages/SystemUI/OWNERS2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/Android.bp1
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp12
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig8
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java19
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java25
-rw-r--r--packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt40
-rw-r--r--packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt5
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt4
-rw-r--r--packages/SystemUI/proguard_common.flags9
-rw-r--r--packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml243
-rw-r--r--packages/SystemUI/res-keyguard/values-land/donottranslate.xml19
-rw-r--r--packages/SystemUI/res-keyguard/values-sq/strings.xml4
-rw-r--r--packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml73
-rw-r--r--packages/SystemUI/res-product/values-sq/strings.xml2
-rw-r--r--packages/SystemUI/res/layout/auth_biometric_contents.xml165
-rw-r--r--packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml26
-rw-r--r--packages/SystemUI/res/layout/battery_percentage_view.xml1
-rw-r--r--packages/SystemUI/res/layout/battery_status_chip.xml5
-rw-r--r--packages/SystemUI/res/layout/combined_qs_header.xml45
-rw-r--r--packages/SystemUI/res/layout/status_bar.xml1
-rw-r--r--packages/SystemUI/res/values-af/strings.xml14
-rw-r--r--packages/SystemUI/res/values-am/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ar/strings.xml14
-rw-r--r--packages/SystemUI/res/values-as/strings.xml16
-rw-r--r--packages/SystemUI/res/values-az/strings.xml14
-rw-r--r--packages/SystemUI/res/values-b+sr+Latn/strings.xml20
-rw-r--r--packages/SystemUI/res/values-be/strings.xml14
-rw-r--r--packages/SystemUI/res/values-bg/strings.xml14
-rw-r--r--packages/SystemUI/res/values-bn/strings.xml14
-rw-r--r--packages/SystemUI/res/values-bs/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ca/strings.xml14
-rw-r--r--packages/SystemUI/res/values-cs/strings.xml16
-rw-r--r--packages/SystemUI/res/values-da/strings.xml26
-rw-r--r--packages/SystemUI/res/values-de/strings.xml14
-rw-r--r--packages/SystemUI/res/values-el/strings.xml14
-rw-r--r--packages/SystemUI/res/values-en-rAU/strings.xml8
-rw-r--r--packages/SystemUI/res/values-en-rCA/strings.xml4
-rw-r--r--packages/SystemUI/res/values-en-rGB/strings.xml8
-rw-r--r--packages/SystemUI/res/values-en-rIN/strings.xml8
-rw-r--r--packages/SystemUI/res/values-en-rXC/strings.xml4
-rw-r--r--packages/SystemUI/res/values-es-rUS/strings.xml14
-rw-r--r--packages/SystemUI/res/values-es/strings.xml14
-rw-r--r--packages/SystemUI/res/values-et/strings.xml14
-rw-r--r--packages/SystemUI/res/values-eu/strings.xml18
-rw-r--r--packages/SystemUI/res/values-fa/strings.xml14
-rw-r--r--packages/SystemUI/res/values-fi/strings.xml14
-rw-r--r--packages/SystemUI/res/values-fr-rCA/strings.xml14
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml14
-rw-r--r--packages/SystemUI/res/values-gl/strings.xml14
-rw-r--r--packages/SystemUI/res/values-gu/strings.xml14
-rw-r--r--packages/SystemUI/res/values-hi/strings.xml22
-rw-r--r--packages/SystemUI/res/values-hr/strings.xml14
-rw-r--r--packages/SystemUI/res/values-hu/strings.xml14
-rw-r--r--packages/SystemUI/res/values-hy/strings.xml18
-rw-r--r--packages/SystemUI/res/values-in/strings.xml14
-rw-r--r--packages/SystemUI/res/values-is/strings.xml14
-rw-r--r--packages/SystemUI/res/values-it/strings.xml44
-rw-r--r--packages/SystemUI/res/values-iw/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml16
-rw-r--r--packages/SystemUI/res/values-ka/strings.xml8
-rw-r--r--packages/SystemUI/res/values-kk/strings.xml16
-rw-r--r--packages/SystemUI/res/values-km/strings.xml14
-rw-r--r--packages/SystemUI/res/values-kn/strings.xml22
-rw-r--r--packages/SystemUI/res/values-ko/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ky/strings.xml18
-rw-r--r--packages/SystemUI/res/values-land/config.xml4
-rw-r--r--packages/SystemUI/res/values-land/dimens.xml3
-rw-r--r--packages/SystemUI/res/values-lo/strings.xml14
-rw-r--r--packages/SystemUI/res/values-lt/strings.xml14
-rw-r--r--packages/SystemUI/res/values-lv/strings.xml14
-rw-r--r--packages/SystemUI/res/values-mk/strings.xml18
-rw-r--r--packages/SystemUI/res/values-ml/strings.xml16
-rw-r--r--packages/SystemUI/res/values-mn/strings.xml14
-rw-r--r--packages/SystemUI/res/values-mr/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ms/strings.xml10
-rw-r--r--packages/SystemUI/res/values-my/strings.xml16
-rw-r--r--packages/SystemUI/res/values-nb/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ne/strings.xml20
-rw-r--r--packages/SystemUI/res/values-nl/strings.xml14
-rw-r--r--packages/SystemUI/res/values-or/strings.xml14
-rw-r--r--packages/SystemUI/res/values-pa/strings.xml14
-rw-r--r--packages/SystemUI/res/values-pl/strings.xml14
-rw-r--r--packages/SystemUI/res/values-pt-rBR/strings.xml20
-rw-r--r--packages/SystemUI/res/values-pt-rPT/strings.xml8
-rw-r--r--packages/SystemUI/res/values-pt/strings.xml20
-rw-r--r--packages/SystemUI/res/values-ro/strings.xml14
-rw-r--r--packages/SystemUI/res/values-ru/strings.xml14
-rw-r--r--packages/SystemUI/res/values-si/strings.xml14
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml16
-rw-r--r--packages/SystemUI/res/values-sl/strings.xml14
-rw-r--r--packages/SystemUI/res/values-sq/strings.xml18
-rw-r--r--packages/SystemUI/res/values-sr/strings.xml20
-rw-r--r--packages/SystemUI/res/values-sv/strings.xml14
-rw-r--r--packages/SystemUI/res/values-sw/strings.xml14
-rw-r--r--packages/SystemUI/res/values-sw600dp-land/config.xml4
-rw-r--r--packages/SystemUI/res/values-sw600dp/dimens.xml8
-rw-r--r--packages/SystemUI/res/values-ta/strings.xml14
-rw-r--r--packages/SystemUI/res/values-te/strings.xml14
-rw-r--r--packages/SystemUI/res/values-th/strings.xml14
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml8
-rw-r--r--packages/SystemUI/res/values-tr/strings.xml14
-rw-r--r--packages/SystemUI/res/values-uk/strings.xml18
-rw-r--r--packages/SystemUI/res/values-ur/strings.xml14
-rw-r--r--packages/SystemUI/res/values-uz/strings.xml14
-rw-r--r--packages/SystemUI/res/values-vi/strings.xml14
-rw-r--r--packages/SystemUI/res/values-zh-rCN/strings.xml14
-rw-r--r--packages/SystemUI/res/values-zh-rHK/strings.xml16
-rw-r--r--packages/SystemUI/res/values-zh-rTW/strings.xml14
-rw-r--r--packages/SystemUI/res/values-zu/strings.xml14
-rw-r--r--packages/SystemUI/res/values/config.xml5
-rw-r--r--packages/SystemUI/res/values/dimens.xml8
-rw-r--r--packages/SystemUI/res/values/flags.xml3
-rw-r--r--packages/SystemUI/shared/Android.bp1
-rw-r--r--packages/SystemUI/shared/biometrics/Android.bp20
-rw-r--r--packages/SystemUI/shared/biometrics/AndroidManifest.xml (renamed from packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml)9
-rw-r--r--packages/SystemUI/shared/biometrics/res/values/strings.xml27
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java (renamed from packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java)19
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt)26
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt)2
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt)0
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt)0
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt)2
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt)0
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt)0
-rw-r--r--packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt (renamed from packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt)2
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java31
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java3
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java6
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java4
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java70
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java77
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java8
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java19
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java4
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java38
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java12
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconView.java2
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt36
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt80
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt45
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt113
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java984
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java198
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java36
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java66
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt52
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java62
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt66
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt (renamed from packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt)60
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt139
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt51
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt63
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt30
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt39
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt59
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt35
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java52
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt118
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt130
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt55
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt64
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt75
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt83
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt62
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt50
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java62
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java83
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt26
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt41
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java249
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java42
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt42
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java29
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java82
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt52
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt121
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java38
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt31
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt41
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java19
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt37
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java23
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java21
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt164
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt283
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt58
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java75
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt53
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt13
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt38
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java60
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java29
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java96
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt123
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java (renamed from packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java)35
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt (renamed from packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt)66
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt57
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt (renamed from packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt)2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt18
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt72
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt35
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt274
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt36
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt69
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt265
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt208
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt79
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java57
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java13
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java61
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt18
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java25
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt97
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java23
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java40
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt15
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java11
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt48
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt35
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java93
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java11
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt)10
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt16
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt16
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt171
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt3
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt17
-rw-r--r--services/accessibility/accessibility.aconfig15
-rw-r--r--services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java3
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/SaveUi.java3
-rw-r--r--services/backup/java/com/android/server/backup/TransportManager.java3
-rw-r--r--services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java26
-rw-r--r--services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java64
-rw-r--r--services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java104
-rw-r--r--services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java2
-rw-r--r--services/core/Android.bp2
-rw-r--r--services/core/java/com/android/server/SmartStorageMaintIdler.java29
-rw-r--r--services/core/java/com/android/server/StorageManagerService.java2
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java11
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerShellCommand.java1
-rw-r--r--services/core/java/com/android/server/am/AnrHelper.java3
-rw-r--r--services/core/java/com/android/server/am/AnrTimer.java834
-rw-r--r--services/core/java/com/android/server/am/BroadcastProcessQueue.java20
-rw-r--r--services/core/java/com/android/server/am/BroadcastQueueModernImpl.java85
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java23
-rw-r--r--services/core/java/com/android/server/am/SettingsToPropertiesMapper.java45
-rw-r--r--services/core/java/com/android/server/am/UserController.java7
-rw-r--r--services/core/java/com/android/server/audio/AudioDeviceBroker.java110
-rw-r--r--services/core/java/com/android/server/biometrics/Android.bp12
-rw-r--r--services/core/java/com/android/server/biometrics/AuthSession.java17
-rw-r--r--services/core/java/com/android/server/biometrics/AuthenticationStats.java5
-rw-r--r--services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java70
-rw-r--r--services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java37
-rw-r--r--services/core/java/com/android/server/biometrics/BiometricSensor.java5
-rw-r--r--services/core/java/com/android/server/biometrics/biometrics.aconfig8
-rw-r--r--services/core/java/com/android/server/biometrics/log/BiometricLogger.java11
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java6
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java3
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/FaceService.java74
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java16
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java14
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java5
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java8
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java6
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java14
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java14
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java3
-rw-r--r--services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java12
-rw-r--r--services/core/java/com/android/server/content/SyncManager.java2
-rw-r--r--services/core/java/com/android/server/dreams/DreamManagerService.java3
-rw-r--r--services/core/java/com/android/server/input/GestureMonitorSpyWindow.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/HandwritingModeController.java1
-rw-r--r--services/core/java/com/android/server/inputmethod/ImeTrackerService.java19
-rw-r--r--services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java8
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodBindingController.java21
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java72
-rw-r--r--services/core/java/com/android/server/media/AudioPlayerStateMonitor.java19
-rw-r--r--services/core/java/com/android/server/media/BluetoothRouteController.java13
-rw-r--r--services/core/java/com/android/server/media/DeviceRouteController.java13
-rw-r--r--services/core/java/com/android/server/media/MediaFeatureFlagManager.java9
-rw-r--r--services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java28
-rw-r--r--services/core/java/com/android/server/media/MediaSessionService.java17
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java18
-rw-r--r--services/core/java/com/android/server/notification/OWNERS2
-rw-r--r--services/core/java/com/android/server/pm/Android.bp12
-rw-r--r--services/core/java/com/android/server/pm/IPackageManagerBase.java14
-rw-r--r--services/core/java/com/android/server/pm/PackageArchiver.java (renamed from services/core/java/com/android/server/pm/PackageArchiverService.java)26
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerService.java23
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerSession.java5
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java11
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerServiceInjector.java11
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java1
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerServiceUtils.java3
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerShellCommand.java167
-rw-r--r--services/core/java/com/android/server/pm/flags.aconfig9
-rw-r--r--services/core/java/com/android/server/pm/pkg/SuspendParams.java2
-rw-r--r--services/core/java/com/android/server/security/Android.bp17
-rw-r--r--services/core/java/com/android/server/security/FileIntegrityService.java7
-rw-r--r--services/core/java/com/android/server/security/TEST_MAPPING13
-rw-r--r--services/core/java/com/android/server/security/flags.aconfig8
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java189
-rw-r--r--services/core/java/com/android/server/wm/ActivityClientController.java6
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java87
-rw-r--r--services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java6
-rw-r--r--services/core/java/com/android/server/wm/ActivityStartController.java7
-rw-r--r--services/core/java/com/android/server/wm/ActivityStarter.java311
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskManagerService.java2
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskSupervisor.java185
-rw-r--r--services/core/java/com/android/server/wm/AppTaskImpl.java3
-rw-r--r--services/core/java/com/android/server/wm/AsyncRotationController.java2
-rw-r--r--services/core/java/com/android/server/wm/BackgroundActivityStartController.java604
-rw-r--r--services/core/java/com/android/server/wm/CompatModePackages.java2
-rw-r--r--services/core/java/com/android/server/wm/ContentRecorder.java28
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java8
-rw-r--r--services/core/java/com/android/server/wm/DisplayPolicy.java12
-rw-r--r--services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java6
-rw-r--r--services/core/java/com/android/server/wm/DragState.java13
-rw-r--r--services/core/java/com/android/server/wm/InputConsumerImpl.java4
-rw-r--r--services/core/java/com/android/server/wm/InputMonitor.java4
-rw-r--r--services/core/java/com/android/server/wm/InputWindowHandleWrapper.java5
-rw-r--r--services/core/java/com/android/server/wm/OWNERS2
-rw-r--r--services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java2
-rw-r--r--services/core/java/com/android/server/wm/SafeActivityOptions.java3
-rw-r--r--services/core/java/com/android/server/wm/TaskFragment.java8
-rw-r--r--services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java19
-rw-r--r--services/core/java/com/android/server/wm/TransitionController.java2
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java7
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java23
-rw-r--r--services/credentials/java/com/android/server/credentials/CredentialManagerService.java16
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java21
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java12
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig2
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java4
-rw-r--r--services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt1722
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java6
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java (renamed from services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java)39
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/trust/OWNERS1
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java5
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java10
-rw-r--r--services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java378
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java3
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java113
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java1
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java3
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java43
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java40
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java19
-rw-r--r--services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java73
-rw-r--r--services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java73
-rwxr-xr-xservices/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java198
-rw-r--r--services/tests/wmtests/AndroidManifest.xml7
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java14
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java75
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java5
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java149
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java9
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java6
-rw-r--r--services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java30
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java9
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java14
-rw-r--r--telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl8
-rw-r--r--tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt6
-rw-r--r--tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt10
-rw-r--r--tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt40
-rw-r--r--tools/aapt/AaptAssets.cpp32
-rw-r--r--tools/aapt/Command.cpp6
-rw-r--r--tools/aapt/Resource.cpp10
-rw-r--r--tools/aapt/StringPool.cpp6
-rw-r--r--tools/aapt/XMLNode.cpp2
-rw-r--r--tools/aapt/tests/AaptGroupEntry_test.cpp2
-rw-r--r--tools/aapt2/DominatorTree_test.cpp4
-rw-r--r--tools/validatekeymaps/Main.cpp2
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 38859 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 42551 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 38645 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 42281 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 30421 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 32160 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 30225 bytes
-rw-r--r--vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.pngbin0 -> 31900 bytes
-rw-r--r--wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java53
1041 files changed, 16090 insertions, 10161 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index 09225a5447f4..a5178cfaeec8 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -19,6 +19,7 @@ java_defaults {
// Add java_aconfig_libraries to here to add them to the core framework
srcs: [
":android.app.usage.flags-aconfig-java{.generated_srcjars}",
+ ":android.content.pm.flags-aconfig-java{.generated_srcjars}",
":android.os.flags-aconfig-java{.generated_srcjars}",
":android.os.vibrator.flags-aconfig-java{.generated_srcjars}",
":android.security.flags-aconfig-java{.generated_srcjars}",
@@ -28,10 +29,12 @@ java_defaults {
":com.android.hardware.input-aconfig-java{.generated_srcjars}",
":com.android.text.flags-aconfig-java{.generated_srcjars}",
":telecom_flags_core_java_lib{.generated_srcjars}",
+ ":telephony_flags_core_java_lib{.generated_srcjars}",
":android.companion.virtual.flags-aconfig-java{.generated_srcjars}",
":android.view.inputmethod.flags-aconfig-java{.generated_srcjars}",
":android.widget.flags-aconfig-java{.generated_srcjars}",
":com.android.media.flags.bettertogether-aconfig-java{.generated_srcjars}",
+ ":sdk_sandbox_flags_lib{.generated_srcjars}",
],
// Add aconfig-annotations-lib as a dependency for the optimization
libs: ["aconfig-annotations-lib"],
@@ -59,6 +62,13 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
+// Telephony
+java_aconfig_library {
+ name: "telephony_flags_core_java_lib",
+ aconfig_declarations: "telephony_flags",
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// Window
aconfig_declarations {
name: "com.android.window.flags.window-aconfig",
@@ -215,6 +225,19 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
+// Package Manager
+aconfig_declarations {
+ name: "android.content.pm.flags-aconfig",
+ package: "android.content.pm",
+ srcs: ["core/java/android/content/pm/*.aconfig"],
+}
+
+java_aconfig_library {
+ name: "android.content.pm.flags-aconfig-java",
+ aconfig_declarations: "android.content.pm.flags-aconfig",
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// Media BetterTogether
aconfig_declarations {
name: "com.android.media.flags.bettertogether-aconfig",
diff --git a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
index 66c1efca0000..24d815f2964b 100644
--- a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
+++ b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
@@ -420,7 +420,7 @@ public class PowerExemptionManager {
public static final int REASON_SYSTEM_EXEMPT_APP_OP = 327;
/**
- * Granted by {@link com.android.server.pm.PackageArchiverService} to the installer responsible
+ * Granted by {@link com.android.server.pm.PackageArchiver} to the installer responsible
* for unarchiving an app.
*
* @hide
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index f2d0efe4bb94..89776dba7878 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -1834,7 +1834,7 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn) {
fn.c_str());
return nullptr;
}
- ZipFileRO *zip = ZipFileRO::open(fn);
+ ZipFileRO *zip = ZipFileRO::open(fn.c_str());
if (zip == nullptr) {
SLOGE("Failed to open animation zip \"%s\": %s",
fn.c_str(), strerror(errno));
diff --git a/cmds/idmap2/idmap2/Lookup.cpp b/cmds/idmap2/idmap2/Lookup.cpp
index 3704b4aff6c7..34d91795fc29 100644
--- a/cmds/idmap2/idmap2/Lookup.cpp
+++ b/cmds/idmap2/idmap2/Lookup.cpp
@@ -94,7 +94,7 @@ void PrintValue(AssetManager2* const am, const AssetManager2::SelectedValue& val
const ResStringPool* pool = am->GetStringPoolForCookie(value.cookie);
out->append("\"");
if (auto str = pool->string8ObjectAt(value.data); str.ok()) {
- out->append(*str);
+ out->append(str->c_str());
}
} break;
default:
diff --git a/cmds/incidentd/src/IncidentService.cpp b/cmds/incidentd/src/IncidentService.cpp
index e70748e8909f..5ebf3e2c3047 100644
--- a/cmds/incidentd/src/IncidentService.cpp
+++ b/cmds/incidentd/src/IncidentService.cpp
@@ -567,7 +567,7 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8
fprintf(out, "Not enough arguments for section\n");
return NO_ERROR;
}
- int id = atoi(args[1]);
+ int id = atoi(args[1].c_str());
int idx = 0;
while (SECTION_LIST[idx] != NULL) {
const Section* section = SECTION_LIST[idx];
diff --git a/core/api/current.txt b/core/api/current.txt
index 078c46f2514b..f488c82a2a60 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -17653,9 +17653,13 @@ package android.graphics.pdf {
package android.graphics.text {
public final class LineBreakConfig {
+ method @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public int getHyphenation();
method public int getLineBreakStyle();
method public int getLineBreakWordStyle();
method @NonNull public android.graphics.text.LineBreakConfig merge(@NonNull android.graphics.text.LineBreakConfig);
+ field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_DISABLED = 0; // 0x0
+ field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_ENABLED = 1; // 0x1
+ field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_UNSPECIFIED = -1; // 0xffffffff
field public static final int LINE_BREAK_STYLE_LOOSE = 1; // 0x1
field public static final int LINE_BREAK_STYLE_NONE = 0; // 0x0
field public static final int LINE_BREAK_STYLE_NORMAL = 2; // 0x2
@@ -17670,6 +17674,7 @@ package android.graphics.text {
ctor public LineBreakConfig.Builder();
method @NonNull public android.graphics.text.LineBreakConfig build();
method @NonNull public android.graphics.text.LineBreakConfig.Builder merge(@NonNull android.graphics.text.LineBreakConfig);
+ method @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) @NonNull public android.graphics.text.LineBreakConfig.Builder setHyphenation(int);
method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakStyle(int);
method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakWordStyle(int);
}
@@ -38653,7 +38658,7 @@ package android.security {
public final class FileIntegrityManager {
method @FlaggedApi(Flags.FLAG_FSVERITY_API) @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
method public boolean isApkVeritySupported();
- method @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
+ method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
method @FlaggedApi(Flags.FLAG_FSVERITY_API) public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
}
@@ -46581,9 +46586,9 @@ package android.text {
}
public class BoringLayout extends android.text.Layout implements android.text.TextUtils.EllipsizeCallback {
- ctor @Deprecated public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
- ctor @Deprecated public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
- ctor @Deprecated public BoringLayout(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, float, float, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
+ ctor public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
+ ctor public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
+ ctor public BoringLayout(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, float, float, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
method public void ellipsized(int, int);
method public int getBottomPadding();
method public int getEllipsisCount(int);
@@ -46596,12 +46601,12 @@ package android.text {
method public int getLineTop(int);
method public int getParagraphDirection(int);
method public int getTopPadding();
- method @Deprecated public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint);
- method @Deprecated public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint, android.text.BoringLayout.Metrics);
- method @Deprecated @Nullable public static android.text.BoringLayout.Metrics isBoring(@NonNull CharSequence, @NonNull android.text.TextPaint, @NonNull android.text.TextDirectionHeuristic, boolean, @Nullable android.text.BoringLayout.Metrics);
- method @Deprecated public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
- method @Deprecated public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
- method @Deprecated @NonNull public static android.text.BoringLayout make(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
+ method public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint);
+ method public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint, android.text.BoringLayout.Metrics);
+ method @Nullable public static android.text.BoringLayout.Metrics isBoring(@NonNull CharSequence, @NonNull android.text.TextPaint, @NonNull android.text.TextDirectionHeuristic, boolean, @Nullable android.text.BoringLayout.Metrics);
+ method public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
+ method public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
+ method @NonNull public static android.text.BoringLayout make(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
method public android.text.BoringLayout replaceOrMake(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
method @NonNull public android.text.BoringLayout replaceOrMake(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
method public android.text.BoringLayout replaceOrMake(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
@@ -46609,7 +46614,7 @@ package android.text {
public static class BoringLayout.Metrics extends android.graphics.Paint.FontMetricsInt {
ctor public BoringLayout.Metrics();
- method @NonNull public android.graphics.RectF getDrawingBoundingBox();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.RectF getDrawingBoundingBox();
field public int width;
}
@@ -46794,7 +46799,7 @@ package android.text {
public abstract class Layout {
ctor protected Layout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float);
- method @NonNull public android.graphics.RectF computeDrawingBoundingBox();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.RectF computeDrawingBoundingBox();
method public void draw(android.graphics.Canvas);
method public void draw(android.graphics.Canvas, android.graphics.Path, android.graphics.Paint, int);
method public void draw(@NonNull android.graphics.Canvas, @Nullable java.util.List<android.graphics.Path>, @Nullable java.util.List<android.graphics.Paint>, @Nullable android.graphics.Path, @Nullable android.graphics.Paint, int);
@@ -46803,24 +46808,24 @@ package android.text {
method public void fillCharacterBounds(@IntRange(from=0) int, @IntRange(from=0) int, @NonNull float[], @IntRange(from=0) int);
method @NonNull public final android.text.Layout.Alignment getAlignment();
method public abstract int getBottomPadding();
- method public final int getBreakStrategy();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getBreakStrategy();
method public void getCursorPath(int, android.graphics.Path, CharSequence);
method public static float getDesiredWidth(CharSequence, android.text.TextPaint);
method public static float getDesiredWidth(CharSequence, int, int, android.text.TextPaint);
method public abstract int getEllipsisCount(int);
method public abstract int getEllipsisStart(int);
- method @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
method @IntRange(from=0) public int getEllipsizedWidth();
method public int getHeight();
- method public final int getHyphenationFrequency();
- method public final int getJustificationMode();
- method @Nullable public final int[] getLeftIndents();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getHyphenationFrequency();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getJustificationMode();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final int[] getLeftIndents();
method public final int getLineAscent(int);
method public final int getLineBaseline(int);
method public final int getLineBottom(int);
method public int getLineBottom(int, boolean);
method public int getLineBounds(int, android.graphics.Rect);
- method @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
method public abstract boolean getLineContainsTab(int);
method public abstract int getLineCount();
method public abstract int getLineDescent(int);
@@ -46831,13 +46836,13 @@ package android.text {
method public float getLineLeft(int);
method public float getLineMax(int);
method public float getLineRight(int);
- method public final float getLineSpacingAmount();
- method public final float getLineSpacingMultiplier();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final float getLineSpacingAmount();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final float getLineSpacingMultiplier();
method public abstract int getLineStart(int);
method public abstract int getLineTop(int);
method public int getLineVisibleEnd(int);
method public float getLineWidth(int);
- method @IntRange(from=1) public final int getMaxLines();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @IntRange(from=1) public final int getMaxLines();
method public int getOffsetForHorizontal(int, float);
method public int getOffsetToLeftOf(int);
method public int getOffsetToRightOf(int);
@@ -46848,19 +46853,19 @@ package android.text {
method public final int getParagraphRight(int);
method public float getPrimaryHorizontal(int);
method @Nullable public int[] getRangeForRect(@NonNull android.graphics.RectF, @NonNull android.text.SegmentFinder, @NonNull android.text.Layout.TextInclusionStrategy);
- method @Nullable public final int[] getRightIndents();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final int[] getRightIndents();
method public float getSecondaryHorizontal(int);
method public void getSelectionPath(int, int, android.graphics.Path);
method public final float getSpacingAdd();
method public final float getSpacingMultiplier();
- method @NonNull public final CharSequence getText();
- method @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public final CharSequence getText();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
method public abstract int getTopPadding();
- method public boolean getUseBoundsForWidth();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public boolean getUseBoundsForWidth();
method @IntRange(from=0) public final int getWidth();
method public final void increaseWidthTo(int);
method public boolean isFallbackLineSpacingEnabled();
- method public final boolean isFontPaddingIncluded();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final boolean isFontPaddingIncluded();
method public boolean isRtlCharAt(int);
method protected final boolean isSpanned();
field public static final int BREAK_STRATEGY_BALANCED = 2; // 0x2
@@ -46888,7 +46893,7 @@ package android.text {
enum_constant public static final android.text.Layout.Alignment ALIGN_OPPOSITE;
}
- public static final class Layout.Builder {
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public static final class Layout.Builder {
ctor public Layout.Builder(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @NonNull android.text.TextPaint, @IntRange(from=0) int);
method @NonNull public android.text.Layout build();
method @NonNull public android.text.Layout.Builder setAlignment(@NonNull android.text.Layout.Alignment);
@@ -46906,7 +46911,7 @@ package android.text {
method @NonNull public android.text.Layout.Builder setMaxLines(@IntRange(from=1) int);
method @NonNull public android.text.Layout.Builder setRightIndents(@Nullable int[]);
method @NonNull public android.text.Layout.Builder setTextDirectionHeuristic(@NonNull android.text.TextDirectionHeuristic);
- method @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
}
public static class Layout.Directions {
@@ -47883,11 +47888,15 @@ package android.text.style {
method public void writeToParcel(@NonNull android.os.Parcel, int);
}
- public class LineBreakConfigSpan {
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public class LineBreakConfigSpan {
ctor public LineBreakConfigSpan(@NonNull android.graphics.text.LineBreakConfig);
method @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
}
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final class LineBreakConfigSpan.NoHyphenationSpan extends android.text.style.LineBreakConfigSpan {
+ ctor @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public LineBreakConfigSpan.NoHyphenationSpan();
+ }
+
public interface LineHeightSpan extends android.text.style.ParagraphStyle android.text.style.WrapTogetherSpan {
method public void chooseHeight(CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt);
}
@@ -51222,11 +51231,8 @@ package android.view {
@FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public interface ScrollFeedbackProvider {
method public void onScrollLimit(int, int, int, boolean);
- method public default void onScrollLimit(@NonNull android.view.MotionEvent, int, boolean);
method public void onScrollProgress(int, int, int, int);
- method public default void onScrollProgress(@NonNull android.view.MotionEvent, int, int);
method public void onSnapToItem(int, int, int);
- method public default void onSnapToItem(@NonNull android.view.MotionEvent, int);
}
public class SearchEvent {
@@ -59879,7 +59885,7 @@ package android.widget {
method public final android.text.method.TransformationMethod getTransformationMethod();
method public android.graphics.Typeface getTypeface();
method public android.text.style.URLSpan[] getUrls();
- method public boolean getUseBoundsForWidth();
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public boolean getUseBoundsForWidth();
method public boolean hasSelection();
method public boolean isAllCaps();
method public boolean isCursorVisible();
@@ -60022,7 +60028,7 @@ package android.widget {
method public final void setTransformationMethod(android.text.method.TransformationMethod);
method public void setTypeface(@Nullable android.graphics.Typeface, int);
method public void setTypeface(@Nullable android.graphics.Typeface);
- method public void setUseBoundsForWidth(boolean);
+ method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public void setUseBoundsForWidth(boolean);
method public void setWidth(int);
field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index eba1fbe8cb33..e49ed18de953 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -95,6 +95,7 @@ package android {
field public static final String BYPASS_ROLE_QUALIFICATION = "android.permission.BYPASS_ROLE_QUALIFICATION";
field public static final String CALL_AUDIO_INTERCEPTION = "android.permission.CALL_AUDIO_INTERCEPTION";
field public static final String CAMERA_DISABLE_TRANSMIT_LED = "android.permission.CAMERA_DISABLE_TRANSMIT_LED";
+ field public static final String CAMERA_HEADLESS_SYSTEM_USER = "android.permission.CAMERA_HEADLESS_SYSTEM_USER";
field public static final String CAMERA_OPEN_CLOSE_LISTENER = "android.permission.CAMERA_OPEN_CLOSE_LISTENER";
field public static final String CAPTURE_AUDIO_HOTWORD = "android.permission.CAPTURE_AUDIO_HOTWORD";
field public static final String CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD = "android.permission.CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD";
@@ -3483,6 +3484,7 @@ package android.content {
field public static final String SYSTEM_CONFIG_SERVICE = "system_config";
field public static final String SYSTEM_UPDATE_SERVICE = "system_update";
field public static final String TETHERING_SERVICE = "tethering";
+ field public static final String THREAD_NETWORK_SERVICE = "thread_network";
field public static final String TIME_MANAGER_SERVICE = "time_manager";
field public static final String TRANSLATION_MANAGER_SERVICE = "translation";
field public static final String UI_TRANSLATION_SERVICE = "ui_translation";
@@ -3798,13 +3800,6 @@ package android.content.pm {
field @RequiresPermission(android.Manifest.permission.ACCESS_SHORTCUTS) public static final int FLAG_GET_PERSONS_DATA = 2048; // 0x800
}
- public class PackageArchiver {
- method @RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES, android.Manifest.permission.REQUEST_DELETE_PACKAGES}) public void requestArchive(@NonNull String, @NonNull android.content.IntentSender) throws android.content.pm.PackageManager.NameNotFoundException;
- method @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public void requestUnarchive(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
- field public static final String EXTRA_UNARCHIVE_ALL_USERS = "android.content.pm.extra.UNARCHIVE_ALL_USERS";
- field public static final String EXTRA_UNARCHIVE_PACKAGE_NAME = "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
- }
-
public class PackageInfo implements android.os.Parcelable {
field public boolean isArchived;
}
@@ -3812,6 +3807,8 @@ package android.content.pm {
public class PackageInstaller {
method @NonNull public android.content.pm.PackageInstaller.InstallInfo readInstallInfo(@NonNull java.io.File, int) throws android.content.pm.PackageInstaller.PackageParsingException;
method @NonNull public android.content.pm.PackageInstaller.InstallInfo readInstallInfo(@NonNull android.os.ParcelFileDescriptor, @Nullable String, int) throws android.content.pm.PackageInstaller.PackageParsingException;
+ method @FlaggedApi(Flags.FLAG_ARCHIVING) @RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES, android.Manifest.permission.REQUEST_DELETE_PACKAGES}) public void requestArchive(@NonNull String, @NonNull android.content.IntentSender) throws android.content.pm.PackageManager.NameNotFoundException;
+ method @FlaggedApi(Flags.FLAG_ARCHIVING) @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public void requestUnarchive(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean);
field public static final String ACTION_CONFIRM_INSTALL = "android.content.pm.action.CONFIRM_INSTALL";
field public static final String ACTION_CONFIRM_PRE_APPROVAL = "android.content.pm.action.CONFIRM_PRE_APPROVAL";
@@ -3822,6 +3819,8 @@ package android.content.pm {
field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE";
field public static final String EXTRA_LEGACY_STATUS = "android.content.pm.extra.LEGACY_STATUS";
field public static final String EXTRA_RESOLVED_BASE_PATH = "android.content.pm.extra.RESOLVED_BASE_PATH";
+ field @FlaggedApi(Flags.FLAG_ARCHIVING) public static final String EXTRA_UNARCHIVE_ALL_USERS = "android.content.pm.extra.UNARCHIVE_ALL_USERS";
+ field @FlaggedApi(Flags.FLAG_ARCHIVING) public static final String EXTRA_UNARCHIVE_PACKAGE_NAME = "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
field public static final int LOCATION_DATA_APP = 0; // 0x0
field public static final int LOCATION_MEDIA_DATA = 2; // 0x2
field public static final int LOCATION_MEDIA_OBB = 1; // 0x1
@@ -3906,7 +3905,6 @@ package android.content.pm {
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_INSTANT_APPS) public abstract java.util.List<android.content.pm.InstantAppInfo> getInstantApps();
method @Deprecated @NonNull public abstract java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(@NonNull String);
method @Deprecated @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public abstract int getIntentVerificationStatusAsUser(@NonNull String, int);
- method @NonNull public android.content.pm.PackageArchiver getPackageArchiver();
method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public int getPackageUidAsUser(@NonNull String, @NonNull android.content.pm.PackageManager.PackageInfoFlags, int) throws android.content.pm.PackageManager.NameNotFoundException;
method @android.content.pm.PackageManager.PermissionFlags @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS, android.Manifest.permission.GET_RUNTIME_PERMISSIONS}) public abstract int getPermissionFlags(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
method @NonNull @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] getUnsuspendablePackages(@NonNull String[]);
@@ -3932,6 +3930,7 @@ package android.content.pm {
method @RequiresPermission(android.Manifest.permission.SET_HARMFUL_APP_WARNINGS) public void setHarmfulAppWarning(@NonNull String, @Nullable CharSequence);
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable String);
method @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo);
+ method @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED) @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo, int);
method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, conditional=true) public void setSyntheticAppDetailsActivityEnabled(@NonNull String, boolean);
method public void setSystemAppState(@NonNull String, int);
method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public abstract void setUpdateAvailable(@NonNull String, boolean);
@@ -3982,6 +3981,7 @@ package android.content.pm {
field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED = 512; // 0x200
field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED = 256; // 0x100
field public static final int FLAG_PERMISSION_USER_SET = 1; // 0x1
+ field @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED) public static final int FLAG_SUSPEND_QUARANTINED = 1; // 0x1
field public static final int INSTALL_FAILED_ALREADY_EXISTS = -1; // 0xffffffff
field public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13; // 0xfffffff3
field public static final int INSTALL_FAILED_CONTAINER_ERROR = -18; // 0xffffffee
@@ -16709,10 +16709,12 @@ package android.telephony.satellite {
field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3
field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2
field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff
+ field @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG) public static final int SATELLITE_MODEM_STATE_CONNECTED = 7; // 0x7
field public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3
field public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2
field public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0
field public static final int SATELLITE_MODEM_STATE_LISTENING = 1; // 0x1
+ field @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG) public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6; // 0x6
field public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4
field public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5
field public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 642813f36a58..a8a6eb9f34ee 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -2115,6 +2115,7 @@ package android.net.wifi.sharedconnectivity.app {
public class SharedConnectivityManager {
method @Nullable public static android.net.wifi.sharedconnectivity.app.SharedConnectivityManager create(@NonNull android.content.Context, @NonNull String, @NonNull String);
+ method @NonNull public android.content.BroadcastReceiver getBroadcastReceiver();
method @Nullable public android.content.ServiceConnection getServiceConnection();
method public void setService(@Nullable android.os.IInterface);
}
@@ -3504,6 +3505,10 @@ package android.view {
field public static final int FLAG_IS_ACCESSIBILITY_EVENT = 2048; // 0x800
}
+ public static final class MotionEvent.PointerCoords {
+ method public boolean isResampled();
+ }
+
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public @interface RemotableViewMethod {
method public abstract String asyncImpl() default "";
}
diff --git a/core/java/Android.bp b/core/java/Android.bp
index 70cb597875ff..13a1bd6ca176 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -9,6 +9,11 @@ package {
default_applicable_licenses: ["frameworks_base_license"],
}
+aidl_library {
+ name: "HardwareBuffer_aidl",
+ hdrs: ["android/hardware/HardwareBuffer.aidl"],
+}
+
filegroup {
name: "framework-core-sources",
srcs: [
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index a366464ceac2..7bc6f9bfafc7 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -23,7 +23,7 @@ import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.inMultiWindowMode;
import static android.os.Process.myUid;
-
+import static com.android.sdksandbox.flags.Flags.sandboxActivitySdkBasedContext;
import static java.lang.Character.MIN_VALUE;
import android.annotation.AnimRes;
@@ -8631,6 +8631,12 @@ public class Activity extends ContextThemeWrapper
Configuration config, String referrer, IVoiceInteractor voiceInteractor,
Window window, ActivityConfigCallback activityConfigCallback, IBinder assistToken,
IBinder shareableActivityToken) {
+ if (sandboxActivitySdkBasedContext()) {
+ // Sandbox activities extract a token from the intent's extra to identify the related
+ // SDK as part of overriding attachBaseContext, then it wraps the passed context in an
+ // SDK ContextWrapper, so mIntent has to be set before calling attachBaseContext.
+ mIntent = intent;
+ }
attachBaseContext(context);
mFragments.attachHost(null /*parent*/);
@@ -8656,6 +8662,7 @@ public class Activity extends ContextThemeWrapper
mShareableActivityToken = shareableActivityToken;
mIdent = ident;
mApplication = application;
+ //TODO(b/300059435): do not set the mIntent again as part of the flag clean up.
mIntent = intent;
mReferrer = referrer;
mComponent = intent.getComponent();
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 2ae721648656..895dde760058 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -1507,8 +1507,9 @@ public class ActivityOptions extends ComponentOptions {
}
/** @hide */
- public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
+ public ActivityOptions setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
mRemoteTransition = remoteTransition;
+ return this;
}
/** @hide */
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index f28b4b4eb207..00e546ad25b0 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -38,6 +38,7 @@ import static android.window.ConfigurationHelper.isDifferentDisplay;
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 android.annotation.NonNull;
import android.annotation.Nullable;
@@ -53,6 +54,8 @@ import android.app.backup.BackupAgent;
import android.app.backup.BackupAnnotations.BackupDestination;
import android.app.backup.BackupAnnotations.OperationType;
import android.app.compat.CompatChanges;
+import android.app.sdksandbox.sandboxactivity.ActivityContextInfo;
+import android.app.sdksandbox.sandboxactivity.ActivityContextInfoProvider;
import android.app.servertransaction.ActivityLifecycleItem;
import android.app.servertransaction.ActivityLifecycleItem.LifecycleState;
import android.app.servertransaction.ActivityRelaunchItem;
@@ -3655,15 +3658,16 @@ public final class ActivityThread extends ClientTransactionHandler
}
@UnsupportedAppUsage
- public final void sendActivityResult(
- IBinder token, String id, int requestCode,
+ public void sendActivityResult(
+ IBinder activityToken, String id, int requestCode,
int resultCode, Intent data) {
if (DEBUG_RESULTS) Slog.v(TAG, "sendActivityResult: id=" + id
+ " req=" + requestCode + " res=" + resultCode + " data=" + data);
ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
list.add(new ResultInfo(id, requestCode, resultCode, data));
- final ClientTransaction clientTransaction = ClientTransaction.obtain(mAppThread, token);
- clientTransaction.addCallback(ActivityResultItem.obtain(list));
+ final ClientTransaction clientTransaction = ClientTransaction.obtain(mAppThread,
+ activityToken);
+ clientTransaction.addCallback(ActivityResultItem.obtain(activityToken, list));
try {
mAppThread.scheduleTransaction(clientTransaction);
} catch (RemoteException e) {
@@ -3733,16 +3737,38 @@ public final class ActivityThread extends ClientTransactionHandler
r.activityInfo.targetActivity);
}
- ContextImpl appContext = createBaseContextForActivity(r);
+ boolean isSandboxActivityContext = sandboxActivitySdkBasedContext()
+ && r.intent.isSandboxActivity(mSystemContext);
+ boolean isSandboxedSdkContextUsed = false;
+ ContextImpl activityBaseContext;
+ if (isSandboxActivityContext) {
+ activityBaseContext = createBaseContextForSandboxActivity(r);
+ if (activityBaseContext == null) {
+ // Failed to retrieve the SDK based sandbox activity context, falling back to the
+ // app based context.
+ activityBaseContext = createBaseContextForActivity(r);
+ } else {
+ isSandboxedSdkContextUsed = true;
+ }
+ } else {
+ activityBaseContext = createBaseContextForActivity(r);
+ }
Activity activity = null;
try {
- java.lang.ClassLoader cl = appContext.getClassLoader();
+ java.lang.ClassLoader cl;
+ if (isSandboxedSdkContextUsed) {
+ // In case of sandbox activity, the context refers to the an SDK with no visibility
+ // on the SandboxedActivity java class, the App context should be used instead.
+ cl = activityBaseContext.getApplicationContext().getClassLoader();
+ } else {
+ cl = activityBaseContext.getClassLoader();
+ }
activity = mInstrumentation.newActivity(
cl, component.getClassName(), r.intent);
StrictMode.incrementExpectedActivityCount(activity.getClass());
r.intent.setExtrasClassLoader(cl);
r.intent.prepareToEnterProcess(isProtectedComponent(r.activityInfo),
- appContext.getAttributionSource());
+ activityBaseContext.getAttributionSource());
if (r.state != null) {
r.state.setClassLoader(cl);
}
@@ -3773,7 +3799,8 @@ public final class ActivityThread extends ClientTransactionHandler
}
if (activity != null) {
- CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
+ CharSequence title =
+ r.activityInfo.loadLabel(activityBaseContext.getPackageManager());
Configuration config =
new Configuration(mConfigurationController.getCompatConfiguration());
if (r.overrideConfig != null) {
@@ -3790,11 +3817,11 @@ public final class ActivityThread extends ClientTransactionHandler
// Activity resources must be initialized with the same loaders as the
// application context.
- appContext.getResources().addLoaders(
+ activityBaseContext.getResources().addLoaders(
app.getResources().getLoaders().toArray(new ResourcesLoader[0]));
- appContext.setOuterContext(activity);
- activity.attach(appContext, this, getInstrumentation(), r.token,
+ activityBaseContext.setOuterContext(activity);
+ activity.attach(activityBaseContext, this, getInstrumentation(), r.token,
r.ident, app, r.intent, r.activityInfo, title, r.parent,
r.embeddedID, r.lastNonConfigurationInstances, config,
r.referrer, r.voiceInteractor, window, r.activityConfigCallback,
@@ -3951,6 +3978,44 @@ public final class ActivityThread extends ClientTransactionHandler
}
/**
+ * Creates the base context for the sandbox activity based on its corresponding SDK {@link
+ * ApplicationInfo} and flags.
+ */
+ @Nullable
+ private ContextImpl createBaseContextForSandboxActivity(@NonNull ActivityClientRecord r) {
+ ActivityContextInfoProvider contextInfoProvider = ActivityContextInfoProvider.getInstance();
+
+ ActivityContextInfo contextInfo;
+ try {
+ contextInfo = contextInfoProvider.getActivityContextInfo(r.intent);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Passed intent does not match an expected sandbox activity", e);
+ return null;
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "SDK customized context flag is disabled", e);
+ return null;
+ } catch (Exception e) { // generic catch to unexpected exceptions
+ Log.e(TAG, "Failed to create context for sandbox activity", e);
+ return null;
+ }
+
+ final int displayId = ActivityClient.getInstance().getDisplayId(r.token);
+ final LoadedApk sdkApk = getPackageInfo(
+ contextInfo.getSdkApplicationInfo(),
+ r.packageInfo.getCompatibilityInfo(),
+ ActivityContextInfo.CONTEXT_FLAGS);
+
+ final ContextImpl activityContext = ContextImpl.createActivityContext(
+ this, sdkApk, r.activityInfo, r.token, displayId, r.overrideConfig);
+
+ // Set sandbox app's context as the application context for sdk context
+ activityContext.mPackageInfo.makeApplicationInner(
+ /*forceDefaultAppClass=*/false, mInstrumentation);
+
+ return activityContext;
+ }
+
+ /**
* Extended implementation of activity launch. Used when server requests a launch or relaunch.
*/
@Override
@@ -4365,16 +4430,16 @@ public final class ActivityThread extends ClientTransactionHandler
private void schedulePauseWithUserLeavingHint(ActivityClientRecord r) {
final ClientTransaction transaction = ClientTransaction.obtain(this.mAppThread, r.token);
- transaction.setLifecycleStateRequest(PauseActivityItem.obtain(r.activity.isFinishing(),
- /* userLeaving */ true, r.activity.mConfigChangeFlags, /* dontReport */ false,
- /* autoEnteringPip */ false));
+ transaction.setLifecycleStateRequest(PauseActivityItem.obtain(r.token,
+ r.activity.isFinishing(), /* userLeaving */ true, r.activity.mConfigChangeFlags,
+ /* dontReport */ false, /* autoEnteringPip */ false));
executeTransaction(transaction);
}
private void scheduleResume(ActivityClientRecord r) {
final ClientTransaction transaction = ClientTransaction.obtain(this.mAppThread, r.token);
- transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(/* isForward */ false,
- /* shouldSendCompatFakeFocus */ false));
+ transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(r.token,
+ /* isForward */ false, /* shouldSendCompatFakeFocus */ false));
executeTransaction(transaction);
}
@@ -5958,8 +6023,8 @@ public final class ActivityThread extends ClientTransactionHandler
? r.createdConfig : mConfigurationController.getConfiguration(),
r.overrideConfig);
final ActivityRelaunchItem activityRelaunchItem = ActivityRelaunchItem.obtain(
- null /* pendingResults */, null /* pendingIntents */, 0 /* configChanges */,
- mergedConfiguration, r.mPreserveWindow);
+ r.token, null /* pendingResults */, null /* pendingIntents */,
+ 0 /* configChanges */, mergedConfiguration, r.mPreserveWindow);
// Make sure to match the existing lifecycle state in the end of the transaction.
final ActivityLifecycleItem lifecycleRequest =
TransactionExecutorHelper.getLifecycleRequestForCurrentState(r);
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index fcd13b840cb1..02558602acd3 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -64,7 +64,6 @@ import android.content.pm.InstrumentationInfo;
import android.content.pm.IntentFilterVerificationInfo;
import android.content.pm.KeySet;
import android.content.pm.ModuleInfo;
-import android.content.pm.PackageArchiver;
import android.content.pm.PackageInfo;
import android.content.pm.PackageInstaller;
import android.content.pm.PackageItemInfo;
@@ -173,7 +172,6 @@ public class ApplicationPackageManager extends PackageManager {
private volatile UserManager mUserManager;
private volatile PermissionManager mPermissionManager;
private volatile PackageInstaller mInstaller;
- private volatile PackageArchiver mPackageArchiver;
private volatile ArtManager mArtManager;
private volatile DevicePolicyManager mDevicePolicyManager;
private volatile String mPermissionsControllerPackageName;
@@ -3284,18 +3282,6 @@ public class ApplicationPackageManager extends PackageManager {
}
@Override
- public PackageArchiver getPackageArchiver() {
- if (mPackageArchiver == null) {
- try {
- mPackageArchiver = new PackageArchiver(mContext, mPM.getPackageArchiverService());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
- return mPackageArchiver;
- }
-
- @Override
public boolean isPackageAvailable(String packageName) {
try {
return mPM.isPackageAvailable(packageName, getUserId());
diff --git a/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java b/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
index e40925441f0f..c2c54278a84e 100644
--- a/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
+++ b/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
@@ -45,7 +45,7 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
CompatibilityInfo.applyOverrideScaleIfNeeded(mConfiguration);
// Notify the client of an upcoming change in the token configuration. This ensures that
// batches of config change items only process the newest configuration.
- client.updatePendingActivityConfiguration(token, mConfiguration);
+ client.updatePendingActivityConfiguration(getActivityToken(), mConfiguration);
}
@Override
@@ -61,8 +61,7 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
@Override
public Context getContextToUpdate(@NonNull ClientTransactionHandler client,
@Nullable IBinder token) {
- // TODO(b/260873529): Update ClientTransaction to bundle multiple activity config updates.
- return client.getActivity(token);
+ return client.getActivity(getActivityToken());
}
// ObjectPoolItem implementation
@@ -70,7 +69,9 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
private ActivityConfigurationChangeItem() {}
/** Obtain an instance initialized with provided params. */
- public static ActivityConfigurationChangeItem obtain(@NonNull Configuration config) {
+ @NonNull
+ public static ActivityConfigurationChangeItem obtain(@NonNull IBinder activityToken,
+ @NonNull Configuration config) {
if (config == null) {
throw new IllegalArgumentException("Config must not be null.");
}
@@ -80,6 +81,7 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
if (instance == null) {
instance = new ActivityConfigurationChangeItem();
}
+ instance.setActivityToken(activityToken);
instance.mConfiguration = config;
return instance;
@@ -87,6 +89,7 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mConfiguration = Configuration.EMPTY;
ObjectPool.recycle(this);
}
@@ -96,32 +99,34 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeTypedObject(mConfiguration, flags);
}
/** Read from Parcel. */
- private ActivityConfigurationChangeItem(Parcel in) {
+ private ActivityConfigurationChangeItem(@NonNull Parcel in) {
+ super(in);
mConfiguration = in.readTypedObject(Configuration.CREATOR);
}
public static final @NonNull Creator<ActivityConfigurationChangeItem> CREATOR =
- new Creator<ActivityConfigurationChangeItem>() {
- public ActivityConfigurationChangeItem createFromParcel(Parcel in) {
- return new ActivityConfigurationChangeItem(in);
- }
+ new Creator<>() {
+ public ActivityConfigurationChangeItem createFromParcel(@NonNull Parcel in) {
+ return new ActivityConfigurationChangeItem(in);
+ }
- public ActivityConfigurationChangeItem[] newArray(int size) {
- return new ActivityConfigurationChangeItem[size];
- }
- };
+ public ActivityConfigurationChangeItem[] newArray(int size) {
+ return new ActivityConfigurationChangeItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final ActivityConfigurationChangeItem other = (ActivityConfigurationChangeItem) o;
@@ -130,11 +135,15 @@ public class ActivityConfigurationChangeItem extends ActivityTransactionItem {
@Override
public int hashCode() {
- return mConfiguration.hashCode();
+ int result = 17;
+ result = 31 * result + super.hashCode();
+ result = 31 * result + Objects.hashCode(mConfiguration);
+ return result;
}
@Override
public String toString() {
- return "ActivityConfigurationChange{config=" + mConfiguration + "}";
+ return "ActivityConfigurationChange{" + super.toString()
+ + ",config=" + mConfiguration + "}";
}
}
diff --git a/core/java/android/app/servertransaction/ActivityLifecycleItem.java b/core/java/android/app/servertransaction/ActivityLifecycleItem.java
index cadb6606b1be..b34f6788fb60 100644
--- a/core/java/android/app/servertransaction/ActivityLifecycleItem.java
+++ b/core/java/android/app/servertransaction/ActivityLifecycleItem.java
@@ -17,6 +17,8 @@
package android.app.servertransaction;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.os.Parcel;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -50,12 +52,13 @@ public abstract class ActivityLifecycleItem extends ActivityTransactionItem {
public static final int ON_DESTROY = 6;
public static final int ON_RESTART = 7;
+ ActivityLifecycleItem() {}
+
+ ActivityLifecycleItem(@NonNull Parcel in) {
+ super(in);
+ }
+
/** A final lifecycle state that an activity should reach. */
@LifecycleState
public abstract int getTargetState();
-
- /** Called by subclasses to make sure base implementation is cleaned up */
- @Override
- public void recycle() {
- }
}
diff --git a/core/java/android/app/servertransaction/ActivityRelaunchItem.java b/core/java/android/app/servertransaction/ActivityRelaunchItem.java
index a8b058ac3583..491d0260f6fb 100644
--- a/core/java/android/app/servertransaction/ActivityRelaunchItem.java
+++ b/core/java/android/app/servertransaction/ActivityRelaunchItem.java
@@ -56,18 +56,18 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
private ActivityClientRecord mActivityClientRecord;
@Override
- public void preExecute(ClientTransactionHandler client, IBinder token) {
+ public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
// The local config is already scaled so only apply if this item is from server side.
if (!client.isExecutingLocalTransaction()) {
CompatibilityInfo.applyOverrideScaleIfNeeded(mConfig);
}
- mActivityClientRecord = client.prepareRelaunchActivity(token, mPendingResults,
+ mActivityClientRecord = client.prepareRelaunchActivity(getActivityToken(), mPendingResults,
mPendingNewIntents, mConfigChanges, mConfig, mPreserveWindow);
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
if (mActivityClientRecord == null) {
if (DEBUG_ORDER) Slog.d(TAG, "Activity relaunch cancelled");
return;
@@ -78,9 +78,9 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
- final ActivityClientRecord r = getActivityClientRecord(client, token);
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
+ final ActivityClientRecord r = getActivityClientRecord(client);
client.reportRelaunch(r);
}
@@ -89,13 +89,16 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
private ActivityRelaunchItem() {}
/** Obtain an instance initialized with provided params. */
- public static ActivityRelaunchItem obtain(List<ResultInfo> pendingResults,
- List<ReferrerIntent> pendingNewIntents, int configChanges, MergedConfiguration config,
- boolean preserveWindow) {
+ @NonNull
+ public static ActivityRelaunchItem obtain(@NonNull IBinder activityToken,
+ @Nullable List<ResultInfo> pendingResults,
+ @Nullable List<ReferrerIntent> pendingNewIntents, int configChanges,
+ @NonNull MergedConfiguration config, boolean preserveWindow) {
ActivityRelaunchItem instance = ObjectPool.obtain(ActivityRelaunchItem.class);
if (instance == null) {
instance = new ActivityRelaunchItem();
}
+ instance.setActivityToken(activityToken);
instance.mPendingResults = pendingResults;
instance.mPendingNewIntents = pendingNewIntents;
instance.mConfigChanges = configChanges;
@@ -107,6 +110,7 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mPendingResults = null;
mPendingNewIntents = null;
mConfigChanges = 0;
@@ -121,7 +125,8 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeTypedList(mPendingResults, flags);
dest.writeTypedList(mPendingNewIntents, flags);
dest.writeInt(mConfigChanges);
@@ -130,7 +135,8 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
}
/** Read from Parcel. */
- private ActivityRelaunchItem(Parcel in) {
+ private ActivityRelaunchItem(@NonNull Parcel in) {
+ super(in);
mPendingResults = in.createTypedArrayList(ResultInfo.CREATOR);
mPendingNewIntents = in.createTypedArrayList(ReferrerIntent.CREATOR);
mConfigChanges = in.readInt();
@@ -139,22 +145,22 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
}
public static final @NonNull Creator<ActivityRelaunchItem> CREATOR =
- new Creator<ActivityRelaunchItem>() {
- public ActivityRelaunchItem createFromParcel(Parcel in) {
- return new ActivityRelaunchItem(in);
- }
+ new Creator<>() {
+ public ActivityRelaunchItem createFromParcel(@NonNull Parcel in) {
+ return new ActivityRelaunchItem(in);
+ }
- public ActivityRelaunchItem[] newArray(int size) {
- return new ActivityRelaunchItem[size];
- }
- };
+ public ActivityRelaunchItem[] newArray(int size) {
+ return new ActivityRelaunchItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final ActivityRelaunchItem other = (ActivityRelaunchItem) o;
@@ -167,6 +173,7 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + Objects.hashCode(mPendingResults);
result = 31 * result + Objects.hashCode(mPendingNewIntents);
result = 31 * result + mConfigChanges;
@@ -177,8 +184,11 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
@Override
public String toString() {
- return "ActivityRelaunchItem{pendingResults=" + mPendingResults
- + ",pendingNewIntents=" + mPendingNewIntents + ",configChanges=" + mConfigChanges
- + ",config=" + mConfig + ",preserveWindow" + mPreserveWindow + "}";
+ return "ActivityRelaunchItem{" + super.toString()
+ + ",pendingResults=" + mPendingResults
+ + ",pendingNewIntents=" + mPendingNewIntents
+ + ",configChanges=" + mConfigChanges
+ + ",config=" + mConfig
+ + ",preserveWindow" + mPreserveWindow + "}";
}
}
diff --git a/core/java/android/app/servertransaction/ActivityResultItem.java b/core/java/android/app/servertransaction/ActivityResultItem.java
index 27d104b59284..24fced4981d6 100644
--- a/core/java/android/app/servertransaction/ActivityResultItem.java
+++ b/core/java/android/app/servertransaction/ActivityResultItem.java
@@ -30,6 +30,7 @@ import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
+import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Trace;
@@ -61,24 +62,26 @@ public class ActivityResultItem extends ActivityTransactionItem {
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDeliverResult");
client.handleSendResult(r, mResultInfoList, "ACTIVITY_RESULT");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
-
// ObjectPoolItem implementation
private ActivityResultItem() {}
/** Obtain an instance initialized with provided params. */
- public static ActivityResultItem obtain(List<ResultInfo> resultInfoList) {
+ @NonNull
+ public static ActivityResultItem obtain(@NonNull IBinder activityToken,
+ @NonNull List<ResultInfo> resultInfoList) {
ActivityResultItem instance = ObjectPool.obtain(ActivityResultItem.class);
if (instance == null) {
instance = new ActivityResultItem();
}
+ instance.setActivityToken(activityToken);
instance.mResultInfoList = resultInfoList;
return instance;
@@ -86,41 +89,43 @@ public class ActivityResultItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mResultInfoList = null;
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeTypedList(mResultInfoList, flags);
}
/** Read from Parcel. */
- private ActivityResultItem(Parcel in) {
+ private ActivityResultItem(@NonNull Parcel in) {
+ super(in);
mResultInfoList = in.createTypedArrayList(ResultInfo.CREATOR);
}
public static final @NonNull Parcelable.Creator<ActivityResultItem> CREATOR =
- new Parcelable.Creator<ActivityResultItem>() {
- public ActivityResultItem createFromParcel(Parcel in) {
- return new ActivityResultItem(in);
- }
+ new Parcelable.Creator<>() {
+ public ActivityResultItem createFromParcel(@NonNull Parcel in) {
+ return new ActivityResultItem(in);
+ }
- public ActivityResultItem[] newArray(int size) {
- return new ActivityResultItem[size];
- }
- };
+ public ActivityResultItem[] newArray(int size) {
+ return new ActivityResultItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final ActivityResultItem other = (ActivityResultItem) o;
@@ -129,11 +134,15 @@ public class ActivityResultItem extends ActivityTransactionItem {
@Override
public int hashCode() {
- return mResultInfoList.hashCode();
+ int result = 17;
+ result = 31 * result + super.hashCode();
+ result = 31 * result + Objects.hashCode(mResultInfoList);
+ return result;
}
@Override
public String toString() {
- return "ActivityResultItem{resultInfoList=" + mResultInfoList + "}";
+ return "ActivityResultItem{" + super.toString()
+ + ",resultInfoList=" + mResultInfoList + "}";
}
}
diff --git a/core/java/android/app/servertransaction/ActivityTransactionItem.java b/core/java/android/app/servertransaction/ActivityTransactionItem.java
index 469a9bfe59ef..0f8879e1429b 100644
--- a/core/java/android/app/servertransaction/ActivityTransactionItem.java
+++ b/core/java/android/app/servertransaction/ActivityTransactionItem.java
@@ -18,13 +18,18 @@ package android.app.servertransaction;
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+import android.annotation.CallSuper;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.ClientTransactionHandler;
import android.os.IBinder;
+import android.os.Parcel;
import com.android.internal.annotations.VisibleForTesting;
+import java.util.Objects;
+
/**
* An activity-targeting callback message to a client that can be scheduled and executed.
* It also provides nullity-free version of
@@ -37,11 +42,16 @@ import com.android.internal.annotations.VisibleForTesting;
* @hide
*/
public abstract class ActivityTransactionItem extends ClientTransactionItem {
- @Override
- public final void execute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
- final ActivityClientRecord r = getActivityClientRecord(client, token);
+ /** Target client activity. */
+ private IBinder mActivityToken;
+
+ ActivityTransactionItem() {}
+
+ @Override
+ public final void execute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
+ final ActivityClientRecord r = getActivityClientRecord(client);
execute(client, r, pendingActions);
}
@@ -51,25 +61,80 @@ public abstract class ActivityTransactionItem extends ClientTransactionItem {
*/
@VisibleForTesting(visibility = PACKAGE)
public abstract void execute(@NonNull ClientTransactionHandler client,
- @NonNull ActivityClientRecord r, PendingTransactionActions pendingActions);
+ @NonNull ActivityClientRecord r, @NonNull PendingTransactionActions pendingActions);
/**
- * Gets the {@link ActivityClientRecord} instance that corresponds to the provided token.
+ * Gets the {@link ActivityClientRecord} instance that this transaction item is for.
* @param client Target client handler.
- * @param token Target activity token.
- * @return The {@link ActivityClientRecord} instance that corresponds to the provided token.
+ * @return The {@link ActivityClientRecord} instance that this transaction item is for.
*/
- @NonNull ActivityClientRecord getActivityClientRecord(
- @NonNull ClientTransactionHandler client, IBinder token) {
- final ActivityClientRecord r = client.getActivityClient(token);
+ @NonNull
+ final ActivityClientRecord getActivityClientRecord(@NonNull ClientTransactionHandler client) {
+ final ActivityClientRecord r = client.getActivityClient(getActivityToken());
if (r == null) {
throw new IllegalArgumentException("Activity client record must not be null to execute "
+ "transaction item: " + this);
}
- if (client.getActivity(token) == null) {
+ if (client.getActivity(getActivityToken()) == null) {
throw new IllegalArgumentException("Activity must not be null to execute "
+ "transaction item: " + this);
}
return r;
}
+
+ @VisibleForTesting(visibility = PACKAGE)
+ @NonNull
+ @Override
+ public IBinder getActivityToken() {
+ return mActivityToken;
+ }
+
+ void setActivityToken(@NonNull IBinder activityToken) {
+ mActivityToken = activityToken;
+ }
+
+ // To be overridden
+
+ ActivityTransactionItem(@NonNull Parcel in) {
+ mActivityToken = in.readStrongBinder();
+ }
+
+ @CallSuper
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeStrongBinder(mActivityToken);
+ }
+
+ @CallSuper
+ @Override
+ public void recycle() {
+ mActivityToken = null;
+ }
+
+ // Subclass must override and call super.equals to compare the mActivityToken.
+ @SuppressWarnings("EqualsGetClass")
+ @CallSuper
+ @Override
+ public boolean equals(@Nullable Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final ActivityTransactionItem other = (ActivityTransactionItem) o;
+ return Objects.equals(mActivityToken, other.mActivityToken);
+ }
+
+ @CallSuper
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(mActivityToken);
+ }
+
+ @CallSuper
+ @Override
+ public String toString() {
+ return "mActivityToken=" + mActivityToken;
+ }
}
diff --git a/core/java/android/app/servertransaction/ClientTransactionItem.java b/core/java/android/app/servertransaction/ClientTransactionItem.java
index fe75d89e1257..30fc104a71b7 100644
--- a/core/java/android/app/servertransaction/ClientTransactionItem.java
+++ b/core/java/android/app/servertransaction/ClientTransactionItem.java
@@ -19,6 +19,8 @@ package android.app.servertransaction;
import static android.app.servertransaction.ActivityLifecycleItem.LifecycleState;
import static android.app.servertransaction.ActivityLifecycleItem.UNDEFINED;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ClientTransactionHandler;
@@ -26,13 +28,15 @@ import android.content.Context;
import android.os.IBinder;
import android.os.Parcelable;
+import com.android.internal.annotations.VisibleForTesting;
+
/**
* A callback message to a client that can be scheduled and executed.
* Examples of these might be activity configuration change, multi-window mode change, activity
* result delivery etc.
*
* @see ClientTransaction
- * @see com.android.server.am.ClientLifecycleManager
+ * @see com.android.server.wm.ClientLifecycleManager
* @hide
*/
public abstract class ClientTransactionItem implements BaseClientRequest, Parcelable {
@@ -57,6 +61,16 @@ public abstract class ClientTransactionItem implements BaseClientRequest, Parcel
return null;
}
+ /**
+ * Returns the activity token if this transaction item is activity-targeting. Otherwise,
+ * returns {@code null}.
+ */
+ @VisibleForTesting(visibility = PACKAGE)
+ @Nullable
+ public IBinder getActivityToken() {
+ return null;
+ }
+
// Parcelable
@Override
diff --git a/core/java/android/app/servertransaction/DestroyActivityItem.java b/core/java/android/app/servertransaction/DestroyActivityItem.java
index a074286a4ecd..a327a99435ce 100644
--- a/core/java/android/app/servertransaction/DestroyActivityItem.java
+++ b/core/java/android/app/servertransaction/DestroyActivityItem.java
@@ -36,13 +36,13 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
private int mConfigChanges;
@Override
- public void preExecute(ClientTransactionHandler client, IBinder token) {
- client.getActivitiesToBeDestroyed().put(token, this);
+ public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
+ client.getActivitiesToBeDestroyed().put(getActivityToken(), this);
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDestroy");
client.handleDestroyActivity(r, mFinished, mConfigChanges,
false /* getNonConfigInstance */, "DestroyActivityItem");
@@ -54,17 +54,19 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
return ON_DESTROY;
}
-
// ObjectPoolItem implementation
private DestroyActivityItem() {}
/** Obtain an instance initialized with provided params. */
- public static DestroyActivityItem obtain(boolean finished, int configChanges) {
+ @NonNull
+ public static DestroyActivityItem obtain(@NonNull IBinder activityToken, boolean finished,
+ int configChanges) {
DestroyActivityItem instance = ObjectPool.obtain(DestroyActivityItem.class);
if (instance == null) {
instance = new DestroyActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mFinished = finished;
instance.mConfigChanges = configChanges;
@@ -79,25 +81,25 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeBoolean(mFinished);
dest.writeInt(mConfigChanges);
}
/** Read from Parcel. */
- private DestroyActivityItem(Parcel in) {
+ private DestroyActivityItem(@NonNull Parcel in) {
+ super(in);
mFinished = in.readBoolean();
mConfigChanges = in.readInt();
}
- public static final @NonNull Creator<DestroyActivityItem> CREATOR =
- new Creator<DestroyActivityItem>() {
- public DestroyActivityItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<DestroyActivityItem> CREATOR = new Creator<>() {
+ public DestroyActivityItem createFromParcel(@NonNull Parcel in) {
return new DestroyActivityItem(in);
}
@@ -111,7 +113,7 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final DestroyActivityItem other = (DestroyActivityItem) o;
@@ -121,6 +123,7 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + (mFinished ? 1 : 0);
result = 31 * result + mConfigChanges;
return result;
@@ -128,7 +131,8 @@ public class DestroyActivityItem extends ActivityLifecycleItem {
@Override
public String toString() {
- return "DestroyActivityItem{finished=" + mFinished + ",mConfigChanges="
- + mConfigChanges + "}";
+ return "DestroyActivityItem{" + super.toString()
+ + ",finished=" + mFinished
+ + ",mConfigChanges=" + mConfigChanges + "}";
}
}
diff --git a/core/java/android/app/servertransaction/EnterPipRequestedItem.java b/core/java/android/app/servertransaction/EnterPipRequestedItem.java
index 7dcae654e1d0..743653f4896e 100644
--- a/core/java/android/app/servertransaction/EnterPipRequestedItem.java
+++ b/core/java/android/app/servertransaction/EnterPipRequestedItem.java
@@ -16,9 +16,10 @@
package android.app.servertransaction;
-import android.annotation.Nullable;
+import android.annotation.NonNull;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.ClientTransactionHandler;
+import android.os.IBinder;
import android.os.Parcel;
/**
@@ -28,8 +29,8 @@ import android.os.Parcel;
public final class EnterPipRequestedItem extends ActivityTransactionItem {
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
client.handlePictureInPictureRequested(r);
}
@@ -38,28 +39,32 @@ public final class EnterPipRequestedItem extends ActivityTransactionItem {
private EnterPipRequestedItem() {}
/** Obtain an instance initialized with provided params. */
- public static EnterPipRequestedItem obtain() {
+ @NonNull
+ public static EnterPipRequestedItem obtain(@NonNull IBinder activityToken) {
EnterPipRequestedItem instance = ObjectPool.obtain(EnterPipRequestedItem.class);
if (instance == null) {
instance = new EnterPipRequestedItem();
}
+ instance.setActivityToken(activityToken);
return instance;
}
@Override
public void recycle() {
+ super.recycle();
ObjectPool.recycle(this);
}
// Parcelable implementation
- @Override
- public void writeToParcel(Parcel dest, int flags) { }
+ private EnterPipRequestedItem(@NonNull Parcel in) {
+ super(in);
+ }
- public static final @android.annotation.NonNull Creator<EnterPipRequestedItem> CREATOR =
- new Creator<EnterPipRequestedItem>() {
- public EnterPipRequestedItem createFromParcel(Parcel in) {
- return new EnterPipRequestedItem();
+ public static final @NonNull Creator<EnterPipRequestedItem> CREATOR =
+ new Creator<>() {
+ public EnterPipRequestedItem createFromParcel(@NonNull Parcel in) {
+ return new EnterPipRequestedItem(in);
}
public EnterPipRequestedItem[] newArray(int size) {
@@ -68,12 +73,7 @@ public final class EnterPipRequestedItem extends ActivityTransactionItem {
};
@Override
- public boolean equals(@Nullable Object o) {
- return this == o;
- }
-
- @Override
public String toString() {
- return "EnterPipRequestedItem{}";
+ return "EnterPipRequestedItem{" + super.toString() + "}";
}
}
diff --git a/core/java/android/app/servertransaction/LaunchActivityItem.java b/core/java/android/app/servertransaction/LaunchActivityItem.java
index 5833f1b87254..9b37a35cdb8f 100644
--- a/core/java/android/app/servertransaction/LaunchActivityItem.java
+++ b/core/java/android/app/servertransaction/LaunchActivityItem.java
@@ -18,6 +18,8 @@ package android.app.servertransaction;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityClient;
@@ -39,6 +41,7 @@ import android.os.Parcel;
import android.os.PersistableBundle;
import android.os.Trace;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.content.ReferrerIntent;
@@ -51,6 +54,7 @@ import java.util.Objects;
*/
public class LaunchActivityItem extends ClientTransactionItem {
+ private IBinder mActivityToken;
@UnsupportedAppUsage
private Intent mIntent;
private int mIdent;
@@ -80,7 +84,7 @@ public class LaunchActivityItem extends ClientTransactionItem {
private IActivityClientController mActivityClientController;
@Override
- public void preExecute(ClientTransactionHandler client, IBinder token) {
+ public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
client.countLaunchingActivities(1);
client.updateProcessState(mProcState, false);
CompatibilityInfo.applyOverrideScaleIfNeeded(mCurConfig);
@@ -92,10 +96,10 @@ public class LaunchActivityItem extends ClientTransactionItem {
}
@Override
- public void execute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStart");
- ActivityClientRecord r = new ActivityClientRecord(token, mIntent, mIdent, mInfo,
+ ActivityClientRecord r = new ActivityClientRecord(mActivityToken, mIntent, mIdent, mInfo,
mOverrideConfig, mReferrer, mVoiceInteractor, mState, mPersistentState,
mPendingResults, mPendingNewIntents, mActivityOptions, mIsForward, mProfilerInfo,
client, mAssistToken, mShareableActivityToken, mLaunchedFromBubble,
@@ -105,31 +109,34 @@ public class LaunchActivityItem extends ClientTransactionItem {
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
client.countLaunchingActivities(-1);
}
-
// ObjectPoolItem implementation
private LaunchActivityItem() {}
/** Obtain an instance initialized with provided params. */
- public static LaunchActivityItem obtain(Intent intent, int ident, ActivityInfo info,
- Configuration curConfig, Configuration overrideConfig, int deviceId,
- String referrer, IVoiceInteractor voiceInteractor, int procState, Bundle state,
- PersistableBundle persistentState, List<ResultInfo> pendingResults,
- List<ReferrerIntent> pendingNewIntents, ActivityOptions activityOptions,
- boolean isForward, ProfilerInfo profilerInfo, IBinder assistToken,
- IActivityClientController activityClientController, IBinder shareableActivityToken,
- boolean launchedFromBubble, IBinder taskFragmentToken) {
+ @NonNull
+ public static LaunchActivityItem obtain(@NonNull IBinder activityToken, @NonNull Intent intent,
+ int ident, @NonNull ActivityInfo info, @NonNull Configuration curConfig,
+ @NonNull Configuration overrideConfig, int deviceId, @Nullable String referrer,
+ @Nullable IVoiceInteractor voiceInteractor, int procState, @Nullable Bundle state,
+ @Nullable PersistableBundle persistentState, @Nullable List<ResultInfo> pendingResults,
+ @Nullable List<ReferrerIntent> pendingNewIntents,
+ @Nullable ActivityOptions activityOptions,
+ boolean isForward, @Nullable ProfilerInfo profilerInfo, @NonNull IBinder assistToken,
+ @Nullable IActivityClientController activityClientController,
+ @NonNull IBinder shareableActivityToken, boolean launchedFromBubble,
+ @Nullable IBinder taskFragmentToken) {
LaunchActivityItem instance = ObjectPool.obtain(LaunchActivityItem.class);
if (instance == null) {
instance = new LaunchActivityItem();
}
- setValues(instance, intent, ident, info, curConfig, overrideConfig, deviceId, referrer,
- voiceInteractor, procState, state, persistentState, pendingResults,
+ setValues(instance, activityToken, intent, ident, info, curConfig, overrideConfig, deviceId,
+ referrer, voiceInteractor, procState, state, persistentState, pendingResults,
pendingNewIntents, activityOptions, isForward, profilerInfo, assistToken,
activityClientController, shareableActivityToken,
launchedFromBubble, taskFragmentToken);
@@ -137,19 +144,26 @@ public class LaunchActivityItem extends ClientTransactionItem {
return instance;
}
+ @VisibleForTesting(visibility = PACKAGE)
+ @NonNull
+ @Override
+ public IBinder getActivityToken() {
+ return mActivityToken;
+ }
+
@Override
public void recycle() {
- setValues(this, null, 0, null, null, null, 0, null, null, 0, null, null, null, null,
+ setValues(this, null, null, 0, null, null, null, 0, null, null, 0, null, null, null, null,
null, false, null, null, null, null, false, null);
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write from Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeStrongBinder(mActivityToken);
dest.writeTypedObject(mIntent, flags);
dest.writeInt(mIdent);
dest.writeTypedObject(mInfo, flags);
@@ -174,8 +188,8 @@ public class LaunchActivityItem extends ClientTransactionItem {
}
/** Read from Parcel. */
- private LaunchActivityItem(Parcel in) {
- setValues(this, in.readTypedObject(Intent.CREATOR), in.readInt(),
+ private LaunchActivityItem(@NonNull Parcel in) {
+ setValues(this, in.readStrongBinder(), in.readTypedObject(Intent.CREATOR), in.readInt(),
in.readTypedObject(ActivityInfo.CREATOR), in.readTypedObject(Configuration.CREATOR),
in.readTypedObject(Configuration.CREATOR), in.readInt(), in.readString(),
IVoiceInteractor.Stub.asInterface(in.readStrongBinder()), in.readInt(),
@@ -192,9 +206,8 @@ public class LaunchActivityItem extends ClientTransactionItem {
in.readStrongBinder());
}
- public static final @NonNull Creator<LaunchActivityItem> CREATOR =
- new Creator<LaunchActivityItem>() {
- public LaunchActivityItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<LaunchActivityItem> CREATOR = new Creator<>() {
+ public LaunchActivityItem createFromParcel(@NonNull Parcel in) {
return new LaunchActivityItem(in);
}
@@ -214,7 +227,8 @@ public class LaunchActivityItem extends ClientTransactionItem {
final LaunchActivityItem other = (LaunchActivityItem) o;
final boolean intentsEqual = (mIntent == null && other.mIntent == null)
|| (mIntent != null && mIntent.filterEquals(other.mIntent));
- return intentsEqual && mIdent == other.mIdent
+ return intentsEqual
+ && Objects.equals(mActivityToken, other.mActivityToken) && mIdent == other.mIdent
&& activityInfoEqual(other.mInfo) && Objects.equals(mCurConfig, other.mCurConfig)
&& Objects.equals(mOverrideConfig, other.mOverrideConfig)
&& mDeviceId == other.mDeviceId
@@ -234,6 +248,7 @@ public class LaunchActivityItem extends ClientTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + Objects.hashCode(mActivityToken);
result = 31 * result + mIntent.filterHashCode();
result = 31 * result + mIdent;
result = 31 * result + Objects.hashCode(mCurConfig);
@@ -254,7 +269,7 @@ public class LaunchActivityItem extends ClientTransactionItem {
return result;
}
- private boolean activityInfoEqual(ActivityInfo other) {
+ private boolean activityInfoEqual(@Nullable ActivityInfo other) {
if (mInfo == null) {
return other == null;
}
@@ -270,36 +285,51 @@ public class LaunchActivityItem extends ClientTransactionItem {
* unparceling if a customized class loader is not set to the bundle. So the hash code is
* simply determined by the bundle is empty or not.
*/
- private static int getRoughBundleHashCode(BaseBundle bundle) {
+ private static int getRoughBundleHashCode(@Nullable BaseBundle bundle) {
return (bundle == null || bundle.isDefinitelyEmpty()) ? 0 : 1;
}
/** Compares the bundles without unparceling them (avoid BadParcelableException). */
- private static boolean areBundlesEqualRoughly(BaseBundle a, BaseBundle b) {
+ private static boolean areBundlesEqualRoughly(@Nullable BaseBundle a, @Nullable BaseBundle b) {
return getRoughBundleHashCode(a) == getRoughBundleHashCode(b);
}
@Override
public String toString() {
- return "LaunchActivityItem{intent=" + mIntent + ",ident=" + mIdent + ",info=" + mInfo
- + ",curConfig=" + mCurConfig + ",overrideConfig=" + mOverrideConfig
- + ",deviceId=" + mDeviceId + ",referrer=" + mReferrer + ",procState=" + mProcState
- + ",state=" + mState + ",persistentState=" + mPersistentState
- + ",pendingResults=" + mPendingResults + ",pendingNewIntents=" + mPendingNewIntents
- + ",options=" + mActivityOptions + ",profilerInfo=" + mProfilerInfo
- + ",assistToken=" + mAssistToken + ",shareableActivityToken="
- + mShareableActivityToken + "}";
+ return "LaunchActivityItem{activityToken=" + mActivityToken
+ + ",intent=" + mIntent
+ + ",ident=" + mIdent
+ + ",info=" + mInfo
+ + ",curConfig=" + mCurConfig
+ + ",overrideConfig=" + mOverrideConfig
+ + ",deviceId=" + mDeviceId
+ + ",referrer=" + mReferrer
+ + ",procState=" + mProcState
+ + ",state=" + mState
+ + ",persistentState=" + mPersistentState
+ + ",pendingResults=" + mPendingResults
+ + ",pendingNewIntents=" + mPendingNewIntents
+ + ",options=" + mActivityOptions
+ + ",profilerInfo=" + mProfilerInfo
+ + ",assistToken=" + mAssistToken
+ + ",shareableActivityToken=" + mShareableActivityToken + "}";
}
// Using the same method to set and clear values to make sure we don't forget anything
- private static void setValues(LaunchActivityItem instance, Intent intent, int ident,
- ActivityInfo info, Configuration curConfig, Configuration overrideConfig, int deviceId,
- String referrer, IVoiceInteractor voiceInteractor,
- int procState, Bundle state, PersistableBundle persistentState,
- List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents,
- ActivityOptions activityOptions, boolean isForward, ProfilerInfo profilerInfo,
- IBinder assistToken, IActivityClientController activityClientController,
- IBinder shareableActivityToken, boolean launchedFromBubble, IBinder taskFragmentToken) {
+ private static void setValues(@Nullable LaunchActivityItem instance,
+ @Nullable IBinder activityToken, @Nullable Intent intent, int ident,
+ @Nullable ActivityInfo info, @Nullable Configuration curConfig,
+ @Nullable Configuration overrideConfig, int deviceId,
+ @Nullable String referrer, @Nullable IVoiceInteractor voiceInteractor,
+ int procState, @Nullable Bundle state, @Nullable PersistableBundle persistentState,
+ @Nullable List<ResultInfo> pendingResults,
+ @Nullable List<ReferrerIntent> pendingNewIntents,
+ @Nullable ActivityOptions activityOptions, boolean isForward,
+ @Nullable ProfilerInfo profilerInfo, @Nullable IBinder assistToken,
+ @Nullable IActivityClientController activityClientController,
+ @Nullable IBinder shareableActivityToken, boolean launchedFromBubble,
+ @Nullable IBinder taskFragmentToken) {
+ instance.mActivityToken = activityToken;
instance.mIntent = intent;
instance.mIdent = ident;
instance.mInfo = info;
diff --git a/core/java/android/app/servertransaction/MoveToDisplayItem.java b/core/java/android/app/servertransaction/MoveToDisplayItem.java
index f13bd748f486..fb57bed94160 100644
--- a/core/java/android/app/servertransaction/MoveToDisplayItem.java
+++ b/core/java/android/app/servertransaction/MoveToDisplayItem.java
@@ -40,37 +40,34 @@ public class MoveToDisplayItem extends ActivityTransactionItem {
private Configuration mConfiguration;
@Override
- public void preExecute(ClientTransactionHandler client, IBinder token) {
+ public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
CompatibilityInfo.applyOverrideScaleIfNeeded(mConfiguration);
// Notify the client of an upcoming change in the token configuration. This ensures that
// batches of config change items only process the newest configuration.
- client.updatePendingActivityConfiguration(token, mConfiguration);
+ client.updatePendingActivityConfiguration(getActivityToken(), mConfiguration);
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityMovedToDisplay");
client.handleActivityConfigurationChanged(r, mConfiguration, mTargetDisplayId);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
-
// ObjectPoolItem implementation
private MoveToDisplayItem() {}
/** Obtain an instance initialized with provided params. */
- public static MoveToDisplayItem obtain(int targetDisplayId,
+ @NonNull
+ public static MoveToDisplayItem obtain(@NonNull IBinder activityToken, int targetDisplayId,
@NonNull Configuration configuration) {
- if (configuration == null) {
- throw new IllegalArgumentException("Configuration must not be null");
- }
-
MoveToDisplayItem instance = ObjectPool.obtain(MoveToDisplayItem.class);
if (instance == null) {
instance = new MoveToDisplayItem();
}
+ instance.setActivityToken(activityToken);
instance.mTargetDisplayId = targetDisplayId;
instance.mConfiguration = configuration;
@@ -79,30 +76,31 @@ public class MoveToDisplayItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mTargetDisplayId = 0;
mConfiguration = Configuration.EMPTY;
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeInt(mTargetDisplayId);
dest.writeTypedObject(mConfiguration, flags);
}
/** Read from Parcel. */
- private MoveToDisplayItem(Parcel in) {
+ private MoveToDisplayItem(@NonNull Parcel in) {
+ super(in);
mTargetDisplayId = in.readInt();
mConfiguration = in.readTypedObject(Configuration.CREATOR);
}
- public static final @NonNull Creator<MoveToDisplayItem> CREATOR =
- new Creator<MoveToDisplayItem>() {
- public MoveToDisplayItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<MoveToDisplayItem> CREATOR = new Creator<>() {
+ public MoveToDisplayItem createFromParcel(@NonNull Parcel in) {
return new MoveToDisplayItem(in);
}
@@ -116,7 +114,7 @@ public class MoveToDisplayItem extends ActivityTransactionItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final MoveToDisplayItem other = (MoveToDisplayItem) o;
@@ -127,6 +125,7 @@ public class MoveToDisplayItem extends ActivityTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + mTargetDisplayId;
result = 31 * result + mConfiguration.hashCode();
return result;
@@ -134,7 +133,8 @@ public class MoveToDisplayItem extends ActivityTransactionItem {
@Override
public String toString() {
- return "MoveToDisplayItem{targetDisplayId=" + mTargetDisplayId
+ return "MoveToDisplayItem{" + super.toString()
+ + ",targetDisplayId=" + mTargetDisplayId
+ ",configuration=" + mConfiguration + "}";
}
}
diff --git a/core/java/android/app/servertransaction/NewIntentItem.java b/core/java/android/app/servertransaction/NewIntentItem.java
index 723fa012c902..8e995aa05a48 100644
--- a/core/java/android/app/servertransaction/NewIntentItem.java
+++ b/core/java/android/app/servertransaction/NewIntentItem.java
@@ -25,6 +25,7 @@ import android.app.ActivityThread.ActivityClientRecord;
import android.app.ClientTransactionHandler;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
+import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Trace;
@@ -50,24 +51,26 @@ public class NewIntentItem extends ActivityTransactionItem {
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityNewIntent");
client.handleNewIntent(r, mIntents);
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
}
-
// ObjectPoolItem implementation
private NewIntentItem() {}
/** Obtain an instance initialized with provided params. */
- public static NewIntentItem obtain(List<ReferrerIntent> intents, boolean resume) {
+ @NonNull
+ public static NewIntentItem obtain(@NonNull IBinder activityToken,
+ @NonNull List<ReferrerIntent> intents, boolean resume) {
NewIntentItem instance = ObjectPool.obtain(NewIntentItem.class);
if (instance == null) {
instance = new NewIntentItem();
}
+ instance.setActivityToken(activityToken);
instance.mIntents = intents;
instance.mResume = resume;
@@ -76,44 +79,46 @@ public class NewIntentItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mIntents = null;
mResume = false;
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeBoolean(mResume);
dest.writeTypedList(mIntents, flags);
}
/** Read from Parcel. */
- private NewIntentItem(Parcel in) {
+ private NewIntentItem(@NonNull Parcel in) {
+ super(in);
mResume = in.readBoolean();
mIntents = in.createTypedArrayList(ReferrerIntent.CREATOR);
}
public static final @NonNull Parcelable.Creator<NewIntentItem> CREATOR =
- new Parcelable.Creator<NewIntentItem>() {
- public NewIntentItem createFromParcel(Parcel in) {
- return new NewIntentItem(in);
- }
+ new Parcelable.Creator<>() {
+ public NewIntentItem createFromParcel(@NonNull Parcel in) {
+ return new NewIntentItem(in);
+ }
- public NewIntentItem[] newArray(int size) {
- return new NewIntentItem[size];
- }
- };
+ public NewIntentItem[] newArray(int size) {
+ return new NewIntentItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final NewIntentItem other = (NewIntentItem) o;
@@ -123,6 +128,7 @@ public class NewIntentItem extends ActivityTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + (mResume ? 1 : 0);
result = 31 * result + mIntents.hashCode();
return result;
@@ -130,6 +136,8 @@ public class NewIntentItem extends ActivityTransactionItem {
@Override
public String toString() {
- return "NewIntentItem{intents=" + mIntents + ",resume=" + mResume + "}";
+ return "NewIntentItem{" + super.toString()
+ + ",intents=" + mIntents
+ + ",resume=" + mResume + "}";
}
}
diff --git a/core/java/android/app/servertransaction/PauseActivityItem.java b/core/java/android/app/servertransaction/PauseActivityItem.java
index 965e761ebfb3..a8e6772b4e32 100644
--- a/core/java/android/app/servertransaction/PauseActivityItem.java
+++ b/core/java/android/app/servertransaction/PauseActivityItem.java
@@ -42,8 +42,8 @@ public class PauseActivityItem extends ActivityLifecycleItem {
private boolean mAutoEnteringPip;
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
client.handlePauseActivity(r, mFinished, mUserLeaving, mConfigChanges, mAutoEnteringPip,
pendingActions, "PAUSE_ACTIVITY_ITEM");
@@ -56,27 +56,28 @@ public class PauseActivityItem extends ActivityLifecycleItem {
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
if (mDontReport) {
return;
}
// TODO(lifecycler): Use interface callback instead of actual implementation.
- ActivityClient.getInstance().activityPaused(token);
+ ActivityClient.getInstance().activityPaused(getActivityToken());
}
-
// ObjectPoolItem implementation
private PauseActivityItem() {}
/** Obtain an instance initialized with provided params. */
- public static PauseActivityItem obtain(boolean finished, boolean userLeaving, int configChanges,
- boolean dontReport, boolean autoEnteringPip) {
+ @NonNull
+ public static PauseActivityItem obtain(@NonNull IBinder activityToken, boolean finished,
+ boolean userLeaving, int configChanges, boolean dontReport, boolean autoEnteringPip) {
PauseActivityItem instance = ObjectPool.obtain(PauseActivityItem.class);
if (instance == null) {
instance = new PauseActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mFinished = finished;
instance.mUserLeaving = userLeaving;
instance.mConfigChanges = configChanges;
@@ -87,18 +88,10 @@ public class PauseActivityItem extends ActivityLifecycleItem {
}
/** Obtain an instance initialized with default params. */
- public static PauseActivityItem obtain() {
- PauseActivityItem instance = ObjectPool.obtain(PauseActivityItem.class);
- if (instance == null) {
- instance = new PauseActivityItem();
- }
- instance.mFinished = false;
- instance.mUserLeaving = false;
- instance.mConfigChanges = 0;
- instance.mDontReport = true;
- instance.mAutoEnteringPip = false;
-
- return instance;
+ @NonNull
+ public static PauseActivityItem obtain(@NonNull IBinder activityToken) {
+ return obtain(activityToken, false /* finished */, false /* userLeaving */,
+ 0 /* configChanges */, true /* dontReport */, false /* autoEnteringPip*/);
}
@Override
@@ -116,7 +109,8 @@ public class PauseActivityItem extends ActivityLifecycleItem {
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeBoolean(mFinished);
dest.writeBoolean(mUserLeaving);
dest.writeInt(mConfigChanges);
@@ -125,7 +119,8 @@ public class PauseActivityItem extends ActivityLifecycleItem {
}
/** Read from Parcel. */
- private PauseActivityItem(Parcel in) {
+ private PauseActivityItem(@NonNull Parcel in) {
+ super(in);
mFinished = in.readBoolean();
mUserLeaving = in.readBoolean();
mConfigChanges = in.readInt();
@@ -133,9 +128,8 @@ public class PauseActivityItem extends ActivityLifecycleItem {
mAutoEnteringPip = in.readBoolean();
}
- public static final @NonNull Creator<PauseActivityItem> CREATOR =
- new Creator<PauseActivityItem>() {
- public PauseActivityItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<PauseActivityItem> CREATOR = new Creator<>() {
+ public PauseActivityItem createFromParcel(@NonNull Parcel in) {
return new PauseActivityItem(in);
}
@@ -149,7 +143,7 @@ public class PauseActivityItem extends ActivityLifecycleItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final PauseActivityItem other = (PauseActivityItem) o;
@@ -161,6 +155,7 @@ public class PauseActivityItem extends ActivityLifecycleItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + (mFinished ? 1 : 0);
result = 31 * result + (mUserLeaving ? 1 : 0);
result = 31 * result + mConfigChanges;
@@ -171,8 +166,11 @@ public class PauseActivityItem extends ActivityLifecycleItem {
@Override
public String toString() {
- return "PauseActivityItem{finished=" + mFinished + ",userLeaving=" + mUserLeaving
- + ",configChanges=" + mConfigChanges + ",dontReport=" + mDontReport
+ return "PauseActivityItem{" + super.toString()
+ + ",finished=" + mFinished
+ + ",userLeaving=" + mUserLeaving
+ + ",configChanges=" + mConfigChanges
+ + ",dontReport=" + mDontReport
+ ",autoEnteringPip=" + mAutoEnteringPip + "}";
}
}
diff --git a/core/java/android/app/servertransaction/PipStateTransactionItem.java b/core/java/android/app/servertransaction/PipStateTransactionItem.java
index 167f5a43b1b1..30289ef9f794 100644
--- a/core/java/android/app/servertransaction/PipStateTransactionItem.java
+++ b/core/java/android/app/servertransaction/PipStateTransactionItem.java
@@ -16,12 +16,16 @@
package android.app.servertransaction;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.ClientTransactionHandler;
import android.app.PictureInPictureUiState;
+import android.os.IBinder;
import android.os.Parcel;
+import java.util.Objects;
+
/**
* Request an activity to enter picture-in-picture mode.
* @hide
@@ -31,8 +35,8 @@ public final class PipStateTransactionItem extends ActivityTransactionItem {
private PictureInPictureUiState mPipState;
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
client.handlePictureInPictureStateChanged(r, mPipState);
}
@@ -41,11 +45,14 @@ public final class PipStateTransactionItem extends ActivityTransactionItem {
private PipStateTransactionItem() {}
/** Obtain an instance initialized with provided params. */
- public static PipStateTransactionItem obtain(PictureInPictureUiState pipState) {
+ @NonNull
+ public static PipStateTransactionItem obtain(@NonNull IBinder activityToken,
+ @NonNull PictureInPictureUiState pipState) {
PipStateTransactionItem instance = ObjectPool.obtain(PipStateTransactionItem.class);
if (instance == null) {
instance = new PipStateTransactionItem();
}
+ instance.setActivityToken(activityToken);
instance.mPipState = pipState;
return instance;
@@ -53,6 +60,7 @@ public final class PipStateTransactionItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mPipState = null;
ObjectPool.recycle(this);
}
@@ -61,33 +69,49 @@ public final class PipStateTransactionItem extends ActivityTransactionItem {
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
mPipState.writeToParcel(dest, flags);
}
/** Read from Parcel. */
- private PipStateTransactionItem(Parcel in) {
+ private PipStateTransactionItem(@NonNull Parcel in) {
+ super(in);
mPipState = PictureInPictureUiState.CREATOR.createFromParcel(in);
}
- public static final @android.annotation.NonNull Creator<PipStateTransactionItem> CREATOR =
- new Creator<PipStateTransactionItem>() {
- public PipStateTransactionItem createFromParcel(Parcel in) {
- return new PipStateTransactionItem(in);
- }
+ public static final @NonNull Creator<PipStateTransactionItem> CREATOR = new Creator<>() {
+ public PipStateTransactionItem createFromParcel(@NonNull Parcel in) {
+ return new PipStateTransactionItem(in);
+ }
- public PipStateTransactionItem[] newArray(int size) {
- return new PipStateTransactionItem[size];
- }
- };
+ public PipStateTransactionItem[] newArray(int size) {
+ return new PipStateTransactionItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
- return this == o;
+ if (this == o) {
+ return true;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ final PipStateTransactionItem other = (PipStateTransactionItem) o;
+ return Objects.equals(mPipState, other.mPipState);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + super.hashCode();
+ result = 31 * result + Objects.hashCode(mPipState);
+ return result;
}
@Override
public String toString() {
- return "PipStateTransactionItem{}";
+ return "PipStateTransactionItem{" + super.toString() + "}";
}
}
diff --git a/core/java/android/app/servertransaction/RefreshCallbackItem.java b/core/java/android/app/servertransaction/RefreshCallbackItem.java
index 74abab22b0a6..00128f0d298f 100644
--- a/core/java/android/app/servertransaction/RefreshCallbackItem.java
+++ b/core/java/android/app/servertransaction/RefreshCallbackItem.java
@@ -48,12 +48,12 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
@Override
public void execute(@NonNull ClientTransactionHandler client,
- @NonNull ActivityClientRecord r, PendingTransactionActions pendingActions) {}
+ @NonNull ActivityClientRecord r, @NonNull PendingTransactionActions pendingActions) {}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
- final ActivityClientRecord r = getActivityClientRecord(client, token);
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
+ final ActivityClientRecord r = getActivityClientRecord(client);
client.reportRefresh(r);
}
@@ -71,6 +71,7 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
ObjectPool.recycle(this);
}
@@ -79,7 +80,9 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
* @param postExecutionState indicating whether refresh should happen using the
* "stopped -> resumed" cycle or "paused -> resumed" cycle.
*/
- public static RefreshCallbackItem obtain(@LifecycleState int postExecutionState) {
+ @NonNull
+ public static RefreshCallbackItem obtain(@NonNull IBinder activityToken,
+ @LifecycleState int postExecutionState) {
if (postExecutionState != ON_STOP && postExecutionState != ON_PAUSE) {
throw new IllegalArgumentException(
"Only ON_STOP or ON_PAUSE are allowed as a post execution state for "
@@ -90,6 +93,7 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
if (instance == null) {
instance = new RefreshCallbackItem();
}
+ instance.setActivityToken(activityToken);
instance.mPostExecutionState = postExecutionState;
return instance;
}
@@ -99,7 +103,8 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
// Parcelable implementation
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeInt(mPostExecutionState);
}
@@ -108,7 +113,7 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final RefreshCallbackItem other = (RefreshCallbackItem) o;
@@ -118,23 +123,25 @@ public class RefreshCallbackItem extends ActivityTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + mPostExecutionState;
return result;
}
@Override
public String toString() {
- return "RefreshCallbackItem{mPostExecutionState=" + mPostExecutionState + "}";
+ return "RefreshCallbackItem{" + super.toString()
+ + ",mPostExecutionState=" + mPostExecutionState + "}";
}
- private RefreshCallbackItem(Parcel in) {
+ private RefreshCallbackItem(@NonNull Parcel in) {
+ super(in);
mPostExecutionState = in.readInt();
}
- public static final @NonNull Creator<RefreshCallbackItem> CREATOR =
- new Creator<RefreshCallbackItem>() {
+ public static final @NonNull Creator<RefreshCallbackItem> CREATOR = new Creator<>() {
- public RefreshCallbackItem createFromParcel(Parcel in) {
+ public RefreshCallbackItem createFromParcel(@NonNull Parcel in) {
return new RefreshCallbackItem(in);
}
diff --git a/core/java/android/app/servertransaction/ResumeActivityItem.java b/core/java/android/app/servertransaction/ResumeActivityItem.java
index 222f8ca61e09..b11e73cbef96 100644
--- a/core/java/android/app/servertransaction/ResumeActivityItem.java
+++ b/core/java/android/app/servertransaction/ResumeActivityItem.java
@@ -44,15 +44,15 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
private boolean mShouldSendCompatFakeFocus;
@Override
- public void preExecute(ClientTransactionHandler client, IBinder token) {
+ public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
if (mUpdateProcState) {
client.updateProcessState(mProcState, false);
}
}
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityResume");
client.handleResumeActivity(r, true /* finalStateRequest */, mIsForward,
mShouldSendCompatFakeFocus, "RESUME_ACTIVITY");
@@ -60,10 +60,11 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void postExecute(@NonNull ClientTransactionHandler client, IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
// TODO(lifecycler): Use interface callback instead of actual implementation.
- ActivityClient.getInstance().activityResumed(token, client.isHandleSplashScreenExit(token));
+ ActivityClient.getInstance().activityResumed(getActivityToken(),
+ client.isHandleSplashScreenExit(getActivityToken()));
}
@Override
@@ -71,18 +72,19 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
return ON_RESUME;
}
-
// ObjectPoolItem implementation
private ResumeActivityItem() {}
/** Obtain an instance initialized with provided params. */
- public static ResumeActivityItem obtain(int procState, boolean isForward,
- boolean shouldSendCompatFakeFocus) {
+ @NonNull
+ public static ResumeActivityItem obtain(@NonNull IBinder activityToken, int procState,
+ boolean isForward, boolean shouldSendCompatFakeFocus) {
ResumeActivityItem instance = ObjectPool.obtain(ResumeActivityItem.class);
if (instance == null) {
instance = new ResumeActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mProcState = procState;
instance.mUpdateProcState = true;
instance.mIsForward = isForward;
@@ -92,11 +94,14 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
}
/** Obtain an instance initialized with provided params. */
- public static ResumeActivityItem obtain(boolean isForward, boolean shouldSendCompatFakeFocus) {
+ @NonNull
+ public static ResumeActivityItem obtain(@NonNull IBinder activityToken, boolean isForward,
+ boolean shouldSendCompatFakeFocus) {
ResumeActivityItem instance = ObjectPool.obtain(ResumeActivityItem.class);
if (instance == null) {
instance = new ResumeActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mProcState = ActivityManager.PROCESS_STATE_UNKNOWN;
instance.mUpdateProcState = false;
instance.mIsForward = isForward;
@@ -115,12 +120,12 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeInt(mProcState);
dest.writeBoolean(mUpdateProcState);
dest.writeBoolean(mIsForward);
@@ -128,15 +133,15 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
}
/** Read from Parcel. */
- private ResumeActivityItem(Parcel in) {
+ private ResumeActivityItem(@NonNull Parcel in) {
+ super(in);
mProcState = in.readInt();
mUpdateProcState = in.readBoolean();
mIsForward = in.readBoolean();
mShouldSendCompatFakeFocus = in.readBoolean();
}
- public static final @NonNull Creator<ResumeActivityItem> CREATOR =
- new Creator<ResumeActivityItem>() {
+ public static final @NonNull Creator<ResumeActivityItem> CREATOR = new Creator<>() {
public ResumeActivityItem createFromParcel(Parcel in) {
return new ResumeActivityItem(in);
}
@@ -151,7 +156,7 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final ResumeActivityItem other = (ResumeActivityItem) o;
@@ -163,6 +168,7 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + mProcState;
result = 31 * result + (mUpdateProcState ? 1 : 0);
result = 31 * result + (mIsForward ? 1 : 0);
@@ -172,8 +178,10 @@ public class ResumeActivityItem extends ActivityLifecycleItem {
@Override
public String toString() {
- return "ResumeActivityItem{procState=" + mProcState
- + ",updateProcState=" + mUpdateProcState + ",isForward=" + mIsForward
+ return "ResumeActivityItem{" + super.toString()
+ + ",procState=" + mProcState
+ + ",updateProcState=" + mUpdateProcState
+ + ",isForward=" + mIsForward
+ ",shouldSendCompatFakeFocus=" + mShouldSendCompatFakeFocus + "}";
}
}
diff --git a/core/java/android/app/servertransaction/StartActivityItem.java b/core/java/android/app/servertransaction/StartActivityItem.java
index 15f65f6d9d26..8b98b2184043 100644
--- a/core/java/android/app/servertransaction/StartActivityItem.java
+++ b/core/java/android/app/servertransaction/StartActivityItem.java
@@ -23,6 +23,7 @@ import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.ClientTransactionHandler;
+import android.os.IBinder;
import android.os.Parcel;
import android.os.Trace;
@@ -37,8 +38,8 @@ public class StartActivityItem extends ActivityLifecycleItem {
private ActivityOptions mActivityOptions;
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "startActivityItem");
client.handleStartActivity(r, pendingActions, mActivityOptions);
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
@@ -49,17 +50,19 @@ public class StartActivityItem extends ActivityLifecycleItem {
return ON_START;
}
-
// ObjectPoolItem implementation
private StartActivityItem() {}
/** Obtain an instance initialized with provided params. */
- public static StartActivityItem obtain(ActivityOptions activityOptions) {
+ @NonNull
+ public static StartActivityItem obtain(@NonNull IBinder activityToken,
+ @Nullable ActivityOptions activityOptions) {
StartActivityItem instance = ObjectPool.obtain(StartActivityItem.class);
if (instance == null) {
instance = new StartActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mActivityOptions = activityOptions;
return instance;
@@ -72,37 +75,37 @@ public class StartActivityItem extends ActivityLifecycleItem {
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeBundle(mActivityOptions != null ? mActivityOptions.toBundle() : null);
}
/** Read from Parcel. */
- private StartActivityItem(Parcel in) {
+ private StartActivityItem(@NonNull Parcel in) {
+ super(in);
mActivityOptions = ActivityOptions.fromBundle(in.readBundle());
}
- public static final @NonNull Creator<StartActivityItem> CREATOR =
- new Creator<StartActivityItem>() {
- public StartActivityItem createFromParcel(Parcel in) {
- return new StartActivityItem(in);
- }
+ public static final @NonNull Creator<StartActivityItem> CREATOR = new Creator<>() {
+ public StartActivityItem createFromParcel(@NonNull Parcel in) {
+ return new StartActivityItem(in);
+ }
- public StartActivityItem[] newArray(int size) {
- return new StartActivityItem[size];
- }
- };
+ public StartActivityItem[] newArray(int size) {
+ return new StartActivityItem[size];
+ }
+ };
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final StartActivityItem other = (StartActivityItem) o;
@@ -112,13 +115,15 @@ public class StartActivityItem extends ActivityLifecycleItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + (mActivityOptions != null ? 1 : 0);
return result;
}
@Override
public String toString() {
- return "StartActivityItem{options=" + mActivityOptions + "}";
+ return "StartActivityItem{" + super.toString()
+ + ",options=" + mActivityOptions + "}";
}
}
diff --git a/core/java/android/app/servertransaction/StopActivityItem.java b/core/java/android/app/servertransaction/StopActivityItem.java
index 7e9116dfdfc7..f4325670c4fc 100644
--- a/core/java/android/app/servertransaction/StopActivityItem.java
+++ b/core/java/android/app/servertransaction/StopActivityItem.java
@@ -37,8 +37,8 @@ public class StopActivityItem extends ActivityLifecycleItem {
private int mConfigChanges;
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStop");
client.handleStopActivity(r, mConfigChanges, pendingActions,
true /* finalStateRequest */, "STOP_ACTIVITY_ITEM");
@@ -46,8 +46,8 @@ public class StopActivityItem extends ActivityLifecycleItem {
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
client.reportStop(pendingActions);
}
@@ -56,20 +56,22 @@ public class StopActivityItem extends ActivityLifecycleItem {
return ON_STOP;
}
-
// ObjectPoolItem implementation
private StopActivityItem() {}
/**
* Obtain an instance initialized with provided params.
+ * @param activityToken the activity that stops.
* @param configChanges Configuration pieces that changed.
*/
- public static StopActivityItem obtain(int configChanges) {
+ @NonNull
+ public static StopActivityItem obtain(@NonNull IBinder activityToken, int configChanges) {
StopActivityItem instance = ObjectPool.obtain(StopActivityItem.class);
if (instance == null) {
instance = new StopActivityItem();
}
+ instance.setActivityToken(activityToken);
instance.mConfigChanges = configChanges;
return instance;
@@ -82,23 +84,23 @@ public class StopActivityItem extends ActivityLifecycleItem {
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeInt(mConfigChanges);
}
/** Read from Parcel. */
- private StopActivityItem(Parcel in) {
+ private StopActivityItem(@NonNull Parcel in) {
+ super(in);
mConfigChanges = in.readInt();
}
- public static final @NonNull Creator<StopActivityItem> CREATOR =
- new Creator<StopActivityItem>() {
- public StopActivityItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<StopActivityItem> CREATOR = new Creator<>() {
+ public StopActivityItem createFromParcel(@NonNull Parcel in) {
return new StopActivityItem(in);
}
@@ -112,7 +114,7 @@ public class StopActivityItem extends ActivityLifecycleItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final StopActivityItem other = (StopActivityItem) o;
@@ -122,12 +124,14 @@ public class StopActivityItem extends ActivityLifecycleItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + mConfigChanges;
return result;
}
@Override
public String toString() {
- return "StopActivityItem{configChanges=" + mConfigChanges + "}";
+ return "StopActivityItem{" + super.toString()
+ + ",configChanges=" + mConfigChanges + "}";
}
}
diff --git a/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java b/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
index 5cd3d68f0326..693599fa229c 100644
--- a/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
+++ b/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
@@ -35,16 +35,16 @@ public class TopResumedActivityChangeItem extends ActivityTransactionItem {
private boolean mOnTop;
@Override
- public void execute(ClientTransactionHandler client, ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+ @NonNull PendingTransactionActions pendingActions) {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "topResumedActivityChangeItem");
client.handleTopResumedActivityChanged(r, mOnTop, "topResumedActivityChangeItem");
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
}
@Override
- public void postExecute(ClientTransactionHandler client, IBinder token,
- PendingTransactionActions pendingActions) {
+ public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+ @NonNull PendingTransactionActions pendingActions) {
if (mOnTop) {
return;
}
@@ -58,18 +58,20 @@ public class TopResumedActivityChangeItem extends ActivityTransactionItem {
ActivityClient.getInstance().activityTopResumedStateLost();
}
-
// ObjectPoolItem implementation
private TopResumedActivityChangeItem() {}
/** Obtain an instance initialized with provided params. */
- public static TopResumedActivityChangeItem obtain(boolean onTop) {
+ @NonNull
+ public static TopResumedActivityChangeItem obtain(@NonNull IBinder activityToken,
+ boolean onTop) {
TopResumedActivityChangeItem instance =
ObjectPool.obtain(TopResumedActivityChangeItem.class);
if (instance == null) {
instance = new TopResumedActivityChangeItem();
}
+ instance.setActivityToken(activityToken);
instance.mOnTop = onTop;
return instance;
@@ -77,27 +79,28 @@ public class TopResumedActivityChangeItem extends ActivityTransactionItem {
@Override
public void recycle() {
+ super.recycle();
mOnTop = false;
ObjectPool.recycle(this);
}
-
// Parcelable implementation
/** Write to Parcel. */
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeBoolean(mOnTop);
}
/** Read from Parcel. */
- private TopResumedActivityChangeItem(Parcel in) {
+ private TopResumedActivityChangeItem(@NonNull Parcel in) {
+ super(in);
mOnTop = in.readBoolean();
}
- public static final @NonNull Creator<TopResumedActivityChangeItem> CREATOR =
- new Creator<TopResumedActivityChangeItem>() {
- public TopResumedActivityChangeItem createFromParcel(Parcel in) {
+ public static final @NonNull Creator<TopResumedActivityChangeItem> CREATOR = new Creator<>() {
+ public TopResumedActivityChangeItem createFromParcel(@NonNull Parcel in) {
return new TopResumedActivityChangeItem(in);
}
@@ -111,7 +114,7 @@ public class TopResumedActivityChangeItem extends ActivityTransactionItem {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!super.equals(o)) {
return false;
}
final TopResumedActivityChangeItem other = (TopResumedActivityChangeItem) o;
@@ -121,12 +124,14 @@ public class TopResumedActivityChangeItem extends ActivityTransactionItem {
@Override
public int hashCode() {
int result = 17;
+ result = 31 * result + super.hashCode();
result = 31 * result + (mOnTop ? 1 : 0);
return result;
}
@Override
public String toString() {
- return "TopResumedActivityChangeItem{onTop=" + mOnTop + "}";
+ return "TopResumedActivityChangeItem{" + super.toString()
+ + ",onTop=" + mOnTop + "}";
}
}
diff --git a/core/java/android/app/servertransaction/TransactionExecutorHelper.java b/core/java/android/app/servertransaction/TransactionExecutorHelper.java
index baf2a4722dff..0f9c517e2916 100644
--- a/core/java/android/app/servertransaction/TransactionExecutorHelper.java
+++ b/core/java/android/app/servertransaction/TransactionExecutorHelper.java
@@ -196,13 +196,13 @@ public class TransactionExecutorHelper {
// Fall through to return the PAUSE item to ensure the activity is properly
// resumed while relaunching.
case ON_PAUSE:
- lifecycleItem = PauseActivityItem.obtain();
+ lifecycleItem = PauseActivityItem.obtain(r.token);
break;
case ON_STOP:
- lifecycleItem = StopActivityItem.obtain(0 /* configChanges */);
+ lifecycleItem = StopActivityItem.obtain(r.token, 0 /* configChanges */);
break;
default:
- lifecycleItem = ResumeActivityItem.obtain(false /* isForward */,
+ lifecycleItem = ResumeActivityItem.obtain(r.token, false /* isForward */,
false /* shouldSendCompatFakeFocus */);
break;
}
diff --git a/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java b/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
index 767fd28b8a2a..11947e9b11d8 100644
--- a/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
+++ b/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
@@ -20,10 +20,13 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityThread;
import android.app.ClientTransactionHandler;
+import android.os.IBinder;
import android.os.Parcel;
import android.view.SurfaceControl;
import android.window.SplashScreenView.SplashScreenViewParcelable;
+import java.util.Objects;
+
/**
* Transfer a splash screen view to an Activity.
* @hide
@@ -36,36 +39,44 @@ public class TransferSplashScreenViewStateItem extends ActivityTransactionItem {
@Override
public void execute(@NonNull ClientTransactionHandler client,
@NonNull ActivityThread.ActivityClientRecord r,
- PendingTransactionActions pendingActions) {
+ @NonNull PendingTransactionActions pendingActions) {
client.handleAttachSplashScreenView(r, mSplashScreenViewParcelable, mStartingWindowLeash);
}
@Override
public void recycle() {
+ super.recycle();
+ mSplashScreenViewParcelable = null;
+ mStartingWindowLeash = null;
ObjectPool.recycle(this);
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
dest.writeTypedObject(mSplashScreenViewParcelable, flags);
dest.writeTypedObject(mStartingWindowLeash, flags);
}
private TransferSplashScreenViewStateItem() {}
- private TransferSplashScreenViewStateItem(Parcel in) {
+
+ private TransferSplashScreenViewStateItem(@NonNull Parcel in) {
+ super(in);
mSplashScreenViewParcelable = in.readTypedObject(SplashScreenViewParcelable.CREATOR);
mStartingWindowLeash = in.readTypedObject(SurfaceControl.CREATOR);
}
/** Obtain an instance initialized with provided params. */
+ @NonNull
public static TransferSplashScreenViewStateItem obtain(
- @Nullable SplashScreenViewParcelable parcelable,
+ @NonNull IBinder activityToken, @Nullable SplashScreenViewParcelable parcelable,
@Nullable SurfaceControl startingWindowLeash) {
TransferSplashScreenViewStateItem instance =
ObjectPool.obtain(TransferSplashScreenViewStateItem.class);
if (instance == null) {
instance = new TransferSplashScreenViewStateItem();
}
+ instance.setActivityToken(activityToken);
instance.mSplashScreenViewParcelable = parcelable;
instance.mStartingWindowLeash = startingWindowLeash;
@@ -73,8 +84,8 @@ public class TransferSplashScreenViewStateItem extends ActivityTransactionItem {
}
public static final @NonNull Creator<TransferSplashScreenViewStateItem> CREATOR =
- new Creator<TransferSplashScreenViewStateItem>() {
- public TransferSplashScreenViewStateItem createFromParcel(Parcel in) {
+ new Creator<>() {
+ public TransferSplashScreenViewStateItem createFromParcel(@NonNull Parcel in) {
return new TransferSplashScreenViewStateItem(in);
}
@@ -82,4 +93,33 @@ public class TransferSplashScreenViewStateItem extends ActivityTransactionItem {
return new TransferSplashScreenViewStateItem[size];
}
};
+
+ @Override
+ public boolean equals(@Nullable Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ final TransferSplashScreenViewStateItem other = (TransferSplashScreenViewStateItem) o;
+ return Objects.equals(mSplashScreenViewParcelable, other.mSplashScreenViewParcelable)
+ && Objects.equals(mStartingWindowLeash, other.mStartingWindowLeash);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + super.hashCode();
+ result = 31 * result + Objects.hashCode(mSplashScreenViewParcelable);
+ result = 31 * result + Objects.hashCode(mStartingWindowLeash);
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "TransferSplashScreenViewStateItem{" + super.toString()
+ + ",splashScreenViewParcelable=" + mSplashScreenViewParcelable
+ + ",startingWindowLeash=" + mStartingWindowLeash + "}";
+ }
}
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
index 3aa287724263..2fb428b3e0b4 100644
--- a/core/java/android/companion/CompanionDeviceManager.java
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -39,6 +39,7 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
+import android.companion.datatransfer.PermissionSyncRequest;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -180,7 +181,7 @@ public final class CompanionDeviceManager {
public @interface DataSyncTypes {}
/**
- * Used by {@link #enableSystemDataSync(int, int)}}.
+ * Used by {@link #enableSystemDataSyncForTypes(int, int)}}.
* Sync call metadata like muting, ending and silencing a call.
*
*/
@@ -552,6 +553,39 @@ public final class CompanionDeviceManager {
}
/**
+ * @hide
+ */
+ public void enablePermissionsSync(int associationId) {
+ try {
+ mService.enablePermissionsSync(associationId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void disablePermissionsSync(int associationId) {
+ try {
+ mService.disablePermissionsSync(associationId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+ try {
+ return mService.getPermissionSyncRequest(associationId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* <p>Calling this API requires a uses-feature
* {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
*
diff --git a/core/java/android/companion/ICompanionDeviceManager.aidl b/core/java/android/companion/ICompanionDeviceManager.aidl
index a3b202aa738d..c5a19888205c 100644
--- a/core/java/android/companion/ICompanionDeviceManager.aidl
+++ b/core/java/android/companion/ICompanionDeviceManager.aidl
@@ -24,6 +24,7 @@ import android.companion.IOnTransportsChangedListener;
import android.companion.ISystemDataTransferCallback;
import android.companion.AssociationInfo;
import android.companion.AssociationRequest;
+import android.companion.datatransfer.PermissionSyncRequest;
import android.content.ComponentName;
/**
@@ -113,6 +114,12 @@ interface ICompanionDeviceManager {
void disableSystemDataSync(int associationId, int flags);
+ void enablePermissionsSync(int associationId);
+
+ void disablePermissionsSync(int associationId);
+
+ PermissionSyncRequest getPermissionSyncRequest(int associationId);
+
@EnforcePermission("MANAGE_COMPANION_DEVICES")
void enableSecureTransport(boolean enabled);
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index d6dee9389c8e..b6a98a5b8f83 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -4089,6 +4089,7 @@ public abstract class Context {
VIBRATOR_MANAGER_SERVICE,
VIBRATOR_SERVICE,
//@hide: STATUS_BAR_SERVICE,
+ THREAD_NETWORK_SERVICE,
CONNECTIVITY_SERVICE,
PAC_PROXY_SERVICE,
VCN_MANAGEMENT_SERVICE,
@@ -4764,6 +4765,20 @@ public abstract class Context {
/**
* Use with {@link #getSystemService(String)} to retrieve a
+ * {@link android.net.thread.ThreadNetworkManager}.
+ *
+ * <p>On devices without {@link PackageManager#FEATURE_THREAD_NETWORK} system feature
+ * the {@link #getSystemService(String)} will return {@code null}.
+ *
+ * @see #getSystemService(String)
+ * @see android.net.thread.ThreadNetworkManager
+ * @hide
+ */
+ @SystemApi
+ public static final String THREAD_NETWORK_SERVICE = "thread_network";
+
+ /**
+ * Use with {@link #getSystemService(String)} to retrieve a
* {@link android.net.IpSecManager} for encrypting Sockets or Networks with
* IPSec.
*
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index f156878f5694..e9bbed340800 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -5274,7 +5274,7 @@ public class Intent implements Parcelable, Cloneable {
* Broadcast Action: Sent to the responsible installer of an archived package when unarchival
* is requested.
*
- * @see android.content.pm.PackageArchiver
+ * @see android.content.pm.PackageInstaller#requestUnarchive(String)
* @hide
*/
@SystemApi
diff --git a/core/java/android/content/pm/IPackageArchiverService.aidl b/core/java/android/content/pm/IPackageArchiverService.aidl
deleted file mode 100644
index dc6491d6d97e..000000000000
--- a/core/java/android/content/pm/IPackageArchiverService.aidl
+++ /dev/null
@@ -1,29 +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 android.content.pm;
-
-import android.content.IntentSender;
-import android.os.UserHandle;
-
-/** {@hide} */
-interface IPackageArchiverService {
-
- @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES,android.Manifest.permission.REQUEST_DELETE_PACKAGES})")
- void requestArchive(String packageName, String callerPackageName, in IntentSender statusReceiver, in UserHandle userHandle);
-
- @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES,android.Manifest.permission.REQUEST_INSTALL_PACKAGES})")
- void requestUnarchive(String packageName, String callerPackageName, in UserHandle userHandle);
-} \ No newline at end of file
diff --git a/core/java/android/content/pm/IPackageInstaller.aidl b/core/java/android/content/pm/IPackageInstaller.aidl
index ebe2aa3e3aa0..edb07ce423c1 100644
--- a/core/java/android/content/pm/IPackageInstaller.aidl
+++ b/core/java/android/content/pm/IPackageInstaller.aidl
@@ -24,6 +24,7 @@ import android.content.pm.ParceledListSlice;
import android.content.pm.VersionedPackage;
import android.content.IntentSender;
import android.os.RemoteCallback;
+import android.os.UserHandle;
import android.graphics.Bitmap;
@@ -75,4 +76,10 @@ interface IPackageInstaller {
void waitForInstallConstraints(String installerPackageName, in List<String> packageNames,
in PackageInstaller.InstallConstraints constraints, in IntentSender callback,
long timeout);
+
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES,android.Manifest.permission.REQUEST_DELETE_PACKAGES})")
+ void requestArchive(String packageName, String callerPackageName, in IntentSender statusReceiver, in UserHandle userHandle);
+
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES,android.Manifest.permission.REQUEST_INSTALL_PACKAGES})")
+ void requestUnarchive(String packageName, String callerPackageName, in UserHandle userHandle);
}
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 916c249019a7..556c794b6139 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -26,7 +26,6 @@ import android.content.pm.ArchivedPackageParcel;
import android.content.pm.ChangedPackages;
import android.content.pm.InstantAppInfo;
import android.content.pm.FeatureInfo;
-import android.content.pm.IPackageArchiverService;
import android.content.pm.IDexModuleRegisterCallback;
import android.content.pm.InstallSourceInfo;
import android.content.pm.IOnChecksumsReadyListener;
@@ -652,8 +651,6 @@ interface IPackageManager {
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
IPackageInstaller getPackageInstaller();
- IPackageArchiverService getPackageArchiverService();
-
@EnforcePermission("DELETE_PACKAGES")
boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
@UnsupportedAppUsage
diff --git a/core/java/android/content/pm/PackageArchiver.java b/core/java/android/content/pm/PackageArchiver.java
deleted file mode 100644
index b06523160b92..000000000000
--- a/core/java/android/content/pm/PackageArchiver.java
+++ /dev/null
@@ -1,129 +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 android.content.pm;
-
-import android.Manifest;
-import android.annotation.NonNull;
-import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
-import android.content.Context;
-import android.content.IntentSender;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.ParcelableException;
-import android.os.RemoteException;
-
-/**
- * {@code ArchiveManager} is used to archive apps. During the archival process, the apps APKs and
- * cache are removed from the device while the user data is kept. Through the
- * {@code requestUnarchive()} call, apps can be restored again through their responsible app store.
- *
- * <p> Archived apps are returned as displayable apps through the {@link LauncherApps} APIs and
- * will be displayed to users with UI treatment to highlight that said apps are archived. If
- * a user taps on an archived app, the app will be unarchived and the restoration process is
- * communicated.
- *
- * @hide
- */
-// TODO(b/278560219) Improve public documentation.
-@SystemApi
-public class PackageArchiver {
-
- /**
- * Extra field for the package name of a package that is requested to be unarchived. Sent as
- * part of the {@link android.content.Intent#ACTION_UNARCHIVE_PACKAGE} intent.
- *
- * @hide
- */
- @SystemApi
- public static final String EXTRA_UNARCHIVE_PACKAGE_NAME =
- "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
-
- /**
- * If true, the requestor of the unarchival has specified that the app should be unarchived
- * for {@link android.os.UserHandle#ALL}.
- *
- * @hide
- */
- @SystemApi
- public static final String EXTRA_UNARCHIVE_ALL_USERS =
- "android.content.pm.extra.UNARCHIVE_ALL_USERS";
-
- private final Context mContext;
- private final IPackageArchiverService mService;
-
- /**
- * @hide
- */
- public PackageArchiver(Context context, IPackageArchiverService service) {
- mContext = context;
- mService = service;
- }
-
- /**
- * Requests to archive a package which is currently installed.
- *
- * @param statusReceiver Callback used to notify when the operation is completed.
- * @throws NameNotFoundException If {@code packageName} isn't found or not available to the
- * caller or isn't archived.
- * @hide
- */
- @RequiresPermission(anyOf = {
- Manifest.permission.DELETE_PACKAGES,
- Manifest.permission.REQUEST_DELETE_PACKAGES})
- @SystemApi
- public void requestArchive(@NonNull String packageName, @NonNull IntentSender statusReceiver)
- throws NameNotFoundException {
- try {
- mService.requestArchive(packageName, mContext.getPackageName(), statusReceiver,
- mContext.getUser());
- } catch (ParcelableException e) {
- e.maybeRethrow(NameNotFoundException.class);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
- * Requests to unarchive a currently archived package.
- *
- * <p> Sends a request to unarchive an app to the responsible installer. The installer is
- * determined by {@link InstallSourceInfo#getUpdateOwnerPackageName()}, or
- * {@link InstallSourceInfo#getInstallingPackageName()} if the former value is null.
- *
- * <p> The installation will happen asynchronously and can be observed through
- * {@link android.content.Intent#ACTION_PACKAGE_ADDED}.
- *
- * @throws NameNotFoundException If {@code packageName} isn't found or not visible to the
- * caller or if the package has no installer on the device
- * anymore to unarchive it.
- * @hide
- */
- @RequiresPermission(anyOf = {
- Manifest.permission.INSTALL_PACKAGES,
- Manifest.permission.REQUEST_INSTALL_PACKAGES})
- @SystemApi
- public void requestUnarchive(@NonNull String packageName)
- throws NameNotFoundException {
- try {
- mService.requestUnarchive(packageName, mContext.getPackageName(), mContext.getUser());
- } catch (ParcelableException e) {
- e.maybeRethrow(NameNotFoundException.class);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-}
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index cdb8b46ba41a..1fe19231e4b4 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
+import android.content.IntentSender;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -492,7 +493,8 @@ public class PackageInfo implements Parcelable {
/**
* Whether the package is currently in an archived state.
*
- * <p>Packages can be archived through {@link PackageArchiver} and do not have any APKs stored
+ * <p>Packages can be archived through
+ * {@link PackageInstaller#requestArchive(String, IntentSender)} and do not have any APKs stored
* on the device, but do keep the data directory.
* @hide
*/
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index f417480e9e1a..673a8a5edcba 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -34,6 +34,7 @@ import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.CurrentTimeMillisLong;
import android.annotation.DurationMillisLong;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -348,6 +349,28 @@ public class PackageInstaller {
"android.content.pm.extra.RESOLVED_BASE_PATH";
/**
+ * Extra field for the package name of a package that is requested to be unarchived. Sent as
+ * part of the {@link android.content.Intent#ACTION_UNARCHIVE_PACKAGE} intent.
+ *
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_ARCHIVING)
+ public static final String EXTRA_UNARCHIVE_PACKAGE_NAME =
+ "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
+
+ /**
+ * If true, the requestor of the unarchival has specified that the app should be unarchived
+ * for {@link android.os.UserHandle#ALL}.
+ *
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_ARCHIVING)
+ public static final String EXTRA_UNARCHIVE_ALL_USERS =
+ "android.content.pm.extra.UNARCHIVE_ALL_USERS";
+
+ /**
* Streaming installation pending.
* Caller should make sure DataLoader is able to prepare image and reinitiate the operation.
*
@@ -1495,8 +1518,7 @@ public class PackageInstaller {
* This returns all names which have been previously written through
* {@link #openWrite(String, long, long)} as part of this session.
*
- * @throws SecurityException if called after the session has been
- * committed or abandoned.
+ * @throws SecurityException if called after the session has been abandoned.
*/
public @NonNull String[] getNames() throws IOException {
try {
@@ -2158,6 +2180,72 @@ public class PackageInstaller {
return new InstallInfo(result);
}
+ /**
+ * Requests to archive a package which is currently installed.
+ *
+ * <p> During the archival process, the apps APKs and cache are removed from the device while
+ * the user data is kept. Through the {@link #requestUnarchive(String)} call, apps can be
+ * restored again through their responsible installer.
+ *
+ * <p> Archived apps are returned as displayable apps through the {@link LauncherApps} APIs and
+ * will be displayed to users with UI treatment to highlight that said apps are archived. If
+ * a user taps on an archived app, the app will be unarchived and the restoration process is
+ * communicated.
+ *
+ * @param statusReceiver Callback used to notify when the operation is completed.
+ * @throws PackageManager.NameNotFoundException If {@code packageName} isn't found or not
+ * available to the caller or isn't archived.
+ * @hide
+ */
+ @RequiresPermission(anyOf = {
+ Manifest.permission.DELETE_PACKAGES,
+ Manifest.permission.REQUEST_DELETE_PACKAGES})
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_ARCHIVING)
+ public void requestArchive(@NonNull String packageName, @NonNull IntentSender statusReceiver)
+ throws PackageManager.NameNotFoundException {
+ try {
+ mInstaller.requestArchive(packageName, mInstallerPackageName, statusReceiver,
+ new UserHandle(mUserId));
+ } catch (ParcelableException e) {
+ e.maybeRethrow(PackageManager.NameNotFoundException.class);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Requests to unarchive a currently archived package.
+ *
+ * <p> Sends a request to unarchive an app to the responsible installer. The installer is
+ * determined by {@link InstallSourceInfo#getUpdateOwnerPackageName()}, or
+ * {@link InstallSourceInfo#getInstallingPackageName()} if the former value is null.
+ *
+ * <p> The installation will happen asynchronously and can be observed through
+ * {@link android.content.Intent#ACTION_PACKAGE_ADDED}.
+ *
+ * @throws PackageManager.NameNotFoundException If {@code packageName} isn't found or not
+ * visible to the caller or if the package has no
+ * installer on the device anymore to unarchive it.
+ * @hide
+ */
+ @RequiresPermission(anyOf = {
+ Manifest.permission.INSTALL_PACKAGES,
+ Manifest.permission.REQUEST_INSTALL_PACKAGES})
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_ARCHIVING)
+ public void requestUnarchive(@NonNull String packageName)
+ throws PackageManager.NameNotFoundException {
+ try {
+ mInstaller.requestUnarchive(packageName, mInstallerPackageName,
+ new UserHandle(mUserId));
+ } catch (ParcelableException e) {
+ e.maybeRethrow(PackageManager.NameNotFoundException.class);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
// (b/239722738) This class serves as a bridge between the PackageLite class, which
// is a hidden class, and the consumers of this class. (e.g. InstallInstalling.java)
// This is a part of an effort to remove dependency on hidden APIs and use SystemAPIs or
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 9a53a2a60076..cdab431558df 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -20,6 +20,7 @@ import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.CheckResult;
import android.annotation.DrawableRes;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.LongDef;
@@ -29,6 +30,7 @@ import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.StringRes;
+import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UserIdInt;
@@ -1238,8 +1240,9 @@ public abstract class PackageManager {
/**
* Flag parameter to also retrieve some information about archived packages.
- * Packages can be archived through {@link PackageArchiver} and do not have any APKs stored on
- * the device, but do keep the data directory.
+ * Packages can be archived through
+ * {@link PackageInstaller#requestArchive(String, IntentSender)} and do not have any APKs stored
+ * on the device, but do keep the data directory.
* <p> Note: Archived apps are a subset of apps returned by {@link #MATCH_UNINSTALLED_PACKAGES}.
* <p> Note: this flag may cause less information about currently installed
* applications to be returned.
@@ -1754,6 +1757,8 @@ public abstract class PackageManager {
*
* @hide
*/
+ @SystemApi
+ @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED)
public static final int FLAG_SUSPEND_QUARANTINED = 0x00000001;
/** @hide */
@@ -9751,7 +9756,10 @@ public abstract class PackageManager {
*
* @hide
*/
+ @SystemApi
+ @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED)
@RequiresPermission(value=Manifest.permission.SUSPEND_APPS, conditional=true)
+ @SuppressLint("NullableCollection")
@Nullable
public String[] setPackagesSuspended(@Nullable String[] packageNames, boolean suspended,
@Nullable PersistableBundle appExtras, @Nullable PersistableBundle launcherExtras,
@@ -9958,16 +9966,6 @@ public abstract class PackageManager {
public abstract @NonNull PackageInstaller getPackageInstaller();
/**
- * {@link PackageArchiver} can be used to archive and restore archived packages.
- *
- * @hide
- */
- @SystemApi
- public @NonNull PackageArchiver getPackageArchiver() {
- throw new UnsupportedOperationException(
- "getPackageArchiver not implemented in subclass");
- }
- /**
* Adds a {@code CrossProfileIntentFilter}. After calling this method all
* intents sent from the user with id sourceUserId can also be be resolved
* by activities in the user with id targetUserId if they match the
diff --git a/core/java/android/content/pm/flags.aconfig b/core/java/android/content/pm/flags.aconfig
new file mode 100644
index 000000000000..0c8eb02e9681
--- /dev/null
+++ b/core/java/android/content/pm/flags.aconfig
@@ -0,0 +1,15 @@
+package: "android.content.pm"
+
+flag {
+ name: "quarantined_enabled"
+ namespace: "package_manager_service"
+ description: "Feature flag for Quarantined state"
+ bug: "269127435"
+}
+
+flag {
+ name: "archiving"
+ namespace: "package_manager_service"
+ description: "Feature flag to enable the archiving feature."
+ bug: "278553670"
+}
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index d41df4f49d48..7b874cc251bb 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -77,6 +77,16 @@ public class DatabaseUtils {
/** One of the values returned by {@link #getSqlStatementType(String)}. */
public static final int STATEMENT_OTHER = 99;
+ // The following statement types are "extended" and are for internal use only. These types
+ // are not public and are never returned by {@link #getSqlStatementType(String)}.
+
+ /** An internal statement type @hide **/
+ public static final int STATEMENT_WITH = 100;
+ /** An internal statement type @hide **/
+ public static final int STATEMENT_CREATE = 101;
+ /** An internal statement type denoting a comment. @hide **/
+ public static final int STATEMENT_COMMENT = 102;
+
/**
* Special function for writing an exception result at the header of
* a parcel, to be used when returning an exception from a transaction.
@@ -1564,6 +1574,79 @@ public class DatabaseUtils {
}
/**
+ * The legacy prefix matcher.
+ */
+ private static String getSqlStatementPrefixSimple(@NonNull String sql) {
+ sql = sql.trim();
+ if (sql.length() < 3) {
+ return null;
+ }
+ return sql.substring(0, 3).toUpperCase(Locale.ROOT);
+ }
+
+ /**
+ * Return the extended statement type for the SQL statement. This is not a public API and it
+ * can return values that are not publicly visible.
+ * @hide
+ */
+ private static int categorizeStatement(@NonNull String prefix, @NonNull String sql) {
+ if (prefix == null) return STATEMENT_OTHER;
+
+ switch (prefix) {
+ case "SEL": return STATEMENT_SELECT;
+ case "INS":
+ case "UPD":
+ case "REP":
+ case "DEL": return STATEMENT_UPDATE;
+ case "ATT": return STATEMENT_ATTACH;
+ case "COM":
+ case "END": return STATEMENT_COMMIT;
+ case "ROL":
+ if (sql.toUpperCase(Locale.ROOT).contains(" TO ")) {
+ // Rollback to savepoint.
+ return STATEMENT_OTHER;
+ }
+ return STATEMENT_ABORT;
+ case "BEG": return STATEMENT_BEGIN;
+ case "PRA": return STATEMENT_PRAGMA;
+ case "CRE": return STATEMENT_CREATE;
+ case "DRO":
+ case "ALT": return STATEMENT_DDL;
+ case "ANA":
+ case "DET": return STATEMENT_UNPREPARED;
+ case "WIT": return STATEMENT_WITH;
+ default:
+ if (prefix.startsWith("--") || prefix.startsWith("/*")) {
+ return STATEMENT_COMMENT;
+ }
+ return STATEMENT_OTHER;
+ }
+ }
+
+ /**
+ * Return the extended statement type for the SQL statement. This is not a public API and it
+ * can return values that are not publicly visible.
+ * @hide
+ */
+ public static int getSqlStatementTypeExtended(@NonNull String sql) {
+ int type = categorizeStatement(getSqlStatementPrefixSimple(sql), sql);
+ return type;
+ }
+
+ /**
+ * Convert an extended statement type to a public SQL statement type value.
+ * @hide
+ */
+ public static int getSqlStatementType(int extended) {
+ switch (extended) {
+ case STATEMENT_CREATE: return STATEMENT_DDL;
+ case STATEMENT_WITH: return STATEMENT_OTHER;
+ case STATEMENT_COMMENT: return STATEMENT_OTHER;
+ }
+ return extended;
+ }
+
+ /**
* Returns one of the following which represent the type of the given SQL statement.
* <ol>
* <li>{@link #STATEMENT_SELECT}</li>
@@ -1572,49 +1655,16 @@ public class DatabaseUtils {
* <li>{@link #STATEMENT_BEGIN}</li>
* <li>{@link #STATEMENT_COMMIT}</li>
* <li>{@link #STATEMENT_ABORT}</li>
+ * <li>{@link #STATEMENT_PRAGMA}</li>
+ * <li>{@link #STATEMENT_DDL}</li>
+ * <li>{@link #STATEMENT_UNPREPARED}</li>
* <li>{@link #STATEMENT_OTHER}</li>
* </ol>
* @param sql the SQL statement whose type is returned by this method
* @return one of the values listed above
*/
public static int getSqlStatementType(String sql) {
- sql = sql.trim();
- if (sql.length() < 3) {
- return STATEMENT_OTHER;
- }
- String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT);
- if (prefixSql.equals("SEL")) {
- return STATEMENT_SELECT;
- } else if (prefixSql.equals("INS") ||
- prefixSql.equals("UPD") ||
- prefixSql.equals("REP") ||
- prefixSql.equals("DEL")) {
- return STATEMENT_UPDATE;
- } else if (prefixSql.equals("ATT")) {
- return STATEMENT_ATTACH;
- } else if (prefixSql.equals("COM")) {
- return STATEMENT_COMMIT;
- } else if (prefixSql.equals("END")) {
- return STATEMENT_COMMIT;
- } else if (prefixSql.equals("ROL")) {
- boolean isRollbackToSavepoint = sql.toUpperCase(Locale.ROOT).contains(" TO ");
- if (isRollbackToSavepoint) {
- Log.w(TAG, "Statement '" + sql
- + "' may not work on API levels 16-27, use ';" + sql + "' instead");
- return STATEMENT_OTHER;
- }
- return STATEMENT_ABORT;
- } else if (prefixSql.equals("BEG")) {
- return STATEMENT_BEGIN;
- } else if (prefixSql.equals("PRA")) {
- return STATEMENT_PRAGMA;
- } else if (prefixSql.equals("CRE") || prefixSql.equals("DRO") ||
- prefixSql.equals("ALT")) {
- return STATEMENT_DDL;
- } else if (prefixSql.equals("ANA") || prefixSql.equals("DET")) {
- return STATEMENT_UNPREPARED;
- }
- return STATEMENT_OTHER;
+ return getSqlStatementType(getSqlStatementTypeExtended(sql));
}
/**
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index f2980f4a59c8..b96d83247591 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -1096,7 +1096,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
seqNum = mPreparedStatementCache.getLastSeqNum();
try {
final int numParameters = nativeGetParameterCount(mConnectionPtr, statementPtr);
- final int type = DatabaseUtils.getSqlStatementType(sql);
+ final int type = DatabaseUtils.getSqlStatementTypeExtended(sql);
final boolean readOnly = nativeIsReadOnly(mConnectionPtr, statementPtr);
statement = obtainPreparedStatement(sql, statementPtr, numParameters, type, readOnly,
seqNum);
@@ -1279,7 +1279,8 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
private static boolean isCacheable(int statementType) {
if (statementType == DatabaseUtils.STATEMENT_UPDATE
- || statementType == DatabaseUtils.STATEMENT_SELECT) {
+ || statementType == DatabaseUtils.STATEMENT_SELECT
+ || statementType == DatabaseUtils.STATEMENT_WITH) {
return true;
}
return false;
diff --git a/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl b/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
index addd622eef35..17cd18cc4182 100644
--- a/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
+++ b/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
@@ -48,7 +48,8 @@ interface IBiometricAuthenticator {
// startPreparedClient().
void prepareForAuthentication(boolean requireConfirmation, IBinder token, long operationId,
int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
- long requestId, int cookie, boolean allowBackgroundAuthentication);
+ long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager);
// Starts authentication with the previously prepared client.
void startPreparedClient(int cookie);
diff --git a/core/java/android/hardware/fingerprint/IFingerprintService.aidl b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
index e2840ec20ff9..0100660669e9 100644
--- a/core/java/android/hardware/fingerprint/IFingerprintService.aidl
+++ b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
@@ -74,7 +74,8 @@ interface IFingerprintService {
@EnforcePermission("MANAGE_BIOMETRIC")
void prepareForAuthentication(IBinder token, long operationId,
IBiometricSensorReceiver sensorReceiver, in FingerprintAuthenticateOptions options, long requestId,
- int cookie, boolean allowBackgroundAuthentication);
+ int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager);
// Starts authentication with the previously prepared client.
@EnforcePermission("MANAGE_BIOMETRIC")
diff --git a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
index 9da2f4c12977..36c4a2ac09e4 100644
--- a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
+++ b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
@@ -200,19 +200,43 @@ public final class DisplayPortAltModeInfo implements Parcelable {
dest.writeInt(mLinkTrainingStatus);
}
+ private String displayPortAltModeStatusToString(@DisplayPortAltModeStatus int status) {
+ switch (status) {
+ case DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE:
+ return "not capable";
+ case DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED:
+ return "capable disabled";
+ case DISPLAYPORT_ALT_MODE_STATUS_ENABLED:
+ return "enabled";
+ default:
+ return "unknown";
+ }
+ }
+
+ private String linkTrainingStatusToString(@LinkTrainingStatus int status) {
+ switch (status) {
+ case LINK_TRAINING_STATUS_SUCCESS:
+ return "success";
+ case LINK_TRAINING_STATUS_FAILURE:
+ return "failure";
+ default:
+ return "unknown";
+ }
+ }
+
@NonNull
@Override
public String toString() {
return "DisplayPortAltModeInfo{partnerSink="
- + mPartnerSinkStatus
- + " cable="
- + mCableStatus
- + " numLanes="
+ + displayPortAltModeStatusToString(mPartnerSinkStatus)
+ + ", cable="
+ + displayPortAltModeStatusToString(mCableStatus)
+ + ", numLanes="
+ mNumLanes
- + " hotPlugDetect="
+ + ", hotPlugDetect="
+ mHotPlugDetect
- + " linkTrainingStatus="
- + mLinkTrainingStatus
+ + ", linkTrainingStatus="
+ + linkTrainingStatusToString(mLinkTrainingStatus)
+ "}";
}
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 7967db604d1e..582c5c0c4dd4 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -685,12 +685,7 @@ public class InputMethodService extends AbstractInputMethodService {
private ImeTracker.Token mCurStatsToken;
final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> {
- Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, start info: " + info
- + " before onComputeInsets, tmpInsets: " + mTmpInsets,
- new Throwable());
onComputeInsets(mTmpInsets);
- Log.i("b/297000797", "IME#OnComputeInternalInsetsListener,"
- + " after onComputeInsets, tmpInsets: " + mTmpInsets);
if (!mViewsCreated) {
// The IME views are not ready, keep visible insets untouched.
mTmpInsets.visibleTopInsets = 0;
@@ -710,7 +705,6 @@ public class InputMethodService extends AbstractInputMethodService {
}
mNavigationBarController.updateTouchableInsets(mTmpInsets, info);
- Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, end info: " + info);
if (mInputFrame != null) {
setImeExclusionRect(mTmpInsets.visibleTopInsets);
}
@@ -1469,15 +1463,6 @@ public class InputMethodService extends AbstractInputMethodService {
proto.write(TOUCHABLE_REGION, touchableRegion.toString());
proto.end(token);
}
-
- @Override
- public String toString() {
- return "Insets{contentTopInsets=" + contentTopInsets
- + " visibleTopInsets=" + visibleTopInsets
- + " touchableInsets=" + touchableInsets
- + " touchableRegion=" + touchableRegion.getBounds()
- + "}";
- }
}
/**
@@ -4154,13 +4139,13 @@ public class InputMethodService extends AbstractInputMethodService {
p.println(" mExtractedToken=" + mExtractedToken);
p.println(" mIsInputViewShown=" + mIsInputViewShown
+ " mStatusIcon=" + mStatusIcon);
- p.println("Last computed insets:");
- p.println(" contentTopInsets=" + mTmpInsets.contentTopInsets
+ p.println(" Last computed insets:");
+ p.println(" contentTopInsets=" + mTmpInsets.contentTopInsets
+ " visibleTopInsets=" + mTmpInsets.visibleTopInsets
+ " touchableInsets=" + mTmpInsets.touchableInsets
+ " touchableRegion=" + mTmpInsets.touchableRegion);
- p.println(" mSettingsObserver=" + mSettingsObserver);
- p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString());
+ p.println(" mSettingsObserver=" + mSettingsObserver);
+ p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString());
}
private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() {
diff --git a/core/java/android/inputmethodservice/NavigationBarController.java b/core/java/android/inputmethodservice/NavigationBarController.java
index 22792a5ebcd6..8be4c5858694 100644
--- a/core/java/android/inputmethodservice/NavigationBarController.java
+++ b/core/java/android/inputmethodservice/NavigationBarController.java
@@ -31,7 +31,6 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.inputmethodservice.navigationbar.NavigationBarFrame;
import android.inputmethodservice.navigationbar.NavigationBarView;
-import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -115,8 +114,6 @@ final class NavigationBarController {
}
void onNavButtonFlagsChanged(@InputMethodNavButtonFlags int navButtonFlags) {
- Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged: " + navButtonFlags,
- new Throwable());
mImpl.onNavButtonFlagsChanged(navButtonFlags);
}
@@ -238,10 +235,6 @@ final class NavigationBarController {
if (ENABLE_HIDE_IME_CAPTION_BAR) {
mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> {
- Log.i("b/297000797", "NavigationBarController#onApplyWindowInsetsListener:"
- + " mNavigationBarFrame: " + mNavigationBarFrame
- + " captionBar visible: " + insets.isVisible(captionBar())
- + " insets: " + insets);
if (mNavigationBarFrame != null) {
boolean visible = insets.isVisible(captionBar());
mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE);
@@ -460,10 +453,6 @@ final class NavigationBarController {
mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown;
if (ENABLE_HIDE_IME_CAPTION_BAR) {
- Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged,"
- + " calling setImeCaptionBarInsetsHeight"
- + " with: " + getImeCaptionBarHeight(),
- new Throwable());
mService.mWindow.getWindow().getDecorView().getWindowInsetsController()
.setImeCaptionBarInsetsHeight(getImeCaptionBarHeight());
}
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index e4a09a651ae1..7f6ec5821cb4 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -176,7 +176,8 @@ final class SoftInputWindow extends Dialog {
try {
super.show();
updateWindowState(WindowState.SHOWN_AT_LEAST_ONCE);
- } catch (WindowManager.BadTokenException e) {
+ } catch (WindowManager.BadTokenException
+ | WindowManager.InvalidDisplayException e) {
// Just ignore this exception. Since show() can be requested from other
// components such as the system and there could be multiple event queues before
// the request finally arrives here, the system may have already invalidated the
diff --git a/core/java/android/nfc/NfcAntennaInfo.java b/core/java/android/nfc/NfcAntennaInfo.java
index d54fcd2ed5b3..b002ca21e8e3 100644
--- a/core/java/android/nfc/NfcAntennaInfo.java
+++ b/core/java/android/nfc/NfcAntennaInfo.java
@@ -85,8 +85,8 @@ public final class NfcAntennaInfo implements Parcelable {
this.mDeviceHeight = in.readInt();
this.mDeviceFoldable = in.readByte() != 0;
this.mAvailableNfcAntennas = new ArrayList<>();
- in.readParcelableList(this.mAvailableNfcAntennas,
- AvailableNfcAntenna.class.getClassLoader());
+ in.readTypedList(this.mAvailableNfcAntennas,
+ AvailableNfcAntenna.CREATOR);
}
public static final @NonNull Parcelable.Creator<NfcAntennaInfo> CREATOR =
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index 1929a4d562d4..ada55325aded 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -227,7 +227,7 @@ public final class BinderProxy implements IBinder {
Log.v(Binder.TAG, "BinderProxy map growth! bucket size = " + size
+ " total = " + totalSize);
mWarnBucketSize += WARN_INCREMENT;
- if (Build.IS_DEBUGGABLE && totalSize >= CRASH_AT_SIZE) {
+ if (totalSize >= CRASH_AT_SIZE) {
// Use the number of uncleared entries to determine whether we should
// really report a histogram and crash. We don't want to fundamentally
// change behavior for a debuggable process, so we GC only if we are
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index b210c4644d7d..e96c24d677f1 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -245,7 +245,7 @@ public final class ServiceManager {
public static boolean isDeclared(@NonNull String name) {
try {
return getIServiceManager().isDeclared(name);
- } catch (RemoteException e) {
+ } catch (RemoteException | SecurityException e) {
Log.e(TAG, "error in isDeclared", e);
return false;
}
diff --git a/core/java/android/os/flags.aconfig b/core/java/android/os/flags.aconfig
index 851aa6dce560..febe6f719baf 100644
--- a/core/java/android/os/flags.aconfig
+++ b/core/java/android/os/flags.aconfig
@@ -6,3 +6,17 @@ flag {
description: "Guards a new UserManager user restriction that admins can use to require cellular encryption on their managed devices."
bug: "276752881"
}
+
+flag {
+ name: "remove_app_profiler_pss_collection"
+ namespace: "android_platform_power_optimization"
+ description: "Replaces background PSS collection in AppProfiler with RSS"
+ bug: "297542292"
+}
+
+flag {
+ name: "allow_private_profile"
+ namespace: "private_profile"
+ description: "Guards a new Private Profile type in UserManager - everything from its setup to config to deletion."
+ bug: "299069460"
+}
diff --git a/core/java/android/security/FileIntegrityManager.java b/core/java/android/security/FileIntegrityManager.java
index 132700d289b8..d6f3bf334456 100644
--- a/core/java/android/security/FileIntegrityManager.java
+++ b/core/java/android/security/FileIntegrityManager.java
@@ -133,11 +133,13 @@ public final class FileIntegrityManager {
* also use this API to download the best signature on the running device.
*
* @return whether the certificate is trusted in the system
+ * @deprecated The feature is no longer supported, and this API now always returns false.
*/
@RequiresPermission(anyOf = {
android.Manifest.permission.INSTALL_PACKAGES,
android.Manifest.permission.REQUEST_INSTALL_PACKAGES
})
+ @Deprecated
public boolean isAppSourceCertificateTrusted(@NonNull X509Certificate certificate)
throws CertificateEncodingException {
try {
diff --git a/core/java/android/security/TEST_MAPPING b/core/java/android/security/TEST_MAPPING
new file mode 100644
index 000000000000..7e43381ee6a9
--- /dev/null
+++ b/core/java/android/security/TEST_MAPPING
@@ -0,0 +1,16 @@
+{
+ "postsubmit": [
+ {
+ "name": "CtsSecurityTestCases",
+ "options": [
+ {
+ "include-filter": "android.security.cts.FileIntegrityManagerTest"
+ }
+ ],
+ "file_patterns": [
+ "FileIntegrityManager\\.java",
+ "IFileIntegrityService\\.aidl"
+ ]
+ }
+ ]
+}
diff --git a/core/java/android/security/flags.aconfig b/core/java/android/security/flags.aconfig
index b6c2b83f0daa..cfc6f483e4ae 100644
--- a/core/java/android/security/flags.aconfig
+++ b/core/java/android/security/flags.aconfig
@@ -13,3 +13,10 @@ flag {
description: "Fix bugs in behavior of UnlockedDeviceRequired keystore keys"
bug: "296464083"
}
+
+flag {
+ name: "deprecate_fsv_sig"
+ namespace: "hardware_backed_security"
+ description: "Feature flag for deprecating .fsv_sig"
+ bug: "277916185"
+}
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index b48b7ecd73a2..3f41c56ac7f1 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -46,6 +46,7 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SharedMemory;
+import android.os.SystemProperties;
import android.provider.Settings;
import android.util.ArraySet;
import android.util.Log;
@@ -131,6 +132,9 @@ public class VoiceInteractionService extends Service {
@EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
static final long MULTIPLE_ACTIVE_HOTWORD_DETECTORS = 193232191L;
+ private static final boolean SYSPROP_VISUAL_QUERY_SERVICE_ENABLED =
+ SystemProperties.getBoolean("ro.hotword.visual_query_service_enabled", false);
+
IVoiceInteractionService mInterface = new IVoiceInteractionService.Stub() {
@Override
public void ready() {
@@ -947,6 +951,10 @@ public class VoiceInteractionService extends Service {
Objects.requireNonNull(executor);
Objects.requireNonNull(callback);
+ if (!SYSPROP_VISUAL_QUERY_SERVICE_ENABLED) {
+ throw new IllegalStateException("VisualQueryDetectionService is not enabled on this "
+ + "system. Please set ro.hotword.visual_query_service_enabled to true.");
+ }
if (mSystemService == null) {
throw new IllegalStateException("Not available until onReady() is called");
}
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 637770c4fb21..04ae0aff10d0 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -2556,7 +2556,7 @@ public abstract class WallpaperService extends Service {
private void doDetachEngine() {
// Some wallpapers will not trigger the rendering threads of the remaining engines even
// if they are visible, so we need to toggle the state to get their attention.
- if (!mEngine.mDestroyed) {
+ if (mEngine != null && !mEngine.mDestroyed) {
mEngine.detach();
synchronized (mActiveEngines) {
for (IWallpaperEngineWrapper engineWrapper : mActiveEngines.values()) {
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index 14fc58591d94..65a1da6b81b8 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -16,6 +16,9 @@
package android.text;
+import static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
+
+import android.annotation.FlaggedApi;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -55,9 +58,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* line width
* @param includePad set whether to include extra space beyond font ascent and descent which is
* needed to avoid clipping in some scripts
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static BoringLayout make(CharSequence source, TextPaint paint, int outerWidth,
Alignment align, float spacingMult, float spacingAdd, BoringLayout.Metrics metrics,
boolean includePad) {
@@ -83,9 +84,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* @param ellipsizedWidth the width to which this Layout is ellipsizing. If {@code ellipsize} is
* {@code null}, or is {@link TextUtils.TruncateAt#MARQUEE} this value is
* not used, {@code outerWidth} is used instead
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static BoringLayout make(CharSequence source, TextPaint paint, int outerWidth,
Alignment align, float spacingmult, float spacingadd, BoringLayout.Metrics metrics,
boolean includePad, TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
@@ -117,9 +116,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* False for keeping the first font's line height. If some glyphs
* requires larger vertical spaces, by passing true to this
* argument, the layout increase the line height to fit all glyphs.
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static @NonNull BoringLayout make(
@NonNull CharSequence source, @NonNull TextPaint paint,
@IntRange(from = 0) int outerWidth,
@@ -266,9 +263,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* line width
* @param includePad set whether to include extra space beyond font ascent and descent which is
* needed to avoid clipping in some scripts
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public BoringLayout(CharSequence source, TextPaint paint, int outerwidth, Alignment align,
float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, boolean includePad) {
super(source, paint, outerwidth, align, TextDirectionHeuristics.LTR, spacingMult,
@@ -302,9 +297,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* @param ellipsizedWidth the width to which this Layout is ellipsizing. If {@code ellipsize} is
* {@code null}, or is {@link TextUtils.TruncateAt#MARQUEE} this value is
* not used, {@code outerWidth} is used instead
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public BoringLayout(CharSequence source, TextPaint paint, int outerWidth, Alignment align,
float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, boolean includePad,
TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
@@ -333,9 +326,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* False for keeping the first font's line height. If some glyphs
* requires larger vertical spaces, by passing true to this
* argument, the layout increase the line height to fit all glyphs.
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public BoringLayout(
@NonNull CharSequence source, @NonNull TextPaint paint,
@IntRange(from = 0) int outerWidth, @NonNull Alignment align, float spacingMult,
@@ -478,9 +469,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* @param paint a paint
* @return layout metric for the given text. null if given text is unable to be handled by
* BoringLayout.
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static Metrics isBoring(CharSequence text, TextPaint paint) {
return isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, null);
}
@@ -495,9 +484,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* @return layout metric for the given text. If metrics is not null, this method fills values
* to given metrics object instead of allocating new metrics object. null if given text
* is unable to be handled by BoringLayout.
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static Metrics isBoring(CharSequence text, TextPaint paint, Metrics metrics) {
return isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, metrics);
}
@@ -557,9 +544,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
* argument, the layout increase the line height to fit all glyphs.
* @param metrics the out metrics.
* @return metrics on success. null if text cannot be rendered by BoringLayout.
- * @deprecated Use {@link android.text.Layout.Builder} instead.
*/
- @Deprecated
public static @Nullable Metrics isBoring(@NonNull CharSequence text, @NonNull TextPaint paint,
@NonNull TextDirectionHeuristic textDir, boolean useFallbackLineSpacing,
@Nullable Metrics metrics) {
@@ -746,6 +731,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
*
* @return a drawing bounding box.
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
@NonNull public RectF getDrawingBoundingBox() {
return mDrawingBounds;
}
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 469e166c4339..4f4dea780171 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -16,6 +16,9 @@
package android.text;
+import static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
+
+import android.annotation.FlaggedApi;
import android.annotation.FloatRange;
import android.annotation.IntDef;
import android.annotation.IntRange;
@@ -1010,6 +1013,7 @@ public abstract class Layout {
* @return bounding rectangle
*/
@NonNull
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public RectF computeDrawingBoundingBox() {
float left = 0;
float right = 0;
@@ -3436,6 +3440,7 @@ public abstract class Layout {
*
* @see StaticLayout.Builder
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public static final class Builder {
/**
* Construct a builder class.
@@ -3776,6 +3781,7 @@ public abstract class Layout {
// The corresponding getter is getUseBoundsForWidth
@NonNull
@SuppressLint("MissingGetterMatchingBuilder")
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public Builder setUseBoundsForWidth(boolean useBoundsForWidth) {
mUseBoundsForWidth = useBoundsForWidth;
return this;
@@ -3865,6 +3871,7 @@ public abstract class Layout {
* @see Layout.Builder
*/
@NonNull
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final CharSequence getText() {
return mText;
}
@@ -3914,6 +3921,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setTextDirection(TextDirectionHeuristic)
*/
@NonNull
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final TextDirectionHeuristic getTextDirectionHeuristic() {
return mTextDir;
}
@@ -3940,6 +3948,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setLineSpacing(float, float)
* @see Layout#getSpacingMultiplier()
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final float getLineSpacingMultiplier() {
return mSpacingMult;
}
@@ -3966,6 +3975,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setLineSpacing(float, float)
* @see Layout#getSpacingAdd()
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final float getLineSpacingAmount() {
return mSpacingAdd;
}
@@ -3977,6 +3987,7 @@ public abstract class Layout {
* @see Layout.Builder#setFontPaddingIncluded(boolean)
* @see StaticLayout.Builder#setIncludePad(boolean)
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final boolean isFontPaddingIncluded() {
return mIncludePad;
}
@@ -4024,6 +4035,7 @@ public abstract class Layout {
* @see Layout#getEllipsizedWidth()
*/
@Nullable
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final TextUtils.TruncateAt getEllipsize() {
return mEllipsize;
}
@@ -4039,6 +4051,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setMaxLines(int)
*/
@IntRange(from = 1)
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int getMaxLines() {
return mMaxLines;
}
@@ -4051,6 +4064,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setBreakStrategy(int)
*/
@BreakStrategy
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int getBreakStrategy() {
return mBreakStrategy;
}
@@ -4063,6 +4077,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setHyphenationFrequency(int)
*/
@HyphenationFrequency
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int getHyphenationFrequency() {
return mHyphenationFrequency;
}
@@ -4078,6 +4093,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setIndents(int[], int[])
*/
@Nullable
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int[] getLeftIndents() {
if (mLeftIndents == null) {
return null;
@@ -4098,6 +4114,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setIndents(int[], int[])
*/
@Nullable
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int[] getRightIndents() {
if (mRightIndents == null) {
return null;
@@ -4115,6 +4132,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setJustificationMode(int)
*/
@JustificationMode
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public final int getJustificationMode() {
return mJustificationMode;
}
@@ -4128,6 +4146,7 @@ public abstract class Layout {
*/
// not being final because of subclass has already published API.
@NonNull
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public LineBreakConfig getLineBreakConfig() {
return mLineBreakConfig;
}
@@ -4141,6 +4160,7 @@ public abstract class Layout {
* @see StaticLayout.Builder#setUseBoundsForWidth(boolean)
* @see DynamicLayout.Builder#setUseBoundsForWidth(boolean)
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public boolean getUseBoundsForWidth() {
return mUseBoundsForWidth;
}
diff --git a/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig b/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig
new file mode 100644
index 000000000000..60f1e8802ea1
--- /dev/null
+++ b/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.text.flags"
+
+flag {
+ name: "no_break_no_hyphenation_span"
+ namespace: "text"
+ description: "A feature flag that adding new spans that prevents line breaking and hyphenation."
+ bug: "283193586"
+}
diff --git a/core/java/android/text/style/LineBreakConfigSpan.java b/core/java/android/text/style/LineBreakConfigSpan.java
index 90a79c6b3f94..b8033a9d6fe1 100644
--- a/core/java/android/text/style/LineBreakConfigSpan.java
+++ b/core/java/android/text/style/LineBreakConfigSpan.java
@@ -16,6 +16,9 @@
package android.text.style;
+import static com.android.text.flags.Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN;
+
+import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.graphics.text.LineBreakConfig;
@@ -24,6 +27,7 @@ import java.util.Objects;
/**
* LineBreakSpan for changing line break style of the specific region of the text.
*/
+@FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
public class LineBreakConfigSpan {
private final LineBreakConfig mLineBreakConfig;
@@ -60,4 +64,22 @@ public class LineBreakConfigSpan {
public String toString() {
return "LineBreakConfigSpan{mLineBreakConfig=" + mLineBreakConfig + '}';
}
+
+ private static final LineBreakConfig sNoHyphenationConfig = new LineBreakConfig.Builder()
+ .setHyphenation(LineBreakConfig.HYPHENATION_DISABLED)
+ .build();
+
+ /**
+ * A specialized {@link LineBreakConfigSpan} that used for preventing hyphenation.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public static final class NoHyphenationSpan extends LineBreakConfigSpan {
+ /**
+ * Construct a new {@link NoHyphenationSpan}.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public NoHyphenationSpan() {
+ super(sNoHyphenationConfig);
+ }
+ }
}
diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java
index 0ed275c7821d..2906d86f803d 100644
--- a/core/java/android/util/FeatureFlagUtils.java
+++ b/core/java/android/util/FeatureFlagUtils.java
@@ -187,14 +187,6 @@ public class FeatureFlagUtils {
public static final String SETTINGS_FLASH_NOTIFICATIONS = "settings_flash_notifications";
/**
- * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll
- * view is shown in system ui.
- * @hide
- */
- public static final String SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS =
- "settings_show_udfps_enroll_in_settings";
-
- /**
* Flag to enable lock screen credentials transfer API in Android U.
* @hide
*/
@@ -208,14 +200,6 @@ public class FeatureFlagUtils {
public static final String SETTINGS_REMOTE_DEVICE_CREDENTIAL_VALIDATION =
"settings_remote_device_credential_validation";
- // TODO(b/295516544): Remove this when trunk stable feature flag is available.
- /**
- * Flag to enable / disable the Private Space Settings. It's disabled by default.
- * @hide
- */
- public static final String SETTINGS_PRIVATE_SPACE_SETTINGS =
- "settings_private_space_settings";
-
private static final Map<String, String> DEFAULT_FLAGS;
@@ -258,13 +242,11 @@ public class FeatureFlagUtils {
DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false");
DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false");
DEFAULT_FLAGS.put(SETTINGS_FLASH_NOTIFICATIONS, "true");
- DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "true");
DEFAULT_FLAGS.put(SETTINGS_ENABLE_LOCKSCREEN_TRANSFER_API, "true");
DEFAULT_FLAGS.put(SETTINGS_REMOTE_DEVICE_CREDENTIAL_VALIDATION, "true");
DEFAULT_FLAGS.put(SETTINGS_BIOMETRICS2_FINGERPRINT_SETTINGS, "false");
// TODO: b/298454866 Replace with Trunk Stable Feature Flag
DEFAULT_FLAGS.put(SETTINGS_REMOTEAUTH_ENROLLMENT_SETTINGS, "false");
- DEFAULT_FLAGS.put(SETTINGS_PRIVATE_SPACE_SETTINGS, "false");
}
private static final Set<String> PERSISTENT_FLAGS;
diff --git a/core/java/android/view/HandwritingInitiator.java b/core/java/android/view/HandwritingInitiator.java
index a208d1f1a558..0ce1d4711c6d 100644
--- a/core/java/android/view/HandwritingInitiator.java
+++ b/core/java/android/view/HandwritingInitiator.java
@@ -24,6 +24,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
import android.widget.TextView;
import com.android.internal.annotations.VisibleForTesting;
@@ -81,6 +82,8 @@ public class HandwritingInitiator {
private int mConnectionCount = 0;
private final InputMethodManager mImm;
+ private final int[] mTempLocation = new int[2];
+
private final Rect mTempRect = new Rect();
private final RectF mTempRectF = new RectF();
@@ -424,7 +427,19 @@ public class HandwritingInitiator {
return null;
}
- private static void requestFocusWithoutReveal(View view) {
+ private void requestFocusWithoutReveal(View view) {
+ if (view instanceof EditText editText && !mState.mStylusDownWithinEditorBounds) {
+ // If the stylus down point was inside the EditText's bounds, then the EditText will
+ // automatically set its cursor position nearest to the stylus down point when it
+ // gains focus. If the stylus down point was outside the EditText's bounds (within
+ // the extended handwriting bounds), then we must calculate and set the cursor
+ // position manually.
+ view.getLocationInWindow(mTempLocation);
+ int offset = editText.getOffsetForPosition(
+ mState.mStylusDownX - mTempLocation[0],
+ mState.mStylusDownY - mTempLocation[1]);
+ editText.setSelection(offset);
+ }
if (view.getRevealOnFocusHint()) {
view.setRevealOnFocusHint(false);
view.requestFocus();
@@ -452,6 +467,10 @@ public class HandwritingInitiator {
if (getViewHandwritingArea(connectedView, handwritingArea)
&& isInHandwritingArea(handwritingArea, x, y, connectedView, isHover)
&& shouldTriggerStylusHandwritingForView(connectedView)) {
+ if (!isHover && mState != null) {
+ mState.mStylusDownWithinEditorBounds =
+ contains(handwritingArea, x, y, 0f, 0f, 0f, 0f);
+ }
return connectedView;
}
}
@@ -470,7 +489,12 @@ public class HandwritingInitiator {
}
final float distance = distance(handwritingArea, x, y);
- if (distance == 0f) return view;
+ if (distance == 0f) {
+ if (!isHover && mState != null) {
+ mState.mStylusDownWithinEditorBounds = true;
+ }
+ return view;
+ }
if (distance < minDistance) {
minDistance = distance;
bestCandidate = view;
@@ -653,6 +677,12 @@ public class HandwritingInitiator {
private boolean mExceedHandwritingSlop;
/**
+ * Whether the stylus down point of the MotionEvent sequence was within the editor's bounds
+ * (not including the extended handwriting bounds).
+ */
+ private boolean mStylusDownWithinEditorBounds;
+
+ /**
* A view which has requested focus and is pending input connection creation. When an input
* connection is created for the view, a handwriting session should be started for the view.
*/
diff --git a/core/java/android/view/HapticScrollFeedbackProvider.java b/core/java/android/view/HapticScrollFeedbackProvider.java
index fba23ba8369f..a2f1d37c2c11 100644
--- a/core/java/android/view/HapticScrollFeedbackProvider.java
+++ b/core/java/android/view/HapticScrollFeedbackProvider.java
@@ -17,21 +17,35 @@
package android.view;
import android.annotation.FlaggedApi;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.view.flags.Flags;
import com.android.internal.annotations.VisibleForTesting;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* {@link ScrollFeedbackProvider} that performs haptic feedback when scrolling.
*
* <p>Each scrolling widget should have its own instance of this class to ensure that scroll state
* is isolated.
+ *
+ * <p>Check {@link ScrollFeedbackProvider} for details on the arguments that should be passed to the
+ * methods in this class. To check if your input device ID, source, and motion axis are valid for
+ * haptic feedback, you can use the
+ * {@link ViewConfiguration#isHapticScrollFeedbackEnabled(int, int, int)} API.
*/
@FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
private static final String TAG = "HapticScrollFeedbackProvider";
+ /** @hide */
+ @IntDef(value = {MotionEvent.AXIS_SCROLL})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface HapticScrollFeedbackAxis {}
+
private static final int TICK_INTERVAL_NO_TICK = 0;
private final View mView;
@@ -46,10 +60,6 @@ public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
/** The {@link InputDevice} source from which the latest scroll event happened. */
private int mSource = -1;
- /**
- * Cache for tick interval for scroll tick caused by a {@link InputDevice#SOURCE_ROTARY_ENCODER}
- * on {@link MotionEvent#AXIS_SCROLL}. Set to -1 if the value has not been fetched and cached.
- */
/** The tick interval corresponding to the current InputDevice/source/axis. */
private int mTickIntervalPixels = TICK_INTERVAL_NO_TICK;
private int mTotalScrollPixels = 0;
@@ -68,7 +78,8 @@ public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
}
@Override
- public void onScrollProgress(int inputDeviceId, int source, int axis, int deltaInPixels) {
+ public void onScrollProgress(
+ int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis, int deltaInPixels) {
maybeUpdateCurrentConfig(inputDeviceId, source, axis);
if (!mHapticScrollFeedbackEnabled) {
return;
@@ -95,7 +106,8 @@ public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
}
@Override
- public void onScrollLimit(int inputDeviceId, int source, int axis, boolean isStart) {
+ public void onScrollLimit(
+ int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis, boolean isStart) {
maybeUpdateCurrentConfig(inputDeviceId, source, axis);
if (!mHapticScrollFeedbackEnabled) {
return;
@@ -112,7 +124,7 @@ public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
}
@Override
- public void onSnapToItem(int inputDeviceId, int source, int axis) {
+ public void onSnapToItem(int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis) {
maybeUpdateCurrentConfig(inputDeviceId, source, axis);
if (!mHapticScrollFeedbackEnabled) {
return;
diff --git a/core/java/android/view/InputWindowHandle.java b/core/java/android/view/InputWindowHandle.java
index 2761aaeb4a7d..bc837501037f 100644
--- a/core/java/android/view/InputWindowHandle.java
+++ b/core/java/android/view/InputWindowHandle.java
@@ -35,6 +35,8 @@ import java.lang.ref.WeakReference;
* @hide
*/
public final class InputWindowHandle {
+ // TODO (b/300094445): Convert to use correct flagging infrastructure
+ public static final boolean USE_SURFACE_TRUSTED_OVERLAY = true;
/**
* An internal annotation for all the {@link android.os.InputConfig} flags that can be
@@ -59,7 +61,6 @@ public final class InputWindowHandle {
InputConfig.DUPLICATE_TOUCH_TO_WALLPAPER,
InputConfig.IS_WALLPAPER,
InputConfig.PAUSE_DISPATCHING,
- InputConfig.TRUSTED_OVERLAY,
InputConfig.WATCH_OUTSIDE_TOUCH,
InputConfig.SLIPPERY,
InputConfig.DISABLE_USER_ACTIVITY,
@@ -272,4 +273,13 @@ public final class InputWindowHandle {
}
this.inputConfig &= ~inputConfig;
}
+
+ public void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc,
+ boolean isTrusted) {
+ if (USE_SURFACE_TRUSTED_OVERLAY) {
+ t.setTrustedOverlay(sc, isTrusted);
+ } else if (isTrusted) {
+ inputConfig |= InputConfig.TRUSTED_OVERLAY;
+ }
+ }
}
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index 9186e4939b78..fb24211e591a 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -1856,8 +1856,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
return;
}
Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom);
- Log.i("b/297000797", "InsetsController#setImeCaptionBarInsetsHeight,"
- + " height: " + height + " frame: " + mFrame);
InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR);
if (mImeCaptionBarInsetsHeight != height
|| (source != null && !newFrame.equals(source.getFrame()))) {
diff --git a/core/java/android/view/InsetsSource.java b/core/java/android/view/InsetsSource.java
index 3e435ae0a40a..0d5704eed4b3 100644
--- a/core/java/android/view/InsetsSource.java
+++ b/core/java/android/view/InsetsSource.java
@@ -31,7 +31,6 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Log;
import android.util.proto.ProtoOutputStream;
import android.view.WindowInsets.Type.InsetsType;
@@ -197,12 +196,6 @@ public class InsetsSource implements Parcelable {
* source.
*/
public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) {
- if (getType() == WindowInsets.Type.ime()) {
- Log.i("b/297000797", "InsetsSource#calculateInsets tmpFrame: " + mTmpFrame
- + " ignoreVisibility: " + ignoreVisibility
- + " frame: " + mFrame
- + " relativeFrame: " + relativeFrame, new Throwable());
- }
return calculateInsets(relativeFrame, mFrame, ignoreVisibility);
}
@@ -210,12 +203,6 @@ public class InsetsSource implements Parcelable {
* Like {@link #calculateInsets(Rect, boolean)}, but will return visible insets.
*/
public Insets calculateVisibleInsets(Rect relativeFrame) {
- if (getType() == WindowInsets.Type.ime()) {
- Log.i("b/297000797", "InsetsSource#calculateVisibleInsets tmpFrame: " + mTmpFrame
- + " frame: " + mFrame
- + " visibleFrame: " + mVisibleFrame
- + " relativeFrame: " + relativeFrame, new Throwable());
- }
return calculateInsets(relativeFrame, mVisibleFrame != null ? mVisibleFrame : mFrame,
false /* ignoreVisibility */);
}
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
index eac74081bf85..59e0932ecd80 100644
--- a/core/java/android/view/InsetsState.java
+++ b/core/java/android/view/InsetsState.java
@@ -45,7 +45,6 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Log;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.util.proto.ProtoOutputStream;
@@ -381,9 +380,6 @@ public class InsetsState implements Parcelable {
@InternalInsetsSide @Nullable SparseIntArray idSideMap,
@Nullable boolean[] typeVisibilityMap, Insets insets, int type) {
int index = indexOf(type);
- if (source.getId() == InsetsSource.ID_IME) {
- Log.i("b/297000797", "InsetsState#processSourceAsPublicType, ime insets: " + insets);
- }
// Don't put Insets.NONE into typeInsetsMap. Otherwise, two WindowInsets can be considered
// as non-equal while they provide the same insets of each type from WindowInsets#getInsets
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index cdf5eec32fec..776eeda7484e 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -18,7 +18,6 @@ package android.view;
import static android.os.IInputConstants.INPUT_EVENT_FLAG_IS_ACCESSIBILITY_EVENT;
import static android.view.Display.DEFAULT_DISPLAY;
-
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
@@ -4361,6 +4360,17 @@ public final class MotionEvent extends InputEvent implements Parcelable {
public boolean isResampled;
/**
+ * Returns true if this pointer coords object was generated by resampling, rather than from
+ * an actual input event from the device at this time.
+ *
+ * @hide
+ */
+ @TestApi
+ public boolean isResampled() {
+ return isResampled;
+ }
+
+ /**
* Clears the contents of this object.
* Resets all axes to zero.
*/
diff --git a/core/java/android/view/ScrollFeedbackProvider.java b/core/java/android/view/ScrollFeedbackProvider.java
index 6f760c56e11a..78716f5646f6 100644
--- a/core/java/android/view/ScrollFeedbackProvider.java
+++ b/core/java/android/view/ScrollFeedbackProvider.java
@@ -24,120 +24,103 @@ import android.view.flags.Flags;
* Interface to represent an entity giving consistent feedback for different events surrounding view
* scroll.
*
- * <p>When you have access to the {@link MotionEvent}s that triggered the different scroll events,
- * use the {@link MotionEvent} based APIs in this class. If you do not have access to the motion
- * events, you can use the methods that accept the {@link InputDevice} ID (which can be obtained by
- * APIs like {@link MotionEvent#getDeviceId()} and {@link InputDevice#getId()}) and source (which
- * can be obtained by APIs like {@link MotionEvent#getSource()}) of the motion that caused the
- * scroll events.
+ * <p>The interface provides methods for the client to report different scroll events. The client
+ * should report all scroll events that they want to be considered for scroll feedback using the
+ * respective methods. The interface will process these events and provide scroll feedback based on
+ * its specific feedback implementation.
+ *
+ * <h3>Obtaining the correct arguments for methods in this interface</h3>
+ *
+ * <p>Methods in this interface rely on the provision of valid {@link InputDevice} ID and source, as
+ * well as the {@link MotionEvent} axis that generated a specific scroll event. The
+ * {@link InputDevice} represented by the provided ID must have a {@link InputDevice.MotionRange}
+ * with the provided source and axis. See below for more details on obtaining the right arguments
+ * for your method call.
+ *
+ * <ul>
+ *
+ * <li><p><b>inputDeviceId</b>: should always be the ID of the {@link InputDevice} that generated
+ * the scroll event. If calling this method in response to a {@link MotionEvent}, use the device ID
+ * that is reported by the event, which can be obtained using {@link MotionEvent#getDeviceId()}.
+ * Otherwise, use a valid ID that is obtained from {@link InputDevice#getId()}, or from an
+ * {@link InputManager} instance ({@link InputManager#getInputDeviceIds()} gives all the valid input
+ * device IDs).
+ *
+ * <li><p><b>source</b>: should always be the {@link InputDevice} source that generated the scroll
+ * event. Use {@link MotionEvent#getSource()} if calling this method in response to a
+ * {@link MotionEvent}. Otherwise, use a valid source for the {@link InputDevice}. You can use
+ * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
+ * {@link InputDevice}, from which you can derive all the valid sources for the device.
+ *
+ * <li><p><b>axis</b>: should always be the axis whose axis value produced the scroll event.
+ * A {@link MotionEvent} may report data for multiple axes, and each axis may have multiple data
+ * points for different pointers. Use the axis whose movement produced the specific scroll event.
+ * The motion value for an axis can be obtained using {@link MotionEvent#getAxisValue(int)}.
+ * You can use {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s
+ * for the {@link InputDevice}, from which you can derive all the valid axes for the device.
+ *
+ * </ul>
+ *
+ * <b>Note</b> that not all valid input device source and motion axis inputs are necessarily
+ * supported for scroll feedback. If you are implementing this interface, provide clear
+ * documentation in your implementation class about which input device source and motion axis are
+ * supported for your specific implementation. If you are using one of the implementations of this
+ * interface, please refer to the documentation of the implementation for details on which input
+ * device source and axis are supported.
*/
@FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
public interface ScrollFeedbackProvider {
/**
- * Call this when the view has snapped to an item, with a motion generated by an
- * {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and on
- * a given motion event {@code axis}.
+ * Call this when the view has snapped to an item.
*
- * <p>This method has the same purpose as {@link #onSnapToItem(MotionEvent, int)}. When a scroll
- * snap happens, call either this method or {@link #onSnapToItem(MotionEvent, int)}, not both.
- * This method is useful when you have no direct access to the {@link MotionEvent} that
- * caused the snap event.
*
* @param inputDeviceId the ID of the {@link InputDevice} that generated the motion triggering
* the snap.
* @param source the input source of the motion causing the snap.
* @param axis the axis of {@code event} that caused the item to snap.
- *
- * @see #onSnapToItem(MotionEvent, int)
*/
void onSnapToItem(int inputDeviceId, int source, int axis);
/**
- * Call this when the view has snapped to an item, with a motion from a given
- * {@link MotionEvent} on a given {@code axis}.
+ * Call this when the view has reached the scroll limit.
*
- * <p>The interface is not aware of the internal scroll states of the view for which scroll
- * feedback is played. As such, the client should call
- * {@link #onScrollLimit(MotionEvent, int, int)} when scrolling has reached limit.
- *
- * @param event the {@link MotionEvent} that caused the item to snap.
- * @param axis the axis of {@code event} that caused the item to snap.
- *
- * @see #onSnapToItem(int, int, int)
- */
- default void onSnapToItem(@NonNull MotionEvent event, int axis) {
- onSnapToItem(event.getDeviceId(), event.getSource(), axis);
- }
-
- /**
- * Call this when the view has reached the scroll limit when scrolled by a motion generated by
- * an {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and
- * on a given motion event {@code axis}.
- *
- * <p>This method has the same purpose as {@link #onScrollLimit(MotionEvent, int, boolean)}.
- * When a scroll limit happens, call either this method or
- * {@link #onScrollLimit(MotionEvent, int, boolean)}, not both. This method is useful when you
- * have no direct access to the {@link MotionEvent} that caused the scroll limit.
+ * <p>Note that a feedback may not be provided on every call to this method. This interface, for
+ * instance, may provide feedback on every `N`th scroll limit event. For the interface to
+ * properly provide feedback when needed, call this method for each scroll limit event that you
+ * want to be accounted to scroll limit feedback.
*
* @param inputDeviceId the ID of the {@link InputDevice} that caused scrolling to hit limit.
* @param source the input source of the motion that caused scrolling to hit the limit.
* @param axis the axis of {@code event} that caused scrolling to hit the limit.
* @param isStart {@code true} if scrolling hit limit at the start of the scrolling list, and
* {@code false} if the scrolling hit limit at the end of the scrolling list.
- *
- * @see #onScrollLimit(MotionEvent, int, boolean)
+ * <i>start</i> and <i>end<i> in this context are not geometrical references.
+ * Instead, they refer to the start and end of a scrolling experience. As such,
+ * "start" for some views may be at the bottom of a scrolling list, while it may
+ * be at the top of scrolling list for others.
*/
void onScrollLimit(int inputDeviceId, int source, int axis, boolean isStart);
/**
- * Call this when the view has reached the scroll limit when scrolled by the motion from a given
- * {@link MotionEvent} on a given {@code axis}.
+ * Call this when the view has scrolled.
*
- * @param event the {@link MotionEvent} that caused scrolling to hit the limit.
- * @param axis the axis of {@code event} that caused scrolling to hit the limit.
- * @param isStart {@code true} if scrolling hit limit at the start of the scrolling list, and
- * {@code false} if the scrolling hit limit at the end of the scrolling list.
- *
- * @see #onScrollLimit(int, int, int, boolean)
- */
- default void onScrollLimit(@NonNull MotionEvent event, int axis, boolean isStart) {
- onScrollLimit(event.getDeviceId(), event.getSource(), axis, isStart);
- }
-
- /**
- * Call this when the view has scrolled by {@code deltaInPixels} due to the motion generated by
- * an {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and
- * on a given motion event {@code axis}.
+ * <p>Different axes have different ways to map their raw axis values to pixels for scrolling.
+ * When calling this method, use the scroll values in pixels by which the view was scrolled; do
+ * not use the raw axis values. That is, use whatever value is passed to one of View's scrolling
+ * methods (example: {@link View#scrollBy(int, int)}). For example, for vertical scrolling on
+ * {@link MotionEvent#AXIS_SCROLL}, convert the raw axis value to the equivalent pixels by using
+ * {@link ViewConfiguration#getScaledVerticalScrollFactor()}, and use that value for this method
+ * call.
*
- * <p>This method has the same purpose as {@link #onScrollProgress(MotionEvent, int, int)}.
- * When a scroll progress happens, call either this method or
- * {@link #onScrollProgress(MotionEvent, int, int)}, not both. This method is useful when you
- * have no direct access to the {@link MotionEvent} that caused the scroll progress.
+ * <p>Note that a feedback may not be provided on every call to this method. This interface, for
+ * instance, may provide feedback for every `x` pixels scrolled. For the interface to properly
+ * track scroll progress and provide feedback when needed, call this method for each scroll
+ * event that you want to be accounted to scroll feedback.
*
* @param inputDeviceId the ID of the {@link InputDevice} that caused scroll progress.
* @param source the input source of the motion that caused scroll progress.
* @param axis the axis of {@code event} that caused scroll progress.
* @param deltaInPixels the amount of scroll progress, in pixels.
- *
- * @see #onScrollProgress(MotionEvent, int, int)
*/
void onScrollProgress(int inputDeviceId, int source, int axis, int deltaInPixels);
-
- /**
- * Call this when the view has scrolled by {@code deltaInPixels} due to the motion from a given
- * {@link MotionEvent} on a given {@code axis}.
- *
- * <p>The interface is not aware of the internal scroll states of the view for which scroll
- * feedback is played. As such, the client should call
- * {@link #onScrollLimit(MotionEvent, int, int)} when scrolling has reached limit.
- *
- * @param event the {@link MotionEvent} that caused scroll progress.
- * @param axis the axis of {@code event} that caused scroll progress.
- * @param deltaInPixels the amount of scroll progress, in pixels.
- *
- * @see #onScrollProgress(int, int, int, int)
- */
- default void onScrollProgress(@NonNull MotionEvent event, int axis, int deltaInPixels) {
- onScrollProgress(event.getDeviceId(), event.getSource(), axis, deltaInPixels);
- }
}
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 0244d462473b..a3ae6cf20725 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -1220,36 +1220,39 @@ public class ViewConfiguration {
* Checks if any kind of scroll haptic feedback is enabled for a motion generated by a specific
* input device configuration and motion axis.
*
- * <h3>Obtaining the correct arguments for this method call</h3>
- * <p><b>inputDeviceId</b>: if calling this method in response to a {@link MotionEvent}, use
- * the device ID that is reported by the event, which can be obtained using
- * {@link MotionEvent#getDeviceId()}. Otherwise, use a valid ID that is obtained from
- * {@link InputDevice#getId()}, or from an {@link InputManager} instance
- * ({@link InputManager#getInputDeviceIds()} gives all the valid input device IDs).
+ * <p>See {@link ScrollFeedbackProvider} for details on the arguments that should be passed to
+ * the methods in this class.
*
- * <p><b>axis</b>: a {@link MotionEvent} may report data for multiple axes, and each axis may
- * have multiple data points for different pointers. Use the axis whose movement produced the
- * scrolls that would generate the scroll haptics. You can use
- * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
- * {@link InputDevice}, from which you can derive all the valid axes for the device.
+ * <p>If the provided input device ID, source, and motion axis are not supported by this Android
+ * device, this method returns {@code false}. In other words, if the {@link InputDevice}
+ * represented by the provided {code inputDeviceId} does not have a
+ * {@link InputDevice.MotionRange} with the provided {@code axis} and {@code source}, the method
+ * returns {@code false}.
*
- * <p><b>source</b>: use {@link MotionEvent#getSource()} if calling this method in response to a
- * {@link MotionEvent}. Otherwise, use a valid source for the {@link InputDevice}. You can use
- * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
- * {@link InputDevice}, from which you can derive all the valid sources for the device.
+ * <p>If the provided input device ID, source, and motion axis are supported by this Android
+ * device, this method returns {@code true} only if the provided arguments are supported for
+ * scroll haptics. Otherwise, this method returns {@code false}.
*
* @param inputDeviceId the ID of the {@link InputDevice} that generated the motion that may
* produce scroll haptics.
* @param source the input source of the motion that may produce scroll haptics.
* @param axis the axis of the motion that may produce scroll haptics.
* @return {@code true} if motions generated by the provided input and motion configuration
- * should produce scroll haptics. {@code false} otherwise.
+ * can produce scroll haptics. {@code false} otherwise.
+ *
+ * @see #getHapticScrollFeedbackTickInterval(int, int, int)
+ * @see InputDevice#getMotionRanges()
+ * @see InputDevice#getMotionRange(int)
+ * @see InputDevice#getMotionRange(int, int)
*/
@FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
- public boolean isHapticScrollFeedbackEnabled(int inputDeviceId, int axis, int source) {
+ public boolean isHapticScrollFeedbackEnabled(
+ int inputDeviceId,
+ @HapticScrollFeedbackProvider.HapticScrollFeedbackAxis int axis,
+ int source) {
if (!isInputDeviceInfoValid(inputDeviceId, axis, source)) return false;
- if (source == InputDevice.SOURCE_ROTARY_ENCODER) {
+ if (source == InputDevice.SOURCE_ROTARY_ENCODER && axis == MotionEvent.AXIS_SCROLL) {
return mRotaryEncoderHapticScrollFeedbackEnabled;
}
@@ -1285,9 +1288,14 @@ public class ViewConfiguration {
* configuration. If scroll haptics is disabled for the given configuration, or if the
* device does not support scroll tick haptics for the given configuration, this method
* returns {@code Integer.MAX_VALUE}.
+ *
+ * @see #isHapticScrollFeedbackEnabled(int, int, int)
*/
@FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
- public int getHapticScrollFeedbackTickInterval(int inputDeviceId, int axis, int source) {
+ public int getHapticScrollFeedbackTickInterval(
+ int inputDeviceId,
+ @HapticScrollFeedbackProvider.HapticScrollFeedbackAxis int axis,
+ int source) {
if (!mRotaryEncoderHapticScrollFeedbackEnabled) {
return NO_HAPTIC_SCROLL_TICK_INTERVAL;
}
@@ -1296,7 +1304,7 @@ public class ViewConfiguration {
return NO_HAPTIC_SCROLL_TICK_INTERVAL;
}
- if (source == InputDevice.SOURCE_ROTARY_ENCODER) {
+ if (source == InputDevice.SOURCE_ROTARY_ENCODER && axis == MotionEvent.AXIS_SCROLL) {
return mRotaryEncoderHapticScrollFeedbackTickIntervalPixels;
}
diff --git a/core/java/android/view/ViewTreeObserver.java b/core/java/android/view/ViewTreeObserver.java
index 9e8ca20ac42f..c9526fde27df 100644
--- a/core/java/android/view/ViewTreeObserver.java
+++ b/core/java/android/view/ViewTreeObserver.java
@@ -315,15 +315,6 @@ public final class ViewTreeObserver {
}
@Override
- public String toString() {
- return "InternalInsetsInfo{contentInsets=" + contentInsets
- + " visibleInsets=" + visibleInsets
- + " touchableRegion=" + touchableRegion.getBounds()
- + "}";
-
- }
-
- @Override
public int hashCode() {
int result = contentInsets.hashCode();
result = 31 * result + visibleInsets.hashCode();
diff --git a/core/java/android/view/inputmethod/TEST_MAPPING b/core/java/android/view/inputmethod/TEST_MAPPING
index 4b2ea1a096c8..ad59463ea1f1 100644
--- a/core/java/android/view/inputmethod/TEST_MAPPING
+++ b/core/java/android/view/inputmethod/TEST_MAPPING
@@ -11,6 +11,9 @@
},
{
"exclude-annotation": "android.platform.test.annotations.AppModeFull"
+ },
+ {
+ "exclude-annotation": "androidx.test.filters.LargeTest"
}
]
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index a1165423be8e..26ceea6d1e4c 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4520,7 +4520,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (!trackMotionScroll(delta, delta)) {
if (Flags.platformWidgetHapticScrollFeedback()) {
initHapticScrollFeedbackProviderIfNotExists();
- mHapticScrollFeedbackProvider.onScrollProgress(event, axis, delta);
+ mHapticScrollFeedbackProvider.onScrollProgress(
+ event.getDeviceId(), event.getSource(), axis, delta);
}
initDifferentialFlingHelperIfNotExists();
mDifferentialMotionFlingHelper.onMotionEvent(event, axis);
@@ -4536,7 +4537,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (Flags.platformWidgetHapticScrollFeedback()) {
initHapticScrollFeedbackProviderIfNotExists();
mHapticScrollFeedbackProvider.onScrollLimit(
- event, axis, /* isStart= */ hitTopLimit);
+ event.getDeviceId(), event.getSource(), axis,
+ /* isStart= */ hitTopLimit);
}
if (hitTopLimit) {
mEdgeGlowTop.onPullDistance(overscroll, 0.5f);
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 90b077b21d85..e0e72ba1b9db 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -1014,12 +1014,14 @@ public class ScrollView extends FrameLayout {
if (Flags.platformWidgetHapticScrollFeedback()) {
initHapticScrollFeedbackProviderIfNotExists();
mHapticScrollFeedbackProvider.onScrollLimit(
- event, axis, /* isStart= */ newScrollY == 0);
+ event.getDeviceId(), event.getSource(), axis,
+ /* isStart= */ newScrollY == 0);
}
} else {
if (Flags.platformWidgetHapticScrollFeedback()) {
initHapticScrollFeedbackProviderIfNotExists();
- mHapticScrollFeedbackProvider.onScrollProgress(event, axis, delta);
+ mHapticScrollFeedbackProvider.onScrollProgress(
+ event.getDeviceId(), event.getSource(), axis, delta);
}
initDifferentialFlingHelperIfNotExists();
mDifferentialMotionFlingHelper.onMotionEvent(event, axis);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f6b337c58aa1..59344b00e79a 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -27,12 +27,14 @@ import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_C
import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX;
import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY;
import static android.view.inputmethod.CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
+import static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
import android.R;
import android.annotation.CallSuper;
import android.annotation.CheckResult;
import android.annotation.ColorInt;
import android.annotation.DrawableRes;
+import android.annotation.FlaggedApi;
import android.annotation.FloatRange;
import android.annotation.IntDef;
import android.annotation.IntRange;
@@ -238,6 +240,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastMath;
import com.android.internal.util.Preconditions;
+import com.android.text.flags.Flags;
import libcore.util.EmptyArray;
@@ -523,6 +526,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
@EnabledSince(targetSdkVersion = Build.VERSION_CODES.P)
public static final long STATICLAYOUT_FALLBACK_LINESPACING = 37756858; // buganizer id
+
+ /**
+ * This change ID enables the bounding box based layout.
+ * @hide
+ */
+ @ChangeId
+ @EnabledSince(targetSdkVersion = VERSION_CODES.VANILLA_ICE_CREAM)
+ public static final long USE_BOUNDS_FOR_WIDTH = 63938206; // buganizer id
+
// System wide time for last cut, copy or text changed action.
static long sLastCutCopyOrTextChangedTime;
@@ -1621,7 +1633,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mUseFallbackLineSpacing = FALLBACK_LINE_SPACING_NONE;
}
- mUseBoundsForWidth = false; // TODO: Make enable this by default.
+ if (CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH)) {
+ mUseBoundsForWidth = Flags.useBoundsForWidth();
+ } else {
+ mUseBoundsForWidth = false;
+ }
// TODO(b/179693024): Use a ChangeId instead.
mUseTextPaddingForUiTranslation = targetSdkVersion <= Build.VERSION_CODES.R;
@@ -4848,6 +4864,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* width.
* @see #getUseBoundsForWidth()
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public void setUseBoundsForWidth(boolean useBoundsForWidth) {
if (mUseBoundsForWidth != useBoundsForWidth) {
mUseBoundsForWidth = useBoundsForWidth;
@@ -4865,6 +4882,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @see #setUseBoundsForWidth(boolean)
* @return True if using bounding box for width, false if using advance for width.
*/
+ @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
public boolean getUseBoundsForWidth() {
return mUseBoundsForWidth;
}
diff --git a/core/java/android/widget/ToastPresenter.java b/core/java/android/widget/ToastPresenter.java
index 89271b5cc51f..6884e639f9c7 100644
--- a/core/java/android/widget/ToastPresenter.java
+++ b/core/java/android/widget/ToastPresenter.java
@@ -89,9 +89,10 @@ public class ToastPresenter {
return view;
}
+ private final WeakReference<Context> mContext;
private final Resources mResources;
private final WeakReference<WindowManager> mWindowManager;
- private final WeakReference<AccessibilityManager> mAccessibilityManager;
+ private final IAccessibilityManager mAccessibilityManagerService;
private final INotificationManager mNotificationManager;
private final String mPackageName;
private final String mContextPackageName;
@@ -101,21 +102,14 @@ public class ToastPresenter {
public ToastPresenter(Context context, IAccessibilityManager accessibilityManager,
INotificationManager notificationManager, String packageName) {
+ mContext = new WeakReference<>(context);
mResources = context.getResources();
mWindowManager = new WeakReference<>(context.getSystemService(WindowManager.class));
mNotificationManager = notificationManager;
mPackageName = packageName;
mContextPackageName = context.getPackageName();
mParams = createLayoutParams();
-
- // We obtain AccessibilityManager manually via its constructor instead of using method
- // AccessibilityManager.getInstance() for 2 reasons:
- // 1. We want to be able to inject IAccessibilityManager in tests to verify behavior.
- // 2. getInstance() caches the instance for the process even if we pass a different
- // context to it. This is problematic for multi-user because callers can pass a context
- // created via Context.createContextAsUser().
- mAccessibilityManager = new WeakReference<>(
- new AccessibilityManager(context, accessibilityManager, context.getUserId()));
+ mAccessibilityManagerService = accessibilityManager;
}
public String getPackageName() {
@@ -306,11 +300,20 @@ public class ToastPresenter {
* enabled.
*/
public void trySendAccessibilityEvent(View view, String packageName) {
- final AccessibilityManager accessibilityManager = mAccessibilityManager.get();
- if (accessibilityManager == null) {
+ final Context context = mContext.get();
+ if (context == null) {
return;
}
+ // We obtain AccessibilityManager manually via its constructor instead of using method
+ // AccessibilityManager.getInstance() for 2 reasons:
+ // 1. We want to be able to inject IAccessibilityManager in tests to verify behavior.
+ // 2. getInstance() caches the instance for the process even if we pass a different
+ // context to it. This is problematic for multi-user because callers can pass a context
+ // created via Context.createContextAsUser().
+ final AccessibilityManager accessibilityManager = new AccessibilityManager(context,
+ mAccessibilityManagerService, context.getUserId());
+
if (!accessibilityManager.isEnabled()) {
accessibilityManager.removeClient();
return;
diff --git a/core/java/android/widget/inline/TEST_MAPPING b/core/java/android/widget/inline/TEST_MAPPING
index 26a556906dd1..82c6f61c3486 100644
--- a/core/java/android/widget/inline/TEST_MAPPING
+++ b/core/java/android/widget/inline/TEST_MAPPING
@@ -8,6 +8,9 @@
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
+ },
+ {
+ "exclude-annotation": "androidx.test.filters.LargeTest"
}
]
}
diff --git a/core/java/android/window/flags/windowing_frontend.aconfig b/core/java/android/window/flags/windowing_frontend.aconfig
new file mode 100644
index 000000000000..7a4c5bc669fc
--- /dev/null
+++ b/core/java/android/window/flags/windowing_frontend.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.window.flags"
+
+flag {
+ name: "nav_bar_transparent_by_default"
+ namespace: "windowing_frontend"
+ description: "Make nav bar color transparent by default when targeting SDK 35 or greater"
+ bug: "232195501"
+}
diff --git a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
index 5e2eceb23789..dee49350d93e 100644
--- a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
@@ -177,7 +177,7 @@ public abstract class AbstractMultiProfilePagerAdapter extends PagerAdapter {
* <code>1</code> would return the work profile {@link ProfileDescriptor}.</li>
* </ul>
*/
- abstract ProfileDescriptor getItem(int pageIndex);
+ public abstract ProfileDescriptor getItem(int pageIndex);
/**
* Returns the number of {@link ProfileDescriptor} objects.
@@ -438,8 +438,8 @@ public abstract class AbstractMultiProfilePagerAdapter extends PagerAdapter {
&& isQuietModeEnabled(mWorkProfileUserHandle));
}
- protected class ProfileDescriptor {
- final ViewGroup rootView;
+ public static class ProfileDescriptor {
+ public final ViewGroup rootView;
private final ViewGroup mEmptyStateView;
ProfileDescriptor(ViewGroup rootView) {
this.rootView = rootView;
diff --git a/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java b/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
index b9f02365bbe7..d2fdc65b2c36 100644
--- a/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
+++ b/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
@@ -61,6 +61,8 @@ class AppPredictionServiceResolverComparator extends AbstractResolverComparator
private final ModelBuilder mModelBuilder;
private ResolverComparatorModel mComparatorModel;
+ private ResolverAppPredictorCallback mSortingCallback;
+
// If this is non-null (and this is not destroyed), it means APS is disabled and we should fall
// back to using the ResolverRankerService.
// TODO: responsibility for this fallback behavior can live outside of the AppPrediction client.
@@ -94,6 +96,9 @@ class AppPredictionServiceResolverComparator extends AbstractResolverComparator
// TODO: may not be necessary to build a new model, since we're destroying anyways.
mComparatorModel = mModelBuilder.buildFallbackModel(mResolverRankerService);
}
+ if (mSortingCallback != null) {
+ mSortingCallback.destroy();
+ }
}
@Override
@@ -140,22 +145,27 @@ class AppPredictionServiceResolverComparator extends AbstractResolverComparator
.setClassName(target.name.getClassName())
.build());
}
+
+ if (mSortingCallback != null) {
+ mSortingCallback.destroy();
+ }
+ mSortingCallback = new ResolverAppPredictorCallback(sortedAppTargets -> {
+ if (sortedAppTargets.isEmpty()) {
+ Log.i(TAG, "AppPredictionService disabled. Using resolver.");
+ setupFallbackModel(targets);
+ } else {
+ Log.i(TAG, "AppPredictionService response received");
+ // Skip sending to Handler which takes extra time to dispatch messages.
+ // TODO: the Handler guards some concurrency conditions, so this could
+ // probably result in a race (we're not currently on the Handler thread?).
+ // We'll leave this as-is since we intend to remove the Handler design
+ // shortly, but this is still an unsound shortcut.
+ handleResult(sortedAppTargets);
+ }
+ });
+
mAppPredictor.sortTargets(appTargets, Executors.newSingleThreadExecutor(),
- sortedAppTargets -> {
- if (sortedAppTargets.isEmpty()) {
- Log.i(TAG, "AppPredictionService disabled. Using resolver.");
- setupFallbackModel(targets);
- } else {
- Log.i(TAG, "AppPredictionService response received");
- // Skip sending to Handler which takes extra time to dispatch messages.
- // TODO: the Handler guards some concurrency conditions, so this could
- // probably result in a race (we're not currently on the Handler thread?).
- // We'll leave this as-is since we intend to remove the Handler design
- // shortly, but this is still an unsound shortcut.
- handleResult(sortedAppTargets);
- }
- }
- );
+ mSortingCallback.asConsumer());
}
private void setupFallbackModel(List<ResolvedComponentInfo> targets) {
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 2b39bb4eb7a5..6d8512c9d07c 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -24,9 +24,7 @@ import static android.app.admin.DevicePolicyResources.Strings.Core.RESOLVER_CROS
import static android.content.ContentProvider.getUserIdFromUri;
import static android.stats.devicepolicy.DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_SHARING_TO_PERSONAL;
import static android.stats.devicepolicy.DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_SHARING_TO_WORK;
-
import static com.android.internal.util.LatencyTracker.ACTION_LOAD_SHARE_SHEET;
-
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.animation.Animator;
@@ -777,9 +775,9 @@ public class ChooserActivity extends ResolverActivity implements
return appPredictor;
}
- private AppPredictor.Callback createAppPredictorCallback(
+ private ResolverAppPredictorCallback createAppPredictorCallback(
ChooserListAdapter chooserListAdapter) {
- return resultList -> {
+ return new ResolverAppPredictorCallback(resultList -> {
if (isFinishing() || isDestroyed()) {
return;
}
@@ -811,7 +809,7 @@ public class ChooserActivity extends ResolverActivity implements
}
sendShareShortcutInfoList(shareShortcutInfos, chooserListAdapter, resultList,
chooserListAdapter.getUserHandle());
- };
+ });
}
static SharedPreferences getPinnedSharedPrefs(Context context) {
@@ -2559,10 +2557,13 @@ public class ChooserActivity extends ResolverActivity implements
boolean filterLastUsed, UserHandle userHandle) {
ChooserListAdapter chooserListAdapter = createChooserListAdapter(context, payloadIntents,
initialIntents, rList, filterLastUsed, userHandle);
- AppPredictor.Callback appPredictorCallback = createAppPredictorCallback(chooserListAdapter);
+ ResolverAppPredictorCallback appPredictorCallbackWrapper =
+ createAppPredictorCallback(chooserListAdapter);
+ AppPredictor.Callback appPredictorCallback = appPredictorCallbackWrapper.asCallback();
AppPredictor appPredictor = setupAppPredictorForUser(userHandle, appPredictorCallback);
chooserListAdapter.setAppPredictor(appPredictor);
- chooserListAdapter.setAppPredictorCallback(appPredictorCallback);
+ chooserListAdapter.setAppPredictorCallback(
+ appPredictorCallback, appPredictorCallbackWrapper);
return new ChooserGridAdapter(chooserListAdapter);
}
diff --git a/core/java/com/android/internal/app/ChooserListAdapter.java b/core/java/com/android/internal/app/ChooserListAdapter.java
index 1eecb413adcb..f77e71863125 100644
--- a/core/java/com/android/internal/app/ChooserListAdapter.java
+++ b/core/java/com/android/internal/app/ChooserListAdapter.java
@@ -103,6 +103,7 @@ public class ChooserListAdapter extends ResolverListAdapter {
// Sorted list of DisplayResolveInfos for the alphabetical app section.
private List<DisplayResolveInfo> mSortedList = new ArrayList<>();
private AppPredictor mAppPredictor;
+ private ResolverAppPredictorCallback mAppPredictorCallbackWrapper;
private AppPredictor.Callback mAppPredictorCallback;
// Represents the UserSpace in which the Initial Intents should be resolved.
@@ -747,8 +748,11 @@ public class ChooserListAdapter extends ResolverListAdapter {
mAppPredictor = appPredictor;
}
- public void setAppPredictorCallback(AppPredictor.Callback appPredictorCallback) {
+ public void setAppPredictorCallback(
+ AppPredictor.Callback appPredictorCallback,
+ ResolverAppPredictorCallback appPredictorCallbackWrapper) {
mAppPredictorCallback = appPredictorCallback;
+ mAppPredictorCallbackWrapper = appPredictorCallbackWrapper;
}
public void destroyAppPredictor() {
@@ -757,6 +761,10 @@ public class ChooserListAdapter extends ResolverListAdapter {
getAppPredictor().destroy();
setAppPredictor(null);
}
+
+ if (mAppPredictorCallbackWrapper != null) {
+ mAppPredictorCallbackWrapper.destroy();
+ }
}
/**
diff --git a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
index 7beb059fb648..8197e265ca29 100644
--- a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
@@ -94,7 +94,7 @@ public class ChooserMultiProfilePagerAdapter extends AbstractMultiProfilePagerAd
}
@Override
- ChooserProfileDescriptor getItem(int pageIndex) {
+ public ChooserProfileDescriptor getItem(int pageIndex) {
return mItems[pageIndex];
}
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index ac15f11ee989..7534d2960b7c 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -2623,13 +2623,13 @@ public class ResolverActivity extends Activity implements
* An a11y delegate that expands resolver drawer when gesture navigation reaches a partially
* invisible target in the list.
*/
- private static class AppListAccessibilityDelegate extends View.AccessibilityDelegate {
+ public static class AppListAccessibilityDelegate extends View.AccessibilityDelegate {
private final ResolverDrawerLayout mDrawer;
@Nullable
private final View mBottomBar;
private final Rect mRect = new Rect();
- private AppListAccessibilityDelegate(ResolverDrawerLayout drawer) {
+ public AppListAccessibilityDelegate(ResolverDrawerLayout drawer) {
mDrawer = drawer;
mBottomBar = mDrawer.findViewById(R.id.button_bar_container);
}
diff --git a/core/java/com/android/internal/app/ResolverAppPredictorCallback.java b/core/java/com/android/internal/app/ResolverAppPredictorCallback.java
new file mode 100644
index 000000000000..c35e536275f0
--- /dev/null
+++ b/core/java/com/android/internal/app/ResolverAppPredictorCallback.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.internal.app;
+
+import android.app.prediction.AppPredictor;
+import android.app.prediction.AppTarget;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Consumer;
+
+/**
+ * Callback wrapper that works around potential memory leaks in app predictor.
+ *
+ * Nulls the callback itself when destroyed, so at worst you'll leak just this object.
+ */
+public class ResolverAppPredictorCallback {
+ private volatile Consumer<List<AppTarget>> mCallback;
+
+ public ResolverAppPredictorCallback(Consumer<List<AppTarget>> callback) {
+ mCallback = callback;
+ }
+
+ private void notifyCallback(List<AppTarget> list) {
+ Consumer<List<AppTarget>> callback = mCallback;
+ if (callback != null) {
+ callback.accept(Objects.requireNonNullElseGet(list, List::of));
+ }
+ }
+
+ public Consumer<List<AppTarget>> asConsumer() {
+ return this::notifyCallback;
+ }
+
+ public AppPredictor.Callback asCallback() {
+ return this::notifyCallback;
+ }
+
+ public void destroy() {
+ mCallback = null;
+ }
+}
diff --git a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
index 767791263673..031f9d3168bf 100644
--- a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
@@ -79,7 +79,7 @@ public class ResolverMultiProfilePagerAdapter extends AbstractMultiProfilePagerA
}
@Override
- ResolverProfileDescriptor getItem(int pageIndex) {
+ public ResolverProfileDescriptor getItem(int pageIndex) {
return mItems[pageIndex];
}
diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java
index 1ed06b4eac3e..1bfb51cc4b82 100644
--- a/core/java/com/android/internal/jank/InteractionJankMonitor.java
+++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java
@@ -70,7 +70,6 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_DIALOG_OPEN;
-import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_DISAPPEAR;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_ADD;
@@ -269,7 +268,6 @@ public class InteractionJankMonitor {
* eg: Exit the app using back gesture.
*/
public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK = 78;
- public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR = 79;
public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80;
public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81;
@@ -364,7 +362,7 @@ public class InteractionJankMonitor {
CUJ_TO_STATSD_INTERACTION_TYPE[76] = NO_STATSD_LOGGING;
CUJ_TO_STATSD_INTERACTION_TYPE[77] = NO_STATSD_LOGGING;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK;
- CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_EXPAND_FROM_STATUS_BAR] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR;
+ CUJ_TO_STATSD_INTERACTION_TYPE[79] = NO_STATSD_LOGGING; // This is deprecated.
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
@@ -467,7 +465,6 @@ public class InteractionJankMonitor {
CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION,
CUJ_LAUNCHER_OPEN_SEARCH_RESULT,
CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK,
- CUJ_SHADE_EXPAND_FROM_STATUS_BAR,
CUJ_IME_INSETS_SHOW_ANIMATION,
CUJ_IME_INSETS_HIDE_ANIMATION,
CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER,
@@ -1082,8 +1079,6 @@ public class InteractionJankMonitor {
return "LAUNCHER_OPEN_SEARCH_RESULT";
case CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK:
return "LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK";
- case CUJ_SHADE_EXPAND_FROM_STATUS_BAR:
- return "SHADE_EXPAND_FROM_STATUS_BAR";
case CUJ_IME_INSETS_SHOW_ANIMATION:
return "IME_INSETS_SHOW_ANIMATION";
case CUJ_IME_INSETS_HIDE_ANIMATION:
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 9d661746b12a..1be916f44f5b 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1123,7 +1123,6 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
final Insets systemInsets = clearsCompatInsets
? Insets.NONE
: Insets.min(insets.getInsets(compatInsetsTypes), stableBarInsets);
- Log.i("b/297000797", "DecorView#updateColorViews, systemInsets: " + systemInsets);
mLastTopInset = systemInsets.top;
mLastBottomInset = systemInsets.bottom;
mLastRightInset = systemInsets.right;
@@ -1161,7 +1160,9 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
mForceWindowDrawsBarBackgrounds, requestedVisibleTypes);
boolean oldDrawLegacy = mDrawLegacyNavigationBarBackground;
mDrawLegacyNavigationBarBackground =
- (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
+ ((requestedVisibleTypes | mLastForceConsumingTypes)
+ & WindowInsets.Type.navigationBars()) != 0
+ && (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
if (oldDrawLegacy != mDrawLegacyNavigationBarBackground) {
mDrawLegacyNavigationBarBackgroundHandled =
mWindow.onDrawLegacyNavigationBarBackgroundChanged(
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 9b9e010039a6..9b5a3f7ea77c 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -333,6 +333,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
private long mBackgroundFadeDurationMillis = -1;
private Boolean mSharedElementsUseOverlay;
+ private Boolean mAllowFloatingWindowsFillScreen;
+
private boolean mIsStartingWindow;
private int mTheme = -1;
@@ -361,6 +363,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
mRenderShadowsInCompositor = Settings.Global.getInt(context.getContentResolver(),
DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR, 1) != 0;
mProxyOnBackInvokedDispatcher = new ProxyOnBackInvokedDispatcher(context);
+ mAllowFloatingWindowsFillScreen = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_allowFloatingWindowsFillScreen);
}
/**
@@ -2422,7 +2426,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
mIsFloating = a.getBoolean(R.styleable.Window_windowIsFloating, false);
int flagsToUpdate = (FLAG_LAYOUT_IN_SCREEN|FLAG_LAYOUT_INSET_DECOR)
& (~getForcedWindowFlags());
- if (mIsFloating) {
+ if (mIsFloating && !mAllowFloatingWindowsFillScreen) {
setLayout(WRAP_CONTENT, WRAP_CONTENT);
setFlags(0, flagsToUpdate);
} else {
diff --git a/core/java/com/android/internal/policy/TransitionAnimation.java b/core/java/com/android/internal/policy/TransitionAnimation.java
index 483a184a7ba2..8f4df806296e 100644
--- a/core/java/com/android/internal/policy/TransitionAnimation.java
+++ b/core/java/com/android/internal/policy/TransitionAnimation.java
@@ -1304,8 +1304,9 @@ public class TransitionAnimation {
t.setBuffer(layer, buffer.getHardwareBuffer());
t.setDataSpace(layer, buffer.getColorSpace().getDataSpace());
// Avoid showing dimming effect for HDR content when running animations.
- // TODO(b/298219334): Only do this if we know we already dimmed in the screenshot
- t.setDimmingEnabled(layer, false);
+ if (buffer.containsHdrLayers()) {
+ t.setDimmingEnabled(layer, false);
+ }
}
/** Returns whether the hardware buffer passed in is marked as protected. */
diff --git a/core/java/com/android/internal/usb/DumpUtils.java b/core/java/com/android/internal/usb/DumpUtils.java
index f974d9d10efd..21c3e7b5c6b8 100644
--- a/core/java/com/android/internal/usb/DumpUtils.java
+++ b/core/java/com/android/internal/usb/DumpUtils.java
@@ -16,6 +16,7 @@
package com.android.internal.usb;
+import static android.hardware.usb.UsbPort.FLAG_ALT_MODE_TYPE_DISPLAYPORT;
import static android.hardware.usb.UsbPortStatus.MODE_AUDIO_ACCESSORY;
import static android.hardware.usb.UsbPortStatus.MODE_DEBUG_ACCESSORY;
import static android.hardware.usb.UsbPortStatus.MODE_DFP;
@@ -26,6 +27,7 @@ import static android.hardware.usb.UsbPortStatus.MODE_UFP;
import static com.android.internal.util.dump.DumpUtils.writeStringIfNotNull;
import android.annotation.NonNull;
+import android.hardware.usb.DisplayPortAltModeInfo;
import android.hardware.usb.UsbAccessory;
import android.hardware.usb.UsbConfiguration;
import android.hardware.usb.UsbDevice;
@@ -177,6 +179,10 @@ public class DumpUtils {
dump.write("supports_compliance_warnings",
UsbPortProto.SUPPORTS_COMPLIANCE_WARNINGS,
port.supportsComplianceWarnings());
+ if (port.isAltModeSupported(FLAG_ALT_MODE_TYPE_DISPLAYPORT)) {
+ dump.write("supported_alt_modes", UsbPortProto.SUPPORTED_ALT_MODES,
+ FLAG_ALT_MODE_TYPE_DISPLAYPORT);
+ }
dump.end(token);
}
@@ -255,6 +261,12 @@ public class DumpUtils {
UsbPort.powerBrickConnectionStatusToString(status.getPowerBrickConnectionStatus()));
dump.write("compliance_warning_status", UsbPortStatusProto.COMPLIANCE_WARNINGS_STRING,
UsbPort.complianceWarningsToString(status.getComplianceWarnings()));
+ DisplayPortAltModeInfo displayPortAltModeInfo = status.getDisplayPortAltModeInfo();
+ if (displayPortAltModeInfo != null) {
+ dump.write("displayport_alt_mode_status",
+ UsbPortStatusProto.DISPLAYPORT_ALT_MODE_STATUS,
+ status.getDisplayPortAltModeInfo().toString());
+ }
dump.end(token);
}
}
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index c368fa85c379..56066b2d813c 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -1806,15 +1806,10 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,
if (!is_system_server && getuid() == 0) {
const int rc = createProcessGroup(uid, getpid());
if (rc != 0) {
- if (rc == -ESRCH) {
- // If process is dead, treat this as a non-fatal error
- ALOGE("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc));
- } else {
- fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "
- "CONFIG_CGROUP_CPUACCT?")
- : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid,
- /* pid= */ 0, strerror(-rc)));
- }
+ fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "
+ "CONFIG_CGROUP_CPUACCT?")
+ : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid,
+ /* pid= */ 0, strerror(-rc)));
}
}
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
index 88893205c79e..49b8450fcc67 100644
--- a/core/proto/android/service/usb.proto
+++ b/core/proto/android/service/usb.proto
@@ -238,10 +238,15 @@ message UsbPortProto {
MODE_DEBUG_ACCESSORY = 8;
}
+ enum AltMode {
+ ALT_MODE_DISPLAYPORT = 1;
+ }
+
// ID of the port. A device (eg: Chromebooks) might have multiple ports.
optional string id = 1;
repeated Mode supported_modes = 2;
optional bool supports_compliance_warnings = 3;
+ repeated AltMode supported_alt_modes = 4;
}
message UsbPortStatusProto {
@@ -271,6 +276,7 @@ message UsbPortStatusProto {
optional bool is_power_transfer_limited = 8;
optional string usb_power_brick_status = 9;
optional string compliance_warnings_string = 10;
+ optional string displayport_alt_mode_status = 11;
}
message UsbPortStatusRoleCombinationProto {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 3180ffbef79d..d000b23bff64 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1699,6 +1699,15 @@
android:description="@string/permdesc_cameraOpenCloseListener"
android:protectionLevel="signature" />
+ <!-- @SystemApi Allows camera access by Headless System User 0 when device is running in
+ HSUM Mode.
+ @hide -->
+ <permission android:name="android.permission.CAMERA_HEADLESS_SYSTEM_USER"
+ android:permissionGroup="android.permission-group.UNDEFINED"
+ android:label="@string/permlab_cameraHeadlessSystemUser"
+ android:description="@string/permdesc_cameraHeadlessSystemUser"
+ android:protectionLevel="signature" />
+
<!-- ====================================================================== -->
<!-- Permissions for accessing the device sensors -->
<!-- ====================================================================== -->
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 8109e9ab4cae..8ffdba3e3f92 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2ኛ ሥራ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3ኛ ሥራ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>ን አባዛ"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"የግል <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ከመንቀል በፊት ፒን ጠይቅ"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ከመንቀል በፊት የማስከፈቻ ስርዓተ-ጥለት ጠይቅ"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ከመንቀል በፊት የይለፍ ቃል ጠይቅ"</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index f2aee4063cc9..0ca9ea235be8 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"২য় কার্য <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"৩য় কার্য <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"ক্ল’ন <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"ব্যক্তিগত <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"আনপিন কৰাৰ পূৰ্বে পিন দিবলৈ কওক"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"আনপিন কৰাৰ পূৰ্বে আনলক আৰ্হি দিবলৈ কওক"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"আনপিন কৰাৰ পূৰ্বে পাছৱৰ্ড দিবলৈ কওক"</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 592c3440c7e1..74ba52da3518 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -807,7 +807,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Dozvoljava vlasniku da ažurira aplikaciju koju je prethodno instalirala bez radnji korisnika"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Podešavanje pravila za lozinku"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Kontroliše dužinu i znakove dozvoljene u lozinkama i PIN-ovima za zaključavanje ekrana."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadgledajte pokušaje otključavanja ekrana"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadzor pokušaja otključavanja ekrana"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Prati broj netačno unetih lozinki prilikom otključavanja ekrana i zaključava tablet ili briše podatke sa tableta ako je netačna lozinka uneta previše puta."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Nadgleda broj netačnih lozinki unetih pri otključavanju ekrana i zaključava Android TV uređaj ili briše sve podatke sa Android TV uređaja ako se unese previše netačnih lozinki."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Prati broj netačno unetih lozinki pri otključavanju ekrana i zaključava sistem za info-zabavu ili briše sve podatke sa sistema za info-zabavu ako je netačna lozinka uneta previše puta."</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 4cd8aa589d65..3a79090ebf1c 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -812,7 +812,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Сачыць за колькасцю няправільных набраных пароляў падчас разблакоўкі экрана і блакаваць планшэт або сціраць усе дадзеныя на ім, калі няправільны пароль набраны занадта шмат разоў."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і заблакіраваць прыладу Android TV або сцерці ўсе даныя на прыладзе, калі няправільны пароль набраны занадта шмат разоў."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Падчас разблакіроўкі экрана сачыць за колькасцю няправільна набраных пароляў і, калі няправільны пароль набраны занадта шмат разоў, заблакіраваць інфармацыйна-забаўляльную сістэму ці сцерці ў ёй усе даныя."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Сачыць за колькасцю няправільных набраных пароляў падчас разблакоўкі экрана і блакаваць тяэлефон або сціраць усе дадзеныя на ім, калі набрана занадта шмат няправільных пароляў."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і блакіраваць тэлефон або сціраць усе даныя на ім, калі набрана занадта шмат няправільных пароляў."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і блакіраваць планшэт або сцерці ўсе даныя гэтага карыстальніка, калі няправільны пароль набраны занадта шмат разоў."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і заблакіраваць прыладу Android TV або сцерці ўсе даныя карыстальніка, калі няправільны пароль набраны занадта шмат разоў."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Падчас разблакіроўкі экрана сачыць за колькасцю няправільна набраных пароляў і, калі няправільны пароль набраны занадта шмат разоў, заблакіраваць інфармацыйна-забаўляльную сістэму ці сцерці ўсе даныя гэтага профілю."</string>
@@ -1869,8 +1869,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Другая праца <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Трэцяя праца <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Кланіраваць \"<xliff:g id="LABEL">%1$s</xliff:g>\""</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (прыватны профіль)"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Запытваць PIN-код перад адмацаваннем"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запытваць узор разблакіроўкі перад адмацаваннем"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запытваць пароль перад адмацаваннем"</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 1d1e29c9d517..f6f5b0eb38ad 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"দ্বিতীয় কার্যক্ষেত্র <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"তৃতীয় কার্যক্ষেত্র <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ক্লোন"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"ব্যক্তিগত <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"আনপিন করার আগে পিন চান"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"আনপিন করার আগে আনলক প্যাটার্ন চান"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"আনপিন করার আগে পাসওয়ার্ড চান"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 5ec91f5ebce8..010e22ce781d 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2n <xliff:g id="LABEL">%1$s</xliff:g> de la feina"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3r <xliff:g id="LABEL">%1$s</xliff:g> de la feina"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Clon de <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Sol·licita el PIN per deixar de fixar"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Sol·licita el patró de desbloqueig per deixar de fixar"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Demana la contrasenya per deixar de fixar"</string>
@@ -1891,8 +1890,8 @@
<string name="zen_mode_duration_hours" msgid="7841806065034711849">"{count,plural, =1{Durant 1 hora}many{Durant # hores}other{Durant # hores}}"</string>
<string name="zen_mode_duration_hours_short" msgid="3666949653933099065">"{count,plural, =1{Durant 1 h}many{Durant # h}other{Durant # h}}"</string>
<string name="zen_mode_until_next_day" msgid="1403042784161725038">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
- <string name="zen_mode_until" msgid="2250286190237669079">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
- <string name="zen_mode_alarm" msgid="7046911727540499275">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (propera alarma)"</string>
+ <string name="zen_mode_until" msgid="2250286190237669079">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+ <string name="zen_mode_alarm" msgid="7046911727540499275">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (propera alarma)"</string>
<string name="zen_mode_forever" msgid="740585666364912448">"Fins que no el desactivis"</string>
<string name="zen_mode_forever_dnd" msgid="3423201955704180067">"Fins que desactivis el mode No molestis"</string>
<string name="zen_mode_rule_name_combination" msgid="7174598364351313725">"<xliff:g id="FIRST">%1$s</xliff:g> / <xliff:g id="REST">%2$s</xliff:g>"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index ca2206c9be1d..e816391f44b4 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -672,12 +672,12 @@
<string name="device_unlock_notification_name" msgid="2632928999862915709">"Enhedsoplåsning"</string>
<string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prøv en anden metode til oplåsning"</string>
<string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Brug ansigtsoplåsning, hvis dit fingeraftryk ikke genkendes, f.eks. når du har våde fingre"</string>
- <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Brug oplåsning med fingeraftryk, hvis dit ansigt ikke genkendes, f.eks. når der ikke er nok lys"</string>
+ <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Brug fingeroplåsning, hvis dit ansigt ikke genkendes, f.eks. når der ikke er nok lys"</string>
<string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Ansigtsoplåsning"</string>
<string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Der er et problem med Ansigtsoplåsning"</string>
<string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Tryk for at slette din ansigtsmodel, og tilføj derefter dit ansigt igen"</string>
<string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Hvis du vil bruge ansigtsoplåsning, skal du aktivere "<b>"Kameraadgang"</b>" under Indstillinger &gt; Privatliv"</string>
- <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Oplåsning med fingeraftryk"</string>
+ <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Fingeroplåsning"</string>
<string name="fingerprint_recalibrate_notification_title" msgid="2406561052064558497">"Fingeraftrykssensoren kan ikke bruges"</string>
<string name="fingerprint_recalibrate_notification_content" msgid="8519935717822194943">"Få den repareret."</string>
<string name="face_acquired_insufficient" msgid="6889245852748492218">"Din ansigtsmodel kan ikke oprettes. Prøv igen."</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> til arbejde"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> til arbejde"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon af <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (privat)"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Bed om pinkode inden frigørelse"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Bed om oplåsningsmønster ved deaktivering"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Bed om adgangskode inden frigørelse"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index be511e8a7c32..3f960f70a800 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> (geschäftlich)"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> (geschäftlich)"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (privat)"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Vor dem Beenden nach PIN fragen"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Vor dem Beenden nach Entsperrungsmuster fragen"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Vor dem Beenden nach Passwort fragen"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index e0aeb31e721d..e61fe1a36211 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -672,8 +672,8 @@
<string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Ícono de huella dactilar"</string>
<string name="device_unlock_notification_name" msgid="2632928999862915709">"Desbloqueo del dispositivo"</string>
<string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prueba otra forma para desbloquear el dispositivo"</string>
- <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa la función de Desbloqueo facial cuando no se reconoce tu huella dactilar (por ejemplo cuando tienes los dedos mojados)"</string>
- <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa la función de Desbloqueo facial cuando no se reconoce tu rostro (por ejemplo cuando no hay suficiente luz)"</string>
+ <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa el Desbloqueo facial si no se reconoce tu huella dactilar (p. ej., si tienes los dedos mojados)"</string>
+ <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa el Desbloqueo con huellas dactilares si no se reconoce tu rostro (p. ej., si hay poca luz)"</string>
<string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Desbloqueo facial"</string>
<string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con el Desbloqueo facial"</string>
<string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Presiona para borrar el modelo de rostro y, luego, vuelve a agregar tu rostro"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 3bcc0f432a88..cbcf40306bd6 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -672,8 +672,8 @@
<string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icono de huella digital"</string>
<string name="device_unlock_notification_name" msgid="2632928999862915709">"Desbloqueo del dispositivo"</string>
<string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prueba otro método de desbloqueo"</string>
- <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa Desbloqueo facial cuando no se reconozca tu huella digital (por ejemplo, cuando tus dedos estén húmedos)"</string>
- <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa Desbloqueo con huella digital cuando no se reconozca tu cara (por ejemplo, cuando no haya suficiente luz)"</string>
+ <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa Desbloqueo facial cuando no se reconozca tu huella (p. ej., si tienes los dedos mojados)"</string>
+ <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa Desbloqueo con huella digital cuando no se reconozca tu cara (p. ej., si hay poca luz)"</string>
<string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Desbloqueo facial"</string>
<string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Desbloqueo facial"</string>
<string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Toca para eliminar tu modelo facial y luego añade de nuevo tu cara"</string>
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> de trabajo 2"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> de trabajo 3"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Clon de <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privado"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Solicitar PIN para desactivar"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pedir patrón de desbloqueo para dejar de fijar"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Solicitar contraseña para desactivar"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index d212946da95e..22600e527270 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -823,7 +823,7 @@
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Kustutage tahvelarvuti andmed hoiatamata, lähtestades arvuti tehaseandmetele."</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Kustutatakse teie Android TV seadme andmed ilma hoiatamata, lähtestades seadme tehase andmetele."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Teabe ja meelelahutuse süsteemi andmete hoiatamata kustutamine tehase andmetele lähtestamise abil."</string>
- <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Telefoniandmete hoiatuseta kustutamine, lähtestades telefoni tehaseseadetele."</string>
+ <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Kustutab telefoniandmed hoiatuseta, lähtestades telefoni tehaseseadetele."</string>
<string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Profiili andmete kustutamine"</string>
<string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Kasutaja andmete kustutamine"</string>
<string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Kustutatakse selle kasutaja andmed sellest tahvelarvutist ilma hoiatamata."</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 302acb04d085..019296d2bec0 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Laneko 2. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Laneko 3. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> aplikazioaren klona"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> pribatua"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Eskatu PINa aingura kendu aurretik"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Eskatu desblokeatzeko eredua aingura kendu aurretik"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Eskatu pasahitza aingura kendu aurretik"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 7947b6ea6e8b..6210b62a2915 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"کار دوم <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"کار سوم <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"همسانه <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"«<xliff:g id="LABEL">%1$s</xliff:g>» خصوصی"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"درخواست کد پین قبل از برداشتن پین"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"درخواست الگوی بازگشایی قفل قبل‌از برداشتن سنجاق"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"درخواست گذرواژه قبل از برداشتن سنجاق"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 3b5c86e9f37d..ef09aee19b31 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Toinen <xliff:g id="LABEL">%1$s</xliff:g>, työ"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Kolmas <xliff:g id="LABEL">%1$s</xliff:g>, työ"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Kloonaa <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Yksityinen <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pyydä PIN ennen irrotusta"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pyydä lukituksenpoistokuvio ennen irrotusta"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pyydä salasana ennen irrotusta"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 782ccd0e45ce..d38f65651bba 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -319,7 +319,7 @@
<string name="permgroupdesc_microphone" msgid="1047786732792487722">"enregistrer des fichiers audio"</string>
<string name="permgrouplab_activityRecognition" msgid="3324466667921775766">"Activité physique"</string>
<string name="permgroupdesc_activityRecognition" msgid="4725624819457670704">"accéder à vos activités physiques"</string>
- <string name="permgrouplab_camera" msgid="9090413408963547706">"appareil photo"</string>
+ <string name="permgrouplab_camera" msgid="9090413408963547706">"Appareil photo"</string>
<string name="permgroupdesc_camera" msgid="7585150538459320326">"prendre des photos et filmer des vidéos"</string>
<string name="permgrouplab_nearby_devices" msgid="5529147543651181991">"Appareils à proximité"</string>
<string name="permgroupdesc_nearby_devices" msgid="3213561597116913508">"découvrir les appareils à proximité et s\'y connecter"</string>
@@ -672,8 +672,8 @@
<string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icône d\'empreinte digitale"</string>
<string name="device_unlock_notification_name" msgid="2632928999862915709">"Déverrouillage de l\'appareil"</string>
<string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Essayez une autre façon de déverrouiller"</string>
- <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Utilisez Déverrouillage par reconnaissance faciale lorsque votre empreinte digitale n\'est pas reconnue, par exemple lorsque vos doigts sont mouillés"</string>
- <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Utilisez Déverrouillage par empreinte digitale lorsque votre visage n\'est pas reconnu, par exemple lorsque la luminosité est insuffisante"</string>
+ <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Utilisez le Déverrouillage par reconnaissance faciale lorsque votre empreinte digitale n\'est pas reconnue, par exemple lorsque vos doigts sont mouillés"</string>
+ <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Utilisez le Déverrouillage par empreinte digitale lorsque votre visage n\'est pas reconnu, par exemple lorsque la luminosité est insuffisante"</string>
<string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Déverrouillage par reconnaissance faciale"</string>
<string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problème avec la fonctionnalité de déverrouillage par reconnaissance faciale"</string>
<string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Touchez pour supprimer votre modèle facial, puis ajoutez votre visage de nouveau"</string>
@@ -811,7 +811,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Contrôler le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran, puis verrouiller la tablette ou effacer toutes ses données si le nombre maximal de tentatives de saisie du mot de passe est atteint"</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez votre appareil Android TV ou effacez toutes les données qu\'il contient en cas d\'un nombre trop élevé de tentatives."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez le système d\'infodivertissement ou effacez toutes ses données en cas d\'un nombre trop élevé de tentatives."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Contrôler le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran, puis verrouille le téléphone ou efface toutes ses données si le nombre maximal de tentatives de saisie du mot de passe est atteint."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran est contrôlé. Si le nombre maximal de tentatives de saisie du mot de passe est atteint, le téléphone est verrouillé ou toutes ses données sont effacées."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Surveille le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouille la tablette ou efface toutes les données de l\'utilisateur en cas d\'un nombre trop élevé de tentatives."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez votre appareil Android TV ou effacez toutes les données de l\'utilisateur en cas d\'un nombre trop élevé de tentatives."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez le système d\'infodivertissement ou effacez toutes les données de ce profil en cas d\'un nombre trop élevé de tentatives."</string>
@@ -824,7 +824,7 @@
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Effacer les données de la tablette sans avertissement, en rétablissant les paramètres par défaut"</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Effacez les données de votre appareil Android TV sans avertissement en effectuant une réinitialisation des paramètres d\'usine."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Effacez les données du système d\'infodivertissement sans avertissement en rétablissant les paramètres par défaut."</string>
- <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Effacer les données du téléphone sans avertissement en rétablissant les paramètres par défaut."</string>
+ <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Les données du téléphone sont effacées sans avertissement en rétablissant les paramètres par défaut."</string>
<string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Effacer les données de profil"</string>
<string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Effacer les données de l\'utilisateur"</string>
<string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Effacer les données de l\'utilisateur sur cette tablette sans avertissement."</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b5ea2e2d8681..1049d49468f4 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2e <xliff:g id="LABEL">%1$s</xliff:g> professionnelle"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3e <xliff:g id="LABEL">%1$s</xliff:g> professionnelle"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Cloner <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privé"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Demander le code avant de retirer l\'épingle"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Demander le schéma de déverrouillage avant de retirer l\'épingle"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Demander le mot de passe avant de retirer l\'épingle"</string>
@@ -2132,7 +2131,7 @@
<string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Le Bluetooth restera activé en mode Avion"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"Chargement…"</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_no_direct_share_targets" msgid="1511722103987329028">"Aucun destinataire recommandé"</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 reçu l\'autorisation d\'enregistrer des contenus audio, mais peut le faire via ce périphérique USB."</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Accueil"</string>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index ea3f104d0d12..1b8a8fd9ec58 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2.º <xliff:g id="LABEL">%1$s</xliff:g> do traballo"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3.º <xliff:g id="LABEL">%1$s</xliff:g> do traballo"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Clonar <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privado"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pedir PIN antes de soltar a fixación"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pedir padrón de desbloqueo antes de soltar a fixación"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pedir contrasinal antes de soltar a fixación"</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 0a42b241e255..9ad7ff19b712 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2જું કાર્ય <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3જું કાર્ય <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>ની ક્લોન"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"ખાનગી <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"અનપિન કરતા પહેલાં પિન માટે પૂછો"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"અનપિન કરતા પહેલાં અનલૉક પૅટર્ન માટે પૂછો"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"અનપિન કરતાં પહેલાં પાસવર્ડ માટે પૂછો"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 8a383a1bd5e2..2cd150963695 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -806,11 +806,11 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"इससे होल्डर उस ऐप्लिकेशन को अपने-आप अपडेट कर पाएगा जो उसने पहले इंस्टॉल किया था"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियम सेट करना"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"स्‍क्रीन लॉक पासवर्ड और पिन की लंबाई और उनमें स्वीकृत वर्णों को नियंत्रित करना."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"स्‍क्रीन अनलॉक करने के की कोशिशों पर नज़र रखना"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"स्‍क्रीन अनलॉक करने की कोशिशों पर नज़र रखना"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"स्‍क्रीन को अनलॉक करते समय गलत लिखे गए पासवर्ड की संख्‍या पर निगरानी करें, और बहुत ज़्यादा बार गलत पासवर्ड लिखे जाने पर टैबलेट लॉक करें या टैबलेट का संपूर्ण डेटा मिटाएं."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने Android TV डिवाइस को तुरंत लॉक करें या इसका सभी डेटा मिटाएं."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो सूचना और मनोरंजन की सुविधा देने वाले डिवाइस को लॉक करें या इस डिवाइस का सारा डेटा मिटाएं."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन को अनलॉक करते समय जितनी बार गलत पासवर्ड लिखा गया है, उसकी संख्या पर नज़र रखना और अगर बहुत बार गलत पासवर्ड डाले गए हैं, तो फ़ोन को लॉक कर देना या फ़ोन का सारा डेटा मिटा देना."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने फ़ोन को तुरंत लॉक करें या फ़ोन का सारा डेटा मिटा दें."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"स्‍क्रीन का लॉक खोलते समय गलत तरीके से लिखे गए पासवर्ड पर नज़र रखें, और अगर बार-बार ज़्यादा पासवर्ड लिखे जाते हैं तो टैबलेट को लॉक करें या इस उपयोगकर्ता का सभी डेटा मिटा दें."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने Android TV डिवाइस को तुरंत लॉक करें या इस उपयोगकर्ता का सभी डेटा मिटाएं."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो सूचना और मनोरंजन की सुविधा देने वाले डिवाइस को लॉक करें या इस प्रोफ़ाइल का सारा डेटा मिटाएं."</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"दूसरा काम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"तीसरा काम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> का क्लोन"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"निजी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन करने से पहले पिन के लिए पूछें"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन करने से पहले लॉक खोलने के पैटर्न के लिए पूछें"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"अनपिन करने से पहले पासवर्ड के लिए पूछें"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index d7f5b4ac1b00..4a9dbf534771 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -807,7 +807,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Nositelju omogućuje ažuriranje aplikacije koju je prethodno instalirao bez radnje korisnika"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Postavi pravila zaporke"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Upravlja duljinom i znakovima koji su dopušteni u zaporkama i PIN-ovima zaključavanja zaslona."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadziri pokušaje otključavanja zaslona"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadzor pokušaja otključavanja zaslona"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Nadziri broj netočnih zaporki unesenih pri otključavanju zaslona i zaključaj tabletno računalo ili izbriši sve podatke na njemu ako je uneseno previše netočnih zaporki."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Prati broj netočnih zaporki unesenih prilikom otključavanja zaslona i zaključava Android TV uređaj ili s njega briše sve podatke ako se unese previše netočnih zaporki."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Prati broj netočnih zaporki unesenih prilikom otključavanja zaslona i zaključava sustav za informiranje i zabavu ili briše sve njegove podatke ako se unese previše netočnih zaporki."</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 59827cb558b8..9190a6382c4b 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-րդ աշխատանք <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-րդ աշխատանք <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>-ի կլոն"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Անձնական <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Հարցնել PIN կոդը"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Հարցնել ապակողպող նախշը"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Հարցնել գաղտնաբառը"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 8603809903ae..3417c2af249f 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -806,7 +806,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Mengizinkan pemegang mengupdate aplikasi yang sebelumnya diinstal tanpa tindakan pengguna"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Setel aturan sandi"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Mengontrol panjang dan karakter yang diizinkan dalam sandi dan PIN kunci layar."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Pantau upaya pembukaan kunci layar"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Memantau upaya pembukaan kunci layar"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Memantau berapa kali sandi yang dimasukkan salah saat ingin membuka kunci layar, dan mengunci tablet atau menghapus semua data tablet jika terjadi terlalu banyak kesalahan memasukkan sandi."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Memantau banyaknya sandi salah yang diketikkan saat membuka kunci layar, dan mengunci perangkat Android TV atau menghapus semua data perangkat Android TV jika terlalu banyak sandi salah diketikkan."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Memantau berapa kali sandi yang dimasukkan salah saat ingin membuka kunci layar, dan mengunci sistem infotainmen atau menghapus semua data sistem infotainmen jika terlalu banyak kesalahan memasukkan sandi."</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index 7420a2511960..7b2bf029a23a 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> í vinnu (2)"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> í vinnu (3)"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Afrit af <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Lokað: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Biðja um PIN-númer til að losa"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Biðja um opnunarmynstur til að losa"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Biðja um aðgangsorð til að losa"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 168a1613fde6..b0bde08f0b42 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -672,13 +672,13 @@
<string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icona dell\'impronta"</string>
<string name="device_unlock_notification_name" msgid="2632928999862915709">"Sblocco dispositivo"</string>
<string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prova un\'altra modalità di sblocco"</string>
- <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa lo sblocco con il volto se la tua impronta non viene riconosciuta, ad esempio quando hai le dita bagnate"</string>
- <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa lo sblocco con l\'impronta se il tuo volto non viene riconosciuto, ad esempio quando non c\'è abbastanza luce"</string>
- <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Sblocco con il volto"</string>
- <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Sblocco con il volto"</string>
+ <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa lo Sblocco con il Volto se la tua impronta non viene riconosciuta, ad esempio se hai le dita bagnate"</string>
+ <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa lo Sblocco con l\'Impronta se il tuo volto non viene riconosciuto, ad esempio se non c\'è abbastanza luce"</string>
+ <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Sblocco con il Volto"</string>
+ <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Sblocco con il Volto"</string>
<string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Tocca per eliminare il tuo modello del volto e poi riaggiungi il tuo volto"</string>
- <string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Per utilizzare lo sblocco con il volto, attiva "<b>"l\'accesso alla fotocamera"</b>" in Impostazioni &gt; Privacy"</string>
- <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Sblocco con l\'impronta"</string>
+ <string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Per utilizzare lo Sblocco con il Volto, attiva "<b>"l\'accesso alla fotocamera"</b>" in Impostazioni &gt; Privacy"</string>
+ <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Sblocco con l\'Impronta"</string>
<string name="fingerprint_recalibrate_notification_title" msgid="2406561052064558497">"Impossibile utilizzare il sensore di impronte digitali"</string>
<string name="fingerprint_recalibrate_notification_content" msgid="8519935717822194943">"Contatta un fornitore di servizi di riparazione."</string>
<string name="face_acquired_insufficient" msgid="6889245852748492218">"Impossibile creare il modello del volto. Riprova."</string>
@@ -711,20 +711,20 @@
<string-array name="face_acquired_vendor">
</string-array>
<string name="face_error_hw_not_available" msgid="5085202213036026288">"Imposs. verificare volto. Hardware non disponibile."</string>
- <string name="face_error_timeout" msgid="2598544068593889762">"Riprova lo sblocco con il volto"</string>
+ <string name="face_error_timeout" msgid="2598544068593889762">"Riprova lo Sblocco con il Volto"</string>
<string name="face_error_no_space" msgid="5649264057026021723">"Imposs. salvare dati nuovi volti. Elimina un volto vecchio."</string>
<string name="face_error_canceled" msgid="2164434737103802131">"Operazione associata al volto annullata."</string>
- <string name="face_error_user_canceled" msgid="5766472033202928373">"Sblocco con il volto annullato dall\'utente"</string>
+ <string name="face_error_user_canceled" msgid="5766472033202928373">"Sblocco con il Volto annullato dall\'utente"</string>
<string name="face_error_lockout" msgid="7864408714994529437">"Troppi tentativi. Riprova più tardi."</string>
- <string name="face_error_lockout_permanent" msgid="8533257333130473422">"Troppi tentativi. Sblocco con il volto non disponibile."</string>
+ <string name="face_error_lockout_permanent" msgid="8533257333130473422">"Troppi tentativi. Sblocco con il Volto non disponibile."</string>
<string name="face_error_lockout_screen_lock" msgid="5062609811636860928">"Troppi tentativi. Inserisci il blocco schermo."</string>
<string name="face_error_unable_to_process" msgid="5723292697366130070">"Impossibile verificare il volto. Riprova."</string>
- <string name="face_error_not_enrolled" msgid="1134739108536328412">"Non hai configurato lo sblocco con il volto"</string>
- <string name="face_error_hw_not_present" msgid="7940978724978763011">"Sblocco con il volto non è supportato su questo dispositivo"</string>
+ <string name="face_error_not_enrolled" msgid="1134739108536328412">"Non hai configurato lo Sblocco con il Volto"</string>
+ <string name="face_error_hw_not_present" msgid="7940978724978763011">"Sblocco con il Volto non è supportato su questo dispositivo"</string>
<string name="face_error_security_update_required" msgid="5076017208528750161">"Sensore temporaneamente disattivato."</string>
<string name="face_name_template" msgid="3877037340223318119">"Volto <xliff:g id="FACEID">%d</xliff:g>"</string>
- <string name="face_app_setting_name" msgid="5854024256907828015">"Usa lo sblocco con il volto"</string>
- <string name="face_or_screen_lock_app_setting_name" msgid="1603149075605709106">"Usa lo sblocco con il volto o il blocco schermo"</string>
+ <string name="face_app_setting_name" msgid="5854024256907828015">"Usa lo Sblocco con il Volto"</string>
+ <string name="face_or_screen_lock_app_setting_name" msgid="1603149075605709106">"Usa lo Sblocco con il Volto o il blocco schermo"</string>
<string name="face_dialog_default_subtitle" msgid="6620492813371195429">"Usa il tuo volto per continuare"</string>
<string name="face_or_screen_lock_dialog_default_subtitle" msgid="5006381531158341844">"Per continuare devi usare il tuo volto o il tuo blocco schermo"</string>
<string-array name="face_error_vendor">
@@ -976,7 +976,7 @@
<string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Riprova"</string>
<string name="lockscreen_password_wrong" msgid="8605355913868947490">"Riprova"</string>
<string name="lockscreen_storage_locked" msgid="634993789186443380">"Sblocca per accedere a funzioni e dati"</string>
- <string name="faceunlock_multiple_failures" msgid="681991538434031708">"Numero massimo di tentativi di sblocco con il volto superato"</string>
+ <string name="faceunlock_multiple_failures" msgid="681991538434031708">"Numero massimo di tentativi di Sblocco con il Volto superato"</string>
<string name="lockscreen_missing_sim_message_short" msgid="1229301273156907613">"Nessuna SIM presente"</string>
<string name="lockscreen_missing_sim_message" product="tablet" msgid="3986843848305639161">"Nessuna SIM presente nel tablet."</string>
<string name="lockscreen_missing_sim_message" product="tv" msgid="3903140876952198273">"Nessuna SIM presente nel dispositivo Android TV."</string>
@@ -1046,7 +1046,7 @@
<string name="keyguard_accessibility_expand_lock_area" msgid="4215280881346033434">"Espandi area di sblocco."</string>
<string name="keyguard_accessibility_slide_unlock" msgid="2968195219692413046">"Sblocco con scorrimento."</string>
<string name="keyguard_accessibility_pattern_unlock" msgid="8669128146589233293">"Sblocco con sequenza."</string>
- <string name="keyguard_accessibility_face_unlock" msgid="4533832120787386728">"Sblocco con il volto."</string>
+ <string name="keyguard_accessibility_face_unlock" msgid="4533832120787386728">"Sblocco con il Volto."</string>
<string name="keyguard_accessibility_pin_unlock" msgid="4020864007967340068">"Sblocco con PIN."</string>
<string name="keyguard_accessibility_sim_pin_unlock" msgid="4895939120871890557">"Sblocco tramite PIN della SIM."</string>
<string name="keyguard_accessibility_sim_puk_unlock" msgid="3459003464041899101">"Sblocco tramite PUK della SIM."</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 1f909945c79a..000adcef9df6 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> שני בעבודה"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> שלישי בעבודה"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"שכפול של <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> בפרופיל הפרטי"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"יש לבקש קוד אימות לפני ביטול הצמדה"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"צריך לבקש קו ביטול נעילה לפני ביטול הצמדה"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"יש לבקש סיסמה לפני ביטול הצמדה"</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 1d93a71f14c5..bddd15c809fd 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -806,7 +806,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Бұған дейін орнатылған қолданбаның автоматты түрде жаңартылуына мүмкіндік береді."</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Құпия сөз ережелерін тағайындау"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Экран бекітпесінің құпия сөздерінің және PIN кодтарының ұзындығын және оларда рұқсат етілген таңбаларды басқару."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Экран құлпын ашу әркеттерін бақылау"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Экран құлпын ашу әрекеттерін бақылау"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Экран бекітпесін ашқан кезде терілген қате құпия сөздердің санын бақылау және планшетті бекіту немесе тым көп қате құпия сөздер терілген болса, планшеттің бүкіл деректерін өшіру."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Экранның құлпын ашу кезінде қате енгізілген құпия сөздердің санын бақылау, құпия сөз тым көп қате енгізілген жағдайда, Android TV құрылғысын құлыптау және Android TV құрылғыңыздың барлық деректерінен тазарту."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Экран құлпын ашқан кезде, терілген қате құпия сөздердің саны бақыланады, сондай-ақ құпия сөздер бірнеше рет қате терілсе, ақпараттық-сауықтық жүйе құлыпталады немесе оның барлық дерегі жойылады."</string>
@@ -819,7 +819,7 @@
<string name="policydesc_resetPassword" msgid="4626419138439341851">"Экран құлпын өзгерте алады."</string>
<string name="policylab_forceLock" msgid="7360335502968476434">"Экранды құлыптау"</string>
<string name="policydesc_forceLock" msgid="1008844760853899693">"Экранның қашан және қалай құлыпталатынын басқара алады."</string>
- <string name="policylab_wipeData" msgid="1359485247727537311">"Барлық деректерді өшіру"</string>
+ <string name="policylab_wipeData" msgid="1359485247727537311">"Барлық деректі өшіру"</string>
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Планшет дерекқорын ескертусіз, зауыттық дерекқорын қайта реттеу арқылы өшіру."</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Зауыттық деректерді қалпына келтіру арқылы Android TV құрылғыңыздың деректерін ескертусіз тазартыңыз."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Зауыттық деректерді қалпына келтіру арқылы ақпараттық-сауықтық жүйе дерегі ескертусіз өшіріледі."</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-ші жұмыс профилі (<xliff:g id="LABEL">%1$s</xliff:g>)"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-ші жұмыс профилі (<xliff:g id="LABEL">%1$s</xliff:g>)"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> клондау"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Жеке <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Босату алдында PIN кодын сұрау"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Босату алдында бекітпесін ашу өрнегін сұрау"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Босату алдында құпия сөзді сұрау"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 19c6f5d20491..aa543d851322 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -328,7 +328,7 @@
<string name="permgroupdesc_phone" msgid="270048070781478204">"ಫೋನ್ ಕರೆ ಮಾಡಲು ಹಾಗೂ ನಿರ್ವಹಿಸಲು"</string>
<string name="permgrouplab_sensors" msgid="9134046949784064495">"ಬಾಡಿ ಸೆನ್ಸರ್‌"</string>
<string name="permgroupdesc_sensors" msgid="2610631290633747752">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸಾರ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಿ"</string>
- <string name="permgrouplab_notifications" msgid="5472972361980668884">"ಅಧಿಸೂಚನೆಗಳು"</string>
+ <string name="permgrouplab_notifications" msgid="5472972361980668884">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
<string name="permgroupdesc_notifications" msgid="4608679556801506580">"ಅಧಿಸೂಚನೆಗಳನ್ನು ತೋರಿಸಿ"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"ವಿಂಡೋ ವಿಷಯವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"ನೀವು ಬಳಸುತ್ತಿರುವ ವಿಂಡೋದ ವಿಷಯ ಪರೀಕ್ಷಿಸುತ್ತದೆ."</string>
@@ -2136,7 +2136,7 @@
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ಹೋಮ್"</string>
<string name="accessibility_system_action_back_label" msgid="4205361367345537608">"ಹಿಂದಕ್ಕೆ"</string>
<string name="accessibility_system_action_recents_label" msgid="4782875610281649728">"ಇತ್ತೀಚಿನ ಆ್ಯಪ್‌ಗಳು"</string>
- <string name="accessibility_system_action_notifications_label" msgid="6083767351772162010">"ಅಧಿಸೂಚನೆಗಳು"</string>
+ <string name="accessibility_system_action_notifications_label" msgid="6083767351772162010">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
<string name="accessibility_system_action_quick_settings_label" msgid="4583900123506773783">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳು"</string>
<string name="accessibility_system_action_power_dialog_label" msgid="8095341821683910781">"ಪವರ್ ಡೈಲಾಗ್"</string>
<string name="accessibility_system_action_lock_screen_label" msgid="5484190691945563838">"ಲಾಕ್ ಸ್ಕ್ರೀನ್"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 335a9572a866..2b50395da43f 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"두 번째 업무용 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"세 번째 업무용<xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> 복사"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"비공개 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"고정 해제 이전에 PIN 요청"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"고정 해제 시 잠금 해제 패턴 요청"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"고정 해제 이전에 비밀번호 요청"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index df4929fac5b8..63e4b273ca58 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -765,7 +765,7 @@
<string name="permlab_readNetworkUsageHistory" msgid="8470402862501573795">"тармактын колдонулуш таржымалын окуу"</string>
<string name="permdesc_readNetworkUsageHistory" msgid="1112962304941637102">"Колдонмого белгилүү бир тармактарга жана колдонмолорго байланыштуу тармактын колдонулушу жөнүндө таржымалды окуу мүмкүнчүлүгүн берет."</string>
<string name="permlab_manageNetworkPolicy" msgid="6872549423152175378">"тармак саясатын башкаруу"</string>
- <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Колдонмого тармак саясаттарын башкаруу жана колдонмого мүнөздүү эрежелерди белгилөө мүмкүнчүлүгүн берет."</string>
+ <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Колдонмого тармак эрежелерин башкаруу жана колдонмого мүнөздүү эрежелерди белгилөө мүмкүнчүлүгүн берет."</string>
<string name="permlab_modifyNetworkAccounting" msgid="7448790834938749041">"тармактын колдонулуш эсеп-кысабын өзгөртүү"</string>
<string name="permdesc_modifyNetworkAccounting" msgid="5076042642247205390">"Колдонмого желени башка колдонмолордун пайдалануусун башкарган тууралоолорду киргизүү уруксатын берет. Жөнөкөй колдонмолор үчүн эмес."</string>
<string name="permlab_accessNotifications" msgid="7130360248191984741">"эскертүүлөр менен иштөө"</string>
@@ -810,7 +810,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн санын текшерип, эгер алардын саны өтө эле көп болсо, планшетти кулпулаңыз же планшеттеги бардык маалыматтарды тазалап салыңыз."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Экрандын кулпусун ачуу учурунда сырсөздөр канча жолу туура эмес терилгенин тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, Android TV түзмөгүңүздү кулпулап же Android TV түзмөгүңүздөгү бардык дайын-даректериңизди тазалап салуу."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн саны текшерилип, эгер алардын саны өтө эле көп болсо, инфозоок тутуму кулпуланып же инфозоок тутумундагы бардык маалыматтар өчүрүлөт."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн санын текшерип, эгер алардын саны өтө эле көп болсо, телефонду кулпулаңыз же телефондогу бардык маалыматтарды тазалап салыңыз."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Экрандын кулпусун ачуу аракеттерине көз салып, сырсөз өтө көп жолу туура эмес терилсе, телефонду кулпулайт же андагы бардык нерселерди өчүрүп салат."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Экрандын кулпусун ачуу учурунда туура эмес терилген сырсөздөрдү тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, планшетти кулпулап же бул колдонуучунун бардык дайындарын тазалап салуу."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Экрандын кулпусун ачуу учурунда сырсөздөр канча жолу туура эмес терилгенин тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, Android TV түзмөгүңүздү кулпулап же колдонуучунун бардык дайындарын тазалап салуу."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Экрандын кулпусун ачуу учурунда туура эмес терилген сырсөздөрдү тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, инфозоок тутуму кулпуланып же бул профилдин бардык дайындары өчүрүлөт."</string>
@@ -1718,7 +1718,7 @@
<string name="color_inversion_feature_name" msgid="2672824491933264951">"Түстөрдү инверсиялоо"</string>
<string name="color_correction_feature_name" msgid="7975133554160979214">"Түстөрдү тууралоо"</string>
<string name="one_handed_mode_feature_name" msgid="2334330034828094891">"Бир кол режими"</string>
- <string name="reduce_bright_colors_feature_name" msgid="3222994553174604132">"Дагы караңгы"</string>
+ <string name="reduce_bright_colors_feature_name" msgid="3222994553174604132">"Кошумча караңгылатуу"</string>
<string name="hearing_aids_feature_name" msgid="1125892105105852542">"Угуу түзмөктөрү"</string>
<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>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-жумуш <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-жумуш <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> клону"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Купуя <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Бошотуудан мурун PIN суралсын"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Бошотуудан мурун графикалык ачкыч суралсын"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Бошотуудан мурун сырсөз суралсын"</string>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index cddabaf3afa6..0f8ccf5ee1e4 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"ບ່ອນເຮັດວຽກທີ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"ບ່ອນເຮັດວຽກທີ 3 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"ໂຄລນ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> ສ່ວນຕົວ"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"​ຖາມ​ຫາ PIN ກ່ອນ​ຍົກ​ເລີກ​ການປັກ​ໝຸດ"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"​ຖາມ​ຫາ​ຮູບ​ແບບ​ປົດ​ລັອກ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"​ຖາມ​ຫາ​ລະ​ຫັດ​ຜ່ານ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index fb1b7b9d5aef..ab6998cc552f 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. darba profils: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. darba profils: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> (klons)"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Privātais <xliff:g id="LABEL">%1$s</xliff:g> profils"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Prasīt PIN kodu pirms atspraušanas"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pirms atspraušanas pieprasīt atbloķēšanas kombināciju"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pirms atspraušanas pieprasīt paroli"</string>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index d2bdb4d431af..7906fc1e255f 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -810,7 +810,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал таблетыг түгжих болон таблетын бүх датаг арилгана"</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Дэлгэцийн түгжээг тайлахаар буруу оруулсан нууц үгийн тоог хянаж, нууц үгийг хэт олон удаа буруу оруулсан тохиолдолд таны Android TV төхөөрөмжийг түгжиж эсвэл үүний бүх өгөгдлийг устгана."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Дэлгэцийн түгжээг тайлахад буруу бичиж оруулсан нууц үгний тоог хянаж, инфотэйнмент системийг түгжих эсвэл хэт олон удаа нууц үгийг буруу бичиж оруулсан тохиолдолд инфотэйнмент системийн бүх өгөгдлийг устгана."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах, ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал утсыг түгжих болон утасны бүх датаг арилгана"</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах, ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал утсыг түгжиж эсвэл утасны бүх өгөгдлийг арилгана"</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Дэлгэцийн түгжээг тайлахад оруулсан буруу нууц үгийн давтамжийг хянаж таблетыг түгжих эсвэл буруу нууц үгийг хэт олон удаа оруулсан тохиолдолд энэ хэрэглэгчийн мэдээллийг устгах."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Дэлгэцийн түгжээг тайлахаар буруу оруулсан нууц үгийн тоог хянаж, нууц үгийг хэт олон удаа буруу оруулсан тохиолдолд таны Android TV төхөөрөмжийг түгжиж эсвэл энэ хэрэглэгчийн бүх өгөгдлийг устгана."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Дэлгэцийн түгжээг тайлахад буруу бичиж оруулсан нууц үгний тоог хянаж, инфотэйнмент системийг түгжих эсвэл хэт олон удаа нууц үгийг буруу бичиж оруулсан тохиолдолд энэ профайлын бүх өгөгдлийг устгана."</string>
@@ -819,11 +819,11 @@
<string name="policydesc_resetPassword" msgid="4626419138439341851">"Дэлгэцийн түгжээг өөрчлөх."</string>
<string name="policylab_forceLock" msgid="7360335502968476434">"Дэлгэц түгжих"</string>
<string name="policydesc_forceLock" msgid="1008844760853899693">"Дэлгэц хэзээ яаж түгжихийг удирдах"</string>
- <string name="policylab_wipeData" msgid="1359485247727537311">"Бүх датаг арилгах"</string>
+ <string name="policylab_wipeData" msgid="1359485247727537311">"Бүх өгөгдлийг арилгах"</string>
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Үйлдвэрийн дата утгыг өгсөнөөр таблетын дата шууд арилгагдана."</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Таны Android TV төхөөрөмжийн өгөгдлийг танд анхааруулалгүйгээр үйлдвэрээс гарсан төлөвт шилжүүлэн устгана."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Үйлдвэрийн өгөгдлийн төлөвт үйлдлийг гүйцэтгэснээр инфотэйнмент системийн өгөгдлийг сануулгагүйгээр устгана."</string>
- <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Сануулахгүйгээр утасны бүх мэдээллийг устгаж, үйлдвэрийн өгөгдмөл байдалд шилжүүлнэ"</string>
+ <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Сануулахгүйгээр утасны бүх өгөгдлийг арилгаж, үйлдвэрийн өгөгдлийн тохиргоонд шинэчилнэ"</string>
<string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Профайлын өгөгдлийг устгах"</string>
<string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Хэрэглэгчийн мэдээллийг арилгах"</string>
<string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Анхааруулга өгөхгүйгээр энэ хэрэглэгчийн энэ таблет дээрх мэдээллийг устгах."</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 5f7a5c14e984..74990485c63e 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -806,11 +806,11 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"होल्डरला वापरकर्त्याच्या कृतीशिवाय पूर्वी इंस्टॉल केलेले अ‍ॅप अपडेट करण्याची अनुमती देते"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियम सेट करा"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"स्क्रीन लॉक पासवर्ड आणि पिन मध्ये अनुमती दिलेले लांबी आणि वर्ण नियंत्रित करा."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"स्क्रीन अनलॉक प्रयत्नांचे परीक्षण करा"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"स्क्रीन अनलॉक प्रयत्नांवर लक्ष ठेवा"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"टाइप केलेल्या अयोग्य पासवर्डांच्या अंकांचे परीक्षण करा. स्क्रीन अनलॉक केली जाते, तेव्हा टॅबलेट लॉक करा किंवा बरेच पासवर्ड टाइप केले असल्यास टॅबलेटचा सर्व डेटा मिटवा."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्ड संख्येचे परीक्षण करते आणि Android TV डिव्हाइस लॉक करते किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास Android TV डिव्हाइसचा सर्व डेटा मिटवते."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"टाइप केलेल्या चुकीच्या पासवर्डच्या संख्येचे निरीक्षण करा. स्क्रीन अनलॉक करताना, इंफोटेनमेंट सिस्टीम लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास, इंफोटेनमेंट सिस्टीमचा सर्व डेटा मिटवा."</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"टाइप केलेल्या अयोग्य पासवर्डांच्या अंकांचे परीक्षण करा. स्क्रीन अनलॉक केली जाते, तेव्हा फोन लॉक करा किंवा बरेच पासवर्ड टाइप केले असल्यास फोनचा सर्व डेटा मिटवा."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन अनलॉक करताना टाइप केलेल्या अयोग्य पासवर्डच्या संख्येवर लक्ष ठेवा. बरेच पासवर्ड टाइप केले असल्यास फोन लॉक करा किंवा फोनचा सर्व डेटा मिटवा."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्डांच्या संख्येचे परीक्षण करा आणि टॅबलेट लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास या वापरकर्त्याचा सर्व डेटा मिटवा."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्ड संख्येचे परीक्षण करते आणि Android TV डिव्हाइस लॉक करते किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास वापरकर्त्याचा सर्व डेटा मिटवते."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्डच्या संख्येचे निरीक्षण करा आणि इंफोटेनमेंट सिस्टीम लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास, या प्रोफाइलचा सर्व डेटा मिटवा."</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2 रे कार्य <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3 रे कार्य <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> क्लोन केलेले"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"खाजगी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन करण्‍यापूर्वी पिन विचारा"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन करण्‍यापूर्वी अनलॉक नमुन्यासाठी विचारा"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"अनपिन करण्‍यापूर्वी संकेतशब्दासाठी विचारा"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 74e904dab535..3faeb7f65b39 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -2130,7 +2130,7 @@
<string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Bluetooth akan kekal hidup semasa dalam mod pesawat"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"Memuatkan"</string>
<string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # fail}other{{file_name} + # fail}}"</string>
- <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Tiada orang yang disyorkan untuk berkongsi"</string>
+ <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Tiada orang yang disyorkan untuk membuat perkongsian"</string>
<string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Senarai apl"</string>
<string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Apl ini belum diberikan kebenaran merakam tetapi dapat merakam audio melalui peranti USB ini."</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Skrin Utama"</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 394a74e64752..5752fa3870da 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -810,7 +810,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"မျက်နှာပြင်ကို သော့ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက်၊ စကားဝှက် ရိုက်ထည့်မှု သိပ်များနေလျှင် တက်ဘလက်ကို သော့ခတ်ရန် သို့မဟုတ် တက်ဘလက် ဒေတာ အားလုံးကို ဖျက်ရန်။"</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"မျက်နှာပြင်ကို လော့ခ်ဖွင့်သည့်အခါ စကားဝှက်မှားယွင်းစွာ ရိုက်သွင်းသည့်အကြိမ်ရေကို စောင့်ကြည့်ပြီး မှားယွင်းသည့်အကြိမ်ရေ အလွန်များလာပါက သင့် Android TV စက်ပစ္စည်းကို လော့ခ်ချခြင်း သို့မဟုတ် သင့် Android TV ရှိ အသုံးပြုသူဒေတာများအားလုံးကို ဖျက်ခြင်းတို့ ပြုလုပ်သွားပါမည်။"</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"ဖန်သားပြင်လော့ခ်ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက် စကားဝှက် မမှန်မကန် ရိုက်ထည့်မှု များနေလျှင် သတင်းနှင့်ဖျော်ဖြေရေး စနစ်ကို လော့ခ်ချသည် (သို့) ၎င်း၏ ဒေတာအားလုံးကို ဖျက်သည်။"</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"မျက်နှာပြင်ကို သော့ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက်၊ စကားဝှက် ရိုက်ထည့်မှု သိပ်များနေလျှင် ဖုန်းကို သော့ခတ်ရန် သို့မဟုတ် ဖုန်း ဒေတာ အားလုံးကို ဖျက်ရန်။"</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"မျက်နှာပြင်ကို လောခ်ဖွင့်ရန်အတွက် ရိုက်ထည့်သည့် မှားယွင်းသောစကားဝှက် အကြိမ်ရေကို စောင့်ကြည့်ပြီး မမှန်သောစကားဝှက် ရိုက်ထည့်မှု အလွန်များနေလျှင် ဖုန်းကိုလော့ခ်ချသည် (သို့) ဖုန်း ဒေတာအားလုံးကို ဖျက်သည်။"</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"ဖန်မျက်နှာပြင်အား သော့ဖွင့်စဉ် လျှို့ဝှက်ကုဒ်အမှားများ ရိုက်သွင်းမှုအား စောင့်ကြည့်ရန်နှင့်၊ လျှို့ဝှက်ကုဒ်အမှားများ များစွာ ရိုက်သွင်းပါက တက်ဘလက်အား သော့ချခြင်း သို့မဟုတ် တက်ဘလက်၏ အချက်အလက်များအား ဖျက်ပစ်ခြင်းများ ပြုလုပ်မည်။"</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"မျက်နှာပြင်ကို လော့ခ်ဖွင့်သည့်အခါ စကားဝှက်မှားယွင်းစွာ ရိုက်သွင်းသည့်အကြိမ်ရေကို စောင့်ကြည့်ပြီး မှားယွင်းသည့်အကြိမ်ရေ အလွန်များလာပါက သင့် Android TV စက်ပစ္စည်းကို လော့ခ်ချခြင်း သို့မဟုတ် ဤအသုံးပြုသူဒေတာများအားလုံးကို ဖျက်ခြင်းတို့ ပြုလုပ်သွားပါမည်။"</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"ဖန်သားပြင်လော့ခ်ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက် စကားဝှက် မမှန်မကန် ရိုက်ထည့်မှု များနေလျှင် သတင်းနှင့်ဖျော်ဖြေရေး စနစ်ကို လော့ခ်ချသည် (သို့) ဤပရိုဖိုင်၏ ဒေတာအားလုံးကို ဖျက်သည်။"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index ffc8bea2894b..0cc55e48873f 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -806,7 +806,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Lar innehaveren oppdatere appen hen tidligere installerte, uten brukerhandling"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Angi passordregler"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Kontrollerer tillatt lengde og tillatte tegn i passord og PIN-koder for opplåsing av skjermen."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Overvåk forsøk på å låse opp skjermen"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Overvåking av forsøk på å låse opp skjermen"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Overvåk antall feil passordforsøk ved opplåsing av skjerm, og lås nettbrettet eller slett alle data fra nettbrettet ved for mange feil passordforsøk."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Følg med på hvor mange ganger feil passord skrives inn når skjermen skal låses opp, og lås Android TV-enheten eller tøm alle dataene når feil passord skrives inn for mange ganger."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Overvåk antall feil passord som er skrevet inn ved opplåsing av skjermen, og lås infotainment-systemet eller tøm alle dataene i infotainment-systemet hvis feil passord skrives inn for mange ganger."</string>
@@ -1288,13 +1288,13 @@
<string name="volume_call" msgid="7625321655265747433">"Samtalevolum"</string>
<string name="volume_bluetooth_call" msgid="2930204618610115061">"Bluetooth-samtalevolum"</string>
<string name="volume_alarm" msgid="4486241060751798448">"Alarmvolum"</string>
- <string name="volume_notification" msgid="6864412249031660057">"Varslingsvolum"</string>
+ <string name="volume_notification" msgid="6864412249031660057">"Varselvolum"</string>
<string name="volume_unknown" msgid="4041914008166576293">"Volum"</string>
<string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Bluetooth-volum"</string>
<string name="volume_icon_description_ringer" msgid="2187800636867423459">"Ringetonevolum"</string>
<string name="volume_icon_description_incall" msgid="4491255105381227919">"Samtalevolum"</string>
<string name="volume_icon_description_media" msgid="4997633254078171233">"Medievolum"</string>
- <string name="volume_icon_description_notification" msgid="579091344110747279">"Varslingsvolum"</string>
+ <string name="volume_icon_description_notification" msgid="579091344110747279">"Varselvolum"</string>
<string name="ringtone_default" msgid="9118299121288174597">"Standard ringetone"</string>
<string name="ringtone_default_with_actual" msgid="2709686194556159773">"Standard (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
<string name="ringtone_silent" msgid="397111123930141876">"Ingen"</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Andre <xliff:g id="LABEL">%1$s</xliff:g> for jobben"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Tredje <xliff:g id="LABEL">%1$s</xliff:g> for jobben"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Privat <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Krev PIN-kode for å løsne app"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Krev opplåsingsmønster for å løsne apper"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Krev passord for å løsne apper"</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index 672cfbc8a633..e38898eb468b 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"कार्यालयको दोस्रो <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"कार्यालयको तेस्रो <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> क्लोन गर्नुहोस्"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"निजी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन गर्नुअघि PIN मागियोस्"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन गर्नअघि अनलक प्याटर्न माग्नुहोस्"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"पिन निकाल्नुअघि पासवर्ड सोध्नुहोस्"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 2846b6a115b0..7d48a017b1be 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -329,7 +329,7 @@
<string name="permgrouplab_sensors" msgid="9134046949784064495">"Lichaamssensoren"</string>
<string name="permgroupdesc_sensors" msgid="2610631290633747752">"toegang krijgen tot sensorgegevens over je vitale functies"</string>
<string name="permgrouplab_notifications" msgid="5472972361980668884">"Meldingen"</string>
- <string name="permgroupdesc_notifications" msgid="4608679556801506580">"meldingen laten zien"</string>
+ <string name="permgroupdesc_notifications" msgid="4608679556801506580">"meldingen tonen"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"Content van vensters ophalen"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"De content inspecteren van een venster waarmee je interactie hebt."</string>
<string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"Verkennen via aanraking aanzetten"</string>
@@ -596,8 +596,8 @@
<string name="permdesc_disableKeyguard" msgid="3223710003098573038">"Hiermee kan de app de toetsenblokkering en bijbehorende wachtwoordbeveiliging uitzetten. Zo kan de telefoon de toetsenblokkering uitzetten als je wordt gebeld en de toetsenblokkering weer aanzetten als het gesprek is beëindigd."</string>
<string name="permlab_requestPasswordComplexity" msgid="1808977190557794109">"complexiteit van schermvergrendeling opvragen"</string>
<string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"Hiermee krijgt de app toestemming om het complexiteitsniveau van de schermvergrendeling te achterhalen (hoog, midden, laag of geen). Dat geeft een indicatie van het mogelijke lengtebereik en type van de schermvergrendeling. De app kan gebruikers ook voorstellen de schermvergrendeling naar een bepaald niveau te updaten, maar gebruikers kunnen dit altijd negeren en de app verlaten. De schermvergrendeling wordt niet opgeslagen als platte tekst, zodat de app het precieze wachtwoord niet weet."</string>
- <string name="permlab_postNotification" msgid="4875401198597803658">"meldingen laten zien"</string>
- <string name="permdesc_postNotification" msgid="5974977162462877075">"Hiermee kan de app meldingen laten zien"</string>
+ <string name="permlab_postNotification" msgid="4875401198597803658">"meldingen tonen"</string>
+ <string name="permdesc_postNotification" msgid="5974977162462877075">"Hiermee kan de app meldingen tonen"</string>
<string name="permlab_turnScreenOn" msgid="219344053664171492">"het scherm aanzetten"</string>
<string name="permdesc_turnScreenOn" msgid="4394606875897601559">"Hiermee kan de app het scherm aanzetten."</string>
<string name="permlab_useBiometric" msgid="6314741124749633786">"biometrische hardware gebruiken"</string>
@@ -2100,7 +2100,7 @@
<string name="nas_upgrade_notification_enable_action" msgid="3046406808378726874">"OK"</string>
<string name="nas_upgrade_notification_disable_action" msgid="3794833210043497982">"Uitzetten"</string>
<string name="nas_upgrade_notification_learn_more_action" msgid="7011130656195423947">"Meer informatie"</string>
- <string name="nas_upgrade_notification_learn_more_content" msgid="3735480566983530650">"In Android 12 hebben verbeterde meldingen aanpasbare Android-meldingen vervangen. Deze functie laat voorgestelde acties en antwoorden zien en ordent je meldingen.\n\nVerbeterde meldingen hebben toegang tot meldingscontent, waaronder persoonlijke informatie zoals contactnamen en berichten. Deze functie kan ook meldingen sluiten of erop reageren, zoals telefoongesprekken aannemen, en Niet storen beheren."</string>
+ <string name="nas_upgrade_notification_learn_more_content" msgid="3735480566983530650">"In Android 12 hebben verbeterde meldingen aanpasbare Android-meldingen vervangen. Deze functie toont voorgestelde acties en antwoorden en ordent je meldingen.\n\nVerbeterde meldingen hebben toegang tot meldingscontent, waaronder persoonlijke informatie zoals contactnamen en berichten. Deze functie kan ook meldingen sluiten of erop reageren, zoals telefoongesprekken aannemen, en Niet storen beheren."</string>
<string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"Informatiemelding voor routinemodus"</string>
<string name="dynamic_mode_notification_title" msgid="1388718452788985481">"Batterijbesparing staat aan"</string>
<string name="dynamic_mode_notification_summary" msgid="1639031262484979689">"Het batterijgebruik wordt beperkt om de batterijduur te verlengen"</string>
@@ -2301,7 +2301,7 @@
<string name="sensor_privacy_start_use_mic_notification_content_title" msgid="2420858361276370367">"Blokkeren van apparaatmicrofoon opheffen"</string>
<string name="sensor_privacy_start_use_camera_notification_content_title" msgid="7287720213963466672">"Blokkeren van apparaatcamera opheffen"</string>
<string name="sensor_privacy_start_use_notification_content_text" msgid="7595608891015777346">"Voor &lt;b&gt;<xliff:g id="APP">%s</xliff:g>&lt;/b&gt; en alle andere apps en services"</string>
- <string name="sensor_privacy_start_use_dialog_turn_on_button" msgid="7089318886628390827">"Blokkeren opheffen"</string>
+ <string name="sensor_privacy_start_use_dialog_turn_on_button" msgid="7089318886628390827">"Niet meer blokkeren"</string>
<string name="sensor_privacy_notification_channel_label" msgid="936036783155261349">"Sensorprivacy"</string>
<string name="splash_screen_view_icon_description" msgid="180638751260598187">"App-icoon"</string>
<string name="splash_screen_view_branding_description" msgid="7911129347402728216">"Merkafbeelding voor app"</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 41d8b509b1fa..64736e556fbb 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2ୟ କାର୍ଯ୍ୟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3ୟ କାର୍ଯ୍ୟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> କ୍ଲୋନ"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"ପ୍ରାଇଭେଟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ PIN ପଚାରନ୍ତୁ"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ ଲକ୍‌ ଖୋଲିବା ପାଟର୍ନ ପଚାରନ୍ତୁ"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ ପାସ୍‌ୱର୍ଡ ପଚାରନ୍ତୁ"</string>
@@ -2131,7 +2130,7 @@
<string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ଏୟାରପ୍ଲେନ୍ ମୋଡରେ ବ୍ଲୁଟୁଥ୍ ଚାଲୁ ରହିବ"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"ଲୋଡ୍ ହେଉଛି"</string>
<string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + #ଟି ଫାଇଲ}other{{file_name} + #ଟି ଫାଇଲ}}"</string>
- <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ଏହାକୁ ସେୟାର୍ କରିବା ପାଇଁ କୌଣସି ସୁପାରିଶ କରାଯାଇଥିବା ଲୋକ ନାହାଁନ୍ତି"</string>
+ <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ଏହାକୁ ସେୟାର କରିବା ପାଇଁ କୌଣସି ସୁପାରିଶ କରାଯାଇଥିବା ଲୋକ ନାହାଁନ୍ତି"</string>
<string name="chooser_all_apps_button_label" msgid="3230427756238666328">"ଆପ୍ସ ତାଲିକା"</string>
<string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"ଏହି ଆପ୍‌କୁ ରେକର୍ଡ କରିବାକୁ ଅନୁମତି ଦିଆଯାଇ ନାହିଁ କିନ୍ତୁ ଏହି USB ଡିଭାଇସ୍ ଜରିଆରେ ଅଡିଓ କ୍ୟାପ୍‍ଚର୍‍ କରିପାରିବ।"</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ହୋମ"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 8b9934fe860b..8cfc0e4279d1 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"ਦੂਸਰੀ ਕਾਰਜ-ਸਥਾਨ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"ਤੀਸਰੀ ਕਾਰਜ-ਸਥਾਨ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ਦਾ ਕਲੋਨ"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"ਨਿੱਜੀ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ਅਨਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਪਿੰਨ ਮੰਗੋ"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ਅਨਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਅਣਲਾਕ ਪੈਟਰਨ ਵਾਸਤੇ ਪੁੱਛੋ"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ਅਣਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਪਾਸਵਰਡ ਮੰਗੋ"</string>
@@ -2131,7 +2130,7 @@
<string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ਹਵਾਈ-ਜਹਾਜ਼ ਮੋਡ ਵੇਲੇ ਬਲੂਟੁੱਥ ਹਾਲੇ ਵੀ ਚਾਲੂ ਹੋ ਜਾਵੇਗਾ"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
<string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # ਫ਼ਾਈਲ}one{{file_name} + # ਫ਼ਾਈਲ}other{{file_name} + # ਫ਼ਾਈਲਾਂ}}"</string>
- <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ਸਾਂਝਾ ਕਰਨ ਲਈ ਕੋਈ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੇ ਲੋਕ ਨਹੀਂ"</string>
+ <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ਸਾਂਝਾ ਕਰਨ ਲਈ ਕੋਈ ਸਿਫ਼ਾਰਸ਼ ਕੀਤਾ ਵਿਅਕਤੀ ਨਹੀਂ ਹੈ"</string>
<string name="chooser_all_apps_button_label" msgid="3230427756238666328">"ਐਪ ਸੂਚੀ"</string>
<string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"ਇਸ ਐਪ ਨੂੰ ਰਿਕਾਰਡ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਨਹੀਂ ਦਿੱਤੀ ਗਈ ਪਰ ਇਹ USB ਡੀਵਾਈਸ ਰਾਹੀਂ ਆਡੀਓ ਕੈਪਚਰ ਕਰ ਸਕਦੀ ਹੈ।"</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ਹੋਮ"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 880892f9e786..a40fae86a5f3 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1869,8 +1869,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> – praca 2"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> – praca 3"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon aplikacji <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Prywatna aplikacja <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Podaj PIN, aby odpiąć"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Aby odpiąć, poproś o wzór odblokowania"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Aby odpiąć, poproś o hasło"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 5dc54639d14c..cf428b70b7c9 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1868,8 +1868,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> pentru serviciu (2)"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> pentru serviciu (3)"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Clonă pentru <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Solicită codul PIN înainte de a anula fixarea"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Solicită mai întâi modelul pentru deblocare"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Solicită parola înainte de a anula fixarea"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index e09593ee95c3..4986c10f7522 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1865,12 +1865,11 @@
<string name="select_day" msgid="2060371240117403147">"Выберите месяц и число"</string>
<string name="select_year" msgid="1868350712095595393">"Выберите год"</string>
<string name="deleted_key" msgid="9130083334943364001">"Цифра <xliff:g id="KEY">%1$s</xliff:g> удалена"</string>
- <string name="managed_profile_label_badge" msgid="6762559569999499495">"Рабочий <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="managed_profile_label_badge" msgid="6762559569999499495">"<xliff:g id="LABEL">%1$s</xliff:g> (рабочий профиль)"</string>
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Задача 2: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Задача 3: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Клонировать <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (личный профиль)"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Запрашивать PIN-код"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запрашивать графический ключ"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запрашивать пароль"</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 99d90bee006b..1b6230d3d340 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2වන වැඩ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3වන වැඩ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ක්ලෝන කරන්න"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"පෞද්ගලික <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ගැලවීමට පෙර PIN විමසන්න"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ගැලවීමට පෙර අගුළු අරින රටාව සඳහා අසන්න"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ගැලවීමට පෙර මුරපදය විමසන්න"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index a3ca1a6562f3..9784308ca57f 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -808,7 +808,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Povolí vlastníkovi aktualizovať aplikáciu, ktorá bola nainštalovaná bez akcie používateľa"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Nastaviť pravidlá pre heslo"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Nastavte dĺžku hesiel na odomknutie obrazovky aj kódov PIN a v nich používané znaky."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Sledovanie pokusov o odomknutie obrazovky"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Sledovať pokusy o odomknutie obrazovky"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Sledovať počet nesprávnych hesiel zadaných pri odomykaní obrazovky a zamknúť tablet alebo vymazať všetky údaje tabletu v prípade príliš veľkého počtu neplatných pokusov o zadanie hesla."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Sledovanie počtu nesprávnych hesiel zadaných pri odomykaní obrazovky a v prípade, že ich je zadaných príliš mnoho, uzamknutie zariadenia Android TV alebo vymazanie všetkých jeho údajov."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Sledujte počet nesprávnych hesiel zadaných pri odomykaní obrazovky a uzamknite palubný systém alebo vymažte všetky údaje v palubnom systéme v prípade príliš veľkého počtu neplatných pokusov o zadanie hesla."</string>
@@ -1869,8 +1869,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> do práce"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> do práce"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klonovať <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Súkromná aplikácia <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pred odopnutím požiadať o číslo PIN"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pred uvoľnením požiadať o bezpečnostný vzor"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pred odopnutím požiadať o heslo"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 5292fc328640..16ea77f1b0c6 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -812,7 +812,7 @@
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Nadzoruje število nepravilno vnesenih gesel pri odklepanju zaslona in zaklene tablični računalnik ali izbriše vse podatke v njem, če je vnesenih preveč nepravilnih gesel."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene napravo Android TV ali izbriše vse podatke v napravi Android TV, če je vnesenih preveč nepravilnih gesel."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Spremljanje števila nepravilno vnesenih gesel pri odklepanju zaslona in zaklenitev informativno-razvedrilnega sistema ali izbris vseh podatkov v njem v primeru preveč vnosov nepravilnih gesel"</string>
- <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Spremljajte število vnesenih napačnih gesel, s katerimi želite odkleniti zaslon. Če je teh vnosov preveč, zaklenite telefon ali izbrišite vse podatke v njem."</string>
+ <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Spremljanje števila vnosov napačnih gesel za odklepanje zaslona ter zaklenitev telefona ali izbris vseh podatkov v njem v primeru prevelikega števila vnosov napačnih gesel."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene tablični računalnik ali izbriše vse podatke lastnika, če je vnesenih preveč nepravilnih gesel."</string>
<string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene napravo Android TV ali izbriše vse podatke tega uporabnika, če je vnesenih preveč nepravilnih gesel."</string>
<string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Spremljanje števila nepravilno vnesenih gesel pri odklepanju zaslona in zaklenitev informativno-razvedrilnega sistema ali izbris vseh podatkov tega profila v primeru preveč vnosov nepravilnih gesel"</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index fd7453426231..a3d648f204fa 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -983,7 +983,7 @@
<string name="lockscreen_missing_sim_instructions" msgid="5823469004536805423">"Shto një kartë SIM."</string>
<string name="lockscreen_missing_sim_instructions_long" msgid="4403843937236648032">"Karta SIM mungon ose është e palexueshme. Shto një kartë SIM."</string>
<string name="lockscreen_permanent_disabled_sim_message_short" msgid="1925200607820809677">"Kartë SIM e papërdorshme."</string>
- <string name="lockscreen_permanent_disabled_sim_instructions" msgid="6902979937802238429">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit me valë për një kartë tjetër SIM."</string>
+ <string name="lockscreen_permanent_disabled_sim_instructions" msgid="6902979937802238429">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit wireless për një tjetër kartë SIM."</string>
<string name="lockscreen_transport_prev_description" msgid="2879469521751181478">"Kënga e mëparshme"</string>
<string name="lockscreen_transport_next_description" msgid="2931509904881099919">"Kënga tjetër"</string>
<string name="lockscreen_transport_pause_description" msgid="6705284702135372494">"Pauzë"</string>
@@ -1198,7 +1198,7 @@
<string name="whichEditApplicationNamed" msgid="8096494987978521514">"Redakto me %1$s"</string>
<string name="whichEditApplicationLabel" msgid="1463288652070140285">"Redakto"</string>
<string name="whichSendApplication" msgid="4143847974460792029">"Ndaj"</string>
- <string name="whichSendApplicationNamed" msgid="4470386782693183461">"Shpërndaj me %1$s"</string>
+ <string name="whichSendApplicationNamed" msgid="4470386782693183461">"Ndaj me %1$s"</string>
<string name="whichSendApplicationLabel" msgid="7467813004769188515">"Ndaj"</string>
<string name="whichSendToApplication" msgid="77101541959464018">"Dërgo me"</string>
<string name="whichSendToApplicationNamed" msgid="3385686512014670003">"Dërgo me %1$s"</string>
@@ -1523,7 +1523,7 @@
<string name="matches_found" msgid="2296462299979507689">"{count,plural, =1{# përputhje}other{# nga {total}}}"</string>
<string name="action_mode_done" msgid="2536182504764803222">"U krye"</string>
<string name="progress_erasing" msgid="6891435992721028004">"Po fshin hapësirën ruajtëse të brendshme…"</string>
- <string name="share" msgid="4157615043345227321">"Shpërndaj"</string>
+ <string name="share" msgid="4157615043345227321">"Ndaj"</string>
<string name="find" msgid="5015737188624767706">"Gjej"</string>
<string name="websearch" msgid="5624340204512793290">"Kërkim në internet"</string>
<string name="find_next" msgid="5341217051549648153">"Gjej tjetrën"</string>
@@ -1568,8 +1568,8 @@
<string name="keyboardview_keycode_enter" msgid="168054869339091055">"Enter"</string>
<string name="activitychooserview_choose_application" msgid="3500574466367891463">"Zgjidh një aplikacion"</string>
<string name="activitychooserview_choose_application_error" msgid="6937782107559241734">"Nuk mundi ta hapte <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="shareactionprovider_share_with" msgid="2753089758467748982">"Shpërndaj me"</string>
- <string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Shpërndaj me <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
+ <string name="shareactionprovider_share_with" msgid="2753089758467748982">"Ndaj me"</string>
+ <string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Ndaj me <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
<string name="content_description_sliding_handle" msgid="982510275422590757">"Dorezë me rrëshqitje. Preke dhe mbaje të shtypur."</string>
<string name="description_target_unlock_tablet" msgid="7431571180065859551">"Rrëshqit për të shkyçur."</string>
<string name="action_bar_home_description" msgid="1501655419158631974">"Orientohu për në shtëpi"</string>
@@ -1613,7 +1613,7 @@
<string name="sha1_fingerprint" msgid="2339915142825390774">"Gjurma e gishtit SHA-1:"</string>
<string name="activity_chooser_view_see_all" msgid="3917045206812726099">"Shikoji të gjitha"</string>
<string name="activity_chooser_view_dialog_title_default" msgid="8880731437191978314">"Zgjidh aktivitetin"</string>
- <string name="share_action_provider_share_with" msgid="1904096863622941880">"Shpërndaj me"</string>
+ <string name="share_action_provider_share_with" msgid="1904096863622941880">"Ndaj me"</string>
<string name="sending" msgid="206925243621664438">"Po dërgon…"</string>
<string name="launchBrowserDefault" msgid="6328349989932924119">"Të hapet shfletuesi?"</string>
<string name="SetupCallDefault" msgid="5581740063237175247">"Dëshiron ta pranosh telefonatën?"</string>
@@ -1629,7 +1629,7 @@
<string name="default_audio_route_name_usb" msgid="895668743163316932">"USB"</string>
<string name="default_audio_route_category_name" msgid="5241740395748134483">"Sistemi"</string>
<string name="bluetooth_a2dp_audio_route_name" msgid="4214648773120426288">"Audioja e \"bluetooth-it\""</string>
- <string name="wireless_display_route_description" msgid="8297563323032966831">"Ekran pa tel"</string>
+ <string name="wireless_display_route_description" msgid="8297563323032966831">"Ekran wireless"</string>
<string name="media_route_button_content_description" msgid="2299223698196869956">"Transmeto"</string>
<string name="media_route_chooser_title" msgid="6646594924991269208">"Lidhu me pajisjen"</string>
<string name="media_route_chooser_title_for_remote_display" msgid="3105906508794326446">"Transmeto ekranin në pajisje"</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> i dytë i punës"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> i tretë i punës"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klonim i <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Zhgozhdimi kërkon PIN-in"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Kërko motivin e shkyçjes para heqjes së gozhdimit"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Kërko fjalëkalim para heqjes nga gozhdimi."</string>
@@ -1889,9 +1888,9 @@
<string name="zen_mode_duration_minutes_short" msgid="2435756450204526554">"{count,plural, =1{Për 1 min.}other{Për # min.}}"</string>
<string name="zen_mode_duration_hours" msgid="7841806065034711849">"{count,plural, =1{Për 1 orë}other{Për # orë}}"</string>
<string name="zen_mode_duration_hours_short" msgid="3666949653933099065">"{count,plural, =1{Për 1 orë}other{Për # orë}}"</string>
- <string name="zen_mode_until_next_day" msgid="1403042784161725038">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
- <string name="zen_mode_until" msgid="2250286190237669079">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
- <string name="zen_mode_alarm" msgid="7046911727540499275">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarmi tjetër)"</string>
+ <string name="zen_mode_until_next_day" msgid="1403042784161725038">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+ <string name="zen_mode_until" msgid="2250286190237669079">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+ <string name="zen_mode_alarm" msgid="7046911727540499275">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarmi tjetër)"</string>
<string name="zen_mode_forever" msgid="740585666364912448">"Derisa ta çaktivizosh"</string>
<string name="zen_mode_forever_dnd" msgid="3423201955704180067">"Deri sa të çaktivizosh gjendjen \"Mos shqetëso\""</string>
<string name="zen_mode_rule_name_combination" msgid="7174598364351313725">"<xliff:g id="FIRST">%1$s</xliff:g> / <xliff:g id="REST">%2$s</xliff:g>"</string>
@@ -2164,9 +2163,9 @@
<string name="resolver_personal_tab_accessibility" msgid="5739524949153091224">"Pamja personale"</string>
<string name="resolver_work_tab_accessibility" msgid="4753168230363802734">"Pamja e punës"</string>
<string name="resolver_cross_profile_blocked" msgid="3014597376026044840">"Bllokuar nga administratori yt i teknologjisë së informacionit"</string>
- <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Kjo përmbajtje nuk mund të shpërndahet me aplikacione pune"</string>
+ <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Kjo përmbajtje nuk mund të ndahet me aplikacione pune"</string>
<string name="resolver_cant_access_work_apps_explanation" msgid="1129960195389373279">"Kjo përmbajtje nuk mund të hapet me aplikacione pune"</string>
- <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Kjo përmbajtje nuk mund të shpërndahet me aplikacione personale"</string>
+ <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Kjo përmbajtje nuk mund të ndahet me aplikacione personale"</string>
<string name="resolver_cant_access_personal_apps_explanation" msgid="1679399548862724359">"Kjo përmbajtje nuk mund të hapet me aplikacione personale"</string>
<string name="resolver_turn_on_work_apps" msgid="1535946298236678122">"Aplikacionet e punës janë vendosur në pauzë"</string>
<string name="resolver_switch_on_work" msgid="4527096360772311894">"Hiq nga pauza"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 81c19152f0fb..712aeb99dd98 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -807,7 +807,7 @@
<string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Дозвољава власнику да ажурира апликацију коју је претходно инсталирала без радњи корисника"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Подешавање правила за лозинку"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Контролише дужину и знакове дозвољене у лозинкама и PIN-овима за закључавање екрана."</string>
- <string name="policylab_watchLogin" msgid="7599669460083719504">"Надгледајте покушаје откључавања екрана"</string>
+ <string name="policylab_watchLogin" msgid="7599669460083719504">"Надзор покушаја откључавања екрана"</string>
<string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Прати број нетачно унетих лозинки приликом откључавања екрана и закључава таблет или брише податке са таблета ако је нетачна лозинка унета превише пута."</string>
<string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Надгледа број нетачних лозинки унетих при откључавању екрана и закључава Android TV уређај или брише све податке са Android TV уређаја ако се унесе превише нетачних лозинки."</string>
<string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Прати број нетачно унетих лозинки при откључавању екрана и закључава систем за инфо-забаву или брише све податке са система за инфо-забаву ако је нетачна лозинка унета превише пута."</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 1ca3e08abb53..3624f71d1e7e 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Andra <xliff:g id="LABEL">%1$s</xliff:g> för jobbet"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Tredje <xliff:g id="LABEL">%1$s</xliff:g> för jobbet"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Klona <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Privat <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Be om pinkod innan skärmen slutar fästas"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Be om upplåsningsmönster innan skärmen slutar fästas"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Be om lösenord innan skärmen slutar fästas"</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 5b2b2b2d522a..8c2ddb0cf395 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2வது பணி <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3வது பணி <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"குளோன் <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"தனிப்பட்ட <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"அகற்றும் முன் PINஐக் கேள்"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"அகற்றும் முன் அன்லாக் பேட்டர்னைக் கேள்"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"அகற்றும் முன் கடவுச்சொல்லைக் கேள்"</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 5b9e737b7d63..4c7835f66b41 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -322,7 +322,7 @@
<string name="permgroupdesc_camera" msgid="7585150538459320326">"చిత్రాలను తీయడానికి మరియు వీడియోను రికార్డ్ చేయడానికి"</string>
<string name="permgrouplab_nearby_devices" msgid="5529147543651181991">"సమీపంలోని పరికరాలు"</string>
<string name="permgroupdesc_nearby_devices" msgid="3213561597116913508">"సమీప పరికరాలను కనుగొనండి అలాగే కనెక్ట్ చేయండి"</string>
- <string name="permgrouplab_calllog" msgid="7926834372073550288">"కాల్ లాగ్‌లు"</string>
+ <string name="permgrouplab_calllog" msgid="7926834372073550288">"కాల్ లాగ్స్‌"</string>
<string name="permgroupdesc_calllog" msgid="2026996642917801803">"ఫోన్ కాల్ లాగ్‌ని చదవండి మరియు రాయండి"</string>
<string name="permgrouplab_phone" msgid="570318944091926620">"ఫోన్"</string>
<string name="permgroupdesc_phone" msgid="270048070781478204">"ఫోన్ కాల్స్‌ చేయడం మరియు నిర్వహించడం"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 33b050aa2cef..ee45ede2df89 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -819,7 +819,7 @@
<string name="policydesc_resetPassword" msgid="4626419138439341851">"Ekran kilidini değiştirir."</string>
<string name="policylab_forceLock" msgid="7360335502968476434">"Ekranı kilitleme"</string>
<string name="policydesc_forceLock" msgid="1008844760853899693">"Ekranın nasıl ve ne zaman kilitleneceğini denetler."</string>
- <string name="policylab_wipeData" msgid="1359485247727537311">"Tüm verileri silme"</string>
+ <string name="policylab_wipeData" msgid="1359485247727537311">"Tüm verileri sil"</string>
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek tabletteki verileri uyarıda bulunmadan siler."</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek Android TV cihazınızdaki verileri uyarıda bulunmadan siler."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek bilgi-eğlence sistemindeki veriler uyarıda bulunmadan silinir."</string>
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"İş için 2. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"İş için 3. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> klonu"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"Gizli <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Sabitlemeyi kaldırmadan önce PIN\'i sor"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Sabitlemeyi kaldırmadan önce kilit açma desenini sor"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Sabitlemeyi kaldırmadan önce şifre sor"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index f6d426d53b28..63b7560140e7 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -821,7 +821,7 @@
<string name="policydesc_resetPassword" msgid="4626419138439341851">"Змінити спосіб розблокування екрана."</string>
<string name="policylab_forceLock" msgid="7360335502968476434">"Блокувати екран"</string>
<string name="policydesc_forceLock" msgid="1008844760853899693">"Контролювати, як і коли блокується екран."</string>
- <string name="policylab_wipeData" msgid="1359485247727537311">"Видалити всі дані"</string>
+ <string name="policylab_wipeData" msgid="1359485247727537311">"Видаляти всі дані"</string>
<string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Стирати дані планшетного ПК без попередження, відновлюючи заводські налаштування."</string>
<string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Видаляйте дані пристрою Android TV без попередження шляхом відновлення заводських налаштувань."</string>
<string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Видаляйте всі дані інформаційно-розважальної системи без попередження, відновлюючи заводські налаштування."</string>
@@ -1869,8 +1869,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-а робота: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-я робота: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Копія додатка <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (приватний профіль)"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"PIN-код для відкріплення"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запитувати ключ розблокування перед відкріпленням"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запитувати пароль перед відкріпленням"</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index c8cd1cb2b9d9..bd6ea76a820f 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"دوسرا کام <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"تیسرا کام <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> کلون"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"نجی <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"‏پن ہٹانے سے پہلے PIN طلب کریں"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"پن ہٹانے سے پہلے غیر مقفل کرنے کا پیٹرن طلب کریں"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"پن ہٹانے سے پہلے پاس ورڈ طلب کریں"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 5b92609c8b96..c02adbc5d2c7 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1867,8 +1867,7 @@
<string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Công việc thứ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Công việc thứ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="clone_profile_label_badge" msgid="1871997694718793964">"Sao chép <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
- <skip />
+ <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> riêng tư"</string>
<string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Hỏi mã PIN trước khi bỏ ghim"</string>
<string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Hỏi hình mở khóa trước khi bỏ ghim"</string>
<string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Hỏi mật khẩu trước khi bỏ ghim"</string>
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml
index b0d9b670e0cb..4027f5c78035 100644
--- a/core/res/res/values-watch/config.xml
+++ b/core/res/res/values-watch/config.xml
@@ -77,4 +77,13 @@
<!-- Default hyphenation frequency setting (0=NONE, 1=NORMAL, 2=FULL). -->
<item name="config_preferredHyphenationFrequency" format="integer" type="dimen">1</item>
+
+ <!-- Floating windows can be fullscreen (i.e. windowIsFloating can still have fullscreen
+ window that does not wrap content). -->
+ <bool name="config_allowFloatingWindowsFillScreen">true</bool>
+
+ <!-- Whether scroll haptic feedback is enabled for rotary encoder scrolls on
+ {@link MotionEvent#AXIS_SCROLL} generated by {@link InputDevice#SOURCE_ROTARY_ENCODER}
+ devices. -->
+ <bool name="config_viewRotaryEncoderHapticScrollFedbackEnabled">true</bool>
</resources>
diff --git a/core/res/res/values-watch/dimens_material.xml b/core/res/res/values-watch/dimens_material.xml
index 40673c1aa584..2ab2d91058e2 100644
--- a/core/res/res/values-watch/dimens_material.xml
+++ b/core/res/res/values-watch/dimens_material.xml
@@ -58,4 +58,7 @@
<dimen name="screen_percentage_10">0dp</dimen>
<dimen name="screen_percentage_12">0dp</dimen>
<dimen name="screen_percentage_15">0dp</dimen>
+
+ <!-- dialog elevation [overrides 18dp] -->
+ <dimen name="floating_window_z">2dp</dimen>
</resources>
diff --git a/core/res/res/values-watch/themes_device_defaults.xml b/core/res/res/values-watch/themes_device_defaults.xml
index c4c1ed9b9998..df8158dbb6c8 100644
--- a/core/res/res/values-watch/themes_device_defaults.xml
+++ b/core/res/res/values-watch/themes_device_defaults.xml
@@ -52,6 +52,7 @@ a similar way.
<!-- Variant of {@link #Theme_DeviceDefault} with no action bar -->
<style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Material.NoActionBar">
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -70,6 +71,8 @@ a similar way.
<!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar. This theme
sets {@link android.R.attr#windowFullscreen} to true. -->
<style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen">
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -90,6 +93,7 @@ a similar way.
sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
to true. -->
<style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan">
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -149,8 +153,8 @@ a similar way.
watch theme is not floating. You can set this theme on an activity if you would like to make
an activity that looks like a Dialog.-->
<style name="Theme.DeviceDefault.Dialog" parent="Theme.Material.Dialog" >
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <item name="android:windowFullscreen">true</item>
+
<item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
<item name="windowAnimationStyle">@style/Animation.DeviceDefault.Dialog</item>
@@ -175,6 +179,23 @@ a similar way.
<item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
</style>
+ <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
+ <item name="android:windowFullscreen">true</item>
+ <!-- Color palette Dark -->
+ <item name="colorPrimary">@color/primary_device_default_dark</item>
+ <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+ <item name="colorForeground">@color/foreground_device_default_dark</item>
+ <item name="colorAccent">@color/accent_device_default_dark</item>
+ <item name="colorBackground">@color/background_device_default_dark</item>
+ <item name="colorBackgroundFloating">@color/background_floating_device_default_dark</item>
+ <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_device_default</item>
+ <item name="colorButtonNormal">@color/button_normal_device_default_dark</item>
+ <item name="colorError">@color/error_color_device_default_dark</item>
+ <item name="disabledAlpha">@dimen/disabled_alpha_device_default</item>
+ <item name="primaryContentAlpha">@dimen/primary_content_alpha_device_default</item>
+ <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
+ </style>
+
<!-- DeviceDefault theme for a window that should look like the Settings app. -->
<style name="Theme.DeviceDefault.Settings" parent="Theme.DeviceDefault"/>
<style name="Theme.DeviceDefault.Settings.NoActionBar" parent="Theme.DeviceDefault"/>
@@ -185,9 +206,9 @@ a similar way.
<style name="Theme.DeviceDefault.Settings.Dialog.Presentation" parent="Theme.DeviceDefault.Dialog.Presentation"/>
<style name="Theme.DeviceDefault.Settings.SearchBar" parent="Theme.DeviceDefault.SearchBar"/>
- <style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.DeviceDefault.Dialog.Alert">
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -204,8 +225,6 @@ a similar way.
</style>
<style name="Theme.DeviceDefault.Settings.CompactMenu" parent="Theme.Material.CompactMenu">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -224,8 +243,7 @@ a similar way.
<!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
regular dialog. -->
<style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <item name="android:windowFullscreen">true</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -243,8 +261,8 @@ a similar way.
<!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
<style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -263,8 +281,8 @@ a similar way.
<!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
for a regular dialog. -->
<style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -302,6 +320,8 @@ a similar way.
full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
xlarge). -->
<style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar">
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -319,6 +339,7 @@ a similar way.
<!-- DeviceDefault theme for a presentation window on a secondary display. -->
<style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation">
+ <item name="android:windowFullscreen">true</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -338,6 +359,8 @@ a similar way.
decorations, so you basically have an empty rectangle in which to place your content. It makes
the window floating, with a transparent background, and turns off dimming behind the window. -->
<style name="Theme.DeviceDefault.Panel" parent="Theme.Material.Panel">
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBar">false</item>
<!-- Color palette Dark -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -407,24 +430,6 @@ a similar way.
<item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
</style>
- <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
- <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
-
- <!-- Color palette Dialog -->
- <item name="colorPrimary">@color/primary_device_default_dark</item>
- <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
- <item name="colorForeground">@color/foreground_device_default_dark</item>
- <item name="colorAccent">@color/accent_device_default_dark</item>
- <item name="colorBackground">@color/background_device_default_dark</item>
- <item name="colorBackgroundFloating">@color/background_floating_device_default_dark</item>
- <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_device_default</item>
- <item name="colorButtonNormal">@color/button_normal_device_default_dark</item>
- <item name="colorError">@color/error_color_device_default_dark</item>
- <item name="disabledAlpha">@dimen/disabled_alpha_device_default</item>
- <item name="primaryContentAlpha">@dimen/primary_content_alpha_device_default</item>
- <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
- </style>
-
<!-- Theme for the dialog shown when an app crashes or ANRs. Override to make it dark. -->
<style name="Theme.DeviceDefault.Dialog.AppError" parent="Theme.DeviceDefault.Dialog.Alert">
<item name="alertDialogStyle">@style/BaseErrorDialog.DeviceDefault</item>
@@ -451,8 +456,6 @@ a similar way.
</style>
<style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Material.Dialog.NoFrame">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
<!-- Color palette Dialog -->
<item name="colorPrimary">@color/primary_device_default_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
diff --git a/core/res/res/values-watch/themes_material.xml b/core/res/res/values-watch/themes_material.xml
index 40a249ab5ed9..674b3bcc8c5d 100644
--- a/core/res/res/values-watch/themes_material.xml
+++ b/core/res/res/values-watch/themes_material.xml
@@ -42,26 +42,31 @@ please see styles_device_defaults.xml.
<!-- Override behaviour to set the theme colours for dialogs, keep them the same. -->
<style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
+ <item name="android:windowFullscreen">true</item>
</style>
<!-- Force the background and floating colours to be the default colours. -->
<style name="Theme.Material.Dialog" parent="Theme.Material.BaseDialog">
+ <item name="android:windowFullscreen">true</item>
+ <item name="colorBackground">@color/background_material_dark</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
+ <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
+ </style>
+
+ <!-- Force the background and floating colours to be the default colours. -->
+ <style name="Theme.Material.Dialog.Alert" parent="Theme.Material.Dialog.BaseAlert">
+ <item name="android:windowFullscreen">true</item>
<item name="colorBackground">@color/background_material_dark</item>
<item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
</style>
<!-- Force the background and floating colours to be the default colours. -->
<style name="Theme.Material.Light.Dialog" parent="Theme.Material.Light.BaseDialog">
+ <item name="android:windowFullscreen">true</item>
<item name="colorBackground">@color/background_material_light</item>
<item name="colorBackgroundFloating">@color/background_floating_material_light</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
- <item name="windowIsFloating">false</item>
- <item name="windowElevation">0dp</item>
</style>
<!-- Force all settings themes to use normal Material theme. -->
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index e7764d8b1fde..d09bf4413284 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -6699,6 +6699,10 @@
<!-- Whether unlocking and waking a device are sequenced -->
<bool name="config_orderUnlockAndWake">false</bool>
+ <!-- Floating windows can be fullscreen (i.e. windowIsFloating can still have fullscreen
+ window that does not wrap content). -->
+ <bool name="config_allowFloatingWindowsFillScreen">false</bool>
+
<!-- Whether scroll haptic feedback is enabled for rotary encoder scrolls on
{@link MotionEvent#AXIS_SCROLL} generated by {@link InputDevice#SOURCE_ROTARY_ENCODER}
devices. -->
diff --git a/core/res/res/values/config_telephony.xml b/core/res/res/values/config_telephony.xml
index 6bb87f3c4e99..582153766dbe 100644
--- a/core/res/res/values/config_telephony.xml
+++ b/core/res/res/values/config_telephony.xml
@@ -151,6 +151,27 @@
<integer name="config_timeout_to_receive_delivered_ack_millis">300000</integer>
<java-symbol type="integer" name="config_timeout_to_receive_delivered_ack_millis" />
+ <!-- The time duration in millis that the satellite will stay at listening state to wait for the
+ next incoming page before disabling listening and moving to IDLE state. This timeout
+ duration is used when transitioning from sending state to listening state.
+ -->
+ <integer name="config_satellite_stay_at_listening_from_sending_millis">180000</integer>
+ <java-symbol type="integer" name="config_satellite_stay_at_listening_from_sending_millis" />
+
+ <!-- The time duration in millis that the satellite will stay at listening state to wait for the
+ next incoming page before disabling listening and moving to IDLE state. This timeout
+ duration is used when transitioning from receiving state to listening state.
+ -->
+ <integer name="config_satellite_stay_at_listening_from_receiving_millis">30000</integer>
+ <java-symbol type="integer" name="config_satellite_stay_at_listening_from_receiving_millis" />
+
+ <!-- The time duration in millis after which cellular scanning will be enabled and satellite
+ will move to IDLE state. This timeout duration is used for satellite with NB IOT radio
+ technologies.
+ -->
+ <integer name="config_satellite_nb_iot_inactivity_timeout_millis">180000</integer>
+ <java-symbol type="integer" name="config_satellite_nb_iot_inactivity_timeout_millis" />
+
<!-- Telephony config for services supported by satellite providers. The format of each config
string in the array is as follows: "PLMN_1:service_1,service_2,..."
where PLMN is the satellite PLMN of a provider and service is an integer with the
@@ -204,4 +225,8 @@
<bool name="telephony_analytics_switch">true</bool>
<java-symbol type="bool" name="telephony_analytics_switch" />
+ <!-- Whether to enable modem on boot if behavior is not defined -->
+ <bool name="config_enable_cellular_on_boot_default">true</bool>
+ <java-symbol type="bool" name="config_enable_cellular_on_boot_default" />
+
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 591e505a792f..fac6aac1db16 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1444,6 +1444,11 @@
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permdesc_cameraOpenCloseListener">This app can receive callbacks when any camera device is being opened (by what application) or closed.</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
+ <string name="permlab_cameraHeadlessSystemUser">Allow an application or service to access camera as Headless System User.</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
+ <string name="permdesc_cameraHeadlessSystemUser">This app can access camera as Headless System User.</string>
+
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_vibrate">control vibration</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 80c2fbf715fb..7f1a6f9a88e3 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -5226,6 +5226,9 @@
<!-- Whether we order unlocking and waking -->
<java-symbol type="bool" name="config_orderUnlockAndWake" />
+ <!-- Allow windowIsFloating to fill screen. -->
+ <java-symbol type="bool" name="config_allowFloatingWindowsFillScreen" />
+
<!-- External TV Input Logging Configs -->
<java-symbol type="bool" name="config_tvExternalInputLoggingDisplayNameFilterEnabled" />
<java-symbol type="array" name="config_tvExternalInputLoggingDeviceOnScreenDisplayNames" />
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
index 89b91cf27b38..14f268a91abf 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
@@ -89,9 +89,6 @@ public final class ConversionUtilsTest extends ExtendedRadioMockitoTestCase {
private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
new ProgramSelector.Identifier(
ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY, TEST_DAB_FREQUENCY_VALUE);
- private static final ProgramSelector.Identifier TEST_FM_FREQUENCY_ID =
- new ProgramSelector.Identifier(
- ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, TEST_FM_FREQUENCY_VALUE);
private static final ProgramSelector.Identifier TEST_VENDOR_ID =
new ProgramSelector.Identifier(
ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, TEST_VENDOR_ID_VALUE);
@@ -251,6 +248,20 @@ public final class ConversionUtilsTest extends ExtendedRadioMockitoTestCase {
}
@Test
+ public void identifierToHalProgramIdentifier_withDeprecateDabId() {
+ long value = 0x98765ABCDL;
+ ProgramSelector.Identifier dabId = new ProgramSelector.Identifier(
+ ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT, value);
+ ProgramIdentifier halDabIdExpected = AidlTestUtils.makeHalIdentifier(
+ IdentifierType.DAB_SID_EXT, 0x987650000ABCDL);
+
+ ProgramIdentifier halDabId = ConversionUtils.identifierToHalProgramIdentifier(dabId);
+
+ expect.withMessage("Converted 28-bit DAB identifier for HAL").that(halDabId)
+ .isEqualTo(halDabIdExpected);
+ }
+
+ @Test
public void identifierFromHalProgramIdentifier_withDabId() {
ProgramSelector.Identifier dabId =
ConversionUtils.identifierFromHalProgramIdentifier(TEST_HAL_DAB_SID_EXT_ID);
diff --git a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
index 819178f40451..89355072e29e 100644
--- a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
+++ b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
@@ -245,7 +245,7 @@ public class ActivityThreadTest {
newConfig.smallestScreenWidthDp++;
transaction = newTransaction(activityThread, activity.getActivityToken());
transaction.addCallback(ActivityConfigurationChangeItem.obtain(
- new Configuration(newConfig)));
+ activity.getActivityToken(), new Configuration(newConfig)));
appThread.scheduleTransaction(transaction);
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
@@ -450,10 +450,12 @@ public class ActivityThreadTest {
appThread.scheduleTransaction(transaction);
transaction = newTransaction(activityThread, activity.getActivityToken());
- transaction.addCallback(ActivityConfigurationChangeItem.obtain(activityConfigLandscape));
+ transaction.addCallback(ActivityConfigurationChangeItem.obtain(
+ activity.getActivityToken(), activityConfigLandscape));
transaction.addCallback(ConfigurationChangeItem.obtain(
processConfigPortrait, DEVICE_ID_INVALID));
- transaction.addCallback(ActivityConfigurationChangeItem.obtain(activityConfigPortrait));
+ transaction.addCallback(ActivityConfigurationChangeItem.obtain(
+ activity.getActivityToken(), activityConfigPortrait));
appThread.scheduleTransaction(transaction);
activity.mTestLatch.await(TIMEOUT_SEC, TimeUnit.SECONDS);
@@ -829,11 +831,12 @@ public class ActivityThreadTest {
private static ClientTransaction newRelaunchResumeTransaction(Activity activity) {
final Configuration currentConfig = activity.getResources().getConfiguration();
- final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(null,
- null, 0, new MergedConfiguration(currentConfig, currentConfig),
+ final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(
+ activity.getActivityToken(), null, null, 0,
+ new MergedConfiguration(currentConfig, currentConfig),
false /* preserveWindow */);
final ResumeActivityItem resumeStateRequest =
- ResumeActivityItem.obtain(true /* isForward */,
+ ResumeActivityItem.obtain(activity.getActivityToken(), true /* isForward */,
false /* shouldSendCompatFakeFocus*/);
final ClientTransaction transaction = newTransaction(activity);
@@ -845,7 +848,7 @@ public class ActivityThreadTest {
private static ClientTransaction newResumeTransaction(Activity activity) {
final ResumeActivityItem resumeStateRequest =
- ResumeActivityItem.obtain(true /* isForward */,
+ ResumeActivityItem.obtain(activity.getActivityToken(), true /* isForward */,
false /* shouldSendCompatFakeFocus */);
final ClientTransaction transaction = newTransaction(activity);
@@ -855,7 +858,8 @@ public class ActivityThreadTest {
}
private static ClientTransaction newStopTransaction(Activity activity) {
- final StopActivityItem stopStateRequest = StopActivityItem.obtain(0 /* configChanges */);
+ final StopActivityItem stopStateRequest = StopActivityItem.obtain(
+ activity.getActivityToken(), 0 /* configChanges */);
final ClientTransaction transaction = newTransaction(activity);
transaction.setLifecycleStateRequest(stopStateRequest);
@@ -865,7 +869,8 @@ public class ActivityThreadTest {
private static ClientTransaction newActivityConfigTransaction(Activity activity,
Configuration config) {
- final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config);
+ final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+ activity.getActivityToken(), config);
final ClientTransaction transaction = newTransaction(activity);
transaction.addCallback(item);
@@ -875,7 +880,8 @@ public class ActivityThreadTest {
private static ClientTransaction newNewIntentTransaction(Activity activity,
List<ReferrerIntent> intents, boolean resume) {
- final NewIntentItem item = NewIntentItem.obtain(intents, resume);
+ final NewIntentItem item = NewIntentItem.obtain(activity.getActivityToken(), intents,
+ resume);
final ClientTransaction transaction = newTransaction(activity);
transaction.addCallback(item);
diff --git a/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java b/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
index 1560c0c2c195..08033cc4009c 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
@@ -65,7 +65,7 @@ public class ActivityConfigurationChangeItemTest {
doReturn(mActivity).when(mHandler).getActivity(mToken);
final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem
- .obtain(mConfiguration);
+ .obtain(mToken, mConfiguration);
final Context context = item.getContextToUpdate(mHandler, mToken);
assertEquals(mActivity, context);
diff --git a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
index ca6735bc6c32..c8d8f4be9e0a 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
@@ -22,7 +22,6 @@ import static android.app.servertransaction.TestUtils.referrerIntentList;
import static android.app.servertransaction.TestUtils.resultInfoList;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
@@ -61,39 +60,44 @@ import java.util.function.Supplier;
@Presubmit
public class ObjectPoolTests {
+ private final IBinder mActivityToken = new Binder();
+
// 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.
@Test
public void testRecycleActivityConfigurationChangeItem() {
- ActivityConfigurationChangeItem emptyItem =
- ActivityConfigurationChangeItem.obtain(Configuration.EMPTY);
- ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config());
+ ActivityConfigurationChangeItem emptyItem = ActivityConfigurationChangeItem.obtain(
+ null /* activityToken */, Configuration.EMPTY);
+ ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+ mActivityToken, config());
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- ActivityConfigurationChangeItem item2 = ActivityConfigurationChangeItem.obtain(config());
+ ActivityConfigurationChangeItem item2 = ActivityConfigurationChangeItem.obtain(
+ mActivityToken, config());
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleActivityResultItem() {
- ActivityResultItem emptyItem = ActivityResultItem.obtain(null);
- ActivityResultItem item = ActivityResultItem.obtain(resultInfoList());
+ ActivityResultItem emptyItem = ActivityResultItem.obtain(
+ null /* activityToken */, null /* resultInfoList */);
+ ActivityResultItem item = ActivityResultItem.obtain(mActivityToken, resultInfoList());
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- ActivityResultItem item2 = ActivityResultItem.obtain(resultInfoList());
+ ActivityResultItem item2 = ActivityResultItem.obtain(mActivityToken, resultInfoList());
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
@@ -101,166 +105,188 @@ public class ObjectPoolTests {
ConfigurationChangeItem emptyItem = ConfigurationChangeItem.obtain(null, 0);
ConfigurationChangeItem item = ConfigurationChangeItem.obtain(config(), 1);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
ConfigurationChangeItem item2 = ConfigurationChangeItem.obtain(config(), 1);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleDestroyActivityItem() {
- DestroyActivityItem emptyItem = DestroyActivityItem.obtain(false, 0);
- DestroyActivityItem item = DestroyActivityItem.obtain(true, 117);
+ DestroyActivityItem emptyItem = DestroyActivityItem.obtain(
+ null /* activityToken */, false, 0);
+ DestroyActivityItem item = DestroyActivityItem.obtain(mActivityToken, true, 117);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- DestroyActivityItem item2 = DestroyActivityItem.obtain(true, 14);
+ DestroyActivityItem item2 = DestroyActivityItem.obtain(mActivityToken, true, 14);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleLaunchActivityItem() {
- Intent intent = new Intent("action");
+ final IBinder activityToken = new Binder();
+ final Intent intent = new Intent("action");
int ident = 57;
- ActivityInfo activityInfo = new ActivityInfo();
+ final ActivityInfo activityInfo = new ActivityInfo();
activityInfo.flags = 42;
activityInfo.setMaxAspectRatio(2.4f);
activityInfo.launchToken = "token";
activityInfo.applicationInfo = new ApplicationInfo();
activityInfo.packageName = "packageName";
activityInfo.name = "name";
- Configuration overrideConfig = new Configuration();
+ final Configuration overrideConfig = new Configuration();
overrideConfig.assetsSeq = 5;
- String referrer = "referrer";
+ final String referrer = "referrer";
int procState = 4;
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString("key", "value");
- PersistableBundle persistableBundle = new PersistableBundle();
+ final PersistableBundle persistableBundle = new PersistableBundle();
persistableBundle.putInt("k", 4);
- IBinder assistToken = new Binder();
- IBinder shareableActivityToken = new Binder();
+ final IBinder assistToken = new Binder();
+ final IBinder shareableActivityToken = new Binder();
int deviceId = 3;
- Supplier<LaunchActivityItem> itemSupplier = () -> new LaunchActivityItemBuilder()
- .setIntent(intent).setIdent(ident).setInfo(activityInfo).setCurConfig(config())
- .setOverrideConfig(overrideConfig).setReferrer(referrer)
- .setProcState(procState).setState(bundle).setPersistentState(persistableBundle)
- .setPendingResults(resultInfoList()).setPendingNewIntents(referrerIntentList())
- .setIsForward(true).setAssistToken(assistToken)
+ final Supplier<LaunchActivityItem> itemSupplier = () -> new LaunchActivityItemBuilder()
+ .setActivityToken(activityToken)
+ .setIntent(intent)
+ .setIdent(ident)
+ .setInfo(activityInfo)
+ .setCurConfig(config())
+ .setOverrideConfig(overrideConfig)
+ .setReferrer(referrer)
+ .setProcState(procState)
+ .setState(bundle)
+ .setPersistentState(persistableBundle)
+ .setPendingResults(resultInfoList())
+ .setPendingNewIntents(referrerIntentList())
+ .setIsForward(true)
+ .setAssistToken(assistToken)
.setShareableActivityToken(shareableActivityToken)
- .setTaskFragmentToken(new Binder()).setDeviceId(deviceId).build();
+ .setTaskFragmentToken(new Binder())
+ .setDeviceId(deviceId)
+ .build();
LaunchActivityItem emptyItem = new LaunchActivityItemBuilder().build();
LaunchActivityItem item = itemSupplier.get();
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
LaunchActivityItem item2 = itemSupplier.get();
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleActivityRelaunchItem() {
- ActivityRelaunchItem emptyItem = ActivityRelaunchItem.obtain(null, null, 0, null, false);
+ ActivityRelaunchItem emptyItem = ActivityRelaunchItem.obtain(
+ null /* activityToken */, null, null, 0, null, false);
Configuration overrideConfig = new Configuration();
overrideConfig.assetsSeq = 5;
- ActivityRelaunchItem item = ActivityRelaunchItem.obtain(resultInfoList(),
+ ActivityRelaunchItem item = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
referrerIntentList(), 42, mergedConfig(), true);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- ActivityRelaunchItem item2 = ActivityRelaunchItem.obtain(resultInfoList(),
+ ActivityRelaunchItem item2 = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
referrerIntentList(), 42, mergedConfig(), true);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleMoveToDisplayItem() {
- MoveToDisplayItem emptyItem = MoveToDisplayItem.obtain(0, Configuration.EMPTY);
- MoveToDisplayItem item = MoveToDisplayItem.obtain(4, config());
+ MoveToDisplayItem emptyItem = MoveToDisplayItem.obtain(
+ null /* activityToken */, 0, Configuration.EMPTY);
+ MoveToDisplayItem item = MoveToDisplayItem.obtain(mActivityToken, 4, config());
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- MoveToDisplayItem item2 = MoveToDisplayItem.obtain(3, config());
+ MoveToDisplayItem item2 = MoveToDisplayItem.obtain(mActivityToken, 3, config());
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleNewIntentItem() {
- NewIntentItem emptyItem = NewIntentItem.obtain(null, false);
- NewIntentItem item = NewIntentItem.obtain(referrerIntentList(), false);
+ NewIntentItem emptyItem = NewIntentItem.obtain(
+ null /* activityToken */, null /* intents */, false /* resume */);
+ NewIntentItem item = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- NewIntentItem item2 = NewIntentItem.obtain(referrerIntentList(), false);
+ NewIntentItem item2 = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecyclePauseActivityItemItem() {
- PauseActivityItem emptyItem = PauseActivityItem.obtain(false, false, 0, false, false);
- PauseActivityItem item = PauseActivityItem.obtain(true, true, 5, true, true);
+ PauseActivityItem emptyItem = PauseActivityItem.obtain(
+ null /* activityToken */, false, false, 0, false, false);
+ PauseActivityItem item = PauseActivityItem.obtain(
+ mActivityToken, true, true, 5, true, true);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- PauseActivityItem item2 = PauseActivityItem.obtain(true, false, 5, true, true);
+ PauseActivityItem item2 = PauseActivityItem.obtain(
+ mActivityToken, true, false, 5, true, true);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleResumeActivityItem() {
- ResumeActivityItem emptyItem = ResumeActivityItem.obtain(false, false);
- ResumeActivityItem item = ResumeActivityItem.obtain(3, true, false);
+ ResumeActivityItem emptyItem = ResumeActivityItem.obtain(
+ null /* activityToken */, false, false);
+ ResumeActivityItem item = ResumeActivityItem.obtain(mActivityToken, 3, true, false);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- ResumeActivityItem item2 = ResumeActivityItem.obtain(2, true, false);
+ ResumeActivityItem item2 = ResumeActivityItem.obtain(mActivityToken, 2, true, false);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
public void testRecycleStartActivityItem() {
- StartActivityItem emptyItem = StartActivityItem.obtain(null /* activityOptions */);
- StartActivityItem item = StartActivityItem.obtain(ActivityOptions.makeBasic());
+ StartActivityItem emptyItem = StartActivityItem.obtain(
+ null /* activityToken */, null /* activityOptions */);
+ StartActivityItem item = StartActivityItem.obtain(mActivityToken,
+ ActivityOptions.makeBasic());
assertNotSame(item, emptyItem);
assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- StartActivityItem item2 = StartActivityItem.obtain(
+ StartActivityItem item2 = StartActivityItem.obtain(mActivityToken,
ActivityOptions.makeBasic().setLaunchDisplayId(10));
assertSame(item, item2);
assertNotEquals(item2, emptyItem);
@@ -268,17 +294,17 @@ public class ObjectPoolTests {
@Test
public void testRecycleStopItem() {
- StopActivityItem emptyItem = StopActivityItem.obtain(0);
- StopActivityItem item = StopActivityItem.obtain(4);
+ StopActivityItem emptyItem = StopActivityItem.obtain(null /* activityToken */, 0);
+ StopActivityItem item = StopActivityItem.obtain(mActivityToken, 4);
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
- StopActivityItem item2 = StopActivityItem.obtain(3);
+ StopActivityItem item2 = StopActivityItem.obtain(mActivityToken, 3);
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
@Test
@@ -286,13 +312,13 @@ public class ObjectPoolTests {
ClientTransaction emptyItem = ClientTransaction.obtain(null, null);
ClientTransaction item = ClientTransaction.obtain(null, new Binder());
assertNotSame(item, emptyItem);
- assertFalse(item.equals(emptyItem));
+ assertNotEquals(item, emptyItem);
item.recycle();
assertEquals(item, emptyItem);
ClientTransaction item2 = ClientTransaction.obtain(null, new Binder());
assertSame(item, item2);
- assertFalse(item2.equals(emptyItem));
+ assertNotEquals(item2, emptyItem);
}
}
diff --git a/core/tests/coretests/src/android/app/servertransaction/TestUtils.java b/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
index 0ed6a29cdd9d..5a88bad37d5f 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
@@ -18,6 +18,8 @@ package android.app.servertransaction;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.ProfilerInfo;
import android.app.ResultInfo;
@@ -90,129 +92,175 @@ class TestUtils {
}
static class LaunchActivityItemBuilder {
+ @Nullable
+ private IBinder mActivityToken;
+ @Nullable
private Intent mIntent;
private int mIdent;
+ @Nullable
private ActivityInfo mInfo;
+ @Nullable
private Configuration mCurConfig;
+ @Nullable
private Configuration mOverrideConfig;
private int mDeviceId;
+ @Nullable
private String mReferrer;
+ @Nullable
private IVoiceInteractor mVoiceInteractor;
private int mProcState;
+ @Nullable
private Bundle mState;
+ @Nullable
private PersistableBundle mPersistentState;
+ @Nullable
private List<ResultInfo> mPendingResults;
+ @Nullable
private List<ReferrerIntent> mPendingNewIntents;
+ @Nullable
private ActivityOptions mActivityOptions;
private boolean mIsForward;
+ @Nullable
private ProfilerInfo mProfilerInfo;
+ @Nullable
private IBinder mAssistToken;
+ @Nullable
private IBinder mShareableActivityToken;
private boolean mLaunchedFromBubble;
+ @Nullable
private IBinder mTaskFragmentToken;
- LaunchActivityItemBuilder setIntent(Intent intent) {
+ @NonNull
+ LaunchActivityItemBuilder setActivityToken(@Nullable IBinder activityToken) {
+ mActivityToken = activityToken;
+ return this;
+ }
+
+ @NonNull
+ LaunchActivityItemBuilder setIntent(@Nullable Intent intent) {
mIntent = intent;
return this;
}
+ @NonNull
LaunchActivityItemBuilder setIdent(int ident) {
mIdent = ident;
return this;
}
- LaunchActivityItemBuilder setInfo(ActivityInfo info) {
+ @NonNull
+ LaunchActivityItemBuilder setInfo(@Nullable ActivityInfo info) {
mInfo = info;
return this;
}
- LaunchActivityItemBuilder setCurConfig(Configuration curConfig) {
+ @NonNull
+ LaunchActivityItemBuilder setCurConfig(@Nullable Configuration curConfig) {
mCurConfig = curConfig;
return this;
}
- LaunchActivityItemBuilder setOverrideConfig(Configuration overrideConfig) {
+ @NonNull
+ LaunchActivityItemBuilder setOverrideConfig(@Nullable Configuration overrideConfig) {
mOverrideConfig = overrideConfig;
return this;
}
+ @NonNull
LaunchActivityItemBuilder setDeviceId(int deviceId) {
mDeviceId = deviceId;
return this;
}
- LaunchActivityItemBuilder setReferrer(String referrer) {
+ @NonNull
+ LaunchActivityItemBuilder setReferrer(@Nullable String referrer) {
mReferrer = referrer;
return this;
}
- LaunchActivityItemBuilder setVoiceInteractor(IVoiceInteractor voiceInteractor) {
+ @NonNull
+ LaunchActivityItemBuilder setVoiceInteractor(@Nullable IVoiceInteractor voiceInteractor) {
mVoiceInteractor = voiceInteractor;
return this;
}
+ @NonNull
LaunchActivityItemBuilder setProcState(int procState) {
mProcState = procState;
return this;
}
- LaunchActivityItemBuilder setState(Bundle state) {
+ @NonNull
+ LaunchActivityItemBuilder setState(@Nullable Bundle state) {
mState = state;
return this;
}
- LaunchActivityItemBuilder setPersistentState(PersistableBundle persistentState) {
+ @NonNull
+ LaunchActivityItemBuilder setPersistentState(@Nullable PersistableBundle persistentState) {
mPersistentState = persistentState;
return this;
}
- LaunchActivityItemBuilder setPendingResults(List<ResultInfo> pendingResults) {
+ @NonNull
+ LaunchActivityItemBuilder setPendingResults(@Nullable List<ResultInfo> pendingResults) {
mPendingResults = pendingResults;
return this;
}
- LaunchActivityItemBuilder setPendingNewIntents(List<ReferrerIntent> pendingNewIntents) {
+ @NonNull
+ LaunchActivityItemBuilder setPendingNewIntents(
+ @Nullable List<ReferrerIntent> pendingNewIntents) {
mPendingNewIntents = pendingNewIntents;
return this;
}
- LaunchActivityItemBuilder setActivityOptions(ActivityOptions activityOptions) {
+ @NonNull
+ LaunchActivityItemBuilder setActivityOptions(@Nullable ActivityOptions activityOptions) {
mActivityOptions = activityOptions;
return this;
}
+ @NonNull
LaunchActivityItemBuilder setIsForward(boolean isForward) {
mIsForward = isForward;
return this;
}
- LaunchActivityItemBuilder setProfilerInfo(ProfilerInfo profilerInfo) {
+ @NonNull
+ LaunchActivityItemBuilder setProfilerInfo(@Nullable ProfilerInfo profilerInfo) {
mProfilerInfo = profilerInfo;
return this;
}
- LaunchActivityItemBuilder setAssistToken(IBinder assistToken) {
+ @NonNull
+ LaunchActivityItemBuilder setAssistToken(@Nullable IBinder assistToken) {
mAssistToken = assistToken;
return this;
}
- LaunchActivityItemBuilder setShareableActivityToken(IBinder shareableActivityToken) {
+ @NonNull
+ LaunchActivityItemBuilder setShareableActivityToken(
+ @Nullable IBinder shareableActivityToken) {
mShareableActivityToken = shareableActivityToken;
return this;
}
+ @NonNull
LaunchActivityItemBuilder setLaunchedFromBubble(boolean launchedFromBubble) {
mLaunchedFromBubble = launchedFromBubble;
return this;
}
- LaunchActivityItemBuilder setTaskFragmentToken(IBinder taskFragmentToken) {
+ @NonNull
+ LaunchActivityItemBuilder setTaskFragmentToken(@Nullable IBinder taskFragmentToken) {
mTaskFragmentToken = taskFragmentToken;
return this;
}
+ @NonNull
LaunchActivityItem build() {
- return LaunchActivityItem.obtain(mIntent, mIdent, mInfo,
+ return LaunchActivityItem.obtain(mActivityToken, mIntent, mIdent, mInfo,
mCurConfig, mOverrideConfig, mDeviceId, mReferrer, mVoiceInteractor,
mProcState, mState, mPersistentState, mPendingResults, mPendingNewIntents,
mActivityOptions, mIsForward, mProfilerInfo, mAssistToken,
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
index 32f892924ac5..a998b26b09c1 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
@@ -227,6 +227,7 @@ public class TransactionExecutorTests {
when(callback2.getPostExecutionState()).thenReturn(UNDEFINED);
ActivityLifecycleItem stateRequest = mock(ActivityLifecycleItem.class);
IBinder token = mock(IBinder.class);
+ when(stateRequest.getActivityToken()).thenReturn(token);
when(mTransactionHandler.getActivity(token)).thenReturn(mock(Activity.class));
ClientTransaction transaction = ClientTransaction.obtain(null /* client */,
@@ -256,7 +257,7 @@ public class TransactionExecutorTests {
final ClientTransaction destroyTransaction = ClientTransaction.obtain(null /* client */,
token /* activityToken */);
destroyTransaction.setLifecycleStateRequest(
- DestroyActivityItem.obtain(false /* finished */, 0 /* configChanges */));
+ DestroyActivityItem.obtain(token, false /* finished */, 0 /* configChanges */));
destroyTransaction.preExecute(mTransactionHandler);
// The activity should be added to to-be-destroyed container.
assertEquals(1, mTransactionHandler.getActivitiesToBeDestroyed().size());
@@ -264,7 +265,8 @@ public class TransactionExecutorTests {
// A previous queued launch transaction runs on main thread (execute).
final ClientTransaction launchTransaction = ClientTransaction.obtain(null /* client */,
token /* activityToken */);
- final LaunchActivityItem launchItem = spy(new LaunchActivityItemBuilder().build());
+ final LaunchActivityItem launchItem =
+ spy(new LaunchActivityItemBuilder().setActivityToken(token).build());
launchTransaction.addCallback(launchItem);
mExecutor.execute(launchTransaction);
@@ -450,9 +452,11 @@ public class TransactionExecutorTests {
final ClientTransaction transaction = ClientTransaction.obtain(null /* client */, token);
final ActivityTransactionItem activityItem = mock(ActivityTransactionItem.class);
when(activityItem.getPostExecutionState()).thenReturn(UNDEFINED);
+ when(activityItem.getActivityToken()).thenReturn(token);
transaction.addCallback(activityItem);
final ActivityLifecycleItem stateRequest = mock(ActivityLifecycleItem.class);
transaction.setLifecycleStateRequest(stateRequest);
+ when(stateRequest.getActivityToken()).thenReturn(token);
when(mTransactionHandler.getActivity(token)).thenReturn(mock(Activity.class));
mExecutor.execute(transaction);
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
index 48a824915015..abc5d6b35b02 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
@@ -22,7 +22,6 @@ import static android.app.servertransaction.TestUtils.referrerIntentList;
import static android.app.servertransaction.TestUtils.resultInfoList;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
import android.app.ActivityOptions;
import android.app.servertransaction.TestUtils.LaunchActivityItemBuilder;
@@ -32,6 +31,7 @@ import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
import android.os.Binder;
import android.os.Bundle;
+import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PersistableBundle;
@@ -61,10 +61,12 @@ import java.util.ArrayList;
public class TransactionParcelTests {
private Parcel mParcel;
+ private IBinder mActivityToken;
@Before
public void setUp() throws Exception {
mParcel = Parcel.obtain();
+ mActivityToken = new Binder();
}
@Test
@@ -77,13 +79,14 @@ public class TransactionParcelTests {
ConfigurationChangeItem result = ConfigurationChangeItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testActivityConfigChange() {
// Write to parcel
- ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config());
+ ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+ mActivityToken, config());
writeAndPrepareForReading(item);
// Read from parcel and assert
@@ -91,51 +94,52 @@ public class TransactionParcelTests {
ActivityConfigurationChangeItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testMoveToDisplay() {
// Write to parcel
- MoveToDisplayItem item = MoveToDisplayItem.obtain(4 /* targetDisplayId */, config());
+ MoveToDisplayItem item = MoveToDisplayItem.obtain(mActivityToken, 4 /* targetDisplayId */,
+ config());
writeAndPrepareForReading(item);
// Read from parcel and assert
MoveToDisplayItem result = MoveToDisplayItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testNewIntent() {
// Write to parcel
- NewIntentItem item = NewIntentItem.obtain(referrerIntentList(), false);
+ NewIntentItem item = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
writeAndPrepareForReading(item);
// Read from parcel and assert
NewIntentItem result = NewIntentItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testActivityResult() {
// Write to parcel
- ActivityResultItem item = ActivityResultItem.obtain(resultInfoList());
+ ActivityResultItem item = ActivityResultItem.obtain(mActivityToken, resultInfoList());
writeAndPrepareForReading(item);
// Read from parcel and assert
ActivityResultItem result = ActivityResultItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testDestroy() {
- DestroyActivityItem item = DestroyActivityItem.obtain(true /* finished */,
+ DestroyActivityItem item = DestroyActivityItem.obtain(mActivityToken, true /* finished */,
135 /* configChanges */);
writeAndPrepareForReading(item);
@@ -143,48 +147,59 @@ public class TransactionParcelTests {
DestroyActivityItem result = DestroyActivityItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testLaunch() {
// Write to parcel
- Intent intent = new Intent("action");
+ final IBinder activityToken = new Binder();
+ final Intent intent = new Intent("action");
int ident = 57;
- ActivityInfo activityInfo = new ActivityInfo();
+ final ActivityInfo activityInfo = new ActivityInfo();
activityInfo.flags = 42;
activityInfo.setMaxAspectRatio(2.4f);
activityInfo.launchToken = "token";
activityInfo.applicationInfo = new ApplicationInfo();
activityInfo.packageName = "packageName";
activityInfo.name = "name";
- Configuration overrideConfig = new Configuration();
+ final Configuration overrideConfig = new Configuration();
overrideConfig.assetsSeq = 5;
- String referrer = "referrer";
+ final String referrer = "referrer";
int procState = 4;
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString("key", "value");
bundle.putParcelable("data", new ParcelableData(1));
- PersistableBundle persistableBundle = new PersistableBundle();
+ final PersistableBundle persistableBundle = new PersistableBundle();
persistableBundle.putInt("k", 4);
- LaunchActivityItem item = new LaunchActivityItemBuilder()
- .setIntent(intent).setIdent(ident).setInfo(activityInfo).setCurConfig(config())
- .setOverrideConfig(overrideConfig).setReferrer(referrer)
- .setProcState(procState).setState(bundle).setPersistentState(persistableBundle)
- .setPendingResults(resultInfoList()).setActivityOptions(ActivityOptions.makeBasic())
- .setPendingNewIntents(referrerIntentList()).setIsForward(true)
- .setAssistToken(new Binder()).setShareableActivityToken(new Binder())
+ final LaunchActivityItem item = new LaunchActivityItemBuilder()
+ .setActivityToken(activityToken)
+ .setIntent(intent)
+ .setIdent(ident)
+ .setInfo(activityInfo)
+ .setCurConfig(config())
+ .setOverrideConfig(overrideConfig)
+ .setReferrer(referrer)
+ .setProcState(procState)
+ .setState(bundle)
+ .setPersistentState(persistableBundle)
+ .setPendingResults(resultInfoList())
+ .setActivityOptions(ActivityOptions.makeBasic())
+ .setPendingNewIntents(referrerIntentList())
+ .setIsForward(true)
+ .setAssistToken(new Binder())
+ .setShareableActivityToken(new Binder())
.setTaskFragmentToken(new Binder())
.build();
writeAndPrepareForReading(item);
// Read from parcel and assert
- LaunchActivityItem result = LaunchActivityItem.CREATOR.createFromParcel(mParcel);
+ final LaunchActivityItem result = LaunchActivityItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
@@ -192,7 +207,7 @@ public class TransactionParcelTests {
// Write to parcel
Configuration overrideConfig = new Configuration();
overrideConfig.assetsSeq = 5;
- ActivityRelaunchItem item = ActivityRelaunchItem.obtain(resultInfoList(),
+ ActivityRelaunchItem item = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
referrerIntentList(), 35, mergedConfig(), true);
writeAndPrepareForReading(item);
@@ -200,13 +215,13 @@ public class TransactionParcelTests {
ActivityRelaunchItem result = ActivityRelaunchItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testPause() {
// Write to parcel
- PauseActivityItem item = PauseActivityItem.obtain(true /* finished */,
+ PauseActivityItem item = PauseActivityItem.obtain(mActivityToken, true /* finished */,
true /* userLeaving */, 135 /* configChanges */, true /* dontReport */,
true /* autoEnteringPip */);
writeAndPrepareForReading(item);
@@ -215,13 +230,13 @@ public class TransactionParcelTests {
PauseActivityItem result = PauseActivityItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testResume() {
// Write to parcel
- ResumeActivityItem item = ResumeActivityItem.obtain(27 /* procState */,
+ ResumeActivityItem item = ResumeActivityItem.obtain(mActivityToken, 27 /* procState */,
true /* isForward */, false /* shouldSendCompatFakeFocus */);
writeAndPrepareForReading(item);
@@ -229,26 +244,27 @@ public class TransactionParcelTests {
ResumeActivityItem result = ResumeActivityItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testStop() {
// Write to parcel
- StopActivityItem item = StopActivityItem.obtain(14 /* configChanges */);
+ StopActivityItem item = StopActivityItem.obtain(mActivityToken, 14 /* configChanges */);
writeAndPrepareForReading(item);
// Read from parcel and assert
StopActivityItem result = StopActivityItem.CREATOR.createFromParcel(mParcel);
assertEquals(item.hashCode(), result.hashCode());
- assertTrue(item.equals(result));
+ assertEquals(item, result);
}
@Test
public void testStart() {
// Write to parcel
- StartActivityItem item = StartActivityItem.obtain(ActivityOptions.makeBasic());
+ StartActivityItem item = StartActivityItem.obtain(mActivityToken,
+ ActivityOptions.makeBasic());
writeAndPrepareForReading(item);
// Read from parcel and assert
@@ -261,11 +277,12 @@ public class TransactionParcelTests {
@Test
public void testClientTransaction() {
// Write to parcel
- NewIntentItem callback1 = NewIntentItem.obtain(new ArrayList<>(), true);
+ NewIntentItem callback1 = NewIntentItem.obtain(mActivityToken, new ArrayList<>(), true);
ActivityConfigurationChangeItem callback2 = ActivityConfigurationChangeItem.obtain(
- config());
+ mActivityToken, config());
- StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
+ StopActivityItem lifecycleRequest = StopActivityItem.obtain(mActivityToken,
+ 78 /* configChanges */);
Binder activityToken = new Binder();
@@ -280,15 +297,15 @@ public class TransactionParcelTests {
ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
assertEquals(transaction.hashCode(), result.hashCode());
- assertTrue(transaction.equals(result));
+ assertEquals(transaction, result);
}
@Test
public void testClientTransactionCallbacksOnly() {
// Write to parcel
- NewIntentItem callback1 = NewIntentItem.obtain(new ArrayList<>(), true);
+ NewIntentItem callback1 = NewIntentItem.obtain(mActivityToken, new ArrayList<>(), true);
ActivityConfigurationChangeItem callback2 = ActivityConfigurationChangeItem.obtain(
- config());
+ mActivityToken, config());
Binder activityToken = new Binder();
@@ -302,13 +319,14 @@ public class TransactionParcelTests {
ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
assertEquals(transaction.hashCode(), result.hashCode());
- assertTrue(transaction.equals(result));
+ assertEquals(transaction, result);
}
@Test
public void testClientTransactionLifecycleOnly() {
// Write to parcel
- StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
+ StopActivityItem lifecycleRequest = StopActivityItem.obtain(mActivityToken,
+ 78 /* configChanges */);
Binder activityToken = new Binder();
@@ -321,7 +339,7 @@ public class TransactionParcelTests {
ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
assertEquals(transaction.hashCode(), result.hashCode());
- assertTrue(transaction.equals(result));
+ assertEquals(transaction, result);
}
/** Write to {@link #mParcel} and reset its position to prepare for reading from the start. */
diff --git a/core/tests/coretests/src/android/database/DatabaseUtilsTest.java b/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
index be156c8eb67a..13ce253e2210 100644
--- a/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
+++ b/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
@@ -17,6 +17,15 @@
package android.database;
import static android.database.DatabaseUtils.bindSelection;
+import static android.database.DatabaseUtils.getSqlStatementType;
+import static android.database.DatabaseUtils.getSqlStatementTypeExtended;
+import static android.database.DatabaseUtils.STATEMENT_COMMENT;
+import static android.database.DatabaseUtils.STATEMENT_CREATE;
+import static android.database.DatabaseUtils.STATEMENT_DDL;
+import static android.database.DatabaseUtils.STATEMENT_OTHER;
+import static android.database.DatabaseUtils.STATEMENT_SELECT;
+import static android.database.DatabaseUtils.STATEMENT_UPDATE;
+import static android.database.DatabaseUtils.STATEMENT_WITH;
import static org.junit.Assert.assertEquals;
@@ -63,4 +72,39 @@ public class DatabaseUtilsTest {
bindSelection("foo=?10 AND bar=? AND meow=?1",
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
}
+
+ @Test
+ public void testStatementType() {
+ final int sel = STATEMENT_SELECT;
+ assertEquals(sel, getSqlStatementType("SELECT"));
+ assertEquals(sel, getSqlStatementType(" SELECT"));
+ assertEquals(sel, getSqlStatementType(" \n SELECT"));
+
+ final int upd = STATEMENT_UPDATE;
+ assertEquals(upd, getSqlStatementType("UPDATE"));
+ assertEquals(upd, getSqlStatementType(" UPDATE"));
+ assertEquals(upd, getSqlStatementType(" \n UPDATE"));
+
+ final int ddl = STATEMENT_DDL;
+ assertEquals(ddl, getSqlStatementType("ALTER TABLE t1 ADD COLUMN j int"));
+ assertEquals(ddl, getSqlStatementType("CREATE TABLE t1 (i int)"));
+
+ // Short statements, leading comments, and WITH are decoded to "other" in the public API.
+ final int othr = STATEMENT_OTHER;
+ assertEquals(othr, getSqlStatementType("SE"));
+ assertEquals(othr, getSqlStatementType("SE LECT"));
+ assertEquals(othr, getSqlStatementType("-- cmt\n SE"));
+ assertEquals(othr, getSqlStatementType("WITH"));
+
+ // Test the extended statement types.
+
+ final int wit = STATEMENT_WITH;
+ assertEquals(wit, getSqlStatementTypeExtended("WITH"));
+
+ final int cmt = STATEMENT_COMMENT;
+ assertEquals(cmt, getSqlStatementTypeExtended("-- cmt\n SELECT"));
+
+ final int cre = STATEMENT_CREATE;
+ assertEquals(cre, getSqlStatementTypeExtended("CREATE TABLE t1 (i int)"));
+ }
}
diff --git a/core/tests/coretests/src/android/provider/DeviceConfigTest.java b/core/tests/coretests/src/android/provider/DeviceConfigTest.java
index 349fe7b36ef5..0e1a6b7e7daa 100644
--- a/core/tests/coretests/src/android/provider/DeviceConfigTest.java
+++ b/core/tests/coretests/src/android/provider/DeviceConfigTest.java
@@ -20,6 +20,7 @@ import static android.provider.DeviceConfig.Properties;
import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertTrue;
import static org.testng.Assert.assertThrows;
import android.app.ActivityThread;
@@ -28,6 +29,7 @@ import android.os.Bundle;
import android.platform.test.annotations.Presubmit;
import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -69,6 +71,7 @@ public class DeviceConfigTest {
deleteViaContentProvider(NAMESPACE, KEY2);
deleteViaContentProvider(NAMESPACE, KEY3);
DeviceConfig.clearAllLocalOverrides();
+ DeviceConfig.setSyncDisabledMode(DeviceConfig.SYNC_DISABLED_MODE_NONE);
}
/**
@@ -625,6 +628,7 @@ public class DeviceConfigTest {
}
@Test
+ @FlakyTest(bugId = 299483542)
public void setProperties_multipleNamespaces() throws DeviceConfig.BadConfigException {
final String namespace2 = "namespace2";
Properties properties1 = new Properties.Builder(NAMESPACE).setString(KEY, VALUE)
@@ -632,8 +636,8 @@ public class DeviceConfigTest {
Properties properties2 = new Properties.Builder(namespace2).setString(KEY2, VALUE)
.setString(KEY3, VALUE2).build();
- DeviceConfig.setProperties(properties1);
- DeviceConfig.setProperties(properties2);
+ assertTrue(DeviceConfig.setProperties(properties1));
+ assertTrue(DeviceConfig.setProperties(properties2));
Properties properties = DeviceConfig.getProperties(NAMESPACE);
assertThat(properties.getKeyset()).containsExactly(KEY, KEY2);
diff --git a/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java b/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
index a2c41e440107..d2af2a734330 100644
--- a/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
+++ b/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
@@ -47,7 +47,6 @@ public final class HapticScrollFeedbackProviderTest {
private static final int INPUT_DEVICE_2 = 2;
private TestView mView;
- private long mCurrentTimeMillis = 1000; // arbitrary starting time value
@Mock ViewConfiguration mMockViewConfig;
@@ -67,24 +66,15 @@ public final class HapticScrollFeedbackProviderTest {
setHapticScrollFeedbackEnabled(false);
// Call different types scroll feedback methods; non of them should produce feedback because
// feedback has been disabled.
- mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
mProvider.onSnapToItem(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
- mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ true);
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ -9);
- mProvider.onScrollProgress(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* deltaInPixels= */ 300);
mProvider.onScrollProgress(
@@ -95,14 +85,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testSnapToItem_withMotionEvent() {
- mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_ITEM_FOCUS);
- }
-
- @Test
- public void testSnapToItem_withDeviceIdAndSource() {
+ public void testSnapToItem() {
mProvider.onSnapToItem(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
@@ -110,15 +93,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_start_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
- }
-
- @Test
- public void testScrollLimit_start_withDeviceIdAndSource() {
+ public void testScrollLimit_start() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ true);
@@ -127,15 +102,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_stop_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
- }
-
- @Test
- public void testScrollLimit_stop_withDeviceIdAndSource() {
+ public void testScrollLimit_stop() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -144,21 +111,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollProgress_zeroTickInterval_withMotionEvent() {
- setHapticScrollTickInterval(0);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
-
- assertNoFeedback(mView);
- }
-
- @Test
- public void testScrollProgress_zeroTickInterval_withDeviceIdAndSource() {
+ public void testScrollProgress_zeroTickInterval() {
setHapticScrollTickInterval(0);
mProvider.onScrollProgress(
@@ -172,30 +125,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold_withMotionEvent() {
- setHapticScrollTickInterval(100);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 20);
-
- assertNoFeedback(mView);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
- }
-
- @Test
- public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold_withDeviceIdAndSrc() {
+ public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold() {
setHapticScrollTickInterval(100);
mProvider.onScrollProgress(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
@@ -217,37 +147,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold_withMotionEvent() {
- setHapticScrollTickInterval(100);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -20);
-
- assertNoFeedback(mView);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -80);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -70);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -40);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
- }
-
- @Test
- public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold_withDeviceIdAndSrc() {
+ public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold() {
setHapticScrollTickInterval(100);
mProvider.onScrollProgress(
@@ -273,42 +173,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollProgress_positiveAndNegativeProgresses_withMotionEvent() {
- setHapticScrollTickInterval(100);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 20);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -90);
-
- assertNoFeedback(mView);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
-
- assertNoFeedback(mView);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ -50);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 50);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 60);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
- }
-
- @Test
- public void testScrollProgress_positiveAndNegativeProgresses_withDeviceIdAndSource() {
+ public void testScrollProgress_positiveAndNegativeProgresses() {
setHapticScrollTickInterval(100);
mProvider.onScrollProgress(
@@ -348,19 +213,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollProgress_singleProgressExceedsThreshold_withMotionEvent() {
- setHapticScrollTickInterval(100);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(),
- MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ 1000);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
- }
-
- @Test
- public void testScrollProgress_singleProgressExceedsThreshold_withDeviceIdAndSource() {
+ public void testScrollProgress_singleProgressExceedsThreshold() {
setHapticScrollTickInterval(100);
mProvider.onScrollProgress(
@@ -371,17 +224,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
- }
-
- @Test
- public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+ public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -393,17 +236,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
- }
-
- @Test
- public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+ public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ true);
@@ -415,17 +248,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
- }
-
- @Test
- public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+ public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -439,14 +262,15 @@ public final class HapticScrollFeedbackProviderTest {
@Test
public void testScrollLimit_notEnabledWithZeroProgress() {
mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_1), MotionEvent.AXIS_SCROLL,
+ INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
mProvider.onScrollProgress(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* deltaInPixels= */ 0);
mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
+ INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
+ /* isStart= */ true);
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -455,20 +279,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_enabledWithProgress_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
- }
-
- @Test
- public void testScrollLimit_enabledWithProgress_withDeviceIdAndSource() {
+ public void testScrollLimit_enabledWithProgress() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -484,19 +295,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_enabledWithSnap_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertFeedbackCount(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
- }
-
- @Test
- public void testScrollLimit_enabledWithSnap_withDeviceIdAndSource() {
+ public void testScrollLimit_enabledWithSnap() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -511,19 +310,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_enabledWithDissimilarSnap_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- mProvider.onSnapToItem(createTouchMoveEvent(), MotionEvent.AXIS_X);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertFeedbackCount(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
- }
-
- @Test
- public void testScrollLimit_enabledWithDissimilarSnap_withDeviceIdAndSource() {
+ public void testScrollLimit_enabledWithDissimilarSnap() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -538,20 +325,7 @@ public final class HapticScrollFeedbackProviderTest {
}
@Test
- public void testScrollLimit_enabledWithDissimilarProgress_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- mProvider.onScrollProgress(
- createTouchMoveEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
- }
-
- @Test
- public void testScrollLimit_enabledWithDissimilarProgress_withDeviceIdAndSource() {
+ public void testScrollLimit_enabledWithDissimilarProgress() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -566,54 +340,9 @@ public final class HapticScrollFeedbackProviderTest {
assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
}
- @Test
- public void testScrollLimit_enabledWithDissimilarLimit_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- mProvider.onScrollLimit(createTouchMoveEvent(), MotionEvent.AXIS_SCROLL, false);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
- }
@Test
- public void testScrollLimit_enabledWithDissimilarLimit_withDeviceIdAndSource() {
- mProvider.onScrollLimit(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
-
- mProvider.onScrollLimit(INPUT_DEVICE_2, InputDevice.SOURCE_TOUCHSCREEN, MotionEvent.AXIS_X,
- /* isStart= */ false);
- mProvider.onScrollLimit(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
- }
-
- @Test
- public void testScrollLimit_enabledWithMotionFromDifferentDeviceId_withMotionEvent() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
- MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
-
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_2),
- MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
- MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
- }
-
- @Test
- public void testScrollLimit_enabledWithMotionFromDifferentDeviceId_withDeviceIdAndSource() {
+ public void testScrollLimit_enabledWithMotionFromDifferentDeviceId() {
mProvider.onScrollLimit(
INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
/* isStart= */ false);
@@ -632,57 +361,6 @@ public final class HapticScrollFeedbackProviderTest {
assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
}
- @Test
- public void testSnapToItem_differentApis() {
- mProvider.onSnapToItem(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
- mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_ITEM_FOCUS, 2);
- }
-
- @Test
- public void testScrollLimit_differentApis() {
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
- MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
- mProvider.onScrollLimit(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* isStart= */ false);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 1);
-
- mProvider.onScrollLimit(
- INPUT_DEVICE_2, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* isStart= */ true);
- mProvider.onScrollLimit(
- createRotaryEncoderScrollEvent(INPUT_DEVICE_2),
- MotionEvent.AXIS_SCROLL,
- /* isStart= */ true);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
- }
-
- @Test
- public void testScrollProgress_differentApis() {
- setHapticScrollTickInterval(100);
-
- // Neither types of APIs independently excceeds the "100" tick interval.
- // But the combined deltas pass 100.
- mProvider.onScrollProgress(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ 20);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
- mProvider.onScrollProgress(
- INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
- /* deltaInPixels= */ 30);
- mProvider.onScrollProgress(
- createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
-
- assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
- }
private void assertNoFeedback(TestView view) {
for (int feedback : new int[] {SCROLL_ITEM_FOCUS, SCROLL_LIMIT, SCROLL_TICK}) {
@@ -715,41 +393,6 @@ public final class HapticScrollFeedbackProviderTest {
.thenReturn(enabled);
}
- private MotionEvent createTouchMoveEvent() {
- long downTime = mCurrentTimeMillis;
- long eventTime = mCurrentTimeMillis + 2; // arbitrary increment from the down time.
- ++mCurrentTimeMillis;
- return MotionEvent.obtain(
- downTime , eventTime, MotionEvent.ACTION_MOVE, /* x= */ 3, /* y= */ 5, 0);
- }
-
- private MotionEvent createRotaryEncoderScrollEvent() {
- return createRotaryEncoderScrollEvent(INPUT_DEVICE_1);
- }
-
- private MotionEvent createRotaryEncoderScrollEvent(int deviceId) {
- MotionEvent.PointerProperties props = new MotionEvent.PointerProperties();
- props.id = 0;
-
- MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords();
- coords.setAxisValue(MotionEvent.AXIS_SCROLL, 20);
-
- return MotionEvent.obtain(0 /* downTime */,
- ++mCurrentTimeMillis,
- MotionEvent.ACTION_SCROLL,
- /* pointerCount= */ 1,
- new MotionEvent.PointerProperties[] {props},
- new MotionEvent.PointerCoords[] {coords},
- /* metaState= */ 0,
- /* buttonState= */ 0,
- /* xPrecision= */ 0,
- /* yPrecision= */ 0,
- deviceId,
- /* edgeFlags= */ 0,
- InputDevice.SOURCE_ROTARY_ENCODER,
- /* flags= */ 0);
- }
-
private static class TestView extends View {
final Map<Integer, Integer> mFeedbackCount = new HashMap<>();
diff --git a/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java b/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
index c46118db617f..f39bddd7f032 100644
--- a/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
+++ b/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
@@ -88,8 +88,8 @@ public class HandwritingInitiatorTest {
}
private HandwritingInitiator mHandwritingInitiator;
- private View mTestView1;
- private View mTestView2;
+ private EditText mTestView1;
+ private EditText mTestView2;
private Context mContext;
@Before
@@ -123,6 +123,9 @@ public class HandwritingInitiatorTest {
@Test
public void onTouchEvent_startHandwriting_when_stylusMoveOnce_withinHWArea() {
+ mTestView1.setText("hello");
+ when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
+
mHandwritingInitiator.onInputConnectionCreated(mTestView1);
final int x1 = (sHwArea1.left + sHwArea1.right) / 2;
final int y1 = (sHwArea1.top + sHwArea1.bottom) / 2;
@@ -141,6 +144,9 @@ public class HandwritingInitiatorTest {
// After IMM.startHandwriting is triggered, onTouchEvent should return true for ACTION_MOVE
// events so that the events are not dispatched to the view tree.
assertThat(onTouchEventResult2).isTrue();
+ // Since the stylus down point was inside the TextView's bounds, the handwriting initiator
+ // does not need to set the cursor position.
+ verify(mTestView1, never()).setSelection(anyInt());
}
@Test
@@ -185,6 +191,9 @@ public class HandwritingInitiatorTest {
@Test
public void onTouchEvent_startHandwriting_when_stylusMove_withinExtendedHWArea() {
+ mTestView1.setText("hello");
+ when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
+
mHandwritingInitiator.onInputConnectionCreated(mTestView1);
final int x1 = sHwArea1.left - HW_BOUNDS_OFFSETS_LEFT_PX / 2;
final int y1 = sHwArea1.top - HW_BOUNDS_OFFSETS_TOP_PX / 2;
@@ -199,6 +208,9 @@ public class HandwritingInitiatorTest {
// Stylus movement within extended HandwritingArea should trigger IMM.startHandwriting once.
verify(mHandwritingInitiator, times(1)).startHandwriting(mTestView1);
+ // Since the stylus down point was outside the TextView's bounds, the handwriting initiator
+ // sets the cursor position.
+ verify(mTestView1).setSelection(4);
}
@Test
@@ -221,6 +233,8 @@ public class HandwritingInitiatorTest {
@Test
public void onTouchEvent_startHandwriting_inputConnectionBuilt_stylusMoveInExtendedHWArea() {
+ mTestView1.setText("hello");
+ when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
// The stylus down point is between mTestView1 and mTestView2, but it is within the
// extended handwriting area of both views. It is closer to mTestView1.
final int x1 = sHwArea1.right + HW_BOUNDS_OFFSETS_RIGHT_PX / 2;
@@ -241,6 +255,9 @@ public class HandwritingInitiatorTest {
// the stylus down point is closest to this view.
mHandwritingInitiator.onInputConnectionCreated(mTestView1);
verify(mHandwritingInitiator).startHandwriting(mTestView1);
+ // Since the stylus down point was outside the TextView's bounds, the handwriting initiator
+ // sets the cursor position.
+ verify(mTestView1).setSelection(4);
}
@Test
diff --git a/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java b/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
index b4c72ca3226b..3b2ab4c8bb50 100644
--- a/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
+++ b/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
@@ -16,6 +16,9 @@
package android.view.stylus;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyFloat;
+import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
@@ -26,22 +29,23 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.EditText;
import androidx.test.platform.app.InstrumentationRegistry;
public class HandwritingTestUtil {
- public static View createView(Rect handwritingArea) {
+ public static EditText createView(Rect handwritingArea) {
return createView(handwritingArea, true /* autoHandwritingEnabled */,
true /* isStylusHandwritingAvailable */);
}
- public static View createView(Rect handwritingArea, boolean autoHandwritingEnabled,
+ public static EditText createView(Rect handwritingArea, boolean autoHandwritingEnabled,
boolean isStylusHandwritingAvailable) {
return createView(handwritingArea, autoHandwritingEnabled, isStylusHandwritingAvailable,
0, 0, 0, 0);
}
- public static View createView(Rect handwritingArea, boolean autoHandwritingEnabled,
+ public static EditText createView(Rect handwritingArea, boolean autoHandwritingEnabled,
boolean isStylusHandwritingAvailable,
float handwritingBoundsOffsetLeft, float handwritingBoundsOffsetTop,
float handwritingBoundsOffsetRight, float handwritingBoundsOffsetBottom) {
@@ -68,7 +72,7 @@ public class HandwritingTestUtil {
}
};
- View view = spy(new View(context));
+ EditText view = spy(new EditText(context));
when(view.isAttachedToWindow()).thenReturn(true);
when(view.isAggregatedVisible()).thenReturn(true);
when(view.isStylusHandwritingAvailable()).thenReturn(isStylusHandwritingAvailable);
@@ -77,6 +81,13 @@ public class HandwritingTestUtil {
when(view.getHandwritingBoundsOffsetTop()).thenReturn(handwritingBoundsOffsetTop);
when(view.getHandwritingBoundsOffsetRight()).thenReturn(handwritingBoundsOffsetRight);
when(view.getHandwritingBoundsOffsetBottom()).thenReturn(handwritingBoundsOffsetBottom);
+ doAnswer(invocation -> {
+ int[] outLocation = invocation.getArgument(0);
+ outLocation[0] = handwritingArea.left;
+ outLocation[1] = handwritingArea.top;
+ return null;
+ }).when(view).getLocationInWindow(any());
+ when(view.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(0);
view.setAutoHandwritingEnabled(autoHandwritingEnabled);
parent.addView(view);
return view;
diff --git a/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java b/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
index a49bb6af13d2..109c8080de94 100644
--- a/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
+++ b/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
@@ -17,7 +17,9 @@
package android.widget;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import android.content.Context;
import android.platform.test.annotations.Presubmit;
import android.util.PollingCheck;
@@ -32,6 +34,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
@RunWith(AndroidJUnit4.class)
@MediumTest
@Presubmit
@@ -49,23 +54,43 @@ public class ScrollViewFunctionalTest {
}
@Test
- public void testScrollAfterFlingTop() {
- mScrollView.scrollTo(0, 100);
- mScrollView.fling(-10000);
- PollingCheck.waitFor(() -> mScrollView.mEdgeGlowTop.getDistance() > 0);
- PollingCheck.waitFor(() -> mScrollView.mEdgeGlowTop.getDistance() == 0f);
+ public void testScrollAfterFlingTop() throws Throwable {
+ WatchedEdgeEffect edgeEffect = new WatchedEdgeEffect(mActivity);
+ mScrollView.mEdgeGlowTop = edgeEffect;
+ mActivityRule.runOnUiThread(() -> mScrollView.scrollTo(0, 100));
+ mActivityRule.runOnUiThread(() -> mScrollView.fling(-10000));
+ assertTrue(edgeEffect.onAbsorbLatch.await(1, TimeUnit.SECONDS));
+ mActivityRule.runOnUiThread(() -> {}); // let the absorb takes effect -- least one frame
+ PollingCheck.waitFor(() -> edgeEffect.getDistance() == 0f);
assertEquals(0, mScrollView.getScrollY());
}
@Test
- public void testScrollAfterFlingBottom() {
+ public void testScrollAfterFlingBottom() throws Throwable {
+ WatchedEdgeEffect edgeEffect = new WatchedEdgeEffect(mActivity);
+ mScrollView.mEdgeGlowBottom = edgeEffect;
int childHeight = mScrollView.getChildAt(0).getHeight();
int maxScroll = childHeight - mScrollView.getHeight();
- mScrollView.scrollTo(0, maxScroll - 100);
- mScrollView.fling(10000);
- PollingCheck.waitFor(() -> mScrollView.mEdgeGlowBottom.getDistance() > 0);
- PollingCheck.waitFor(() -> mScrollView.mEdgeGlowBottom.getDistance() == 0f);
+ mActivityRule.runOnUiThread(() -> mScrollView.scrollTo(0, maxScroll - 100));
+ mActivityRule.runOnUiThread(() -> mScrollView.fling(10000));
+ assertTrue(edgeEffect.onAbsorbLatch.await(1, TimeUnit.SECONDS));
+ mActivityRule.runOnUiThread(() -> {}); // let the absorb takes effect -- least one frame
+ PollingCheck.waitFor(() -> edgeEffect.getDistance() == 0f);
assertEquals(maxScroll, mScrollView.getScrollY());
}
+
+ static class WatchedEdgeEffect extends EdgeEffect {
+ public CountDownLatch onAbsorbLatch = new CountDownLatch(1);
+
+ WatchedEdgeEffect(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void onAbsorb(int velocity) {
+ super.onAbsorb(velocity);
+ onAbsorbLatch.countDown();
+ }
+ }
}
diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java b/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java
new file mode 100644
index 000000000000..4aca854469f2
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.internal.app;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.app.prediction.AppTarget;
+import android.app.prediction.AppTargetId;
+import android.os.UserHandle;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.List;
+import java.util.function.Consumer;
+
+@RunWith(AndroidJUnit4.class)
+public class ResolverAppPredictorCallbackTest {
+ private class Callback implements Consumer<List<AppTarget>> {
+ public int count = 0;
+ public List<AppTarget> latest = null;
+ @Override
+ public void accept(List<AppTarget> appTargets) {
+ count++;
+ latest = appTargets;
+ }
+ };
+
+ @Test
+ public void testAsConsumer() {
+ Callback callback = new Callback();
+ ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+ assertThat(callback.count).isEqualTo(0);
+
+ List<AppTarget> targets = createAppTargetList();
+ wrapped.asConsumer().accept(targets);
+
+ assertThat(callback.count).isEqualTo(1);
+ assertThat(callback.latest).isEqualTo(targets);
+
+ wrapped.destroy();
+
+ // Shouldn't do anything:
+ wrapped.asConsumer().accept(targets);
+
+ assertThat(callback.count).isEqualTo(1);
+ }
+
+ @Test
+ public void testAsCallback() {
+ Callback callback = new Callback();
+ ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+ assertThat(callback.count).isEqualTo(0);
+
+ List<AppTarget> targets = createAppTargetList();
+ wrapped.asCallback().onTargetsAvailable(targets);
+
+ assertThat(callback.count).isEqualTo(1);
+ assertThat(callback.latest).isEqualTo(targets);
+
+ wrapped.destroy();
+
+ // Shouldn't do anything:
+ wrapped.asConsumer().accept(targets);
+
+ assertThat(callback.count).isEqualTo(1);
+ }
+
+ @Test
+ public void testAsConsumer_null() {
+ Callback callback = new Callback();
+ ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+ assertThat(callback.count).isEqualTo(0);
+
+ wrapped.asConsumer().accept(null);
+
+ assertThat(callback.count).isEqualTo(1);
+ assertThat(callback.latest).isEmpty();
+
+ wrapped.destroy();
+
+ // Shouldn't do anything:
+ wrapped.asConsumer().accept(null);
+
+ assertThat(callback.count).isEqualTo(1);
+ }
+
+ private List<AppTarget> createAppTargetList() {
+ AppTarget.Builder builder = new AppTarget.Builder(
+ new AppTargetId("ID"), "package", UserHandle.CURRENT);
+ return List.of(builder.build());
+ }
+}
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 3206dd2123d5..69aa40156e78 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -235,6 +235,7 @@ applications that come with the platform
<privapp-permissions package="com.android.shell">
<!-- Needed for test only -->
+ <permission name="android.permission.CAMERA_HEADLESS_SYSTEM_USER"/>
<permission name="android.permission.MANAGE_HEALTH_DATA"/>
<permission name="android.permission.LAUNCH_DEVICE_MANAGER_SETUP"/>
<permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json
index 721a2db9d6d3..ee2eacfd304f 100644
--- a/data/etc/services.core.protolog.json
+++ b/data/etc/services.core.protolog.json
@@ -1021,6 +1021,12 @@
"group": "WM_DEBUG_REMOTE_ANIMATIONS",
"at": "com\/android\/server\/wm\/NonAppWindowAnimationAdapter.java"
},
+ "-1152771606": {
+ "message": "Content Recording: Display %d was already recording, but pause capture since the task is in PIP",
+ "level": "VERBOSE",
+ "group": "WM_DEBUG_CONTENT_RECORDING",
+ "at": "com\/android\/server\/wm\/ContentRecorder.java"
+ },
"-1145384901": {
"message": "shouldWaitAnimatingExit: isTransition: %s",
"level": "DEBUG",
@@ -2335,6 +2341,12 @@
"group": "WM_DEBUG_SYNC_ENGINE",
"at": "com\/android\/server\/wm\/WindowState.java"
},
+ "1877956": {
+ "message": "Content Recording: Display %d should start recording, but don't yet since the task is in PIP",
+ "level": "VERBOSE",
+ "group": "WM_DEBUG_CONTENT_RECORDING",
+ "at": "com\/android\/server\/wm\/ContentRecorder.java"
+ },
"3593205": {
"message": "commitVisibility: %s: visible=%b mVisibleRequested=%b",
"level": "VERBOSE",
diff --git a/data/keyboards/qwerty.idc b/data/keyboards/qwerty.idc
deleted file mode 100644
index 375d78576548..000000000000
--- a/data/keyboards/qwerty.idc
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-#
-# Emulator keyboard configuration file #1.
-#
-
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-
-keyboard.layout = qwerty
-keyboard.characterMap = qwerty
-keyboard.orientationAware = 1
-keyboard.builtIn = 1
-
-cursor.mode = navigation
-cursor.orientationAware = 1
diff --git a/data/keyboards/qwerty.kcm b/data/keyboards/qwerty.kcm
deleted file mode 100644
index f3e152418a4c..000000000000
--- a/data/keyboards/qwerty.kcm
+++ /dev/null
@@ -1,508 +0,0 @@
-# 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.
-
-#
-# Emulator keyboard character map #1.
-#
-# This file is no longer used as the platform's default keyboard character map.
-# Refer to Generic.kcm and Virtual.kcm instead.
-#
-
-type ALPHA
-
-key A {
- label: 'A'
- number: '2'
- base: 'a'
- shift, capslock: 'A'
- alt: '#'
- shift+alt, capslock+alt: none
-}
-
-key B {
- label: 'B'
- number: '2'
- base: 'b'
- shift, capslock: 'B'
- alt: '<'
- shift+alt, capslock+alt: none
-}
-
-key C {
- label: 'C'
- number: '2'
- base: 'c'
- shift, capslock: 'C'
- alt: '9'
- shift+alt, capslock+alt: '\u00e7'
-}
-
-key D {
- label: 'D'
- number: '3'
- base: 'd'
- shift, capslock: 'D'
- alt: '5'
- shift+alt, capslock+alt: none
-}
-
-key E {
- label: 'E'
- number: '3'
- base: 'e'
- shift, capslock: 'E'
- alt: '2'
- shift+alt, capslock+alt: '\u0301'
-}
-
-key F {
- label: 'F'
- number: '3'
- base: 'f'
- shift, capslock: 'F'
- alt: '6'
- shift+alt, capslock+alt: '\u00a5'
-}
-
-key G {
- label: 'G'
- number: '4'
- base: 'g'
- shift, capslock: 'G'
- alt: '-'
- shift+alt, capslock+alt: '_'
-}
-
-key H {
- label: 'H'
- number: '4'
- base: 'h'
- shift, capslock: 'H'
- alt: '['
- shift+alt, capslock+alt: '{'
-}
-
-key I {
- label: 'I'
- number: '4'
- base: 'i'
- shift, capslock: 'I'
- alt: '$'
- shift+alt, capslock+alt: '\u0302'
-}
-
-key J {
- label: 'J'
- number: '5'
- base: 'j'
- shift, capslock: 'J'
- alt: ']'
- shift+alt, capslock+alt: '}'
-}
-
-key K {
- label: 'K'
- number: '5'
- base: 'k'
- shift, capslock: 'K'
- alt: '"'
- shift+alt, capslock+alt: '~'
-}
-
-key L {
- label: 'L'
- number: '5'
- base: 'l'
- shift, capslock: 'L'
- alt: '\''
- shift+alt, capslock+alt: '`'
-}
-
-key M {
- label: 'M'
- number: '6'
- base: 'm'
- shift, capslock: 'M'
- alt: '!'
- shift+alt, capslock+alt: none
-}
-
-key N {
- label: 'N'
- number: '6'
- base: 'n'
- shift, capslock: 'N'
- alt: '>'
- shift+alt, capslock+alt: '\u0303'
-}
-
-key O {
- label: 'O'
- number: '6'
- base: 'o'
- shift, capslock: 'O'
- alt: '('
- shift+alt, capslock+alt: none
-}
-
-key P {
- label: 'P'
- number: '7'
- base: 'p'
- shift, capslock: 'P'
- alt: ')'
- shift+alt, capslock+alt: none
-}
-
-key Q {
- label: 'Q'
- number: '7'
- base: 'q'
- shift, capslock: 'Q'
- alt: '*'
- shift+alt, capslock+alt: '\u0300'
-}
-
-key R {
- label: 'R'
- number: '7'
- base: 'r'
- shift, capslock: 'R'
- alt: '3'
- shift+alt, capslock+alt: '\u20ac'
-}
-
-key S {
- label: 'S'
- number: '7'
- base: 's'
- shift, capslock: 'S'
- alt: '4'
- shift+alt, capslock+alt: '\u00df'
-}
-
-key T {
- label: 'T'
- number: '8'
- base: 't'
- shift, capslock: 'T'
- alt: '+'
- shift+alt, capslock+alt: '\u00a3'
-}
-
-key U {
- label: 'U'
- number: '8'
- base: 'u'
- shift, capslock: 'U'
- alt: '&'
- shift+alt, capslock+alt: '\u0308'
-}
-
-key V {
- label: 'V'
- number: '8'
- base: 'v'
- shift, capslock: 'V'
- alt: '='
- shift+alt, capslock+alt: '^'
-}
-
-key W {
- label: 'W'
- number: '9'
- base: 'w'
- shift, capslock: 'W'
- alt: '1'
- shift+alt, capslock+alt: none
-}
-
-key X {
- label: 'X'
- number: '9'
- base: 'x'
- shift, capslock: 'X'
- alt: '8'
- shift+alt, capslock+alt: '\uef00'
-}
-
-key Y {
- label: 'Y'
- number: '9'
- base: 'y'
- shift, capslock: 'Y'
- alt: '%'
- shift+alt, capslock+alt: '\u00a1'
-}
-
-key Z {
- label: 'Z'
- number: '9'
- base: 'z'
- shift, capslock: 'Z'
- alt: '7'
- shift+alt, capslock+alt: none
-}
-
-key COMMA {
- label: ','
- number: ','
- base: ','
- shift: ';'
- alt: ';'
- shift+alt: '|'
-}
-
-key PERIOD {
- label: '.'
- number: '.'
- base: '.'
- shift: ':'
- alt: ':'
- shift+alt: '\u2026'
-}
-
-key AT {
- label: '@'
- number: '0'
- base: '@'
- shift: '0'
- alt: '0'
- shift+alt: '\u2022'
-}
-
-key SLASH {
- label: '/'
- number: '/'
- base: '/'
- shift: '?'
- alt: '?'
- shift+alt: '\\'
-}
-
-key SPACE {
- label: ' '
- number: ' '
- base: ' '
- shift: ' '
- alt: '\uef01'
- shift+alt: '\uef01'
-}
-
-key ENTER {
- label: '\n'
- number: '\n'
- base: '\n'
- shift: '\n'
- alt: '\n'
- shift+alt: '\n'
-}
-
-key TAB {
- label: '\t'
- number: '\t'
- base: '\t'
- shift: '\t'
- alt: '\t'
- shift+alt: '\t'
-}
-
-key 0 {
- label: '0'
- number: '0'
- base: '0'
- shift: ')'
- alt: ')'
- shift+alt: ')'
-}
-
-key 1 {
- label: '1'
- number: '1'
- base: '1'
- shift: '!'
- alt: '!'
- shift+alt: '!'
-}
-
-key 2 {
- label: '2'
- number: '2'
- base: '2'
- shift: '@'
- alt: '@'
- shift+alt: '@'
-}
-
-key 3 {
- label: '3'
- number: '3'
- base: '3'
- shift: '#'
- alt: '#'
- shift+alt: '#'
-}
-
-key 4 {
- label: '4'
- number: '4'
- base: '4'
- shift: '$'
- alt: '$'
- shift+alt: '$'
-}
-
-key 5 {
- label: '5'
- number: '5'
- base: '5'
- shift: '%'
- alt: '%'
- shift+alt: '%'
-}
-
-key 6 {
- label: '6'
- number: '6'
- base: '6'
- shift: '^'
- alt: '^'
- shift+alt: '^'
-}
-
-key 7 {
- label: '7'
- number: '7'
- base: '7'
- shift: '&'
- alt: '&'
- shift+alt: '&'
-}
-
-key 8 {
- label: '8'
- number: '8'
- base: '8'
- shift: '*'
- alt: '*'
- shift+alt: '*'
-}
-
-key 9 {
- label: '9'
- number: '9'
- base: '9'
- shift: '('
- alt: '('
- shift+alt: '('
-}
-
-key GRAVE {
- label: '`'
- number: '`'
- base: '`'
- shift: '~'
- alt: '`'
- shift+alt: '~'
-}
-
-key MINUS {
- label: '-'
- number: '-'
- base: '-'
- shift: '_'
- alt: '-'
- shift+alt: '_'
-}
-
-key EQUALS {
- label: '='
- number: '='
- base: '='
- shift: '+'
- alt: '='
- shift+alt: '+'
-}
-
-key LEFT_BRACKET {
- label: '['
- number: '['
- base: '['
- shift: '{'
- alt: '['
- shift+alt: '{'
-}
-
-key RIGHT_BRACKET {
- label: ']'
- number: ']'
- base: ']'
- shift: '}'
- alt: ']'
- shift+alt: '}'
-}
-
-key BACKSLASH {
- label: '\\'
- number: '\\'
- base: '\\'
- shift: '|'
- alt: '\\'
- shift+alt: '|'
-}
-
-key SEMICOLON {
- label: ';'
- number: ';'
- base: ';'
- shift: ':'
- alt: ';'
- shift+alt: ':'
-}
-
-key APOSTROPHE {
- label: '\''
- number: '\''
- base: '\''
- shift: '"'
- alt: '\''
- shift+alt: '"'
-}
-
-key STAR {
- label: '*'
- number: '*'
- base: '*'
- shift: '*'
- alt: '*'
- shift+alt: '*'
-}
-
-key POUND {
- label: '#'
- number: '#'
- base: '#'
- shift: '#'
- alt: '#'
- shift+alt: '#'
-}
-
-key PLUS {
- label: '+'
- number: '+'
- base: '+'
- shift: '+'
- alt: '+'
- shift+alt: '+'
-}
diff --git a/data/keyboards/qwerty.kl b/data/keyboards/qwerty.kl
deleted file mode 100644
index 2fd99abbb9fe..000000000000
--- a/data/keyboards/qwerty.kl
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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.
-
-#
-# Emulator keyboard layout #1.
-#
-# This file is no longer used as the platform's default keyboard layout.
-# Refer to Generic.kl instead.
-#
-
-key 399 GRAVE
-key 2 1
-key 3 2
-key 4 3
-key 5 4
-key 6 5
-key 7 6
-key 8 7
-key 9 8
-key 10 9
-key 11 0
-key 158 BACK
-key 230 SOFT_RIGHT
-key 60 SOFT_LEFT
-key 107 ENDCALL
-key 62 ENDCALL
-key 229 MENU
-key 139 MENU
-key 59 MENU
-key 127 SEARCH
-key 217 SEARCH
-key 228 POUND
-key 227 STAR
-key 231 CALL
-key 61 CALL
-key 232 DPAD_CENTER
-key 108 DPAD_DOWN
-key 103 DPAD_UP
-key 102 HOME
-key 105 DPAD_LEFT
-key 106 DPAD_RIGHT
-key 115 VOLUME_UP
-key 114 VOLUME_DOWN
-key 116 POWER
-key 212 CAMERA
-
-key 16 Q
-key 17 W
-key 18 E
-key 19 R
-key 20 T
-key 21 Y
-key 22 U
-key 23 I
-key 24 O
-key 25 P
-key 26 LEFT_BRACKET
-key 27 RIGHT_BRACKET
-key 43 BACKSLASH
-
-key 30 A
-key 31 S
-key 32 D
-key 33 F
-key 34 G
-key 35 H
-key 36 J
-key 37 K
-key 38 L
-key 39 SEMICOLON
-key 40 APOSTROPHE
-key 14 DEL
-
-key 44 Z
-key 45 X
-key 46 C
-key 47 V
-key 48 B
-key 49 N
-key 50 M
-key 51 COMMA
-key 52 PERIOD
-key 53 SLASH
-key 28 ENTER
-
-key 56 ALT_LEFT
-key 100 ALT_RIGHT
-key 42 SHIFT_LEFT
-key 54 SHIFT_RIGHT
-key 15 TAB
-key 57 SPACE
-key 150 EXPLORER
-key 155 ENVELOPE
-
-key 12 MINUS
-key 13 EQUALS
-key 215 AT
-
-# On an AT keyboard: ESC, F10
-key 1 BACK
-key 68 MENU
-
-# App switch = Overview key
-key 580 APP_SWITCH
-
-# Media control keys
-key 160 MEDIA_CLOSE
-key 161 MEDIA_EJECT
-key 163 MEDIA_NEXT
-key 164 MEDIA_PLAY_PAUSE
-key 165 MEDIA_PREVIOUS
-key 166 MEDIA_STOP
-key 167 MEDIA_RECORD
-key 168 MEDIA_REWIND
-
-key 142 SLEEP
-key 581 STEM_PRIMARY
-key 582 STEM_1
-key 583 STEM_2
-key 584 STEM_3
diff --git a/data/keyboards/qwerty2.idc b/data/keyboards/qwerty2.idc
deleted file mode 100644
index 369205ea3f98..000000000000
--- a/data/keyboards/qwerty2.idc
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-#
-# Emulator keyboard configuration file #2.
-#
-
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-
-keyboard.layout = qwerty
-keyboard.characterMap = qwerty2
-keyboard.orientationAware = 1
-keyboard.builtIn = 1
-
-cursor.mode = navigation
-cursor.orientationAware = 1
diff --git a/data/keyboards/qwerty2.kcm b/data/keyboards/qwerty2.kcm
deleted file mode 100644
index b981d835bdfb..000000000000
--- a/data/keyboards/qwerty2.kcm
+++ /dev/null
@@ -1,505 +0,0 @@
-# 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.
-
-#
-# Emulator keyboard character map #2.
-#
-
-type ALPHA
-
-key A {
- label: 'A'
- number: '2'
- base: 'a'
- shift, capslock: 'A'
- alt: '\u00e1'
- shift+alt, capslock+alt: '\u00c1'
-}
-
-key B {
- label: 'B'
- number: '2'
- base: 'b'
- shift, capslock: 'B'
- alt: 'b'
- shift+alt, capslock+alt: 'B'
-}
-
-key C {
- label: 'C'
- number: '2'
- base: 'c'
- shift, capslock: 'C'
- alt: '\u00a9'
- shift+alt, capslock+alt: '\u00a2'
-}
-
-key D {
- label: 'D'
- number: '3'
- base: 'd'
- shift, capslock: 'D'
- alt: '\u00f0'
- shift+alt, capslock+alt: '\u00d0'
-}
-
-key E {
- label: 'E'
- number: '3'
- base: 'e'
- shift, capslock: 'E'
- alt: '\u00e9'
- shift+alt, capslock+alt: '\u00c9'
-}
-
-key F {
- label: 'F'
- number: '3'
- base: 'f'
- shift, capslock: 'F'
- alt: '['
- shift+alt, capslock+alt: '['
-}
-
-key G {
- label: 'G'
- number: '4'
- base: 'g'
- shift, capslock: 'G'
- alt: ']'
- shift+alt, capslock+alt: ']'
-}
-
-key H {
- label: 'H'
- number: '4'
- base: 'h'
- shift, capslock: 'H'
- alt: '<'
- shift+alt, capslock+alt: '<'
-}
-
-key I {
- label: 'I'
- number: '4'
- base: 'i'
- shift, capslock: 'I'
- alt: '\u00ed'
- shift+alt, capslock+alt: '\u00cd'
-}
-
-key J {
- label: 'J'
- number: '5'
- base: 'j'
- shift, capslock: 'J'
- alt: '>'
- shift+alt, capslock+alt: '>'
-}
-
-key K {
- label: 'K'
- number: '5'
- base: 'k'
- shift, capslock: 'K'
- alt: ';'
- shift+alt, capslock+alt: '~'
-}
-
-key L {
- label: 'L'
- number: '5'
- base: 'l'
- shift, capslock: 'L'
- alt: '\u00f8'
- shift+alt, capslock+alt: '\u00d8'
-}
-
-key M {
- label: 'M'
- number: '6'
- base: 'm'
- shift, capslock: 'M'
- alt: '\u00b5'
- shift+alt, capslock+alt: none
-}
-
-key N {
- label: 'N'
- number: '6'
- base: 'n'
- shift, capslock: 'N'
- alt: '\u00f1'
- shift+alt, capslock+alt: '\u00d1'
-}
-
-key O {
- label: 'O'
- number: '6'
- base: 'o'
- shift, capslock: 'O'
- alt: '\u00f3'
- shift+alt, capslock+alt: '\u00d3'
-}
-
-key P {
- label: 'P'
- number: '7'
- base: 'p'
- shift, capslock: 'P'
- alt: '\u00f6'
- shift+alt, capslock+alt: '\u00d6'
-}
-
-key Q {
- label: 'Q'
- number: '7'
- base: 'q'
- shift, capslock: 'Q'
- alt: '\u00e4'
- shift+alt, capslock+alt: '\u00c4'
-}
-
-key R {
- label: 'R'
- number: '7'
- base: 'r'
- shift, capslock: 'R'
- alt: '\u00ae'
- shift+alt, capslock+alt: 'R'
-}
-
-key S {
- label: 'S'
- number: '7'
- base: 's'
- shift, capslock: 'S'
- alt: '\u00df'
- shift+alt, capslock+alt: '\u00a7'
-}
-
-key T {
- label: 'T'
- number: '8'
- base: 't'
- shift, capslock: 'T'
- alt: '\u00fe'
- shift+alt, capslock+alt: '\u00de'
-}
-
-key U {
- label: 'U'
- number: '8'
- base: 'u'
- shift, capslock: 'U'
- alt: '\u00fa'
- shift+alt, capslock+alt: '\u00da'
-}
-
-key V {
- label: 'V'
- number: '8'
- base: 'v'
- shift, capslock: 'V'
- alt: 'v'
- shift+alt, capslock+alt: 'V'
-}
-
-key W {
- label: 'W'
- number: '9'
- base: 'w'
- shift, capslock: 'W'
- alt: '\u00e5'
- shift+alt, capslock+alt: '\u00c5'
-}
-
-key X {
- label: 'X'
- number: '9'
- base: 'x'
- shift, capslock: 'X'
- alt: 'x'
- shift+alt, capslock+alt: '\uef00'
-}
-
-key Y {
- label: 'Y'
- number: '9'
- base: 'y'
- shift, capslock: 'Y'
- alt: '\u00fc'
- shift+alt, capslock+alt: '\u00dc'
-}
-
-key Z {
- label: 'Z'
- number: '9'
- base: 'z'
- shift, capslock: 'Z'
- alt: '\u00e6'
- shift+alt, capslock+alt: '\u00c6'
-}
-
-key COMMA {
- label: ','
- number: ','
- base: ','
- shift: '<'
- alt: '\u00e7'
- shift+alt: '\u00c7'
-}
-
-key PERIOD {
- label: '.'
- number: '.'
- base: '.'
- shift: '>'
- alt: '.'
- shift+alt: '\u2026'
-}
-
-key AT {
- label: '@'
- number: '@'
- base: '@'
- shift: '@'
- alt: '@'
- shift+alt: '\u2022'
-}
-
-key SLASH {
- label: '/'
- number: '/'
- base: '/'
- shift: '?'
- alt: '\u00bf'
- shift+alt: '?'
-}
-
-key SPACE {
- label: ' '
- number: ' '
- base: ' '
- shift: ' '
- alt: '\uef01'
- shift+alt: '\uef01'
-}
-
-key ENTER {
- label: '\n'
- number: '\n'
- base: '\n'
- shift: '\n'
- alt: '\n'
- shift+alt: '\n'
-}
-
-key TAB {
- label: '\t'
- number: '\t'
- base: '\t'
- shift: '\t'
- alt: '\t'
- shift+alt: '\t'
-}
-
-key 0 {
- label: '0'
- number: '0'
- base: '0'
- shift: ')'
- alt: '\u02bc'
- shift+alt: ')'
-}
-
-key 1 {
- label: '1'
- number: '1'
- base: '1'
- shift: '!'
- alt: '\u00a1'
- shift+alt: '\u00b9'
-}
-
-key 2 {
- label: '2'
- number: '2'
- base: '2'
- shift: '@'
- alt: '\u00b2'
- shift+alt: '@'
-}
-
-key 3 {
- label: '3'
- number: '3'
- base: '3'
- shift: '#'
- alt: '\u00b3'
- shift+alt: '#'
-}
-
-key 4 {
- label: '4'
- number: '4'
- base: '4'
- shift: '$'
- alt: '\u00a4'
- shift+alt: '\u00a3'
-}
-
-key 5 {
- label: '5'
- number: '5'
- base: '5'
- shift: '%'
- alt: '\u20ac'
- shift+alt: '%'
-}
-
-key 6 {
- label: '6'
- number: '6'
- base: '6'
- shift: '^'
- alt: '\u00bc'
- shift+alt: '\u0302'
-}
-
-key 7 {
- label: '7'
- number: '7'
- base: '7'
- shift: '&'
- alt: '\u00bd'
- shift+alt: '&'
-}
-
-key 8 {
- label: '8'
- number: '8'
- base: '8'
- shift: '*'
- alt: '\u00be'
- shift+alt: '*'
-}
-
-key 9 {
- label: '9'
- number: '9'
- base: '9'
- shift: '('
- alt: '\u02bb'
- shift+alt: '('
-}
-
-key GRAVE {
- label: '`'
- number: '`'
- base: '`'
- shift: '~'
- alt: '\u0300'
- shift+alt: '\u0303'
-}
-
-key MINUS {
- label: '-'
- number: '-'
- base: '-'
- shift: '_'
- alt: '\u00a5'
- shift+alt: '_'
-}
-
-key EQUALS {
- label: '='
- number: '='
- base: '='
- shift: '+'
- alt: '\u00d7'
- shift+alt: '\u00f7'
-}
-
-key LEFT_BRACKET {
- label: '['
- number: '['
- base: '['
- shift: '{'
- alt: '\u00ab'
- shift+alt: '{'
-}
-
-key RIGHT_BRACKET {
- label: ']'
- number: ']'
- base: ']'
- shift: '}'
- alt: '\u00bb'
- shift+alt: '}'
-}
-
-key BACKSLASH {
- label: '\\'
- number: '\\'
- base: '\\'
- shift: '|'
- alt: '\u00ac'
- shift+alt: '\u00a6'
-}
-
-key SEMICOLON {
- label: ';'
- number: ';'
- base: ';'
- shift: ':'
- alt: '\u00b6'
- shift+alt: '\u00b0'
-}
-
-key APOSTROPHE {
- label: '\''
- number: '\''
- base: '\''
- shift: '"'
- alt: '\u0301'
- shift+alt: '\u0308'
-}
-
-key STAR {
- label: '*'
- number: '*'
- base: '*'
- shift: '*'
- alt: '*'
- shift+alt: '*'
-}
-
-key POUND {
- label: '#'
- number: '#'
- base: '#'
- shift: '#'
- alt: '#'
- shift+alt: '#'
-}
-
-key PLUS {
- label: '+'
- number: '+'
- base: '+'
- shift: '+'
- alt: '+'
- shift+alt: '+'
-}
diff --git a/graphics/java/android/graphics/text/LineBreakConfig.java b/graphics/java/android/graphics/text/LineBreakConfig.java
index 7b204f244bd8..13540e0df789 100644
--- a/graphics/java/android/graphics/text/LineBreakConfig.java
+++ b/graphics/java/android/graphics/text/LineBreakConfig.java
@@ -16,6 +16,9 @@
package android.graphics.text;
+import static com.android.text.flags.Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN;
+
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -34,6 +37,56 @@ import java.util.Objects;
public final class LineBreakConfig {
/**
+ * No hyphenation preference is specified.
+ *
+ * This is a special value of hyphenation preference indicating no hyphenation preference is
+ * specified. When overriding a {@link LineBreakConfig} with another {@link LineBreakConfig}
+ * with {@link Builder#merge(LineBreakConfig)} function, the hyphenation preference of
+ * overridden config will be kept if the hyphenation preference of overriding config is
+ * {@link #HYPHENATION_UNSPECIFIED}.
+ *
+ * <pre>
+ * val override = LineBreakConfig.Builder()
+ * .setLineBreakWordStyle(LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
+ * .build(); // UNSPECIFIED if no setHyphenation is called.
+ * val config = LineBreakConfig.Builder()
+ * .setHyphenation(LineBreakConfig.HYPHENATION_DISABLED)
+ * .merge(override)
+ * .build()
+ * // Here, config has HYPHENATION_DISABLED for line break config and
+ * // LINE_BREAK_WORD_STYLE_PHRASE for line break word style.
+ * </pre>
+ *
+ * This value is resolved to {@link #HYPHENATION_ENABLED} if this value is used for text
+ * layout/rendering.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public static final int HYPHENATION_UNSPECIFIED = -1;
+
+ /**
+ * The hyphenation is disabled.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public static final int HYPHENATION_DISABLED = 0;
+
+ /**
+ * The hyphenation is enabled.
+ *
+ * Note: Even if the hyphenation is enabled with a line break strategy
+ * {@link LineBreaker#BREAK_STRATEGY_SIMPLE}, the hyphenation will not be performed unless a
+ * single word cannot meet width constraints.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public static final int HYPHENATION_ENABLED = 1;
+
+ /** @hide */
+ @IntDef(prefix = { "HYPHENATION_" }, value = {
+ HYPHENATION_UNSPECIFIED, HYPHENATION_ENABLED, HYPHENATION_DISABLED,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Hyphenation {}
+
+ /**
* No line break style is specified.
*
* This is a special value of line break style indicating no style value is specified.
@@ -147,6 +200,8 @@ public final class LineBreakConfig {
private @LineBreakWordStyle int mLineBreakWordStyle =
LineBreakConfig.LINE_BREAK_WORD_STYLE_UNSPECIFIED;
+ private @Hyphenation int mHyphenation = LineBreakConfig.HYPHENATION_UNSPECIFIED;
+
/**
* Builder constructor.
*/
@@ -188,6 +243,9 @@ public final class LineBreakConfig {
if (config.mLineBreakWordStyle != LINE_BREAK_WORD_STYLE_UNSPECIFIED) {
mLineBreakWordStyle = config.mLineBreakWordStyle;
}
+ if (config.mHyphenation != HYPHENATION_UNSPECIFIED) {
+ mHyphenation = config.mHyphenation;
+ }
return this;
}
@@ -201,9 +259,11 @@ public final class LineBreakConfig {
if (config == null) {
mLineBreakStyle = LINE_BREAK_STYLE_UNSPECIFIED;
mLineBreakWordStyle = LINE_BREAK_WORD_STYLE_UNSPECIFIED;
+ mHyphenation = HYPHENATION_UNSPECIFIED;
} else {
mLineBreakStyle = config.mLineBreakStyle;
mLineBreakWordStyle = config.mLineBreakWordStyle;
+ mHyphenation = config.mHyphenation;
}
return this;
}
@@ -215,6 +275,11 @@ public final class LineBreakConfig {
* {@link #LINE_BREAK_STYLE_UNSPECIFIED}, the line break style is reset to
* {@link #LINE_BREAK_STYLE_UNSPECIFIED}.
*
+ * @see <a href="https://unicode.org/reports/tr35/#UnicodeLineBreakStyleIdentifier">
+ * Unicode Line Break Style Identifier</a>
+ * @see <a href="https://drafts.csswg.org/css-text/#line-break-property">
+ * CSS Line Break Property</a>
+ *
* @param lineBreakStyle The new line-break style.
* @return This {@code Builder}.
*/
@@ -230,6 +295,11 @@ public final class LineBreakConfig {
* with {@link #LINE_BREAK_WORD_STYLE_UNSPECIFIED}, the line break style is reset to
* {@link #LINE_BREAK_WORD_STYLE_UNSPECIFIED}.
*
+ * @see <a href="https://unicode.org/reports/tr35/#UnicodeLineBreakWordIdentifier">
+ * Unicode Line Break Word Identifier</a>
+ * @see <a href="https://drafts.csswg.org/css-text/#word-break-property">
+ * CSS Word Break Property</a>
+ *
* @param lineBreakWordStyle The new line-break word style.
* @return This {@code Builder}.
*/
@@ -239,6 +309,27 @@ public final class LineBreakConfig {
}
/**
+ * Sets the hyphenation preference
+ *
+ * Note: Even if the {@link LineBreakConfig#HYPHENATION_ENABLED} is specified, the
+ * hyphenation will not be performed if the {@link android.widget.TextView} or underlying
+ * {@link android.text.StaticLayout}, {@link LineBreaker} are configured with
+ * {@link LineBreaker#HYPHENATION_FREQUENCY_NONE}.
+ *
+ * Note: Even if the hyphenation is enabled with a line break strategy
+ * {@link LineBreaker#BREAK_STRATEGY_SIMPLE}, the hyphenation will not be performed unless a
+ * single word cannot meet width constraints.
+ *
+ * @param hyphenation The hyphenation preference.
+ * @return This {@code Builder}.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public @NonNull Builder setHyphenation(@Hyphenation int hyphenation) {
+ mHyphenation = hyphenation;
+ return this;
+ }
+
+ /**
* Builds a {@link LineBreakConfig} instance.
*
* This method can be called multiple times for generating multiple {@link LineBreakConfig}
@@ -247,7 +338,7 @@ public final class LineBreakConfig {
* @return The {@code LineBreakConfig} instance.
*/
public @NonNull LineBreakConfig build() {
- return new LineBreakConfig(mLineBreakStyle, mLineBreakWordStyle);
+ return new LineBreakConfig(mLineBreakStyle, mLineBreakWordStyle, mHyphenation);
}
}
@@ -275,6 +366,7 @@ public final class LineBreakConfig {
private final @LineBreakStyle int mLineBreakStyle;
private final @LineBreakWordStyle int mLineBreakWordStyle;
+ private final @Hyphenation int mHyphenation;
/**
* Constructor with line-break parameters.
@@ -283,9 +375,11 @@ public final class LineBreakConfig {
* {@code LineBreakConfig} instance.
*/
private LineBreakConfig(@LineBreakStyle int lineBreakStyle,
- @LineBreakWordStyle int lineBreakWordStyle) {
+ @LineBreakWordStyle int lineBreakWordStyle,
+ @Hyphenation int hyphenation) {
mLineBreakStyle = lineBreakStyle;
mLineBreakWordStyle = lineBreakWordStyle;
+ mHyphenation = hyphenation;
}
/**
@@ -340,6 +434,34 @@ public final class LineBreakConfig {
}
/**
+ * Returns a hyphenation preference.
+ *
+ * @return A hyphenation preference.
+ */
+ @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+ public @Hyphenation int getHyphenation() {
+ return mHyphenation;
+ }
+
+ /**
+ * Returns a hyphenation preference.
+ *
+ * This method never returns {@link #HYPHENATION_UNSPECIFIED}.
+ *
+ * @return A hyphenation preference.
+ * @hide
+ */
+ public static @Hyphenation int getResolvedHyphenation(
+ @Nullable LineBreakConfig config) {
+ if (config == null) {
+ return HYPHENATION_ENABLED;
+ }
+ return config.mHyphenation == HYPHENATION_UNSPECIFIED
+ ? HYPHENATION_ENABLED : config.mHyphenation;
+ }
+
+
+ /**
* Generates a new {@link LineBreakConfig} instance merged with given {@code config}.
*
* If values of passing {@code config} are unspecified, the original values are kept. For
@@ -366,7 +488,9 @@ public final class LineBreakConfig {
config.mLineBreakStyle == LINE_BREAK_STYLE_UNSPECIFIED
? mLineBreakStyle : config.mLineBreakStyle,
config.mLineBreakWordStyle == LINE_BREAK_WORD_STYLE_UNSPECIFIED
- ? mLineBreakWordStyle : config.mLineBreakWordStyle);
+ ? mLineBreakWordStyle : config.mLineBreakWordStyle,
+ config.mHyphenation == HYPHENATION_UNSPECIFIED
+ ? mHyphenation : config.mHyphenation);
}
@Override
@@ -376,12 +500,13 @@ public final class LineBreakConfig {
if (!(o instanceof LineBreakConfig)) return false;
LineBreakConfig that = (LineBreakConfig) o;
return (mLineBreakStyle == that.mLineBreakStyle)
- && (mLineBreakWordStyle == that.mLineBreakWordStyle);
+ && (mLineBreakWordStyle == that.mLineBreakWordStyle)
+ && (mHyphenation == that.mHyphenation);
}
@Override
public int hashCode() {
- return Objects.hash(mLineBreakStyle, mLineBreakWordStyle);
+ return Objects.hash(mLineBreakStyle, mLineBreakWordStyle, mHyphenation);
}
@Override
@@ -389,6 +514,7 @@ public final class LineBreakConfig {
return "LineBreakConfig{"
+ "mLineBreakStyle=" + mLineBreakStyle
+ ", mLineBreakWordStyle=" + mLineBreakWordStyle
+ + ", mHyphenation= " + mHyphenation
+ '}';
}
}
diff --git a/graphics/java/android/graphics/text/MeasuredText.java b/graphics/java/android/graphics/text/MeasuredText.java
index 8317985303ad..2d33e8d24ece 100644
--- a/graphics/java/android/graphics/text/MeasuredText.java
+++ b/graphics/java/android/graphics/text/MeasuredText.java
@@ -301,7 +301,9 @@ public class MeasuredText {
Preconditions.checkArgument(end <= mText.length, "Style exceeds the text length");
int lbStyle = LineBreakConfig.getResolvedLineBreakStyle(lineBreakConfig);
int lbWordStyle = LineBreakConfig.getResolvedLineBreakWordStyle(lineBreakConfig);
- nAddStyleRun(mNativePtr, paint.getNativeInstance(), lbStyle, lbWordStyle,
+ boolean hyphenation = LineBreakConfig.getResolvedHyphenation(lineBreakConfig)
+ == LineBreakConfig.HYPHENATION_ENABLED;
+ nAddStyleRun(mNativePtr, paint.getNativeInstance(), lbStyle, lbWordStyle, hyphenation,
mCurrentOffset, end, isRtl);
mCurrentOffset = end;
@@ -510,6 +512,7 @@ public class MeasuredText {
/* Non Zero */ long paintPtr,
int lineBreakStyle,
int lineBreakWordStyle,
+ boolean hyphenation,
@IntRange(from = 0) int start,
@IntRange(from = 0) int end,
boolean isRtl);
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java
index 0112e32e05a7..15d14e87fcf6 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java
@@ -213,9 +213,6 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
if (mRearDisplayStateRequest != null || isRearDisplayActive()) {
mRearDisplayStateRequest = null;
mDeviceStateManager.cancelStateRequest();
- } else {
- throw new IllegalStateException(
- "Unable to cancel a rear display session as there is no active session");
}
}
}
@@ -432,10 +429,6 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
synchronized (mLock) {
if (mRearDisplayPresentationController != null) {
mDeviceStateManager.cancelStateRequest();
- } else {
- throw new IllegalStateException(
- "Unable to cancel a rear display presentation session as there is no "
- + "active session");
}
}
}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
index e03e1ecd6015..ba57b76020b4 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
@@ -17,7 +17,6 @@
package androidx.window.extensions.layout;
import static android.view.Display.DEFAULT_DISPLAY;
-
import static androidx.window.common.CommonFoldingFeature.COMMON_STATE_FLAT;
import static androidx.window.common.CommonFoldingFeature.COMMON_STATE_HALF_OPENED;
import static androidx.window.util.ExtensionHelper.isZero;
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
index 15a329bd9509..a836e05b2d66 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
@@ -17,7 +17,6 @@
package androidx.window.sidecar;
import static android.view.Display.DEFAULT_DISPLAY;
-
import static androidx.window.util.ExtensionHelper.rotateRectToDisplayRotation;
import static androidx.window.util.ExtensionHelper.transformToWindowSpaceRect;
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java b/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
index 6b193fc53935..a08db7939eca 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
@@ -19,6 +19,7 @@ package androidx.window.util;
import static android.view.Surface.ROTATION_270;
import static android.view.Surface.ROTATION_90;
+import android.annotation.SuppressLint;
import android.app.WindowConfiguration;
import android.content.Context;
import android.graphics.Rect;
@@ -57,6 +58,10 @@ public final class ExtensionHelper {
rotateRectToDisplayRotation(displayInfo, rotation, inOutRect);
}
+ // We suppress the Lint error CheckResult for Rect#intersect because in case the displayInfo and
+ // folding features are out of sync, e.g. when a foldable devices is unfolding, it is acceptable
+ // to provide the original folding feature Rect even if they don't intersect.
+ @SuppressLint("RectIntersectReturnValueIgnored")
@VisibleForTesting
static void rotateRectToDisplayRotation(@NonNull DisplayInfo displayInfo,
@Surface.Rotation int rotation, @NonNull Rect inOutRect) {
@@ -70,13 +75,7 @@ public final class ExtensionHelper {
final int baseDisplayHeight =
isSideRotation ? displayInfo.logicalWidth : displayInfo.logicalHeight;
- final boolean success = inOutRect.intersect(0, 0, baseDisplayWidth, baseDisplayHeight);
- if (!success) {
- throw new IllegalArgumentException("inOutRect must intersect with the display."
- + " inOutRect: " + inOutRect
- + ", baseDisplayWidth: " + baseDisplayWidth
- + ", baseDisplayHeight: " + baseDisplayHeight);
- }
+ inOutRect.intersect(0, 0, baseDisplayWidth, baseDisplayHeight);
RotationUtils.rotateBounds(inOutRect, baseDisplayWidth, baseDisplayHeight, rotation);
}
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 068269297193..9607b78bacf0 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
@@ -17,7 +17,6 @@
package androidx.window.extensions;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
-
import static com.google.common.truth.Truth.assertThat;
import android.app.ActivityTaskManager;
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
index ae783de228fb..3278cdf1c337 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
@@ -17,7 +17,6 @@
package androidx.window.util;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThrows;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
@@ -79,16 +78,6 @@ public class ExtensionHelperTest {
}
}
- @Test
- public void testRotateRectToDisplayRotation_invalidInputRect() {
- final Rect invalidRect = new Rect(
- MOCK_DISPLAY_WIDTH + 10, 0, MOCK_DISPLAY_WIDTH + 10, MOCK_DISPLAY_HEIGHT);
- assertThrows(IllegalArgumentException.class,
- () -> ExtensionHelper.rotateRectToDisplayRotation(
- MOCK_DISPLAY_INFOS[0], ROTATIONS[0], invalidRect));
- }
-
-
@NonNull
private static DisplayInfo getMockDisplayInfo(@Surface.Rotation int rotation) {
final DisplayInfo displayInfo = new DisplayInfo();
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp
index e9abc7e522d5..c72a42cce2bd 100644
--- a/libs/WindowManager/Shell/Android.bp
+++ b/libs/WindowManager/Shell/Android.bp
@@ -158,6 +158,7 @@ android_library {
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"iconloader_base",
+ "com_android_wm_shell_flags_lib",
"WindowManager-Shell-proto",
"dagger2",
"jsr330",
diff --git a/libs/WindowManager/Shell/aconfig/Android.bp b/libs/WindowManager/Shell/aconfig/Android.bp
new file mode 100644
index 000000000000..1a98ffcea9e7
--- /dev/null
+++ b/libs/WindowManager/Shell/aconfig/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+ name: "com_android_wm_shell_flags",
+ package: "com.android.wm.shell",
+ srcs: [
+ "multitasking.aconfig",
+ ],
+}
+
+java_aconfig_library {
+ name: "com_android_wm_shell_flags_lib",
+ aconfig_declarations: "com_android_wm_shell_flags",
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/aconfig/multitasking.aconfig b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
new file mode 100644
index 000000000000..d55a41fc0cf7
--- /dev/null
+++ b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.wm.shell"
+
+flag {
+ name: "example_flag"
+ namespace: "multitasking"
+ description: "An Example Flag"
+ bug: "300136750"
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values-af/strings.xml b/libs/WindowManager/Shell/res/values-af/strings.xml
index 4f763425b601..6622973007b4 100644
--- a/libs/WindowManager/Shell/res/values-af/strings.xml
+++ b/libs/WindowManager/Shell/res/values-af/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Het dit"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Geen onlangse borrels nie"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Onlangse borrels en borrels wat toegemaak is, sal hier verskyn"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Beheer borrels enige tyd"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tik hier om te bestuur watter apps en gesprekke in borrels kan verskyn"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Borrel"</string>
diff --git a/libs/WindowManager/Shell/res/values-am/strings.xml b/libs/WindowManager/Shell/res/values-am/strings.xml
index 1e5f5f136315..a3f77411b0f6 100644
--- a/libs/WindowManager/Shell/res/values-am/strings.xml
+++ b/libs/WindowManager/Shell/res/values-am/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ገባኝ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ምንም የቅርብ ጊዜ አረፋዎች የሉም"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"የቅርብ ጊዜ አረፋዎች እና የተሰናበቱ አረፋዎች እዚህ ብቅ ይላሉ"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"በማንኛውም ጊዜ ዓረፋዎችን ይቆጣጠሩ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"የትኛዎቹ መተግበሪያዎች እና ውይይቶች ዓረፋ መፍጠር እንደሚችሉ ለማስተዳደር እዚህ ጋር መታ ያድርጉ"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"አረፋ"</string>
diff --git a/libs/WindowManager/Shell/res/values-ar/strings.xml b/libs/WindowManager/Shell/res/values-ar/strings.xml
index 9c52608a8d23..ee4302e461df 100644
--- a/libs/WindowManager/Shell/res/values-ar/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ar/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"حسنًا"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ليس هناك فقاعات محادثات"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ستظهر هنا أحدث فقاعات المحادثات وفقاعات المحادثات التي تم إغلاقها."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"التحكّم في إظهار الفقاعات في أي وقت"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"انقر هنا للتحكّم في إظهار فقاعات التطبيقات والمحادثات التي تريدها."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"فقاعة"</string>
diff --git a/libs/WindowManager/Shell/res/values-as/strings.xml b/libs/WindowManager/Shell/res/values-as/strings.xml
index e880b8744f40..a568d5841d32 100644
--- a/libs/WindowManager/Shell/res/values-as/strings.xml
+++ b/libs/WindowManager/Shell/res/values-as/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"বুজি পালোঁ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"কোনো শেহতীয়া bubbles নাই"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"শেহতীয়া bubbles আৰু অগ্ৰাহ্য কৰা bubbles ইয়াত প্ৰদর্শিত হ\'ব"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"যিকোনো সময়তে বাবল নিয়ন্ত্ৰণ কৰক"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"কোনবোৰ এপ্‌ আৰু বাৰ্তালাপ বাবল হ’ব পাৰে সেয়া পৰিচালনা কৰিবলৈ ইয়াত টিপক"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
diff --git a/libs/WindowManager/Shell/res/values-az/strings.xml b/libs/WindowManager/Shell/res/values-az/strings.xml
index 6e746fb761f0..1a681e1c63a6 100644
--- a/libs/WindowManager/Shell/res/values-az/strings.xml
+++ b/libs/WindowManager/Shell/res/values-az/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Anladım"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Yumrucuqlar yoxdur"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Son yumrucuqlar və buraxılmış yumrucuqlar burada görünəcək"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Yumrucuqları idarə edin"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Bura toxunaraq yumrucuq göstərəcək tətbiq və söhbətləri idarə edin"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Qabarcıq"</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 3be326907cd2..cba293b20c3d 100644
--- a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Važi"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Ovde se prikazuju nedavni i odbačeni oblačići"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolišite oblačiće u svakom trenutku"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovde i odredite koje aplikacije i konverzacije mogu da imaju oblačić"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-be/strings.xml b/libs/WindowManager/Shell/res/values-be/strings.xml
index 85ae1c10617c..80e5a677e86d 100644
--- a/libs/WindowManager/Shell/res/values-be/strings.xml
+++ b/libs/WindowManager/Shell/res/values-be/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Зразумела"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Няма нядаўніх усплывальных апавяшчэнняў"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Нядаўнія і адхіленыя ўсплывальныя апавяшчэнні будуць паказаны тут"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Кіруйце наладамі ўсплывальных апавяшчэнняў у любы час"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Каб кіраваць усплывальнымі апавяшчэннямі для праграм і размоў, націсніце тут"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Усплывальнае апавяшчэнне"</string>
diff --git a/libs/WindowManager/Shell/res/values-bg/strings.xml b/libs/WindowManager/Shell/res/values-bg/strings.xml
index 640fb2e0ef92..ca5923919d36 100644
--- a/libs/WindowManager/Shell/res/values-bg/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bg/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Разбрах"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Няма скорошни балончета"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Скорошните и отхвърлените балончета ще се показват тук"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Управление на балончетата по всяко време"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Докоснете тук, за да управл. кои прил. и разговори могат да показват балончета"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
diff --git a/libs/WindowManager/Shell/res/values-bn/strings.xml b/libs/WindowManager/Shell/res/values-bn/strings.xml
index e7c8886a99be..c1eb469f73a4 100644
--- a/libs/WindowManager/Shell/res/values-bn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bn/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"বুঝেছি"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"কোনও সাম্প্রতিক বাবল নেই"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"সাম্প্রতিক ও বাতিল করা বাবল এখানে দেখা যাবে"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"যেকোনও সময় বাবল নিয়ন্ত্রণ করুন"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"কোন অ্যাপ ও কথোপকথনের জন্য বাবলের সুবিধা চান তা ম্যানেজ করতে এখানে ট্যাপ করুন"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
diff --git a/libs/WindowManager/Shell/res/values-bs/strings.xml b/libs/WindowManager/Shell/res/values-bs/strings.xml
index 1335f8d897be..c97fc3dffb6d 100644
--- a/libs/WindowManager/Shell/res/values-bs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bs/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Razumijem"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nedavni i odbačeni oblačići će se pojaviti ovdje"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljajte oblačićima u svakom trenutku"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovdje da upravljate time koje aplikacije i razgovori mogu imati oblačić"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-ca/strings.xml b/libs/WindowManager/Shell/res/values-ca/strings.xml
index 22fc21c64e09..a9195e4dbc03 100644
--- a/libs/WindowManager/Shell/res/values-ca/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ca/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entesos"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hi ha bombolles recents"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Les bombolles recents i les ignorades es mostraran aquí"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla les bombolles en qualsevol moment"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca aquí per gestionar quines aplicacions i converses poden fer servir bombolles"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bombolla"</string>
diff --git a/libs/WindowManager/Shell/res/values-cs/strings.xml b/libs/WindowManager/Shell/res/values-cs/strings.xml
index a85fa7c9435d..89bd22203c8c 100644
--- a/libs/WindowManager/Shell/res/values-cs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-cs/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Žádné nedávné bubliny"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Zde se budou zobrazovat nedávné bubliny a zavřené bubliny"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Nastavení bublin můžete kdykoli upravit"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Klepnutím sem lze spravovat, které aplikace a konverzace mohou vytvářet bubliny"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
diff --git a/libs/WindowManager/Shell/res/values-da/strings.xml b/libs/WindowManager/Shell/res/values-da/strings.xml
index cd621f802d91..fd880bcfbd0c 100644
--- a/libs/WindowManager/Shell/res/values-da/strings.xml
+++ b/libs/WindowManager/Shell/res/values-da/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ingen seneste bobler"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nye bobler og afviste bobler vises her"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Administrer bobler når som helst"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tryk her for at administrere, hvilke apps og samtaler der kan vises i bobler"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
diff --git a/libs/WindowManager/Shell/res/values-de/strings.xml b/libs/WindowManager/Shell/res/values-de/strings.xml
index 366fdefc3013..b28394d27e9a 100644
--- a/libs/WindowManager/Shell/res/values-de/strings.xml
+++ b/libs/WindowManager/Shell/res/values-de/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Keine kürzlich geschlossenen Bubbles"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Hier werden aktuelle und geschlossene Bubbles angezeigt"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bubble-Einstellungen festlegen"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tippe hier, um zu verwalten, welche Apps und Unterhaltungen als Bubble angezeigt werden können"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-el/strings.xml b/libs/WindowManager/Shell/res/values-el/strings.xml
index a449b9f3c665..684c3bbddd82 100644
--- a/libs/WindowManager/Shell/res/values-el/strings.xml
+++ b/libs/WindowManager/Shell/res/values-el/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Το κατάλαβα"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Δεν υπάρχουν πρόσφατα συννεφάκια"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Τα πρόσφατα συννεφάκια και τα συννεφάκια που παραβλέψατε θα εμφανίζονται εδώ."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ελέγξτε τα συννεφάκια ανά πάσα στιγμή."</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Πατήστε εδώ για τη διαχείριση εφαρμογών και συζητήσεων που προβάλλουν συννεφάκια"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Συννεφάκι"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
index c7dd3882734b..1890c3d28591 100644
--- a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
index 99da073cb2c2..72189df6d65d 100644
--- a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
@@ -76,6 +76,8 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Got it"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+ <string name="bubble_bar_education_stack_title" msgid="2486903590422497245">"Chat using bubbles"</string>
+ <string name="bubble_bar_education_stack_text" msgid="2446934610817409820">"New conversations appear as icons in a bottom corner of your screen. Tap to expand them or drag to dismiss them."</string>
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles anytime"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
index c7dd3882734b..1890c3d28591 100644
--- a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
index c7dd3882734b..1890c3d28591 100644
--- a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
index cc19579c1216..294bdb5edf3b 100644
--- a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
@@ -76,6 +76,8 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‏‏‏‎‏‏‏‏‎‏‏‏‎‎‎‏‎‎‎‎‏‏‎‏‏‏‎‎‏‎‏‎‏‎‎‎‏‏‏‏‎‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‎Got it‎‏‎‎‏‎"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‏‎‏‎‎‎‏‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‎‎‎‎‏‎‎‏‏‏‏‎‎‎‎No recent bubbles‎‏‎‎‏‎"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‏‏‏‎‏‏‎‏‎‏‎‏‏‏‎‏‎‎‏‏‏‎‏‏‎‏‎‎‏‏‏‎‎‏‏‏‏‏‎‏‏‏‏‎‎‎‏‎Recent bubbles and dismissed bubbles will appear here‎‏‎‎‏‎"</string>
+ <string name="bubble_bar_education_stack_title" msgid="2486903590422497245">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‎‎‎‏‏‎‏‎‎‎‎‎‏‏‎‏‎‎‎‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‏‏‎‏‏‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎Chat using bubbles‎‏‎‎‏‎"</string>
+ <string name="bubble_bar_education_stack_text" msgid="2446934610817409820">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎‎‎‎‎‏‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‏‏‎‎‎‏‏‎‎‎‏‏‏‎‎‎New conversations appear as icons in a bottom corner of your screen. Tap to expand them or drag to dismiss them.‎‏‎‎‏‎"</string>
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‏‎‎‏‏‏‎‎‎‎‏‎‏‎‏‎‎‏‏‏‎‎‏‎‏‎‏‏‏‎‏‏‎‎‎‎‏‏‏‏‎‎‏‎‏‏‏‎‏‎‏‎‎‎Control bubbles anytime‎‏‎‎‏‎"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‏‏‎‎‏‏‏‏‎‏‏‏‎‏‏‎‏‏‎‏‏‏‏‏‎‏‏‎‎‎‎‎‎‏‏‎‎‎‏‏‏‎‎‎‎‏‏‎‏‏‏‎‏‏‎‎Tap here to manage which apps and conversations can bubble‎‏‎‎‏‎"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‏‎‏‎‏‎‏‏‎‏‎‏‏‎‏‎‎‏‏‏‏‎‏‏‎‏‏‎‏‏‎‎‏‏‎‏‏‎‏‏‎‎‎‏‏‏‏‏‎‎‎‎‏‎‎Bubble‎‏‎‎‏‎"</string>
diff --git a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
index 80d10f26e4e9..54f2de06e5fb 100644
--- a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hay burbujas recientes"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Las burbujas recientes y las que se descartaron aparecerán aquí"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla las burbujas"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Presiona para administrar las apps y conversaciones que pueden mostrar burbujas"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Cuadro"</string>
diff --git a/libs/WindowManager/Shell/res/values-es/strings.xml b/libs/WindowManager/Shell/res/values-es/strings.xml
index 13dfce03b775..19a8a1402022 100644
--- a/libs/WindowManager/Shell/res/values-es/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hay burbujas recientes"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Las burbujas recientes y las cerradas aparecerán aquí"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla las burbujas cuando quieras"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca aquí para gestionar qué aplicaciones y conversaciones pueden usar burbujas"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbuja"</string>
diff --git a/libs/WindowManager/Shell/res/values-et/strings.xml b/libs/WindowManager/Shell/res/values-et/strings.xml
index 269968f48c77..c0558e4fc95e 100644
--- a/libs/WindowManager/Shell/res/values-et/strings.xml
+++ b/libs/WindowManager/Shell/res/values-et/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Selge"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hiljutisi mulle pole"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Siin kuvatakse hiljutised ja suletud mullid."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Juhtige mulle igal ajal"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Puudutage siin, et hallata, milliseid rakendusi ja vestlusi saab mullina kuvada"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Mull"</string>
diff --git a/libs/WindowManager/Shell/res/values-eu/strings.xml b/libs/WindowManager/Shell/res/values-eu/strings.xml
index b4a8d57abc94..7610f0dc4312 100644
--- a/libs/WindowManager/Shell/res/values-eu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-eu/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ados"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ez dago azkenaldiko burbuilarik"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Azken burbuilak eta baztertutakoak agertuko dira hemen"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolatu burbuilak edonoiz"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Sakatu hau burbuiletan zein aplikazio eta elkarrizketa ager daitezkeen kudeatzeko"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbuila"</string>
diff --git a/libs/WindowManager/Shell/res/values-fa/strings.xml b/libs/WindowManager/Shell/res/values-fa/strings.xml
index 434bfe11db4e..f1fb51fa5ece 100644
--- a/libs/WindowManager/Shell/res/values-fa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fa/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"متوجه‌ام"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"هیچ حبابک جدیدی وجود ندارد"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"حبابک‌های اخیر و حبابک‌های ردشده اینجا ظاهر خواهند شد"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"کنترل حبابک‌ها در هرزمانی"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"برای مدیریت اینکه کدام برنامه‌ها و مکالمه‌ها حباب داشته باشند، ضربه بزنید"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"حباب"</string>
diff --git a/libs/WindowManager/Shell/res/values-fi/strings.xml b/libs/WindowManager/Shell/res/values-fi/strings.xml
index a04ef1252aa8..526925531ac0 100644
--- a/libs/WindowManager/Shell/res/values-fi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fi/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Okei"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ei viimeaikaisia kuplia"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Viimeaikaiset ja äskettäin ohitetut kuplat näkyvät täällä"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Muuta kuplien asetuksia milloin tahansa"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Valitse napauttamalla tästä, mitkä sovellukset ja keskustelut voivat kuplia"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Kupla"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
index fbc619144f71..cd85f402cfab 100644
--- a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
@@ -76,6 +76,10 @@
<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>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Gérez les bulles en tout temps"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Touchez ici pour gérer les applis et les conversations à inclure aux bulles"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr/strings.xml b/libs/WindowManager/Shell/res/values-fr/strings.xml
index e1fe2917a729..23ba785363f7 100644
--- a/libs/WindowManager/Shell/res/values-fr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr/strings.xml
@@ -76,6 +76,10 @@
<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 ignorées s\'afficheront ici"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Contrôlez les bulles à tout moment"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Appuyez ici pour gérer les applis et conversations s\'affichant dans des bulles"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
diff --git a/libs/WindowManager/Shell/res/values-gl/strings.xml b/libs/WindowManager/Shell/res/values-gl/strings.xml
index 485a89502c86..8693e42118fc 100644
--- a/libs/WindowManager/Shell/res/values-gl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gl/strings.xml
@@ -76,17 +76,18 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Non hai burbullas recentes"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"As burbullas recentes e ignoradas aparecerán aquí."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controlar as burbullas"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca para xestionar as aplicacións e conversas que poden aparecer en burbullas"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbulla"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Xestionar"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Ignorouse a burbulla."</string>
- <!-- no translation found for restart_button_description (4564728020654658478) -->
- <skip />
- <!-- no translation found for user_aspect_ratio_settings_button_hint (734835849600713016) -->
- <skip />
- <!-- no translation found for user_aspect_ratio_settings_button_description (4315566801697411684) -->
- <skip />
+ <string name="restart_button_description" msgid="4564728020654658478">"Toca o botón para reiniciar esta aplicación e gozar dunha mellor visualización"</string>
+ <string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Cambia a proporción desta aplicación en Configuración"</string>
+ <string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Cambiar a proporción"</string>
<string name="camera_compat_treatment_suggested_button_description" msgid="8103916969024076767">"Tes problemas coa cámara?\nToca para reaxustala"</string>
<string name="camera_compat_treatment_applied_button_description" msgid="2944157113330703897">"Non se solucionaron os problemas?\nToca para reverter o seu tratamento"</string>
<string name="camera_compat_dismiss_button_description" msgid="2795364433503817511">"Non hai problemas coa cámara? Tocar para ignorar."</string>
diff --git a/libs/WindowManager/Shell/res/values-gu/strings.xml b/libs/WindowManager/Shell/res/values-gu/strings.xml
index 365faef85ff6..a7cdf7352189 100644
--- a/libs/WindowManager/Shell/res/values-gu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gu/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"સમજાઈ ગયું"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"તાજેતરના કોઈ બબલ નથી"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"એકદમ નવા બબલ અને છોડી દીધેલા બબલ અહીં દેખાશે"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"બબલને કોઈપણ સમયે નિયંત્રિત કરે છે"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"કઈ ઍપ અને વાતચીતોને બબલ કરવા માગો છો તે મેનેજ કરવા માટે, અહીં ટૅપ કરો"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"બબલ"</string>
diff --git a/libs/WindowManager/Shell/res/values-hi/strings.xml b/libs/WindowManager/Shell/res/values-hi/strings.xml
index 76579d10b695..13e0258ce87b 100644
--- a/libs/WindowManager/Shell/res/values-hi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hi/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ठीक है"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"हाल ही के कोई बबल्स नहीं हैं"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"हाल ही के बबल्स और हटाए गए बबल्स यहां दिखेंगे"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"जब चाहें, बबल्स की सुविधा को कंट्रोल करें"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"किसी ऐप्लिकेशन और बातचीत के लिए बबल की सुविधा को मैनेज करने के लिए यहां टैप करें"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-hr/strings.xml b/libs/WindowManager/Shell/res/values-hr/strings.xml
index de071f1b959d..957e56c35e87 100644
--- a/libs/WindowManager/Shell/res/values-hr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hr/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Shvaćam"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Ovdje će se prikazivati nedavni i odbačeni oblačići"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljanje oblačićima u svakom trenutku"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovdje da biste odredili koje aplikacije i razgovori mogu imati oblačić"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-hu/strings.xml b/libs/WindowManager/Shell/res/values-hu/strings.xml
index b5631bbf0152..e9808ac6c2be 100644
--- a/libs/WindowManager/Shell/res/values-hu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hu/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Értem"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nincsenek buborékok a közelmúltból"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"A legutóbbi és az elvetett buborékok itt jelennek majd meg"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Buborékok vezérlése bármikor"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ide koppintva jeleníthetők meg az alkalmazások és a beszélgetések buborékként"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Buborék"</string>
diff --git a/libs/WindowManager/Shell/res/values-hy/strings.xml b/libs/WindowManager/Shell/res/values-hy/strings.xml
index 2d5d371df41e..8a9d89bd879f 100644
--- a/libs/WindowManager/Shell/res/values-hy/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hy/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Եղավ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ամպիկներ չկան"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Այստեղ կցուցադրվեն վերջերս օգտագործված և փակված ամպիկները, որոնք կկարողանաք հեշտությամբ վերաբացել"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ամպիկների կարգավորումներ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Հպեք այստեղ՝ ընտրելու, թե որ հավելվածների և զրույցների համար ամպիկներ ցուցադրել"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Պղպջակ"</string>
diff --git a/libs/WindowManager/Shell/res/values-in/strings.xml b/libs/WindowManager/Shell/res/values-in/strings.xml
index 90b1f152d035..6b84a1d9bdac 100644
--- a/libs/WindowManager/Shell/res/values-in/strings.xml
+++ b/libs/WindowManager/Shell/res/values-in/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Oke"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Tidak ada balon baru-baru ini"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Balon yang baru dipakai dan balon yang telah ditutup akan muncul di sini"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrol balon kapan saja"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ketuk di sini untuk mengelola balon aplikasi dan percakapan"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
diff --git a/libs/WindowManager/Shell/res/values-is/strings.xml b/libs/WindowManager/Shell/res/values-is/strings.xml
index 813f9e6f4021..913e1964c4df 100644
--- a/libs/WindowManager/Shell/res/values-is/strings.xml
+++ b/libs/WindowManager/Shell/res/values-is/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ég skil"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Engar nýlegar blöðrur"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nýlegar blöðrur og blöðrur sem þú hefur lokað birtast hér"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Hægt er að stjórna blöðrum hvenær sem er"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ýttu hér til að stjórna því hvaða forrit og samtöl mega nota blöðrur."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Blaðra"</string>
diff --git a/libs/WindowManager/Shell/res/values-it/strings.xml b/libs/WindowManager/Shell/res/values-it/strings.xml
index 8918821a8f27..575210bffc7d 100644
--- a/libs/WindowManager/Shell/res/values-it/strings.xml
+++ b/libs/WindowManager/Shell/res/values-it/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nessuna bolla recente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Le bolle recenti e ignorate appariranno qui"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Gestisci le bolle in qualsiasi momento"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tocca qui per gestire le app e le conversazioni per cui mostrare le bolle"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Fumetto"</string>
@@ -90,7 +94,7 @@
<string name="letterbox_education_dialog_title" msgid="7739895354143295358">"Visualizza più contenuti e fai di più"</string>
<string name="letterbox_education_split_screen_text" msgid="449233070804658627">"Trascina in un\'altra app per usare lo schermo diviso"</string>
<string name="letterbox_education_reposition_text" msgid="4589957299813220661">"Tocca due volte fuori da un\'app per riposizionarla"</string>
- <string name="letterbox_education_got_it" msgid="4057634570866051177">"OK"</string>
+ <string name="letterbox_education_got_it" msgid="4057634570866051177">"Ok"</string>
<string name="letterbox_education_expand_button_description" msgid="1729796567101129834">"Espandi per avere ulteriori informazioni."</string>
<string name="letterbox_restart_dialog_title" msgid="8543049527871033505">"Vuoi riavviare per migliorare la visualizzazione?"</string>
<string name="letterbox_restart_dialog_description" msgid="6096946078246557848">"Puoi riavviare l\'app affinché venga visualizzata meglio sullo schermo, ma potresti perdere i tuoi progressi o eventuali modifiche non salvate"</string>
diff --git a/libs/WindowManager/Shell/res/values-iw/strings.xml b/libs/WindowManager/Shell/res/values-iw/strings.xml
index 4d7a0936a3e0..fbc384f1be67 100644
--- a/libs/WindowManager/Shell/res/values-iw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-iw/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"הבנתי"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"אין בועות מהזמן האחרון"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"בועות אחרונות ובועות שנסגרו יופיעו כאן"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"שליטה בבועות בכל זמן"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"אפשר להקיש כאן כדי לקבוע אילו אפליקציות ושיחות יוכלו להופיע בבועות"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"בועה"</string>
diff --git a/libs/WindowManager/Shell/res/values-ja/strings.xml b/libs/WindowManager/Shell/res/values-ja/strings.xml
index 96683590d097..dce3a18f8cd0 100644
--- a/libs/WindowManager/Shell/res/values-ja/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ja/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近閉じたバブルはありません"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近表示されたバブルや閉じたバブルが、ここに表示されます"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"バブルはいつでも管理可能"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"バブルで表示するアプリや会話を管理するには、ここをタップします"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"バブル"</string>
diff --git a/libs/WindowManager/Shell/res/values-ka/strings.xml b/libs/WindowManager/Shell/res/values-ka/strings.xml
index a949a18fd449..b396c8c89046 100644
--- a/libs/WindowManager/Shell/res/values-ka/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ka/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"გასაგებია"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ბოლო დროს გამოყენებული ბუშტები არ არის"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"აქ გამოჩნდება ბოლოდროინდელი ბუშტები და უარყოფილი ბუშტები"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ამოხტომის გაკონტროლება ნებისმიერ დროს"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"აქ შეეხეთ იმის სამართავად, თუ რომელი აპები და საუბრები ამოხტეს"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ბუშტი"</string>
diff --git a/libs/WindowManager/Shell/res/values-kk/strings.xml b/libs/WindowManager/Shell/res/values-kk/strings.xml
index cbc924907cac..63ef3d2000dd 100644
--- a/libs/WindowManager/Shell/res/values-kk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kk/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Түсінікті"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Жақындағы қалқыма хабарлар жоқ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Соңғы және жабылған қалқыма хабарлар осы жерде көрсетіледі."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Қалқыма хабарларды кез келген уақытта басқарыңыз"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Қалқыма хабарда көрсетілетін қолданбалар мен әңгімелерді реттеу үшін осы жерді түртіңіз."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Көпіршік"</string>
diff --git a/libs/WindowManager/Shell/res/values-km/strings.xml b/libs/WindowManager/Shell/res/values-km/strings.xml
index 3e36113995d9..2ce8ba37b3bf 100644
--- a/libs/WindowManager/Shell/res/values-km/strings.xml
+++ b/libs/WindowManager/Shell/res/values-km/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"យល់ហើយ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"មិនមាន​ពពុះ​ថ្មីៗ​ទេ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ពពុះថ្មីៗ​ និង​ពពុះដែលបានបិទ​​នឹង​បង្ហាញ​នៅទីនេះ"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"គ្រប់គ្រង​ផ្ទាំងអណ្ដែតនៅពេលណាក៏បាន"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ចុចត្រង់នេះ ដើម្បីគ្រប់គ្រងកម្មវិធី និងការសន្ទនាដែលអាចបង្ហាញជាផ្ទាំងអណ្ដែត"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ពពុះ"</string>
diff --git a/libs/WindowManager/Shell/res/values-kn/strings.xml b/libs/WindowManager/Shell/res/values-kn/strings.xml
index 5e0dad8255b4..4b8aaa93b2a7 100644
--- a/libs/WindowManager/Shell/res/values-kn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kn/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ಅರ್ಥವಾಯಿತು"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ಯಾವುದೇ ಇತ್ತೀಚಿನ ಬಬಲ್ಸ್ ಇಲ್ಲ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ಇತ್ತೀಚಿನ ಬಬಲ್ಸ್ ಮತ್ತು ವಜಾಗೊಳಿಸಿದ ಬಬಲ್ಸ್ ಇಲ್ಲಿ ಗೋಚರಿಸುತ್ತವೆ"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ಯಾವುದೇ ಸಮಯದಲ್ಲಿ ಬಬಲ್ಸ್ ಅನ್ನು ನಿಯಂತ್ರಿಸಿ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ಯಾವ ಆ್ಯಪ್‌ಗಳು ಮತ್ತು ಸಂಭಾಷಣೆಗಳನ್ನು ಬಬಲ್ ಮಾಡಬಹುದು ಎಂಬುದನ್ನು ನಿರ್ವಹಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ಬಬಲ್"</string>
diff --git a/libs/WindowManager/Shell/res/values-ko/strings.xml b/libs/WindowManager/Shell/res/values-ko/strings.xml
index f1b34556954e..ffa77b0dc0e2 100644
--- a/libs/WindowManager/Shell/res/values-ko/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ko/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"확인"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"최근 대화창 없음"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"최근 대화창과 내가 닫은 대화창이 여기에 표시됩니다."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"언제든지 대화창을 제어하세요"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"대화창을 만들 수 있는 앱과 대화를 관리하려면 여기를 탭하세요."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"버블"</string>
diff --git a/libs/WindowManager/Shell/res/values-ky/strings.xml b/libs/WindowManager/Shell/res/values-ky/strings.xml
index 200359aded72..b74875c5885a 100644
--- a/libs/WindowManager/Shell/res/values-ky/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ky/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Түшүндүм"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Азырынча эч нерсе жок"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Акыркы жана жабылган калкып чыкма билдирмелер ушул жерде көрүнөт"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Калкып чыкма билдирмелерди каалаган убакта көзөмөлдөңүз"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Калкып чыкма билдирме түрүндө көрүнө турган колдонмолор менен маектерди тандоо үчүн бул жерди таптаңыз"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Көбүк"</string>
diff --git a/libs/WindowManager/Shell/res/values-lo/strings.xml b/libs/WindowManager/Shell/res/values-lo/strings.xml
index 43835d5afa67..3e1ab6d28eeb 100644
--- a/libs/WindowManager/Shell/res/values-lo/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lo/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ເຂົ້າໃຈແລ້ວ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ບໍ່ມີຟອງຫຼ້າສຸດ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ຟອງຫຼ້າສຸດ ແລະ ຟອງທີ່ປິດໄປຈະປາກົດຢູ່ບ່ອນນີ້"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ຄວບຄຸມຟອງໄດ້ທຸກເວລາ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ແຕະບ່ອນນີ້ເພື່ອຈັດການແອັບ ແລະ ການສົນທະນາທີ່ສາມາດສະແດງເປັນແບບຟອງໄດ້"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ຟອງ"</string>
diff --git a/libs/WindowManager/Shell/res/values-lt/strings.xml b/libs/WindowManager/Shell/res/values-lt/strings.xml
index 0c6cc58aa1ec..f4751aae323d 100644
--- a/libs/WindowManager/Shell/res/values-lt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lt/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Supratau"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nėra naujausių burbulų"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Naujausi ir atsisakyti burbulai bus rodomi čia"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bet kada valdyti burbulus"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Palietę čia valdykite, kurie pokalbiai ir programos gali būti rodomi burbuluose"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Debesėlis"</string>
diff --git a/libs/WindowManager/Shell/res/values-lv/strings.xml b/libs/WindowManager/Shell/res/values-lv/strings.xml
index f86e937edd33..5fab5778d3d5 100644
--- a/libs/WindowManager/Shell/res/values-lv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lv/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Labi"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nav nesen aizvērtu burbuļu"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Šeit būs redzami nesen rādītie burbuļi un aizvērtie burbuļi"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Pārvaldīt burbuļus jebkurā laikā"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Pieskarieties šeit, lai pārvaldītu, kuras lietotnes un sarunas var rādīt burbulī"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbulis"</string>
diff --git a/libs/WindowManager/Shell/res/values-mk/strings.xml b/libs/WindowManager/Shell/res/values-mk/strings.xml
index 49e850fac1c0..906fc094ea5a 100644
--- a/libs/WindowManager/Shell/res/values-mk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mk/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Сфатив"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нема неодамнешни балончиња"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Неодамнешните и отфрлените балончиња ќе се појавуваат тука"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контролирајте ги балончињата во секое време"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Допрете тука за да одредите на кои апл. и разговори може да се појават балончиња"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
diff --git a/libs/WindowManager/Shell/res/values-ml/strings.xml b/libs/WindowManager/Shell/res/values-ml/strings.xml
index fbb5514e4648..65e6d2c4c8e7 100644
--- a/libs/WindowManager/Shell/res/values-ml/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ml/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"മനസ്സിലായി"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"അടുത്തിടെയുള്ള ബബിളുകൾ ഒന്നുമില്ല"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"അടുത്തിടെയുള്ള ബബിളുകൾ, ഡിസ്മിസ് ചെയ്ത ബബിളുകൾ എന്നിവ ഇവിടെ ദൃശ്യമാവും"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ബബിളുകൾ ഏതുസമയത്തും നിയന്ത്രിക്കുക"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ഏതൊക്കെ ആപ്പുകളും സംഭാഷണങ്ങളും ബബിൾ ചെയ്യാനാകുമെന്നത് മാനേജ് ചെയ്യാൻ ഇവിടെ ടാപ്പ് ചെയ്യുക"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ബബിൾ"</string>
diff --git a/libs/WindowManager/Shell/res/values-mn/strings.xml b/libs/WindowManager/Shell/res/values-mn/strings.xml
index 8274f4456c57..44c594691e36 100644
--- a/libs/WindowManager/Shell/res/values-mn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mn/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ойлголоо"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Саяхны бөмбөлөг алга байна"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Саяхны бөмбөлгүүд болон үл хэрэгссэн бөмбөлгүүд энд харагдана"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Бөмбөлгүүдийг хүссэн үедээ хянах"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ямар апп болон харилцан ярианууд бөмбөлгөөр харагдахыг энд удирдана уу"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Бөмбөлөг"</string>
diff --git a/libs/WindowManager/Shell/res/values-mr/strings.xml b/libs/WindowManager/Shell/res/values-mr/strings.xml
index c1f3e123ac41..bd898c4395ee 100644
--- a/libs/WindowManager/Shell/res/values-mr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mr/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"समजले"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"अलीकडील कोणतेही बबल नाहीत"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"अलीकडील बबल आणि डिसमिस केलेले बबल येथे दिसतील"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"बबल कधीही नियंत्रित करा"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"कोणती ॲप्स आणि संभाषणे बबल होऊ शकतात हे व्यवस्थापित करण्यासाठी येथे टॅप करा"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-ms/strings.xml b/libs/WindowManager/Shell/res/values-ms/strings.xml
index 82d84e8da6d9..86a7025f5e39 100644
--- a/libs/WindowManager/Shell/res/values-ms/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ms/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Tiada gelembung terbaharu"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Gelembung baharu dan gelembung yang diketepikan akan dipaparkan di sini"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kawal gelembung pada bila-bila masa"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ketik di sini untuk mengurus apl dan perbualan yang boleh menggunakan gelembung"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Gelembung"</string>
diff --git a/libs/WindowManager/Shell/res/values-my/strings.xml b/libs/WindowManager/Shell/res/values-my/strings.xml
index 2e88ab341984..4c494eb586a2 100644
--- a/libs/WindowManager/Shell/res/values-my/strings.xml
+++ b/libs/WindowManager/Shell/res/values-my/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"နားလည်ပြီ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"လတ်တလော ပူဖောင်းကွက်များ မရှိပါ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"လတ်တလော ပူဖောင်းကွက်များနှင့် ပိတ်လိုက်သော ပူဖောင်းကွက်များကို ဤနေရာတွင် မြင်ရပါမည်"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ပူဖောင်းကွက်ကို အချိန်မရွေး ထိန်းချုပ်ရန်"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ပူဖောင်းကွက်သုံးနိုင်သည့် အက်ပ်နှင့် စကားဝိုင်းများ စီမံရန် ဤနေရာကို တို့ပါ"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ပူဖောင်းဖောက်သံ"</string>
diff --git a/libs/WindowManager/Shell/res/values-nb/strings.xml b/libs/WindowManager/Shell/res/values-nb/strings.xml
index f7ea9ce78dd8..e9f90c0cb0ea 100644
--- a/libs/WindowManager/Shell/res/values-nb/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nb/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Greit"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ingen nylige bobler"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nylige bobler og avviste bobler vises her"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontroller bobler når som helst"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Trykk her for å administrere hvilke apper og samtaler som kan vises i bobler"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
diff --git a/libs/WindowManager/Shell/res/values-ne/strings.xml b/libs/WindowManager/Shell/res/values-ne/strings.xml
index 3f6dc046c10b..dcfff7c30a1a 100644
--- a/libs/WindowManager/Shell/res/values-ne/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ne/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"बुझेँ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"हालैका बबलहरू छैनन्"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"हालैका बबल र खारेज गरिएका बबलहरू यहाँ देखिने छन्"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"जुनसुकै बेला बबलसम्बन्धी सुविधा नियन्त्रण गर्नुहोस्"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"कुन एप र कुराकानी बबल प्रयोग गर्न सक्छन् भन्ने कुराको व्यवस्थापन गर्न यहाँ ट्याप गर्नुहोस्"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-nl/strings.xml b/libs/WindowManager/Shell/res/values-nl/strings.xml
index 978ed3ccad3c..2f560f04205c 100644
--- a/libs/WindowManager/Shell/res/values-nl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nl/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Geen recente bubbels"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recente bubbels en gesloten bubbels zie je hier"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bubbels beheren wanneer je wilt"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tik hier om te beheren welke apps en gesprekken als bubbel kunnen worden getoond"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubbel"</string>
diff --git a/libs/WindowManager/Shell/res/values-or/strings.xml b/libs/WindowManager/Shell/res/values-or/strings.xml
index b66448b6308f..ad25de51a3e7 100644
--- a/libs/WindowManager/Shell/res/values-or/strings.xml
+++ b/libs/WindowManager/Shell/res/values-or/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ବୁଝିଗଲି"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ବର୍ତ୍ତମାନ କୌଣସି ବବଲ୍ ନାହିଁ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ବର୍ତ୍ତମାନର ଏବଂ ଖାରଜ କରାଯାଇଥିବା ବବଲଗୁଡ଼ିକ ଏଠାରେ ଦେଖାଯିବ"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ଯେ କୌଣସି ସମୟରେ ବବଲଗୁଡ଼ିକ ନିୟନ୍ତ୍ରଣ କରନ୍ତୁ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"କେଉଁ ଆପ୍ସ ଓ ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ ବବଲ ହୋଇପାରିବ ତାହା ପରିଚାଳନା କରିବାକୁ ଏଠାରେ ଟାପ କରନ୍ତୁ"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ବବଲ୍"</string>
diff --git a/libs/WindowManager/Shell/res/values-pa/strings.xml b/libs/WindowManager/Shell/res/values-pa/strings.xml
index 72cb92053e56..4bd9d6b9d214 100644
--- a/libs/WindowManager/Shell/res/values-pa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pa/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ਸਮਝ ਲਿਆ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ਕੋਈ ਹਾਲੀਆ ਬਬਲ ਨਹੀਂ"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ਹਾਲੀਆ ਬਬਲ ਅਤੇ ਖਾਰਜ ਕੀਤੇ ਬਬਲ ਇੱਥੇ ਦਿਸਣਗੇ"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ਬਬਲ ਦੀ ਸੁਵਿਧਾ ਨੂੰ ਕਿਸੇ ਵੀ ਵੇਲੇ ਕੰਟਰੋਲ ਕਰੋ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ਇਹ ਪ੍ਰਬੰਧਨ ਕਰਨ ਲਈ ਇੱਥੇ ਟੈਪ ਕਰੋ ਕਿ ਕਿਹੜੀਆਂ ਐਪਾਂ ਅਤੇ ਗੱਲਾਂਬਾਤਾਂ ਬਬਲ ਹੋ ਸਕਦੀਆਂ ਹਨ"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"ਬੁਲਬੁਲਾ"</string>
diff --git a/libs/WindowManager/Shell/res/values-pl/strings.xml b/libs/WindowManager/Shell/res/values-pl/strings.xml
index 24c1f1410fde..d98be758c97e 100644
--- a/libs/WindowManager/Shell/res/values-pl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pl/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Brak ostatnich dymków"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tutaj będą pojawiać się ostatnie i odrzucone dymki"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Zarządzaj dymkami, kiedy chcesz"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Kliknij tutaj, aby zarządzać wyświetlaniem aplikacji i rozmów jako dymków"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Dymek"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
index 69002026f2e5..81d325a7ec58 100644
--- a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ok"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e dispensados aparecerão aqui"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões a qualquer momento"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerenciar quais apps e conversas podem aparecer em balões"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
index 853c682b5089..7fa592afbbe3 100644
--- a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e ignorados vão aparecer aqui."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões em qualquer altura"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerir que apps e conversas podem aparecer em balões"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Balão"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt/strings.xml b/libs/WindowManager/Shell/res/values-pt/strings.xml
index 69002026f2e5..81d325a7ec58 100644
--- a/libs/WindowManager/Shell/res/values-pt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ok"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e dispensados aparecerão aqui"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões a qualquer momento"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerenciar quais apps e conversas podem aparecer em balões"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
diff --git a/libs/WindowManager/Shell/res/values-ro/strings.xml b/libs/WindowManager/Shell/res/values-ro/strings.xml
index 7356f7cf08d2..0341667be3e3 100644
--- a/libs/WindowManager/Shell/res/values-ro/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ro/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nu există baloane recente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Baloanele recente și baloanele respinse vor apărea aici"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controlează baloanele oricând"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Atinge aici pentru a gestiona aplicațiile și conversațiile care pot apărea în balon"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
diff --git a/libs/WindowManager/Shell/res/values-ru/strings.xml b/libs/WindowManager/Shell/res/values-ru/strings.xml
index 61e3ec9b7da2..da234c71a009 100644
--- a/libs/WindowManager/Shell/res/values-ru/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ru/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ОК"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нет недавних всплывающих чатов"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Здесь будут появляться недавние и скрытые всплывающие чаты."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Всплывающие чаты"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Укажите приложения и разговоры, для которых разрешены всплывающие чаты."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Всплывающая подсказка"</string>
diff --git a/libs/WindowManager/Shell/res/values-si/strings.xml b/libs/WindowManager/Shell/res/values-si/strings.xml
index ac78385b9644..236da5d67fc9 100644
--- a/libs/WindowManager/Shell/res/values-si/strings.xml
+++ b/libs/WindowManager/Shell/res/values-si/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"තේරුණා"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"මෑත බුබුලු නැත"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"මෑත බුබුලු සහ ඉවත ලූ බුබුලු මෙහි දිස් වනු ඇත"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ඕනෑම වේලාවක බුබුලු පාලනය කරන්න"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"බුබුලු කළ හැකි යෙදුම් සහ සංවාද කළමනාකරණය කිරීමට මෙහි තට්ටු කරන්න"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"බුබුළු"</string>
diff --git a/libs/WindowManager/Shell/res/values-sk/strings.xml b/libs/WindowManager/Shell/res/values-sk/strings.xml
index d659d51afc5f..eaabdabb0285 100644
--- a/libs/WindowManager/Shell/res/values-sk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sk/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Dobre"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Žiadne nedávne bubliny"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tu sa budú zobrazovať nedávne a zavreté bubliny"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ovládajte bubliny kedykoľvek"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Klepnite tu a spravujte, ktoré aplikácie a konverzácie môžu ovládať bubliny"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
diff --git a/libs/WindowManager/Shell/res/values-sl/strings.xml b/libs/WindowManager/Shell/res/values-sl/strings.xml
index 91871fbf94ec..514a0b3548db 100644
--- a/libs/WindowManager/Shell/res/values-sl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sl/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"V redu"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ni nedavnih oblačkov"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tukaj bodo prikazani tako nedavni kot tudi opuščeni oblački"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljanje oblačkov"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dotaknite se tukaj za upravljanje aplikacij in pogovorov, ki so lahko prikazani v oblačkih"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Mehurček"</string>
diff --git a/libs/WindowManager/Shell/res/values-sq/strings.xml b/libs/WindowManager/Shell/res/values-sq/strings.xml
index 45eb04a45271..790119b8e9cc 100644
--- a/libs/WindowManager/Shell/res/values-sq/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sq/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"E kuptova"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nuk ka flluska të fundit"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Flluskat e fundit dhe flluskat e hequra do të shfaqen këtu"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrollo flluskat në çdo moment"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Trokit këtu për të menaxhuar aplikacionet e bisedat që do të shfaqen në flluska"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Flluskë"</string>
diff --git a/libs/WindowManager/Shell/res/values-sr/strings.xml b/libs/WindowManager/Shell/res/values-sr/strings.xml
index 368df542796f..9fd9f3ed18a9 100644
--- a/libs/WindowManager/Shell/res/values-sr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sr/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Важи"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нема недавних облачића"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Овде се приказују недавни и одбачени облачићи"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контролишите облачиће у сваком тренутку"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Додирните овде и одредите које апликације и конверзације могу да имају облачић"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Облачић"</string>
diff --git a/libs/WindowManager/Shell/res/values-sv/strings.xml b/libs/WindowManager/Shell/res/values-sv/strings.xml
index 35d5b7af2b62..f7f218e4ded7 100644
--- a/libs/WindowManager/Shell/res/values-sv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sv/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Inga nya bubblor"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"De senaste bubblorna och ignorerade bubblor visas här"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Styr bubblor när som helst"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tryck här för att hantera vilka appar och konversationer som får visas i bubblor"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubbla"</string>
diff --git a/libs/WindowManager/Shell/res/values-sw/strings.xml b/libs/WindowManager/Shell/res/values-sw/strings.xml
index 52e0a6960948..83173f3649c0 100644
--- a/libs/WindowManager/Shell/res/values-sw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sw/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Nimeelewa"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hakuna viputo vya hivi majuzi"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Viputo vya hivi karibuni na vile vilivyoondolewa vitaonekana hapa"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Dhibiti viputo wakati wowote"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Gusa hapa ili udhibiti programu na mazungumzo yanayoweza kutumia viputo"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Kiputo"</string>
diff --git a/libs/WindowManager/Shell/res/values-ta/strings.xml b/libs/WindowManager/Shell/res/values-ta/strings.xml
index 98a7d679014c..ea2ee9c22c08 100644
--- a/libs/WindowManager/Shell/res/values-ta/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ta/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"சரி"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"சமீபத்திய குமிழ்கள் இல்லை"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"சமீபத்திய குமிழ்களும் நிராகரிக்கப்பட்ட குமிழ்களும் இங்கே தோன்றும்"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"எப்போது வேண்டுமானாலும் குமிழ்களைக் கட்டுப்படுத்துங்கள்"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"எந்தெந்த ஆப்ஸும் உரையாடல்களும் குமிழியாகலாம் என்பதை நிர்வகிக்க இங்கே தட்டுங்கள்"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"பபிள்"</string>
diff --git a/libs/WindowManager/Shell/res/values-te/strings.xml b/libs/WindowManager/Shell/res/values-te/strings.xml
index 70f810e21fcc..e2772bf7311e 100644
--- a/libs/WindowManager/Shell/res/values-te/strings.xml
+++ b/libs/WindowManager/Shell/res/values-te/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"అర్థమైంది"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ఇటీవలి బబుల్స్ ఏవీ లేవు"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ఇటీవలి బబుల్స్ మరియు తీసివేసిన బబుల్స్ ఇక్కడ కనిపిస్తాయి"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"బబుల్స్‌ను ఎప్పుడైనా కంట్రోల్ చేయండి"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ఏ యాప్‌లు, సంభాషణలను బబుల్ చేయాలో మేనేజ్ చేయడానికి ఇక్కడ ట్యాప్ చేయండి"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"బబుల్"</string>
diff --git a/libs/WindowManager/Shell/res/values-television/config.xml b/libs/WindowManager/Shell/res/values-television/config.xml
index cc0333efd82b..5f9dbdb60516 100644
--- a/libs/WindowManager/Shell/res/values-television/config.xml
+++ b/libs/WindowManager/Shell/res/values-television/config.xml
@@ -44,12 +44,11 @@
if a custom action is present before closing it. -->
<integer name="config_pipForceCloseDelay">5000</integer>
- <!-- Animation duration when exit starting window: fade out icon -->
- <integer name="starting_window_app_reveal_icon_fade_out_duration">0</integer>
-
<!-- Animation duration when exit starting window: reveal app -->
- <integer name="starting_window_app_reveal_anim_delay">0</integer>
+ <integer name="starting_window_app_reveal_anim_duration">500</integer>
- <!-- Animation duration when exit starting window: reveal app -->
- <integer name="starting_window_app_reveal_anim_duration">0</integer>
+ <!-- Default animation type when hiding the starting window. The possible values are:
+ - 0 for radial vanish + slide up
+ - 1 for fade out -->
+ <integer name="starting_window_exit_animation_type">1</integer>
</resources>
diff --git a/libs/WindowManager/Shell/res/values-th/strings.xml b/libs/WindowManager/Shell/res/values-th/strings.xml
index 0efaab2d2f15..14bdc4bb040f 100644
--- a/libs/WindowManager/Shell/res/values-th/strings.xml
+++ b/libs/WindowManager/Shell/res/values-th/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"รับทราบ"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ไม่มีบับเบิลเมื่อเร็วๆ นี้"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"บับเบิลที่แสดงและที่ปิดไปเมื่อเร็วๆ นี้จะปรากฏที่นี่"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ควบคุมบับเบิลได้ทุกเมื่อ"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"แตะที่นี่เพื่อจัดการแอปและการสนทนาที่แสดงเป็นบับเบิลได้"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"บับเบิล"</string>
diff --git a/libs/WindowManager/Shell/res/values-tl/strings.xml b/libs/WindowManager/Shell/res/values-tl/strings.xml
index e5d535015c52..208e8cbc2277 100644
--- a/libs/WindowManager/Shell/res/values-tl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tl/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Walang kamakailang bubble"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Lalabas dito ang mga kamakailang bubble at na-dismiss na bubble"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolin ang mga bubble anumang oras"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Mag-tap dito para pamahalaan ang mga app at conversion na puwedeng mag-bubble"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-tr/strings.xml b/libs/WindowManager/Shell/res/values-tr/strings.xml
index 8e7f1620354b..b6c0d6864d1c 100644
--- a/libs/WindowManager/Shell/res/values-tr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tr/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Anladım"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Son kapatılan baloncuk yok"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Son baloncuklar ve kapattığınız baloncuklar burada görünür"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Baloncukları istediğiniz zaman kontrol edin"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Buraya dokunarak baloncuk olarak gösterilecek uygulama ve görüşmeleri yönetin"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Baloncuk"</string>
diff --git a/libs/WindowManager/Shell/res/values-uk/strings.xml b/libs/WindowManager/Shell/res/values-uk/strings.xml
index 5c7c6c4dae30..6a119881518a 100644
--- a/libs/WindowManager/Shell/res/values-uk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uk/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Зрозуміло"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Немає нещодавніх спливаючих чатів"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Тут з\'являтимуться нещодавні й закриті спливаючі чати"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контроль спливаючих чатів"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Натисніть тут, щоб вибрати, для яких додатків і розмов дозволити спливаючі чати"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Спливаюче сповіщення"</string>
diff --git a/libs/WindowManager/Shell/res/values-ur/strings.xml b/libs/WindowManager/Shell/res/values-ur/strings.xml
index 451d048ca825..292cabae3cdb 100644
--- a/libs/WindowManager/Shell/res/values-ur/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ur/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"سمجھ آ گئی"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"کوئی حالیہ بلبلہ نہیں"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"حالیہ بلبلے اور برخاست شدہ بلبلے یہاں ظاہر ہوں گے"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"کسی بھی وقت بلبلے کو کنٹرول کریں"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"یہ نظم کرنے کے لیے یہاں تھپتھپائیں کہ کون سی ایپس اور گفتگوئیں بلبلہ سکتی ہیں"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"بلبلہ"</string>
diff --git a/libs/WindowManager/Shell/res/values-uz/strings.xml b/libs/WindowManager/Shell/res/values-uz/strings.xml
index 4211ea7a5e7d..5f33fe941040 100644
--- a/libs/WindowManager/Shell/res/values-uz/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uz/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hech qanday bulutcha topilmadi"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Eng oxirgi va yopilgan bulutchali chatlar shu yerda chiqadi"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bulutchalardagi bildirishnomalar"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Bulutchalarda bildirishnomalar chiqishiga ruxsat beruvchi ilova va suhbatlarni tanlang."</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Pufaklar"</string>
diff --git a/libs/WindowManager/Shell/res/values-vi/strings.xml b/libs/WindowManager/Shell/res/values-vi/strings.xml
index 0a0205d8f591..29b3b854e3c3 100644
--- a/libs/WindowManager/Shell/res/values-vi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-vi/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Đã hiểu"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Không có bong bóng trò chuyện nào gần đây"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Bong bóng trò chuyện đã đóng và bong bóng trò chuyện gần đây sẽ xuất hiện ở đây"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kiểm soát bong bóng bất cứ lúc nào"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Nhấn vào đây để quản lý việc dùng bong bóng cho các ứng dụng và cuộc trò chuyện"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Bong bóng"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
index 29dc077469e6..7820965a81c1 100644
--- a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"知道了"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近没有对话泡"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"此处会显示最近的对话泡和已关闭的对话泡"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"随时控制对话泡"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"点按此处即可管理哪些应用和对话可以显示对话泡"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"气泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
index 0755d61e6a6d..f0df04a1ea53 100644
--- a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"知道了"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"沒有最近曾使用的小視窗"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近使用和關閉的小視窗會在這裡顯示"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"隨時控制對話氣泡"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"輕按這裡即可管理哪些應用程式和對話可以使用對話氣泡"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"氣泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
index f93188343fdf..a9773634ea3d 100644
--- a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"我知道了"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近沒有任何對話框"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近的對話框和已關閉的對話框會顯示在這裡"</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"你隨時可以控管對話框的各項設定"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"輕觸這裡即可管理哪些應用程式和對話可顯示對話框"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"泡泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zu/strings.xml b/libs/WindowManager/Shell/res/values-zu/strings.xml
index 3ba0abee2a95..a6903a38ecf4 100644
--- a/libs/WindowManager/Shell/res/values-zu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zu/strings.xml
@@ -76,6 +76,10 @@
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ngiyezwa"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Awekho amabhamuza akamuva"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Amabhamuza akamuva namabhamuza asusiwe azobonakala lapha."</string>
+ <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+ <skip />
+ <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+ <skip />
<string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Lawula amabhamuza noma nini"</string>
<string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Thepha lapha ukuze ulawule ukuthi yimaphi ama-app kanye nezingxoxo ezingenza amabhamuza"</string>
<string name="notification_bubble_title" msgid="6082910224488253378">"Ibhamuza"</string>
diff --git a/libs/WindowManager/Shell/res/values/config.xml b/libs/WindowManager/Shell/res/values/config.xml
index a3916b71592b..97a9d4874455 100644
--- a/libs/WindowManager/Shell/res/values/config.xml
+++ b/libs/WindowManager/Shell/res/values/config.xml
@@ -83,6 +83,11 @@
<!-- Animation duration when exit starting window: reveal app -->
<integer name="starting_window_app_reveal_anim_duration">266</integer>
+ <!-- Default animation type when hiding the starting window. The possible values are:
+ - 0 for radial vanish + slide up
+ - 1 for fade out -->
+ <integer name="starting_window_exit_animation_type">0</integer>
+
<!-- Default insets [LEFT/RIGHTxTOP/BOTTOM] from the screen edge for picture-in-picture windows.
These values are in DPs and will be converted to pixel sizes internally. -->
<string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">
diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml
index eabe3a4eca0b..b556150e2ab9 100644
--- a/libs/WindowManager/Shell/res/values/strings.xml
+++ b/libs/WindowManager/Shell/res/values/strings.xml
@@ -142,6 +142,10 @@
<string name="bubble_accessibility_action_move_bottom_left">Move bottom left</string>
<!-- Action in accessibility menu to move the stack of bubbles to the bottom right of the screen. [CHAR LIMIT=30]-->
<string name="bubble_accessibility_action_move_bottom_right">Move bottom right</string>
+ <!-- Accessibility announcement when the stack of bubbles expands. [CHAR LIMIT=NONE]-->
+ <string name="bubble_accessibility_announce_expand">expand <xliff:g id="bubble_title" example="Messages">%1$s</xliff:g></string>
+ <!-- Accessibility announcement when the stack of bubbles collapses. [CHAR LIMIT=NONE]-->
+ <string name="bubble_accessibility_announce_collapse">collapse <xliff:g id="bubble_title" example="Messages">%1$s</xliff:g></string>
<!-- Label for the button that takes the user to the notification settings for the given app. -->
<string name="bubbles_app_settings"><xliff:g id="notification_title" example="Android Messages">%1$s</xliff:g> settings</string>
<!-- Text used for the bubble dismiss area. Bubbles dragged to, or flung towards, this area will go away. [CHAR LIMIT=30] -->
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index d10de833ab89..c124b532b89d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -25,6 +25,7 @@ import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_STACK_
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.wm.shell.bubbles.BubblePositioner.NUM_VISIBLE_WHEN_RESTING;
+import static com.android.wm.shell.common.bubbles.BubbleConstants.BUBBLE_EXPANDED_SCRIM_ALPHA;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES;
import android.animation.Animator;
@@ -131,9 +132,6 @@ public class BubbleStackView extends FrameLayout
private static final int EXPANDED_VIEW_ALPHA_ANIMATION_DURATION = 150;
- /** Should be kept in sync with value in TaskbarScrimViewController. */
- private static final float SCRIM_ALPHA = 0.32f;
-
/** Minimum alpha value for scrim when alpha is being changed via drag */
private static final float MIN_SCRIM_ALPHA_FOR_DRAG = 0.2f;
@@ -780,14 +778,15 @@ public class BubbleStackView extends FrameLayout
private float getScrimAlphaForDrag(float dragAmount) {
// dragAmount should be negative as we allow scroll up only
if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
- float alphaRange = SCRIM_ALPHA - MIN_SCRIM_ALPHA_FOR_DRAG;
+ float alphaRange = BUBBLE_EXPANDED_SCRIM_ALPHA - MIN_SCRIM_ALPHA_FOR_DRAG;
int dragMax = mExpandedBubble.getExpandedView().getContentHeight();
float dragFraction = dragAmount / dragMax;
- return Math.max(SCRIM_ALPHA - alphaRange * dragFraction, MIN_SCRIM_ALPHA_FOR_DRAG);
+ return Math.max(BUBBLE_EXPANDED_SCRIM_ALPHA - alphaRange * dragFraction,
+ MIN_SCRIM_ALPHA_FOR_DRAG);
}
- return SCRIM_ALPHA;
+ return BUBBLE_EXPANDED_SCRIM_ALPHA;
}
};
@@ -2038,6 +2037,7 @@ public class BubbleStackView extends FrameLayout
});
}
notifyExpansionChanged(mExpandedBubble, mIsExpanded);
+ announceExpandForAccessibility(mExpandedBubble, mIsExpanded);
}
/**
@@ -2054,6 +2054,34 @@ public class BubbleStackView extends FrameLayout
}
}
+ private void announceExpandForAccessibility(BubbleViewProvider bubble, boolean expanded) {
+ if (bubble instanceof Bubble) {
+ String contentDescription = getBubbleContentDescription((Bubble) bubble);
+ String message = getResources().getString(
+ expanded
+ ? R.string.bubble_accessibility_announce_expand
+ : R.string.bubble_accessibility_announce_collapse, contentDescription);
+ announceForAccessibility(message);
+ }
+ }
+
+ @NonNull
+ private String getBubbleContentDescription(Bubble bubble) {
+ final String appName = bubble.getAppName();
+ final String title = bubble.getTitle() != null
+ ? bubble.getTitle()
+ : getResources().getString(R.string.notification_bubble_title);
+
+ if (appName == null || title.equals(appName)) {
+ // App bubble title equals the app name, so return only the title to avoid having
+ // content description like: `<app> from <app>`.
+ return title;
+ } else {
+ return getResources().getString(
+ R.string.bubble_content_description_single, title, appName);
+ }
+ }
+
private boolean isGestureNavEnabled() {
return mContext.getResources().getInteger(
com.android.internal.R.integer.config_navBarInteractionMode)
@@ -2215,7 +2243,7 @@ public class BubbleStackView extends FrameLayout
if (show) {
mScrim.animate()
.setInterpolator(ALPHA_IN)
- .alpha(SCRIM_ALPHA)
+ .alpha(BUBBLE_EXPANDED_SCRIM_ALPHA)
.setListener(listener)
.start();
} else {
@@ -2944,7 +2972,7 @@ public class BubbleStackView extends FrameLayout
mBubbleController.getSysuiProxy().onManageMenuExpandChanged(show);
mManageMenuScrim.animate()
.setInterpolator(show ? ALPHA_IN : ALPHA_OUT)
- .alpha(show ? SCRIM_ALPHA : 0f)
+ .alpha(show ? BUBBLE_EXPANDED_SCRIM_ALPHA : 0f)
.withEndAction(endAction)
.start();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java
index b56d05537215..0329b8df7544 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java
@@ -14,17 +14,13 @@
* limitations under the License.
*/
-package com.android.systemui.biometrics
+package com.android.wm.shell.common.bubbles;
-import android.testing.TestableLooper
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import org.junit.runner.RunWith
+/**
+ * Constants shared between bubbles in shell & things we have to do for bubbles in launcher.
+ */
+public class BubbleConstants {
-// TODO(b/278622168): remove with flag
-@RunWith(AndroidJUnit4::class)
-@TestableLooper.RunWithLooper(setAsMainLooper = true)
-@SmallTest
-class AuthContainerViewTest2 : AuthContainerViewTest() {
- override val useNewBiometricPrompt = true
+ /** The alpha for the scrim shown when bubbles are expanded. */
+ public static float BUBBLE_EXPANDED_SCRIM_ALPHA = .32f;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
index 1901e0bbe700..a5000feae239 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
@@ -19,6 +19,14 @@ package com.android.wm.shell.common.split;
import static android.view.WindowManager.DOCKED_INVALID;
import static android.view.WindowManager.DOCKED_LEFT;
import static android.view.WindowManager.DOCKED_RIGHT;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_30_70;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_50_50;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_70_30;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_MINIMIZE;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_NONE;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SnapPosition;
import android.content.Context;
import android.content.res.Configuration;
@@ -263,7 +271,7 @@ public class DividerSnapAlgorithm {
private SnapTarget snap(int position, boolean hardDismiss) {
if (shouldApplyFreeSnapMode(position)) {
- return new SnapTarget(position, position, SnapTarget.FLAG_NONE);
+ return new SnapTarget(position, position, SNAP_TO_NONE);
}
int minIndex = -1;
float minDistance = Float.MAX_VALUE;
@@ -291,8 +299,7 @@ public class DividerSnapAlgorithm {
if (dockedSide == DOCKED_RIGHT) {
startPos += mInsets.left;
}
- mTargets.add(new SnapTarget(startPos, startPos, SnapTarget.FLAG_DISMISS_START,
- 0.35f));
+ mTargets.add(new SnapTarget(startPos, startPos, SNAP_TO_START_AND_DISMISS, 0.35f));
switch (mSnapMode) {
case SNAP_MODE_16_9:
addRatio16_9Targets(isHorizontalDivision, dividerMax);
@@ -307,15 +314,15 @@ public class DividerSnapAlgorithm {
addMinimizedTarget(isHorizontalDivision, dockedSide);
break;
}
- mTargets.add(new SnapTarget(dividerMax, dividerMax, SnapTarget.FLAG_DISMISS_END, 0.35f));
+ mTargets.add(new SnapTarget(dividerMax, dividerMax, SNAP_TO_END_AND_DISMISS, 0.35f));
}
private void addNonDismissingTargets(boolean isHorizontalDivision, int topPosition,
int bottomPosition, int dividerMax) {
- maybeAddTarget(topPosition, topPosition - getStartInset());
+ maybeAddTarget(topPosition, topPosition - getStartInset(), SNAP_TO_30_70);
addMiddleTarget(isHorizontalDivision);
maybeAddTarget(bottomPosition,
- dividerMax - getEndInset() - (bottomPosition + mDividerSize));
+ dividerMax - getEndInset() - (bottomPosition + mDividerSize), SNAP_TO_70_30);
}
private void addFixedDivisionTargets(boolean isHorizontalDivision, int dividerMax) {
@@ -349,16 +356,16 @@ public class DividerSnapAlgorithm {
* Adds a target at {@param position} but only if the area with size of {@param smallerSize}
* meets the minimal size requirement.
*/
- private void maybeAddTarget(int position, int smallerSize) {
+ private void maybeAddTarget(int position, int smallerSize, @SnapPosition int snapTo) {
if (smallerSize >= mMinimalSizeResizableTask) {
- mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+ mTargets.add(new SnapTarget(position, position, snapTo));
}
}
private void addMiddleTarget(boolean isHorizontalDivision) {
int position = DockedDividerUtils.calculateMiddlePosition(isHorizontalDivision,
mInsets, mDisplayWidth, mDisplayHeight, mDividerSize);
- mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+ mTargets.add(new SnapTarget(position, position, SNAP_TO_50_50));
}
private void addMinimizedTarget(boolean isHorizontalDivision, int dockedSide) {
@@ -372,7 +379,7 @@ public class DividerSnapAlgorithm {
position = mDisplayWidth - position - mInsets.right - mDividerSize;
}
}
- mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+ mTargets.add(new SnapTarget(position, position, SNAP_TO_MINIMIZE));
}
public SnapTarget getMiddleTarget() {
@@ -435,14 +442,6 @@ public class DividerSnapAlgorithm {
* Represents a snap target for the divider.
*/
public static class SnapTarget {
- public static final int FLAG_NONE = 0;
-
- /** If the divider reaches this value, the left/top task should be dismissed. */
- public static final int FLAG_DISMISS_START = 1;
-
- /** If the divider reaches this value, the right/bottom task should be dismissed */
- public static final int FLAG_DISMISS_END = 2;
-
/** Position of this snap target. The right/bottom edge of the top/left task snaps here. */
public final int position;
@@ -452,7 +451,10 @@ public class DividerSnapAlgorithm {
*/
public final int taskPosition;
- public final int flag;
+ /**
+ * An int describing the placement of the divider in this snap target.
+ */
+ public final @SnapPosition int snapTo;
public boolean isMiddleTarget;
@@ -462,14 +464,15 @@ public class DividerSnapAlgorithm {
*/
private final float distanceMultiplier;
- public SnapTarget(int position, int taskPosition, int flag) {
- this(position, taskPosition, flag, 1f);
+ public SnapTarget(int position, int taskPosition, @SnapPosition int snapTo) {
+ this(position, taskPosition, snapTo, 1f);
}
- public SnapTarget(int position, int taskPosition, int flag, float distanceMultiplier) {
+ public SnapTarget(int position, int taskPosition, @SnapPosition int snapTo,
+ float distanceMultiplier) {
this.position = position;
this.taskPosition = taskPosition;
- this.flag = flag;
+ this.snapTo = snapTo;
this.distanceMultiplier = distanceMultiplier;
}
}
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 755dba0c895f..4af03fd5b955 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
@@ -23,13 +23,12 @@ import static android.view.WindowManager.DOCKED_INVALID;
import static android.view.WindowManager.DOCKED_LEFT;
import static android.view.WindowManager.DOCKED_RIGHT;
import static android.view.WindowManager.DOCKED_TOP;
-
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_RESIZE;
-import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END;
-import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START;
import static com.android.wm.shell.animation.Interpolators.DIM_INTERPOLATOR;
import static com.android.wm.shell.animation.Interpolators.SLOWDOWN_INTERPOLATOR;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
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.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED;
@@ -511,13 +510,13 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
* target indicates dismissing split.
*/
public void snapToTarget(int currentPosition, DividerSnapAlgorithm.SnapTarget snapTarget) {
- switch (snapTarget.flag) {
- case FLAG_DISMISS_START:
+ switch (snapTarget.snapTo) {
+ case SNAP_TO_START_AND_DISMISS:
flingDividePosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION,
() -> mSplitLayoutHandler.onSnappedToDismiss(false /* bottomOrRight */,
EXIT_REASON_DRAG_DIVIDER));
break;
- case FLAG_DISMISS_END:
+ case SNAP_TO_END_AND_DISMISS:
flingDividePosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION,
() -> mSplitLayoutHandler.onSnappedToDismiss(true /* bottomOrRight */,
EXIT_REASON_DRAG_DIVIDER));
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
index be1b9b1227de..ff38b7e70410 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
@@ -57,6 +57,38 @@ public class SplitScreenConstants {
public @interface SplitPosition {
}
+ /** The divider doesn't snap to any target and is freely placeable. */
+ public static final int SNAP_TO_NONE = 0;
+
+ /** A snap target positioned near the screen edge for a minimized task */
+ public static final int SNAP_TO_MINIMIZE = 1;
+
+ /** If the divider reaches this value, the left/top task should be dismissed. */
+ public static final int SNAP_TO_START_AND_DISMISS = 2;
+
+ /** A snap target in the first half of the screen, where the split is roughly 30-70. */
+ public static final int SNAP_TO_30_70 = 3;
+
+ /** The 50-50 snap target */
+ public static final int SNAP_TO_50_50 = 4;
+
+ /** A snap target in the latter half of the screen, where the split is roughly 70-30. */
+ public static final int SNAP_TO_70_30 = 5;
+
+ /** If the divider reaches this value, the right/bottom task should be dismissed. */
+ public static final int SNAP_TO_END_AND_DISMISS = 6;
+
+ @IntDef(prefix = { "SNAP_TO_" }, value = {
+ SNAP_TO_NONE,
+ SNAP_TO_MINIMIZE,
+ SNAP_TO_START_AND_DISMISS,
+ SNAP_TO_30_70,
+ SNAP_TO_50_50,
+ SNAP_TO_70_30,
+ SNAP_TO_END_AND_DISMISS
+ })
+ public @interface SnapPosition {}
+
public static final int[] CONTROLLED_ACTIVITY_TYPES = {ACTIVITY_TYPE_STANDARD};
public static final int[] CONTROLLED_WINDOWING_MODES =
{WINDOWING_MODE_FULLSCREEN, WINDOWING_MODE_UNDEFINED};
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 c05af73e6765..c0fc02fadd4d 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
@@ -52,8 +52,8 @@ class DesktopModeTaskRepository {
private val activeTasksListeners = ArraySet<ActiveTasksListener>()
// Track visible tasks separately because a task may be part of the desktop but not visible.
private val visibleTasksListeners = ArrayMap<VisibleTasksListener, Executor>()
- // Track corners of desktop tasks, used to determine gesture exclusion
- private val desktopCorners = SparseArray<Region>()
+ // Track corner/caption regions of desktop tasks, used to determine gesture exclusion
+ private val desktopExclusionRegions = SparseArray<Region>()
private var desktopGestureExclusionListener: Consumer<Region>? = null
private var desktopGestureExclusionExecutor: Executor? = null
@@ -96,10 +96,11 @@ class DesktopModeTaskRepository {
}
/**
- * Add a Consumer which will inform other classes of changes to corners for all Desktop tasks.
+ * Add a Consumer which will inform other classes of changes to exclusion regions for all
+ * Desktop tasks.
*/
- fun setTaskCornerListener(cornersListener: Consumer<Region>, executor: Executor) {
- desktopGestureExclusionListener = cornersListener
+ fun setExclusionRegionListener(regionListener: Consumer<Region>, executor: Executor) {
+ desktopGestureExclusionListener = regionListener
desktopGestureExclusionExecutor = executor
executor.execute {
desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
@@ -107,14 +108,14 @@ class DesktopModeTaskRepository {
}
/**
- * Create a new merged region representative of all corners in all desktop tasks.
+ * Create a new merged region representative of all exclusion regions in all desktop tasks.
*/
private fun calculateDesktopExclusionRegion(): Region {
- val desktopCornersRegion = Region()
- desktopCorners.valueIterator().forEach { taskCorners ->
- desktopCornersRegion.op(taskCorners, Region.Op.UNION)
+ val desktopExclusionRegion = Region()
+ desktopExclusionRegions.valueIterator().forEach { taskExclusionRegion ->
+ desktopExclusionRegion.op(taskExclusionRegion, Region.Op.UNION)
}
- return desktopCornersRegion
+ return desktopExclusionRegion
}
/**
@@ -294,22 +295,24 @@ class DesktopModeTaskRepository {
}
/**
- * Updates the active desktop corners; if desktopCorners has been accepted by
- * desktopCornersListener, it will be updated in the appropriate classes.
+ * Updates the active desktop gesture exclusion regions; if desktopExclusionRegions has been
+ * accepted by desktopGestureExclusionListener, it will be updated in the
+ * appropriate classes.
*/
- fun updateTaskCorners(taskId: Int, taskCorners: Region) {
- desktopCorners.put(taskId, taskCorners)
+ fun updateTaskExclusionRegions(taskId: Int, taskExclusionRegions: Region) {
+ desktopExclusionRegions.put(taskId, taskExclusionRegions)
desktopGestureExclusionExecutor?.execute {
desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
}
}
/**
- * Removes the active desktop corners for the specified task; if desktopCorners has been
- * accepted by desktopCornersListener, it will be updated in the appropriate classes.
+ * Removes the desktop gesture exclusion region for the specified task; if exclusionRegion
+ * has been accepted by desktopGestureExclusionListener, it will be updated in the
+ * appropriate classes.
*/
- fun removeTaskCorners(taskId: Int) {
- desktopCorners.delete(taskId)
+ fun removeExclusionRegion(taskId: Int) {
+ desktopExclusionRegions.delete(taskId)
desktopGestureExclusionExecutor?.execute {
desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
}
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 40c519eb0d5a..9ce01184c044 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
@@ -968,17 +968,17 @@ class DesktopTasksController(
}
/**
- * Update the corner region for a specified task
+ * Update the exclusion region for a specified task
*/
- fun onTaskCornersChanged(taskId: Int, corner: Region) {
- desktopModeTaskRepository.updateTaskCorners(taskId, corner)
+ fun onExclusionRegionChanged(taskId: Int, exclusionRegion: Region) {
+ desktopModeTaskRepository.updateTaskExclusionRegions(taskId, exclusionRegion)
}
/**
- * Remove a previously tracked corner region for a specified task.
+ * Remove a previously tracked exclusion region for a specified task.
*/
- fun removeCornersForTask(taskId: Int) {
- desktopModeTaskRepository.removeTaskCorners(taskId)
+ fun removeExclusionRegionForTask(taskId: Int) {
+ desktopModeTaskRepository.removeExclusionRegion(taskId)
}
/**
@@ -992,16 +992,16 @@ class DesktopTasksController(
}
/**
- * Adds a listener to track changes to desktop task corners
+ * Adds a listener to track changes to desktop task gesture exclusion regions
*
* @param listener the listener to add.
* @param callbackExecutor the executor to call the listener on.
*/
- fun setTaskCornerListener(
+ fun setTaskRegionListener(
listener: Consumer<Region>,
callbackExecutor: Executor
) {
- desktopModeTaskRepository.setTaskCornerListener(listener, callbackExecutor)
+ desktopModeTaskRepository.setExclusionRegionListener(listener, callbackExecutor)
}
private fun dump(pw: PrintWriter, prefix: String) {
@@ -1027,7 +1027,7 @@ class DesktopTasksController(
callbackExecutor: Executor
) {
mainExecutor.execute {
- this@DesktopTasksController.setTaskCornerListener(listener, callbackExecutor)
+ this@DesktopTasksController.setTaskRegionListener(listener, callbackExecutor)
}
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index dc6dc7910feb..e916a140e5d5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -171,13 +171,14 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
return false;
}
final RecentsController controller = mControllers.get(controllerIdx);
- Transitions.setRunningRemoteTransitionDelegate(mAnimApp);
+ final IApplicationThread animApp = mAnimApp;
mAnimApp = null;
if (!controller.start(info, startTransaction, finishTransaction, finishCallback)) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
"RecentsTransitionHandler.startAnimation: failed to start animation");
return false;
}
+ Transitions.setRunningRemoteTransitionDelegate(animApp);
return true;
}
@@ -225,6 +226,13 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
private ArrayList<TaskState> mPausingTasks = null;
/**
+ * List of tasks were pausing but closed in a subsequent merged transition. If a
+ * closing task is reopened, the leash is not initially hidden since it is already
+ * visible.
+ */
+ private ArrayList<TaskState> mClosingTasks = null;
+
+ /**
* List of tasks that we are switching to. Upon finish, these will remain visible and
* on top.
*/
@@ -375,6 +383,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
}
mFinishTransaction = null;
mPausingTasks = null;
+ mClosingTasks = null;
mOpeningTasks = null;
mInfo = null;
mTransition = null;
@@ -419,6 +428,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
mFinishCB = finishCB;
mFinishTransaction = finishT;
mPausingTasks = new ArrayList<>();
+ mClosingTasks = new ArrayList<>();
mOpeningTasks = new ArrayList<>();
mLeashMap = new ArrayMap<>();
mKeyguardLocked = (info.getFlags() & TRANSIT_FLAG_KEYGUARD_LOCKED) != 0;
@@ -670,7 +680,10 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
final TransitionInfo.Change change = closingTasks.get(i);
final int pausingIdx = TaskState.indexOf(mPausingTasks, change);
if (pausingIdx >= 0) {
- mPausingTasks.remove(pausingIdx);
+ // We are closing the pausing task, but it is still visible and can be
+ // restart by another transition prior to this transition finishing
+ final TaskState closingTask = mPausingTasks.remove(pausingIdx);
+ mClosingTasks.add(closingTask);
didMergeThings = true;
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
" closing pausing taskId=%d", change.getTaskInfo().taskId);
@@ -706,7 +719,12 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
for (int i = 0; i < openingTasks.size(); ++i) {
final TransitionInfo.Change change = openingTasks.get(i);
final boolean isLeaf = openingTaskIsLeafs.get(i) == 1;
- int pausingIdx = TaskState.indexOf(mPausingTasks, change);
+ final int closingIdx = TaskState.indexOf(mClosingTasks, change);
+ if (closingIdx >= 0) {
+ // Remove opening tasks from closing set
+ mClosingTasks.remove(closingIdx);
+ }
+ final int pausingIdx = TaskState.indexOf(mPausingTasks, change);
if (pausingIdx >= 0) {
// Something is showing/opening a previously-pausing app.
if (isLeaf) {
@@ -729,12 +747,14 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
appearedTargets[nextTargetIdx++] = target;
// reparent into the original `mInfo` since that's where we are animating.
final int rootIdx = TransitionUtil.rootIndexFor(change, mInfo);
+ final boolean wasClosing = closingIdx >= 0;
t.reparent(target.leash, mInfo.getRoot(rootIdx).getLeash());
t.setLayer(target.leash, layer);
- // Hide the animation leash, let listener show it.
- t.hide(target.leash);
+ // Hide the animation leash if not already visible, let listener show it
+ t.setVisibility(target.leash, !wasClosing);
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
- " opening new leaf taskId=%d", target.taskId);
+ " opening new leaf taskId=%d wasClosing=%b",
+ target.taskId, wasClosing);
mOpeningTasks.add(new TaskState(change, target.leash));
} else {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
index 20c4d5ae5f58..e7e1e0a98550 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
@@ -35,13 +35,14 @@ class SnapshotWindowCreator {
void makeTaskSnapshotWindow(StartingWindowInfo startingWindowInfo, TaskSnapshot snapshot) {
final int taskId = startingWindowInfo.taskInfo.taskId;
// Remove any existing starting window for this task before adding.
- mStartingWindowRecordManager.removeWindow(taskId, true);
+ mStartingWindowRecordManager.removeWindow(taskId);
final TaskSnapshotWindow surface = TaskSnapshotWindow.create(startingWindowInfo,
startingWindowInfo.appToken, snapshot, mMainExecutor,
- () -> mStartingWindowRecordManager.removeWindow(taskId, true));
+ () -> mStartingWindowRecordManager.removeWindow(taskId));
if (surface != null) {
final SnapshotWindowRecord tView = new SnapshotWindowRecord(surface,
- startingWindowInfo.taskInfo.topActivityType, mMainExecutor);
+ startingWindowInfo.taskInfo.topActivityType, mMainExecutor,
+ taskId, mStartingWindowRecordManager);
mStartingWindowRecordManager.addRecord(taskId, tView);
}
}
@@ -50,8 +51,9 @@ class SnapshotWindowCreator {
private final TaskSnapshotWindow mTaskSnapshotWindow;
SnapshotWindowRecord(TaskSnapshotWindow taskSnapshotWindow,
- int activityType, ShellExecutor removeExecutor) {
- super(activityType, removeExecutor);
+ int activityType, ShellExecutor removeExecutor, int id,
+ StartingSurfaceDrawer.StartingWindowRecordManager recordManager) {
+ super(activityType, removeExecutor, id, recordManager);
mTaskSnapshotWindow = taskSnapshotWindow;
mBGColor = mTaskSnapshotWindow.getBackgroundColor();
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
index 20da8773f387..cb76044da7e5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
@@ -20,6 +20,7 @@ import static android.view.View.GONE;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLASHSCREEN_EXIT_ANIM;
import android.animation.Animator;
+import android.annotation.IntDef;
import android.content.Context;
import android.graphics.Rect;
import android.util.Slog;
@@ -46,6 +47,8 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener {
private final int mIconFadeOutDuration;
private final int mAppRevealDelay;
private final int mAppRevealDuration;
+ @ExitAnimationType
+ private final int mAnimationType;
private final int mAnimationDuration;
private final float mIconStartAlpha;
private final float mBrandingStartAlpha;
@@ -55,6 +58,24 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener {
private Runnable mFinishCallback;
+ /**
+ * This splash screen exit animation type uses a radial vanish to hide
+ * the starting window and slides up the main window content.
+ */
+ private static final int TYPE_RADIAL_VANISH_SLIDE_UP = 0;
+
+ /**
+ * This splash screen exit animation type fades out the starting window
+ * to reveal the main window content.
+ */
+ private static final int TYPE_FADE_OUT = 1;
+
+ @IntDef(prefix = { "TYPE_" }, value = {
+ TYPE_RADIAL_VANISH_SLIDE_UP,
+ TYPE_FADE_OUT,
+ })
+ private @interface ExitAnimationType {}
+
SplashScreenExitAnimation(Context context, SplashScreenView view, SurfaceControl leash,
Rect frame, int mainWindowShiftLength, TransactionPool pool, Runnable handleFinish,
float roundedCornerRadius) {
@@ -91,6 +112,8 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener {
}
mAppRevealDuration = context.getResources().getInteger(
R.integer.starting_window_app_reveal_anim_duration);
+ mAnimationType = context.getResources().getInteger(
+ R.integer.starting_window_exit_animation_type);
mAnimationDuration = Math.max(mIconFadeOutDuration, mAppRevealDelay + mAppRevealDuration);
mMainWindowShiftLength = mainWindowShiftLength;
mFinishCallback = handleFinish;
@@ -98,10 +121,15 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener {
}
void startAnimations() {
- SplashScreenExitAnimationUtils.startAnimations(mSplashScreenView, mFirstWindowSurface,
- mMainWindowShiftLength, mTransactionPool, mFirstWindowFrame, mAnimationDuration,
- mIconFadeOutDuration, mIconStartAlpha, mBrandingStartAlpha, mAppRevealDelay,
- mAppRevealDuration, this, mRoundedCornerRadius);
+ if (mAnimationType == TYPE_FADE_OUT) {
+ SplashScreenExitAnimationUtils.startFadeOutAnimation(mSplashScreenView,
+ mAnimationDuration, this);
+ } else {
+ SplashScreenExitAnimationUtils.startAnimations(mSplashScreenView, mFirstWindowSurface,
+ mMainWindowShiftLength, mTransactionPool, mFirstWindowFrame, mAnimationDuration,
+ mIconFadeOutDuration, mIconStartAlpha, mBrandingStartAlpha, mAppRevealDelay,
+ mAppRevealDuration, this, mRoundedCornerRadius);
+ }
}
private void reset() {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
index a7e4385b60c8..64f09a77c839 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
@@ -71,11 +71,10 @@ public class SplashScreenExitAnimationUtils {
int iconFadeOutDuration, float iconStartAlpha, float brandingStartAlpha,
int appRevealDelay, int appRevealDuration, Animator.AnimatorListener animatorListener,
float roundedCornerRadius) {
- ValueAnimator animator =
- createAnimator(splashScreenView, firstWindowSurface, mainWindowShiftLength,
- transactionPool, firstWindowFrame, animationDuration, iconFadeOutDuration,
- iconStartAlpha, brandingStartAlpha, appRevealDelay, appRevealDuration,
- animatorListener, roundedCornerRadius);
+ ValueAnimator animator = createRadialVanishSlideUpAnimator(splashScreenView,
+ firstWindowSurface, mainWindowShiftLength, transactionPool, firstWindowFrame,
+ animationDuration, iconFadeOutDuration, iconStartAlpha, brandingStartAlpha,
+ appRevealDelay, appRevealDuration, animatorListener, roundedCornerRadius);
animator.start();
}
@@ -99,7 +98,7 @@ public class SplashScreenExitAnimationUtils {
* Creates the animator to fade out the icon, reveal the app, and shift up main window.
* @hide
*/
- private static ValueAnimator createAnimator(ViewGroup splashScreenView,
+ private static ValueAnimator createRadialVanishSlideUpAnimator(ViewGroup splashScreenView,
SurfaceControl firstWindowSurface, int mMainWindowShiftLength,
TransactionPool transactionPool, Rect firstWindowFrame, int animationDuration,
int iconFadeOutDuration, float iconStartAlpha, float brandingStartAlpha,
@@ -210,6 +209,20 @@ public class SplashScreenExitAnimationUtils {
return nightMode == Configuration.UI_MODE_NIGHT_YES;
}
+ static void startFadeOutAnimation(ViewGroup splashScreenView,
+ int animationDuration, Animator.AnimatorListener animatorListener) {
+ final ValueAnimator animator = ValueAnimator.ofFloat(1f, 0f);
+ animator.setDuration(animationDuration);
+ animator.setInterpolator(Interpolators.LINEAR);
+ animator.addUpdateListener(animation -> {
+ splashScreenView.setAlpha((float) animation.getAnimatedValue());
+ });
+ if (animatorListener != null) {
+ animator.addListener(animatorListener);
+ }
+ animator.start();
+ }
+
/**
* View which creates a circular reveal of the underlying view.
* @hide
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
index 4cfbbd971fe3..31fc98b713ab 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
@@ -358,7 +358,7 @@ class SplashscreenWindowCreator extends AbsSplashWindowCreator {
}
}
if (shouldSaveView) {
- mStartingWindowRecordManager.removeWindow(taskId, true);
+ mStartingWindowRecordManager.removeWindow(taskId);
saveSplashScreenRecord(appToken, taskId, view, suggestType);
}
return shouldSaveView;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
index 7cbf263f7cb1..e2be1533118a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
@@ -188,7 +188,7 @@ public class StartingSurfaceDrawer {
final SnapshotRecord record = sRecord instanceof SnapshotRecord
? (SnapshotRecord) sRecord : null;
if (record != null && record.hasImeSurface()) {
- records.removeWindow(taskId, true);
+ records.removeWindow(taskId);
}
}
@@ -256,10 +256,15 @@ public class StartingSurfaceDrawer {
@WindowConfiguration.ActivityType protected final int mActivityType;
protected final ShellExecutor mRemoveExecutor;
+ private final int mTaskId;
+ private final StartingWindowRecordManager mRecordManager;
- SnapshotRecord(int activityType, ShellExecutor removeExecutor) {
+ SnapshotRecord(int activityType, ShellExecutor removeExecutor, int taskId,
+ StartingWindowRecordManager recordManager) {
mActivityType = activityType;
mRemoveExecutor = removeExecutor;
+ mTaskId = taskId;
+ mRecordManager = recordManager;
}
@Override
@@ -301,6 +306,7 @@ public class StartingSurfaceDrawer {
@CallSuper
protected void removeImmediately() {
mRemoveExecutor.removeCallbacks(mScheduledRunnable);
+ mRecordManager.onRecordRemoved(mTaskId);
}
}
@@ -316,7 +322,7 @@ public class StartingSurfaceDrawer {
taskIds[i] = mStartingWindowRecords.keyAt(i);
}
for (int i = taskSize - 1; i >= 0; --i) {
- removeWindow(taskIds[i], true);
+ removeWindow(taskIds[i]);
}
}
@@ -335,9 +341,13 @@ public class StartingSurfaceDrawer {
}
}
- void removeWindow(int taskId, boolean immediately) {
+ void removeWindow(int taskId) {
mTmpRemovalInfo.taskId = taskId;
- removeWindow(mTmpRemovalInfo, immediately);
+ removeWindow(mTmpRemovalInfo, true/* immediately */);
+ }
+
+ void onRecordRemoved(int taskId) {
+ mStartingWindowRecords.remove(taskId);
}
StartingWindowRecord getRecord(int taskId) {
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 144547885501..fed2f34b5e0c 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
@@ -92,7 +92,8 @@ class WindowlessSnapshotWindowCreator {
final SnapshotWindowRecord record = new SnapshotWindowRecord(mViewHost, wlw.mChildSurface,
taskDescription.getBackgroundColor(), snapshot.hasImeSurface(),
- runningTaskInfo.topActivityType, removeExecutor);
+ runningTaskInfo.topActivityType, removeExecutor,
+ taskId, mStartingWindowRecordManager);
mStartingWindowRecordManager.addRecord(taskId, record);
info.notifyAddComplete(wlw.mChildSurface);
}
@@ -104,8 +105,9 @@ class WindowlessSnapshotWindowCreator {
SnapshotWindowRecord(SurfaceControlViewHost viewHost, SurfaceControl childSurface,
int bgColor, boolean hasImeSurface, int activityType,
- ShellExecutor removeExecutor) {
- super(activityType, removeExecutor);
+ ShellExecutor removeExecutor, int id,
+ StartingSurfaceDrawer.StartingWindowRecordManager recordManager) {
+ super(activityType, removeExecutor, id, recordManager);
mViewHost = viewHost;
mChildSurface = childSurface;
mBGColor = bgColor;
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 adae21b20b3c..93d763608b5f 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
@@ -54,12 +54,13 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
private static final String TAG = TaskViewTaskController.class.getSimpleName();
private final CloseGuard mGuard = new CloseGuard();
-
+ private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction();
+ /** Used to inset the activity content to allow space for a caption bar. */
+ private final Binder mCaptionInsetsOwner = new Binder();
private final ShellTaskOrganizer mTaskOrganizer;
private final Executor mShellExecutor;
private final SyncTransactionQueue mSyncQueue;
private final TaskViewTransitions mTaskViewTransitions;
- private TaskViewBase mTaskViewBase;
private final Context mContext;
/**
@@ -70,21 +71,19 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
* in this situation to allow us to notify listeners correctly if the task failed to open.
*/
private ActivityManager.RunningTaskInfo mPendingInfo;
- /* Indicates that the task we attempted to launch in the task view failed to launch. */
- private boolean mTaskNotFound;
+ private TaskViewBase mTaskViewBase;
protected ActivityManager.RunningTaskInfo mTaskInfo;
private WindowContainerToken mTaskToken;
private SurfaceControl mTaskLeash;
- private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction();
+ /* Indicates that the task we attempted to launch in the task view failed to launch. */
+ private boolean mTaskNotFound;
private boolean mSurfaceCreated;
private SurfaceControl mSurfaceControl;
private boolean mIsInitialized;
private boolean mNotifiedForInitialized;
+ private boolean mHideTaskWithSurface = true;
private TaskView.Listener mListener;
private Executor mListenerExecutor;
-
- /** Used to inset the activity content to allow space for a caption bar. */
- private final Binder mCaptionInsetsOwner = new Binder();
private Rect mCaptionInsets;
public TaskViewTaskController(Context context, ShellTaskOrganizer organizer,
@@ -102,6 +101,19 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
mGuard.open("release");
}
+ /**
+ * Specifies if the task should be hidden when the surface is destroyed.
+ * <p>This is {@code true} by default.
+ *
+ * @param hideTaskWithSurface {@code false} if task needs to remain visible even when the
+ * surface is destroyed, {@code true} otherwise.
+ */
+ public void setHideTaskWithSurface(boolean hideTaskWithSurface) {
+ // TODO(b/299535374): Remove mHideTaskWithSurface once the taskviews with launch root tasks
+ // are moved to a window in SystemUI in auto.
+ mHideTaskWithSurface = hideTaskWithSurface;
+ }
+
SurfaceControl getSurfaceControl() {
return mSurfaceControl;
}
@@ -257,9 +269,17 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
mTaskNotFound = false;
}
+ /** This method shouldn't be called when shell transitions are enabled. */
private void updateTaskVisibility() {
+ boolean visible = mSurfaceCreated;
+ if (!visible && !mHideTaskWithSurface) {
+ return;
+ }
WindowContainerTransaction wct = new WindowContainerTransaction();
- wct.setHidden(mTaskToken, !mSurfaceCreated /* hidden */);
+ wct.setHidden(mTaskToken, !visible /* hidden */);
+ if (!visible) {
+ wct.reorder(mTaskToken, false /* onTop */);
+ }
mSyncQueue.queue(wct);
if (mListener == null) {
return;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
index bbf67a6155d7..a90edf20f94e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
@@ -137,7 +137,6 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
});
}
};
- Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
try {
// If the remote is actually in the same process, then make a copy of parameters since
// remote impls assume that they have to clean-up native references.
@@ -149,6 +148,7 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
remote.getRemoteTransition().startAnimation(transition, remoteInfo, remoteStartT, cb);
// assume that remote will apply the start transaction.
startTransaction.clear();
+ Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
} catch (RemoteException e) {
Log.e(Transitions.TAG, "Error running remote transition.", e);
unhandleDeath(remote.asBinder(), finishCallback);
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 abd2ad49317b..026d0cdd7c52 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
@@ -21,7 +21,6 @@ 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 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.desktopmode.EnterDesktopTaskTransitionHandler.FINAL_FREEFORM_SCALE;
@@ -79,7 +78,7 @@ import com.android.wm.shell.sysui.KeyguardChangeListener;
import com.android.wm.shell.sysui.ShellController;
import com.android.wm.shell.sysui.ShellInit;
import com.android.wm.shell.transition.Transitions;
-import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.TaskCornersListener;
+import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.ExclusionRegionListener;
import java.util.Optional;
import java.util.function.Supplier;
@@ -106,7 +105,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
private SparseArray<EventReceiver> mEventReceiversByDisplay = new SparseArray<>();
- private final TaskCornersListener mCornersListener = new TaskCornersListenerImpl();
+ private final ExclusionRegionListener mExclusionRegionListener =
+ new ExclusionRegionListenerImpl();
private final SparseArray<DesktopModeWindowDecoration> mWindowDecorByTaskId =
new SparseArray<>();
@@ -920,7 +920,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
windowDecoration.setCaptionListeners(
touchEventListener, touchEventListener, touchEventListener);
- windowDecoration.setCornersListener(mCornersListener);
+ windowDecoration.setExclusionRegionListener(mExclusionRegionListener);
windowDecoration.setDragPositioningCallback(dragPositioningCallback);
windowDecoration.setDragDetector(touchEventListener.mDragDetector);
windowDecoration.relayout(taskInfo, startT, finishT,
@@ -958,17 +958,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
}
}
- private class TaskCornersListenerImpl
- implements DesktopModeWindowDecoration.TaskCornersListener {
+ private class ExclusionRegionListenerImpl
+ implements ExclusionRegionListener {
@Override
- public void onTaskCornersChanged(int taskId, Region corner) {
- mDesktopTasksController.ifPresent(d -> d.onTaskCornersChanged(taskId, corner));
+ public void onExclusionRegionChanged(int taskId, Region region) {
+ mDesktopTasksController.ifPresent(d -> d.onExclusionRegionChanged(taskId, region));
}
@Override
- public void onTaskCornersRemoved(int taskId) {
- mDesktopTasksController.ifPresent(d -> d.removeCornersForTask(taskId));
+ public void onExclusionRegionDismissed(int taskId) {
+ mDesktopTasksController.ifPresent(d -> d.removeExclusionRegionForTask(taskId));
}
}
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 e954f3b4a1d5..dbff20e6026a 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
@@ -92,7 +92,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
private Drawable mAppIcon;
private CharSequence mAppName;
- private TaskCornersListener mCornersListener;
+ private ExclusionRegionListener mExclusionRegionListener;
private final Set<IBinder> mTransitionsPausingRelayout = new HashSet<>();
private int mRelayoutBlock;
@@ -128,8 +128,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mOnCaptionLongClickListener = onLongClickListener;
}
- void setCornersListener(TaskCornersListener cornersListener) {
- mCornersListener = cornersListener;
+ void setExclusionRegionListener(ExclusionRegionListener exclusionRegionListener) {
+ mExclusionRegionListener = exclusionRegionListener;
}
void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) {
@@ -229,6 +229,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
}
if (!isDragResizeable) {
+ if (!mTaskInfo.positionInParent.equals(mPositionInParent)) {
+ // We still want to track caption bar's exclusion region on a non-resizeable task.
+ updateExclusionRegion();
+ }
closeDragResizeListener();
return;
}
@@ -256,13 +260,13 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
final int resize_corner = mResult.mRootView.getResources()
.getDimensionPixelSize(R.dimen.freeform_resize_corner);
- // If either task geometry or position have changed, update this task's cornersListener
+ // If either task geometry or position have changed, update this task's
+ // exclusion region listener
if (mDragResizeListener.setGeometry(
mResult.mWidth, mResult.mHeight, resize_handle, resize_corner, touchSlop)
|| !mTaskInfo.positionInParent.equals(mPositionInParent)) {
- mCornersListener.onTaskCornersChanged(mTaskInfo.taskId, getGlobalCornersRegion());
+ updateExclusionRegion();
}
- mPositionInParent.set(mTaskInfo.positionInParent);
if (isMaximizeMenuActive()) {
if (!mTaskInfo.isVisible()) {
@@ -282,8 +286,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
final int displayWidth = displayLayout.width();
final int displayHeight = displayLayout.height();
- final int captionHeight = loadDimensionPixelSize(
- resources, R.dimen.freeform_decor_caption_height);
+ final int captionHeight = getCaptionHeight();
final ImageButton maximizeWindowButton =
mResult.mRootView.findViewById(R.id.maximize_window);
@@ -537,7 +540,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
public void close() {
closeDragResizeListener();
closeHandleMenu();
- mCornersListener.onTaskCornersRemoved(mTaskInfo.taskId);
+ mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId);
disposeResizeVeil();
super.close();
}
@@ -548,13 +551,32 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
: R.layout.desktop_mode_focused_window_decor;
}
+ private void updatePositionInParent() {
+ mPositionInParent.set(mTaskInfo.positionInParent);
+ }
+
+ private void updateExclusionRegion() {
+ // An outdated position in parent is one reason for this to be called; update it here.
+ updatePositionInParent();
+ mExclusionRegionListener
+ .onExclusionRegionChanged(mTaskInfo.taskId, getGlobalExclusionRegion());
+ }
+
/**
- * Create a new region out of the corner rects of this task.
+ * Create a new exclusion region from the corner rects (if resizeable) and caption bounds
+ * of this task.
*/
- Region getGlobalCornersRegion() {
- Region cornersRegion = mDragResizeListener.getCornersRegion();
- cornersRegion.translate(mPositionInParent.x, mPositionInParent.y);
- return cornersRegion;
+ private Region getGlobalExclusionRegion() {
+ Region exclusionRegion;
+ if (mTaskInfo.isResizeable) {
+ exclusionRegion = mDragResizeListener.getCornersRegion();
+ } else {
+ exclusionRegion = new Region();
+ }
+ exclusionRegion.union(new Rect(0, 0, mResult.mWidth,
+ getCaptionHeight()));
+ exclusionRegion.translate(mPositionInParent.x, mPositionInParent.y);
+ return exclusionRegion;
}
/**
@@ -572,6 +594,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
return R.dimen.freeform_decor_caption_height;
}
+ private int getCaptionHeight() {
+ return loadDimensionPixelSize(mContext.getResources(), getCaptionHeightId());
+ }
+
/**
* Add transition to mTransitionsPausingRelayout
*/
@@ -626,12 +652,14 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
}
}
- interface TaskCornersListener {
- /** Inform the implementing class of this task's change in corner resize handles */
- void onTaskCornersChanged(int taskId, Region corner);
+ interface ExclusionRegionListener {
+ /** Inform the implementing class of this task's change in region resize handles */
+ void onExclusionRegionChanged(int taskId, Region region);
- /** Inform the implementing class that this task no longer needs its corners tracked,
- * likely due to it closing. */
- void onTaskCornersRemoved(int taskId);
+ /**
+ * Inform the implementing class that this task no longer needs an exclusion region,
+ * likely due to it closing.
+ */
+ void onExclusionRegionDismissed(int taskId);
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
index bfce72bcadf0..09fc3dacf6f3 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
@@ -49,11 +49,13 @@ public class ResizeVeil {
private final Supplier<SurfaceControl.Builder> mSurfaceControlBuilderSupplier;
private final Supplier<SurfaceControl.Transaction> mSurfaceControlTransactionSupplier;
private final Drawable mAppIcon;
+ private ImageView mIconView;
private SurfaceControl mParentSurface;
private SurfaceControl mVeilSurface;
private final RunningTaskInfo mTaskInfo;
private SurfaceControlViewHost mViewHost;
private final Display mDisplay;
+ private ValueAnimator mVeilAnimator;
public ResizeVeil(Context context, Drawable appIcon, RunningTaskInfo taskInfo,
Supplier<SurfaceControl.Builder> surfaceControlBuilderSupplier, Display display,
@@ -97,8 +99,8 @@ public class ResizeVeil {
mViewHost = new SurfaceControlViewHost(mContext, mDisplay, windowManager, "ResizeVeil");
mViewHost.setView(v, lp);
- final ImageView appIcon = mViewHost.getView().findViewById(R.id.veil_application_icon);
- appIcon.setImageDrawable(mAppIcon);
+ mIconView = mViewHost.getView().findViewById(R.id.veil_application_icon);
+ mIconView.setImageDrawable(mAppIcon);
}
/**
@@ -123,17 +125,27 @@ public class ResizeVeil {
relayout(taskBounds, t);
if (fadeIn) {
- final ValueAnimator animator = new ValueAnimator();
- animator.setFloatValues(0f, 1f);
- animator.setDuration(RESIZE_ALPHA_DURATION);
- animator.addUpdateListener(animation -> {
- t.setAlpha(mVeilSurface, animator.getAnimatedFraction());
+ mVeilAnimator = new ValueAnimator();
+ mVeilAnimator.setFloatValues(0f, 1f);
+ mVeilAnimator.setDuration(RESIZE_ALPHA_DURATION);
+ mVeilAnimator.addUpdateListener(animation -> {
+ t.setAlpha(mVeilSurface, mVeilAnimator.getAnimatedFraction());
t.apply();
});
+ final ValueAnimator iconAnimator = new ValueAnimator();
+ iconAnimator.setFloatValues(0f, 1f);
+ iconAnimator.setDuration(RESIZE_ALPHA_DURATION);
+ iconAnimator.addUpdateListener(animation -> {
+ mIconView.setAlpha(animation.getAnimatedFraction());
+ });
+
t.show(mVeilSurface)
.addTransactionCommittedListener(
- mContext.getMainExecutor(), () -> animator.start())
+ mContext.getMainExecutor(), () -> {
+ mVeilAnimator.start();
+ iconAnimator.start();
+ })
.setAlpha(mVeilSurface, 0);
} else {
// Show the veil immediately at full opacity.
@@ -172,11 +184,17 @@ public class ResizeVeil {
/**
* Calls relayout to update task and veil bounds.
+ * Finishes veil fade in if animation is currently running; this is to prevent empty space
+ * being visible behind the transparent veil during a fast resize.
*
* @param t a transaction to be applied in sync with the veil draw.
* @param newBounds bounds to update veil to.
*/
public void updateResizeVeil(SurfaceControl.Transaction t, Rect newBounds) {
+ if (mVeilAnimator != null && mVeilAnimator.isStarted()) {
+ // TODO(b/300145351): Investigate why ValueAnimator#end does not work here.
+ mVeilAnimator.setCurrentPlayTime(RESIZE_ALPHA_DURATION);
+ }
relayout(newBounds, t);
mViewHost.getView().getViewRootImpl().applyTransactionOnDraw(t);
}
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 8d76fc6c542b..a26927586b61 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
@@ -17,6 +17,7 @@
package com.android.wm.shell.windowdecor;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.Context;
@@ -220,6 +221,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
final Resources resources = mDecorWindowContext.getResources();
final Configuration taskConfig = mTaskInfo.getConfiguration();
final Rect taskBounds = taskConfig.windowConfiguration.getBounds();
+ final boolean isFullscreen = taskConfig.windowConfiguration.getWindowingMode()
+ == WINDOWING_MODE_FULLSCREEN;
outResult.mWidth = taskBounds.width();
outResult.mHeight = taskBounds.height();
@@ -279,13 +282,24 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
mTmpColor[1] = (float) Color.green(backgroundColorInt) / 255.f;
mTmpColor[2] = (float) Color.blue(backgroundColorInt) / 255.f;
final Point taskPosition = mTaskInfo.positionInParent;
- startT.setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight)
- .setShadowRadius(mTaskSurface, shadowRadius)
+ if (isFullscreen) {
+ // Setting the task crop to the width/height stops input events from being sent to
+ // some regions of the app window. See b/300324920
+ // TODO(b/296921174): investigate whether crop/position needs to be set by window
+ // decorations at all when transition handlers are already taking ownership of the task
+ // surface placement/crop, especially when in fullscreen where tasks cannot be
+ // drag-resized by the window decoration.
+ startT.setWindowCrop(mTaskSurface, null);
+ finishT.setWindowCrop(mTaskSurface, null);
+ } else {
+ startT.setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight);
+ finishT.setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight);
+ }
+ startT.setShadowRadius(mTaskSurface, shadowRadius)
.setColor(mTaskSurface, mTmpColor)
.show(mTaskSurface);
finishT.setPosition(mTaskSurface, taskPosition.x, taskPosition.y)
- .setShadowRadius(mTaskSurface, shadowRadius)
- .setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight);
+ .setShadowRadius(mTaskSurface, shadowRadius);
if (mTaskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) {
startT.setCornerRadius(mTaskSurface, params.mCornerRadius);
finishT.setCornerRadius(mTaskSurface, params.mCornerRadius);
diff --git a/libs/WindowManager/Shell/tests/flicker/Android.bp b/libs/WindowManager/Shell/tests/flicker/Android.bp
index eb650caf04e2..6fd3354700f7 100644
--- a/libs/WindowManager/Shell/tests/flicker/Android.bp
+++ b/libs/WindowManager/Shell/tests/flicker/Android.bp
@@ -44,6 +44,16 @@ filegroup {
}
filegroup {
+ name: "WMShellFlickerTestsPipCommon-src",
+ srcs: ["src/com/android/wm/shell/flicker/pip/common/*.kt"],
+}
+
+filegroup {
+ name: "WMShellFlickerTestsPipApps-src",
+ srcs: ["src/com/android/wm/shell/flicker/pip/apps/*.kt"],
+}
+
+filegroup {
name: "WMShellFlickerTestsSplitScreenBase-src",
srcs: [
"src/com/android/wm/shell/flicker/splitscreen/benchmark/*.kt",
@@ -152,6 +162,8 @@ android_test {
exclude_srcs: [
":WMShellFlickerTestsBubbles-src",
":WMShellFlickerTestsPip-src",
+ ":WMShellFlickerTestsPipCommon-src",
+ ":WMShellFlickerTestsPipApps-src",
":WMShellFlickerTestsSplitScreenGroup1-src",
":WMShellFlickerTestsSplitScreenGroup2-src",
":WMShellFlickerTestsSplitScreenBase-src",
@@ -181,6 +193,20 @@ android_test {
srcs: [
":WMShellFlickerTestsBase-src",
":WMShellFlickerTestsPip-src",
+ ":WMShellFlickerTestsPipCommon-src",
+ ],
+}
+
+android_test {
+ name: "WMShellFlickerTestsPipApps",
+ defaults: ["WMShellFlickerTestsDefault"],
+ additional_manifests: ["manifests/AndroidManifestPip.xml"],
+ package_name: "com.android.wm.shell.flicker.pip.apps",
+ instrumentation_target_package: "com.android.wm.shell.flicker.pip.apps",
+ srcs: [
+ ":WMShellFlickerTestsBase-src",
+ ":WMShellFlickerTestsPipApps-src",
+ ":WMShellFlickerTestsPipCommon-src",
],
}
diff --git a/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml b/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
index 57df4e8bedb2..b13e9a248575 100644
--- a/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
+++ b/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
@@ -60,9 +60,9 @@
<!-- Enable mocking GPS location by the test app -->
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command"
- value="appops set com.android.wm.shell.flicker.pip android:mock_location allow"/>
+ value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location allow"/>
<option name="teardown-command"
- value="appops set com.android.wm.shell.flicker.pip android:mock_location deny"/>
+ value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location deny"/>
</target_preparer>
<!-- Needed for pushing the trace config file -->
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
index ca28f5210f6b..9256725c6180 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
@@ -21,6 +21,7 @@ import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
index 4da628cfd90c..002c019eff93 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
@@ -20,6 +20,7 @@ import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
index e0b18dea971d..6dd68b0d029d 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
@@ -20,6 +20,7 @@ import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
index b4cedd995169..8207b85c3e0c 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
@@ -32,8 +32,9 @@ import com.android.server.wm.flicker.entireScreenCovered
import com.android.server.wm.flicker.helpers.FixedOrientationAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions.Pip.ACTION_ENTER_PIP
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
+import com.android.wm.shell.flicker.pip.common.PipTransition
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
index f9efffe8f5cd..cc943678d492 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.pip
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
index c4e63c3fc408..7da442901e40 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.pip
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
index 839bbd4673a5..0ad9e4c61d83 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.pip
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
index ea67e3ddae69..89a6c93e478c 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
index 0f30cef3fda5..8978af0088b8 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
@@ -22,6 +22,7 @@ import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
index 421ad757f76a..4776206724cc 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
@@ -21,6 +21,7 @@ import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
index c10860a5396f..425cbfaffedd 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
@@ -27,6 +27,7 @@ import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import android.tools.device.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.ImeAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
index 992f1bc4ace3..18f30d96938b 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
@@ -21,6 +21,7 @@ import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
index 0c6fc5636a5b..c7f2786debd0 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
index 43e7696ffa93..cabc1cc0b023 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
@@ -27,6 +27,7 @@ import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
index 0295741bc441..6748626d4e46 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
index a236126415f3..1f69847e5481 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
@@ -30,7 +30,8 @@ import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
+import com.android.wm.shell.flicker.pip.common.PipTransition
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
index e588f8793b82..308ece40402f 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
@@ -25,6 +25,7 @@ import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import android.tools.device.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt
index 9a28439e112e..c9a98c73e5e5 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.apps
import android.platform.test.annotations.Postsubmit
import android.tools.common.Rotation
@@ -22,6 +22,7 @@ import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.device.apphelpers.StandardAppHelper
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Test
import org.junit.runners.Parameterized
@@ -32,14 +33,14 @@ abstract class AppsEnterPipTransition(flicker: LegacyFlickerTest) : EnterPipTran
@Postsubmit
@Test
override fun pipAppWindowAlwaysVisible() {
- flicker.assertWm { this.isAppWindowVisible(standardAppHelper) }
+ flicker.assertWm { this.isAppWindowVisible(standardAppHelper.packageNameMatcher) }
}
/** Checks [standardAppHelper] layer remains visible throughout the animation */
@Postsubmit
@Test
override fun pipAppLayerAlwaysVisible() {
- flicker.assertLayers { this.isVisible(standardAppHelper) }
+ flicker.assertLayers { this.isVisible(standardAppHelper.packageNameMatcher) }
}
/** Checks the content overlay appears then disappears during the animation */
@@ -56,7 +57,9 @@ abstract class AppsEnterPipTransition(flicker: LegacyFlickerTest) : EnterPipTran
@Postsubmit
@Test
override fun pipWindowRemainInsideVisibleBounds() {
- flicker.assertWmVisibleRegion(standardAppHelper) { coversAtMost(displayBounds) }
+ flicker.assertWmVisibleRegion(standardAppHelper.packageNameMatcher) {
+ coversAtMost(displayBounds)
+ }
}
/**
@@ -67,7 +70,7 @@ abstract class AppsEnterPipTransition(flicker: LegacyFlickerTest) : EnterPipTran
@Test
override fun pipLayerOrOverlayRemainInsideVisibleBounds() {
flicker.assertLayersVisibleRegion(
- standardAppHelper.or(ComponentNameMatcher.PIP_CONTENT_OVERLAY)
+ standardAppHelper.packageNameMatcher.or(ComponentNameMatcher.PIP_CONTENT_OVERLAY)
) {
coversAtMost(displayBounds)
}
@@ -92,9 +95,9 @@ abstract class AppsEnterPipTransition(flicker: LegacyFlickerTest) : EnterPipTran
@Test
override fun pipWindowBecomesPinned() {
flicker.assertWm {
- invoke("pipWindowIsNotPinned") { it.isNotPinned(standardAppHelper) }
+ invoke("pipWindowIsNotPinned") { it.isNotPinned(standardAppHelper.packageNameMatcher) }
.then()
- .invoke("pipWindowIsPinned") { it.isPinned(standardAppHelper) }
+ .invoke("pipWindowIsPinned") { it.isPinned(standardAppHelper.packageNameMatcher) }
}
}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt
index 258c0588378e..d7ba3d57b548 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt
@@ -14,21 +14,24 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.apps
-import android.os.Handler
-import android.os.Looper
-import android.os.SystemClock
import android.content.Context
import android.location.Criteria
import android.location.Location
import android.location.LocationManager
+import android.os.Handler
+import android.os.Looper
+import android.os.SystemClock
+import android.platform.test.annotations.Postsubmit
import android.tools.device.apphelpers.MapsAppHelper
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import androidx.test.filters.RequiresDevice
+import org.junit.Assume
import org.junit.FixMethodOrder
+import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -129,4 +132,12 @@ open class MapsEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { tapl.goHome() }
}
+
+ @Postsubmit
+ @Test
+ override fun focusChanges() {
+ // in gestural nav the focus goes to different activity on swipe up with auto enter PiP
+ Assume.assumeFalse(flicker.scenario.isGesturalNavigation)
+ super.focusChanges()
+ }
}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt
new file mode 100644
index 000000000000..c370d91034fd
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt
@@ -0,0 +1,95 @@
+/*
+ * 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.flicker.pip.apps
+
+import android.platform.test.annotations.Postsubmit
+import android.tools.common.traces.component.ComponentNameMatcher
+import android.tools.device.apphelpers.YouTubeAppHelper
+import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
+import android.tools.device.flicker.legacy.FlickerBuilder
+import android.tools.device.flicker.legacy.LegacyFlickerTest
+import androidx.test.filters.RequiresDevice
+import org.junit.Assume
+import org.junit.FixMethodOrder
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.MethodSorters
+import org.junit.runners.Parameterized
+
+/**
+ * Test entering pip from YouTube app by interacting with the app UI
+ *
+ * To run this test: `atest WMShellFlickerTests:YouTubeEnterPipTest`
+ *
+ * Actions:
+ * ```
+ * Launch YouTube and start playing a video
+ * Go home to enter PiP
+ * ```
+ *
+ * Notes:
+ * ```
+ * 1. Some default assertions (e.g., nav bar, status bar and screen covered)
+ * are inherited from [PipTransition]
+ * 2. Part of the test setup occurs automatically via
+ * [android.tools.device.flicker.legacy.runner.TransitionRunner],
+ * including configuring navigation mode, initial orientation and ensuring no
+ * apps are running before setup
+ * ```
+ */
+@RequiresDevice
+@RunWith(Parameterized::class)
+@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+open class YouTubeEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition(flicker) {
+ override val standardAppHelper: YouTubeAppHelper = YouTubeAppHelper(instrumentation)
+
+ override val defaultEnterPip: FlickerBuilder.() -> Unit = {
+ setup {
+ standardAppHelper.launchViaIntent(
+ wmHelper,
+ YouTubeAppHelper.getYoutubeVideoIntent("HPcEAtoXXLA"),
+ ComponentNameMatcher(YouTubeAppHelper.PACKAGE_NAME, "")
+ )
+ standardAppHelper.waitForVideoPlaying()
+ }
+ }
+
+ override val defaultTeardown: FlickerBuilder.() -> Unit = {
+ teardown {
+ standardAppHelper.exit(wmHelper)
+ }
+ }
+
+ override val thisTransition: FlickerBuilder.() -> Unit = {
+ transitions { tapl.goHome() }
+ }
+
+ @Postsubmit
+ @Test
+ override fun pipOverlayLayerAppearThenDisappear() {
+ // YouTube uses source rect hint, so PiP overlay is never present
+ }
+
+ @Postsubmit
+ @Test
+ override fun focusChanges() {
+ // in gestural nav the focus goes to different activity on swipe up with auto enter PiP
+ Assume.assumeFalse(flicker.scenario.isGesturalNavigation)
+ super.focusChanges()
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt
index a17144b7cef3..751f2bc0807f 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt
index d547b9cc1dc2..9c129e47efba 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt
index dfffba831dc3..9450bdd2d894 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2020 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt
index a8fb63de244b..7e42bc11a9c1 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
index 2008d019d2c4..7b7f1d7b5a82 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
import android.app.Instrumentation
import android.content.Intent
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
index fa1be63296e0..2539fd50d742 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
@@ -31,7 +31,8 @@ import org.junit.runner.RunWith
class DismissSplitScreenByDividerGesturalNavPortrait :
DismissSplitScreenByDivider(Rotation.ROTATION_0) {
- @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
+ // TODO(b/300260196): Not detecting this scenario right now
+ @ExpectedScenarios(["ENTIRE_TRACE"])
@Test
override fun dismissSplitScreenByDivider() = super.dismissSplitScreenByDivider()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
index 00f607343b3b..4ff0b4362e60 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
@@ -31,7 +31,7 @@ import org.junit.runner.RunWith
class SwitchBackToSplitFromRecentGesturalNavLandscape :
SwitchBackToSplitFromRecent(Rotation.ROTATION_90) {
- @ExpectedScenarios(["QUICKSWITCH"])
+ @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
@Test
override fun switchBackToSplitFromRecent() = super.switchBackToSplitFromRecent()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
index b3340e77dbfa..930f31d1f348 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
@@ -31,7 +31,7 @@ import org.junit.runner.RunWith
class SwitchBackToSplitFromRecentGesturalNavPortrait :
SwitchBackToSplitFromRecent(Rotation.ROTATION_0) {
- @ExpectedScenarios(["QUICKSWITCH"])
+ @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
@Test
override fun switchBackToSplitFromRecent() = super.switchBackToSplitFromRecent()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
index f4e72987becd..c744103d49ba 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
@@ -29,7 +29,7 @@ import org.junit.runner.RunWith
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class UnlockKeyguardToSplitScreenGesturalNavLandscape : UnlockKeyguardToSplitScreen() {
- @ExpectedScenarios(["QUICKSWITCH"])
+ @ExpectedScenarios(["LOCKSCREEN_UNLOCK_ANIMATION"])
@Test
override fun unlockKeyguardToSplitScreen() = super.unlockKeyguardToSplitScreen()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
index f38b2e8e12dd..11a4e02c5e37 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
@@ -29,7 +29,7 @@ import org.junit.runner.RunWith
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class UnlockKeyguardToSplitScreenGesturalNavPortrait : UnlockKeyguardToSplitScreen() {
- @ExpectedScenarios(["QUICKSWITCH"])
+ @ExpectedScenarios(["LOCKSCREEN_UNLOCK_ANIMATION"])
@Test
override fun unlockKeyguardToSplitScreen() = super.unlockKeyguardToSplitScreen()
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
index 17ed396987af..e7274918fa2b 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
@@ -424,6 +424,7 @@ class PhysicsAnimatorTest : ShellTestCase() {
eq(-5f), anyFloat(), eq(true))
}
+ @Ignore("Started flaking despite no changes, tracking in b/299636216")
@Test
fun testIsPropertyAnimating() {
PhysicsAnimatorTestUtils.setAllAnimationsBlock(false)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
index fe2da5dd19fc..ad84c7fb6128 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
@@ -18,9 +18,9 @@ package com.android.wm.shell.common.split;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
-
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
@@ -146,7 +146,7 @@ public class SplitLayoutTests extends ShellTestCase {
public void testSnapToDismissStart() {
// verify it callbacks properly when the snap target indicates dismissing split.
DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */,
- DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START);
+ SNAP_TO_START_AND_DISMISS);
mSplitLayout.snapToTarget(mSplitLayout.getDividePosition(), snapTarget);
waitDividerFlingFinished();
@@ -158,7 +158,7 @@ public class SplitLayoutTests extends ShellTestCase {
public void testSnapToDismissEnd() {
// verify it callbacks properly when the snap target indicates dismissing split.
DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */,
- DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END);
+ SNAP_TO_END_AND_DISMISS);
mSplitLayout.snapToTarget(mSplitLayout.getDividePosition(), snapTarget);
waitDividerFlingFinished();
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java
index d098d332a376..0088051928fb 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java
@@ -221,6 +221,20 @@ public class TaskViewTest extends ShellTestCase {
}
@Test
+ public void testSurfaceDestroyed_withTask_shouldNotHideTask_legacyTransitions() {
+ assumeFalse(Transitions.ENABLE_SHELL_TRANSITIONS);
+ mTaskViewTaskController.setHideTaskWithSurface(false);
+
+ SurfaceHolder sh = mock(SurfaceHolder.class);
+ mTaskViewTaskController.onTaskAppeared(mTaskInfo, mLeash);
+ mTaskView.surfaceCreated(sh);
+ reset(mViewListener);
+ mTaskView.surfaceDestroyed(sh);
+
+ verify(mViewListener, never()).onTaskVisibilityChanged(anyInt(), anyBoolean());
+ }
+
+ @Test
public void testSurfaceDestroyed_withTask_legacyTransitions() {
assumeFalse(Transitions.ENABLE_SHELL_TRANSITIONS);
SurfaceHolder sh = mock(SurfaceHolder.class);
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index fd6e18ee364a..68befffecf2f 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -812,10 +812,10 @@ Asset* AssetManager::openNonAssetInPathLocked(const char* fileName, AccessMode m
/* check the appropriate Zip file */
ZipFileRO* pZip = getZipFileLocked(ap);
if (pZip != NULL) {
- ALOGV("GOT zip, checking NA '%s'", (const char*) path);
+ ALOGV("GOT zip, checking NA '%s'", path.c_str());
ZipEntryRO entry = pZip->findEntryByName(path.c_str());
if (entry != NULL) {
- ALOGV("FOUND NA in Zip file for %s", (const char*) path);
+ ALOGV("FOUND NA in Zip file for %s", path.c_str());
pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
pZip->releaseEntry(entry);
}
@@ -1425,7 +1425,7 @@ AssetManager::SharedZip::SharedZip(const String8& path, time_t modWhen)
mResourceTableAsset(NULL), mResourceTable(NULL)
{
if (kIsDebug) {
- ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
+ ALOGI("Creating SharedZip %p %s\n", this, mPath.c_str());
}
ALOGV("+++ opening zip '%s'\n", mPath.c_str());
mZipFile = ZipFileRO::open(mPath.c_str());
@@ -1439,7 +1439,7 @@ AssetManager::SharedZip::SharedZip(int fd, const String8& path)
mResourceTableAsset(NULL), mResourceTable(NULL)
{
if (kIsDebug) {
- ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, (const char*)mPath);
+ ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, mPath.c_str());
}
ALOGV("+++ opening zip fd=%d '%s'\n", fd, mPath.c_str());
mZipFile = ZipFileRO::openFd(fd, mPath.c_str());
@@ -1453,7 +1453,7 @@ sp<AssetManager::SharedZip> AssetManager::SharedZip::get(const String8& path,
bool createIfNotPresent)
{
AutoMutex _l(gLock);
- time_t modWhen = getFileModDate(path);
+ time_t modWhen = getFileModDate(path.c_str());
sp<SharedZip> zip = gOpen.valueFor(path).promote();
if (zip != NULL && zip->mModWhen == modWhen) {
return zip;
@@ -1541,7 +1541,7 @@ bool AssetManager::SharedZip::getOverlay(size_t idx, asset_path* out) const
AssetManager::SharedZip::~SharedZip()
{
if (kIsDebug) {
- ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
+ ALOGI("Destroying SharedZip %p %s\n", this, mPath.c_str());
}
if (mResourceTable != NULL) {
delete mResourceTable;
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index edccb8a73fc8..7f226939ffaa 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -1026,7 +1026,7 @@ std::string AssetManager2::GetLastResourceResolution() const {
log_stream << "\nBest matching is from "
<< (last_resolution_.best_config_name.empty() ? "default"
- : last_resolution_.best_config_name)
+ : last_resolution_.best_config_name.c_str())
<< " configuration of " << last_resolution_.best_package_name;
return log_stream.str();
}
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 099287cb9634..4c992becda7c 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -5286,19 +5286,19 @@ bool ResTable::expandResourceRef(const char16_t* refStr, size_t refLen,
*outType = *defType;
}
*outName = String16(p, end-p);
- if(**outPackage == 0) {
+ if(outPackage->empty()) {
if(outErrorMsg) {
*outErrorMsg = "Resource package cannot be an empty string";
}
return false;
}
- if(**outType == 0) {
+ if(outType->empty()) {
if(outErrorMsg) {
*outErrorMsg = "Resource type cannot be an empty string";
}
return false;
}
- if(**outName == 0) {
+ if(outName->empty()) {
if(outErrorMsg) {
*outErrorMsg = "Resource id cannot be an empty string";
}
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index ce6b4b74d0da..502ff874ea69 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -737,6 +737,7 @@ cc_test {
"tests/unit/EglManagerTests.cpp",
"tests/unit/FatVectorTests.cpp",
"tests/unit/GraphicsStatsServiceTests.cpp",
+ "tests/unit/HintSessionWrapperTests.cpp",
"tests/unit/JankTrackerTests.cpp",
"tests/unit/FrameMetricsReporterTests.cpp",
"tests/unit/LayerUpdateQueueTests.cpp",
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp
index 19a1dfa91539..16de21def0e3 100644
--- a/libs/hwui/HardwareBitmapUploader.cpp
+++ b/libs/hwui/HardwareBitmapUploader.cpp
@@ -22,6 +22,7 @@
#include <GLES2/gl2ext.h>
#include <GLES3/gl3.h>
#include <GrDirectContext.h>
+#include <GrTypes.h>
#include <SkBitmap.h>
#include <SkCanvas.h>
#include <SkImage.h>
@@ -265,7 +266,7 @@ private:
sk_sp<SkImage> image =
SkImages::TextureFromAHardwareBufferWithData(mGrContext.get(), bitmap.pixmap(),
ahb);
- mGrContext->submit(true);
+ mGrContext->submit(GrSyncCpu::kYes);
uploadSucceeded = (image.get() != nullptr);
});
diff --git a/libs/hwui/jni/text/MeasuredText.cpp b/libs/hwui/jni/text/MeasuredText.cpp
index f6ae169ae3f0..746745afbf09 100644
--- a/libs/hwui/jni/text/MeasuredText.cpp
+++ b/libs/hwui/jni/text/MeasuredText.cpp
@@ -62,13 +62,14 @@ static jlong nInitBuilder(CRITICAL_JNI_PARAMS) {
// Regular JNI
static void nAddStyleRun(JNIEnv* /* unused */, jclass /* unused */, jlong builderPtr,
- jlong paintPtr, jint lbStyle, jint lbWordStyle, jint start, jint end,
- jboolean isRtl) {
+ jlong paintPtr, jint lbStyle, jint lbWordStyle, jboolean hyphenation,
+ jint start, jint end, jboolean isRtl) {
Paint* paint = toPaint(paintPtr);
const Typeface* typeface = Typeface::resolveDefault(paint->getAndroidTypeface());
minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface);
toBuilder(builderPtr)
- ->addStyleRun(start, end, std::move(minikinPaint), lbStyle, lbWordStyle, isRtl);
+ ->addStyleRun(start, end, std::move(minikinPaint), lbStyle, lbWordStyle, hyphenation,
+ isRtl);
}
// Regular JNI
@@ -159,7 +160,7 @@ static jint nGetMemoryUsage(CRITICAL_JNI_PARAMS_COMMA jlong ptr) {
static const JNINativeMethod gMTBuilderMethods[] = {
// MeasuredParagraphBuilder native functions.
{"nInitBuilder", "()J", (void*)nInitBuilder},
- {"nAddStyleRun", "(JJIIIIZ)V", (void*)nAddStyleRun},
+ {"nAddStyleRun", "(JJIIZIIZ)V", (void*)nAddStyleRun},
{"nAddReplacementRun", "(JJIIF)V", (void*)nAddReplacementRun},
{"nBuildMeasuredText", "(JJ[CZZZZ)J", (void*)nBuildMeasuredText},
{"nFreeBuilder", "(J)V", (void*)nFreeBuilder},
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 8f81dbad2320..735fc074435d 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -17,6 +17,7 @@
#include "CacheManager.h"
#include <GrContextOptions.h>
+#include <GrTypes.h>
#include <SkExecutor.h>
#include <SkGraphics.h>
#include <math.h>
@@ -110,13 +111,18 @@ void CacheManager::configureContext(GrContextOptions* contextOptions, const void
contextOptions->fPersistentCache = &cache;
}
+static GrPurgeResourceOptions toSkiaEnum(bool scratchOnly) {
+ return scratchOnly ? GrPurgeResourceOptions::kScratchResourcesOnly :
+ GrPurgeResourceOptions::kAllResources;
+}
+
void CacheManager::trimMemory(TrimLevel mode) {
if (!mGrContext) {
return;
}
// flush and submit all work to the gpu and wait for it to finish
- mGrContext->flushAndSubmit(/*syncCpu=*/true);
+ mGrContext->flushAndSubmit(GrSyncCpu::kYes);
switch (mode) {
case TrimLevel::BACKGROUND:
@@ -130,7 +136,7 @@ void CacheManager::trimMemory(TrimLevel mode) {
// that have persistent data to be purged in LRU order.
mGrContext->setResourceCacheLimit(mBackgroundResourceBytes);
SkGraphics::SetFontCacheLimit(mBackgroundCpuFontCacheBytes);
- mGrContext->purgeUnlockedResources(mMemoryPolicy.purgeScratchOnly);
+ mGrContext->purgeUnlockedResources(toSkiaEnum(mMemoryPolicy.purgeScratchOnly));
mGrContext->setResourceCacheLimit(mMaxResourceBytes);
SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes);
break;
@@ -150,7 +156,7 @@ void CacheManager::trimCaches(CacheTrimLevel mode) {
case CacheTrimLevel::ALL_CACHES:
SkGraphics::PurgeAllCaches();
if (mGrContext) {
- mGrContext->purgeUnlockedResources(false);
+ mGrContext->purgeUnlockedResources(GrPurgeResourceOptions::kAllResources);
}
break;
default:
@@ -285,7 +291,7 @@ void CacheManager::onThreadIdle() {
ns2ms(std::clamp(frameDiffNanos, mMemoryPolicy.minimumResourceRetention,
mMemoryPolicy.maximumResourceRetention));
mGrContext->performDeferredCleanup(std::chrono::milliseconds(cleanupMillis),
- mMemoryPolicy.purgeScratchOnly);
+ toSkiaEnum(mMemoryPolicy.purgeScratchOnly));
}
}
diff --git a/libs/hwui/renderthread/HintSessionWrapper.cpp b/libs/hwui/renderthread/HintSessionWrapper.cpp
index 1f338ee523eb..b34da5153a72 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.cpp
+++ b/libs/hwui/renderthread/HintSessionWrapper.cpp
@@ -32,65 +32,30 @@ namespace android {
namespace uirenderer {
namespace renderthread {
-namespace {
-
-typedef APerformanceHintManager* (*APH_getManager)();
-typedef APerformanceHintSession* (*APH_createSession)(APerformanceHintManager*, const int32_t*,
- size_t, int64_t);
-typedef void (*APH_closeSession)(APerformanceHintSession* session);
-typedef void (*APH_updateTargetWorkDuration)(APerformanceHintSession*, int64_t);
-typedef void (*APH_reportActualWorkDuration)(APerformanceHintSession*, int64_t);
-typedef void (*APH_sendHint)(APerformanceHintSession* session, int32_t);
-
-bool gAPerformanceHintBindingInitialized = false;
-APH_getManager gAPH_getManagerFn = nullptr;
-APH_createSession gAPH_createSessionFn = nullptr;
-APH_closeSession gAPH_closeSessionFn = nullptr;
-APH_updateTargetWorkDuration gAPH_updateTargetWorkDurationFn = nullptr;
-APH_reportActualWorkDuration gAPH_reportActualWorkDurationFn = nullptr;
-APH_sendHint gAPH_sendHintFn = nullptr;
-
-void ensureAPerformanceHintBindingInitialized() {
- if (gAPerformanceHintBindingInitialized) return;
+#define BIND_APH_METHOD(name) \
+ name = (decltype(name))dlsym(handle_, "APerformanceHint_" #name); \
+ LOG_ALWAYS_FATAL_IF(name == nullptr, "Failed to find required symbol APerformanceHint_" #name)
+
+void HintSessionWrapper::HintSessionBinding::init() {
+ if (mInitialized) return;
void* handle_ = dlopen("libandroid.so", RTLD_NOW | RTLD_NODELETE);
LOG_ALWAYS_FATAL_IF(handle_ == nullptr, "Failed to dlopen libandroid.so!");
- gAPH_getManagerFn = (APH_getManager)dlsym(handle_, "APerformanceHint_getManager");
- LOG_ALWAYS_FATAL_IF(gAPH_getManagerFn == nullptr,
- "Failed to find required symbol APerformanceHint_getManager!");
-
- gAPH_createSessionFn = (APH_createSession)dlsym(handle_, "APerformanceHint_createSession");
- LOG_ALWAYS_FATAL_IF(gAPH_createSessionFn == nullptr,
- "Failed to find required symbol APerformanceHint_createSession!");
-
- gAPH_closeSessionFn = (APH_closeSession)dlsym(handle_, "APerformanceHint_closeSession");
- LOG_ALWAYS_FATAL_IF(gAPH_closeSessionFn == nullptr,
- "Failed to find required symbol APerformanceHint_closeSession!");
-
- gAPH_updateTargetWorkDurationFn = (APH_updateTargetWorkDuration)dlsym(
- handle_, "APerformanceHint_updateTargetWorkDuration");
- LOG_ALWAYS_FATAL_IF(
- gAPH_updateTargetWorkDurationFn == nullptr,
- "Failed to find required symbol APerformanceHint_updateTargetWorkDuration!");
+ BIND_APH_METHOD(getManager);
+ BIND_APH_METHOD(createSession);
+ BIND_APH_METHOD(closeSession);
+ BIND_APH_METHOD(updateTargetWorkDuration);
+ BIND_APH_METHOD(reportActualWorkDuration);
+ BIND_APH_METHOD(sendHint);
- gAPH_reportActualWorkDurationFn = (APH_reportActualWorkDuration)dlsym(
- handle_, "APerformanceHint_reportActualWorkDuration");
- LOG_ALWAYS_FATAL_IF(
- gAPH_reportActualWorkDurationFn == nullptr,
- "Failed to find required symbol APerformanceHint_reportActualWorkDuration!");
-
- gAPH_sendHintFn = (APH_sendHint)dlsym(handle_, "APerformanceHint_sendHint");
- LOG_ALWAYS_FATAL_IF(gAPH_sendHintFn == nullptr,
- "Failed to find required symbol APerformanceHint_sendHint!");
-
- gAPerformanceHintBindingInitialized = true;
+ mInitialized = true;
}
-} // namespace
-
HintSessionWrapper::HintSessionWrapper(pid_t uiThreadId, pid_t renderThreadId)
- : mUiThreadId(uiThreadId), mRenderThreadId(renderThreadId) {}
+ : mUiThreadId(uiThreadId)
+ , mRenderThreadId(renderThreadId)
+ , mBinding(std::make_shared<HintSessionBinding>()) {}
HintSessionWrapper::~HintSessionWrapper() {
destroy();
@@ -101,7 +66,7 @@ void HintSessionWrapper::destroy() {
mHintSession = mHintSessionFuture.get();
}
if (mHintSession) {
- gAPH_closeSessionFn(mHintSession);
+ mBinding->closeSession(mHintSession);
mSessionValid = true;
mHintSession = nullptr;
}
@@ -133,9 +98,9 @@ bool HintSessionWrapper::init() {
// Assume that if we return before the end, it broke
mSessionValid = false;
- ensureAPerformanceHintBindingInitialized();
+ mBinding->init();
- APerformanceHintManager* manager = gAPH_getManagerFn();
+ APerformanceHintManager* manager = mBinding->getManager();
if (!manager) return false;
std::vector<pid_t> tids = CommonPool::getThreadIds();
@@ -145,8 +110,9 @@ bool HintSessionWrapper::init() {
// Use a placeholder target value to initialize,
// this will always be replaced elsewhere before it gets used
int64_t defaultTargetDurationNanos = 16666667;
- mHintSessionFuture = CommonPool::async([=, tids = std::move(tids)] {
- return gAPH_createSessionFn(manager, tids.data(), tids.size(), defaultTargetDurationNanos);
+ mHintSessionFuture = CommonPool::async([=, this, tids = std::move(tids)] {
+ return mBinding->createSession(manager, tids.data(), tids.size(),
+ defaultTargetDurationNanos);
});
return false;
}
@@ -158,7 +124,7 @@ void HintSessionWrapper::updateTargetWorkDuration(long targetWorkDurationNanos)
targetWorkDurationNanos > kSanityCheckLowerBound &&
targetWorkDurationNanos < kSanityCheckUpperBound) {
mLastTargetWorkDuration = targetWorkDurationNanos;
- gAPH_updateTargetWorkDurationFn(mHintSession, targetWorkDurationNanos);
+ mBinding->updateTargetWorkDuration(mHintSession, targetWorkDurationNanos);
}
mLastFrameNotification = systemTime();
}
@@ -168,7 +134,7 @@ void HintSessionWrapper::reportActualWorkDuration(long actualDurationNanos) {
mResetsSinceLastReport = 0;
if (actualDurationNanos > kSanityCheckLowerBound &&
actualDurationNanos < kSanityCheckUpperBound) {
- gAPH_reportActualWorkDurationFn(mHintSession, actualDurationNanos);
+ mBinding->reportActualWorkDuration(mHintSession, actualDurationNanos);
}
}
@@ -179,14 +145,14 @@ void HintSessionWrapper::sendLoadResetHint() {
if (now - mLastFrameNotification > kResetHintTimeout &&
mResetsSinceLastReport <= kMaxResetsSinceLastReport) {
++mResetsSinceLastReport;
- gAPH_sendHintFn(mHintSession, static_cast<int>(SessionHint::CPU_LOAD_RESET));
+ mBinding->sendHint(mHintSession, static_cast<int32_t>(SessionHint::CPU_LOAD_RESET));
}
mLastFrameNotification = now;
}
void HintSessionWrapper::sendLoadIncreaseHint() {
if (!init()) return;
- gAPH_sendHintFn(mHintSession, static_cast<int>(SessionHint::CPU_LOAD_UP));
+ mBinding->sendHint(mHintSession, static_cast<int32_t>(SessionHint::CPU_LOAD_UP));
}
} /* namespace renderthread */
diff --git a/libs/hwui/renderthread/HintSessionWrapper.h b/libs/hwui/renderthread/HintSessionWrapper.h
index bdb9959b1ca7..f8b876e28d51 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.h
+++ b/libs/hwui/renderthread/HintSessionWrapper.h
@@ -29,6 +29,8 @@ namespace renderthread {
class HintSessionWrapper {
public:
+ friend class HintSessionWrapperTests;
+
HintSessionWrapper(pid_t uiThreadId, pid_t renderThreadId);
~HintSessionWrapper();
@@ -55,6 +57,28 @@ private:
static constexpr nsecs_t kResetHintTimeout = 100_ms;
static constexpr int64_t kSanityCheckLowerBound = 100_us;
static constexpr int64_t kSanityCheckUpperBound = 10_s;
+
+ // Allows easier stub when testing
+ class HintSessionBinding {
+ public:
+ virtual ~HintSessionBinding() = default;
+ virtual void init();
+ APerformanceHintManager* (*getManager)();
+ APerformanceHintSession* (*createSession)(APerformanceHintManager* manager,
+ const int32_t* tids, size_t tidCount,
+ int64_t defaultTarget) = nullptr;
+ void (*closeSession)(APerformanceHintSession* session) = nullptr;
+ void (*updateTargetWorkDuration)(APerformanceHintSession* session,
+ int64_t targetDuration) = nullptr;
+ void (*reportActualWorkDuration)(APerformanceHintSession* session,
+ int64_t actualDuration) = nullptr;
+ void (*sendHint)(APerformanceHintSession* session, int32_t hintId) = nullptr;
+
+ private:
+ bool mInitialized = false;
+ };
+
+ std::shared_ptr<HintSessionBinding> mBinding;
};
} /* namespace renderthread */
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index ee3b2e48fe4b..90850d36b612 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -515,7 +515,7 @@ Frame VulkanManager::dequeueNextBuffer(VulkanSurface* surface) {
// The following flush blocks the GPU immediately instead of waiting for
// other drawing ops. It seems dequeue_fence is not respected otherwise.
// TODO: remove the flush after finding why backendSemaphore is not working.
- skgpu::ganesh::FlushAndSubmit(bufferInfo->skSurface);
+ skgpu::ganesh::FlushAndSubmit(bufferInfo->skSurface.get());
}
}
}
diff --git a/libs/hwui/tests/unit/HintSessionWrapperTests.cpp b/libs/hwui/tests/unit/HintSessionWrapperTests.cpp
new file mode 100644
index 000000000000..623be1e3f3f3
--- /dev/null
+++ b/libs/hwui/tests/unit/HintSessionWrapperTests.cpp
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <private/performance_hint_private.h>
+#include <renderthread/HintSessionWrapper.h>
+#include <utils/Log.h>
+
+#include <chrono>
+
+#include "Properties.h"
+
+using namespace testing;
+using namespace std::chrono_literals;
+
+APerformanceHintManager* managerPtr = reinterpret_cast<APerformanceHintManager*>(123);
+APerformanceHintSession* sessionPtr = reinterpret_cast<APerformanceHintSession*>(456);
+int uiThreadId = 1;
+int renderThreadId = 2;
+
+namespace android::uirenderer::renderthread {
+
+class HintSessionWrapperTests : public testing::Test {
+public:
+ void SetUp() override;
+ void TearDown() override;
+
+protected:
+ std::shared_ptr<HintSessionWrapper> mWrapper;
+
+ class MockHintSessionBinding : public HintSessionWrapper::HintSessionBinding {
+ public:
+ void init() override;
+
+ MOCK_METHOD(APerformanceHintManager*, fakeGetManager, ());
+ MOCK_METHOD(APerformanceHintSession*, fakeCreateSession,
+ (APerformanceHintManager*, const int32_t*, size_t, int64_t));
+ MOCK_METHOD(void, fakeCloseSession, (APerformanceHintSession*));
+ MOCK_METHOD(void, fakeUpdateTargetWorkDuration, (APerformanceHintSession*, int64_t));
+ MOCK_METHOD(void, fakeReportActualWorkDuration, (APerformanceHintSession*, int64_t));
+ MOCK_METHOD(void, fakeSendHint, (APerformanceHintSession*, int32_t));
+ };
+
+ // Must be static so it can have function pointers we can point to with static methods
+ static std::shared_ptr<MockHintSessionBinding> sMockBinding;
+
+ // Must be static so we can point to them as normal fn pointers with HintSessionBinding
+ static APerformanceHintManager* stubGetManager() { return sMockBinding->fakeGetManager(); };
+ static APerformanceHintSession* stubCreateSession(APerformanceHintManager* manager,
+ const int32_t* ids, size_t idsSize,
+ int64_t initialTarget) {
+ return sMockBinding->fakeCreateSession(manager, ids, idsSize, initialTarget);
+ }
+ static APerformanceHintSession* stubSlowCreateSession(APerformanceHintManager* manager,
+ const int32_t* ids, size_t idsSize,
+ int64_t initialTarget) {
+ std::this_thread::sleep_for(50ms);
+ return sMockBinding->fakeCreateSession(manager, ids, idsSize, initialTarget);
+ }
+ static void stubCloseSession(APerformanceHintSession* session) {
+ sMockBinding->fakeCloseSession(session);
+ };
+ static void stubUpdateTargetWorkDuration(APerformanceHintSession* session,
+ int64_t workDuration) {
+ sMockBinding->fakeUpdateTargetWorkDuration(session, workDuration);
+ }
+ static void stubReportActualWorkDuration(APerformanceHintSession* session,
+ int64_t workDuration) {
+ sMockBinding->fakeReportActualWorkDuration(session, workDuration);
+ }
+ static void stubSendHint(APerformanceHintSession* session, int32_t hintId) {
+ sMockBinding->fakeSendHint(session, hintId);
+ };
+ void waitForWrapperReady() { mWrapper->mHintSessionFuture.wait(); }
+};
+
+std::shared_ptr<HintSessionWrapperTests::MockHintSessionBinding>
+ HintSessionWrapperTests::sMockBinding;
+
+void HintSessionWrapperTests::SetUp() {
+ // Pretend it's supported even if we're in an emulator
+ Properties::useHintManager = true;
+ sMockBinding = std::make_shared<NiceMock<MockHintSessionBinding>>();
+ mWrapper = std::make_shared<HintSessionWrapper>(uiThreadId, renderThreadId);
+ mWrapper->mBinding = sMockBinding;
+ EXPECT_CALL(*sMockBinding, fakeGetManager).WillOnce(Return(managerPtr));
+ ON_CALL(*sMockBinding, fakeCreateSession).WillByDefault(Return(sessionPtr));
+}
+
+void HintSessionWrapperTests::MockHintSessionBinding::init() {
+ sMockBinding->getManager = &stubGetManager;
+ if (sMockBinding->createSession == nullptr) {
+ sMockBinding->createSession = &stubCreateSession;
+ }
+ sMockBinding->closeSession = &stubCloseSession;
+ sMockBinding->updateTargetWorkDuration = &stubUpdateTargetWorkDuration;
+ sMockBinding->reportActualWorkDuration = &stubReportActualWorkDuration;
+ sMockBinding->sendHint = &stubSendHint;
+}
+
+void HintSessionWrapperTests::TearDown() {
+ mWrapper = nullptr;
+ sMockBinding = nullptr;
+}
+
+TEST_F(HintSessionWrapperTests, destructorClosesBackgroundSession) {
+ EXPECT_CALL(*sMockBinding, fakeCloseSession(sessionPtr)).Times(1);
+ sMockBinding->createSession = stubSlowCreateSession;
+ mWrapper->init();
+ mWrapper = nullptr;
+}
+
+TEST_F(HintSessionWrapperTests, sessionInitializesCorrectly) {
+ EXPECT_CALL(*sMockBinding, fakeCreateSession(managerPtr, _, Gt(1), _)).Times(1);
+ mWrapper->init();
+ waitForWrapperReady();
+}
+
+TEST_F(HintSessionWrapperTests, loadUpHintsSendCorrectly) {
+ EXPECT_CALL(*sMockBinding,
+ fakeSendHint(sessionPtr, static_cast<int32_t>(SessionHint::CPU_LOAD_UP)))
+ .Times(1);
+ mWrapper->init();
+ waitForWrapperReady();
+ mWrapper->sendLoadIncreaseHint();
+}
+
+TEST_F(HintSessionWrapperTests, loadResetHintsSendCorrectly) {
+ EXPECT_CALL(*sMockBinding,
+ fakeSendHint(sessionPtr, static_cast<int32_t>(SessionHint::CPU_LOAD_RESET)))
+ .Times(1);
+ mWrapper->init();
+ waitForWrapperReady();
+ mWrapper->sendLoadResetHint();
+}
+
+} // namespace android::uirenderer::renderthread \ No newline at end of file
diff --git a/libs/protoutil/include/android/util/ProtoOutputStream.h b/libs/protoutil/include/android/util/ProtoOutputStream.h
index f4a358de1c41..1bfb874729d7 100644
--- a/libs/protoutil/include/android/util/ProtoOutputStream.h
+++ b/libs/protoutil/include/android/util/ProtoOutputStream.h
@@ -102,7 +102,7 @@ public:
bool write(uint64_t fieldId, long val);
bool write(uint64_t fieldId, long long val);
bool write(uint64_t fieldId, bool val);
- bool write(uint64_t fieldId, std::string val);
+ bool write(uint64_t fieldId, std::string_view val);
bool write(uint64_t fieldId, const char* val, size_t size);
/**
diff --git a/libs/protoutil/src/ProtoOutputStream.cpp b/libs/protoutil/src/ProtoOutputStream.cpp
index fcf82eed4eb1..a44a1b210924 100644
--- a/libs/protoutil/src/ProtoOutputStream.cpp
+++ b/libs/protoutil/src/ProtoOutputStream.cpp
@@ -170,13 +170,13 @@ ProtoOutputStream::write(uint64_t fieldId, bool val)
}
bool
-ProtoOutputStream::write(uint64_t fieldId, std::string val)
+ProtoOutputStream::write(uint64_t fieldId, std::string_view val)
{
if (mCompact) return false;
const uint32_t id = (uint32_t)fieldId;
switch (fieldId & FIELD_TYPE_MASK) {
case FIELD_TYPE_STRING:
- writeUtf8StringImpl(id, val.c_str(), val.size());
+ writeUtf8StringImpl(id, val.data(), val.size());
return true;
default:
ALOGW("Field type %" PRIu64 " is not supported when writing string val.",
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index ceb3858eb0b3..a311296dd90c 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -1284,7 +1284,8 @@ public final class AudioFormat implements Parcelable {
* {@link AudioFormat#CHANNEL_OUT_SIDE_RIGHT}.
* <p> For a valid {@link AudioTrack} channel position mask,
* the following conditions apply:
- * <br> (1) at most eight channel positions may be used;
+ * <br> (1) at most {@link AudioSystem#OUT_CHANNEL_COUNT_MAX} channel positions may be
+ * used;
* <br> (2) right/left pairs should be matched.
* <p> For input or {@link AudioRecord}, the mask should be
* {@link AudioFormat#CHANNEL_IN_MONO} or
diff --git a/media/java/android/media/flags/media_better_together.aconfig b/media/java/android/media/flags/media_better_together.aconfig
index 17962ee10161..83d2b613f80a 100644
--- a/media/java/android/media/flags/media_better_together.aconfig
+++ b/media/java/android/media/flags/media_better_together.aconfig
@@ -1,8 +1,22 @@
package: "com.android.media.flags"
flag {
+ name: "enable_rlp_callbacks_in_media_router2"
+ namespace: "media_solutions"
+ description: "Make RouteListingPreference getter and callbacks public in MediaRouter2."
+ bug: "281067101"
+}
+
+flag {
+ name: "adjust_volume_for_foreground_app_playing_audio_without_media_session"
+ namespace: "media_solutions"
+ description: "Gates whether to adjust local stream volume when the app in the foreground is the last app to play audio or adjust the volume of the last active media session that the user interacted with."
+ bug: "275185436"
+}
+
+flag {
namespace: "media_solutions"
- name: "enable_rlp_callbacks_in_media_router2"
- description: "Make RouteListingPreference getter and callbacks public in MediaRouter2."
- bug: "281067101"
+ name: "enable_audio_policies_device_and_bluetooth_controller"
+ description: "Use Audio Policies implementation for device and Bluetooth route controllers."
+ bug: "280576228"
}
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index b03a039d74b8..ef90bf993437 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -1043,7 +1043,7 @@ static jthrowable createCodecException(
CHECK(ctor != NULL);
ScopedLocalRef<jstring> msgObj(
- env, env->NewStringUTF(msg != NULL ? msg : String8::format("Error %#x", err)));
+ env, env->NewStringUTF(msg != NULL ? msg : String8::format("Error %#x", err).c_str()));
// translate action code to Java equivalent
switch (actionCode) {
@@ -3036,7 +3036,7 @@ static void android_media_MediaCodec_setVideoScalingMode(
if (mode != NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW
&& mode != NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) {
jniThrowException(env, "java/lang/IllegalArgumentException",
- String8::format("Unrecognized mode: %d", mode));
+ String8::format("Unrecognized mode: %d", mode).c_str());
return;
}
@@ -3467,27 +3467,27 @@ static void android_media_MediaCodec_native_setup(
if (err == NAME_NOT_FOUND) {
// fail and do not try again.
jniThrowException(env, "java/lang/IllegalArgumentException",
- String8::format("Failed to initialize %s, error %#x (NAME_NOT_FOUND)", tmp, err));
+ String8::format("Failed to initialize %s, error %#x (NAME_NOT_FOUND)", tmp, err).c_str());
env->ReleaseStringUTFChars(name, tmp);
return;
}
if (err == NO_MEMORY) {
throwCodecException(env, err, ACTION_CODE_TRANSIENT,
- String8::format("Failed to initialize %s, error %#x (NO_MEMORY)", tmp, err));
+ String8::format("Failed to initialize %s, error %#x (NO_MEMORY)", tmp, err).c_str());
env->ReleaseStringUTFChars(name, tmp);
return;
}
if (err == PERMISSION_DENIED) {
jniThrowException(env, "java/lang/SecurityException",
String8::format("Failed to initialize %s, error %#x (PERMISSION_DENIED)", tmp,
- err));
+ err).c_str());
env->ReleaseStringUTFChars(name, tmp);
return;
}
if (err != OK) {
// believed possible to try again
jniThrowException(env, "java/io/IOException",
- String8::format("Failed to find matching codec %s, error %#x (?)", tmp, err));
+ String8::format("Failed to find matching codec %s, error %#x (?)", tmp, err).c_str());
env->ReleaseStringUTFChars(name, tmp);
return;
}
diff --git a/media/jni/android_media_MediaDescrambler.cpp b/media/jni/android_media_MediaDescrambler.cpp
index c61365a448d3..37111c28c242 100644
--- a/media/jni/android_media_MediaDescrambler.cpp
+++ b/media/jni/android_media_MediaDescrambler.cpp
@@ -368,7 +368,7 @@ static jthrowable createServiceSpecificException(
ScopedLocalRef<jstring> msgObj(
env, env->NewStringUTF(msg != NULL ?
- msg : String8::format("Error %#x", serviceSpecificError)));
+ msg : String8::format("Error %#x", serviceSpecificError).c_str()));
return (jthrowable)env->NewObject(
clazz.get(), ctor, serviceSpecificError, msgObj.get());
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 3551ea422310..d05ee551c172 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -260,7 +260,7 @@ android_media_MediaPlayer_setDataSourceAndHeaders(
status_t opStatus =
mp->setDataSource(
httpService,
- pathStr,
+ pathStr.c_str(),
headersVector.size() > 0? &headersVector : NULL);
process_media_player_call(
diff --git a/native/android/obb.cpp b/native/android/obb.cpp
index e9900249b289..a14fa7e58fa8 100644
--- a/native/android/obb.cpp
+++ b/native/android/obb.cpp
@@ -42,7 +42,7 @@ void AObbInfo_delete(AObbInfo* obbInfo) {
}
const char* AObbInfo_getPackageName(AObbInfo* obbInfo) {
- return obbInfo->getPackageName();
+ return obbInfo->getPackageName().c_str();
}
int32_t AObbInfo_getVersion(AObbInfo* obbInfo) {
diff --git a/packages/CarrierDefaultApp/res/values-sq/strings.xml b/packages/CarrierDefaultApp/res/values-sq/strings.xml
index 238921aaa8f0..d8a1ed7f6620 100644
--- a/packages/CarrierDefaultApp/res/values-sq/strings.xml
+++ b/packages/CarrierDefaultApp/res/values-sq/strings.xml
@@ -5,7 +5,7 @@
<string name="android_system_label" msgid="2797790869522345065">"Operatori celular"</string>
<string name="portal_notification_id" msgid="5155057562457079297">"Të dhënat celulare kanë përfunduar"</string>
<string name="no_data_notification_id" msgid="668400731803969521">"Të dhënat celulare janë çaktivizuar"</string>
- <string name="portal_notification_detail" msgid="2295729385924660881">"Trokit për të vizituar sajtin e uebit të %s"</string>
+ <string name="portal_notification_detail" msgid="2295729385924660881">"Trokit për të vizituar uebsajtin e %s"</string>
<string name="no_data_notification_detail" msgid="3112125343857014825">"Kontakto me ofruesin e shërbimit %s"</string>
<string name="no_mobile_data_connection_title" msgid="7449525772416200578">"Nuk ka lidhje të të dhënave celulare"</string>
<string name="no_mobile_data_connection" msgid="544980465184147010">"Shto plan të dhënash ose plan roaming përmes %s"</string>
@@ -16,7 +16,7 @@
<string name="ssl_error_continue" msgid="1138548463994095584">"Vazhdo gjithsesi nëpërmjet shfletuesit"</string>
<string name="performance_boost_notification_channel" msgid="3475440855635538592">"Përforcimi i performancës"</string>
<string name="performance_boost_notification_title" msgid="3126203390685781861">"Opsionet 5G nga operatori yt celular"</string>
- <string name="performance_boost_notification_detail" msgid="216569851036236346">"Vizito sajtin e uebit të %s për të parë opsione për përvojën tënde me aplikacionin"</string>
+ <string name="performance_boost_notification_detail" msgid="216569851036236346">"Vizito uebsajtin e %s për të parë opsione për përvojën tënde me aplikacionin"</string>
<string name="performance_boost_notification_button_not_now" msgid="6459755324243683785">"Jo tani"</string>
<string name="performance_boost_notification_button_manage" msgid="4976836444046497973">"Menaxho"</string>
<string name="slice_purchase_app_label" msgid="7170191659233241166">"Bli një paketë përforcimi të performancës."</string>
diff --git a/packages/CredentialManager/Android.bp b/packages/CredentialManager/Android.bp
index fe26dc3d7feb..233aee29f155 100644
--- a/packages/CredentialManager/Android.bp
+++ b/packages/CredentialManager/Android.bp
@@ -50,3 +50,46 @@ android_app {
proguard_compatibility: false,
},
}
+
+android_app {
+ name: "ClockworkCredentialManager",
+ defaults: ["platform_app_defaults"],
+ certificate: "platform",
+ manifest: "wear/AndroidManifest.xml",
+ srcs: ["wear/src/**/*.kt"],
+ resource_dirs: ["wear/res"],
+
+ dex_preopt: {
+ profile_guided: true,
+ profile: "wear/profile.txt.prof",
+ },
+
+ static_libs: [
+ "PlatformComposeCore",
+ "androidx.activity_activity-compose",
+ "androidx.appcompat_appcompat",
+ "androidx.compose.foundation_foundation",
+ "androidx.compose.foundation_foundation-layout",
+ "androidx.compose.material_material-icons-core",
+ "androidx.compose.material_material-icons-extended",
+ "androidx.compose.ui_ui",
+ "androidx.core_core-ktx",
+ "androidx.credentials_credentials",
+ "androidx.lifecycle_lifecycle-extensions",
+ "androidx.lifecycle_lifecycle-livedata",
+ "androidx.lifecycle_lifecycle-runtime-ktx",
+ "androidx.lifecycle_lifecycle-viewmodel-compose",
+ "androidx.wear.compose_compose-foundation",
+ "androidx.wear.compose_compose-material",
+ "kotlinx-coroutines-core",
+ ],
+
+ platform_apis: true,
+ privileged: true,
+
+ kotlincflags: ["-Xjvm-default=all"],
+
+ optimize: {
+ proguard_compatibility: false,
+ },
+}
diff --git a/packages/CredentialManager/horologist/OWNERS b/packages/CredentialManager/horologist/OWNERS
new file mode 100644
index 000000000000..b67932835b4a
--- /dev/null
+++ b/packages/CredentialManager/horologist/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/horologist/README.md b/packages/CredentialManager/horologist/README.md
new file mode 100644
index 000000000000..005ad2d36b77
--- /dev/null
+++ b/packages/CredentialManager/horologist/README.md
@@ -0,0 +1,3 @@
+This folder is to place the code from Horologist (go/horologist).
+It should be removed once Horologist is imported to the platform and the dependencies to this
+module are updated to point to the imported Horologist.
diff --git a/packages/CredentialManager/res/values-b+sr+Latn/strings.xml b/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
index 89e48f96d27b..780274cc0a5b 100644
--- a/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
+++ b/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
@@ -49,7 +49,7 @@
<string name="sign_ins" msgid="4710739369149469208">"prijavljivanja"</string>
<string name="sign_in_info" msgid="2627704710674232328">"podaci za prijavljivanje"</string>
<string name="save_credential_to_title" msgid="3172811692275634301">"Sačuvaj <xliff:g id="CREDENTIALTYPES">%1$s</xliff:g> u"</string>
- <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Želite da napravite pristupni kôd na drugom uređaju?"</string>
+ <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Želite da napravite pristupni ključ na drugom uređaju?"</string>
<string name="save_password_on_other_device_title" msgid="5829084591948321207">"Želite da sačuvate lozinku na drugom uređaju?"</string>
<string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Želite da sačuvate akreditive za prijavu na drugom uređaju?"</string>
<string name="use_provider_for_all_title" msgid="4201020195058980757">"Želite da za sva prijavljivanja koristite: <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g>?"</string>
@@ -72,7 +72,7 @@
<string name="get_dialog_title_use_password_for" msgid="625828023234318484">"Želite da koristite sačuvanu lozinku za: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_title_use_sign_in_for" msgid="790049858275131785">"Želite li da koristite svoje podatke za prijavljivanje za aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_title_unlock_options_for" msgid="7605568190597632433">"Želite da otključate opcije prijavljivanja za: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
- <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Izaberite sačuvan pristupni kôd za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Izaberite sačuvan pristupni ključ za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_password_for" msgid="1724435823820819221">"Izaberite sačuvanu lozinku za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_saved_sign_in_for" msgid="2420298653461652728">"Izaberite sačuvane podatke za prijavljivanje za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_sign_in_for" msgid="3048870756117876514">"Odaberite podatke za prijavljivanje za aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/res/values-in/strings.xml b/packages/CredentialManager/res/values-in/strings.xml
index e47cf7b2c75e..d6bf9463158f 100644
--- a/packages/CredentialManager/res/values-in/strings.xml
+++ b/packages/CredentialManager/res/values-in/strings.xml
@@ -54,7 +54,7 @@
<string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Simpan info login di perangkat lain?"</string>
<string name="use_provider_for_all_title" msgid="4201020195058980757">"Gunakan <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g> untuk semua info login Anda?"</string>
<string name="use_provider_for_all_description" msgid="1998772715863958997">"Pengelola sandi untuk <xliff:g id="USERNAME">%1$s</xliff:g> ini akan menyimpan sandi dan kunci sandi guna membantu Anda login dengan mudah"</string>
- <string name="set_as_default" msgid="4415328591568654603">"Setel sebagai default"</string>
+ <string name="set_as_default" msgid="4415328591568654603">"Jadikan default"</string>
<string name="settings" msgid="6536394145760913145">"Setelan"</string>
<string name="use_once" msgid="9027366575315399714">"Gunakan sekali"</string>
<string name="more_options_usage_passwords_passkeys" msgid="3470113942332934279">"<xliff:g id="PASSWORDSNUMBER">%1$s</xliff:g> sandi • <xliff:g id="PASSKEYSNUMBER">%2$s</xliff:g> kunci sandi"</string>
diff --git a/packages/CredentialManager/res/values-sq/strings.xml b/packages/CredentialManager/res/values-sq/strings.xml
index 40f8dc48c5d5..bf6bc8bbbac9 100644
--- a/packages/CredentialManager/res/values-sq/strings.xml
+++ b/packages/CredentialManager/res/values-sq/strings.xml
@@ -34,7 +34,7 @@
<string name="public_key_cryptography_title" msgid="6751970819265298039">"Kriptografia e çelësit publik"</string>
<string name="public_key_cryptography_detail" msgid="6937631710280562213">"Bazuar në aleancën FIDO (e cila përfshin Google, Apple, Microsoft e të tjera) dhe standardet W3C, çelësat e kalimit përdorin çifte çelësash kriptografikë. Ndryshe nga emri i përdoruesit dhe vargu i karaktereve që përdorim për fjalëkalime, një çift çelësash privat-publik krijohet për aplikacion ose sajtin e uebit. Çelësi privat ruhet i sigurt në pajisjen tënde ose në menaxherin e fjalëkalimeve dhe konfirmon identitetin tënd. Çelësi publik ndahet me aplikacionin ose serverin e sajtit të uebit. Me çelësat përkatës, mund të regjistrohesh dhe të identifikohesh në çast."</string>
<string name="improved_account_security_title" msgid="1069841917893513424">"Siguri e përmirësuar e llogarisë"</string>
- <string name="improved_account_security_detail" msgid="9123750251551844860">"Secili çelës është i lidhur ekskluzivisht me aplikacionin ose sajtin e uebit për të cilin është krijuar, kështu që nuk do të identifikohesh asnjëherë gabimisht në një aplikacion ose sajt uebi mashtrues. Gjithashtu, me serverët që mbajnë vetëm çelësa publikë, pirateria informatike është shumë më e vështirë."</string>
+ <string name="improved_account_security_detail" msgid="9123750251551844860">"Secili çelës është i lidhur ekskluzivisht me aplikacionin ose uebsajtin për të cilin është krijuar, kështu që nuk do të identifikohesh asnjëherë gabimisht në një aplikacion ose uebsajt mashtrues. Gjithashtu, me serverët që mbajnë vetëm çelësa publikë, pirateria informatike është shumë më e vështirë."</string>
<string name="seamless_transition_title" msgid="5335622196351371961">"Kalim i thjeshtuar"</string>
<string name="seamless_transition_detail" msgid="4475509237171739843">"Teksa shkojmë drejt një të ardhmeje pa fjalëkalime, këto të fundit do të ofrohen ende së bashku me çelësat e kalimit."</string>
<string name="choose_provider_title" msgid="8870795677024868108">"Zgjidh se ku t\'i ruash <xliff:g id="CREATETYPES">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/res/values-sr/strings.xml b/packages/CredentialManager/res/values-sr/strings.xml
index f5a29a212a61..b83c69816341 100644
--- a/packages/CredentialManager/res/values-sr/strings.xml
+++ b/packages/CredentialManager/res/values-sr/strings.xml
@@ -49,7 +49,7 @@
<string name="sign_ins" msgid="4710739369149469208">"пријављивања"</string>
<string name="sign_in_info" msgid="2627704710674232328">"подаци за пријављивање"</string>
<string name="save_credential_to_title" msgid="3172811692275634301">"Сачувај <xliff:g id="CREDENTIALTYPES">%1$s</xliff:g> у"</string>
- <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Желите да направите приступни кôд на другом уређају?"</string>
+ <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Желите да направите приступни кључ на другом уређају?"</string>
<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>
@@ -72,7 +72,7 @@
<string name="get_dialog_title_use_password_for" msgid="625828023234318484">"Желите да користите сачувану лозинку за: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_title_use_sign_in_for" msgid="790049858275131785">"Желите ли да користите своје податке за пријављивање за апликацију <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_title_unlock_options_for" msgid="7605568190597632433">"Желите да откључате опције пријављивања за: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
- <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Изаберите сачуван приступни кôд за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Изаберите сачуван приступни кључ за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_password_for" msgid="1724435823820819221">"Изаберите сачувану лозинку за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_saved_sign_in_for" msgid="2420298653461652728">"Изаберите сачуване податке за пријављивање за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="get_dialog_title_choose_sign_in_for" msgid="3048870756117876514">"Одаберите податке за пријављивање за апликацију <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/shared/OWNERS b/packages/CredentialManager/shared/OWNERS
new file mode 100644
index 000000000000..b67932835b4a
--- /dev/null
+++ b/packages/CredentialManager/shared/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/shared/README.md b/packages/CredentialManager/shared/README.md
new file mode 100644
index 000000000000..d2375a0ccdf9
--- /dev/null
+++ b/packages/CredentialManager/shared/README.md
@@ -0,0 +1,2 @@
+This folder is to place the common code that will be shared between the phone project and the wear
+project of the Credential Manager implementation.
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt b/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
index 1ede64df89b8..145e44debb98 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
@@ -15,8 +15,6 @@
*/
package com.android.credentialmanager.logging
-import com.android.internal.logging.UiEventLogger.UiEventEnum.RESERVE_NEW_UI_EVENT_ID
-
import com.android.internal.logging.UiEvent
import com.android.internal.logging.UiEventLogger
diff --git a/packages/CredentialManager/wear/AndroidManifest.xml b/packages/CredentialManager/wear/AndroidManifest.xml
new file mode 100644
index 000000000000..001a56ddcb0b
--- /dev/null
+++ b/packages/CredentialManager/wear/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (c) 2017 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.credentialmanager">
+
+ <uses-permission android:name="android.permission.LAUNCH_CREDENTIAL_SELECTOR"/>
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
+ <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>
+
+ <application
+ android:allowBackup="true"
+ android:dataExtractionRules="@xml/data_extraction_rules"
+ android:fullBackupContent="@xml/backup_rules"
+ android:label="@string/app_name"
+ android:supportsRtl="true"
+ android:theme="@style/Theme.CredentialSelector">
+
+ <activity
+ android:name=".CredentialSelectorActivity"
+ android:exported="true"
+ android:permission="android.permission.LAUNCH_CREDENTIAL_SELECTOR"
+ android:launchMode="singleTop"
+ android:label="@string/app_name"
+ android:excludeFromRecents="true"
+ android:theme="@style/Theme.CredentialSelector">
+ </activity>
+ </application>
+
+</manifest>
diff --git a/packages/CredentialManager/wear/OWNERS b/packages/CredentialManager/wear/OWNERS
new file mode 100644
index 000000000000..b67932835b4a
--- /dev/null
+++ b/packages/CredentialManager/wear/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/wear/README.md b/packages/CredentialManager/wear/README.md
new file mode 100644
index 000000000000..b9d27b9a98e5
--- /dev/null
+++ b/packages/CredentialManager/wear/README.md
@@ -0,0 +1 @@
+This project is the wear implementation of the Credential Manager feature. \ No newline at end of file
diff --git a/packages/CredentialManager/wear/profile.txt.prof b/packages/CredentialManager/wear/profile.txt.prof
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/packages/CredentialManager/wear/profile.txt.prof
diff --git a/packages/SystemUI/res/layout/auth_biometric_face_view.xml b/packages/CredentialManager/wear/res/values/strings.xml
index e3d073276369..10ea9186ca85 100644
--- a/packages/SystemUI/res/layout/auth_biometric_face_view.xml
+++ b/packages/CredentialManager/wear/res/values/strings.xml
@@ -1,5 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2019 The Android Open Source Project
+ ~ 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.
@@ -13,14 +14,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!-- TODO(b/251476085): remove after BiometricFaceView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFaceView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/contents"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFaceView> \ No newline at end of file
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- The name of this application. Credential Manager is a service that centralizes and provides
+ access to a user's credentials used to sign in to various apps. [CHAR LIMIT=80] -->
+ <string name="app_name">Credential Manager</string>
+</resources> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml b/packages/CredentialManager/wear/res/values/themes.xml
index e36f9796be47..22329e9ff2ce 100644
--- a/packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml
+++ b/packages/CredentialManager/wear/res/values/themes.xml
@@ -1,5 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2019 The Android Open Source Project
+ ~ 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.
@@ -13,14 +14,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!-- TODO(b/251476085): remove after BiometricFingerprintView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFingerprintView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/contents"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFingerprintView> \ No newline at end of file
+<resources>
+ <style name="Theme.CredentialSelector" parent="@*android:style/ThemeOverlay.DeviceDefault.Accent.DayNight">
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowIsTranslucent">true</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/packages/CredentialManager/wear/res/xml/backup_rules.xml b/packages/CredentialManager/wear/res/xml/backup_rules.xml
new file mode 100644
index 000000000000..9b42d90d94bb
--- /dev/null
+++ b/packages/CredentialManager/wear/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample backup rules file; uncomment and customize as necessary.
+ See https://developer.android.com/guide/topics/data/autobackup
+ for details.
+ Note: This file is ignored for devices older that API 31
+ See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+ <!--
+ <include domain="sharedpref" path="."/>
+ <exclude domain="sharedpref" path="device.xml"/>
+-->
+</full-backup-content> \ No newline at end of file
diff --git a/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml b/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml
new file mode 100644
index 000000000000..c6c3bb05a956
--- /dev/null
+++ b/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample data extraction rules file; uncomment and customize as necessary.
+ See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+ for details.
+-->
+<data-extraction-rules>
+ <cloud-backup>
+ <!-- TODO: Use <include> and <exclude> to control what is backed up.
+ <include .../>
+ <exclude .../>
+ -->
+ </cloud-backup>
+ <!--
+ <device-transfer>
+ <include .../>
+ <exclude .../>
+ </device-transfer>
+ -->
+</data-extraction-rules> \ No newline at end of file
diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt
new file mode 100644
index 000000000000..f7b249931871
--- /dev/null
+++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt
@@ -0,0 +1,33 @@
+/*
+ * 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.0N
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import android.os.Bundle
+import androidx.activity.compose.setContent
+import androidx.activity.ComponentActivity
+import androidx.wear.compose.material.MaterialTheme
+import androidx.wear.compose.material.Text
+
+class CredentialSelectorActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ setContent {
+ MaterialTheme {
+ Text("Credential Manager entry point")
+ }
+ }
+ }
+}
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
index 292e002779f5..37c8eef8a90d 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
@@ -46,21 +46,23 @@ object SettingsExposedDropdownMenuCheckBoxProvider : SettingsPageProvider {
@Composable
override fun Page(arguments: Bundle?) {
RegularScaffold(title = TITLE) {
- SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+ SettingsExposedDropdownMenuCheckBox(
+ label = exposedDropdownMenuCheckBoxLabel,
options = options,
selectedOptionsState = remember { selectedOptionsState1 },
enabled = true,
- onselectedOptionStateChange = {})
+ onSelectedOptionStateChange = {},
+ )
}
}
fun buildInjectEntry(): SettingsEntryBuilder {
return SettingsEntryBuilder.createInject(owner = createSettingsPage()).setUiLayoutFn {
- Preference(object : PreferenceModel {
- override val title = TITLE
- override val onClick = navigator(name)
- })
- }
+ Preference(object : PreferenceModel {
+ override val title = TITLE
+ override val onClick = navigator(name)
+ })
+ }
}
}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/BrowseActivity.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/BrowseActivity.kt
index 08e3a27da125..9f8c868f4aa4 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/BrowseActivity.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/BrowseActivity.kt
@@ -22,6 +22,7 @@ import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.annotation.VisibleForTesting
+import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
@@ -126,18 +127,22 @@ private fun NavControllerWrapperImpl.NavContent(
allProvider: Collection<SettingsPageProvider>,
content: @Composable (SettingsPage) -> Unit,
) {
- NavHost(
- navController = navController,
- startDestination = NullPageProvider.name,
- ) {
- composable(NullPageProvider.name) {}
- for (spp in allProvider) {
- animatedComposable(
- route = spp.name + spp.parameter.navRoute(),
- arguments = spp.parameter,
- ) { navBackStackEntry ->
- val page = remember { spp.createSettingsPage(navBackStackEntry.arguments) }
- content(page)
+ // TODO(b/298520326): Remove Box after the issue is fixed.
+ // Wrap the top level node into a Box to workaround an issue of Compose 1.6.0-alpha03.
+ Box {
+ NavHost(
+ navController = navController,
+ startDestination = NullPageProvider.name,
+ ) {
+ composable(NullPageProvider.name) {}
+ for (spp in allProvider) {
+ animatedComposable(
+ route = spp.name + spp.parameter.navRoute(),
+ arguments = spp.parameter,
+ ) { navBackStackEntry ->
+ val page = remember { spp.createSettingsPage(navBackStackEntry.arguments) }
+ content(page)
+ }
}
}
}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
index 459a78382f39..682b4eac0c84 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
@@ -52,7 +52,7 @@ fun SettingsExposedDropdownMenuCheckBox(
options: List<String>,
selectedOptionsState: SnapshotStateList<String>,
enabled: Boolean,
- onselectedOptionStateChange: (String) -> Unit,
+ onSelectedOptionStateChange: () -> Unit,
) {
var dropDownWidth by remember { mutableStateOf(0) }
var expanded by remember { mutableStateOf(false) }
@@ -70,7 +70,7 @@ fun SettingsExposedDropdownMenuCheckBox(
.menuAnchor()
.fillMaxWidth(),
value = selectedOptionsState.joinToString(", "),
- onValueChange = onselectedOptionStateChange,
+ onValueChange = {},
label = { Text(text = label) },
trailingIcon = {
ExposedDropdownMenuDefaults.TrailingIcon(
@@ -89,18 +89,21 @@ fun SettingsExposedDropdownMenuCheckBox(
onDismissRequest = { expanded = false },
) {
options.forEach { option ->
- TextButton(modifier = Modifier
- .fillMaxHeight()
- .fillMaxWidth(), onClick = {
- if (selectedOptionsState.contains(option)) {
- selectedOptionsState.remove(
- option
- )
- } else {
- selectedOptionsState.add(
- option
- )
- }
+ TextButton(
+ modifier = Modifier
+ .fillMaxHeight()
+ .fillMaxWidth(),
+ onClick = {
+ if (selectedOptionsState.contains(option)) {
+ selectedOptionsState.remove(
+ option
+ )
+ } else {
+ selectedOptionsState.add(
+ option
+ )
+ }
+ onSelectedOptionStateChange()
}) {
Row(
modifier = Modifier
@@ -109,9 +112,10 @@ fun SettingsExposedDropdownMenuCheckBox(
horizontalArrangement = Arrangement.Start,
verticalAlignment = Alignment.CenterVertically
) {
- Checkbox(checked = selectedOptionsState.contains(
- option
- ), onCheckedChange = {})
+ Checkbox(
+ checked = selectedOptionsState.contains(option),
+ onCheckedChange = null,
+ )
Text(text = option)
}
}
@@ -131,6 +135,6 @@ private fun ActionButtonsPreview() {
options = options,
selectedOptionsState = selectedOptionsState,
enabled = true,
- onselectedOptionStateChange = {})
+ onSelectedOptionStateChange = {})
}
} \ No newline at end of file
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
index 58bc72213a1b..b0271ae1d98c 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
@@ -45,11 +45,12 @@ class SettingsExposedDropdownMenuCheckBoxTest {
@Test
fun exposedDropdownMenuCheckBox_displayed() {
composeTestRule.setContent {
- SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+ SettingsExposedDropdownMenuCheckBox(
+ label = exposedDropdownMenuCheckBoxLabel,
options = options,
selectedOptionsState = remember { selectedOptionsState1 },
enabled = true,
- onselectedOptionStateChange = {})
+ ) {}
}
composeTestRule.onNodeWithText(
exposedDropdownMenuCheckBoxLabel, substring = true
@@ -59,11 +60,12 @@ class SettingsExposedDropdownMenuCheckBoxTest {
@Test
fun exposedDropdownMenuCheckBox_expanded() {
composeTestRule.setContent {
- SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+ SettingsExposedDropdownMenuCheckBox(
+ label = exposedDropdownMenuCheckBoxLabel,
options = options,
selectedOptionsState = remember { selectedOptionsState1 },
enabled = true,
- onselectedOptionStateChange = {})
+ ) {}
}
composeTestRule.onNodeWithText(item3, substring = true).assertDoesNotExist()
composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
@@ -74,11 +76,12 @@ class SettingsExposedDropdownMenuCheckBoxTest {
@Test
fun exposedDropdownMenuCheckBox_valueAdded() {
composeTestRule.setContent {
- SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+ SettingsExposedDropdownMenuCheckBox(
+ label = exposedDropdownMenuCheckBoxLabel,
options = options,
selectedOptionsState = remember { selectedOptionsState1 },
enabled = true,
- onselectedOptionStateChange = {})
+ ) {}
}
composeTestRule.onNodeWithText(item3, substring = true).assertDoesNotExist()
composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
@@ -90,11 +93,12 @@ class SettingsExposedDropdownMenuCheckBoxTest {
@Test
fun exposedDropdownMenuCheckBox_valueDeleted() {
composeTestRule.setContent {
- SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+ SettingsExposedDropdownMenuCheckBox(
+ label = exposedDropdownMenuCheckBoxLabel,
options = options,
selectedOptionsState = remember { selectedOptionsState1 },
enabled = true,
- onselectedOptionStateChange = {})
+ ) {}
}
composeTestRule.onNodeWithText(item2, substring = true).assertIsDisplayed()
composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 9b82c13ce21b..ed15e7c7be9c 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -141,7 +141,7 @@
<string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Kanselleer"</string>
<string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Saambinding bied toegang tot jou kontakte en oproepgeskiedenis wanneer dit gekoppel is."</string>
<string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Kon nie saambind met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nie."</string>
- <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Kon nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> saambind nie weens \'n verkeerde PIN of wagwoordsleutel."</string>
+ <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Kon nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> saambind nie weens \'n verkeerde PIN of toegangsleutel."</string>
<string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Kan nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> kommunikeer nie."</string>
<string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"Saambinding verwerp deur <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
<string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Rekenaar"</string>
@@ -580,7 +580,7 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"Beperkte profiel"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"Voeg nuwe gebruiker by?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"Jy kan hierdie toestel met ander mense deel deur bykomende gebruikers te skep. Elke gebruiker het hulle eie spasie wat hulle kan pasmaak met programme, muurpapier en so meer. Gebruikers kan ook toestelinstellings wat almal raak, soos wi-fi, aanpas.\n\nWanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul eie spasie opstel.\n\nEnige gebruiker kan programme vir alle ander gebruikers opdateer. Toeganklikheidinstellings en -dienste sal dalk nie na die nuwe gebruiker oorgedra word nie."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel.\n\nEnige gebruiker kan programme vir al die ander gebruikers opdateer."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel.\n\nEnige gebruiker kan apps vir al die ander gebruikers opdateer."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"Maak hierdie gebruiker ’n admin?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Admins het spesiale voorregte wat ander gebruikers nie het nie. ’n Admin kan alle gebruikers bestuur, hierdie toestel opdateer of terugstel, instellings wysig, alle geïnstalleerde apps sien, en adminvoorregte vir ander mense gee of herroep."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Maak admin"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Voorspellingteruggebaaranimasies"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktiveer stelselanimasies vir voorspellingteruggebaar."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Hierdie instelling aktiveer stelselanimasies vir voorspellinggebaaranimasie. Dit vereis dat enableOnBackInvokedCallback per program op waar gestel word in die manifeslêer."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Skuif links"</item>
- <item msgid="5425394847942513942">"Skuif af"</item>
- <item msgid="7728484337962740316">"Skuif regs"</item>
- <item msgid="324200556467459329">"Skuif op"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nie gespesifiseer nie"</string>
<string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index bd025ec8950e..4831a2734f6b 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"የግምት ጀርባ እነማዎች"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ለግምት ጀርባ የስርዓት እንማዎችን ያንቁ።"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ይህ ቅንብር የስርዓት እነማዎችን ለመገመት የምልክት እነማን ያነቃል። በዝርዝር ሰነድ ፋይሉ ውስጥ በእያንዳንዱ መተግበሪያ enableOnBackInvokedCallbackን ወደ እውነት ማቀናበር ያስፈልገዋል።"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ወደ ግራ ውሰድ"</item>
- <item msgid="5425394847942513942">"ወደ ታች ውሰድ"</item>
- <item msgid="7728484337962740316">"ወደ ቀኝ ውሰድ"</item>
- <item msgid="324200556467459329">"ወደ ላይ ውሰድ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"አልተገለጸም"</string>
<string name="neuter" msgid="2075249330106127310">"ገለልተኛ"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index f5ab801a4c9e..53fbdb1d9884 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"صور متحركة تعرض إيماءة الرجوع إلى الخلف التنبؤية"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"تفعيل الصور المتحركة في النظام لإيماءة الرجوع إلى الخلف التنبؤية"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏يفعّل هذا الإعداد الصور المتحركة في النظام للصور المتحركة التي تعرض إيماءة الرجوع إلى الخلف التنبؤية. يتطلب الإعداد ضبط enableOnBackInvokedCallback إلى true لكل تطبيق في ملف البيان."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"نقل لليسار"</item>
- <item msgid="5425394847942513942">"نقل للأسفل"</item>
- <item msgid="7728484337962740316">"نقل لليمين"</item>
- <item msgid="324200556467459329">"نقل للأعلى"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
<string name="not_specified" msgid="5423502443185110328">"صيغة مخاطبة غير محدَّدة"</string>
<string name="neuter" msgid="2075249330106127310">"صيغة مخاطبة محايدة"</string>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index a0a52b5ec262..20edf938a937 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"প্ৰেডিক্টিভ বেক এনিমেশ্বন"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"প্ৰেডিক্টিভ বেকৰ বাবে ছিষ্টেম এনিমেশ্বন সক্ষম কৰক।"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"এই ছেটিংটোৱে প্ৰেডিক্টিভ বেক এনিমেশ্বনৰ বাবে ছিষ্টেম এনিমেশ্বন সক্ষম কৰে। ইয়াৰ বাবে মেনিফেষ্ট ফাইলত প্ৰতি এপত enableOnBackInvokedCallback সত্য বুলি ছেট কৰাৰ প্ৰয়োজন।"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"বাওঁফাললৈ নিয়ক"</item>
- <item msgid="5425394847942513942">"তললৈ নিয়ক"</item>
- <item msgid="7728484337962740316">"সোঁফাললৈ নিয়ক"</item>
- <item msgid="324200556467459329">"ওপৰলৈ নিয়ক"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"নিৰ্দিষ্ট কৰা হোৱা নাই"</string>
<string name="neuter" msgid="2075249330106127310">"ক্লীৱ লিংগ"</string>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index cb515bfa9234..d7ca008b8abe 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -676,7 +676,7 @@
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"Defolt"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"Ekranı aktiv etmək"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"Ekranı aktiv etməyə icazə verin"</string>
- <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Tətbiqin ekranı aktiv etməsinə icazə verin. İcazə verilərsə, tətbiq istənilən vaxt sizə soruşmadan ekranı aktiv edə bilər."</string>
+ <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Tətbiqin ekranı aktiv etməsinə icazə verin. İcazə verilərsə, tətbiq istənilən vaxt sizdən soruşmadan ekranı aktiv edə bilər."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> tətbiqinin yayımlanması dayandırılsın?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> tətbiqini yayımlasanız və ya nəticəni dəyişsəniz, cari yayımınız dayandırılacaq"</string>
<string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> tətbiqini yayımlayın"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Proqnozlaşdırılan geri animasiyalar"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Proqnozlaşdırıcı geri jest üçün sistem animasiyalarını aktiv edin."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu ayar proqnozlaşdırıcı jest animasiyası üçün sistem animasiyalarını aktiv edir. Bu, manifest faylında hər bir tətbiq üçün enableOnBackInvokedCallback-in doğru kimi ayarlanmasını tələb edir."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Sola köçürün"</item>
- <item msgid="5425394847942513942">"Aşağı köçürün"</item>
- <item msgid="7728484337962740316">"Sağa köçürün"</item>
- <item msgid="324200556467459329">"Yuxarı köçürün"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Göstərilməyib"</string>
<string name="neuter" msgid="2075249330106127310">"Neytral"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index 011967493a0e..a10f109ab418 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -141,7 +141,7 @@
<string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Otkaži"</string>
<string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Uparivanje omogućava pristup kontaktima i istoriji poziva nakon povezivanja."</string>
<string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Uparivanje sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće."</string>
- <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Uparivanje sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće zbog netačnog PIN-a ili pristupnog koda."</string>
+ <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Uparivanje sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće zbog netačnog PIN-a ili pristupnog ključa."</string>
<string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Nije moguće komunicirati sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
<string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> je odbio/la uparivanje"</string>
<string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Računar"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacije za pokret povratka sa predviđanjem"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućite animacije sistema za pokret povratka sa predviđanjem."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ovo podešavanje omogućava animacije sistema za pokret povratka sa predviđanjem. Zahteva podešavanje dozvole enableOnBackInvokedCallback po aplikaciji na true u fajlu manifesta."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Pomerite nalevo"</item>
- <item msgid="5425394847942513942">"Pomerite nadole"</item>
- <item msgid="7728484337962740316">"Pomerite nadesno"</item>
- <item msgid="324200556467459329">"Pomerite nagore"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
<string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index b46debff8c66..66ce12d5948c 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анімацыя падказкі для жэста вяртання"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Уключыць сістэмную анімацыю падказкі для жэстаў вяртання."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Гэта налада ўключае сістэмную анімацыю падказкі для жэста вяртання. Для гэтага неабходна задаць у файле маніфеста для параметра enableOnBackInvokedCallback значэнне \"True\" для кожнай праграмы."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Перамясціць улева"</item>
- <item msgid="5425394847942513942">"Перамясціць уніз"</item>
- <item msgid="7728484337962740316">"Перамясціць управа"</item>
- <item msgid="324200556467459329">"Перамясціць уверх"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Не ўказаны"</string>
<string name="neuter" msgid="2075249330106127310">"Ніякі"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 592f6178e74d..5166d876ec11 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анимации за предвиждащия жест за връщане назад"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Активиране на системните анимации за предвиждащия жест за връщане назад."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Тази настройка активира системните анимации за предвиждащите жестове. За целта във файла на манифеста трябва да зададете enableOnBackInvokedCallback на true за отделните приложения."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Преместване наляво"</item>
- <item msgid="5425394847942513942">"Преместване надолу"</item>
- <item msgid="7728484337962740316">"Преместване надясно"</item>
- <item msgid="324200556467459329">"Преместване нагоре"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Не е посочено"</string>
<string name="neuter" msgid="2075249330106127310">"Среден род"</string>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index 3fafee31d634..7f285f6e76d2 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -174,7 +174,7 @@
<string name="launch_defaults_some" msgid="3631650616557252926">"কিছু ডিফল্ট সেট করা রয়েছে"</string>
<string name="launch_defaults_none" msgid="8049374306261262709">"কোনও ডিফল্ট সেট করা নেই"</string>
<string name="tts_settings" msgid="8130616705989351312">"পাঠ্য থেকে ভাষ্য আউটপুট সেটিংস"</string>
- <string name="tts_settings_title" msgid="7602210956640483039">"টেক্সট-টু-স্পিচ"</string>
+ <string name="tts_settings_title" msgid="7602210956640483039">"টেক্সট-টু-স্পিচ আউটপুট"</string>
<string name="tts_default_rate_title" msgid="3964187817364304022">"কথা বলার হার"</string>
<string name="tts_default_rate_summary" msgid="3781937042151716987">"যে গতিতে পাঠ্য উচ্চারিত হয়"</string>
<string name="tts_default_pitch_title" msgid="6988592215554485479">"পিচ"</string>
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"আলতো চাপ দেখান"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"আলতো চাপ দিলে ভিজ্যুয়াল প্রতিক্রিয়া দেখান"</string>
<string name="show_key_presses" msgid="6360141722735900214">"প্রেস করা কী দেখুন"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"প্রেস করা ফিজিকাল কীয়ের জন্য ভিস্যুয়াল মতামত দেখুন"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"ফিজিক্যাল কী প্রেস করা হলে ভিজুয়াল ফিডব্যাক দেখুন"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"সারফেস আপডেটগুলি দেখান"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"সম্পূর্ণ উইন্ডোর সারফেস আপডেট হয়ে গেলে সেটিকে ফ্ল্যাশ করুন"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"ভিউয়ের আপডেট দেখুন"</string>
@@ -674,7 +674,7 @@
<string name="physical_keyboard_title" msgid="4811935435315835220">"ফিজিক্যাল কীবোর্ড"</string>
<string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"কীবোর্ড লেআউট বেছে নিন"</string>
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"ডিফল্ট"</string>
- <string name="turn_screen_on_title" msgid="3266937298097573424">"স্ক্রিন চালু করুন"</string>
+ <string name="turn_screen_on_title" msgid="3266937298097573424">"স্ক্রিন চালু করা"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"স্ক্রিন চালু করার অনুমতি দিন"</string>
<string name="allow_turn_screen_on_description" msgid="43834403291575164">"অ্যাপকে স্ক্রিন চালু করার অনুমতি দিন। অনুমতি দেওয়া হলে, অ্যাপ আপনার এক্সপ্লিসিট ইনটেন্ট ছাড়াই যেকোনও সময় স্ক্রিন চালু করতে পারবে।"</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> সম্প্রচার বন্ধ করবেন?"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ফিরে যাওয়ার পূর্বাভাস সংক্রান্ত অ্যানিমেশন"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ফিরে যাওয়া সংক্রান্ত পূর্বাভাসের জন্য সিস্টেম অ্যানিমেশন চালু করুন।"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"জেসচারের পূর্বাভাস সংক্রান্ত অ্যানিমেশন দেখাতে এই সেটিং সিস্টেম অ্যানিমেশন চালু করে। এই সেটিংয়ে \'ম্যানিফেস্ট\' ফাইলে প্রত্যেক অ্যাপে enableOnBackInvokedCallback অ্যাট্রিবিউটকে \'ট্রু\' (true) হিসেবে সেট করতে হয়।"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"বাঁদিকে সরান"</item>
- <item msgid="5425394847942513942">"নিচে নামান"</item>
- <item msgid="7728484337962740316">"ডানদিকে সরান"</item>
- <item msgid="324200556467459329">"উপরে সরান"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"নির্দিষ্টভাবে উল্লেখ করা নেই"</string>
<string name="neuter" msgid="2075249330106127310">"ক্লীব"</string>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 5f7bd2c3cfa5..d7daed5cf936 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -675,8 +675,8 @@
<string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"Odaberite raspored tastature"</string>
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"Zadano"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"Uključivanje ekrana"</string>
- <string name="allow_turn_screen_on" msgid="6194845766392742639">"Dozvolite uključivanje ekrana"</string>
- <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Dozvolite aplikaciji da uključi ekran. Ako se odobri, aplikacija može uključiti ekran bilo kada bez vaše izričite namjere."</string>
+ <string name="allow_turn_screen_on" msgid="6194845766392742639">"Dozvoli uključivanje ekrana"</string>
+ <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Dozvolite aplikaciji da uključuje ekran. Ako se odobri, aplikacija može uključiti ekran bilo kada bez vaše izričite namjere."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"Zaustaviti emitiranje aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Ako emitirate aplikaciju <xliff:g id="SWITCHAPP">%1$s</xliff:g> ili promijenite izlaz, trenutno emitiranje će se zaustaviti"</string>
<string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"Emitiraj aplikaciju <xliff:g id="SWITCHAPP">%1$s</xliff:g>"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacije predvidljivog pokreta unazad"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućava animacije sistema za predvidljivi pokret unazad."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ova postavka omogućava animacije sistema za animaciju predvidljivih pokreta. Potrebno je po aplikaciji postaviti vrijednost za enableOnBackInvokedCallback na tačno u fajlu deklaracije."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Pomjeranje ulijevo"</item>
- <item msgid="5425394847942513942">"Pomjeranje nadolje"</item>
- <item msgid="7728484337962740316">"Pomjeranje udesno"</item>
- <item msgid="324200556467459329">"Pomjeranje nagore"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
<string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 7143f99207c9..89caaf94bdf7 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -306,7 +306,7 @@
<string name="wifi_non_persistent_mac_randomization_summary" msgid="2159794543105053930">"Quan aquest mode està activat, és possible que l’adreça MAC d\'aquest dispositiu canviï cada vegada que es connecti a una xarxa amb l\'aleatorització d\'adreces MAC activada"</string>
<string name="wifi_metered_label" msgid="8737187690304098638">"D\'ús mesurat"</string>
<string name="wifi_unmetered_label" msgid="6174142840934095093">"D\'ús no mesurat"</string>
- <string name="select_logd_size_title" msgid="1604578195914595173">"Mides de la memòria intermèdia del registrador"</string>
+ <string name="select_logd_size_title" msgid="1604578195914595173">"Mides de la memòria intermèdia del registre"</string>
<string name="select_logd_size_dialog_title" msgid="2105401994681013578">"Selecciona la mida de la memòria intermèdia del registre"</string>
<string name="dev_logpersist_clear_warning_title" msgid="8631859265777337991">"Vols esborrar l\'emmagatzematge persistent del registrador?"</string>
<string name="dev_logpersist_clear_warning_message" msgid="6447590867594287413">"Quan deixem de supervisar amb el registrador persistent, hem d\'esborrar les dades del registrador que hi ha al teu dispositiu."</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacions de retrocés predictiu"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Activa animacions del sistema de retrocés predictiu"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Aquesta configuració activa animacions del sistema per a accions gestuals predictives. Requereix definir enableOnBackInvokedCallback com a \"true\" en cada aplicació al fitxer de manifest."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mou cap a l\'esquerra"</item>
- <item msgid="5425394847942513942">"Mou cap avall"</item>
- <item msgid="7728484337962740316">"Mou cap a la dreta"</item>
- <item msgid="324200556467459329">"Mou cap amunt"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"No s\'ha especificat"</string>
<string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 34e65e63c8e8..c4b49672372f 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Prediktivní animace gesta Zpět"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Povolit systémové animace prediktivního gesta Zpět"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Toto nastavení aktivuje systémové prediktivní animace gest. Vyžaduje, aby v souborech manifestu jednotlivých aplikací byl nastaven atribut enableOnBackInvokedCallback na hodnotu True."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Přesunout doleva"</item>
- <item msgid="5425394847942513942">"Přesunout dolů"</item>
- <item msgid="7728484337962740316">"Přesunout doprava"</item>
- <item msgid="324200556467459329">"Přesunout nahoru"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Neurčeno"</string>
<string name="neuter" msgid="2075249330106127310">"Střední rod"</string>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 381c3cc630ea..94852b4c983e 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Foreslåede animationer for Tilbage"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivér systemanimationer for foreslåede animationer for Tilbage."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Denne indstilling aktiverer systemanimationer for de foreslåede animationer for bevægelsen Tilbage. Dette forudsætter konfiguration af enableOnBackInvokedCallback som sand for hver app i manifestfilen."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Flyt til venstre"</item>
- <item msgid="5425394847942513942">"Flyt ned"</item>
- <item msgid="7728484337962740316">"Flyt til højre"</item>
- <item msgid="324200556467459329">"Flyt op"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Ikke angivet"</string>
<string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index b53d19181148..9d9a82a53d5b 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animationen für intelligente „Zurück“-Touch-Geste"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Du kannst Systemanimationen für die intelligente „Zurück“-Touch-Geste aktivieren."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Diese Einstellung aktiviert Systemanimationen für intelligente Touch-Gesten. Dazu muss in der Manifestdatei enableOnBackInvokedCallback auf App-Ebene auf „true“ gesetzt werden."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Nach links"</item>
- <item msgid="5425394847942513942">"Nach unten"</item>
- <item msgid="7728484337962740316">"Nach rechts"</item>
- <item msgid="324200556467459329">"Nach oben"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nicht angegeben"</string>
<string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index b4cc7aa2630e..d65f2562a445 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -585,7 +585,7 @@
<string name="user_grant_admin_message" msgid="1673791931033486709">"Οι διαχειριστές έχουν ειδικά προνόμια που δεν έχουν οι υπόλοιποι χρήστες Ένας διαχειριστής μπορεί να διαχειριστεί όλους τους χρήστες, να ενημερώσει ή να επαναφέρει αυτήν τη συσκευή, να τροποποιήσει τις ρυθμίσεις, να δει όλες τις εγκατεστημένες εφαρμογές και να εκχωρήσει ή να ανακαλέσει προνόμια διαχειριστή άλλων χρηστών."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Εκχώρηση δικαιωμάτων διαχειριστή"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"Να γίνει ρύθμιση χρήστη τώρα;"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"Βεβαιωθείτε ότι ο χρήστης μπορεί να πάρει τη συσκευή και ρυθμίστε τον χώρο του"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"Βεβαιωθείτε ότι ο χρήστης μπορεί να πάρει τη συσκευή για τη ρύθμιση του χώρου του"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Να γίνει ρύθμιση προφίλ τώρα;"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"Ρύθμιση τώρα"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"Όχι τώρα"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Κινούμ. εικόνες μετάβασης προς τα πίσω με πρόβλεψη"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ενεργοποίηση κινούμενων εικόνων συστήματος για μετάβαση προς τα πίσω με πρόβλεψη."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Αυτή η ρύθμιση ενεργοποιεί τις κινούμενες εικόνες συστήματος για τις κινούμενες εικόνες κινήσεων με πρόβλεψη. Απαιτεί τη ρύθμιση της παραμέτρου enableOnBackInvokedCallback ως αληθούς σε κάθε εφαρμογή στο αρχείο μανιφέστου."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Μετακίνηση αριστερά"</item>
- <item msgid="5425394847942513942">"Μετακίνηση προς τα κάτω"</item>
- <item msgid="7728484337962740316">"Μετακίνηση δεξιά"</item>
- <item msgid="324200556467459329">"Μετακίνηση προς τα επάνω"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Δεν έχει καθοριστεί"</string>
<string name="neuter" msgid="2075249330106127310">"Ουδέτερο"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 9fd825bf4e7f..e35bc1931691 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Move left"</item>
- <item msgid="5425394847942513942">"Move down"</item>
- <item msgid="7728484337962740316">"Move right"</item>
- <item msgid="324200556467459329">"Move up"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
<string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 546e5d238f54..08bcb77bfe68 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Move left"</item>
- <item msgid="5425394847942513942">"Move down"</item>
- <item msgid="7728484337962740316">"Move right"</item>
- <item msgid="324200556467459329">"Move up"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
<string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 9fd825bf4e7f..e35bc1931691 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Move left"</item>
- <item msgid="5425394847942513942">"Move down"</item>
- <item msgid="7728484337962740316">"Move right"</item>
- <item msgid="324200556467459329">"Move up"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
<string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 9fd825bf4e7f..e35bc1931691 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Move left"</item>
- <item msgid="5425394847942513942">"Move down"</item>
- <item msgid="7728484337962740316">"Move right"</item>
- <item msgid="324200556467459329">"Move up"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
<string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index 8256cc953794..dba88d0fb167 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‏‎‎‎‏‏‎‎‏‏‏‏‏‎‎‏‏‏‏‎‎‎‏‎‎‏‎‎‎‏‏‏‎‎‏‎‏‎‏‏‎‎‎‏‎‎‎‏‏‎‎‎Predictive back animations‎‏‎‎‏‎"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‎‏‎‏‎‎‏‎‎‏‎‎‏‏‎‎‏‏‎‎‏‎‏‎‏‏‎‎‏‏‎‏‎‏‏‎‏‏‎‎‎‎‏‏‎‏‏‏‏‎‏‎‏‏‏‏‎‎‎‎‎‎Enable system animations for predictive back.‎‏‎‎‏‎"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‎‎‏‏‏‎‏‎‏‎‎‏‏‏‏‏‎‎‎‏‏‏‎‏‎‎‎‎‏‎‏‏‏‏‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‎‎This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file.‎‏‎‎‏‎"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‎‎‎‎‎‏‏‏‎‏‏‎‏‎‎‎‎‏‏‏‎‏‎‎‏‏‎‎‏‎‏‏‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‏‎‏‎Move left‎‏‎‎‏‎"</item>
- <item msgid="5425394847942513942">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‎‎‏‎‏‎‏‏‎‏‏‏‏‏‏‏‎‏‏‏‏‎‏‎‎‎‎‏‎‏‏‏‎‏‏‎‎‏‎‎‎‏‎‏‎‏‎‎‎‏‎‏‏‎‎Move down‎‏‎‎‏‎"</item>
- <item msgid="7728484337962740316">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‎‎‎‎‏‎‎‎‏‎‏‏‏‏‎‎‎‏‏‏‎‏‏‏‎‎‎‎‎‎‏‏‏‎‎‎‎‎‏‏‎‏‎‏‎‎‏‎‏‏‏‎‎‎Move right‎‏‎‎‏‎"</item>
- <item msgid="324200556467459329">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‎‏‏‎‎‎‎‎‎‏‏‏‏‎‎‎‎‏‏‏‎‏‎‎‎‎‏‎‏‎‏‎‎‎‎‎‎‎‏‎Move up‎‏‎‎‏‎"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‏‎‎‎‎‏‏‎‎‏‎‏‎‏‏‏‏‎‎‏‎‏‎‏‎‏‎‏‏‎‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="PERCENTAGE">%1$d</xliff:g>‎‏‎‎‏‏‏‎ %%‎‏‎‎‏‎"</string>
<string name="not_specified" msgid="5423502443185110328">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‎‎‎‏‎‎‎‎‏‎‎‏‏‎‏‎‏‏‏‏‎‎‏‎‏‏‎‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‏‏‎‏‎‎‏‏‏‎‎‎‎Not specified‎‏‎‎‏‎"</string>
<string name="neuter" msgid="2075249330106127310">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‎‏‎‎‎‏‎‎‎‏‎‏‎‏‎‎‎‏‎‏‎‏‎‏‎‏‏‏‏‏‎‏‎‎‏‏‏‏‎‎‏‏‏‎‎Neuter‎‏‎‎‏‎"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index ff9f7aeba4bf..79d3822b2e19 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animaciones de gesto predictivo"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Habilita animaciones del sistema para gestos de retroceso predictivos."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuración habilita las animaciones del sistema para la animación de gestos predictiva. Se requiere la configuración por app de enableOnBackInvokedCallback en verdadero en el archivo de manifiesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mover hacia la izquierda"</item>
- <item msgid="5425394847942513942">"Mover hacia abajo"</item>
- <item msgid="7728484337962740316">"Mover hacia la derecha"</item>
- <item msgid="324200556467459329">"Mover hacia arriba"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Sin especificar"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index abf60d8386ed..af03e18143c9 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -355,8 +355,8 @@
<string name="pointer_location_summary" msgid="957120116989798464">"Superpone los datos de las pulsaciones en la pantalla"</string>
<string name="show_touches" msgid="8437666942161289025">"Mostrar toques"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Muestra la ubicación de los toques en la pantalla"</string>
- <string name="show_key_presses" msgid="6360141722735900214">"Ver pulsación de teclas"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"Ver respuestas visuales al pulsar teclas físicas"</string>
+ <string name="show_key_presses" msgid="6360141722735900214">"Ver teclas pulsadas"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"Muestra respuestas visuales al pulsar teclas físicas"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Mostrar cambios de superficies"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Hace parpadear todas las superficies de la ventana cuando se actualizan"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"Ver actualizaciones de vista"</string>
@@ -580,7 +580,7 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"Perfil restringido"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"¿Añadir nuevo usuario?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"Puedes compartir este dispositivo si creas más usuarios. Cada uno tendrá su propio espacio y podrá personalizarlo con aplicaciones, un fondo de pantalla y mucho más. Los usuarios también pueden ajustar opciones del dispositivo, como la conexión Wi‑Fi, que afectan a todos los usuarios.\n\nCuando añadas un usuario, tendrá que configurar su espacio.\n\nCualquier usuario puede actualizar aplicaciones de todos los usuarios. Es posible que no se transfieran los servicios y opciones de accesibilidad al nuevo usuario."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"Al añadir un nuevo usuario, dicha persona debe configurar su espacio.\n\nCualquier usuario puede actualizar las aplicaciones del resto de usuarios."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"Al añadir un nuevo usuario, dicha persona debe configurar su espacio.\n\nCualquier usuario puede actualizar las aplicaciones del resto de los usuarios."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"¿Convertir a este usuario en administrador?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Los administradores tienen privilegios especiales que otros usuarios no tienen. Los administradores pueden gestionar todos los usuarios, actualizar o restablecer este dispositivo, modificar los ajustes, ver todas las aplicaciones instaladas y conceder o revocar privilegios de administrador a otros usuarios."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Convertir en administrador"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animaciones para acciones de retorno predictivas"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Habilita animaciones del sistema para acciones de retorno predictivas."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Este ajuste habilita animaciones del sistema para acciones gestuales predictivas. Exige definir el valor de enableOnBackInvokedCallback en \"verdadero\" para cada aplicación en el archivo de manifiesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Muévete hacia la izquierda"</item>
- <item msgid="5425394847942513942">"Muévete hacia abajo"</item>
- <item msgid="7728484337962740316">"Muévete hacia la derecha"</item>
- <item msgid="324200556467459329">"Muévete hacia arriba"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Sin especificar"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 4e70a53e4727..56e50f982a2a 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -585,7 +585,7 @@
<string name="user_grant_admin_message" msgid="1673791931033486709">"Administraatoritel on eriõigused, mida teistel kasutajatel pole. Administraator saab hallata kõiki kasutajaid, värskendada või lähtestada seda seadet, muuta seadeid, vaadata kõiki installitud rakendusi ja anda teistele kasutajatele administraatoriõigused või need eemaldada."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Määra administraatoriks"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"Kas seadistada kasutaja kohe?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"Veenduge, et isik saaks seadet kasutada ja oma ruumi seadistada"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"Veenduge, et isik saaks seadet kasutada ja oma ruumi seadistada."</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Kas soovite kohe profiili seadistada?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"Seadista kohe"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"Mitte praegu"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Tagasiliigutuse prognoosi animatsioon"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Lubage süsteemi animatsioonid, et näha prognoositud tagasiliigutusi."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"See seade võimaldab süsteemi animatsioonidel prognoosida tagasiliigutusi. See nõuab manifestifailis rakendusepõhise atribuudi enableOnBackInvokedCallback määramist tõeseks."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Liiguta vasakule"</item>
- <item msgid="5425394847942513942">"Liiguta alla"</item>
- <item msgid="7728484337962740316">"Liiguta paremale"</item>
- <item msgid="324200556467459329">"Liiguta üles"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Pole määratud"</string>
<string name="neuter" msgid="2075249330106127310">"Kesksugu"</string>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 8dd60071ad54..41a365186108 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Atzera egiteko keinuaren animazio-igarleak"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Gaitu atzera egiteko keinuaren sistemaren animazio-igarleak."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Atzera egiteko keinuaren sistemaren animazio-igarleak gaitzen ditu ezarpenak. enableOnBackInvokedCallback-ek egiazko gisa ezarrita egon behar du aplikazio bakoitzaren manifestu-fitxategian."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Eraman ezkerrera"</item>
- <item msgid="5425394847942513942">"Eraman behera"</item>
- <item msgid="7728484337962740316">"Eraman eskuinera"</item>
- <item msgid="324200556467459329">"Eraman gora"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
<string name="not_specified" msgid="5423502443185110328">"Zehaztugabea"</string>
<string name="neuter" msgid="2075249330106127310">"Neutroa"</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index beaaa3922557..838237863d7c 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -675,7 +675,7 @@
<string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"انتخاب طرح‌بندی صفحه‌کلید"</string>
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"پیش‌فرض"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"روشن کردن صفحه‌نمایش"</string>
- <string name="allow_turn_screen_on" msgid="6194845766392742639">"اعطای اجازه برای روشن کردن صفحه‌نمایش"</string>
+ <string name="allow_turn_screen_on" msgid="6194845766392742639">"اجازه روشن کردن صفحه‌نمایش"</string>
<string name="allow_turn_screen_on_description" msgid="43834403291575164">"به برنامه اجازه می‌دهد صفحه‌نمایش را روشن کند. اگر اجازه داده شود، ممکن است این برنامه در هر زمانی بدون هدف صریح شما صفحه‌نمایش را روشن کند."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"همه‌فرستی <xliff:g id="APP_NAME">%1$s</xliff:g> متوقف شود؟"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"اگر <xliff:g id="SWITCHAPP">%1$s</xliff:g> را همه‌فرستی کنید یا خروجی را تغییر دهید، همه‌فرستی کنونی متوقف خواهد شد"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"پویانمایی‌های اشاره برگشت پیش‌گویانه"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"پویانمایی‌های سیستم را برای اشاره برگشت پیش‌گویانه فعال کنید."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏این تنظیم پویانمایی‌های سیستم را برای پویانمایی اشاره برگشت پیش‌بینانه فعال می‌کند. این تنظیم مستلزم تنظیم شدن enableOnBackInvokedCallback مربوط به هر برنامه روی صحیح در فایل مانیفست است."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"انتقال به‌چپ"</item>
- <item msgid="5425394847942513942">"انتقال به‌پایین"</item>
- <item msgid="7728484337962740316">"انتقال به‌راست"</item>
- <item msgid="324200556467459329">"انتقال به‌بالا"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>٪"</string>
<string name="not_specified" msgid="5423502443185110328">"نامشخص"</string>
<string name="neuter" msgid="2075249330106127310">"خنثی"</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index ec1c1f1843dd..20ed75eb9dfa 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Takaisin siirtymisen ennakoivat animaatiot"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ota käyttöön takaisin siirtymisen ennakoivat järjestelmäanimaatiot"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Asetus ottaa järjestelmäanimaatiot käyttöön ennakoiville eleanimaatioille. Se edellyttää, että enableOnBackInvokedCallback-arvo on Tosi sovelluksen manifestitiedostossa."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Siirrä vasemmalle"</item>
- <item msgid="5425394847942513942">"Siirrä alas"</item>
- <item msgid="7728484337962740316">"Siirrä oikealle"</item>
- <item msgid="324200556467459329">"Siirrä ylös"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Ei määritetty"</string>
<string name="neuter" msgid="2075249330106127310">"Neutri"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index f48bfcb4eb75..3fdf3042a1dc 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -684,12 +684,6 @@
<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-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Déplacez vers la gauche"</item>
- <item msgid="5425394847942513942">"Déplacez vers le bas"</item>
- <item msgid="7728484337962740316">"Déplacez vers la droite"</item>
- <item msgid="324200556467459329">"Déplacez vers le haut"</item>
- </string-array>
<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 ca5edfe44227..7e99fa7ac12e 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -355,8 +355,8 @@
<string name="pointer_location_summary" msgid="957120116989798464">"Superposition à l\'écran indiquant l\'emplacement actuel du curseur"</string>
<string name="show_touches" msgid="8437666942161289025">"Indicateurs visuels"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Afficher un indicateur visuel là où l\'utilisateur appuie sur l\'écran"</string>
- <string name="show_key_presses" msgid="6360141722735900214">"Afficher appuis touche"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"Afficher retour visuel pour appuis de touches"</string>
+ <string name="show_key_presses" msgid="6360141722735900214">"Afficher les pressions sur les touches"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"Afficher un retour visuel des pressions sur les touches"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Mises à jour de la surface"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Faire clignoter les endroits où des mises à jour sont effectuées"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"Mises à jour de fenêtres"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animations pour prévisualisation du Retour"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Activer les animations système pour la prévisualisation du Retour"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ce paramètre active les animations système pour la prévisualisation du geste de retour. Pour cela, enableOnBackInvokedCallback doit être défini sur \"True\" dans le fichier manifeste de chaque appli."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Déplacer vers la gauche"</item>
- <item msgid="5425394847942513942">"Déplacer vers le bas"</item>
- <item msgid="7728484337962740316">"Déplacer vers la droite"</item>
- <item msgid="324200556467459329">"Déplacer vers le haut"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Non défini"</string>
<string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 61b01f63e687..8132a87f39f4 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacións de retroceso preditivo"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Activa as animacións do sistema para o retroceso preditivo."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta opción de configuración activa as animacións xestuais preditivas. É preciso definir enableOnBackInvokedCallback como True (verdadeiro) para cada aplicación no ficheiro de manifesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mover cara á esquerda"</item>
- <item msgid="5425394847942513942">"Mover cara abaixo"</item>
- <item msgid="7728484337962740316">"Mover cara á dereita"</item>
- <item msgid="324200556467459329">"Mover cara arriba"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Sen especificar"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 981cf57d734e..239b04d3e944 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"પાછળના પૂર્વાનુમાનિત ઍનિમેશન્સ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"પાછળના પૂર્વાનુમાનિત સંકેત માટે સિસ્ટમ ઍનિમેશન ચાલુ કરો."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"આ સેટિંગ પૂર્વાનુમાનિત સંકેત ઍનિમેશન માટે સિસ્ટમ ઍનિમેશન ચાલુ કરે છે. તેના માટે દરેક ઍપ માટે મેનિફેસ્ટ ફાઇલમાં enableOnBackInvokedCallbackને true પર સેટ કરવાની જરૂર પડે છે."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ડાબે ખસેડો"</item>
- <item msgid="5425394847942513942">"નીચે ખસેડો"</item>
- <item msgid="7728484337962740316">"જમણે ખસેડો"</item>
- <item msgid="324200556467459329">"ઉપર ખસેડો"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ઉલ્લેખિત નથી"</string>
<string name="neuter" msgid="2075249330106127310">"નાન્યતર"</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 9be1cd68b789..06ddcd9f4c72 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -214,7 +214,7 @@
</string-array>
<string name="choose_profile" msgid="343803890897657450">"प्रोफ़ाइल चुनें"</string>
<string name="category_personal" msgid="6236798763159385225">"निजी"</string>
- <string name="category_work" msgid="4014193632325996115">"वर्क ऐप्लिकेशन"</string>
+ <string name="category_work" msgid="4014193632325996115">"वर्क"</string>
<string name="category_clone" msgid="1554511758987195974">"क्लोन"</string>
<string name="development_settings_title" msgid="140296922921597393">"डेवलपर के लिए सेटिंग और टूल"</string>
<string name="development_settings_enable" msgid="4285094651288242183">"डेवलपर के लिए सेटिंग और टूल चालू करें"</string>
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"टैप दिखाएं"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"टैप के लिए विज़ुअल फ़ीडबैक दिखाएं"</string>
<string name="show_key_presses" msgid="6360141722735900214">"दबाए गए बटन दिखाएं"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"दबाए गए बटन के लिए विज़ुअल फ़ीडबैक दिखाएं"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"दबाए गए बटन का विज़ुअल फ़ीडबैक दिखाएं"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"सर्फ़ेस अपडेट दिखाएं"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"अपडेट होने पर पूरे विंडो सर्फ़ेस फ़्लैश करें"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"जीपीयू व्यू के अपडेट दिखाएं"</string>
@@ -584,10 +584,10 @@
<string name="user_grant_admin_title" msgid="5157031020083343984">"क्या इस व्यक्ति को एडमिन बनाना है?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"एडमिन के पास अन्य लोगों के मुकाबले खास अधिकार होते हैं. एडमिन के पास ये अधिकार होते हैं: सभी लोगों को मैनेज करना, इस डिवाइस को अपडेट या रीसेट करना, सेटिंग में बदलाव करना, इंस्टॉल किए गए सभी ऐप्लिकेशन देखना, और अन्य लोगों को एडमिन के खास अधिकार देना या उन्हें वापस लेना."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"एडमिन बनाएं"</string>
- <string name="user_setup_dialog_title" msgid="8037342066381939995">"उपयोगकर्ता को अभी सेट करें?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"पक्का करें कि व्यक्ति डिवाइस का इस्तेमाल करने और अपनी जगह सेट करने के लिए मौजूद है"</string>
+ <string name="user_setup_dialog_title" msgid="8037342066381939995">"उपयोगकर्ता खाता सेटअप करना है?"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"पक्का करें कि उपयोगकर्ता, डिवाइस पर अपने खाते को पसंद के हिसाब से सेट अप करने के लिए मौजूद हो"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"प्रोफ़ाइल अभी सेट करें?"</string>
- <string name="user_setup_button_setup_now" msgid="1708269547187760639">"अभी सेट करें"</string>
+ <string name="user_setup_button_setup_now" msgid="1708269547187760639">"अभी सेट अप करें"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"रद्द करें"</string>
<string name="user_add_user_type_title" msgid="551279664052914497">"जोड़ें"</string>
<string name="user_new_user_name" msgid="60979820612818840">"नया उपयोगकर्ता"</string>
@@ -674,7 +674,7 @@
<string name="physical_keyboard_title" msgid="4811935435315835220">"फ़िज़िकल कीबोर्ड"</string>
<string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"कीबोर्ड का लेआउट चुनें"</string>
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"डिफ़ॉल्ट"</string>
- <string name="turn_screen_on_title" msgid="3266937298097573424">"स्क्रीन चालू करें"</string>
+ <string name="turn_screen_on_title" msgid="3266937298097573424">"स्क्रीन चालू करने की अनुमति"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"स्क्रीन चालू करने की अनुमति दें"</string>
<string name="allow_turn_screen_on_description" msgid="43834403291575164">"ऐप्लिकेशन को स्क्रीन चालू करने की अनुमति दें. ऐसा करने पर, ऐप्लिकेशन आपकी अनुमति लिए बिना भी, जब चाहे स्क्रीन चालू कर सकता है."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> पर ब्रॉडकास्ट करना रोकें?"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"पीछे जाने पर झलक दिखाने वाले जेस्चर का ऐनिमेशन"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"पीछे जाने पर झलक दिखाने वाले हाथ के जेस्चर के लिए सिस्टम ऐनिमेशन चालू करें."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"यह सेटिंग, सिस्टम के ऐनिमेशन को प्रिडिक्टिव जेस्चर ऐनिमेशन के लिए चालू कर देती है. मेनिफ़ेस्ट फ़ाइल में enableOnBackInvokedCallback की सेटिंग को हर ऐप्लिकेशन के हिसाब से \'सही\' पर सेट होना चाहिए."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"बाईं ओर ले जाएं"</item>
- <item msgid="5425394847942513942">"नीचे ले जाएं"</item>
- <item msgid="7728484337962740316">"दाईं ओर ले जाएं"</item>
- <item msgid="324200556467459329">"ऊपर की ओर ले जाएं"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"जानकारी नहीं दी गई"</string>
<string name="neuter" msgid="2075249330106127310">"नपुंसक लिंग"</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 8a0114a0d636..c5bea2761ed6 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacije za pokret povratka s pregledom"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućuje animaciju kad korisnik napravi povratnu kretnju."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ova postavka omogućuje animacije sustava za animaciju pokreta s predviđanjem. Zahtijeva postavljanje dopuštenja enableOnBackInvokedCallback po aplikaciji na True u datoteci manifesta."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Pomicanje ulijevo"</item>
- <item msgid="5425394847942513942">"Pomicanje prema dolje"</item>
- <item msgid="7728484337962740316">"Pomicanje udesno"</item>
- <item msgid="324200556467459329">"Pomicanje prema gore"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
<string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index b5e1e01587b5..e43ed439a8d3 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Prediktív „vissza” kézmozdulat-animációk"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Rendszeranimációk engedélyezése prediktív „vissza” kézmozdulatok esetén."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"A beállítás engedélyezi a rendszeranimációkat a prediktív kézmozdulat-animációk esetén. A használatukhoz az enableOnBackInvokedCallback beállítást true értékre kell állítani az egyes alkalmazások manifestfájljaiban."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mozgatás balra"</item>
- <item msgid="5425394847942513942">"Mozgatás lefelé"</item>
- <item msgid="7728484337962740316">"Mozgatás jobbra"</item>
- <item msgid="324200556467459329">"Mozgatás felfelé"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nincs megadva"</string>
<string name="neuter" msgid="2075249330106127310">"Semleges nemű alak"</string>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index 9808f709fdcb..b8f94f48285b 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"«Հետ» ժեստի հուշման շարժանկարներ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Միացնել համակարգի անիմացիաները «Հետ» ժեստի հուշման համար"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Այս կարգավորման միջոցով կարելի է միացնել համակարգային շարժանկարները ժեստի հուշման համար։ Կարգավորումը պահանջում է մանիֆեստի ֆայլում սահմանել true արժեքը per-app enableOnBackInvokedCallback հատկության համար։"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Տեղափոխել ձախ"</item>
- <item msgid="5425394847942513942">"Տեղափոխել ներքև"</item>
- <item msgid="7728484337962740316">"Տեղափոխել աջ"</item>
- <item msgid="324200556467459329">"Տեղափոխել վերև"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Նշված չէ"</string>
<string name="neuter" msgid="2075249330106127310">"Չեզոք"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 7d70b88844ba..f867ba58dcdc 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -598,7 +598,7 @@
<string name="user_set_lock_button" msgid="1427128184982594856">"Setel kunci"</string>
<string name="user_switch_to_user" msgid="6975428297154968543">"Beralih ke <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="creating_new_user_dialog_message" msgid="7232880257538970375">"Membuat pengguna baru …"</string>
- <string name="creating_new_guest_dialog_message" msgid="1114905602181350690">"Membuat tamu baru …"</string>
+ <string name="creating_new_guest_dialog_message" msgid="1114905602181350690">"Membuat tamu baru…"</string>
<string name="add_user_failed" msgid="4809887794313944872">"Gagal membuat pengguna baru"</string>
<string name="add_guest_failed" msgid="8074548434469843443">"Gagal membuat tamu baru"</string>
<string name="user_nickname" msgid="262624187455825083">"Nama panggilan"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animasi kembali prediktif"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktifkan animasi sistem untuk kembali prediktif."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Setelan ini mengaktifkan animasi sistem untuk animasi gestur prediktif. Setelan ini mewajibkan enableOnBackInvokedCallback per-aplikasi disetel ke benar (true) dalam file manifes."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Pindahkan ke kiri"</item>
- <item msgid="5425394847942513942">"Pindahkan ke bawah"</item>
- <item msgid="7728484337962740316">"Pindahkan ke kanan"</item>
- <item msgid="324200556467459329">"Pindahkan ke atas"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Tidak ditentukan"</string>
<string name="neuter" msgid="2075249330106127310">"Netral"</string>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 650f76d990f4..aa9d8f82f43a 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Hreyfimyndir flýtiritunar við bendinguna „til baka“"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Kveikja á hreyfimyndum í kerfinu til að sýna hreyfimyndir þegar bendingin „til baka“ er gerð."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Þessi stilling kveikir á hreyfimyndum í kerfinu til að sýna hreyfimyndir flýtiritunar með bendingum. Stillingin krefst þess að kveikt sé á enableOnBackInvokedCallback í upplýsingaskránni fyrir hvert forrit."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Færa til vinstri"</item>
- <item msgid="5425394847942513942">"Færa niður"</item>
- <item msgid="7728484337962740316">"Færa til hægri"</item>
- <item msgid="324200556467459329">"Færa upp"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Ekki gefið upp"</string>
<string name="neuter" msgid="2075249330106127310">"Kynsegin"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index d783bf1b4e71..1f35f74a9c41 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animazioni predittive per Indietro"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Attiva le animazioni di sistema per il gesto Indietro predittivo."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Questa impostazione attiva le animazioni di sistema per il gesto Indietro predittivo. Richiede di impostare il metodo enableOnBackInvokedCallback su true nel file manifest di tutte le app."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Sposta a sinistra"</item>
- <item msgid="5425394847942513942">"Sposta in basso"</item>
- <item msgid="7728484337962740316">"Sposta a destra"</item>
- <item msgid="324200556467459329">"Sposta in alto"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Non specificato"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fc83630c30cb..f0a19d414f3e 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"חיזוי אנימציה של תנועת החזרה"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"הפעלת אנימציות מערכת עבור חיזוי של תנועת החזרה."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏ההגדרה הזו מפעילה אנימציות מערכת עבור חיזוי אנימציה של תנועת החזרה. היא מחייבת הגדרה בכל אפליקציה של ערך true בשדה enableOnBackInvokedCallback בקובץ המניפסט."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"הזזה שמאלה"</item>
- <item msgid="5425394847942513942">"הזזה למטה"</item>
- <item msgid="7728484337962740316">"הזזה ימינה"</item>
- <item msgid="324200556467459329">"הזזה למעלה"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
<string name="not_specified" msgid="5423502443185110328">"לא רוצה להגדיר"</string>
<string name="neuter" msgid="2075249330106127310">"ניטרלי"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 3f090830de40..36c11cd8c431 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"タップを表示"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"タップを視覚表示する"</string>
<string name="show_key_presses" msgid="6360141722735900214">"キーの押下を表示"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"物理キーの押下に関する視覚的フィードバックを表示"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"物理キーが押下されたことを視覚的に表示"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"表示面の更新を通知"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"更新時にウィンドウの表示面全体を点滅させる"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"画面の更新を表示"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"予測型「戻る」アニメーション"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"予測型「戻る」のシステム アニメーションを有効にする。"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"この設定は、予測型操作のシステム アニメーションを有効にします。アプリごとにマニフェスト ファイルで enableOnBackInvokedCallback を true に設定する必要があります。"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"左に移動"</item>
- <item msgid="5425394847942513942">"下に移動"</item>
- <item msgid="7728484337962740316">"右に移動"</item>
- <item msgid="324200556467459329">"上に移動"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"指定しない"</string>
<string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index ed7c8d7cd207..f516cf29d222 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"უკან დაბრუნების ანიმაციის პროგნოზირება"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"უკან დაბრუნების პროგნოზირებადი ანიმაციისთვის სისტემის ანიმაციების ჩართვა."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ეს პარამეტრი ჩართავს სისტემის ანიმაციებს ჟესტების პროგნოზირებადი ანიმაციებისთვის. საჭიროა, რომ აღწერის ფაილში აპის enableOnBackInvokedCallback პარამეტრი იყოს ჭეშმარიტი."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"მარცხნივ გადატანა"</item>
- <item msgid="5425394847942513942">"ქვემოთ გადატანა"</item>
- <item msgid="7728484337962740316">"მარჯვნივ გადატანა"</item>
- <item msgid="324200556467459329">"ზემოთ გადატანა"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"არ არის მითითებული"</string>
<string name="neuter" msgid="2075249330106127310">"საშუალო"</string>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 982000f68852..36ee23abb15d 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"\"Артқа\" қимылына арналған тұспал анимациясы"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"\"Артқа\" қимылына арналған жүйелік тұспал анимацияларын іске қосу."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Бұл параметр қимылға арналған жүйелік тұспал анимацияларын іске қосады. Ол үшін әр қолданбаның манифест файлында enableOnBackInvokedCallback үшін \"True\" мәні қойылуы керек."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Солға жылжыту"</item>
- <item msgid="5425394847942513942">"Төмен жылжыту"</item>
- <item msgid="7728484337962740316">"Оңға жылжыту"</item>
- <item msgid="324200556467459329">"Жоғары жылжыту"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Көрсетілмеген"</string>
<string name="neuter" msgid="2075249330106127310">"Орта тек"</string>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 26bb1e27661c..75c0f6a81c2f 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"បង្ហាញការចុច"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"បង្ហាញដានចុច នៅពេលចុច"</string>
<string name="show_key_presses" msgid="6360141722735900214">"បង្ហាញការចុចគ្រាប់ចុច"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"បង្ហាញព័ត៌មានឆ្លើយតបជារូបភាពសម្រាប់ការចុចគ្រាប់ចុចរូបវន្ត"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"បង្ហាញរូបភាពប្រតិកម្មសម្រាប់ការចុចគ្រាប់ចុចរូបវន្ត"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"បង្ហាញ​បច្ចុប្បន្នភាព​ផ្ទៃ"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"ផ្ទៃ​វីនដូទាំង​មូល​បញ្ចេញពន្លឺ​នៅពេល​ធ្វើ​បច្ចុប្បន្នភាព"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"បង្ហាញ​បច្ចុប្បន្នភាពទិដ្ឋភាព"</string>
@@ -585,7 +585,7 @@
<string name="user_grant_admin_message" msgid="1673791931033486709">"អ្នកគ្រប់គ្រងមានសិទ្ធិពិសេសដែលអ្នកប្រើប្រាស់ផ្សេងទៀតមិនមាន។ អ្នកគ្រប់គ្រងអាចគ្រប់គ្រងអ្នកប្រើប្រាស់ទាំងអស់ ធ្វើបច្ចុប្បន្នភាពឬកំណត់ឧបករណ៍នេះឡើងវិញ កែសម្រួលការកំណត់ មើលកម្មវិធីដែលបានដំឡើងទាំងអស់ និងផ្ដល់ឬដកសិទ្ធិជាអ្នកគ្រប់គ្រងសម្រាប់អ្នកផ្សេងទៀត។"</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"ផ្ដល់សិទ្ធិជាអ្នកគ្រប់គ្រង"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"រៀបចំ​អ្នក​ប្រើ​ប្រាស់ឥឡូវនេះ?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"សូម​ប្រាកដ​ថា​​អ្នក​ប្រើ​ប្រាស់នេះ​អាច​យក​​ឧបករណ៍ ​និង​រៀបចំ​​ទំហំ​ផ្ទុករបស់​គេបាន"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"សូម​ប្រាកដ​ថា​​អ្នក​ប្រើ​ប្រាស់នេះ​អាច​យក​​ឧបករណ៍ ​និង​រៀបចំ​​ទំហំ​ផ្ទុករបស់​គាត់បាន"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"រៀបចំ​ប្រវត្តិរូប​ឥឡូវ?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"រៀបចំ​ឥឡូវ"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"កុំទាន់"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ចលនា​ថយក្រោយ​ដែល​ព្យាករ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"បើក​ចលនា​ប្រព័ន្ធ​សម្រាប់​ការ​ថយក្រោយ​ព្យាករ។"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ការ​កំណត់នេះ​បើក​ចលនា​ប្រព័ន្ធ​សម្រាប់​ចលនាព្យាករ។ ចលនា​នេះ​ទាមទារ​ការ​កំណត់ enableOnBackInvokedCallback នៅ​ក្នុងកម្មវិធី​ទៅពិត​នៅ​ក្នុង​ឯកសារ​មេនីហ្វេសថ៍។"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ផ្លាស់ទី​ទៅ​ឆ្វេង"</item>
- <item msgid="5425394847942513942">"ផ្លាស់ទី​ចុះ​ក្រោម"</item>
- <item msgid="7728484337962740316">"ផ្លាស់ទីទៅ​ស្តាំ"</item>
- <item msgid="324200556467459329">"ផ្លាស់ទី​ឡើង​លើ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"មិនបានបញ្ជាក់"</string>
<string name="neuter" msgid="2075249330106127310">"អភេទ"</string>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 5a09396480e7..94df4192aa88 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -579,7 +579,7 @@
<string name="user_add_user_item_title" msgid="2394272381086965029">"ಬಳಕೆದಾರ"</string>
<string name="user_add_profile_item_title" msgid="3111051717414643029">"ನಿರ್ಬಂಧಿಸಿದ ಪ್ರೊಫೈಲ್"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಬೇಕೆ?"</string>
- <string name="user_add_user_message_long" msgid="1527434966294733380">"ನೀವು ಹೆಚ್ಚುವರಿ ಬಳಕೆದಾರರನ್ನು ರಚಿಸುವ ಮೂಲಕ ಇತರ ಜನರ ಜೊತೆಗೆ ಈ ಸಾಧನವನ್ನು ಹಂಚಿಕೊಳ್ಳಬಹುದು. ಪ್ರತಿ ಬಳಕೆದಾರರು ತಮ್ಮದೇ ಸ್ಥಳವನ್ನು ಹೊಂದಿರುತ್ತಾರೆ, ಇದರಲ್ಲಿ ಅವರು ತಮ್ಮದೇ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ವಾಲ್‌ಪೇಪರ್ ಮತ್ತು ಮುಂತಾದವುಗಳ ಮೂಲಕ ಕಸ್ಟಮೈಸ್ ಮಾಡಿಕೊಳ್ಳಬಹುದು. ಎಲ್ಲರ ಮೇಲೂ ಪರಿಣಾಮ ಬೀರುವಂತೆ ವೈ-ಫೈ ರೀತಿಯ ಸಾಧನ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಕೆದಾರರು ಸರಿಹೊಂದಿಸಬಹುದು.\n\nನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗೆ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಮತ್ತು ಸೇವೆಗಳು ಹೊಸ ಬಳಕೆದಾರರಿಗೆ ವರ್ಗಾವಣೆ ಆಗದಿರಬಹುದು."</string>
+ <string name="user_add_user_message_long" msgid="1527434966294733380">"ನೀವು ಹೆಚ್ಚುವರಿ ಬಳಕೆದಾರರನ್ನು ರಚಿಸುವ ಮೂಲಕ ಇತರ ಜನರ ಜೊತೆಗೆ ಈ ಸಾಧನವನ್ನು ಹಂಚಿಕೊಳ್ಳಬಹುದು. ಪ್ರತಿ ಬಳಕೆದಾರರು ತಮ್ಮದೇ ಸ್ಥಳವನ್ನು ಹೊಂದಿರುತ್ತಾರೆ, ಇದರಲ್ಲಿ ಅವರು ತಮ್ಮದೇ ಆ್ಯಪ್‌ಗಳು, ವಾಲ್‌ಪೇಪರ್ ಮತ್ತು ಮುಂತಾದವುಗಳ ಮೂಲಕ ಕಸ್ಟಮೈಸ್ ಮಾಡಿಕೊಳ್ಳಬಹುದು. ಎಲ್ಲರ ಮೇಲೂ ಪರಿಣಾಮ ಬೀರುವಂತೆ ವೈ-ಫೈ ರೀತಿಯ ಸಾಧನ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಕೆದಾರರು ಸರಿಹೊಂದಿಸಬಹುದು.\n\nನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗೆ ಆ್ಯಪ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಮತ್ತು ಸೇವೆಗಳು ಹೊಸ ಬಳಕೆದಾರರಿಗೆ ವರ್ಗಾವಣೆ ಆಗದಿರಬಹುದು."</string>
<string name="user_add_user_message_short" msgid="3295959985795716166">"ನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗಾಗಿ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"ಈ ಬಳಕೆದಾರರನ್ನು ನಿರ್ವಾಹಕರನ್ನಾಗಿ ಮಾಡಬೇಕೆ?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"ನಿರ್ವಾಹಕರು ಇತರ ಬಳಕೆದಾರರಿಗೆ ಇಲ್ಲದ ವಿಶೇಷ ಸೌಲಭ್ಯಗಳನ್ನು ಹೊಂದಿದ್ದಾರೆ. ನಿರ್ವಾಹಕರು ಎಲ್ಲಾ ಬಳಕೆದಾರರನ್ನು ನಿರ್ವಹಿಸಬಹುದು, ಈ ಸಾಧನವನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು ಅಥವಾ ರೀಸೆಟ್ ಮಾಡಬಹುದು, ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಹೊಂದಿಸಬಹುದು, ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಲಾದ ಎಲ್ಲಾ ಆ್ಯಪ್‌ಗಳನ್ನು ವೀಕ್ಷಿಸಬಹುದು ಮತ್ತು ಇತರರಿಗೆ ನಿರ್ವಾಹಕರಿಗೆ ನೀಡಿರುವ ಸೌಲಭ್ಯಗಳನ್ನು ನೀಡಬಹುದು ಅಥವಾ ಹಿಂತೆಗೆದುಕೊಳ್ಳಬಹುದು."</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ಮುನ್ಸೂಚಕ ಬ್ಯಾಕ್ ಆ್ಯನಿಮೇಶನ್‌ಗಳು"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ಮುನ್ಸೂಚಕ ಬ್ಯಾಕ್ ಗೆಸ್ಚರ್‌ಗಾಗಿ ಸಿಸ್ಟಂ ಆ್ಯನಿಮೇಶನ್‌ಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ಮುನ್ನೋಟದ ಗೆಸ್ಚರ್ ಆ್ಯನಿಮೇಶನ್‌ಗಾಗಿ ಸಿಸ್ಟಂ ಆ್ಯನಿಮೇಶನ್‌ಗಳನ್ನು ಈ ಸೆಟ್ಟಿಂಗ್ ಸಕ್ರಿಯಗೊಳಿಸುತ್ತವೆ. ಇದನ್ನು ಮಾಡಲು, ಪ್ರತಿ ಆ್ಯಪ್‌ನ ಮ್ಯಾನಿಫೆಸ್ಟ್ ಫೈಲ್‌ನಲ್ಲಿರುವ enableOnBackInvokedCallback ಪ್ಯಾರಾಮೀಟರ್ ಅನ್ನು ಸರಿ ಎಂದು ಹೊಂದಿಸಬೇಕು."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ಎಡಕ್ಕೆ ಸರಿಸಿ"</item>
- <item msgid="5425394847942513942">"ಕೆಳಕ್ಕೆ ಸರಿಸಿ"</item>
- <item msgid="7728484337962740316">"ಬಲಕ್ಕೆ ಸರಿಸಿ"</item>
- <item msgid="324200556467459329">"ಮೇಲಕ್ಕೆ ಸರಿಸಿ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ನಿರ್ದಿಷ್ಟಪಡಿಸಲಾಗಿಲ್ಲ"</string>
<string name="neuter" msgid="2075249330106127310">"ನಪುಂಸಕ"</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 1c5fd76ad7b6..db215dda4245 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -580,7 +580,7 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"제한된 프로필"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"신규 사용자를 추가할까요?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"추가 사용자를 만들어 다른 사용자와 기기를 공유할 수 있습니다. 각 사용자는 앱, 배경화면 등으로 맞춤설정할 수 있는 자신만의 공간을 갖게 됩니다. 또한 모든 사용자에게 영향을 미치는 Wi‑Fi와 같은 기기 설정도 조정할 수 있습니다.\n\n추가된 신규 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자가 앱을 업데이트할 수 있으며, 업데이트는 다른 사용자에게도 적용됩니다. 접근성 설정 및 서비스는 신규 사용자에게 이전되지 않을 수도 있습니다."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"추가된 새로운 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자는 다른 사용자들을 위하여 앱을 업데이트할 수 있습니다."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"추가된 신규 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자가 앱을 업데이트할 수 있으며, 업데이트는 다른 사용자에게도 적용됩니다."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"이 사용자에게 관리자 권한을 부여하시겠습니까?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"관리자는 다른 사용자가 가지지 못한 특별한 권한을 보유합니다. 관리자는 모든 사용자를 관리하고, 기기를 업데이트하거나 재설정하고, 설정을 변경하고, 설치된 모든 앱을 확인하고, 다른 사용자에게 관리자 권한을 부여하거나 취소할 수 있습니다."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"관리자 권한 부여"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"예측된 뒤로 동작 애니메이션"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"예측된 뒤로 동작에 시스템 애니메이션을 사용하도록 설정합니다."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"이 설정은 예측된 동작 애니메이션에 시스템 애니메이션을 사용하도록 합니다. 매니페스트 파일에서 앱별 enableOnBackInvokedCallback을 True로 설정해야 합니다."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"왼쪽으로 이동"</item>
- <item msgid="5425394847942513942">"아래로 이동"</item>
- <item msgid="7728484337962740316">"오른쪽으로 이동"</item>
- <item msgid="324200556467459329">"위로 이동"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"지정되지 않음"</string>
<string name="neuter" msgid="2075249330106127310">"중성"</string>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 4ad4306286bd..3f6874f1f00a 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -351,10 +351,10 @@
<string name="debug_monitoring_category" msgid="1597387133765424994">"Мониторинг"</string>
<string name="strict_mode" msgid="889864762140862437">"Катаал режим иштетилди"</string>
<string name="strict_mode_summary" msgid="1838248687233554654">"Узак операцияларда экран күйүп-өчүп турат"</string>
- <string name="pointer_location" msgid="7516929526199520173">"Көрсөткүчтүн жайгшкн жери"</string>
+ <string name="pointer_location" msgid="7516929526199520173">"Көрсөткүчтүн турган жери"</string>
<string name="pointer_location_summary" msgid="957120116989798464">"Басылган жерлер жана жаңсоолор экранда көрүнүп турат"</string>
<string name="show_touches" msgid="8437666942161289025">"Басылган жерлерди көрсөтүү"</string>
- <string name="show_touches_summary" msgid="3692861665994502193">"Экранда басылган жерлер көрүнүп турат"</string>
+ <string name="show_touches_summary" msgid="3692861665994502193">"Экрандын басылган жерлери көрүнүп турат"</string>
<string name="show_key_presses" msgid="6360141722735900214">"Баскычтардын басылганын көрсөтүү"</string>
<string name="show_key_presses_summary" msgid="725387457373015024">"Баскычтар басылганда визуалдык сигнал көрүнөт"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Экран жаңыруусун көрсөтүү"</string>
@@ -584,8 +584,8 @@
<string name="user_grant_admin_title" msgid="5157031020083343984">"Бул колдонуучуну админ кыласызбы?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Админдердин өзгөчө укуктары бар. Админ бардык колдонуучуларды тескеп, бул түзмөктү жаңыртып же баштапкы абалга келтирип, параметрлерди өзгөртүп, орнотулган колдонмолордун баарын көрүп, башкаларга админ укуктарын берип же жокко чыгара алат."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Админ кылуу"</string>
- <string name="user_setup_dialog_title" msgid="8037342066381939995">"Профилди жөндөйсүзбү?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"Өз мейкиндигин жөндөп алышы үчүн, түзмөктү колдонуучуга беришиңиз керек."</string>
+ <string name="user_setup_dialog_title" msgid="8037342066381939995">"Профиль түзөсүзбү?"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"Колдонуучу өз мейкиндигин түзүп алышы үчүн түзмөктү ага беришиңиз керек."</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Профайл азыр түзүлсүнбү?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"Азыр түзүү"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"Азыр эмес"</string>
@@ -676,7 +676,7 @@
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"Демейки"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"Экранды күйгүзүү"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"Экранды күйгүзүүгө уруксат берүү"</string>
- <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Колдонмого экранды күйгүзүүгө уруксат бериңиз. Уруксат берилсе, колдонмо экранды каалаган убакта сизден уруксат сурабастан күйгүзүшү мүмкүн."</string>
+ <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Колдонмого экранды күйгүзүүгө уруксат бересиз. Колдонмо экранды каалаган убакта сизден уруксат сурабастан күйгүзө берет."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосунда кабарлоо токтотулсунбу?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Эгер <xliff:g id="SWITCHAPP">%1$s</xliff:g> колдонмосунда кабарласаңыз же аудионун чыгуусун өзгөртсөңүз, учурдагы кабарлоо токтотулат"</string>
<string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> колдонмосунда кабарлоо"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Божомолдонгон анимациялар"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Божомолдоп билүү үчүн системанын анимацияларын иштетиңиз."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Бул параметр жаңсоо анимациясын божомолдоп билүү үчүн системанын анимацияларын иштетет. Ал үчүн манифест файлындагы enableOnBackInvokedCallback параметри ар бир колдонмо үчүн \"true\" деп коюлушу керек."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Солго жылдыруу"</item>
- <item msgid="5425394847942513942">"Төмөн жылдыруу"</item>
- <item msgid="7728484337962740316">"Оңго жылдыруу"</item>
- <item msgid="324200556467459329">"Жогору жылдыруу"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Көрсөтүлгөн эмес"</string>
<string name="neuter" msgid="2075249330106127310">"Орто жак"</string>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index fe8b4db7db09..fc82a9be57e0 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"ສະແດງການແຕະ"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"ສະແດງຄໍາຕິຊົມທາງຮູບພາບສຳລັບການແຕະ"</string>
<string name="show_key_presses" msgid="6360141722735900214">"ສະແດງການກົດປຸ່ມ"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"ສະແດງຄຳຕິຊົມພາບສຳລັບການກົດປຸ່ມຈິງ"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"ສະແດງການຕອບສະໜອງທີ່ເປັນພາບສຳລັບການກົດປຸ່ມຈິງ"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"ສະແດງການອັບເດດພື້ນຜິວ"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"ກະພິບໜ້າຈໍທັງໜ້າເມື່ອມີການອັບເດດ"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"ສະແດງອັບເດດມຸມມອງ"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ອະນິເມຊັນກັບຫຼັງແບບຄາດເດົາ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ເປີດການນຳໃຊ້ອະນິເມຊັນລະບົບສຳລັບການກັບຫຼັງແບບຄາດເດົາ."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ການຕັ້ງຄ່ານີ້ຈະເປີດການນຳໃຊ້ອະນິເມຊັນລະບົບສຳລັບອະນິເມຊັນທ່າທາງແບບຄາດເດົາ. ມັນຕ້ອງໃຊ້ການຕັ້ງຄ່າຕໍ່ແອັບ enableOnBackInvokedCallback ເປັນ true ໃນໄຟລ໌ manifest."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ຍ້າຍໄປຊ້າຍ"</item>
- <item msgid="5425394847942513942">"ຍ້າຍລົງ"</item>
- <item msgid="7728484337962740316">"ຍ້າຍໄປຂວາ"</item>
- <item msgid="324200556467459329">"ຍ້າຍຂຶ້ນ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ບໍ່ໄດ້ລະບຸ"</string>
<string name="neuter" msgid="2075249330106127310">"ບໍ່ມີເພດ"</string>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index e4546e1db323..bc4630dc7f80 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Numatomos grįžimo atgal gestų animacijos"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Įgalinkite sistemos animacijas, kad būtų galima naudoti numatomus grįžimo atgal gestus."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Šis nustatymas įgalina numatomų grįžimo atgal gestų sistemos animacijas. Aprašo faile programos lauką „enableOnBackInvokedCallback“ reikia nustatyti į vertę „true“."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Perkelti kairėn"</item>
- <item msgid="5425394847942513942">"Perkelti žemyn"</item>
- <item msgid="7728484337962740316">"Perkelti dešinėn"</item>
- <item msgid="324200556467459329">"Perkelti aukštyn"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nenurodyta"</string>
<string name="neuter" msgid="2075249330106127310">"Bevardė giminė"</string>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index e9410a20ba5a..133520be1498 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animāciju prognozēšana pāriešanai atpakaļ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Iespējot sistēmas animācijas prognozētam žestam pāriešanai atpakaļ."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Šis iestatījums iespējo sistēmas animācijas prognozēto žestu animācijām. Lai to varētu izmantot, parametram “enableOnBackInvokedCallback” lietotnes manifesta failā jāiestata vērtība “true”."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Pārvietojiet pirkstu pa kreisi"</item>
- <item msgid="5425394847942513942">"Pārvietojiet pirkstu lejup"</item>
- <item msgid="7728484337962740316">"Pārvietojiet pirkstu pa labi"</item>
- <item msgid="324200556467459329">"Pārvietojiet pirkstu augšup"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nav norādīta"</string>
<string name="neuter" msgid="2075249330106127310">"Nekatrā dzimte"</string>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index 4866e6ad8f08..2de999818a39 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анимации за движењето за враќање"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Овозможете системски анимации за движењето за враќање."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Поставкава ги овозможува системските анимации за предвидливи движења. Поставката треба да се постави на „точно“ преку апликација enableOnBackInvokedCallback во датотеката за манифест."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Преместете налево"</item>
- <item msgid="5425394847942513942">"Преместете надолу"</item>
- <item msgid="7728484337962740316">"Преместете надесно"</item>
- <item msgid="324200556467459329">"Преместете нагоре"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Не е наведено"</string>
<string name="neuter" msgid="2075249330106127310">"Среден род"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 78a3968bb0d5..0aad465e1c9e 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"പ്രെഡിക്റ്റീവ് ബാക്ക് ആനിമേഷനുകൾ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"പ്രെഡിക്റ്റീവ് ബാക്കിനായി സിസ്റ്റം ആനിമേഷനുകൾ പ്രവർത്തനക്ഷമമാക്കുക."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ഈ ക്രമീകരണം പ്രെഡിക്റ്റീവ് ജെസ്ച്ചർ ആനിമേഷന് വേണ്ടി സിസ്റ്റം ആനിമേഷനുകളെ പ്രവർത്തനക്ഷമമാക്കുന്നു. ഇതിന് ഓരോ ആപ്പിലും enableOnBackInvokedCallback എന്നത് മാനിഫെസ്റ്റ് ഫയലിൽ ശരി എന്ന് സജ്ജീകരിക്കേണ്ടതുണ്ട്."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ഇടത്തേക്ക് നീക്കുക"</item>
- <item msgid="5425394847942513942">"താഴേക്ക് നീക്കുക"</item>
- <item msgid="7728484337962740316">"വലത്തേക്ക് നീക്കുക"</item>
- <item msgid="324200556467459329">"മുകളിലേക്ക് നീക്കുക"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"വ്യക്തമാക്കിയിട്ടില്ലാത്തവ"</string>
<string name="neuter" msgid="2075249330106127310">"നപുംസകലിംഗം"</string>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 31f190ddd4fc..94e6059bc270 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"Товшилтыг харуулах"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Товшилтын визуал хариу үйлдлийг харуулах"</string>
<string name="show_key_presses" msgid="6360141722735900214">"Түлхүүрийн даралт харуул"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"Биет түлхүүрийн даралтын визуал санал хүсэлт харуул"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"Биет түлхүүрийн даралтын визуал хариу үйлдлийг харуул"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Гадаргын шинэчлэлтүүдийг харуулах"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Шинэчлэгдэх үед цонхны гадаргыг бүхэлд нь анивчуулах"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"Шинэчлэлт харахыг харуулах"</string>
@@ -675,7 +675,7 @@
<string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"Гарын бүдүүвчийг сонгох"</string>
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"Өгөгдмөл"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"Дэлгэцийг асаах"</string>
- <string name="allow_turn_screen_on" msgid="6194845766392742639">"Дэлгэцийг асаахыг зөвшөөрнө үү"</string>
+ <string name="allow_turn_screen_on" msgid="6194845766392742639">"Дэлгэцийг асаахыг зөвшөөрөх"</string>
<string name="allow_turn_screen_on_description" msgid="43834403291575164">"Аппад дэлгэцийг асаахыг зөвшөөрнө үү. Зөвшөөрсөн тохиолдолд тухайн апп таны тодорхой оролцоогүйгээр ямар ч үед дэлгэцийг асааж болно."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g>-г нэвтрүүлэхээ зогсоох уу?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Хэрэв та <xliff:g id="SWITCHAPP">%1$s</xliff:g>-г нэвтрүүлсэн эсвэл гаралтыг өөрчилсөн бол таны одоогийн нэвтрүүлэлтийг зогсооно"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Таамаглах боломжтой буцаах анимаци"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Таамаглах боломжтой буцаах зангаанд системийн анимацийг идэвхжүүлнэ үү."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Энэ тохиргоо нь таамаглах боломжтой зангааны анимацид системийн анимацийг идэвхжүүлнэ. Үүнд апп бүрд тодорхойлогч файлл enableOnBackInvokedCallback-г үнэн болгож тохируулахыг шаардана."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Зүүн тийш зөөх"</item>
- <item msgid="5425394847942513942">"Доош зөөх"</item>
- <item msgid="7728484337962740316">"Баруун тийш зөөх"</item>
- <item msgid="324200556467459329">"Дээш зөөх"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Заагаагүй"</string>
<string name="neuter" msgid="2075249330106127310">"Саармаг үг"</string>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index e5852ed726f1..30775199ed70 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"पूर्वानुमानित मागे जाण्याचे अ‍ॅनिमेशन"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"पूर्वानुमानित मागे जाण्यासाठीचे सिस्टीम अ‍ॅनिमेशन सुरू करा."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"हे सेटिंग पूर्वानुमानित जेश्चर ॲनिमेशनसाठी सिस्टीम ॲनिमेशन सुरू करते. यासाठी मॅनिफेस्ट फाइलमध्ये प्रति ॲप enableOnBackInvokedCallback सत्य वर सेट करणे आवश्यक आहे."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"डावीकडे हलवा"</item>
- <item msgid="5425394847942513942">"खाली हलवा"</item>
- <item msgid="7728484337962740316">"उजवीकडे हलवा"</item>
- <item msgid="324200556467459329">"वरती हलवा"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"नमूद केलेले नाही"</string>
<string name="neuter" msgid="2075249330106127310">"नपुसकलिंग"</string>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index ca07d2bba3e3..24c1733d02cd 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -580,12 +580,12 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"Profil terhad"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"Tambah pengguna baharu?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"Anda boleh berkongsi peranti ini dengan orang lain dengan membuat pengguna tambahan. Setiap pengguna mempunyai ruang mereka sendiri, yang boleh diperibadikan dengan apl, kertas dinding dan sebagainya. Pengguna juga boleh melaraskan tetapan peranti seperti Wi-Fi yang akan memberi kesan kepada semua orang.\n\nApabila anda menambah pengguna baharu, orang itu perlu menyediakan ruang mereka.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain. Tetapan dan perkhidmatan kebolehaksesan tidak boleh dipindahkan kepada pengguna baharu."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"Apabila anda menambah pengguna baharu, orang itu perlu menyediakan ruangnya sendiri.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"Apabila anda menambahkan pengguna baharu, orang itu perlu menyediakan ruangnya sendiri.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"Jadikan pengguna ini pentadbir?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Pentadbir mempunyai keistimewaan khas yang tiada pada pengguna lain. Pentadbir boleh mengurus semua pengguna, mengemaskinikan atau menetapkan semula peranti ini, mengubah suai tetapan, melihat semua apl yang telah dipasang dan memberikan atau membatalkan keistimewaan pentadbir untuk pengguna lain."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Jadikan pentadbir"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"Sediakan pengguna sekarang?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"Pastikan orang itu tersedia untuk mengambil peranti dan menyediakan ruangan"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"Pastikan individu itu bersedia untuk mengambil peranti dan menyediakan ruangannya"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Sediakan profil sekarang?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"Sediakan sekarang"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"Bukan sekarang"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animasi kembali ramalan"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Dayakan animasi sistem untuk kembali ramalan."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Tetapan ini mendayakan animasi sistem untuk animasi gerak isyarat ramalan. Animasi sistem memerlukan tetapan enableOnBackInvokedCallback untuk setiap apl kepada benar dalam fail manifes."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Alih ke kiri"</item>
- <item msgid="5425394847942513942">"Alih ke bawah"</item>
- <item msgid="7728484337962740316">"Alih ke kanan"</item>
- <item msgid="324200556467459329">"Alih ke atas"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Tidak dinyatakan"</string>
<string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 0b9b3d1cefc0..aa9989ba3bd2 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"နောက်ခလုတ်၏ ရှေ့ပြေးလှုပ်ရှားသက်ဝင်ပုံ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"နောက်ခလုတ်ရှေ့ပြေးအတွက် စနစ်လှုပ်ရှားသက်ဝင်ပုံများကို ဖွင့်ပါသည်။"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ဤဆက်တင်သည် လက်ဟန် ရှေ့ပြေးလှုပ်ရှားသက်ဝင်ပုံအတွက် စနစ်လှုပ်ရှားသက်ဝင်ပုံများကို ဖွင့်ပါသည်။ အက်ပ်တစ်ခုစီ၏ ဆက်တင်အတွက် enableOnBackInvokedCallback ကို မန်နီးဖက်စ် (manifest) ဖိုင်၌ ဖွင့်ထားရန်လိုအပ်သည်။"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ဘယ်သို့ရွှေ့ရန်"</item>
- <item msgid="5425394847942513942">"အောက်သို့ရွှေ့ရန်"</item>
- <item msgid="7728484337962740316">"ညာသို့ရွှေ့ရန်"</item>
- <item msgid="324200556467459329">"အပေါ်သို့ရွှေ့ရန်"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"သတ်မှတ်မထားပါ"</string>
<string name="neuter" msgid="2075249330106127310">"နပုလ္လိင်"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index e68a2b78394d..9126f2904620 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -448,8 +448,8 @@
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
- <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> gjenstår basert på bruken din"</string>
- <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> gjenstår basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
+ <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen basert på bruken din"</string>
+ <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<!-- no translation found for power_remaining_duration_only_short (7438846066602840588) -->
<skip />
<string name="power_discharge_by_enhanced" msgid="563438403581662942">"Skal vare til omtrent <xliff:g id="TIME">%1$s</xliff:g>, basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Tilbake-animasjoner med forslag"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Slå på systemanimasjoner for tilbakebevegelser med forslag."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Denne innstillingen slår på systemanimasjoner for bevegelsesanimasjoner med forslag. Den krever at enableOnBackInvokedCallback settes til sann i manifestfilen for hver app."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Flytt til venstre"</item>
- <item msgid="5425394847942513942">"Flytt ned"</item>
- <item msgid="7728484337962740316">"Flytt til høyre"</item>
- <item msgid="324200556467459329">"Flytt opp"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Ikke angitt"</string>
<string name="neuter" msgid="2075249330106127310">"Intetkjønn"</string>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index e52b880a2919..f3e2cdd45e9e 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -58,10 +58,10 @@
<string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"\'<xliff:g id="AP_NAME">%1$s</xliff:g>\' मा जडान गर्न सकिँदैन"</string>
<string name="wifi_check_password_try_again" msgid="8817789642851605628">"पासवर्ड जाँच गरेर फेरि प्रयास गर्नुहोस्"</string>
<string name="wifi_not_in_range" msgid="1541760821805777772">"दायराभित्र छैन"</string>
- <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"स्वतः जडान हुने छैन"</string>
+ <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"अटो कनेक्ट हुने छैन"</string>
<string name="wifi_no_internet" msgid="1774198889176926299">"इन्टरनेटमाथिको पहुँच छैन"</string>
<string name="saved_network" msgid="7143698034077223645">"<xliff:g id="NAME">%1$s</xliff:g> द्वारा सेभ गरियो"</string>
- <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s मार्फत् स्वतः जडान गरिएको"</string>
+ <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s मार्फत् अटो कनेक्ट गरिएको"</string>
<string name="connected_via_network_scorer_default" msgid="7973529709744526285">"नेटवर्क मूल्याङ्कनकर्ता मार्फत स्वत: जडान गरिएको"</string>
<string name="connected_via_app" msgid="3532267661404276584">"<xliff:g id="NAME">%1$s</xliff:g> मार्फत जडान गरिएको"</string>
<string name="tap_to_sign_up" msgid="5356397741063740395">"साइन अप गर्न ट्याप गर्नुहोस्"</string>
@@ -580,12 +580,12 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"प्रतिबन्धित प्रोफाइल"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"नयाँ प्रयोगकर्ता हाल्ने हो?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"तपाईं थप प्रयोगकर्ताहरू सिर्जना गरेर ती प्रयोगकर्तालाई यो डिभाइस प्रयोग गर्न दिन सक्नुहुन्छ। हरेक प्रयोगकर्ताको आफ्नै ठाउँ हुन्छ। उनीहरू यो ठाउँमा आफ्नै एप, वालपेपर आदिका लागि प्रयोग गर्न सक्छन्। उनीहरू सबैजनालाई असर पार्ने Wi-Fi जस्ता डिभाइसका सेटिङहरू पनि परिवर्तन गर्न सक्छन्।\n\nतपाईंले नयाँ प्रयोगकर्ता थप्दा उक्त व्यक्तिले आफ्नो ठाउँ सेटअप गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ता अन्य सबै प्रयोगकर्ताले प्रयोग गर्ने एपहरू अद्यावधिक गर्न सक्छन्। तपाईं थप प्रयोगकर्ताहरू सिर्जना गरेर ती प्रयोगकर्तालाई यो डिभाइस प्रयोग गर्न दिन सक्नुहुन्छ। हरेक प्रयोगकर्ताको आफ्नै ठाउँ हुन्छ। उनीहरू यो ठाउँमा आफ्नै एप, वालपेपर आदिका लागि प्रयोग गर्न सक्छन्। उनीहरू सबैजनालाई असर पार्ने Wi-Fi जस्ता डिभाइसका सेटिङहरू पनि परिवर्तन गर्न सक्छन्।BREAK_0BREAK_1तपाईंले नयाँ प्रयोगकर्ता थप्दा उक्त व्यक्तिले आफ्नो ठाउँ सेटअप गर्नु पर्ने हुन्छ।BREAK_2BREAK_3सबै प्रयोगकर्ता अन्य सबै प्रयोगकर्ताले प्रयोग गर्ने एपहरू अद्यावधिक गर्न सक्छन्। तर पहुँचसम्बन्धी सेटिङ तथा सेवाहरू नयाँ प्रयोगकर्तामा नसर्न सक्छन्।"</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"तपाईंले नयाँ प्रयोगकर्ता थप्नुभयो भने ती प्रयोगकर्ताले आफ्नो स्पेस सेट गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ताले अरू प्रयोगकर्ताका एपहरू अपडेट गर्न सक्छन्।"</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"तपाईंले नयाँ प्रयोगकर्ता हाल्नुभयो भने ती प्रयोगकर्ताले आफ्नो स्पेस सेट गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ताले अरू प्रयोगकर्ताका एपहरू अपडेट गर्न सक्छन्।"</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"यी प्रयोगकर्तालाई एड्मिन बनाउने हो?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"एड्मिनहरूसँग अन्य प्रयोगकर्तासँग नभएका विशेषाधिकारहरू हुन्छन्। एड्मिन सबै प्रयोगकर्ताहरूलाई व्यवस्थापन गर्न, यो डिभाइस अपडेट वा रिसेट गर्न, सेटिङ परिमार्जन गर्न, इन्स्टल गरिएका सबै एपहरू हेर्न र अरूलाई एड्मिनका विशेषाधिकारहरू दिन वा अरूलाई दिइएका एड्मिनका विशेषाधिकारहरू खारेज गर्न सक्नुहुन्छ।"</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"एड्मिन बनाउनुहोस्"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"अहिले प्रयोगकर्ता सेटअप गर्ने हो?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"यी व्यक्ति यन्त्र यो डिभाइस चलाउन र आफ्नो ठाउँ सेट गर्न उपलब्ध छन् भन्ने कुरा सुनिश्चित गर्नुहोस्"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"यी व्यक्ति यो डिभाइस चलाउन र आफ्नो ठाउँ सेट गर्न उपलब्ध छन् भन्ने कुरा सुनिश्चित गर्नुहोस्"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"अहिले प्रोफाइल सेटअप गर्ने हो?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"अब सेटअप गर्नुहोस्"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"अहिले होइन"</string>
@@ -602,8 +602,8 @@
<string name="add_user_failed" msgid="4809887794313944872">"नयाँ प्रयोगकर्ता सिर्जना गर्न सकिएन"</string>
<string name="add_guest_failed" msgid="8074548434469843443">"नयाँ अतिथि बनाउन सकिएन"</string>
<string name="user_nickname" msgid="262624187455825083">"उपनाम"</string>
- <string name="user_add_user" msgid="7876449291500212468">"प्रयोगकर्ता थप्नुहोस्"</string>
- <string name="guest_new_guest" msgid="3482026122932643557">"अतिथि थप्नुहोस्"</string>
+ <string name="user_add_user" msgid="7876449291500212468">"प्रयोगकर्ता कनेक्ट गर्नुहोस्"</string>
+ <string name="guest_new_guest" msgid="3482026122932643557">"अतिथि कनेक्ट गर्नुहोस्"</string>
<string name="guest_exit_guest" msgid="5908239569510734136">"गेस्ट मोडबाट बाहिर निस्कियोस्"</string>
<string name="guest_reset_guest" msgid="6110013010356013758">"अतिथि सत्र रिसेट गर्नुहोस्"</string>
<string name="guest_reset_guest_dialog_title" msgid="8047270010895437534">"अतिथिका रूपमा ब्राउज गर्ने सेसन रिसेट गर्ने हो?"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"पूर्वानुमानयुक्त ब्याक एनिमेसनहरू"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"पूर्वानुमानयुक्त ब्याक एनिमेसनका हकमा सिस्टम एनिमेसनहरू लागू गर्नुहोस्।"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"यो सेटिङले पूर्वानुमानयुक्त जेस्चर एनिमेसनका हकमा सिस्टम एनिमेनसहरू लागू गर्छ। म्यानिफेस्ट फाइलमा हरेक एपका हकमा enableOnBackInvokedCallback सेट गरी TRUE बनाएपछि मात्र यो सेटिङ अन गर्न मिल्छ।"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"बायाँतिर सार्नुहोस्"</item>
- <item msgid="5425394847942513942">"तलतिर सार्नुहोस्"</item>
- <item msgid="7728484337962740316">"दायाँतिर सार्नुहोस्"</item>
- <item msgid="324200556467459329">"माथितिर सार्नुहोस्"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"नतोकिएको"</string>
<string name="neuter" msgid="2075249330106127310">"नपुंसक लिङ्ग"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index 0d52d9d2b661..c8581994b75f 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Voorspellende animaties voor gebaren voor terug"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Systeemanimaties aanzetten voor voorspellende animaties voor gebaren voor terug."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Met deze instelling zet je systeemanimaties aan voor voorspellende gebaaranimaties. Je moet enableOnBackInvokedCallback per app instellen op True in het manifestbestand."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Naar links verplaatsen"</item>
- <item msgid="5425394847942513942">"Omlaag verplaatsen"</item>
- <item msgid="7728484337962740316">"Naar rechts verplaatsen"</item>
- <item msgid="324200556467459329">"Omhoog verplaatsen"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Niet opgegeven"</string>
<string name="neuter" msgid="2075249330106127310">"Onzijdig"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index eb54cba0ae41..ec72ba9fc567 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -584,10 +584,10 @@
<string name="user_grant_admin_title" msgid="5157031020083343984">"ଏହି ୟୁଜରଙ୍କୁ ଜଣେ ଆଡମିନ କରିବେ?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"ଆଡମିନମାନଙ୍କର ବିଶେଷ ଅଧିକାରଗୁଡ଼ିକ ଥାଏ ଯାହା ଅନ୍ୟ ୟୁଜରମାନଙ୍କର ନଥାଏ। ଜଣେ ଆଡମିନ ସମସ୍ତ ୟୁଜରଙ୍କୁ ପରିଚାଳନା କରିପାରିବେ, ଏହି ଡିଭାଇସକୁ ଅପଡେଟ କିମ୍ବା ରିସେଟ କରିପାରିବେ, ସେଟିଂସ ପରିବର୍ତ୍ତନ କରିପାରିବେ, ଇନଷ୍ଟଲ କରାଯାଇଥିବା ସମସ୍ତ ଆପ୍ସ ଦେଖିପାରିବେ ଏବଂ ଅନ୍ୟମାନଙ୍କ ପାଇଁ ଆଡମିନଙ୍କ ବିଶେଷ ଅଧିକାରଗୁଡ଼ିକୁ ଅନୁମତି ଦେଇପାରିବେ କିମ୍ବା ପ୍ରତ୍ୟାହାର କରିପାରିବେ।"</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"ଆଡମିନ କରନ୍ତୁ"</string>
- <string name="user_setup_dialog_title" msgid="8037342066381939995">"ଏବେ ଉପଯୋଗକର୍ତ୍ତା ସେଟଅପ କରିବେ?"</string>
- <string name="user_setup_dialog_message" msgid="269931619868102841">"ସୁନିଶ୍ଚିତ କରନ୍ତୁ ଯେ, ବ୍ୟକ୍ତି ଜଣକ ଡିଭାଇସ୍‌ ଓ ନିଜର ସ୍ଥାନ ସେଟଅପ୍‌ କରିବା ପାଇଁ ଉପଲବ୍ଧ ଅଛନ୍ତି।"</string>
+ <string name="user_setup_dialog_title" msgid="8037342066381939995">"ଏବେ ୟୁଜର ସେଟଅପ କରିବେ?"</string>
+ <string name="user_setup_dialog_message" msgid="269931619868102841">"ସୁନିଶ୍ଚିତ କରନ୍ତୁ ଯେ, ବ୍ୟକ୍ତି ଜଣକ ଡିଭାଇସ ଓ ନିଜର ସ୍ଥାନ ସେଟଅପ କରିବା ପାଇଁ ଉପଲବ୍ଧ ଅଛନ୍ତି।"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"ପ୍ରୋଫାଇଲ୍‌କୁ ଏବେ ସେଟ୍‌ କରିବେ?"</string>
- <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ଏବେ ସେଟଅପ୍ କରନ୍ତୁ"</string>
+ <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ଏବେ ସେଟଅପ କରନ୍ତୁ"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"ଏବେ ନୁହେଁଁ"</string>
<string name="user_add_user_type_title" msgid="551279664052914497">"ଯୋଡନ୍ତୁ"</string>
<string name="user_new_user_name" msgid="60979820612818840">"ନୂଆ ୟୁଜର"</string>
@@ -676,7 +676,7 @@
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"ଡିଫଲ୍ଟ"</string>
<string name="turn_screen_on_title" msgid="3266937298097573424">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରନ୍ତୁ"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଅନୁମତି ଦିଅନ୍ତୁ"</string>
- <string name="allow_turn_screen_on_description" msgid="43834403291575164">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଏକ ଆପକୁ ଅନୁମତି ଦିଅନ୍ତୁ। ଯଦି ଅନୁମତି ଦିଆଯାଏ, ତେବେ ଆପଟି ଆପଣଙ୍କ ସ୍ପଷ୍ଟ ଇଣ୍ଟେଣ୍ଟ ବିନା ଯେ କୌଣସି ସମୟରେ ସ୍କ୍ରିନକୁ ଚାଲୁ କରିପାରେ।"</string>
+ <string name="allow_turn_screen_on_description" msgid="43834403291575164">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଏକ ଆପକୁ ଅନୁମତି ଦିଅନ୍ତୁ। ଯଦି ଅନୁମତି ଦିଆଯାଏ, ତେବେ ଆପଟି ଆପଣଙ୍କ ଏକ୍ସପ୍ଲିସିଟ ଇଣ୍ଟେଣ୍ଟ ବିନା ଯେ କୌଣସି ସମୟରେ ସ୍କ୍ରିନକୁ ଚାଲୁ କରିପାରେ।"</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରିବା ବନ୍ଦ କରିବେ?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"ଯଦି ଆପଣ <xliff:g id="SWITCHAPP">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରନ୍ତି କିମ୍ବା ଆଉଟପୁଟ ବଦଳାନ୍ତି, ତେବେ ଆପଣଙ୍କ ବର୍ତ୍ତମାନର ବ୍ରଡକାଷ୍ଟ ବନ୍ଦ ହୋଇଯିବ"</string>
<string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରନ୍ତୁ"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ପ୍ରେଡିକ୍ଟିଭ ବେକ ଆନିମେସନ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ପ୍ରେଡିକ୍ଟିଭ ବେକ ପାଇଁ ସିଷ୍ଟମ ଆନିମେସନଗୁଡ଼ିକୁ ସକ୍ଷମ କରନ୍ତୁ।"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ଏହି ସେଟିଂ ପ୍ରେଡିକ୍ଟିଭ ଜେଶ୍ଚର ଆନିମେସନ ପାଇଁ ସିଷ୍ଟମ ଆନିମେସନଗୁଡ଼ିକୁ ସକ୍ଷମ କରେ। ଏଥିପାଇଁ ମାନିଫେଷ୍ଟ ଫାଇଲରେ ପ୍ରତି-ଆପ enableOnBackInvokedCallbackକୁ \"ଠିକ\"ରେ ସେଟ କରିବା ଆବଶ୍ୟକ।"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ବାମକୁ ମୁଭ କରନ୍ତୁ"</item>
- <item msgid="5425394847942513942">"ତଳକୁ ମୁଭ କରନ୍ତୁ"</item>
- <item msgid="7728484337962740316">"ଡାହାଣକୁ ମୁଭ କରନ୍ତୁ"</item>
- <item msgid="324200556467459329">"ଉପରକୁ ମୁଭ କରନ୍ତୁ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ନିର୍ଦ୍ଦିଷ୍ଟ କରାଯାଇନାହିଁ"</string>
<string name="neuter" msgid="2075249330106127310">"ନ୍ୟୁଟର"</string>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index b0faa808d4ea..34194589e3a6 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ਪਿਛਲੇ ਐਨੀਮੇਸ਼ਨਾਂ ਦਾ ਪੂਰਵ-ਅਨੁਮਾਨ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ਪੂਰਵ-ਅਨੁਮਾਨ ਵਾਪਸੀ ਲਈ ਸਿਸਟਮ ਐਨੀਮੇਸ਼ਨਾਂ ਨੂੰ ਚਾਲੂ ਕਰੋ।"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ਇਹ ਸੈਟਿੰਗ ਪੂਰਵ-ਅਨੁਮਾਨ ਇਸ਼ਾਰਾ ਐਨੀਮੇਸ਼ਨ ਲਈ ਸਿਸਟਮ ਐਨੀਮੇਸ਼ਨਾਂ ਨੂੰ ਚਾਲੂ ਕਰਦੀ ਹੈ। ਮੈਨੀਫ਼ੈਸਟ ਫ਼ਾਈਲ ਵਿੱਚ enableOnBackInvokedCallback ਸੈਟਿੰਗ ਨੂੰ ਪ੍ਰਤੀ-ਐਪ \'ਸਹੀ\' \'ਤੇ ਕਰਨ ਦੀ ਲੋੜ ਹੈ।"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ਖੱਬੇ ਲਿਜਾਓ"</item>
- <item msgid="5425394847942513942">"ਹੇਠਾਂ ਲਿਜਾਓ"</item>
- <item msgid="7728484337962740316">"ਸੱਜੇ ਲਿਜਾਓ"</item>
- <item msgid="324200556467459329">"ਉੱਪਰ ਲਿਜਾਓ"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ਨਿਰਧਾਰਿਤ ਨਹੀਂ"</string>
<string name="neuter" msgid="2075249330106127310">"ਨਿਰਪੱਖ"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index cdc5ba26b37b..addad23c5255 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"Pokazuj dotknięcia"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Pokazuj potwierdzenie wizualne po dotknięciu"</string>
<string name="show_key_presses" msgid="6360141722735900214">"Wyświetl naciśnięcia klawiszy"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"Wyświetl opinie wizualne dla naciśnięć fizycznego klucza"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"Pokaż wizualną informację zwrotną po naciśnięciu fizycznego klawisza"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Pokazuj zmiany powierzchni"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Podświetlaj całe aktualizowane powierzchnie okien"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"Pokazuj aktualizacje widoku"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacje przewidywanego przejścia wstecz"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Włącz animacje systemowe dla przewidywanego przejścia wstecz"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"To ustawienie uruchamia animacje systemowe dla przewidywanych gestów. Wymaga ustawienia w pliku manifestu wartości true w polu enableOnBackInvokedCallback dla każdej aplikacji."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Przenieś w lewo"</item>
- <item msgid="5425394847942513942">"Przenieś w dół"</item>
- <item msgid="7728484337962740316">"Przenieś w prawo"</item>
- <item msgid="324200556467459329">"Przenieś w górę"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nie określono"</string>
<string name="neuter" msgid="2075249330106127310">"Nijaki"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index f1784bcc3c58..6f3f644ccfd1 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos \"Voltar\" preditivos"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ativar animações do sistema para gestos \"Voltar\" preditivos"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuração ativa animações do sistema para gestos preditivos. Ela requer que a política enableOnBackInvokedCallback por app seja definida como verdadeira no arquivo de manifesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mover para esquerda"</item>
- <item msgid="5425394847942513942">"Mover para baixo"</item>
- <item msgid="7728484337962740316">"Mover para direita"</item>
- <item msgid="324200556467459329">"Mover para cima"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index c510e2b63bb3..566c5d318a5c 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -382,7 +382,7 @@
<string name="show_non_rect_clip" msgid="7499758654867881817">"Depurar operações de clipe não retangulares"</string>
<string name="track_frame_time" msgid="522674651937771106">"Renderização HWUI do perfil"</string>
<string name="enable_gpu_debug_layers" msgid="4986675516188740397">"Ativar cam. depuração GPU"</string>
- <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_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>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animação de transição"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos para voltar preditivos"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ative as animações do sistema para gestos para voltar preditivos."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta definição ativa animações do sistema para a animação de gestos preditivos. Requer a definição do atributo enableOnBackInvokedCallback por app como verdadeiro no ficheiro de manifesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mover para a esquerda"</item>
- <item msgid="5425394847942513942">"Mover para baixo"</item>
- <item msgid="7728484337962740316">"Mover para a direita"</item>
- <item msgid="324200556467459329">"Mover para cima"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index f1784bcc3c58..6f3f644ccfd1 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos \"Voltar\" preditivos"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ativar animações do sistema para gestos \"Voltar\" preditivos"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuração ativa animações do sistema para gestos preditivos. Ela requer que a política enableOnBackInvokedCallback por app seja definida como verdadeira no arquivo de manifesto."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Mover para esquerda"</item>
- <item msgid="5425394847942513942">"Mover para baixo"</item>
- <item msgid="7728484337962740316">"Mover para direita"</item>
- <item msgid="324200556467459329">"Mover para cima"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
<string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 447bb63a18cc..77b79c9aafd7 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animații pentru gestul înapoi predictiv"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Activează animațiile de sistem pentru gestul înapoi predictiv."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Această setare activează animațiile de sistem pentru animația gesturilor predictive. Necesită setarea valorii true în cazul atributului enableOnBackInvokedCallback pentru fiecare aplicație în fișierul manifest."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Deplasează la stânga"</item>
- <item msgid="5425394847942513942">"Deplasează în jos"</item>
- <item msgid="7728484337962740316">"Deplasează la dreapta"</item>
- <item msgid="324200556467459329">"Deplasează în sus"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nespecificat"</string>
<string name="neuter" msgid="2075249330106127310">"Neutru"</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index f10e8e7a144a..c368913c2a44 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анимации подсказки для жеста \"Назад\""</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Включить системную анимацию подсказки для жеста \"Назад\"."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"С помощью этого параметра можно включить системные анимации подсказок для жестов. Для этого нужно установить значение true для enableOnBackInvokedCallback в файле манифеста приложения."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Переместите палец влево"</item>
- <item msgid="5425394847942513942">"Переместите палец вниз"</item>
- <item msgid="7728484337962740316">"Переместите палец вправо"</item>
- <item msgid="324200556467459329">"Переместите палец вверх"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Не указан"</string>
<string name="neuter" msgid="2075249330106127310">"Средний"</string>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 51bd3c14d829..17090a75f132 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"පුරෝකථනමය පසු සජීවිකරණ"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"පුරෝකථනමය ආපසු සඳහා පද්ධති සජීවිකරණ සබල කරන්න."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"මෙම සැකසීම පුරෝකථනමය ඉංගිත සජීවිකරණය සඳහා පද්ධති සජීවිකරණ සබල කරයි. එයට මැනිෆෙස්ට් ගොනුව තුළ එක් යෙදුමකට enableOnBackInvokedCallback සත්‍ය ලෙස සැකසීම අවශ්‍ය වේ."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"වමට ගෙන යන්න"</item>
- <item msgid="5425394847942513942">"පහළට ගෙන යන්න"</item>
- <item msgid="7728484337962740316">"දකුණට ගෙන යන්න"</item>
- <item msgid="324200556467459329">"ඉහළට ගෙන යන්න"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"විශේෂයෙන් සඳහන් නොකළ"</string>
<string name="neuter" msgid="2075249330106127310">"නපුංසක"</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 691872842fd5..06367677c365 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Prediktívne animácie gesta Späť"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Povoliť animácie v systéme pre prediktívne gesto Späť"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Toto nastavenie povoľuje animácie v systéme na účely prediktívnej animácie gest. Vyžaduje nastavenie povolenia enableOnBackInvokedCallback na pravdu v súbore manifestu konkrétnej aplikácie."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Posuňte doľava"</item>
- <item msgid="5425394847942513942">"Posuňte nadol"</item>
- <item msgid="7728484337962740316">"Posuňte doprava"</item>
- <item msgid="324200556467459329">"Presuňte nahor"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Nešpecifikované"</string>
<string name="neuter" msgid="2075249330106127310">"Stredný rod"</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index cf174e1d73f4..949ed422ea57 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacije poteze za nazaj s predvidevanjem"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogoči sistemske animacije za potezo za nazaj s predvidevanjem."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ta nastavitev omogoča sistemske animacije za animacijo poteze s predvidevanjem. V datoteki manifesta mora biti parameter »enableOnBackInvokedCallback« za posamezno aplikacijo nastavljen na »true«."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Premaknite se levo"</item>
- <item msgid="5425394847942513942">"Premaknite se navzdol"</item>
- <item msgid="7728484337962740316">"Premaknite se desno"</item>
- <item msgid="324200556467459329">"Premaknite se navzgor"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Ni določeno"</string>
<string name="neuter" msgid="2075249330106127310">"Srednji spol"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 7802704e4649..0eff3ab8dc82 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -268,7 +268,7 @@
<string name="mock_location_app_not_set" msgid="6972032787262831155">"Nuk është vendosur asnjë aplikacion që simulon vendndodhjen"</string>
<string name="mock_location_app_set" msgid="4706722469342913843">"Aplikacioni për simulimin e vendndodhjes: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="debug_networking_category" msgid="6829757985772659599">"Rrjetet"</string>
- <string name="wifi_display_certification" msgid="1805579519992520381">"Certifikimi i ekranit pa tel"</string>
+ <string name="wifi_display_certification" msgid="1805579519992520381">"Certifikimi i ekranit wireless"</string>
<string name="wifi_verbose_logging" msgid="1785910450009679371">"Aktivizo regjistrimin Wi-Fi Verbose"</string>
<string name="wifi_scan_throttling" msgid="2985624788509913617">"Përshpejtimi i skanimit të Wi‑Fi"</string>
<string name="wifi_non_persistent_mac_randomization" msgid="7482769677894247316">"Renditje e rastësishme jo e përhershme e MAC për Wi‑Fi"</string>
@@ -300,7 +300,7 @@
<string name="private_dns_mode_provider" msgid="3619040641762557028">"Emri i pritësit të ofruesit të DNS-së private"</string>
<string name="private_dns_mode_provider_hostname_hint" msgid="6564868953748514595">"Fut emrin e pritësit të ofruesit të DNS-së"</string>
<string name="private_dns_mode_provider_failure" msgid="8356259467861515108">"Nuk mund të lidhej"</string>
- <string name="wifi_display_certification_summary" msgid="8111151348106907513">"Shfaq opsionet për certifikimin e ekranit pa tel"</string>
+ <string name="wifi_display_certification_summary" msgid="8111151348106907513">"Shfaq opsionet për certifikimin e ekranit wireless"</string>
<string name="wifi_verbose_logging_summary" msgid="4993823188807767892">"Rrit nivelin regjistrues të Wi‑Fi duke shfaqur SSID RSSI-në te Zgjedhësi i Wi‑Fi"</string>
<string name="wifi_scan_throttling_summary" msgid="2577105472017362814">"Zvogëlon shkarkimin e baterisë dhe përmirëson cilësinë e funksionimit të rrjetit"</string>
<string name="wifi_non_persistent_mac_randomization_summary" msgid="2159794543105053930">"Kur ky modalitet është i aktivizuar, adresa MAC e kësaj pajisjeje mund të ndryshojë çdo herë që lidhet me një rrjet që ka të aktivizuar renditjen e rastësishme të adresave MAC."</string>
@@ -356,7 +356,7 @@
<string name="show_touches" msgid="8437666942161289025">"Shfaq trokitjet"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Shfaq reagimet vizuale për trokitjet"</string>
<string name="show_key_presses" msgid="6360141722735900214">"Shfaq shtypjet e tasteve"</string>
- <string name="show_key_presses_summary" msgid="725387457373015024">"Shfaq reagime vizuale për shtypjen e tasteve fizike"</string>
+ <string name="show_key_presses_summary" msgid="725387457373015024">"Shfaq reagim vizual për shtypjet fizike të tasteve"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Shfaq përditësimet e sipërfaqes"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Ndriço të gjitha sipërfaqet e dritares kur ato të përditësohen"</string>
<string name="show_hw_screen_updates" msgid="2021286231267747506">"Shfaq përditësimet e pamjes"</string>
@@ -477,7 +477,7 @@
<string name="battery_info_status_charging" msgid="4279958015430387405">"Po karikohet"</string>
<string name="battery_info_status_charging_fast" msgid="8027559755902954885">"Karikim i shpejtë"</string>
<string name="battery_info_status_charging_slow" msgid="3190803837168962319">"Po karikohet ngadalë"</string>
- <string name="battery_info_status_charging_wireless" msgid="8924722966861282197">"Po karikohet pa tel"</string>
+ <string name="battery_info_status_charging_wireless" msgid="8924722966861282197">"Po karikohet wireless"</string>
<string name="battery_info_status_charging_dock" msgid="8573274094093364791">"Po karikohet"</string>
<string name="battery_info_status_discharging" msgid="6962689305413556485">"Nuk po karikohet"</string>
<string name="battery_info_status_not_charging" msgid="3371084153747234837">"Lidhur, jo në karikim"</string>
@@ -584,7 +584,7 @@
<string name="user_grant_admin_title" msgid="5157031020083343984">"Të bëhet administrator ky përdorues?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Administratorët kanë privilegje të veçanta që nuk i kanë përdoruesit e tjerë. Një administrator mund të menaxhojë të gjithë përdoruesit, të përditësojë ose të rivendosë këtë pajisje, të modifikojë cilësimet, të shikojë të gjitha aplikacionet e instaluara dhe të japë ose të revokojë privilegjet e administratorit për të tjerët."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Bëje administrator"</string>
- <string name="user_setup_dialog_title" msgid="8037342066381939995">"Të konfig. përdoruesi tani?"</string>
+ <string name="user_setup_dialog_title" msgid="8037342066381939995">"Të konfigurohet përdoruesi?"</string>
<string name="user_setup_dialog_message" msgid="269931619868102841">"Sigurohu që personi të jetë i gatshëm të marrë pajisjen dhe të caktojë hapësirën e vet"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Të konfigurohet tani profili?"</string>
<string name="user_setup_button_setup_now" msgid="1708269547187760639">"Konfiguro tani"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Animacionet për gjestin e parashikuar të kthimit prapa"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivizo animacionet e sistemit për gjestin e parashikuar të kthimit prapa."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ky cilësim aktivizon animacionet e sistemit për animacionin e gjestit të parashikuar. Ai kërkon që enableOnBackInvokedCallback për aplikacionin të jetë caktuar si i vërtetë në skedarin e manifestit."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Lëvize majtas"</item>
- <item msgid="5425394847942513942">"Lëvize poshtë"</item>
- <item msgid="7728484337962740316">"Lëvize djathtas"</item>
- <item msgid="324200556467459329">"Lëvize lart"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"E papërcaktuar"</string>
<string name="neuter" msgid="2075249330106127310">"Asnjanëse"</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index eb10b550f97b..2ae0fe2e3c10 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -141,7 +141,7 @@
<string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Откажи"</string>
<string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Упаривање омогућава приступ контактима и историји позива након повезивања."</string>
<string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Упаривање са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће."</string>
- <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Упаривање са <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће због нетачног PIN-а или приступног кода."</string>
+ <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Упаривање са <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће због нетачног PIN-а или приступног кључа."</string>
<string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Није могуће комуницирати са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
<string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> је одбио/ла упаривање"</string>
<string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Рачунар"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анимације за покрет повратка са предвиђањем"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Омогућите анимације система за покрет повратка са предвиђањем."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ово подешавање омогућава анимације система за покрет повратка са предвиђањем. Захтева подешавање дозволе enableOnBackInvokedCallback по апликацији на true у фајлу манифеста."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Померите налево"</item>
- <item msgid="5425394847942513942">"Померите надоле"</item>
- <item msgid="7728484337962740316">"Померите надесно"</item>
- <item msgid="324200556467459329">"Померите нагоре"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Није наведено"</string>
<string name="neuter" msgid="2075249330106127310">"Средњи род"</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 256b4e9aacee..e8f045d06c2a 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Förhandsanimationer för bakåtrörelser"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivera systemanimationer som förhandsvisar bakåtrörelser."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Den här inställningen aktiverar systemanimationer som förhandsvisar vart rörelserna leder. Du måste ställa in enableOnBackInvokedCallback som sant per app i manifestfilen."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Flytta åt vänster"</item>
- <item msgid="5425394847942513942">"Flytta nedåt"</item>
- <item msgid="7728484337962740316">"Flytta åt höger"</item>
- <item msgid="324200556467459329">"Flytta uppåt"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Inte angivet"</string>
<string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index e23dbcb314d5..64119140bb65 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Uhuishaji wa utabiri wa kurudi nyuma"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Ruhusu uhuishaji wa mfumo wa utabiri wa kurudi nyuma."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Mipangilio hii inaruhusu uhuishaji wa mfumo wa uhuishaji wa utabiri wa ishara. Inahitaji kuweka mipangilio kwa kila programu enableOnBackInvokedCallback kuwa true katika faili ya maelezo."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Sogeza kushoto"</item>
- <item msgid="5425394847942513942">"Sogeza chini"</item>
- <item msgid="7728484337962740316">"Sogeza kulia"</item>
- <item msgid="324200556467459329">"Sogeza juu"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"Asilimia <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
<string name="not_specified" msgid="5423502443185110328">"Haijabainishwa"</string>
<string name="neuter" msgid="2075249330106127310">"Isiyobainika"</string>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 365c3dafca93..608638483190 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -355,7 +355,7 @@
<string name="pointer_location_summary" msgid="957120116989798464">"திரையின் மேல் அடுக்கானது தற்போது தொடப்பட்டிருக்கும் தரவைக் காண்பிக்கிறது"</string>
<string name="show_touches" msgid="8437666942161289025">"தட்டல்களைக் காட்டு"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"தட்டல்களின் போது காட்சி அறிகுறிகளைக் காட்டும்"</string>
- <string name="show_key_presses" msgid="6360141722735900214">"பட்டன் அழுத்தத்தை காட்டவா"</string>
+ <string name="show_key_presses" msgid="6360141722735900214">"பட்டன் அழுத்தத்தை காட்டு"</string>
<string name="show_key_presses_summary" msgid="725387457373015024">"பட்டன் அழுத்தங்களைக் காட்சி மூலம் உறுதிப்படுத்தும்"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"மேலோட்ட புதுப்பிப்புகளைக் காட்டு"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"சாளரத்தின் பரப்புநிலைகள் புதுப்பிக்கப்படும்போது, அவற்றை முழுவதுமாகக் காட்டும்"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"கணிக்கக்கூடிய பின்செல் சைகைக்கான அனிமேஷன்கள்"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"கணிக்கக்கூடிய பின்செல் சைகைக்காகச் சிஸ்டம் அனிமேஷன்களை இயக்கும்."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"கணிக்கக்கூடிய சைகைக்கான அனிமேஷனுக்காக இந்த அமைப்பு சிஸ்டம் அனிமேஷன்களை இயக்கும். மெனிஃபெஸ்ட் ஃபைலில் ஒவ்வொரு ஆப்ஸுக்கும் enableOnBackInvokedCallbackகை \'சரி\' என அமைக்க வேண்டும்."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"இடதுபுறம் நகர்த்துங்கள்"</item>
- <item msgid="5425394847942513942">"கீழே நகர்த்துங்கள்"</item>
- <item msgid="7728484337962740316">"வலதுபுறம் நகர்த்துங்கள்"</item>
- <item msgid="324200556467459329">"மேலே நகர்த்துங்கள்"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"குறிப்பிடப்படவில்லை"</string>
<string name="neuter" msgid="2075249330106127310">"அஃறிணை"</string>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index d1c464c21378..f43b56a36acc 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -587,7 +587,7 @@
<string name="user_setup_dialog_title" msgid="8037342066381939995">"యూజర్‌ను ఇప్పుడే సెటప్ చేయాలా?"</string>
<string name="user_setup_dialog_message" msgid="269931619868102841">"పరికరాన్ని తీసుకోవడానికి వ్యక్తి అందుబాటులో ఉన్నారని నిర్ధారించుకొని, ఆపై వారికి స్టోరేజ్‌ స్థలాన్ని సెటప్ చేయండి"</string>
<string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"ఇప్పుడు ప్రొఫైల్‌ను సెటప్ చేయాలా?"</string>
- <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ఇప్పుడే సెట‌ప్ చేయి"</string>
+ <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ఇప్పుడే సెట‌ప్ చేయండి"</string>
<string name="user_setup_button_setup_later" msgid="8712980133555493516">"ఇప్పుడు కాదు"</string>
<string name="user_add_user_type_title" msgid="551279664052914497">"జోడించండి"</string>
<string name="user_new_user_name" msgid="60979820612818840">"కొత్త యూజర్"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ప్రివ్యూ గల బ్యాక్ యానిమేషన్‌లు"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"ప్రివ్యూ గల బ్యాక్ యానిమేషన్‌ల కోసం సిస్టమ్ యానిమేషన్‌లను ఎనేబుల్ చేయండి."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ఊహించదగిన సంజ్ఞ యానిమేషన్ కోసం ఈ సెట్టింగ్ సిస్టమ్ యానిమేషన్‌లను ఎనేబుల్ చేస్తుంది. దీనికి మ్యానిఫెస్ట్ ఫైల్‌లో ఒక్కో యాప్‌లో enableOnBackInvokedCallback సెట్టింగ్‌ను ఒప్పునకు సెట్ చేయవలసి ఉంటుంది."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ఎడమ వైపుగా జరపండి"</item>
- <item msgid="5425394847942513942">"కిందికి జరపండి"</item>
- <item msgid="7728484337962740316">"కుడి వైపుగా జరపండి"</item>
- <item msgid="324200556467459329">"పైకి జరపండి"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"పేర్కొనబడలేదు"</string>
<string name="neuter" msgid="2075249330106127310">"తటస్థం"</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index bc6840bdc2d7..c7b10fba15e2 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"ภาพเคลื่อนไหวของการย้อนกลับที่คาดการณ์ได้"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"เปิดใช้ภาพเคลื่อนไหวของระบบสำหรับการย้อนกลับที่คาดการณ์ได้"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"การตั้งค่านี้จะเปิดใช้การเคลื่อนไหวของระบบสำหรับการเคลื่อนไหวจากท่าทางสัมผัสแบบคาดเดา โดยต้องตั้งค่า enableOnBackInvokedCallback สำหรับแต่ละแอปให้เป็น \"จริง\" ในไฟล์ Manifest"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"ย้ายไปทางซ้าย"</item>
- <item msgid="5425394847942513942">"ย้ายลง"</item>
- <item msgid="7728484337962740316">"ย้ายไปทางขวา"</item>
- <item msgid="324200556467459329">"ย้ายขึ้น"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"ไม่ได้ระบุ"</string>
<string name="neuter" msgid="2075249330106127310">"ไม่มีเพศ"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 4360b9fa027c..8222c426541c 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Mga animation ng predictive na pagbalik"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"I-enable ang mga animation ng system para sa predictive na pagbalik."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ine-enable ng setting na ito ang mga animation ng system para sa animation ng predictive na galaw. Kinakailangan nitong itakda sa true ang enableOnBackInvokedCallback sa bawat app sa manifest file."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Ilipat pakaliwa"</item>
- <item msgid="5425394847942513942">"Ilipat pababa"</item>
- <item msgid="7728484337962740316">"Ilipat pakanan"</item>
- <item msgid="324200556467459329">"Ilipat pataas"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Hindi tinukoy"</string>
<string name="neuter" msgid="2075249330106127310">"Walang Kasarian"</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index 206df8f5a8ce..991c9182ce3c 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Tahmin edilen geri gitme animasyonları"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Tahmin edilen geri gitme için sistem animasyonlarını etkinleştirin"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu ayar, tahmine dayalı hareket animasyonu için sistem animasyonlarını etkinleştirir. Her uygulamanın manifest dosyasında enableOnBackInvokedCallback\'in doğru değerine ayarlanması gerekir."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Sola taşı"</item>
- <item msgid="5425394847942513942">"Aşağı taşı"</item>
- <item msgid="7728484337962740316">"Sağa taşı"</item>
- <item msgid="324200556467459329">"Yukarı taşı"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"%%<xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
<string name="not_specified" msgid="5423502443185110328">"Belirtilmedi"</string>
<string name="neuter" msgid="2075249330106127310">"Cinsiyetsiz"</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 2bc80df469db..1cb31853a267 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -355,7 +355,7 @@
<string name="pointer_location_summary" msgid="957120116989798464">"Показувати на екрані жести й натискання"</string>
<string name="show_touches" msgid="8437666942161289025">"Показувати дотики"</string>
<string name="show_touches_summary" msgid="3692861665994502193">"Показувати візуальну реакцію на торкання"</string>
- <string name="show_key_presses" msgid="6360141722735900214">"Показувати натиск. клавіш"</string>
+ <string name="show_key_presses" msgid="6360141722735900214">"Показувати натискання клавіш"</string>
<string name="show_key_presses_summary" msgid="725387457373015024">"Показувати візуальний відгук на натискання клавіш"</string>
<string name="show_screen_updates" msgid="2078782895825535494">"Показ. оновлення поверхні"</string>
<string name="show_screen_updates_summary" msgid="2126932969682087406">"Підсвічувати вікна повністю під час оновлення"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Анімації з підказками для жесту \"Назад\""</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Увімкнути системну анімацію з підказками для жесту \"Назад\"."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Якщо вибрати це налаштування, для жесту \"Назад\" відображатиметься анімація з підказками. У файлі маніфесту атрибуту enableOnBackInvokedCallback додатка потрібно присвоїти значення true."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Перемістіть палець ліворуч"</item>
- <item msgid="5425394847942513942">"Перемістіть палець униз"</item>
- <item msgid="7728484337962740316">"Перемістіть палець праворуч"</item>
- <item msgid="324200556467459329">"Перемістіть палець угору"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Не вказано"</string>
<string name="neuter" msgid="2075249330106127310">"Середній рід"</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index b8bef4c14fbb..7e3a164b6c1a 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"پیچھے جانے کے اشارے کی پیش گوئی والی اینیمیشنز"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"پیچھے جانے کے پیش گوئی والے اشارے کے لیے سسٹم اینیمیشنز فعال کریں۔"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏یہ ترتیب پیش گوئی والی اشارے کی اینیمیشن کے لیے سسٹم کی اینیمیشنز کو فعال کرتی ہے۔ اس کے لیے manifest فائل میں فی ایپ enableOnBackInvokedCallback کو درست پر سیٹ کرنے کی ضرورت ہے۔"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"دائيں منتقل کریں"</item>
- <item msgid="5425394847942513942">"نیچے منتقل کریں"</item>
- <item msgid="7728484337962740316">"بائيں منتقل کریں"</item>
- <item msgid="324200556467459329">"اوپر منتقل کریں"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"متعین نہیں ہے"</string>
<string name="neuter" msgid="2075249330106127310">"غیر واضح"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index 57c59e1725fe..845b83554e12 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -602,7 +602,7 @@
<string name="add_user_failed" msgid="4809887794313944872">"Yangi foydalanuvchi yaratilmadi"</string>
<string name="add_guest_failed" msgid="8074548434469843443">"Yangi mehmon yaratilmadi"</string>
<string name="user_nickname" msgid="262624187455825083">"Nik"</string>
- <string name="user_add_user" msgid="7876449291500212468">"Foydalanuvchi"</string>
+ <string name="user_add_user" msgid="7876449291500212468">"Foydalanuvchi kiritish"</string>
<string name="guest_new_guest" msgid="3482026122932643557">"Mehmon kiritish"</string>
<string name="guest_exit_guest" msgid="5908239569510734136">"Mehmonni olib tashlash"</string>
<string name="guest_reset_guest" msgid="6110013010356013758">"Mehmon seansini tiklash"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Taxminiy qaytish animatsiyalari"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Taxminiy qaytish uchun tizim animatsiyalarini yoqish."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu sozlamalar taxminiy qaytish animatsiyalari uchun tizim animatsiyalarini faollashtiradi. Buning uchun har bir ilovaning manifest faylida enableOnBackInvokedCallback parametri “true” qiymatida boʻlishi lozim."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Chapga siljitish"</item>
- <item msgid="5425394847942513942">"Pastga siljitish"</item>
- <item msgid="7728484337962740316">"Oʻngga siljitish"</item>
- <item msgid="324200556467459329">"Tepaga siljitish"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"Koʻrsatilmagan"</string>
<string name="neuter" msgid="2075249330106127310">"Oʻrta"</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 9877249adca5..18090352f0a0 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -580,7 +580,7 @@
<string name="user_add_profile_item_title" msgid="3111051717414643029">"Tiểu sử bị hạn chế"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"Thêm người dùng mới?"</string>
<string name="user_add_user_message_long" msgid="1527434966294733380">"Bạn có thể chia sẻ thiết bị này với người khác bằng cách tạo thêm người dùng. Mỗi người dùng sẽ có không gian riêng của mình. Họ có thể tùy chỉnh không gian riêng đó bằng các ứng dụng, hình nền, v.v. Người dùng cũng có thể điều chỉnh các tùy chọn cài đặt thiết bị có ảnh hưởng đến tất cả mọi người, chẳng hạn như Wi‑Fi.\n\nKhi bạn thêm người dùng mới, họ cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác. Các dịch vụ và các tùy chọn cài đặt hỗ trợ tiếp cận có thể không chuyển sang người dùng mới."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"Khi bạn thêm người dùng mới, họ cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"Khi bạn thêm người dùng mới, người đó cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"Đặt người dùng này làm quản trị viên?"</string>
<string name="user_grant_admin_message" msgid="1673791931033486709">"Quản trị viên có các đặc quyền mà những người dùng khác không có. Một quản trị viên có thể quản lý toàn bộ người dùng, cập nhật hoặc đặt lại thiết bị này, sửa đổi chế độ cài đặt, xem tất cả các ứng dụng đã cài đặt và cấp hoặc thu hồi đặc quyền của quản trị viên đối với những người khác."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Đặt làm quản trị viên"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Ảnh xem trước thao tác quay lại"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Bật ảnh của hệ thống để xem trước thao tác quay lại"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Cài đặt này cho phép sử dụng ảnh động hệ thống cho ảnh động cử chỉ dự đoán. Nó yêu cầu cài đặt cho mỗi ứng dụng chuyển enableOnBackInvokedCallback thành lệnh true trong tệp kê khai."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Di chuyển sang trái"</item>
- <item msgid="5425394847942513942">"Di chuyển xuống"</item>
- <item msgid="7728484337962740316">"Di chuyển sang phải"</item>
- <item msgid="324200556467459329">"Di chuyển lên"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Chưa xác định"</string>
<string name="neuter" msgid="2075249330106127310">"Vô tính"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index a210e6c02250..7d027512c8ff 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -560,7 +560,7 @@
<string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"连接时遇到问题。请关闭并重新开启设备"</string>
<string name="media_transfer_wired_device_name" msgid="4447880899964056007">"有线音频设备"</string>
<string name="help_label" msgid="3528360748637781274">"帮助和反馈"</string>
- <string name="storage_category" msgid="2287342585424631813">"存储"</string>
+ <string name="storage_category" msgid="2287342585424631813">"存储空间"</string>
<string name="shared_data_title" msgid="1017034836800864953">"共享数据"</string>
<string name="shared_data_summary" msgid="5516326713822885652">"查看和修改共享数据"</string>
<string name="shared_data_no_blobs_text" msgid="3108114670341737434">"此用户没有共享数据。"</string>
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"预见式返回动画"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"启用系统动画作为预见式返回动画。"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"此设置将启用系统动画作为预测性手势动画。这要求在清单文件中将单个应用的 enableOnBackInvokedCallback 设为 true。"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"左移"</item>
- <item msgid="5425394847942513942">"下移"</item>
- <item msgid="7728484337962740316">"右移"</item>
- <item msgid="324200556467459329">"上移"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
<string name="not_specified" msgid="5423502443185110328">"未指定"</string>
<string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index f78b141eb3f9..c563c86512be 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"預測返回手勢動畫"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"為預測返回手勢啟用系統動畫。"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"此設定會啟用系統動畫作為預測手勢動畫。這必須在資訊清單檔案中將個別應用程式的 enableOnBackInvokedCallback 設定為 true。"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"向左移"</item>
- <item msgid="5425394847942513942">"向下移"</item>
- <item msgid="7728484337962740316">"向右移"</item>
- <item msgid="324200556467459329">"向上移"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"未指定"</string>
<string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index a66a0293d25b..eb3843ea1f1a 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"預測返回操作動畫"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"為預測返回操作啟用系統動畫。"</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"這項設定會啟用系統動畫做為預測手勢動畫。這必須在資訊清單檔案中將個別應用程式的 enableOnBackInvokedCallback 設為 true。"</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"向左移"</item>
- <item msgid="5425394847942513942">"向下移"</item>
- <item msgid="7728484337962740316">"向右移"</item>
- <item msgid="324200556467459329">"向上移"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"未指定"</string>
<string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 45b8c543ad72..f4fd35205f1a 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -684,12 +684,6 @@
<string name="back_navigation_animation" msgid="8105467568421689484">"Ukubikezelwa kwasemuva kopopayi"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Nika amandla ukubikezela emuva kopopayi besistimu."</string>
<string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Leli sethingi livumela opopayi besistimu mayelana nokuthinta okubikezelwayo kopopayi. Idinga ukusetha i-app ngayinye ku-enableOnBackInvokedCallback ukuze iqinisekise ifayela le-manifest."</string>
- <string-array name="udfps_accessibility_touch_hints">
- <item msgid="1737722959616802157">"Yisa kwesokunxele"</item>
- <item msgid="5425394847942513942">"Yehlisa"</item>
- <item msgid="7728484337962740316">"Yisa kwesokudla"</item>
- <item msgid="324200556467459329">"Khuphula"</item>
- </string-array>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Akucacisiwe"</string>
<string name="neuter" msgid="2075249330106127310">"Okungenabulili"</string>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index ec24ab78c616..8dc95f4a5be4 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1665,14 +1665,6 @@
<!-- Developer setting: enable animations when a back gesture is executed, full explanation[CHAR LIMIT=NONE] -->
<string name="back_navigation_animation_dialog">This setting enables system animations for predictive gesture animation. It requires setting per-app "enableOnBackInvokedCallback" to true in the manifest file.</string>
- <!-- [CHAR LIMIT=NONE] Messages shown when users press outside of udfps region during -->
- <string-array name="udfps_accessibility_touch_hints">
- <item>Move left</item>
- <item>Move down</item>
- <item>Move right</item>
- <item>Move up</item>
- </string-array>
-
<!-- Formatting states for the scale of font size, in percent. Double "%" is required to represent the symbol "%". [CHAR LIMIT=20] -->
<string name="font_scale_percentage"> <xliff:g id="percentage">%1$d</xliff:g> %%</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
index ff960f3184db..03d1cda9c071 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
@@ -20,6 +20,8 @@ import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_NO
import static android.app.admin.DevicePolicyManager.MTE_NOT_CONTROLLED_BY_POLICY;
import static android.app.admin.DevicePolicyManager.PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER;
+import static com.android.settingslib.Utils.getColorAttrDefaultColor;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
@@ -125,7 +127,8 @@ public class RestrictedLockUtilsInternal extends RestrictedLockUtils {
return null;
}
- final EnforcedAdmin admin = getProfileOrDeviceOwner(context, enforcingUser.getUserHandle());
+ final EnforcedAdmin admin =
+ getProfileOrDeviceOwner(context, userRestriction, enforcingUser.getUserHandle());
if (admin != null) {
return admin;
}
@@ -638,7 +641,8 @@ public class RestrictedLockUtilsInternal extends RestrictedLockUtils {
removeExistingRestrictedSpans(sb);
if (admin != null) {
- final int disabledColor = context.getColor(R.color.disabled_text_color);
+ final int disabledColor = getColorAttrDefaultColor(context,
+ android.R.attr.textColorHint);
sb.setSpan(new ForegroundColorSpan(disabledColor), 0, sb.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
ImageSpan image = new RestrictedLockImageSpan(context);
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
index dcb0a0712477..8b0f19d455d2 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
@@ -17,7 +17,6 @@
package com.android.settingslib;
import static android.app.admin.DevicePolicyResources.Strings.Settings.CONTROLLED_BY_ADMIN_SUMMARY;
-
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
import android.app.admin.DevicePolicyManager;
@@ -32,6 +31,7 @@ import android.util.TypedValue;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceViewHolder;
@@ -48,7 +48,8 @@ public class RestrictedPreferenceHelper {
int uid;
private boolean mDisabledByAdmin;
- private EnforcedAdmin mEnforcedAdmin;
+ @VisibleForTesting
+ EnforcedAdmin mEnforcedAdmin;
private String mAttrUserRestriction = null;
private boolean mDisabledSummary = false;
@@ -193,8 +194,14 @@ public class RestrictedPreferenceHelper {
* @return true if the disabled state was changed.
*/
public boolean setDisabledByAdmin(EnforcedAdmin admin) {
- final boolean disabled = (admin != null ? true : false);
- mEnforcedAdmin = admin;
+ boolean disabled = false;
+ mEnforcedAdmin = null;
+ if (admin != null) {
+ disabled = true;
+ // Copy the received instance to prevent pass be reference being overwritten.
+ mEnforcedAdmin = new EnforcedAdmin(admin);
+ }
+
boolean changed = false;
if (mDisabledByAdmin != disabled) {
mDisabledByAdmin = disabled;
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index 9d533fabda6d..412a3424bbd1 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -549,7 +549,12 @@ public class Utils {
/**
* Return the combined service state.
- * To make behavior consistent with SystemUI and Settings/AboutPhone/SIM status UI
+ * To make behavior consistent with SystemUI and Settings/AboutPhone/SIM status UI.
+ *
+ * This method returns a single service state int if either the voice reg state is
+ * {@link ServiceState#STATE_IN_SERVICE} or if data network is registered via a
+ * WWAN transport type. We consider the combined service state of an IWLAN network
+ * to be OOS.
*
* @param serviceState Service state. {@link ServiceState}
*/
@@ -558,23 +563,37 @@ public class Utils {
return ServiceState.STATE_OUT_OF_SERVICE;
}
- // Consider the device to be in service if either voice or data
- // service is available. Some SIM cards are marketed as data-only
- // and do not support voice service, and on these SIM cards, we
- // want to show signal bars for data service as well as the "no
- // service" or "emergency calls only" text that indicates that voice
- // is not available. Note that we ignore the IWLAN service state
- // because that state indicates the use of VoWIFI and not cell service
- final int state = serviceState.getState();
- final int dataState = serviceState.getDataRegistrationState();
-
- if (state == ServiceState.STATE_OUT_OF_SERVICE
- || state == ServiceState.STATE_EMERGENCY_ONLY) {
- if (dataState == ServiceState.STATE_IN_SERVICE && isNotInIwlan(serviceState)) {
+ final int voiceRegState = serviceState.getVoiceRegState();
+
+ // Consider a mobile connection to be "in service" if either voice is IN_SERVICE
+ // or the data registration reports IN_SERVICE on a transport type of WWAN. This
+ // effectively excludes the IWLAN condition. IWLAN connections imply service via
+ // Wi-Fi rather than cellular, and so we do not consider these transports when
+ // determining if cellular is "in service".
+
+ if (voiceRegState == ServiceState.STATE_OUT_OF_SERVICE
+ || voiceRegState == ServiceState.STATE_EMERGENCY_ONLY) {
+ if (isDataRegInWwanAndInService(serviceState)) {
return ServiceState.STATE_IN_SERVICE;
}
}
- return state;
+
+ return voiceRegState;
+ }
+
+ // ServiceState#mDataRegState can be set to IN_SERVICE if the network is registered
+ // on either a WLAN or WWAN network. Since we want to exclude the WLAN network, we can
+ // query the WWAN network directly and check for its registration state
+ private static boolean isDataRegInWwanAndInService(ServiceState serviceState) {
+ final NetworkRegistrationInfo networkRegWwan = serviceState.getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS,
+ AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+
+ if (networkRegWwan == null) {
+ return false;
+ }
+
+ return networkRegWwan.isInService();
}
/** Get the corresponding adaptive icon drawable. */
@@ -598,21 +617,6 @@ public class Utils {
UserHandle.getUserHandleForUid(appInfo.uid));
}
- private static boolean isNotInIwlan(ServiceState serviceState) {
- final NetworkRegistrationInfo networkRegWlan = serviceState.getNetworkRegistrationInfo(
- NetworkRegistrationInfo.DOMAIN_PS,
- AccessNetworkConstants.TRANSPORT_TYPE_WLAN);
- if (networkRegWlan == null) {
- return true;
- }
-
- final boolean isInIwlan = (networkRegWlan.getRegistrationState()
- == NetworkRegistrationInfo.REGISTRATION_STATE_HOME)
- || (networkRegWlan.getRegistrationState()
- == NetworkRegistrationInfo.REGISTRATION_STATE_ROAMING);
- return !isInIwlan;
- }
-
/**
* Returns a bitmap with rounded corner.
*
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 64c271bb7bc7..c67df71c1c77 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -54,6 +54,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.stream.Stream;
/**
* CachedBluetoothDevice represents a remote Bluetooth device. It contains
@@ -684,6 +685,20 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
return mDevice.getBatteryLevel();
}
+ /**
+ * Get the lowest battery level from remote device and its member devices
+ * @return battery level in percentage [0-100] or
+ * {@link BluetoothDevice#BATTERY_LEVEL_UNKNOWN}
+ */
+ public int getMinBatteryLevelWithMemberDevices() {
+ return Stream.concat(Stream.of(this), mMemberDevices.stream())
+ .mapToInt(cachedDevice -> cachedDevice.getBatteryLevel())
+ .filter(batteryLevel -> batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN)
+ .min()
+ .orElse(BluetoothDevice.BATTERY_LEVEL_UNKNOWN);
+ }
+
+
void refresh() {
ThreadUtils.postOnBackgroundThread(() -> {
if (BluetoothUtils.isAdvancedDetailsHeader(mDevice)) {
@@ -1185,7 +1200,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
// BluetoothDevice.BATTERY_LEVEL_BLUETOOTH_OFF, or BluetoothDevice.BATTERY_LEVEL_UNKNOWN,
// any other value should be a framework bug. Thus assume here that if value is greater
// than BluetoothDevice.BATTERY_LEVEL_UNKNOWN, it must be valid
- final int batteryLevel = getBatteryLevel();
+ final int batteryLevel = getMinBatteryLevelWithMemberDevices();
if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
// TODO: name com.android.settingslib.bluetooth.Utils something different
batteryLevelPercentageString =
@@ -1360,7 +1375,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
// BluetoothDevice.BATTERY_LEVEL_BLUETOOTH_OFF, or BluetoothDevice.BATTERY_LEVEL_UNKNOWN,
// any other value should be a framework bug. Thus assume here that if value is greater
// than BluetoothDevice.BATTERY_LEVEL_UNKNOWN, it must be valid
- final int batteryLevel = getBatteryLevel();
+ final int batteryLevel = getMinBatteryLevelWithMemberDevices();
if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
// TODO: name com.android.settingslib.bluetooth.Utils something different
batteryLevelPercentageString =
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
index f90a17ae8761..7f1f3f613bce 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
@@ -40,9 +40,7 @@ import java.util.Optional;
* Stores and computes some battery information.
*/
public class BatteryStatus {
- private static final int LOW_BATTERY_THRESHOLD = 20;
- private static final int SEVERE_LOW_BATTERY_THRESHOLD = 10;
- private static final int EXTREME_LOW_BATTERY_THRESHOLD = 3;
+
private static final int DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT = 5000000;
public static final int BATTERY_LEVEL_UNKNOWN = -1;
@@ -50,6 +48,9 @@ public class BatteryStatus {
public static final int CHARGING_SLOWLY = 0;
public static final int CHARGING_REGULAR = 1;
public static final int CHARGING_FAST = 2;
+ public static final int LOW_BATTERY_THRESHOLD = 20;
+ public static final int SEVERE_LOW_BATTERY_THRESHOLD = 10;
+ public static final int EXTREME_LOW_BATTERY_THRESHOLD = 3;
public final int status;
public final int level;
@@ -197,9 +198,14 @@ public class BatteryStatus {
: Math.round((level / (float) scale) * 100f);
}
+ /** Returns the plugged type from {@code batteryChangedIntent}. */
+ public static int getPluggedType(Intent batteryChangedIntent) {
+ return batteryChangedIntent.getIntExtra(EXTRA_PLUGGED, 0);
+ }
+
/** Whether the device is plugged or not. */
public static boolean isPluggedIn(Intent batteryChangedIntent) {
- return isPluggedIn(batteryChangedIntent.getIntExtra(EXTRA_PLUGGED, 0));
+ return isPluggedIn(getPluggedType(batteryChangedIntent));
}
/** Whether the device is plugged or not. */
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
index ad9886e1b0a1..88dcc0def557 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
@@ -22,6 +22,9 @@ import android.content.IntentFilter;
public final class BatteryUtils {
+ /** The key to get the time to full from Settings.Global */
+ public static final String GLOBAL_TIME_TO_FULL_MILLIS = "time_to_full_millis";
+
/** Gets the latest sticky battery intent from the Android system. */
public static Intent getBatteryIntent(Context context) {
return context.registerReceiver(
diff --git a/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java b/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
index 6fba0a169219..77789c268f79 100644
--- a/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
+++ b/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
@@ -24,5 +24,5 @@ public class UidDetail {
public CharSequence[] detailLabels;
public CharSequence[] detailContentDescriptions;
public Drawable icon;
- public CharSequence packageName;
+ public String packageName;
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
index 94e28f2b5e22..a03977c16f66 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
@@ -21,11 +21,8 @@ import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_NO
import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT;
import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT;
import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS;
-
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
-
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
@@ -78,6 +75,8 @@ public class RestrictedLockUtilsTest {
when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE))
.thenReturn(mDevicePolicyManager);
+ when(mContext.getSystemService(DevicePolicyManager.class))
+ .thenReturn(mDevicePolicyManager);
when(mContext.getSystemService(Context.USER_SERVICE))
.thenReturn(mUserManager);
when(mContext.getPackageManager())
@@ -87,14 +86,20 @@ public class RestrictedLockUtilsTest {
}
@Test
- public void checkIfRestrictionEnforced_deviceOwner() {
+ public void checkIfRestrictionEnforced_deviceOwner()
+ throws PackageManager.NameNotFoundException {
UserManager.EnforcingUser enforcingUser = new UserManager.EnforcingUser(mUserId,
UserManager.RESTRICTION_SOURCE_DEVICE_OWNER);
final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS;
when(mUserManager.getUserRestrictionSources(userRestriction,
UserHandle.of(mUserId))).
thenReturn(Collections.singletonList(enforcingUser));
- setUpDeviceOwner(mAdmin1);
+
+ when(mContext.createPackageContextAsUser(any(), eq(0),
+ eq(UserHandle.of(mUserId))))
+ .thenReturn(mContext);
+
+ setUpDeviceOwner(mAdmin1, mUserId);
EnforcedAdmin enforcedAdmin = RestrictedLockUtilsInternal
.checkIfRestrictionEnforced(mContext, userRestriction, mUserId);
@@ -105,14 +110,20 @@ public class RestrictedLockUtilsTest {
}
@Test
- public void checkIfRestrictionEnforced_profileOwner() {
+ public void checkIfRestrictionEnforced_profileOwner()
+ throws PackageManager.NameNotFoundException {
UserManager.EnforcingUser enforcingUser = new UserManager.EnforcingUser(mUserId,
UserManager.RESTRICTION_SOURCE_PROFILE_OWNER);
final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS;
when(mUserManager.getUserRestrictionSources(userRestriction,
UserHandle.of(mUserId))).
thenReturn(Collections.singletonList(enforcingUser));
- setUpProfileOwner(mAdmin1, mUserId);
+
+ when(mContext.createPackageContextAsUser(any(), eq(0),
+ eq(UserHandle.of(mUserId))))
+ .thenReturn(mContext);
+
+ setUpProfileOwner(mAdmin1);
EnforcedAdmin enforcedAdmin = RestrictedLockUtilsInternal
.checkIfRestrictionEnforced(mContext, userRestriction, mUserId);
@@ -326,11 +337,12 @@ public class RestrictedLockUtilsTest {
.thenReturn(Arrays.asList(activeAdmins));
}
- private void setUpDeviceOwner(ComponentName admin) {
+ private void setUpDeviceOwner(ComponentName admin, int userId) {
when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(admin);
+ when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(UserHandle.of(userId));
}
- private void setUpProfileOwner(ComponentName admin, int userId) {
- when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin);
+ private void setUpProfileOwner(ComponentName admin) {
+ when(mDevicePolicyManager.getProfileOwner()).thenReturn(admin);
}
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
index 1b0738fab266..701f00865da9 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
@@ -16,6 +16,7 @@
package com.android.settingslib;
+import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.doReturn;
@@ -119,4 +120,26 @@ public class RestrictedPreferenceHelperTest {
verify(mRestrictedTopLevelPreference, never()).setEnabled(false);
}
+
+ /**
+ * Tests if the instance of {@link RestrictedLockUtils.EnforcedAdmin} is received by
+ * {@link RestrictedPreferenceHelper#setDisabledByAdmin(RestrictedLockUtils.EnforcedAdmin)} as a
+ * copy or as a reference.
+ */
+ @Test
+ public void setDisabledByAdmin_disablePreference_receivedEnforcedAdminIsNotAReference() {
+ RestrictedLockUtils.EnforcedAdmin enforcedAdmin =
+ new RestrictedLockUtils.EnforcedAdmin(/* component */ null,
+ /* enforcedRestriction */ "some_restriction",
+ /* userHandle */ null);
+
+ mHelper.setDisabledByAdmin(enforcedAdmin);
+
+ // If `setDisabledByAdmin` stored `enforcedAdmin` as a reference, then the following
+ // assignment would be propagated.
+ enforcedAdmin.enforcedRestriction = null;
+ assertThat(mHelper.mEnforcedAdmin.enforcedRestriction).isEqualTo("some_restriction");
+
+ assertThat(mHelper.isDisabledByAdmin()).isTrue();
+ }
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
index bb72375499c1..29846ac30909 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
@@ -200,47 +200,55 @@ public class UtilsTest {
@Test
public void isInService_voiceInService_returnTrue() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
assertThat(Utils.isInService(mServiceState)).isTrue();
}
@Test
public void isInService_voiceOutOfServiceDataInService_returnTrue() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
- AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
- when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
- NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN);
+ AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+ when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
assertThat(Utils.isInService(mServiceState)).isTrue();
}
@Test
public void isInService_voiceOutOfServiceDataInServiceOnIwLan_returnFalse() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
- when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
- NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+ when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
+
+ assertThat(Utils.isInService(mServiceState)).isFalse();
+ }
+
+ @Test
+ public void isInService_voiceOutOfServiceDataNull_returnFalse() {
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
+ AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(null);
assertThat(Utils.isInService(mServiceState)).isFalse();
}
@Test
public void isInService_voiceOutOfServiceDataOutOfService_returnFalse() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
- when(mServiceState.getDataRegistrationState()).thenReturn(
- ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
+ AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+ when(mNetworkRegistrationInfo.isInService()).thenReturn(false);
assertThat(Utils.isInService(mServiceState)).isFalse();
}
@Test
public void isInService_ServiceStatePowerOff_returnFalse() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_POWER_OFF);
assertThat(Utils.isInService(mServiceState)).isFalse();
}
@@ -253,7 +261,7 @@ public class UtilsTest {
@Test
public void getCombinedServiceState_ServiceStatePowerOff_returnPowerOff() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_POWER_OFF);
assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
ServiceState.STATE_POWER_OFF);
@@ -261,7 +269,7 @@ public class UtilsTest {
@Test
public void getCombinedServiceState_voiceInService_returnInService() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
ServiceState.STATE_IN_SERVICE);
@@ -269,12 +277,10 @@ public class UtilsTest {
@Test
public void getCombinedServiceState_voiceOutOfServiceDataInService_returnInService() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
- when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
- AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
- when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
- NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN);
+ AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+ when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
ServiceState.STATE_IN_SERVICE);
@@ -282,12 +288,10 @@ public class UtilsTest {
@Test
public void getCombinedServiceState_voiceOutOfServiceDataInServiceOnIwLan_returnOutOfService() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
- when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
- when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
- NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
+ when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
ServiceState.STATE_OUT_OF_SERVICE);
@@ -295,7 +299,7 @@ public class UtilsTest {
@Test
public void getCombinedServiceState_voiceOutOfServiceDataOutOfService_returnOutOfService() {
- when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+ when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
when(mServiceState.getDataRegistrationState()).thenReturn(
ServiceState.STATE_OUT_OF_SERVICE);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index 4b61ff1177bd..85efe69529b4 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -529,6 +529,51 @@ public class CachedBluetoothDeviceTest {
}
@Test
+ public void getConnectionSummary_testMemberDevicesExist_returnMinBattery() {
+ // One device is active with battery level 70.
+ mBatteryLevel = 70;
+ updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+
+ // Add a member device with battery level 30.
+ int lowerBatteryLevel = 30;
+ mCachedDevice.addMemberDevice(mSubCachedDevice);
+ doAnswer((invocation) -> lowerBatteryLevel).when(mSubCachedDevice).getBatteryLevel();
+
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active, 30% battery");
+ }
+
+ @Test
+ public void getConnectionSummary_testMemberDevicesBatteryUnknown_returnMinBattery() {
+ // One device is active with battery level 70.
+ mBatteryLevel = 70;
+ updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+ // Add a member device with battery level unknown.
+ mCachedDevice.addMemberDevice(mSubCachedDevice);
+ doAnswer((invocation) -> BluetoothDevice.BATTERY_LEVEL_UNKNOWN).when(
+ mSubCachedDevice).getBatteryLevel();
+
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active, 70% battery");
+ }
+
+ @Test
+ public void getConnectionSummary_testAllDevicesBatteryUnknown_returnNoBattery() {
+ // One device is active with battery level unknown.
+ updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+ // Add a member device with battery level unknown.
+ mCachedDevice.addMemberDevice(mSubCachedDevice);
+ doAnswer((invocation) -> BluetoothDevice.BATTERY_LEVEL_UNKNOWN).when(
+ mSubCachedDevice).getBatteryLevel();
+
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active");
+ }
+
+ @Test
public void getConnectionSummary_testMultipleProfilesActiveDevice() {
// Test without battery level
// Set A2DP and HFP profiles to be connected and test connection state summary
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index ffe28a6a5202..d267d8056e9d 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -23,6 +23,7 @@
>
<!-- Standard permissions granted to the shell. -->
+ <uses-permission android:name="android.permission.CAMERA_HEADLESS_SYSTEM_USER" />
<uses-permission android:name="android.permission.MANAGE_HEALTH_PERMISSIONS" />
<uses-permission android:name="android.permission.MANAGE_HEALTH_DATA" />
<uses-permission android:name="android.permission.health.READ_EXERCISE_ROUTE" />
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index b6bec1f72c0a..77925d6f03cd 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -240,6 +240,9 @@ filegroup {
/* Log fakes */
"tests/src/com/android/systemui/log/core/FakeLogBuffer.kt",
+
+ /* QS fakes */
+ "tests/src/com/android/systemui/qs/pipeline/domain/interactor/FakeQSTile.kt",
],
path: "tests/src",
}
@@ -293,8 +296,6 @@ filegroup {
/* Biometric converted tests */
"tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt",
- "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt",
- "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt",
"tests/src/com/android/systemui/biometrics/AuthControllerTest.java",
"tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java",
"tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt",
@@ -354,6 +355,11 @@ filegroup {
"tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt",
"tests/src/com/android/systemui/smartspace/LockscreenAndDreamTargetFilterTest.kt",
"tests/src/com/android/systemui/smartspace/LockscreenPreconditionTest.kt",
+
+ /* Quick Settings new pipeline converted tests */
+ "tests/src/com/android/systemui/qs/pipeline/data/**/*Test.kt",
+ "tests/src/com/android/systemui/qs/pipeline/domain/**/*Test.kt",
+ "tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt",
],
path: "tests/src",
}
diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS
index 78da5a699759..8f329b3dddd8 100644
--- a/packages/SystemUI/OWNERS
+++ b/packages/SystemUI/OWNERS
@@ -4,7 +4,6 @@ set noparent
dsandler@android.com
-aaliomer@google.com
aaronjli@google.com
achalke@google.com
acul@google.com
@@ -36,6 +35,7 @@ gallmann@google.com
gwasserman@google.com
hwwang@google.com
hyunyoungs@google.com
+ikateryna@google.com
jaggies@google.com
jamesoleary@google.com
jbolinger@google.com
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/Android.bp b/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
index f358417e6bea..ff723e34d6bc 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
+++ b/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
@@ -36,6 +36,7 @@ android_app {
"androidx.preference_preference",
"androidx.viewpager_viewpager",
"SettingsLibDisplayUtils",
+ "com_android_a11y_menu_flags_lib",
],
optimize: {
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
new file mode 100644
index 000000000000..6d63409ffc06
--- /dev/null
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+ name: "com_android_a11y_menu_flags",
+ package: "com.android.systemui.accessibility.accessibilitymenu",
+ srcs: [
+ "accessibility.aconfig",
+ ],
+}
+
+java_aconfig_library {
+ name: "com_android_a11y_menu_flags_lib",
+ aconfig_declarations: "com_android_a11y_menu_flags",
+}
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
new file mode 100644
index 000000000000..03cbc169a90f
--- /dev/null
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.systemui.accessibility.accessibilitymenu"
+
+flag {
+ name: "a11y_menu_settings_back_button_fix_and_large_button_sizing"
+ namespace: "accessibility"
+ description: "Provides/restores back button functionality for the a11yMenu settings page. Also, fixes sizing problems with large shortcut buttons."
+ bug: "298467628"
+} \ No newline at end of file
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
index 5d1f722aee0c..0480a2e2e909 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
@@ -11,7 +11,7 @@
<string name="recent_apps_label" msgid="6583276995616385847">"ಇತ್ತೀಚಿನ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು"</string>
<string name="lockscreen_label" msgid="648347953557887087">"ಲಾಕ್ ಸ್ಕ್ರೀನ್‌"</string>
<string name="quick_settings_label" msgid="2999117381487601865">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳು"</string>
- <string name="notifications_label" msgid="6829741046963013567">"ಅಧಿಸೂಚನೆಗಳು"</string>
+ <string name="notifications_label" msgid="6829741046963013567">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
<string name="screenshot_label" msgid="863978141223970162">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್"</string>
<string name="screenshot_utterance" msgid="1430760563401895074">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್ ತೆಗೆದುಕೊಳ್ಳಿ"</string>
<string name="volume_up_label" msgid="8592766918780362870">"ವಾಲ್ಯೂಮ್ ಜಾಸ್ತಿ"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
index c26cd12a0c61..bf51e23855d5 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
+++ b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
@@ -27,6 +27,7 @@ import android.provider.Browser;
import android.provider.Settings;
import android.view.View;
import android.widget.TextView;
+import android.window.OnBackInvokedCallback;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
@@ -34,12 +35,16 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
+import com.android.systemui.accessibility.accessibilitymenu.Flags;
import com.android.systemui.accessibility.accessibilitymenu.R;
/**
* Settings activity for AccessibilityMenu.
*/
public class A11yMenuSettingsActivity extends FragmentActivity {
+ private OnBackInvokedCallback mCallback = () -> {
+ finish();
+ };
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -51,6 +56,10 @@ public class A11yMenuSettingsActivity extends FragmentActivity {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowCustomEnabled(true);
+
+ if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ }
actionBar.setCustomView(R.layout.preferences_action_bar);
((TextView) findViewById(R.id.action_bar_title)).setText(
getResources().getString(R.string.accessibility_menu_settings_name)
@@ -61,6 +70,16 @@ public class A11yMenuSettingsActivity extends FragmentActivity {
| ActionBar.DISPLAY_HOME_AS_UP);
}
+ @Override
+ public boolean onNavigateUp() {
+ if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+ mCallback.onBackInvoked();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
/**
* Settings/preferences fragment for AccessibilityMenu.
*/
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
index c64ec6f11b93..c4f372cbce51 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
+++ b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
@@ -28,6 +28,7 @@ import android.widget.ImageButton;
import android.widget.TextView;
import com.android.systemui.accessibility.accessibilitymenu.AccessibilityMenuService;
+import com.android.systemui.accessibility.accessibilitymenu.Flags;
import com.android.systemui.accessibility.accessibilitymenu.R;
import com.android.systemui.accessibility.accessibilitymenu.activity.A11yMenuSettingsActivity.A11yMenuPreferenceFragment;
import com.android.systemui.accessibility.accessibilitymenu.model.A11yMenuShortcut;
@@ -79,6 +80,11 @@ public class A11yMenuAdapter extends BaseAdapter {
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(R.layout.grid_item, parent, false);
+
+ if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+ configureShortcutSize(convertView,
+ A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService));
+ }
}
A11yMenuShortcut shortcutItem = (A11yMenuShortcut) getItem(position);
@@ -126,16 +132,29 @@ public class A11yMenuAdapter extends BaseAdapter {
});
}
- private void configureShortcutView(View convertView, A11yMenuShortcut shortcutItem) {
+ private void configureShortcutSize(View convertView, boolean isLargeButtonsEnabled) {
ImageButton shortcutIconButton = convertView.findViewById(R.id.shortcutIconBtn);
TextView shortcutLabel = convertView.findViewById(R.id.shortcutLabel);
-
- if (A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService)) {
+ if (isLargeButtonsEnabled) {
ViewGroup.LayoutParams params = shortcutIconButton.getLayoutParams();
params.width = (int) (params.width * LARGE_BUTTON_SCALE);
params.height = (int) (params.height * LARGE_BUTTON_SCALE);
shortcutLabel.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, mLargeTextSize);
}
+ }
+
+ private void configureShortcutView(View convertView, A11yMenuShortcut shortcutItem) {
+ ImageButton shortcutIconButton = convertView.findViewById(R.id.shortcutIconBtn);
+ TextView shortcutLabel = convertView.findViewById(R.id.shortcutLabel);
+
+ if (!Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+ if (A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService)) {
+ ViewGroup.LayoutParams params = shortcutIconButton.getLayoutParams();
+ params.width = (int) (params.width * LARGE_BUTTON_SCALE);
+ params.height = (int) (params.height * LARGE_BUTTON_SCALE);
+ shortcutLabel.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, mLargeTextSize);
+ }
+ }
if (shortcutItem.getId() == A11yMenuShortcut.ShortcutId.UNSPECIFIED_ID_VALUE.ordinal()) {
// Sets empty shortcut icon and label when the shortcut is ADD_ITEM.
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
index a3a1fa58e88e..0c076169eb57 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
@@ -24,6 +24,7 @@ import android.graphics.Matrix
import android.graphics.Path
import android.graphics.Rect
import android.graphics.RectF
+import android.os.Build
import android.os.Looper
import android.os.RemoteException
import android.util.Log
@@ -88,6 +89,9 @@ class ActivityLaunchAnimator(
contentAfterFadeInInterpolator = PathInterpolator(0f, 0f, 0.6f, 1f)
)
+ // TODO(b/288507023): Remove this flag.
+ @JvmField val DEBUG_LAUNCH_ANIMATION = Build.IS_DEBUGGABLE
+
private val DEFAULT_LAUNCH_ANIMATOR = LaunchAnimator(TIMINGS, INTERPOLATORS)
private val DEFAULT_DIALOG_TO_APP_ANIMATOR = LaunchAnimator(DIALOG_TIMINGS, INTERPOLATORS)
@@ -244,11 +248,13 @@ class ActivityLaunchAnimator(
callOnIntentStartedOnMainThread(willAnimate)
}
} else {
- // TODO(b/288507023): Remove this log.
- Log.d(
- TAG,
- "Calling controller.onIntentStarted(willAnimate=$willAnimate) [controller=$this]"
- )
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(
+ TAG,
+ "Calling controller.onIntentStarted(willAnimate=$willAnimate) " +
+ "[controller=$this]"
+ )
+ }
this.onIntentStarted(willAnimate)
}
}
@@ -549,8 +555,12 @@ class ActivityLaunchAnimator(
removeTimeout()
iCallback?.invoke()
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [no window opening]")
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(
+ TAG,
+ "Calling controller.onLaunchAnimationCancelled() [no window opening]"
+ )
+ }
controller.onLaunchAnimationCancelled()
return
}
@@ -769,8 +779,9 @@ class ActivityLaunchAnimator(
Log.i(TAG, "Remote animation timed out")
timedOut = true
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [animation timed out]")
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [animation timed out]")
+ }
controller.onLaunchAnimationCancelled()
}
@@ -786,11 +797,12 @@ class ActivityLaunchAnimator(
animation?.cancel()
- // TODO(b/288507023): Remove this log.
- Log.d(
- TAG,
- "Calling controller.onLaunchAnimationCancelled() [remote animation cancelled]",
- )
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(
+ TAG,
+ "Calling controller.onLaunchAnimationCancelled() [remote animation cancelled]",
+ )
+ }
controller.onLaunchAnimationCancelled()
}
diff --git a/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt b/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
index 31e7d7c7c6ba..73b366ef57bc 100644
--- a/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
+++ b/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
@@ -72,15 +72,16 @@ internal class PunchHole(
}
private fun DrawScope.drawHole(bounds: Element) {
+ val boundsSize = bounds.lastSize.toSize()
if (shape == RectangleShape) {
- drawRect(Color.Black, blendMode = BlendMode.DstOut)
+ drawRect(Color.Black, size = boundsSize, blendMode = BlendMode.DstOut)
return
}
// TODO(b/290184746): Cache outline if the size of bounds does not change.
drawOutline(
shape.createOutline(
- bounds.lastSize.toSize(),
+ boundsSize,
layoutDirection,
this,
),
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
index 81b9eb067e7f..e06a69bfaa63 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
@@ -55,6 +55,7 @@ import com.android.systemui.bouncer.ui.viewmodel.PasswordBouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.PatternBouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.PinBouncerViewModel
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.scene.shared.model.Direction
import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.scene.shared.model.SceneModel
import com.android.systemui.scene.shared.model.UserAction
@@ -82,9 +83,10 @@ constructor(
override val key = SceneKey.Bouncer
override fun destinationScenes(): StateFlow<Map<UserAction, SceneModel>> =
- MutableStateFlow<Map<UserAction, SceneModel>>(
+ MutableStateFlow(
mapOf(
UserAction.Back to SceneModel(SceneKey.Lockscreen),
+ UserAction.Swipe(Direction.DOWN) to SceneModel(SceneKey.Lockscreen),
)
)
.asStateFlow()
diff --git a/packages/SystemUI/proguard_common.flags b/packages/SystemUI/proguard_common.flags
index 75de94321bfe..e2d889168516 100644
--- a/packages/SystemUI/proguard_common.flags
+++ b/packages/SystemUI/proguard_common.flags
@@ -1,16 +1,8 @@
-# Preserve line number information for debugging stack traces.
--keepattributes SourceFile,LineNumberTable
-
-keep class com.android.systemui.VendorServices
# the `#inject` methods are accessed via reflection to work on ContentProviders
-keepclassmembers class * extends com.android.systemui.dagger.SysUIComponent { void inject(***); }
-# Needed for builds to properly initialize KeyFrames from xml scene
--keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
- public <init>();
-}
-
# Needed to ensure callback field references are kept in their respective
# owning classes when the downstream callback registrars only store weak refs.
# TODO(b/264686688): Handle these cases with more targeted annotations.
@@ -59,7 +51,6 @@
public <init>(android.content.Context, android.util.AttributeSet);
}
--keep class ** extends androidx.preference.PreferenceFragment
-keep class com.android.systemui.tuner.*
# The plugins and core log subpackages act as shared libraries that might be referenced in
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml
new file mode 100644
index 000000000000..6835d59658d4
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+**
+** Copyright 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.
+*/
+-->
+
+<!-- This file is needed when flag lockscreen.enable_landscape is on
+ Required for landscape lockscreen on small screens. -->
+<com.android.keyguard.KeyguardPINView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/keyguard_pin_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_horizontal|bottom"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:orientation="vertical">
+
+ <!-- Layout here is visually identical to the previous keyguard_pin_view.
+ I.E., 'constraints here effectively the same as the previous linear layout '-->
+ <androidx.constraintlayout.motion.widget.MotionLayout
+ android:id="@+id/pin_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:layoutDirection="ltr"
+ android:orientation="vertical"
+ androidprv:layoutDescription="@xml/keyguard_pin_scene"
+ android:layout_gravity="center_horizontal">
+
+ <!-- Guideline need to align PIN pad left of centre,
+ when on small screen landscape layout -->
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/pin_pad_center_guideline"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ androidprv:layout_constraintGuide_percent="0.5" />
+
+ <!-- Guideline used to place the top row of keys relative to the screen height. This will be
+ updated in KeyguardPINView to reduce the height of the PIN pad. -->
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/pin_pad_top_guideline"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ androidprv:layout_constraintGuide_percent="0" />
+
+ <LinearLayout
+ android:id="@+id/keyguard_bouncer_message_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:layoutDirection="ltr"
+ android:orientation="vertical"
+ androidprv:layout_constraintTop_toTopOf="parent">
+
+ <include layout="@layout/keyguard_bouncer_message_area" />
+
+ <com.android.systemui.bouncer.ui.BouncerMessageView
+ android:id="@+id/bouncer_message_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" />
+
+ </LinearLayout>
+
+ <!-- Set this to be just above key1. It would be better to introduce a barrier above
+ key1/key2/key3, then place this View above that. Sadly, that doesn't work (the Barrier
+ drops to the bottom of the page, and key1/2/3 all shoot up to the top-left). In any
+ case, the Flow should ensure that key1/2/3 all have the same top, so this should be
+ fine. -->
+ <com.android.keyguard.AlphaOptimizedRelativeLayout
+ android:id="@+id/row0"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
+ androidprv:layout_constraintBottom_toTopOf="@id/key1"
+ androidprv:layout_constraintEnd_toEndOf="parent"
+ androidprv:layout_constraintStart_toStartOf="parent"
+ androidprv:layout_constraintTop_toBottomOf="@id/keyguard_bouncer_message_container"
+ androidprv:layout_constraintVertical_bias="0.5">
+
+ <com.android.keyguard.PasswordTextView
+ android:id="@+id/pinEntry"
+ style="@style/Widget.TextView.Password"
+ android:layout_width="@dimen/keyguard_security_width"
+ android:layout_height="@dimen/keyguard_password_height"
+ android:layout_centerHorizontal="true"
+ android:layout_marginRight="72dp"
+ android:contentDescription="@string/keyguard_accessibility_pin_area"
+ androidprv:scaledTextSize="@integer/scaled_password_text_size" />
+
+ </com.android.keyguard.AlphaOptimizedRelativeLayout>
+
+ <com.android.keyguard.KeyguardPinFlowView
+ android:id="@+id/flow1"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginBottom="8dp"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:orientation="horizontal"
+
+ androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
+
+ androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
+ androidprv:flow_horizontalStyle="packed"
+ androidprv:flow_maxElementsWrap="3"
+
+ androidprv:flow_verticalBias="1.0"
+ androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
+ androidprv:flow_verticalStyle="packed"
+ androidprv:flow_wrapMode="aligned"
+
+ androidprv:layout_constraintBottom_toTopOf="@+id/keyguard_selector_fade_container"
+ androidprv:layout_constraintEnd_toEndOf="parent"
+ androidprv:layout_constraintStart_toStartOf="parent"
+ androidprv:layout_constraintTop_toBottomOf="@id/pin_pad_top_guideline" />
+
+ <com.android.keyguard.NumPadButton
+ android:id="@+id/delete_button"
+ style="@style/NumPadKey.Delete"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key0"
+ android:contentDescription="@string/keyboardview_keycode_delete" />
+
+ <com.android.keyguard.NumPadButton
+ android:id="@+id/key_enter"
+ style="@style/NumPadKey.Enter"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:contentDescription="@string/keyboardview_keycode_enter" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key1"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key2"
+ androidprv:digit="1"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key2"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key3"
+ androidprv:digit="2"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key3"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key4"
+ androidprv:digit="3"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key4"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key5"
+ androidprv:digit="4"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key5"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key6"
+ androidprv:digit="5"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key6"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key7"
+ androidprv:digit="6"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key7"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key8"
+ androidprv:digit="7"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key8"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key9"
+ androidprv:digit="8"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key9"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/delete_button"
+ androidprv:digit="9"
+ androidprv:textView="@+id/pinEntry" />
+
+ <com.android.keyguard.NumPadKey
+ android:id="@+id/key0"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:accessibilityTraversalBefore="@id/key_enter"
+ androidprv:digit="0"
+ androidprv:textView="@+id/pinEntry" />
+
+ <include
+ android:id="@+id/keyguard_selector_fade_container"
+ layout="@layout/keyguard_eca"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
+ android:layout_marginTop="@dimen/keyguard_eca_top_margin"
+ android:orientation="vertical"
+ androidprv:layout_constraintBottom_toBottomOf="parent"
+ androidprv:layout_constraintTop_toBottomOf="@+id/flow1" />
+
+ </androidx.constraintlayout.motion.widget.MotionLayout>
+
+</com.android.keyguard.KeyguardPINView> \ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/values-land/donottranslate.xml b/packages/SystemUI/res-keyguard/values-land/donottranslate.xml
deleted file mode 100644
index 9912b699507e..000000000000
--- a/packages/SystemUI/res-keyguard/values-land/donottranslate.xml
+++ /dev/null
@@ -1,19 +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.
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="num_pad_key_ratio">1.51</string>
-</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sq/strings.xml b/packages/SystemUI/res-keyguard/values-sq/strings.xml
index 84f7bb5b08a8..ce53b7ed3a98 100644
--- a/packages/SystemUI/res-keyguard/values-sq/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-sq/strings.xml
@@ -28,7 +28,7 @@
<string name="keyguard_enter_password" msgid="6483623792371009758">"Fut fjalëkalimin"</string>
<string name="keyguard_sim_error_message_short" msgid="633630844240494070">"Karta e pavlefshme."</string>
<string name="keyguard_charged" msgid="5478247181205188995">"I karikuar"</string>
- <string name="keyguard_plugged_in_wireless" msgid="2537874724955057383">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet me valë"</string>
+ <string name="keyguard_plugged_in_wireless" msgid="2537874724955057383">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet në mënyrë wireless"</string>
<string name="keyguard_plugged_in_dock" msgid="2122073051904360987">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet"</string>
<string name="keyguard_plugged_in" msgid="8169926454348380863">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet"</string>
<string name="keyguard_plugged_in_charging_fast" msgid="4386594091107340426">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet me shpejtësi"</string>
@@ -41,7 +41,7 @@
<string name="keyguard_missing_sim_instructions" msgid="7735360104844653246">"Shto një kartë SIM."</string>
<string name="keyguard_missing_sim_instructions_long" msgid="3451467338947610268">"Karta SIM mungon ose është e palexueshme. Shto një kartë SIM."</string>
<string name="keyguard_permanent_disabled_sim_message_short" msgid="3955052454216046100">"Kartë SIM e papërdorshme."</string>
- <string name="keyguard_permanent_disabled_sim_instructions" msgid="5034635040020685428">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit me valë për një kartë tjetër SIM."</string>
+ <string name="keyguard_permanent_disabled_sim_instructions" msgid="5034635040020685428">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit wireless për një tjetër kartë SIM."</string>
<string name="keyguard_sim_locked_message" msgid="7095293254587575270">"Karta SIM është e kyçur."</string>
<string name="keyguard_sim_puk_locked_message" msgid="2503428315518592542">"Karta SIM është e kyçur me PUK."</string>
<string name="keyguard_sim_unlock_progress_dialog_message" msgid="8489092646014631659">"Karta SIM po shkyçet…"</string>
diff --git a/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml b/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml
new file mode 100644
index 000000000000..44af9efffbf8
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 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.
+*/
+-->
+
+<MotionScene
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:motion="http://schemas.android.com/apk/res-auto"
+ xmlns:androidprv="http://schemas.android.com/apk/res-auto">
+
+ <Transition
+ motion:constraintSetStart="@id/single_constraints"
+ motion:constraintSetEnd="@+id/split_constraints"
+ motion:duration="0"
+ motion:autoTransition="none">
+ </Transition>
+
+ <ConstraintSet android:id="@+id/single_constraints">
+ <!-- No changes to default layout -->
+ </ConstraintSet>
+
+ <ConstraintSet android:id="@+id/split_constraints">
+
+ <Constraint
+ android:id="@+id/keyguard_bouncer_message_container"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+ androidprv:layout_constraintStart_toStartOf="parent"
+ androidprv:layout_constraintTop_toTopOf="parent" />
+ <Constraint
+ android:id="@+id/row0"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+ androidprv:layout_constraintStart_toStartOf="parent"
+ androidprv:layout_constraintTop_toBottomOf="@+id/keyguard_bouncer_message_container" />
+ <Constraint
+ android:id="@+id/flow1"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ androidprv:layout_constraintBottom_toBottomOf="parent"
+ androidprv:layout_constraintEnd_toEndOf="parent"
+ androidprv:layout_constraintStart_toStartOf="@+id/pin_pad_center_guideline"
+ androidprv:layout_constraintTop_toTopOf="parent"
+ android:layout_marginBottom="0dp"
+ androidprv:flow_verticalBias="0.5" />
+ <Constraint
+ android:id="@+id/keyguard_selector_fade_container"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ androidprv:layout_constraintBottom_toBottomOf="parent"
+ androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+ androidprv:layout_constraintStart_toStartOf="parent"
+ android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
+ android:layout_marginTop="@dimen/keyguard_eca_top_margin" />
+
+ </ConstraintSet>
+</MotionScene> \ No newline at end of file
diff --git a/packages/SystemUI/res-product/values-sq/strings.xml b/packages/SystemUI/res-product/values-sq/strings.xml
index 619f22fe3978..f7421c1a2801 100644
--- a/packages/SystemUI/res-product/values-sq/strings.xml
+++ b/packages/SystemUI/res-product/values-sq/strings.xml
@@ -20,7 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="dock_alignment_slow_charging" product="default" msgid="6997633396534416792">"Drejtvendose përsëri telefonin për karikim më të shpejtë"</string>
- <string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"Drejtvendose përsëri telefonin për ta karikuar me valë"</string>
+ <string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"Drejtvendose përsëri telefonin për karikim wireless"</string>
<string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Pajisja Android TV së shpejti do të fiket. Shtyp një buton për ta mbajtur të ndezur."</string>
<string name="inattentive_sleep_warning_message" product="default" msgid="5693904520452332224">"Pajisja së shpejti do të fiket. Shtype për ta mbajtur të ndezur."</string>
<string name="keyguard_missing_sim_message" product="tablet" msgid="408124574073032188">"Nuk ka kartë SIM në tablet."</string>
diff --git a/packages/SystemUI/res/layout/auth_biometric_contents.xml b/packages/SystemUI/res/layout/auth_biometric_contents.xml
deleted file mode 100644
index 50b3bec93731..000000000000
--- a/packages/SystemUI/res/layout/auth_biometric_contents.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-<!--
- ~ Copyright (C) 2019 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<!-- TODO(b/251476085): inline in biometric_prompt_layout after Biometric*Views are un-flagged -->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <TextView
- android:id="@+id/title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="@integer/biometric_dialog_text_gravity"
- android:singleLine="true"
- android:marqueeRepeatLimit="1"
- android:ellipsize="marquee"
- android:importantForAccessibility="no"
- style="@style/TextAppearance.AuthCredential.Title"/>
-
- <TextView
- android:id="@+id/subtitle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="@integer/biometric_dialog_text_gravity"
- android:singleLine="true"
- android:marqueeRepeatLimit="1"
- android:ellipsize="marquee"
- android:importantForAccessibility="no"
- style="@style/TextAppearance.AuthCredential.Subtitle"/>
-
- <TextView
- android:id="@+id/description"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scrollbars ="vertical"
- style="@style/TextAppearance.AuthCredential.Description"/>
-
- <Space android:id="@+id/space_above_icon"
- android:layout_width="match_parent"
- android:layout_height="48dp" />
-
- <FrameLayout
- android:id="@+id/biometric_icon_frame"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center">
-
- <include layout="@layout/auth_biometric_icon"/>
-
- <com.android.systemui.biometrics.BiometricPromptLottieViewWrapper
- android:id="@+id/biometric_icon_overlay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:scaleType="fitXY" />
- </FrameLayout>
-
- <!-- For sensors such as UDFPS, this view is used during custom measurement/layout to add extra
- padding so that the biometric icon is always in the right physical position. -->
- <Space android:id="@+id/space_below_icon"
- android:layout_width="match_parent"
- android:layout_height="12dp" />
-
- <TextView
- android:id="@+id/indicator"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingHorizontal="24dp"
- android:textSize="12sp"
- android:gravity="center_horizontal"
- android:accessibilityLiveRegion="polite"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:marqueeRepeatLimit="marquee_forever"
- android:scrollHorizontally="true"
- android:fadingEdge="horizontal"
- android:textColor="@color/biometric_dialog_gray"/>
-
- <LinearLayout
- android:id="@+id/button_bar"
- android:layout_width="match_parent"
- android:layout_height="88dp"
- style="?android:attr/buttonBarStyle"
- android:orientation="horizontal"
- android:paddingTop="24dp">
-
- <Space android:id="@+id/leftSpacer"
- android:layout_width="8dp"
- android:layout_height="match_parent"
- android:visibility="visible" />
-
- <!-- Negative Button, reserved for app -->
- <Button android:id="@+id/button_negative"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
- android:layout_gravity="center_vertical"
- android:ellipsize="end"
- android:maxLines="2"
- android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"/>
- <!-- Cancel Button, replaces negative button when biometric is accepted -->
- <Button android:id="@+id/button_cancel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
- android:layout_gravity="center_vertical"
- android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"
- android:text="@string/cancel"
- android:visibility="gone"/>
- <!-- "Use Credential" Button, replaces if device credential is allowed -->
- <Button android:id="@+id/button_use_credential"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
- android:layout_gravity="center_vertical"
- android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"
- android:visibility="gone"/>
-
- <Space android:id="@+id/middleSpacer"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:visibility="visible"/>
-
- <!-- Positive Button -->
- <Button android:id="@+id/button_confirm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@*android:style/Widget.DeviceDefault.Button.Colored"
- android:layout_gravity="center_vertical"
- android:ellipsize="end"
- android:maxLines="2"
- android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
- android:text="@string/biometric_dialog_confirm"
- android:visibility="gone"/>
- <!-- Try Again Button -->
- <Button android:id="@+id/button_try_again"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@*android:style/Widget.DeviceDefault.Button.Colored"
- android:layout_gravity="center_vertical"
- android:ellipsize="end"
- android:maxLines="2"
- android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
- android:text="@string/biometric_dialog_try_again"
- android:visibility="gone"/>
-
- <Space android:id="@+id/rightSpacer"
- android:layout_width="8dp"
- android:layout_height="match_parent"
- android:visibility="visible" />
- </LinearLayout>
-
-</merge> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml b/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml
deleted file mode 100644
index 896d8362f5b9..000000000000
--- a/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml
+++ /dev/null
@@ -1,26 +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.
- -->
-<!-- TODO(b/251476085): remove after BiometricFingerprintAndFaceView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/contents"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceView> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/battery_percentage_view.xml b/packages/SystemUI/res/layout/battery_percentage_view.xml
index 82facd0d7217..8b5aeaac424a 100644
--- a/packages/SystemUI/res/layout/battery_percentage_view.xml
+++ b/packages/SystemUI/res/layout/battery_percentage_view.xml
@@ -27,4 +27,5 @@
android:gravity="center_vertical|start"
android:paddingStart="@dimen/battery_level_padding_start"
android:importantForAccessibility="no"
+ android:includeFontPadding="false"
/>
diff --git a/packages/SystemUI/res/layout/battery_status_chip.xml b/packages/SystemUI/res/layout/battery_status_chip.xml
index ff68ac0f9a71..74371839e247 100644
--- a/packages/SystemUI/res/layout/battery_status_chip.xml
+++ b/packages/SystemUI/res/layout/battery_status_chip.xml
@@ -25,7 +25,8 @@
<LinearLayout
android:id="@+id/rounded_container"
android:layout_width="wrap_content"
- android:layout_height="@dimen/ongoing_appops_chip_height"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/ongoing_appops_chip_height"
android:layout_gravity="center"
android:background="@drawable/statusbar_chip_bg"
android:clipToOutline="true"
@@ -36,7 +37,7 @@
<com.android.systemui.battery.BatteryMeterView
android:id="@+id/battery_meter_view"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp" />
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 3a15ae4f17ff..60a78d6346f1 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -118,34 +118,37 @@ frame when animating QS <-> QQS transition
app:layout_constraintStart_toEndOf="@id/date"
app:layout_constraintTop_toTopOf="@id/clock" />
- <LinearLayout
+ <FrameLayout
android:id="@+id/shade_header_system_icons"
android:layout_width="wrap_content"
android:layout_height="@dimen/shade_header_system_icons_height"
- android:clickable="true"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:paddingStart="@dimen/shade_header_system_icons_padding_start"
- android:paddingEnd="@dimen/shade_header_system_icons_padding_end"
- android:paddingTop="@dimen/shade_header_system_icons_padding_top"
- android:paddingBottom="@dimen/shade_header_system_icons_padding_bottom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/privacy_container"
app:layout_constraintTop_toTopOf="@id/clock">
-
- <com.android.systemui.statusbar.phone.StatusIconContainer
- android:id="@+id/statusIcons"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:paddingEnd="@dimen/signal_cluster_battery_padding" />
-
- <com.android.systemui.battery.BatteryMeterView
- android:id="@+id/batteryRemainingIcon"
+ <LinearLayout
+ android:id="@+id/hover_system_icons_container"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:textAppearance="@style/TextAppearance.QS.Status" />
- </LinearLayout>
+ android:layout_height="match_parent"
+ android:layout_gravity="right|center_vertical"
+ android:paddingStart="@dimen/hover_system_icons_container_padding_start"
+ android:paddingEnd="@dimen/hover_system_icons_container_padding_end"
+ android:paddingTop="@dimen/hover_system_icons_container_padding_top"
+ android:paddingBottom="@dimen/hover_system_icons_container_padding_bottom">
+
+ <com.android.systemui.statusbar.phone.StatusIconContainer
+ android:id="@+id/statusIcons"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:paddingEnd="@dimen/signal_cluster_battery_padding" />
+
+ <com.android.systemui.battery.BatteryMeterView
+ android:id="@+id/batteryRemainingIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:textAppearance="@style/TextAppearance.QS.Status" />
+ </LinearLayout>
+ </FrameLayout>
<FrameLayout
android:id="@+id/privacy_container"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 59fcf0ea366c..5a70b79cb176 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -79,6 +79,7 @@
android:id="@+id/status_bar_start_side_except_heads_up"
android:layout_height="wrap_content"
android:layout_width="match_parent"
+ android:layout_gravity="center_vertical|start"
android:clipChildren="false">
<ViewStub
android:id="@+id/operator_name_stub"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 206a7eeda5c1..27db1c95d2f4 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Skuif af"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Beweeg links"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Beweeg regs"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrotingwisselaar"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Vergroot die hele skerm"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Vergroot \'n deel van die skerm"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent-aandag is aan"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Stel versteknotasapp in Instellings"</string>
<string name="install_app" msgid="5066668100199613936">"Installeer app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Sinkroniseer wedersyds na eksterne skerm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktiveer skerm"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoon en kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Onlangse appgebruik"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Sien onlangse toegang"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 09157f8a7b6d..a68ec1513356 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ወደ ታች ውሰድ"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ወደ ግራ ውሰድ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ወደ ቀኝ ውሰድ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"የማጉላት ማብሪያ/ማጥፊያ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ሙሉ ገፅ እይታን ያጉሉ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"የማያ ገጹን ክፍል አጉላ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"የረዳት ትኩረት በርቷል"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"በቅንብሮች ውስጥ ነባሪ የማስታወሻዎች መተግበሪያን ያቀናብሩ"</string>
<string name="install_app" msgid="5066668100199613936">"መተግበሪያን ጫን"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ወደ ውጫዊ ማሳያ ይንጸባረቅ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ማሳያን አንቃ"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ማይክሮፎን እና ካሜራ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"የቅርብ ጊዜ የመተግበሪያ አጠቃቀም"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"የቅርብ ጊዜ መዳረሻን አሳይ"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 31b7cbe31cc2..42e60c50d95d 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"نقل للأسفل"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"نقل لليسار"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"نقل لليمين"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"مفتاح تبديل وضع التكبير"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"تكبير الشاشة كلها"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"تكبير جزء من الشاشة"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"‏ميزة لفت انتباه \"مساعد Google\" مفعّلة."</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"يمكنك ضبط تطبيق تدوين الملاحظات التلقائي في \"الإعدادات\"."</string>
<string name="install_app" msgid="5066668100199613936">"تثبيت التطبيق"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"هل تريد بث محتوى جهازك على الشاشة الخارجية؟"</string>
+ <string name="enable_display" msgid="8308309634883321977">"تفعيل العرض"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"الميكروفون والكاميرا"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"آخر استخدام في التطبيقات"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"عرض آخر استخدام في التطبيقات"</string>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index 732d19d09283..7026e0c4d754 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"তললৈ নিয়ক"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"বাওঁফাললৈ নিয়ক"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"সোঁফাললৈ নিয়ক"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"বিবৰ্ধনৰ ছুইচ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"পূৰ্ণ স্ক্ৰীন বিবৰ্ধন কৰক"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"স্ক্ৰীনৰ কিছু অংশ বিবৰ্ধন কৰক"</string>
@@ -1132,7 +1140,7 @@
<string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g>ক আটাইবোৰ ডিভাইচৰ লগ এক্সেছ কৰাৰ অনুমতি প্ৰদান কৰিবনে?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"কেৱল এবাৰ এক্সেছ কৰাৰ অনুমতি দিয়ক"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"অনুমতি নিদিব"</string>
- <string name="log_access_confirmation_body" msgid="6883031912003112634">"আপোনাৰ ডিভাইচত কি কি ঘটে সেয়া ডিভাইচ লগে ৰেকৰ্ড কৰে। এপ্‌সমূহে সমস্যা বিচাৰিবলৈ আৰু সমাধান কৰিবলৈ এই লগসমূহ ব্যৱহাৰ কৰিব পাৰে।\n\nকিছুমান লগত সংবেদনশীল তথ্য থাকিব পাৰে, গতিকে কেৱল আপুনি বিশ্বাস কৰা এপকহে আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি দিয়ক। \n\nআপুনি যদি এই এপ্‌টোক আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি নিদিয়ে, তথাপিও ই নিজৰ লগসমূহ এক্সেছ কৰিব পাৰিব। আপোনাৰ ডিভাইচৰ নিৰ্মাতাই তথাপিও হয়তো আপোনাৰ ডিভাইচটোত থকা কিছু লগ অথবা তথ্য এক্সেছ কৰিব পাৰিব।"</string>
+ <string name="log_access_confirmation_body" msgid="6883031912003112634">"আপোনাৰ ডিভাইচত কি কি ঘটে সেয়া ডিভাইচ লগে ৰেকৰ্ড কৰে। এপ্‌সমূহে সমস্যা বিচাৰিবলৈ আৰু সমাধান কৰিবলৈ এই লগসমূহ ব্যৱহাৰ কৰিব পাৰে।\n\nকিছুমানৰ লগত সংবেদনশীল তথ্য থাকিব পাৰে, গতিকে কেৱল আপুনি বিশ্বাস কৰা এপকহে আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি দিয়ক। \n\nআপুনি যদি এই এপ্‌টোক আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি নিদিয়ে, তথাপিও ই নিজৰ লগসমূহ এক্সেছ কৰিব পাৰিব। আপোনাৰ ডিভাইচৰ নিৰ্মাতাই তথাপিও হয়তো আপোনাৰ ডিভাইচটোত থকা কিছু লগ অথবা তথ্য এক্সেছ কৰিব পাৰিব।"</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"অধিক জানক"</string>
<string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"<xliff:g id="URL">%s</xliff:g>ত অধিক জানক"</string>
<string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"<xliff:g id="APPNAME">%1$s</xliff:g> খোলক"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistantএ আপোনাৰ কথা শুনি আছে"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ছেটিঙত টোকাৰ ডিফ’ল্ট এপ্ ছেট কৰক"</string>
<string name="install_app" msgid="5066668100199613936">"এপ্‌টো ইনষ্টল কৰক"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"বাহ্যিক ডিছপ্লে’লৈ মিৰ’ৰ কৰিবনে?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ডিছপ্লে’ সক্ষম কৰক"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"মাইক্ৰ’ফ’ন আৰু কেমেৰা"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"শেহতীয়া এপৰ ব্যৱহাৰ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"শেহতীয়া এক্সেছ চাওক"</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 080f450432fc..68a8b87865b7 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Aşağı köçürün"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Sola köçürün"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Sağa köçürün"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Böyütmə dəyişdiricisi"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Tam ekranı böyüdün"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekran hissəsinin böyüdülməsi"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent aktivdir"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ayarlarda defolt qeydlər tətbiqi ayarlayın"</string>
<string name="install_app" msgid="5066668100199613936">"Tətbiqi quraşdırın"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Xarici displeyə əks etdirilsin?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Displeyi aktivləşdirin"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon və kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Son tətbiq istifadəsi"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Son girişə baxın"</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index b524c343548f..37aa8231a77d 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Pomerite nadole"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Pomerite nalevo"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Pomerite nadesno"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prelazak na drugi režim uvećanja"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Uvećajte ceo ekran"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Uvećajte deo ekrana"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Pomoćnik je u aktivnom stanju"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Podesite podrazumevanu aplikaciju za beleške u Podešavanjima"</string>
<string name="install_app" msgid="5066668100199613936">"Instaliraj aplikaciju"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite li da preslikate na spoljnji ekran?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Omogući ekran"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavno koristila aplikacija"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Prikaži nedavni pristup"</string>
@@ -1186,10 +1192,10 @@
<string name="privacy_dialog_manage_permissions" msgid="2543451567190470413">"Upravljaj pristupom"</string>
<string name="privacy_dialog_active_call_usage" msgid="7858746847946397562">"Koristi telefonski poziv"</string>
<string name="privacy_dialog_recent_call_usage" msgid="1214810644978167344">"Nedavno korišćeno u telefonskom pozivu"</string>
- <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Koristi <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="privacy_dialog_recent_app_usage" msgid="4883417856848222450">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
- <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Koristi <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
+ <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
- <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koristi <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_active_app_usage_2" msgid="2770926061339921767">"Koriste <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">"Nedavno koristila aplikacija <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>
</resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index dd8199edb123..69fce40145ea 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Перамясціць ніжэй"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Перамясціць улева"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Перамясціць управа"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Пераключальнік павелічэння"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Павялічыць увесь экран"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Павялічыць частку экрана"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Памочнік гатовы выконваць каманды"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайце ў Наладах стандартную праграму для нататак"</string>
<string name="install_app" msgid="5066668100199613936">"Усталяваць праграму"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Адлюстраваць на знешнім дысплеі?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Уключыць дысплэй"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Мікрафон і камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Нядаўна выкарыстоўваліся праграмамі"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Паглядзець нядаўні доступ"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 896756dc9b37..3c0dd63762d5 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Преместване надолу"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Преместване наляво"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Преместване надясно"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Превключване на увеличението"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увеличаване на целия екран"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увеличаване на част от екрана"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Функцията за активиране на Асистент е включена"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайте стандартно приложение за бележки от настройките"</string>
<string name="install_app" msgid="5066668100199613936">"Инсталиране на приложението"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Да се дублира ли на външния екран?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Активиране на екрана"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Скорошно използване на приложението"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Вижте скорошния достъп"</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 5c1b445fc1d9..0975b987d06a 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"নিচে নামান"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"বাঁদিকে সরান"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ডানদিকে সরান"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"বড় করে দেখার সুইচ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"সম্পূর্ণ স্ক্রিন বড় করে দেখা"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"স্ক্রিনের কিছুটা অংশ বড় করুন"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"অ্যাসিস্ট্যান্ট আপনার কথা শোনার জন্য চালু করা আছে"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"\'সেটিংস\' থেকে ডিফল্ট নোট নেওয়ার অ্যাপ সেট করুন"</string>
<string name="install_app" msgid="5066668100199613936">"অ্যাপ ইনস্টল করুন"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"এক্সটার্নাল ডিসপ্লে আয়না?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ডিসপ্লে চালু করুন"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"মাইক্রোফোন ও ক্যামেরা"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"সম্প্রতি ব্যবহার করা অ্যাপ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"সাম্প্রতিক অ্যাক্সেস দেখুন"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 63f62f173ec5..021ba8aba8c3 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Pomjeranje prema dolje"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Pomjeranje lijevo"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Pomjeranje desno"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prekidač za uvećavanje"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Uvećavanje prikaza preko cijelog ekrana"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Uvećavanje dijela ekrana"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Pažnja Asistenta je uključena"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Postavite zadanu aplikaciju za bilješke u Postavkama"</string>
<string name="install_app" msgid="5066668100199613936">"Instaliraj aplikaciju"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Preslikati na vanjski ekran?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Omogući ekran"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavno korištenje aplikacije"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Prikaži nedavni pristup"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index f54a0acca100..ab2c25bc8262 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mou cap avall"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mou cap a l\'esquerra"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mou cap a la dreta"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Canvia al mode d\'ampliació"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Amplia la pantalla completa"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Amplia una part de la pantalla"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"L\'Assistent està activat"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defineix l\'aplicació de notes predeterminada a Configuració"</string>
<string name="install_app" msgid="5066668100199613936">"Instal·la l\'aplicació"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vols replicar-ho a la pantalla externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Activa la pantalla"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micròfon i càmera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Ús recent de l\'aplicació"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Mostra l\'accés recent"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 1bfe1f4ecdad..9bde3bb1eadd 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -112,7 +112,7 @@
<string name="screenrecord_continue" msgid="4055347133700593164">"Začít"</string>
<string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Nahrávání obrazovky"</string>
<string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Nahrávání obrazovky a zvuku"</string>
- <string name="screenrecord_taps_label" msgid="1595690528298857649">"Zobrazovat klepnutí na obrazovku"</string>
+ <string name="screenrecord_taps_label" msgid="1595690528298857649">"Zobrazovat klepnutí na displej"</string>
<string name="screenrecord_stop_label" msgid="72699670052087989">"Zastavit"</string>
<string name="screenrecord_share_label" msgid="5025590804030086930">"Sdílet"</string>
<string name="screenrecord_save_title" msgid="1886652605520893850">"Nahrávka obrazovky se uložila"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Přesunout dolů"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Přesunout doleva"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Přesunout doprava"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Přepínač zvětšení"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zvětšit celou obrazovku"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zvětšit část obrazovky"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Pozornost Asistenta je zapnutá"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Výchozí aplikaci pro poznámky nastavíte v Nastavení"</string>
<string name="install_app" msgid="5066668100199613936">"Nainstalovat aplikaci"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Zrcadlit na externí displej?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktivovat displej"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon a fotoaparát"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedávné použití aplikacemi"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobrazit nedávný přístup"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 17853e7228d3..94ab18922558 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -174,12 +174,12 @@
<string name="biometric_re_enroll_dialog_confirm" msgid="3049858021857801836">"Konfigurer"</string>
<string name="biometric_re_enroll_dialog_cancel" msgid="93760939407091417">"Ikke nu"</string>
<string name="biometric_re_enroll_notification_content" msgid="8685925877186288180">"Dette er påkrævet for at forbedre sikkerheden og ydeevnen"</string>
- <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Konfigurer oplåsning med fingeraftryk igen"</string>
- <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Oplåsning med fingeraftryk"</string>
- <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Konfigurer oplåsning med fingeraftryk"</string>
- <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Hvis du vil konfigurere oplåsning med fingeraftryk igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere oplåsning med fingeraftryk igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
- <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Hvis du vil konfigurere oplåsning med fingeraftryk igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere oplåsning med fingeraftryk igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
- <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Oplåsning med fingeraftryk kunne ikke konfigureres. Gå til Indstillinger for at prøve igen."</string>
+ <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Konfigurer fingeroplåsning igen"</string>
+ <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Fingeroplåsning"</string>
+ <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Konfigurer fingeroplåsning"</string>
+ <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Hvis du vil konfigurere fingeroplåsning igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere fingeroplåsning igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
+ <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Hvis du vil konfigurere fingeroplåsning igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere fingeroplåsning igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
+ <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Fingeroplåsning kunne ikke konfigureres. Gå til Indstillinger for at prøve igen."</string>
<string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Konfigurer ansigtsoplåsning igen"</string>
<string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Ansigtsoplåsning"</string>
<string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Konfigurer ansigtsoplåsning"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Flyt ned"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Flyt til venstre"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Flyt til højre"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Skift forstørrelsestilstand"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Forstør hele skærmen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Forstør en del af skærmen"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent lytter"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Angiv standardapp til noter i Indstillinger"</string>
<string name="install_app" msgid="5066668100199613936">"Installer app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vil du spejle til ekstern skærm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktivér skærm"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon og kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Seneste brug af apps"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se seneste adgang"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 822ab277ba85..4ae8f27d1339 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Nach unten bewegen"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Nach links bewegen"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Nach rechts bewegen"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrößerungsschalter"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ganzen Bildschirm vergrößern"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Teil des Bildschirms vergrößern"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant-Aktivierung an"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standard-Notizen-App in den Einstellungen einrichten"</string>
<string name="install_app" msgid="5066668100199613936">"App installieren"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Auf externen Bildschirm spiegeln?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Anzeige aktivieren"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon &amp; Kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Kürzliche App-Nutzung"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Kürzliche Zugriffe ansehen"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index c33b7534198c..b279abfa0423 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Μετακίνηση κάτω"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Μετακίνηση αριστερά"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Μετακίνηση δεξιά"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Εναλλαγή μεγιστοποίησης"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Μεγέθυνση πλήρους οθόνης"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Μεγέθυνση μέρους της οθόνης"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Ο Βοηθός βρίσκεται σε αναμονή"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ορίστε την προεπιλεγμένη εφαρμογή σημειώσεων στις Ρυθμίσεις"</string>
<string name="install_app" msgid="5066668100199613936">"Εγκατάσταση εφαρμογής"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Κατοπτρισμός σε εξωτερική οθόνη;"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Ενεργοποίηση οθόνης"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Μικρόφωνο και Κάμερα"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Πρόσφατη χρήση εφαρμογής"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Εμφάνιση πρόσφατης πρόσβασης"</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 901459dea907..e036eb739358 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 01aa63784bbd..060bb99480b5 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -863,6 +863,10 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+ <string name="accessibility_control_increase_window_width" msgid="6992249470832493283">"Increase width of magnifier"</string>
+ <string name="accessibility_control_decrease_window_width" msgid="5740401560105929681">"Decrease width of magnifier"</string>
+ <string name="accessibility_control_increase_window_height" msgid="2200966116612324260">"Increase height of magnifier"</string>
+ <string name="accessibility_control_decrease_window_height" msgid="2054479949445332761">"Decrease height of magnifier"</string>
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 901459dea907..e036eb739358 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 901459dea907..e036eb739358 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index c496aeea9325..936bbeb795b1 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -863,6 +863,10 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‏‎‏‎‎‎‎‎‏‏‎‎‏‏‏‎‏‏‎‏‏‏‎‎‎‏‎‏‏‏‏‎‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‎‎‎Move down‎‏‎‎‏‎"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‏‎‎‎‎‏‎‏‎‏‎‏‏‎‎‎‎‏‎‎‎‏‎‎‏‎‏‎‎‏‎‏‏‏‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‎‏‏‎Move left‎‏‎‎‏‎"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‏‎‎‏‏‏‎‎‎‎‎‏‏‏‏‏‎‏‎‎‎‎‎‎‏‏‎‏‎‎‎‎‎‏‎‏‎‏‏‏‏‎‎‎‏‎‏‎‎‎‎Move right‎‏‎‎‏‎"</string>
+ <string name="accessibility_control_increase_window_width" msgid="6992249470832493283">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‎‏‎‎‎‎‏‎‎‏‎‏‏‏‎‏‎‏‏‏‎‏‏‎‎‎‏‏‏‎‎‎‎‏‏‏‏‎‎‎‏‎‎‏‎‎‎‎‏‎‏‏‏‎‎‎‏‏‎Increase width of magnifier‎‏‎‎‏‎"</string>
+ <string name="accessibility_control_decrease_window_width" msgid="5740401560105929681">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‎‎‎‎‎‏‏‎‎‏‏‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‏‎‎‏‎‎‏‎‏‏‏‏‎‏‎‎‎‏‎Decrease width of magnifier‎‏‎‎‏‎"</string>
+ <string name="accessibility_control_increase_window_height" msgid="2200966116612324260">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‏‎‏‏‎‎‏‏‏‎‎‎‎‎‏‎‏‏‎‎‏‎‏‏‏‎‏‎‏‏‎‎‏‎‎‏‏‏‎‏‏‏‎‏‎‎‏‎‎‎Increase height of magnifier‎‏‎‎‏‎"</string>
+ <string name="accessibility_control_decrease_window_height" msgid="2054479949445332761">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‏‎‎‎‎‎‎‎‎‏‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‏‎Decrease height of magnifier‎‏‎‎‏‎"</string>
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‎‏‏‏‎‎‏‎‏‎‎‎‎‏‎‎‎‎‎‎‏‏‎‏‏‏‏‎‏‎‏‏‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‎‏‎‎‎‏‏‎‏‎Magnification switch‎‏‎‎‏‎"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‎‎‏‏‎‏‏‏‎‏‏‎‎‎‏‎‏‎‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‎‏‎‎‏‎‏‎‏‏‏‎‏‎‎‎‎‎‏‎Magnify full screen‎‏‎‎‏‎"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‏‏‎‎‎‎‏‎‎‏‎‎‏‎‎‎‎‎‏‎‏‎‏‎‏‏‎‏‏‏‏‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‎‏‎‏‎Magnify part of screen‎‏‎‎‏‎"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 3653839f5a00..15b3001bee25 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover hacia abajo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover hacia la izquierda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover hacia la derecha"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor de ampliación"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte de la pantalla"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistente está prestando atención"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Configura la app de notas predeterminada en Configuración"</string>
<string name="install_app" msgid="5066668100199613936">"Instalar app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"¿Quieres duplicar a la pantalla externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Habilitar pantalla"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono y cámara"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso reciente en apps"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver accesos recientes"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 0680821c1729..fa435363b02f 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover hacia abajo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover hacia la izquierda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover hacia la derecha"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Botón para cambiar el modo de ampliación"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte de la pantalla"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"El Asistente está activado"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Configura la aplicación de notas predeterminada en Ajustes"</string>
<string name="install_app" msgid="5066668100199613936">"Instalar aplicación"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"¿Replicar en pantalla externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Habilitar pantalla"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono y cámara"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso reciente en aplicaciones"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver acceso reciente"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 988d4d745494..ad80a590f06e 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Teisalda alla"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Teisalda vasakule"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Teisalda paremale"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suurenduse lüliti"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Täisekraani suurendamine"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekraanikuva osa suurendamine"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent on aktiveeritud"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Määrake seadetes märkmete vaikerakendus."</string>
<string name="install_app" msgid="5066668100199613936">"Installi rakendus"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Kas peegeldada välisekraanile?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Luba ekraan"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon ja kaamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Rakenduste hiljutine kasutamine"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Kuva hiljutine juurdepääs"</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 71cb074dc599..b417c10c4063 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Eraman behera"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Eraman ezkerrera"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Eraman eskuinera"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Lupa aplikatzeko botoia"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Handitu pantaila osoa"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Handitu pantailaren zati bat"</string>
@@ -1080,7 +1088,7 @@
<string name="wifi_wont_autoconnect_for_now" msgid="5782282612749867762">"Oraingoz ez da automatikoki konektatuko wifira"</string>
<string name="see_all_networks" msgid="3773666844913168122">"Ikusi guztiak"</string>
<string name="to_switch_networks_disconnect_ethernet" msgid="6698111101156951955">"Sarea aldatzeko, deskonektatu Etherneta"</string>
- <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Gailuaren funtzionamendua hobetzeko, aplikazioek eta zerbitzuek wifi-sareak bilatzen jarraituko dute, baita wifi-konexioa desaktibatuta dagoenean ere. Aukera hori aldatzeko, joan wifi-sareen bilaketaren ezarpenetara. "<annotation id="link">"Aldatu"</annotation></string>
+ <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Gailuaren funtzionamendua hobetzeko, aplikazioek eta zerbitzuek wifi-sareak bilatzen jarraituko dute, baita wifi-konexioa desaktibatuta dagoenean ere. Aukera hori aldatzeko, joan wifi-sareak bilatzeko eginbidearen ezarpenetara. "<annotation id="link">"Aldatu"</annotation></string>
<string name="turn_off_airplane_mode" msgid="8425587763226548579">"Desaktibatu hegaldi modua"</string>
<string name="qs_tile_request_dialog_text" msgid="3501359944139877694">"<xliff:g id="APPNAME">%1$s</xliff:g> aplikazioak lauza hau gehitu nahi du Ezarpen bizkorrak menuan:"</string>
<string name="qs_tile_request_dialog_add" msgid="4888460910694986304">"Gehitu lauza"</string>
@@ -1132,7 +1140,7 @@
<string name="log_access_confirmation_title" msgid="4843557604739943395">"Gailuko erregistro guztiak erabiltzeko baimena eman nahi diozu <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> aplikazioari?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"Eman behin erabiltzeko baimena"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Ez eman baimenik"</string>
- <string name="log_access_confirmation_body" msgid="6883031912003112634">"Gailuko erregistroetan gailuan gertatzen den guztia gordetzen da. Arazoak bilatu eta konpontzeko erabil ditzakete aplikazioek erregistro horiek.\n\nBaliteke erregistro batzuek kontuzko informazioa edukitzea. Beraz, eman gailuko erregistro guztiak erabiltzeko baimena fidagarritzat jotzen dituzun aplikazioei bakarrik. \n\nNahiz eta gailuko erregistro guztiak erabiltzeko baimena ez eman aplikazio honi, aplikazioak hari dagozkion erregistroak atzitu ahalko ditu. Gainera, baliteke gailuaren fabrikatzaileak gailuko erregistro edo datu batzuk atzitu ahal izatea."</string>
+ <string name="log_access_confirmation_body" msgid="6883031912003112634">"Gailuko erregistroetan gailuan gertatzen den guztia gordetzen da. Arazoak bilatu eta konpontzeko erabil ditzakete aplikazioek erregistro horiek.\n\nBaliteke erregistro batzuek kontuzko informazioa edukitzea. Beraz, eman gailuko erregistro guztiak erabiltzeko baimena fidagarritzat jotzen dituzun aplikazioei bakarrik. \n\nNahiz eta gailuko erregistro guztiak erabiltzeko baimena ez eman aplikazio honi, aplikazioak hari dagozkion erregistroak erabili ahalko ditu. Gainera, baliteke gailuaren fabrikatzaileak gailuko erregistro edo datu batzuk erabili ahal izatea."</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Lortu informazio gehiago"</string>
<string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"Lortu informazio gehiago <xliff:g id="URL">%s</xliff:g> helbidean"</string>
<string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"Ireki <xliff:g id="APPNAME">%1$s</xliff:g>"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Laguntzailea zerbitzuak arreta jarrita dauka"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ezarri oharren aplikazio lehenetsia ezarpenetan"</string>
<string name="install_app" msgid="5066668100199613936">"Instalatu aplikazioa"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Kanpoko pantailan islatu nahi duzu?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Gaitu pantaila"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofonoa eta kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Aplikazioen azken erabilera"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ikusi azkenaldiko sarbidea"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 8902103c4399..1135816ff494 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"انتقال به پایین"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"انتقال به راست"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"انتقال به چپ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"کلید درشت‌نمایی"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"درشت‌نمایی تمام‌صفحه"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"درشت‌نمایی بخشی از صفحه"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"توجه «دستیار» روشن است"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"برنامه پیش‌فرض یادداشت را در «تنظیمات» تنظیم کنید"</string>
<string name="install_app" msgid="5066668100199613936">"نصب برنامه"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"در نمایشگر خارجی پخش شود؟"</string>
+ <string name="enable_display" msgid="8308309634883321977">"فعال کردن نمایشگر"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"میکروفون و دوربین"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"استفاده اخیر از برنامه"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"دیدن دسترسی اخیر"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 7e2ab650f037..eef5a47e0fe4 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Siirrä alas"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Siirrä vasemmalle"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Siirrä oikealle"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suurennusvalinta"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Koko näytön suurennus"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Suurenna osa näytöstä"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant on aktiivinen"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Aseta oletusmuistiinpanosovellus Asetuksista"</string>
<string name="install_app" msgid="5066668100199613936">"Asenna sovellus"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Peilataanko ulkoiselle näytölle?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Ota näyttö käyttöön"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoni ja kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Sovellusten viimeaikainen käyttö"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Katso viimeaikainen käyttö"</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index a863623df8d1..f4f41055b9bd 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Déplacer vers le bas"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Déplacer vers la gauche"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Déplacer vers la droite"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Commutateur d\'agrandissement"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Agrandir la totalité de l\'écran"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Agrandir une partie de l\'écran"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant à l\'écoute"</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>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Dupliquer l\'écran sur un moniteur externe?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Activer l\'écran"</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_more_button" msgid="7610604080293562345">"Afficher l\'accès récent"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index a3920de7bf9e..81a8363dba60 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Déplacer vers le bas"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Déplacer vers la gauche"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Déplacer vers la droite"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Changer de mode d\'agrandissement"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Agrandir tout l\'écran"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Agrandir une partie de l\'écran"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant à l\'écoute"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Définir une appli de notes par défaut dans les paramètres"</string>
<string name="install_app" msgid="5066668100199613936">"Installer l\'appli"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Mirroring sur écran externe ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Activer l\'écran"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micro et caméra"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilisation récente par les applis"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consulter les accès récents"</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 344c0d4191f6..509de37e262b 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover cara abaixo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover cara á esquerda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover cara á dereita"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor do modo de ampliación"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Amplía parte da pantalla"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"A atención do Asistente está activada"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Establece a aplicación de notas predeterminada en Configuración"</string>
<string name="install_app" msgid="5066668100199613936">"Instalar aplicación"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Queres proxectar contido nunha pantalla externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Activar pantalla"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono e cámara"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente por parte de aplicacións"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver acceso recente"</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index a32c78fce8bb..55fa871a75c3 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"નીચે ખસેડો"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ડાબી બાજુ ખસેડો"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"જમણી બાજુ ખસેડો"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"મોટું કરવાની સુવિધાવાળી સ્વિચ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"પૂર્ણ સ્ક્રીનને મોટી કરો"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"સ્ક્રીનનો કોઈ ભાગ મોટો કરો"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant સક્રિય છે"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"સેટિંગમાં નોંધની ડિફૉલ્ટ ઍપ સેટ કરો"</string>
<string name="install_app" msgid="5066668100199613936">"ઍપ ઇન્સ્ટૉલ કરો"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"શું બાહ્ય ડિસ્પ્લે પર મિરર કરીએ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ડિસ્પ્લે ચાલુ કરો"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"માઇક્રોફોન અને કૅમેરા"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"તાજેતરનો ઍપનો વપરાશ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"તાજેતરનો ઍક્સેસ મેનેજ કરો"</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index c73b8f79c873..173c6073d9ae 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -299,7 +299,7 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"वर्क ऐप्लिकेशन"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"रोकी गई"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"नाइट लाइट"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"शाम को चालू की जाएगी"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"शाम को चालू होगी"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"सुबह तक चालू रहेगी"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g> पर चालू की जाएगी"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> तक"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"नीचे ले जाएं"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"बाईं ओर ले जाएं"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"दाईं ओर ले जाएं"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ज़ूम करने की सुविधा वाला स्विच"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"फ़ुल स्क्रीन को ज़ूम करें"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रीन के किसी हिस्से को ज़ूम करें"</string>
@@ -905,8 +913,8 @@
<string name="controls_providers_title" msgid="6879775889857085056">"कंट्रोल जोड़ने के लिए ऐप्लिकेशन चुनें"</string>
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# कंट्रोल जोड़ा गया.}one{# कंट्रोल जोड़ा गया.}other{# कंट्रोल जोड़े गए.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"हटाया गया"</string>
- <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> को जोड़ना है?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> यह चुन सकता है कि इस पैनल पर कौनसे कंट्रोल और कॉन्टेंट दिखे."</string>
+ <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> ऐप्लिकेशन को जोड़ना है?"</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> ऐप्लिकेशन यह चुन सकता है कि इस पैनल पर कौनसे कंट्रोल और कॉन्टेंट दिखे."</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> के लिए कंट्रोल हटाने हैं?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"पसंदीदा बनाया गया"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"पसंदीदा बनाया गया, क्रम संख्या <xliff:g id="NUMBER">%d</xliff:g>"</string>
@@ -1129,7 +1137,7 @@
<string name="bt_le_audio_broadcast_dialog_unknown_name" msgid="3791472237793443044">"कोई जानकारी नहीं"</string>
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
- <string name="log_access_confirmation_title" msgid="4843557604739943395">"क्या <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> को डिवाइस लॉग का ऐक्सेस देना है?"</string>
+ <string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> को डिवाइस लॉग ऐक्सेस करने की अनुमति देनी है?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"एक बार ऐक्सेस करने की अनुमति दें"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"अनुमति न दें"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"डिवाइस लॉग में आपके डिवाइस पर की गई कार्रवाइयां रिकॉर्ड होती हैं. ऐप्लिकेशन, इन लॉग का इस्तेमाल गड़बड़ियां ढूंढने और उन्हें ठीक करने के लिए कर सकते हैं.\n\nकुछ लॉग में संवेदनशील जानकारी हो सकती है. इसलिए, सिर्फ़ भरोसेमंद ऐप्लिकेशन को डिवाइस के सभी लॉग का ऐक्सेस दें. \n\nअगर इस ऐप्लिकेशन को डिवाइस के सभी लॉग का ऐक्सेस नहीं दिया जाता है, तब भी यह डिवाइस पर मौजूद अपने लॉग ऐक्सेस कर सकता है. डिवाइस को बनाने वाली कंपनी फिर भी डिवाइस के कुछ लॉग या जानकारी ऐक्सेस कर सकती है."</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant आपकी बातें सुन रही है"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिंग में जाकर, नोट लेने की सुविधा देने वाले ऐप्लिकेशन को डिफ़ॉल्ट के तौर पर सेट करें"</string>
<string name="install_app" msgid="5066668100199613936">"ऐप्लिकेशन इंस्टॉल करें"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाहरी डिसप्ले को अन्य डिवाइस पर दिखाना है?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"डिसप्ले चालू करें"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"माइक्रोफ़ोन और कैमरा"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"हाल ही में इस्तेमाल करने वाला ऐप्लिकेशन"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"हाल में ऐक्सेस करने वाले ऐप"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index f9b220ddb9f1..42acd4855e76 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Premjesti dolje"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Premjesti ulijevo"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Premjesti udesno"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prebacivanje povećavanja"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Povećajte cijeli zaslon"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Povećaj dio zaslona"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Pažnja Asistenta je aktivirana"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Postavite zadanu aplikaciju za bilješke u postavkama"</string>
<string name="install_app" msgid="5066668100199613936">"Instalacija"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite li zrcaliti na vanjski zaslon?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Omogući zaslon"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavna upotreba aplikacije"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Pogledajte nedavni pristup"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 0d40770bb939..e27733f02c29 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mozgatás lefelé"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mozgatás balra"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mozgatás jobbra"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Nagyításváltó"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"A teljes képernyő felnagyítása"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Képernyő bizonyos részének nagyítása"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"A Segéd figyel"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Állítson be alapértelmezett jegyzetkészítő alkalmazást a Beállításokban"</string>
<string name="install_app" msgid="5066668100199613936">"Alkalmazás telepítése"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Tükrözi a kijelzőt a külső képernyőre?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Képernyő engedélyezése"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon és kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Legutóbbi alkalmazáshasználat"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Legutóbbi hozzáférés"</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index e64a8de3b638..d2a5d751b5ab 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -399,7 +399,7 @@
<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_message" msgid="1070703858915935796">"{count,plural, =1{Հնարավոր է ստեղծել միայն մեկ օգտատեր։}one{Կարող եք առավելագույնը # օգտատեր ավելացնել։}other{Կարող եք առավելագույնը # օգտատեր ավելացնել։}}"</string>
- <string name="user_remove_user_title" msgid="9124124694835811874">"Հեռացնե՞լ օգտատիրոջը:"</string>
+ <string name="user_remove_user_title" msgid="9124124694835811874">"Հեռացնե՞լ օգտատիրոջը"</string>
<string name="user_remove_user_message" msgid="6702834122128031833">"Այս օգտատիրոջ բոլոր հավելվածներն ու տվյալները կջնջվեն:"</string>
<string name="user_remove_user_remove" msgid="8387386066949061256">"Հեռացնել"</string>
<string name="media_projection_dialog_title" msgid="3316063622495360646">"Սկսե՞լ տեսագրումը կամ հեռարձակումը <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> հավելվածով"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Տեղափոխել ներքև"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Տեղափոխել ձախ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Տեղափոխել աջ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Խոշորացման փոփոխություն"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Խոշորացնել ամբողջ էկրանը"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Խոշորացնել էկրանի որոշակի հատվածը"</string>
@@ -1130,7 +1138,7 @@
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
<string name="log_access_confirmation_title" msgid="4843557604739943395">"Հասանելի դարձնե՞լ <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> հավելվածին սարքի բոլոր մատյանները"</string>
- <string name="log_access_confirmation_allow" msgid="752147861593202968">"Թույլատրել մեկանգամյա մուտքը"</string>
+ <string name="log_access_confirmation_allow" msgid="752147861593202968">"Թույլատրել մեկանգամյա մուտք"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Չթույլատրել"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"Այն, ինչ տեղի է ունենում ձեր սարքում, գրանցվում է սարքի մատյաններում։ Հավելվածները կարող են դրանք օգտագործել անսարքությունները հայտնաբերելու և վերացնելու նպատակով։\n\nՔանի որ որոշ մատյաններ անձնական տեղեկություններ են պարունակում, խորհուրդ ենք տալիս հասանելի դարձնել ձեր սարքի բոլոր մատյանները միայն այն հավելվածներին, որոնց վստահում եք։ \n\nԵթե այս հավելվածին նման թույլտվություն չեք տվել, դրան նախկինի պես հասանելի կլինեն իր մատյանները։ Հնարավոր է՝ ձեր սարքի արտադրողին ևս հասանելի լինեն սարքի որոշ մատյաններ և տեղեկություններ։"</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Իմանալ ավելին"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Օգնականը լսում է"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Կարգավորեք նշումների կանխադրված հավելված Կարգավորումներում"</string>
<string name="install_app" msgid="5066668100199613936">"Տեղադրել հավելվածը"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Հայելապատճենե՞լ արտաքին էկրանին"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Միացնել էկրանը"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Խոսափող և տեսախցիկ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Հավելվածի վերջին օգտագործումը"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Տեսնել վերջին օգտագործումը"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index d2a974784026..f908c33533a9 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Pindahkan ke bawah"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Pindahkan ke kiri"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Pindahkan ke kanan"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Tombol pembesaran"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Memperbesar tampilan layar penuh"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Perbesar sebagian layar"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asisten sedang memerhatikan"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setel aplikasi catatan default di Setelan"</string>
<string name="install_app" msgid="5066668100199613936">"Instal aplikasi"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Cerminkan ke layar eksternal?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktifkan layar"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon &amp; Kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Penggunaan aplikasi baru-baru ini"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Lihat akses terbaru"</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index d5bb28a87afd..1fb1304daf7f 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Færa niður"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Færa til vinstri"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Færa til hægri"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Stækkunarrofi"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Stækka allan skjáinn"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Stækka hluta skjásins"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Hjálparinn er að hlusta"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Stilltu sjálfgefið glósuforrit í stillingunum"</string>
<string name="install_app" msgid="5066668100199613936">"Setja upp forrit"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Spegla yfir á ytri skjá?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Virkja skjá"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Hljóðnemi og myndavél"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nýlega notað af forriti"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Sjá nýlegan aðgang"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 9f6228d549b7..bab86e37654d 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -174,17 +174,17 @@
<string name="biometric_re_enroll_dialog_confirm" msgid="3049858021857801836">"Configura"</string>
<string name="biometric_re_enroll_dialog_cancel" msgid="93760939407091417">"Non ora"</string>
<string name="biometric_re_enroll_notification_content" msgid="8685925877186288180">"L\'operazione è necessaria per migliorare la sicurezza e le prestazioni"</string>
- <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Riconfigura lo sblocco con l\'impronta"</string>
- <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Sblocco con l\'impronta"</string>
- <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Configura lo sblocco con l\'impronta"</string>
- <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Per riconfigurare lo sblocco con l\'impronta, i modelli e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
- <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Per riconfigurare lo sblocco con l\'impronta, il modello e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
- <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Impossibile configurare lo sblocco con l\'impronta. Vai alle Impostazioni e riprova."</string>
- <string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Riconfigura lo sblocco con il volto"</string>
- <string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Sblocco con il volto"</string>
- <string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Configura lo sblocco con il volto"</string>
- <string name="face_re_enroll_dialog_content" msgid="7353502359464038511">"Per riconfigurare lo sblocco con il volto, l\'attuale modello del volto verrà eliminato.\n\nDovrai riconfigurare questa funzionalità per usare il volto per sbloccare il telefono."</string>
- <string name="face_reenroll_failure_dialog_content" msgid="7073947334397236935">"Impossibile configurare lo sblocco con il volto. Vai alle Impostazioni e riprova."</string>
+ <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Riconfigura lo Sblocco con l\'Impronta"</string>
+ <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Sblocco con l\'Impronta"</string>
+ <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Configura lo Sblocco con l\'Impronta"</string>
+ <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Per riconfigurare lo Sblocco con l\'Impronta, i modelli e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
+ <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Per riconfigurare lo Sblocco con l\'Impronta, il modello e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
+ <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Impossibile configurare lo Sblocco con l\'Impronta. Vai alle Impostazioni e riprova."</string>
+ <string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Riconfigura lo Sblocco con il Volto"</string>
+ <string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Sblocco con il Volto"</string>
+ <string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Configura lo Sblocco con il Volto"</string>
+ <string name="face_re_enroll_dialog_content" msgid="7353502359464038511">"Per riconfigurare lo Sblocco con il Volto, l\'attuale modello del volto verrà eliminato.\n\nDovrai riconfigurare questa funzionalità per usare il volto per sbloccare il telefono."</string>
+ <string name="face_reenroll_failure_dialog_content" msgid="7073947334397236935">"Impossibile configurare lo Sblocco con il Volto. Vai alle Impostazioni e riprova."</string>
<string name="fingerprint_dialog_touch_sensor" msgid="2817887108047658975">"Tocca il sensore di impronte"</string>
<string name="fingerprint_dialog_authenticated_confirmation" msgid="1603899612957562862">"Premi l\'icona Sblocca per continuare"</string>
<string name="fingerprint_dialog_use_fingerprint_instead" msgid="6178228876763024452">"Impossibile riconoscere il volto. Usa l\'impronta."</string>
@@ -192,7 +192,7 @@
<skip />
<string name="keyguard_face_failed" msgid="9044619102286917151">"Volto non riconosciuto"</string>
<string name="keyguard_suggest_fingerprint" msgid="8742015961962702960">"Usa l\'impronta"</string>
- <string name="keyguard_face_unlock_unavailable" msgid="1581949044193418736">"Sblocco con il volto non disponibile"</string>
+ <string name="keyguard_face_unlock_unavailable" msgid="1581949044193418736">"Sblocco con il Volto non disponibile"</string>
<string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth collegato."</string>
<string name="accessibility_battery_unknown" msgid="1807789554617976440">"Percentuale della batteria sconosciuta."</string>
<string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connesso a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string>
@@ -256,7 +256,7 @@
<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_screensaver_label" msgid="1495003469366524120">"Salvaschermo"</string>
- <string name="quick_settings_camera_label" msgid="5612076679385269339">"Accesso alla fotocamera"</string>
+ <string name="quick_settings_camera_label" msgid="5612076679385269339">"Accesso alla videocamera"</string>
<string name="quick_settings_mic_label" msgid="8392773746295266375">"Accesso al microfono"</string>
<string name="quick_settings_camera_mic_available" msgid="1453719768420394314">"Disponibile"</string>
<string name="quick_settings_camera_mic_blocked" msgid="4710884905006788281">"Bloccato"</string>
@@ -367,7 +367,7 @@
<string name="keyguard_face_successful_unlock" msgid="4203999851465708287">"Sbloccato con il volto"</string>
<string name="keyguard_face_successful_unlock_alt1" msgid="5853906076353839628">"Volto riconosciuto"</string>
<string name="keyguard_retry" msgid="886802522584053523">"Scorri verso l\'alto per riprovare"</string>
- <string name="accesssibility_keyguard_retry" msgid="8880238862712870676">"Scorri verso l\'alto per riprovare lo sblocco con il volto"</string>
+ <string name="accesssibility_keyguard_retry" msgid="8880238862712870676">"Scorri verso l\'alto per riprovare lo Sblocco con il Volto"</string>
<string name="require_unlock_for_nfc" msgid="1305686454823018831">"Sblocca per usare NFC"</string>
<string name="do_disclosure_generic" msgid="4896482821974707167">"Questo dispositivo appartiene alla tua organizzazione"</string>
<string name="do_disclosure_with_name" msgid="2091641464065004091">"Questo dispositivo appartiene a <xliff:g id="ORGANIZATION_NAME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Sposta giù"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Sposta a sinistra"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Sposta a destra"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Opzione Ingrandimento"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ingrandisci l\'intero schermo"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ingrandisci parte dello schermo"</string>
@@ -1086,7 +1094,7 @@
<string name="qs_tile_request_dialog_add" msgid="4888460910694986304">"Aggiungi riquadro"</string>
<string name="qs_tile_request_dialog_not_add" msgid="4168716573114067296">"Non aggiungerlo"</string>
<string name="qs_user_switch_dialog_title" msgid="3045189293587781366">"Seleziona utente"</string>
- <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{C\'è # app attiva}many{Ci sono # app attive}other{Ci sono # app attive}}"</string>
+ <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{# app è attiva}many{# di app sono attive}other{# app sono attive}}"</string>
<string name="fgs_dot_content_description" msgid="2865071539464777240">"Nuove informazioni"</string>
<string name="fgs_manager_dialog_title" msgid="5879184257257718677">"App attive"</string>
<string name="fgs_manager_dialog_message" msgid="2670045017200730076">"Queste app sono attive e in esecuzione, anche quando non le utilizzi. Questo migliora la loro funzionalità, ma influisce sulla durata della batteria."</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"L\'assistente è attivo"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Imposta l\'app per le note predefinita nelle Impostazioni"</string>
<string name="install_app" msgid="5066668100199613936">"Installa app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vuoi eseguire il mirroring al display esterno?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Attiva display"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microfono e fotocamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente da app"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Vedi accesso recente"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 44ad4452e808..294f77f78e73 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"הזזה למטה"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"הזזה שמאלה"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"הזזה ימינה"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"מעבר למצב הגדלה"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"הגדלה של המסך המלא"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"הגדלת חלק מהמסך"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"‏Assistant מאזינה"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"צריך להגדיר את אפליקציית ברירת המחדל לפתקים ב\'הגדרות\'"</string>
<string name="install_app" msgid="5066668100199613936">"התקנת האפליקציה"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"לשקף למסך חיצוני?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"הפעלת המסך"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"מיקרופון ומצלמה"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"נעשה שימוש לאחרונה באפליקציות"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"צפייה בהרשאות הגישה האחרונות"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 5bd77fc5df48..9daaabcf7352 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"下に移動"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"左に移動"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"右に移動"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"拡大スイッチ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"画面全体を拡大します"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"画面の一部を拡大します"</string>
@@ -906,7 +914,7 @@
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# 件のコントロールを追加しました。}other{# 件のコントロールを追加しました。}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"削除済み"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> を追加しますか?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> はここに表示されるコントロールとコンテンツを選択できます。"</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"ここに表示されるコントロールとコンテンツを <xliff:g id="APPNAME">%s</xliff:g> が選択できるようになります。"</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> のコントロールを削除しますか?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"お気に入りに追加済み"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"お気に入りに追加済み、位置: <xliff:g id="NUMBER">%d</xliff:g>"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"アシスタントは起動済みです"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"[設定] でデフォルトのメモアプリを設定してください"</string>
<string name="install_app" msgid="5066668100199613936">"アプリをインストール"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"外部ディスプレイにミラーリングしますか?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ディスプレイを有効にする"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"マイクとカメラ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"最近のアプリの使用状況"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"最近のアクセスを表示"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index e0aa8ca955c7..4d3f4c739fe1 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ქვემოთ გადატანა"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"მარცხნივ გადატანა"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"მარჯვნივ გადატანა"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"გადიდების გადართვა"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"გაადიდეთ სრულ ეკრანზე"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ეკრანის ნაწილის გადიდება"</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 917383bc4979..0e54c222f332 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Төмен қарай жылжыту"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Солға жылжыту"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Оңға жылжыту"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Ұлғайту режиміне ауыстырғыш"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Толық экранды ұлғайту"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Экранның бөлігін ұлғайту"</string>
@@ -927,7 +935,7 @@
<string name="controls_favorite_load_none" msgid="7687593026725357775">"Үйлесімді басқару элементтері қолжетімді емес."</string>
<string name="controls_favorite_other_zone_header" msgid="9089613266575525252">"Басқа"</string>
<string name="controls_dialog_title" msgid="2343565267424406202">"Құрылғы басқару элементтеріне қосу"</string>
- <string name="controls_dialog_ok" msgid="2770230012857881822">"Енгізу"</string>
+ <string name="controls_dialog_ok" msgid="2770230012857881822">"Қосу"</string>
<string name="controls_dialog_remove" msgid="3775288002711561936">"Жою"</string>
<string name="controls_dialog_message" msgid="342066938390663844">"<xliff:g id="APP">%s</xliff:g> ұсынған"</string>
<string name="controls_tile_locked" msgid="731547768182831938">"Құрылғы құлыпталды."</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant қосулы."</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Параметрлерден әдепкі жазба қолданбасын орнатыңыз."</string>
<string name="install_app" msgid="5066668100199613936">"Қолданбаны орнату"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Сыртқы экран арқылы да көрсету керек пе?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Дисплейді қосу"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон және камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Соңғы рет қолданбаның датчикті пайдалануы"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Соңғы рет пайдаланғандар"</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 92c2c1b35c73..564af36ec4e2 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ផ្លាស់ទី​ចុះ​ក្រោម"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ផ្លាស់ទី​ទៅ​ឆ្វេង"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ផ្លាស់ទីទៅ​ស្តាំ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ប៊ូតុងបិទបើកការ​ពង្រីក"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ពង្រីក​ពេញអេក្រង់"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ពង្រីក​ផ្នែកនៃ​អេក្រង់"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"ភាពប្រុងប្រៀប​របស់ Google Assistant ត្រូវបានបើក"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"កំណត់កម្មវិធីកំណត់ចំណាំលំនាំដើមនៅក្នុងការកំណត់"</string>
<string name="install_app" msgid="5066668100199613936">"ដំឡើង​កម្មវិធី"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"បញ្ចាំងទៅ​ឧបករណ៍បញ្ចាំង​ខាងក្រៅឬ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"បើក​ឧបករណ៍បញ្ចាំង"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"មីក្រូហ្វូន និងកាមេរ៉ា"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ការប្រើប្រាស់កម្មវិធីថ្មីៗនេះ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"មើលការចូលប្រើនាពេលថ្មីៗនេះ"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 6c0f833b563b..65162130470b 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -232,7 +232,7 @@
<string name="data_usage_disabled_dialog_mobile_title" msgid="2286843518689837719">"ಮೊಬೈಲ್ ಡೇಟಾವನ್ನು ವಿರಾಮಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="data_usage_disabled_dialog_title" msgid="9131615296036724838">"ಡೇಟಾ ವಿರಾಮಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="data_usage_disabled_dialog" msgid="7933201635215099780">"ಡೇಟಾ ಬಳಕೆಯು ನೀವು ಹೊಂದಿಸಿರುವ ಮಿತಿಯನ್ನು ತಲುಪಿದೆ. ಹೀಗಾಗಿ ನೀವು ಈಗ ಮೊಬೈಲ್ ಡೇಟಾ ಬಳಸುತ್ತಿಲ್ಲ.\n\nನೀವು ಮುಂದುವರಿದರೆ, ಡೇಟಾ ಬಳಕೆಗೆ ಶುಲ್ಕ ತೆರಬೇಕಾಗಬಹುದು."</string>
- <string name="data_usage_disabled_dialog_enable" msgid="2796648546086408937">"ಮುಂದುವರಿಸು"</string>
+ <string name="data_usage_disabled_dialog_enable" msgid="2796648546086408937">"ಮುಂದುವರಿಸಿ"</string>
<string name="accessibility_location_active" msgid="2845747916764660369">"ಸ್ಥಳ ವಿನಂತಿಗಳು ಸಕ್ರಿಯವಾಗಿವೆ"</string>
<string name="accessibility_sensors_off_active" msgid="2619725434618911551">"ಸೆನ್ಸರ್‌ಗಳು ಆಫ್ ಆಗಿವೆ"</string>
<string name="accessibility_clear_all" msgid="970525598287244592">"ಎಲ್ಲಾ ಅಧಿಸೂಚನೆಗಳನ್ನು ತೆರವುಗೊಳಿಸು."</string>
@@ -504,7 +504,7 @@
<string name="screen_pinning_description_gestural" msgid="7246323931831232068">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಮೇಲೆ ಸ್ವೈಪ್ ಮಾಡಿ ಮತ್ತು ಅನ್‌ಪಿನ್ ಮಾಡಲು ಹೋಲ್ಡ್ ಮಾಡಿ."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಅನ್‌ಪಿನ್ ಮಾಡಲು ಅವಲೋಕನವನ್ನು ಸ್ಪರ್ಶಿಸಿ ಮತ್ತು ಹೋಲ್ಡ್ ಮಾಡಿ."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಅನ್‌ಪಿನ್ ಮಾಡಲು ಮುಖಪುಟವನ್ನು ಸ್ಪರ್ಶಿಸಿ ಮತ್ತು ಒತ್ತಿಹಿಡಿಯಿರಿ."</string>
- <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"ವೈಯಕ್ತಿಕ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಬಹುದು (ಉದಾ, ಸಂಪರ್ಕಗಳು ಮತ್ತು ಇಮೇಲ್ ವಿಷಯ)."</string>
+ <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"ವೈಯಕ್ತಿಕ ಡೇಟಾವನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಬಹುದು(ಉದಾ, ಸಂಪರ್ಕಗಳು ಮತ್ತು ಇಮೇಲ್ ಕಂಟೆಂಟ್‍)."</string>
<string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"ಪಿನ್ ಮಾಡಲಾದ ಆ್ಯಪ್ ಇತರ ಆ್ಯಪ್‌ಗಳನ್ನು ತೆರೆಯಬಹುದು."</string>
<string name="screen_pinning_toast" msgid="8177286912533744328">"ಈ ಆ್ಯಪ್ ಅನ್ನು ಅನ್‌‌ಪಿನ್ ಮಾಡಲು, ಹಿಂದಕ್ಕೆ ಮತ್ತು ಸಮಗ್ರ ನೋಟ ಬಟನ್‌ಗಳನ್ನು ಸ್ಪರ್ಶಿಸಿ &amp; ಒತ್ತಿಹಿಡಿಯಿರಿ"</string>
<string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"ಈ ಆ್ಯಪ್ ಅನ್ನು ಅನ್‌ಪಿನ್ ಮಾಡಲು, ಹಿಂದಕ್ಕೆ ಮತ್ತು ಮುಖಪುಟ ಬಟನ್‌ಗಳನ್ನು ಸ್ಪರ್ಶಿಸಿ &amp; ಒತ್ತಿಹಿಡಿಯಿರಿ"</string>
@@ -651,7 +651,7 @@
<string name="keyboard_shortcut_group_system_home" msgid="7465138628692109907">"ಮುಖಪುಟ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="8628108256824616927">"ಇತ್ತೀಚಿನವುಗಳು"</string>
<string name="keyboard_shortcut_group_system_back" msgid="1055709713218453863">"ಹಿಂದೆ"</string>
- <string name="keyboard_shortcut_group_system_notifications" msgid="3615971650562485878">"ಅಧಿಸೂಚನೆಗಳು"</string>
+ <string name="keyboard_shortcut_group_system_notifications" msgid="3615971650562485878">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
<string name="keyboard_shortcut_group_system_shortcuts_helper" msgid="4856808328618265589">"ಕೀಬೋರ್ಡ್ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು"</string>
<string name="keyboard_shortcut_group_system_switch_input" msgid="952555530383268166">"ಕೀಬೋರ್ಡ್‌ ಲೇಔಟ್‌ ಬದಲಾಯಿಸಿ"</string>
<string name="keyboard_shortcut_clear_text" msgid="4679927133259287577">"ಪಠ್ಯ ತೆರವುಗೊಳಿಸಿ"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ಕೆಳಗೆ ಸರಿಸಿ"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ಎಡಕ್ಕೆ ಸರಿಸಿ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ಬಲಕ್ಕೆ ಸರಿಸಿ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ಝೂಮ್ ಮಾಡುವ ಸ್ವಿಚ್"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ಪೂರ್ಣ ಸ್ಕ್ರೀನ್‌ ಅನ್ನು ಹಿಗ್ಗಿಸಿ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ಸ್ಕ್ರೀನ್‌ನ ಅರ್ಧಭಾಗವನ್ನು ಝೂಮ್ ಮಾಡಿ"</string>
@@ -1129,7 +1137,7 @@
<string name="bt_le_audio_broadcast_dialog_unknown_name" msgid="3791472237793443044">"ಅಪರಿಚಿತ"</string>
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
- <string name="log_access_confirmation_title" msgid="4843557604739943395">"ಎಲ್ಲಾ ಸಾಧನದ ಲಾಗ್‌ಗಳನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಲು <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> ಗೆ ಅನುಮತಿಸುವುದೇ?"</string>
+ <string name="log_access_confirmation_title" msgid="4843557604739943395">"ಎಲ್ಲಾ ಸಾಧನದ ಲಾಗ್‌ಗಳನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಲು <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> ಗೆ ಅನುಮತಿಸಬೇಕೆ?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"ಒಂದು ಬಾರಿಯ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸಿ"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"ಅನುಮತಿಸಬೇಡಿ"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿನ ಕಾರ್ಯಾಚರಣೆಗಳನ್ನು ಸಾಧನದ ಲಾಗ್‌ಗಳು ರೆಕಾರ್ಡ್ ಮಾಡುತ್ತವೆ. ಸಮಸ್ಯೆಗಳನ್ನು ಪತ್ತೆಹಚ್ಚಲು ಮತ್ತು ಪರಿಹರಿಸಲು ಆ್ಯಪ್‌ಗಳು ಈ ಲಾಗ್ ಅನ್ನು ಬಳಸಬಹುದು.\n\nಕೆಲವು ಲಾಗ್‌ಗಳು ಸೂಕ್ಷ್ಮ ಮಾಹಿತಿಯನ್ನು ಒಳಗೊಂಡಿರಬಹುದು, ಆದ್ದರಿಂದ ನಿಮ್ಮ ವಿಶ್ವಾಸಾರ್ಹ ಆ್ಯಪ್‌ಗಳಿಗೆ ಮಾತ್ರ ಸಾಧನದ ಎಲ್ಲಾ ಲಾಗ್‌ಗಳಿಗೆ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸಿ. \n\nಎಲ್ಲಾ ಸಾಧನ ಲಾಗ್‌ಗಳನ್ನು ಪ್ರವೇಶಿಸಲು ನೀವು ಈ ಆ್ಯಪ್‌ಗೆ ಅನುಮತಿಸದಿದ್ದರೆ, ಅದು ಆಗಲೂ ತನ್ನದೇ ಆದ ಲಾಗ್‌ಗಳನ್ನು ಪ್ರವೇಶಿಸಬಹುದು. ನಿಮ್ಮ ಸಾಧನ ತಯಾರಕರಿಗೆ ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿನ ಕೆಲವು ಲಾಗ್‌ಗಳು ಅಥವಾ ಮಾಹಿತಿಯನ್ನು ಪ್ರವೇಶಿಸಲು ಈಗಲೂ ಸಾಧ್ಯವಾಗುತ್ತದೆ."</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ನಿಮ್ಮ ಮಾತನ್ನು ಆಲಿಸುತ್ತಿದೆ"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ ಡೀಫಾಲ್ಟ್ ಟಿಪ್ಪಣಿಗಳ ಆ್ಯಪ್ ಅನ್ನು ಸೆಟ್ ಮಾಡಿ"</string>
<string name="install_app" msgid="5066668100199613936">"ಆ್ಯಪ್ ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಿ"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ಬಾಹ್ಯ ಡಿಸ್‌ಪ್ಲೇಗೆ ಪ್ರತಿಬಿಂಬಿಸಬೇಕೆ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ಡಿಸ್‌ಪ್ಲೇ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ಮೈಕ್ರೊಫೋನ್ ಮತ್ತು ಕ್ಯಾಮರಾ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ಇತ್ತೀಚಿನ ಆ್ಯಪ್ ಬಳಕೆ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ಇತ್ತೀಚಿನ ಆ್ಯಕ್ಸೆಸ್ ಅನ್ನು ನೋಡಿ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 491c4e47073f..62d6bd61216c 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"아래로 이동"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"왼쪽으로 이동"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"오른쪽으로 이동"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"확대 전환"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"전체 화면 확대"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"화면 일부 확대"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"어시스턴트가 대기 중임"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"설정에서 기본 메모 앱 설정"</string>
<string name="install_app" msgid="5066668100199613936">"앱 설치"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"외부 디스플레이로 미러링하시겠습니까?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"디스플레이 사용 설정"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"마이크 및 카메라"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"최근 앱 사용"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"최근 액세스 보기"</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 77e4e9c7c844..2eddca253a25 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Төмөн жылдыруу"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Солго жылдыруу"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Оңго жылдыруу"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Чоңойтуу режимине которулуу"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Толук экранда ачуу"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Экрандын бир бөлүгүн чоңойтуу"</string>
@@ -906,7 +914,7 @@
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# көзөмөл кошулду.}other{# көзөмөл кошулду.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"Өчүрүлдү"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> кошулсунбу?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> бул жерде көрсөтүлө турган башкаруу элементтерин жана контентти тандай алат."</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> бул жерде көрүнө турган нерселерди тандайт."</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> башкаруу элементтери өчүрүлсүнбү?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"Сүйүктүүлөргө кошулду"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"Сүйүктүүлөргө <xliff:g id="NUMBER">%d</xliff:g>-позицияга кошулду"</string>
@@ -1132,7 +1140,7 @@
<string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> колдонмосуна түзмөктөгү бардык таржымалдарды жеткиликтүү кыласызбы?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"Бир жолу жеткиликтүү кылуу"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Тыюу салуу"</string>
- <string name="log_access_confirmation_body" msgid="6883031912003112634">"Түзмөктө аткарылган бардык аракеттер түзмөктүн таржымалдарында сакталып калат. Колдонмолор бул таржымалдарды колдонуп, маселелерди оңдошот.\n\nАйрым таржымалдарда купуя маалымат болушу мүмкүн, андыктан ишенимдүү колдонмолорго гана түзмөктөгү бардык таржымалдарды пайдаланууга уруксат бериңиз. \n\nЭгер бул колдонмого түзмөктөгү бардык таржымалдарга кирүүгө тыюу салсаңыз, ал өзүнүн таржымалдарын пайдалана берет. Түзмөктү өндүрүүчү түзмөгүңүздөгү айрым таржымалдарды же маалыматты көрө берет."</string>
+ <string name="log_access_confirmation_body" msgid="6883031912003112634">"Түзмөктө жасалган аракеттердин баары таржымалдарда сакталат. Колдонмолор алардын жардамы менен мүмкүн болгон мүчүлүштүктөрдү таап, оңдоп турат.\n\nАйрым таржымалдарда купуя маалымат камтылышы мүмкүн болгондуктан, түзмөктөгү бардык таржымалдарды ишенимдүү колдонмолорго гана жеткиликтүү кылыңыз. \n\nЭгер бул колдонмого түзмөктөгү айрым таржымалдарды гана жеткиликтүү кылсаңыз, ал мурункудай эле өзүнүн таржымалдарын көрө берет. Түзмөгүңүздөгү айрым таржымалдар же нерселер анын өндүрүүчүсүнө көрүнүшү мүмкүн."</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Кеңири маалымат"</string>
<string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"Кеңири маалымат: <xliff:g id="URL">%s</xliff:g>"</string>
<string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"<xliff:g id="APPNAME">%1$s</xliff:g> ачуу"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Жардамчы иштетилди"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Параметрлерден демейки кыска жазуулар колдонмосун тууралаңыз"</string>
<string name="install_app" msgid="5066668100199613936">"Колдонмону орнотуу"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Тышкы экранга чыгарасызбы?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Экранды иштетүү"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон жана камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Жакында колдонмолордо иштетилген"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Акыркы пайдалануусун көрүү"</string>
diff --git a/packages/SystemUI/res/values-land/config.xml b/packages/SystemUI/res/values-land/config.xml
index d800d49634d2..85fb3ac577bc 100644
--- a/packages/SystemUI/res/values-land/config.xml
+++ b/packages/SystemUI/res/values-land/config.xml
@@ -42,4 +42,8 @@
<!-- Whether we use large screen shade header which takes only one row compared to QS header -->
<bool name="config_use_large_screen_shade_header">true</bool>
+ <!-- Whether to force split shade.
+ For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+ TODO (b/293290851) - change this comment/resource when flag is enabled -->
+ <bool name="force_config_use_split_notification_shade">true</bool>
</resources>
diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml
index 0667cd8b12d6..259b9adf0209 100644
--- a/packages/SystemUI/res/values-land/dimens.xml
+++ b/packages/SystemUI/res/values-land/dimens.xml
@@ -88,4 +88,7 @@
overlaid -->
<dimen name="global_actions_button_size">72dp</dimen>
<dimen name="global_actions_button_padding">26dp</dimen>
+
+ <dimen name="keyguard_indication_margin_bottom">8dp</dimen>
+ <dimen name="lock_icon_margin_bottom">24dp</dimen>
</resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index ec1744168592..3f3cc27b4a32 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ຍ້າຍລົງ"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ຍ້າຍໄປຊ້າຍ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ຍ້າຍໄປຂວາ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ສະຫຼັບການຂະຫຍາຍ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ຂະຫຍາຍເຕັມຈໍ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ຂະຫຍາຍບາງສ່ວນຂອງໜ້າຈໍ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"ການເອີ້ນໃຊ້ຜູ້ຊ່ວຍເປີດຢູ່"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ຕັ້ງຄ່າແອັບຈົດບັນທຶກເລີ່ມຕົ້ນໃນການຕັ້ງຄ່າ"</string>
<string name="install_app" msgid="5066668100199613936">"ຕິດຕັ້ງແອັບ"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ສາຍໃສ່ຈໍສະແດງຜົນພາຍນອກບໍ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ເປີດການນຳໃຊ້ຈໍສະແດງຜົນ"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ໄມໂຄຣໂຟນ ແລະ ກ້ອງຖ່າຍຮູບ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ການໃຊ້ແອັບຫຼ້າສຸດ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ເບິ່ງສິດເຂົ້າເຖິງຫຼ້າສຸດ"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index e418e1828bfa..808c732c49c8 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Perkelti žemyn"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Perkelti kairėn"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Perkelti dešinėn"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Didinimo jungiklis"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Viso ekrano didinimas"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Didinti ekrano dalį"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Padėjėjas klauso"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nustatykite numatytąją užrašų programą Nustatymuose"</string>
<string name="install_app" msgid="5066668100199613936">"Įdiegti programą"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Bendrinti ekrano vaizdą išoriniame ekrane?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Įgalinti ekraną"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofonas ir fotoaparatas"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Pastarasis programos naudojimas"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Žr. pastarąją prieigą"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 4b5fea3050f2..52ccc16e0ac7 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Pārvietot uz leju"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Pārvietot pa kreisi"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Pārvietot pa labi"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Palielinājuma slēdzis"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Palielināt visu ekrānu"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Palielināt ekrāna daļu"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistents klausās"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Iestatījumos iestatiet noklusējuma piezīmju lietotni."</string>
<string name="install_app" msgid="5066668100199613936">"Instalēt lietotni"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vai spoguļot ārējā displejā?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Iespējot displeju"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofons un kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nesen izmantoja lietotnes"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Skatīt neseno piekļuvi"</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 80aa943505ff..7d218baff314 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -299,13 +299,13 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Работни апликации"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Паузирано"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Ноќно светло"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Вклуч. на зајдисонце"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"На зајдисонце"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"До изгрејсонце"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Вклучување: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Темна тема"</string>
<string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Штедач на батерија"</string>
- <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"Вклуч. на зајдисонце"</string>
+ <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"На зајдисонце"</string>
<string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"До изгрејсонце"</string>
<string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"Се вклучува во <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_dark_mode_secondary_label_until" msgid="2289774641256492437">"До <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Премести надолу"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Премести налево"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Премести надесно"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Прекинувач за зголемување"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Зголемете го целиот екран"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Зголемувајте дел од екранот"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Вниманието на „Помошникот“ е вклучено"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Поставете стандардна апликација за белешки во „Поставки“"</string>
<string name="install_app" msgid="5066668100199613936">"Инсталирајте ја апликацијата"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Да се синхронизира на надворешниот екран?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Овозможи екран"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Неодамнешно користење на апликација"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Видете го скорешниот пристап"</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 021607d5508b..b5feddbd5068 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -299,7 +299,7 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"ഔദ്യോഗിക ആപ്പുകൾ"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"തൽക്കാലം നിർത്തി"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"നൈറ്റ് ലൈറ്റ്"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"സൂര്യാസ്‌തമയത്തിന്"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"അസ്‌തമയത്തിന്"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"സൂര്യോദയം വരെ"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g>-ന്"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> വരെ"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"താഴേക്ക് നീക്കുക"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ഇടത്തേക്ക് നീക്കുക"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"വലത്തേക്ക് നീക്കുക"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"മാഗ്നിഫിക്കേഷൻ മോഡ് മാറുക"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"സ്ക്രീൻ പൂർണ്ണമായും മാഗ്നിഫൈ ചെയ്യുക"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"സ്‌ക്രീനിന്റെ ഭാഗം മാഗ്നിഫൈ ചെയ്യുക"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant സജീവമാണ്"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ക്രമീകരണത്തിൽ കുറിപ്പുകൾക്കുള്ള ഡിഫോൾട്ട് ആപ്പ് സജ്ജീകരിക്കുക"</string>
<string name="install_app" msgid="5066668100199613936">"ആപ്പ് ഇൻസ്റ്റാൾ ചെയ്യൂ"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ബാഹ്യ ഡിസ്‌പ്ലേയിലേക്ക് മിറർ ചെയ്യണോ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ഡിസ്‌പ്ലേ പ്രവർത്തനക്ഷമമാക്കുക"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"മൈക്രോഫോണും ക്യാമറയും"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"അടുത്തിടെയുള്ള ആപ്പ് ഉപയോഗം"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"അടുത്തിടെയുള്ള ആക്‌സസ് കാണുക"</string>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 9c7cf8ba932d..4bf4f6ae6443 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Доош зөөх"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Зүүн тийш зөөх"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Баруун тийш зөөх"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Томруулах сэлгэлт"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Бүтэн дэлгэцийг томруулах"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Дэлгэцийн нэг хэсгийг томруулах"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Туслах анхаарлаа хандуулж байна"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Тохиргоонд тэмдэглэлийн өгөгдмөл апп тохируулна уу"</string>
<string name="install_app" msgid="5066668100199613936">"Аппыг суулгах"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Гадны дэлгэцэд тусгал үүсгэх үү?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Дэлгэцийг идэвхжүүлэх"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон болон камер"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Аппын саяхны ашиглалт"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Саяхны хандалтыг харах"</string>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 72c5cb63fb52..eb30836b0460 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"खाली हलवा"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"डावीकडे हलवा"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"उजवीकडे हलवा"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"मॅग्निफिकेशन स्विच"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"फुल स्क्रीन मॅग्निफाय करा"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रीनचा काही भाग मॅग्निफाय करा"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant चे लक्ष हे आता अ‍ॅक्टिव्ह आहे"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिंग्ज मध्ये डीफॉल्ट टिपा अ‍ॅप सेट करा"</string>
<string name="install_app" msgid="5066668100199613936">"अ‍ॅप इंस्टॉल करा"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाह्य डिस्प्लेवर मिरर करायचे आहे का?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"डिस्प्ले सुरू करा"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"मायक्रोफोन आणि कॅमेरा"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"अलीकडील अ‍ॅप वापर"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"अलीकडील अ‍ॅक्सेस पहा"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index fd4e6b51001c..f57a66517274 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Alih ke bawah"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Alih ke kiri"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Alih ke kanan"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suis pembesaran"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Besarkan skrin penuh"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Besarkan sebahagian skrin"</string>
@@ -906,7 +914,7 @@
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# kawalan ditambah.}other{# kawalan ditambah.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"Dialih keluar"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"Tambahkan <xliff:g id="APPNAME">%s</xliff:g>?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g>boleh memilih kawalan dan kandungan yang dipaparkan di sini."</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> boleh memilih kawalan dan kandungan yang dipaparkan di sini."</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Alih keluar kawalan untuk <xliff:g id="APPNAME">%s</xliff:g>?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"Digemari"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"Digemari, kedudukan <xliff:g id="NUMBER">%d</xliff:g>"</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 5d249dec93b0..bfb43ff2eae4 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -100,7 +100,7 @@
<string name="screenrecord_title" msgid="4257171601439507792">"ဖန်သားပြင်ရိုက်ကူးစက်"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"စကရင်ရိုက်ကူးမှု အပြီးသတ်နေသည်"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ဖန်သားပြင် ရိုက်ကူးသည့် စက်ရှင်အတွက် ဆက်တိုက်လာနေသော အကြောင်းကြားချက်"</string>
- <string name="screenrecord_permission_dialog_title" msgid="303380743267672953">"စတင် ရိုက်သံဖမ်းမလား။"</string>
+ <string name="screenrecord_permission_dialog_title" msgid="303380743267672953">"ရိုက်သံဖမ်းခြင်း စတင်မလား။"</string>
<string name="screenrecord_permission_dialog_warning_entire_screen" msgid="4152602778470789965">"ရုပ်သံဖမ်းနေစဉ် Android သည် သင့်ဖန်သားပြင်တွင် မြင်နိုင်သည့် (သို့) သင့်စက်တွင် ဖွင့်ထားသည့် အရာအားလုံးကို တွေ့နိုင်သည်။ စကားဝှက်၊ ငွေပေးချေမှု အချက်အလက်၊ မက်ဆေ့ဂျ်၊ ဓာတ်ပုံ၊ အသံနှင့် ဗီဒီယိုကဲ့သို့ အရာများကို ဂရုစိုက်ပါ။"</string>
<string name="screenrecord_permission_dialog_warning_single_app" msgid="6818309727772146138">"အက်ပ်တစ်ခုကို ရုပ်သံဖမ်းနေစဉ် Android သည် ယင်းအက်ပ်တွင် ပြထားသည့် (သို့) ဖွင့်ထားသည့် အရာအားလုံးကို တွေ့နိုင်သည်။ ထို့ကြောင့် စကားဝှက်၊ ငွေပေးချေမှု အချက်အလက်၊ မက်ဆေ့ဂျ်၊ ဓာတ်ပုံ၊ အသံနှင့် ဗီဒီယိုကဲ့သို့ အရာများကို ဂရုစိုက်ပါ။"</string>
<string name="screenrecord_permission_dialog_continue" msgid="5811122652514424967">"ရုပ်သံ စဖမ်းရန်"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"အောက်သို့ရွှေ့ရန်"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ဘယ်ဘက်သို့ရွှေ့ရန်"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ညာဘက်သို့ရွှေ့ရန်"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ချဲ့ရန် ခလုတ်"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ဖန်သားပြင်အပြည့် ချဲ့သည်"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ဖန်သားပြင် တစ်စိတ်တစ်ပိုင်းကို ချဲ့ပါ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant နားထောင်နေသည်"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ဆက်တင်များတွင် မူရင်းမှတ်စုများအက်ပ် သတ်မှတ်ပါ"</string>
<string name="install_app" msgid="5066668100199613936">"အက်ပ် ထည့်သွင်းရန်"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ပြင်ပဖန်သားပြင်သို့ စကရင်ပွားမလား။"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ဖန်သားပြင်ကို ဖွင့်ရန်"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"မိုက်ခရိုဖုန်းနှင့် ကင်မရာ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"လတ်တလော အက်ပ်အသုံးပြုမှု"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"လတ်တလောအသုံးပြုမှုကို ကြည့်ရန်"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 17846751a258..6923671c399b 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Flytt ned"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Flytt til venstre"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Flytt til høyre"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Forstørringsbryter"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Forstørr hele skjermen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Forstørr en del av skjermen"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistentoppmerksomhet er på"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Du kan velge en standardapp for notater i Innstillinger"</string>
<string name="install_app" msgid="5066668100199613936">"Installer appen"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vil du speile til en ekstern skjerm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Slå på skjermen"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon og kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nylig appbruk"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se nylig tilgang"</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 94ac4b7fcfc4..934718449155 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -299,13 +299,13 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"कामसम्बन्धी एपहरू"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"पज गरिएको छ"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Night Light"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"सूर्यास्तमा सक्रिय"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"सर्यास्त हुँदा अन हुन्छ"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"सूर्योदयसम्म"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g> मा सक्रिय"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> सम्म"</string>
<string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"अँध्यारो थिम"</string>
<string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"ब्याट्री सेभर"</string>
- <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"सूर्यास्तमा सक्रिय"</string>
+ <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"सर्यास्त हुँदा अन हुन्छ"</string>
<string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"सूर्योदयसम्म"</string>
<string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"<xliff:g id="TIME">%s</xliff:g> मा सक्रिय"</string>
<string name="quick_settings_dark_mode_secondary_label_until" msgid="2289774641256492437">"<xliff:g id="TIME">%s</xliff:g> सम्म"</string>
@@ -396,7 +396,7 @@
<string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"हो, जारी राख्नुहोस्"</string>
<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_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"तपाईंले नयाँ प्रयोगकर्ता हाल्नुभयो भने तपाईं अतिथि मोडबाट बाहिरिनु हुने छ र हालको अतिथि सत्रका सबै एप तथा डेटा मेटिने छ।"</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>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"तल सार्नुहोस्"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"बायाँ सार्नुहोस्"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"दायाँ सार्नुहोस्"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"म्याग्निफिकेसन स्विच"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"पूरै स्क्रिन जुम इन गर्नुहोस्"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रिनको केही भाग म्याग्निफाइ गर्नुहोस्"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"सहायकले सुनिरहेको छ"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिङमा गई नोट बनाउने डिफल्ट एप तोक्नुहोस्"</string>
<string name="install_app" msgid="5066668100199613936">"एप इन्स्टल गर्नुहोस्"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाह्य डिस्प्लेमा मिरर गर्ने हो?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"डिस्प्ले अन गर्नुहोस्"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"माइक्रोफोन तथा क्यामेरा"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"एपको हालसालैको प्रयोग"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"हालसालै एक्सेस गर्ने एप हेर्नुहोस्"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index f15eda0eaec0..a42337f895c7 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Omlaag verplaatsen"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Naar links verplaatsen"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Naar rechts verplaatsen"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrotingsschakelaar"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Volledig scherm vergroten"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Deel van het scherm vergroten"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent-aandacht aan"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standaard notitie-app instellen in Instellingen"</string>
<string name="install_app" msgid="5066668100199613936">"App installeren"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Spiegelen naar extern scherm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Scherm aanzetten"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microfoon en camera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Recent app-gebruik"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Recente toegang bekijken"</string>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index 8e34628e67de..24aef78e987b 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ତଳକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ବାମକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ଡାହାଣକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ମ୍ୟାଗ୍ନିଫିକେସନ୍ ସ୍ୱିଚ୍"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ସମ୍ପୂର୍ଣ୍ଣ ସ୍କ୍ରିନକୁ ମ୍ୟାଗ୍ନିଫାଏ କରନ୍ତୁ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ସ୍କ୍ରିନର ଅଂଶ ମାଗ୍ନିଫାଏ କରନ୍ତୁ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ଆଟେନସନ ଚାଲୁ ଅଛି"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ସେଟିଂସରେ ଡିଫଲ୍ଟ ନୋଟ୍ସ ଆପ ସେଟ କରନ୍ତୁ"</string>
<string name="install_app" msgid="5066668100199613936">"ଆପ ଇନଷ୍ଟଲ କରନ୍ତୁ"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ଏକ୍ସଟର୍ନଲ ଡିସପ୍ଲେକୁ ମିରର କରିବେ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ଡିସପ୍ଲେକୁ ସକ୍ଷମ କରନ୍ତୁ"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ମାଇକ୍ରୋଫୋନ ଏବଂ କେମେରା"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ବର୍ତ୍ତମାନର ଆପ ବ୍ୟବହାର"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ବର୍ତ୍ତମାନର ଆକ୍ସେସ ଦେଖନ୍ତୁ"</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 0861ca3ac1be..2ebc398fe7ce 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ਹੇਠਾਂ ਲਿਜਾਓ"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ਖੱਬੇ ਲਿਜਾਓ"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ਸੱਜੇ ਲਿਜਾਓ"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"ਵੱਡਦਰਸ਼ੀਕਰਨ ਸਵਿੱਚ"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ਪੂਰੀ ਸਕ੍ਰੀਨ ਨੂੰ ਵੱਡਦਰਸ਼ੀ ਕਰੋ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ਸਕ੍ਰੀਨ ਦੇ ਹਿੱਸੇ ਨੂੰ ਵੱਡਾ ਕਰੋ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ਧਿਆਨ ਸੁਵਿਧਾ ਨੂੰ ਚਾਲੂ ਹੈ"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਜਾ ਕੇ ਪੂਰਵ-ਨਿਰਧਾਰਿਤ ਨੋਟ ਐਪ ਨੂੰ ਸੈੱਟ ਕਰੋ"</string>
<string name="install_app" msgid="5066668100199613936">"ਐਪ ਸਥਾਪਤ ਕਰੋ"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ਕੀ ਬਾਹਰੀ ਡਿਸਪਲੇ \'ਤੇ ਪ੍ਰਤਿਬਿੰਬਿਤ ਕਰਨਾ ਹੈ?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ਡਿਸਪਲੇ ਚਾਲੂ ਕਰੋ"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ਮਾਈਕ੍ਰੋਫ਼ੋਨ ਅਤੇ ਕੈਮਰਾ"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ਹਾਲ ਹੀ ਵਿੱਚ ਵਰਤੀ ਗਈ ਐਪ"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ਹਾਲੀਆ ਪਹੁੰਚ ਦੇਖੋ"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index fff57dba3b7c..b495a5768b4b 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Przesuń w dół"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Przesuń w lewo"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Przesuń w prawo"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Przełączanie powiększenia"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Powiększanie pełnego ekranu"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Powiększ część ekranu"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asystent jest aktywny"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ustaw domyślną aplikację do obsługi notatek w Ustawieniach"</string>
<string name="install_app" msgid="5066668100199613936">"Zainstaluj aplikację"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Powielić na wyświetlaczu zewnętrznym?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Włącz wyświetlacz"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i aparat"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Aplikacje korzystające w ostatnim czasie"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobacz ostatni dostęp"</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 431863e62ecf..abfc9412b904 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -109,7 +109,7 @@
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sons do dispositivo, como música, chamadas e toques"</string>
<string name="screenrecord_mic_label" msgid="2111264835791332350">"Microfone"</string>
<string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Áudio e microfone do dispositivo"</string>
- <string name="screenrecord_continue" msgid="4055347133700593164">"Início"</string>
+ <string name="screenrecord_continue" msgid="4055347133700593164">"Iniciar"</string>
<string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Gravando tela"</string>
<string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Gravando tela e áudio"</string>
<string name="screenrecord_taps_label" msgid="1595690528298857649">"Mostrar toques na tela"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Chave de ampliação"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar toda a tela"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte da tela"</string>
@@ -906,7 +914,7 @@
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# controle adicionado.}one{# controle adicionado.}many{# de controles adicionados.}other{# controles adicionados.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"Removido"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"Adicionar o app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"O app <xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Remover controles do app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"Adicionado como favorito"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"Adicionado como favorito (posição <xliff:g id="NUMBER">%d</xliff:g>)"</string>
@@ -1130,7 +1138,7 @@
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
<string name="log_access_confirmation_title" msgid="4843557604739943395">"Permitir que o app <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> acesse todos os registros do dispositivo?"</string>
- <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir o acesso único"</string>
+ <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir acesso único"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Não permitir"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"Os registros do dispositivo gravam o que acontece nele. Os apps podem usar esses registros para encontrar e corrigir problemas.\n\nAlguns registros podem conter informações sensíveis, então autorize o acesso a eles apenas para os apps em que você confia. \n\nSe você não permitir que esse app acesse todos os registros do dispositivo, ele ainda vai poder acessar os dele. O fabricante do dispositivo também pode ter acesso a alguns registros ou informações."</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Saiba mais"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Atenção do Assistente ativada"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defina o app de notas padrão nas Configurações"</string>
<string name="install_app" msgid="5066668100199613936">"Instalar o app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Espelhar para a tela externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Ativar tela"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microfone e câmera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente do app"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consultar acessos recentes"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 1c0ff6b1a105..85cd09aa3f5d 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor de ampliação"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar o ecrã inteiro"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte do ecrã"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 431863e62ecf..abfc9412b904 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -109,7 +109,7 @@
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sons do dispositivo, como música, chamadas e toques"</string>
<string name="screenrecord_mic_label" msgid="2111264835791332350">"Microfone"</string>
<string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Áudio e microfone do dispositivo"</string>
- <string name="screenrecord_continue" msgid="4055347133700593164">"Início"</string>
+ <string name="screenrecord_continue" msgid="4055347133700593164">"Iniciar"</string>
<string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Gravando tela"</string>
<string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Gravando tela e áudio"</string>
<string name="screenrecord_taps_label" msgid="1595690528298857649">"Mostrar toques na tela"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Chave de ampliação"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar toda a tela"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte da tela"</string>
@@ -906,7 +914,7 @@
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# controle adicionado.}one{# controle adicionado.}many{# de controles adicionados.}other{# controles adicionados.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"Removido"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"Adicionar o app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
- <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
+ <string name="controls_panel_authorization" msgid="7045551688535104194">"O app <xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
<string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Remover controles do app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
<string name="accessibility_control_favorite" msgid="8694362691985545985">"Adicionado como favorito"</string>
<string name="accessibility_control_favorite_position" msgid="54220258048929221">"Adicionado como favorito (posição <xliff:g id="NUMBER">%d</xliff:g>)"</string>
@@ -1130,7 +1138,7 @@
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
<string name="log_access_confirmation_title" msgid="4843557604739943395">"Permitir que o app <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> acesse todos os registros do dispositivo?"</string>
- <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir o acesso único"</string>
+ <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir acesso único"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Não permitir"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"Os registros do dispositivo gravam o que acontece nele. Os apps podem usar esses registros para encontrar e corrigir problemas.\n\nAlguns registros podem conter informações sensíveis, então autorize o acesso a eles apenas para os apps em que você confia. \n\nSe você não permitir que esse app acesse todos os registros do dispositivo, ele ainda vai poder acessar os dele. O fabricante do dispositivo também pode ter acesso a alguns registros ou informações."</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Saiba mais"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Atenção do Assistente ativada"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defina o app de notas padrão nas Configurações"</string>
<string name="install_app" msgid="5066668100199613936">"Instalar o app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Espelhar para a tela externa?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Ativar tela"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microfone e câmera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente do app"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consultar acessos recentes"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 513abc28a33d..1f57dfe09d64 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Mută în jos"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Mută la stânga"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Mută spre dreapta"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Comutator de mărire"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Mărește tot ecranul"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Mărește o parte a ecranului"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistentul este atent"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setează aplicația prestabilită de note din Setări"</string>
<string name="install_app" msgid="5066668100199613936">"Instalează aplicația"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Oglindești pe ecranul extern?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Activează ecranul"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microfon și cameră"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilizare recentă în aplicații"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Vezi accesarea recentă"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 694ccdf1aeb1..1ea9d34e548f 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Переместить вниз"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Переместить влево"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Переместить вправо"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Переключатель режима увеличения"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увеличение всего экрана"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увеличить часть экрана"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Ассистент готов слушать"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайте стандартное приложение для заметок в настройках."</string>
<string name="install_app" msgid="5066668100199613936">"Установить приложение"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Дублировать на внешний дисплей?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Включить дисплей"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Недавнее использование приложениями"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Посмотреть недавний доступ"</string>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 7ac474d67c8f..3f2978cbac52 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"පහළට ගෙන යන්න"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"වමට ගෙන යන්න"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"දකුණට ගෙන යන්න"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"විශාලන ස්විචය"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"පූර්ණ තිරය විශාලනය කරන්න"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"තිරයේ කොටසක් විශාලනය කරන්න"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"සහයක අවධානය යොමු කරයි"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"සැකසීම් තුළ පෙරනිමි සටහන් යෙදුම සකසන්න"</string>
<string name="install_app" msgid="5066668100199613936">"යෙදුම ස්ථාපනය කරන්න"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"බාහිර සංදර්ශකයට දර්පණය කරන්න ද?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"සංදර්ශකය සබල කරන්න"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"මයික්‍රොෆෝනය සහ කැමරාව"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"මෑත යෙදුම් භාවිතය"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"මෑත ප්‍රවේශය බලන්න"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 92813d026370..ba94b1af65cd 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -299,7 +299,7 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Pracovné aplikácie"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Pozastavené"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Nočný režim"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Zapne sa pri západe slnka"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Zap. pri záp. slnka"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"Do východu slnka"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Od <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Posunúť nadol"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Posunúť doľava"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Posunúť doprava"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prepínač zväčenia"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zväčšenie celej obrazovky"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zväčšiť časť obrazovky"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Pozornosť Asistenta je zapnutá"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nastavte predvolenú aplikáciu na poznámky v Nastaveniach"</string>
<string name="install_app" msgid="5066668100199613936">"Inštalovať aplikáciu"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Chcete zrkadliť na externú obrazovku?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Povoliť obrazovku"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofón a fotoaparát"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedávne využitie aplikácie"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobraziť nedávny prístup"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 065035480574..8baa3b6a107d 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Premakni navzdol"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Premakni levo"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Premakni desno"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Stikalo za povečavo"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Povečanje celotnega zaslona"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Povečava dela zaslona"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Zaznavanje pomočnika je vklopljeno."</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nastavite privzeto aplikacijo za zapiske v nastavitvah."</string>
<string name="install_app" msgid="5066668100199613936">"Namesti aplikacijo"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite zrcaliti v zunanji zaslon?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Omogoči zaslon"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon in fotoaparat"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavna uporaba v aplikacijah"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ogled nedavnih dostopov"</string>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 08d3c55381da..ec1a6ccd11ac 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -299,7 +299,7 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Aplikacionet e punës"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Vendosur në pauzë"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Drita e natës"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Në perëndim të diellit"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Aktiv në perëndim"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"Deri në lindje të diellit"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Aktive në <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Deri në <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -382,7 +382,7 @@
<string name="interruption_level_none_twoline" msgid="8579382742855486372">"Heshtje\ne plotë"</string>
<string name="interruption_level_priority_twoline" msgid="8523482736582498083">"Vetëm\nme prioritet"</string>
<string name="interruption_level_alarms_twoline" msgid="2045067991335708767">"Vetëm\nalarmet"</string>
- <string name="keyguard_indication_charging_time_wireless" msgid="577856646141738675">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet me valë • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
+ <string name="keyguard_indication_charging_time_wireless" msgid="577856646141738675">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet në mënyrë wireless • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
<string name="keyguard_indication_charging_time" msgid="6492711711891071502">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
<string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet shpejt • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
<string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet ngadalë • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Lëvize poshtë"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Lëvize majtas"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Lëvize djathtas"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Ndërrimi i zmadhimit"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zmadho ekranin e plotë"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zmadho një pjesë të ekranit"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Vëmendja e \"Asistentit\" aktive"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Cakto aplikacionin e parazgjedhur të shënimeve te \"Cilësimet\""</string>
<string name="install_app" msgid="5066668100199613936">"Instalo aplikacionin"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Të pasqyrohet në ekranin e jashtëm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktivizo ekranin"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoni dhe kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Përdorimi i fundit i aplikacionit"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Shiko qasjen e fundit"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 1856303313f5..fc67121e7b5d 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Померите надоле"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Померите налево"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Померите надесно"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Прелазак на други режим увећања"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увећајте цео екран"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увећајте део екрана"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Помоћник је у активном стању"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Подесите подразумевану апликацију за белешке у Подешавањима"</string>
<string name="install_app" msgid="5066668100199613936">"Инсталирај апликацију"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Желите ли да пресликате на спољњи екран?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Омогући екран"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Недавно користила апликација"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Прикажи недавни приступ"</string>
@@ -1186,10 +1192,10 @@
<string name="privacy_dialog_manage_permissions" msgid="2543451567190470413">"Управљај приступом"</string>
<string name="privacy_dialog_active_call_usage" msgid="7858746847946397562">"Користи телефонски позив"</string>
<string name="privacy_dialog_recent_call_usage" msgid="1214810644978167344">"Недавно коришћено у телефонском позиву"</string>
- <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Користи <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="privacy_dialog_recent_app_usage" msgid="4883417856848222450">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
- <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Користи <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
+ <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
- <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_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>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 76b6f1db9e45..98c830189526 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Flytta nedåt"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Flytta åt vänster"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Flytta åt höger"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Förstoringsreglage"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Förstora hela skärmen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Förstora en del av skärmen"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistenten är aktiverad"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ställ in en standardapp för anteckningar i inställningarna"</string>
<string name="install_app" msgid="5066668100199613936">"Installera appen"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vill du spegla till extern skärm?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Aktivera skärm"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon och kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Senaste appanvändning"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se senaste åtkomst"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 17135446878f..0bc5750d9a77 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Sogeza chini"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Sogeza kushoto"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Sogeza kulia"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Swichi ya ukuzaji"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Kuza skrini nzima"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Kuza sehemu ya skrini"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Programu ya Mratibu imewashwa"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Teua programu chaguomsingi ya madokezo katika Mipangilio"</string>
<string name="install_app" msgid="5066668100199613936">"Sakinisha programu"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Ungependa kuonyesha kwenye skrini ya nje?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Washa skrini"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Maikrofoni na Kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Matumizi ya programu hivi majuzi"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Angalia ufikiaji wa majuzi"</string>
diff --git a/packages/SystemUI/res/values-sw600dp-land/config.xml b/packages/SystemUI/res/values-sw600dp-land/config.xml
index 588638f3dea5..e63229aea70b 100644
--- a/packages/SystemUI/res/values-sw600dp-land/config.xml
+++ b/packages/SystemUI/res/values-sw600dp-land/config.xml
@@ -36,4 +36,8 @@
<integer name="power_menu_lite_max_columns">3</integer>
<integer name="power_menu_lite_max_rows">2</integer>
+ <!-- Whether to force split shade.
+ For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+ TODO (b/293290851) - change this comment/resource when flag is enabled -->
+ <bool name="force_config_use_split_notification_shade">false</bool>
</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 915dcdb9755f..1e54fc9e1445 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -80,10 +80,10 @@
<dimen name="large_screen_shade_header_height">42dp</dimen>
<!-- start padding is smaller to account for status icon margins coming from drawable itself -->
- <dimen name="shade_header_system_icons_padding_start">3dp</dimen>
- <dimen name="shade_header_system_icons_padding_end">4dp</dimen>
- <dimen name="shade_header_system_icons_padding_top">2dp</dimen>
- <dimen name="shade_header_system_icons_padding_bottom">2dp</dimen>
+ <dimen name="hover_system_icons_container_padding_start">3dp</dimen>
+ <dimen name="hover_system_icons_container_padding_end">4dp</dimen>
+ <dimen name="hover_system_icons_container_padding_top">2dp</dimen>
+ <dimen name="hover_system_icons_container_padding_bottom">2dp</dimen>
<!-- Lockscreen shade transition values -->
<dimen name="lockscreen_shade_transition_by_tap_distance">200dp</dimen>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index c0e4c3d716ee..f3954d6a06c2 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"கீழே நகர்த்து"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"இடப்புறம் நகர்த்து"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"வலப்புறம் நகர்த்து"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"பெரிதாக்கல் ஸ்விட்ச்"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"முழுத்திரையைப் பெரிதாக்கும்"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"திரையின் ஒரு பகுதியைப் பெரிதாக்கும்"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"அசிஸ்டண்ட்டின் கவனம் இயக்கத்தில் உள்ளது"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"குறிப்பு எடுப்பதற்கான இயல்புநிலை ஆப்ஸை அமைப்புகளில் அமையுங்கள்"</string>
<string name="install_app" msgid="5066668100199613936">"ஆப்ஸை நிறுவுங்கள்"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"வெளிப்புறக் காட்சிக்கு மிரர் செய்யவா?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"காட்சியை இயக்கு"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"மைக்ரோஃபோனும் கேமராவும்"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"சமீபத்திய ஆப்ஸ் பயன்பாடு"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"சமீபத்திய அணுகலைக் காட்டு"</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 22a329b4e648..1d221f42c852 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"కిందకి పంపండి"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ఎడమవైపుగా జరపండి"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"కుడివైపుగా జరపండి"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"మ్యాగ్నిఫికేషన్ స్విచ్"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ఫుల్ స్క్రీన్‌ను మ్యాగ్నిఫై చేయండి"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"స్క్రీన్‌లో భాగాన్ని మ్యాగ్నిఫై చేయండి"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant అటెన్షన్ ఆన్‌లో ఉంది"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"సెట్టింగ్‌లలో ఆటోమేటిక్‌గా ఉండేలా ఒక నోట్స్ యాప్‌ను సెట్ చేసుకోండి"</string>
<string name="install_app" msgid="5066668100199613936">"యాప్‌ను ఇన్‌స్టాల్ చేయండి"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"బాహ్య డిస్‌ప్లే‌ను మిర్రర్ చేయాలా?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"డిస్‌ప్లే‌ను ఎనేబుల్ చేయండి"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"మైక్రోఫోన్ &amp; కెమెరా"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"ఇటీవలి యాప్ వినియోగం"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ఇటీవలి యాక్సెస్‌ను చూడండి"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 3887b9f8b9c4..df4ab83ee5b1 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"ย้ายลง"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"ย้ายไปทางซ้าย"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"ย้ายไปทางขวา"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"เปลี่ยนโหมดการขยาย"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ขยายเป็นเต็มหน้าจอ"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ขยายบางส่วนของหน้าจอ"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"การเรียกใช้งาน Assistant เปิดอยู่"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"กำหนดแอปการจดบันทึกเริ่มต้นในการตั้งค่า"</string>
<string name="install_app" msgid="5066668100199613936">"ติดตั้งแอป"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"มิเรอร์ไปยังจอแสดงผลภายนอกไหม"</string>
+ <string name="enable_display" msgid="8308309634883321977">"เปิดใช้จอแสดงผล"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"ไมโครโฟนและกล้อง"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"การใช้แอปครั้งล่าสุด"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"ดูการเข้าถึงล่าสุด"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 2fdee7220e6c..a6535fdee5d5 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Ibaba"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Ilipat pakaliwa"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Ilipat pakanan"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Switch ng pag-magnify"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"I-magnify ang buong screen"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"I-magnify ang isang bahagi ng screen"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index b01fee15ec5a..a8a9ba4725f2 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Aşağı taşı"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Sola taşı"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Sağa taşı"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Büyütme moduna geçin"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Tam ekran büyütme"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekranın bir parçasını büyütün"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistan dinliyor"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ayarlar\'ı kullanarak varsayılan notlar ayarlayın"</string>
<string name="install_app" msgid="5066668100199613936">"Uygulamayı yükle"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Harici ekrana yansıtılsın mı?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Ekranı etkinleştir"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon ve Kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Son uygulama kullanımı"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Son erişimi göster"</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index db3441352422..48c45ae68414 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -299,7 +299,7 @@
<string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Робочі додатки"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Призупинено"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Нічний екран"</string>
- <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Вмикається ввечері"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Запуск увечері"</string>
<string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"До сходу сонця"</string>
<string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Вмикається о <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"До <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -754,7 +754,7 @@
<string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"вилучити опцію"</string>
<string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"додати опцію в кінець"</string>
<string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Перемістити опцію"</string>
- <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Додати опцію"</string>
+ <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Додати панель"</string>
<string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Перемістити на позицію <xliff:g id="POSITION">%1$d</xliff:g>"</string>
<string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Додати на позицію <xliff:g id="POSITION">%1$d</xliff:g>"</string>
<string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Позиція <xliff:g id="POSITION">%1$d</xliff:g>"</string>
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Перемістити вниз"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Перемістити ліворуч"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Перемістити праворуч"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Перемикач режиму збільшення"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Збільшення всього екрана"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Збільшити частину екрана"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Асистента активовано"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Призначте стандартний додаток для нотаток у налаштуваннях"</string>
<string name="install_app" msgid="5066668100199613936">"Установити додаток"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Дублювати на зовнішньому екрані?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Увімкнути екран"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Мікрофон і камера"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Нещодавнє використання додатками"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Переглянути нещодавній доступ"</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 8115e2e086ca..de38ca103ac8 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"نیچے منتقل کریں"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"بائیں منتقل کریں"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"دائیں منتقل کریں"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"میگنیفکیشن پر سوئچ کریں"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"فُل اسکرین کو بڑا کریں"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"اسکرین کا حصہ بڑا کریں"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"اسسٹنٹ کی توجہ آن ہے"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ترتیبات میں ڈیفالٹ نوٹس ایپ سیٹ کریں"</string>
<string name="install_app" msgid="5066668100199613936">"ایپ انسٹال کریں"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"بیرونی ڈسپلے پر مرر کریں؟"</string>
+ <string name="enable_display" msgid="8308309634883321977">"ڈسپلے کو فعال کریں"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"مائیکروفون اور کیمرا"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"حالیہ ایپ کا استعمال"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"حالیہ رسائی دیکھیں"</string>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 30e0618c1563..e5703b292a1d 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Pastga siljitish"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Chapga siljitish"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Oʻngga siljitish"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Kattalashtirish rejimini almashtirish"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ekranni toʻliq kattalashtirish"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekran qismini kattalashtirish"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent diqqati yoniq"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standart qaydlar ilovasini Sozlamalar orqali tanlang"</string>
<string name="install_app" msgid="5066668100199613936">"Ilovani oʻrnatish"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Tashqi displeyda aks ettirilsinmi?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Displeyni yoqish"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon va kamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Ilovadan oxirgi foydalanish"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Oxirgi ruxsatni koʻrish"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index f4c62a5297fe..f022aea90797 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Di chuyển xuống"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Di chuyển sang trái"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Di chuyển sang phải"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Nút chuyển phóng to"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Phóng to toàn màn hình"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Phóng to một phần màn hình"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Trợ lý đang bật"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Đặt ứng dụng ghi chú mặc định trong phần Cài đặt"</string>
<string name="install_app" msgid="5066668100199613936">"Cài đặt ứng dụng"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Đồng bộ hoá hai chiều sang màn hình ngoài?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Bật màn hình"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Micrô và máy ảnh"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Hoạt động sử dụng gần đây của ứng dụng"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Xem hoạt động truy cập gần đây"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index f3ade0390797..6876b1cf623b 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"下移"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"左移"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"右移"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"切换放大模式"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大整个屏幕"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大部分屏幕"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"已开启 Google 助理感知功能"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在设置中设置默认记事应用"</string>
<string name="install_app" msgid="5066668100199613936">"安装应用"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"镜像到外接显示屏?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"启用显示屏"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"麦克风和摄像头"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"近期应用对手机传感器的使用情况"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期使用情况"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index efc567107d8f..31f2a8532d0e 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"向下移"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"向左移"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"向右移"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"放大開關"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大成個畫面"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大部分螢幕畫面"</string>
@@ -1130,7 +1138,7 @@
<string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
<string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
<string name="log_access_confirmation_title" msgid="4843557604739943395">"要允許「<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g>」存取所有裝置記錄嗎?"</string>
- <string name="log_access_confirmation_allow" msgid="752147861593202968">"允許存取一次"</string>
+ <string name="log_access_confirmation_allow" msgid="752147861593202968">"允許單次存取"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"不允許"</string>
<string name="log_access_confirmation_body" msgid="6883031912003112634">"裝置記錄會記下裝置的活動。應用程式可透過這些記錄找出並修正問題。\n\n部分記錄可能包含敏感資料,因此請只允許信任的應用程式存取所有裝置記錄。\n\n如果不允許此應用程式存取所有裝置記錄,此應用程式仍能存取自己的記錄,且裝置製造商可能仍可存取裝置上的部分記錄或資料。"</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"瞭解詳情"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"「Google 助理」感應功能已開啟"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在「設定」中指定預設筆記應用程式"</string>
<string name="install_app" msgid="5066668100199613936">"安裝應用程式"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"要鏡像投射至外部顯示屏嗎?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"啟用顯示屏"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"麥克風和相機"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"近期應用程式使用情況"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期存取記錄"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index af84a3122289..81ce876faf3c 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"向下移"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"向左移"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"向右移"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"切換放大模式"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大整個螢幕畫面"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大局部螢幕畫面"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Google 助理感知功能已開啟"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在「設定」中指定預設記事應用程式"</string>
<string name="install_app" msgid="5066668100199613936">"安裝應用程式"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"要以鏡像方式投放至外部螢幕嗎?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"啟用螢幕"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"麥克風和相機"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"最近曾使用感應器的應用程式"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期存取記錄"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 11cf44b4e2e6..63f32227d7e7 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -863,6 +863,14 @@
<string name="accessibility_control_move_down" msgid="5390922476900974512">"Yehlisa"</string>
<string name="accessibility_control_move_left" msgid="8156206978511401995">"Yisa kwesokunxele"</string>
<string name="accessibility_control_move_right" msgid="8926821093629582888">"Yisa kwesokudla"</string>
+ <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+ <skip />
+ <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+ <skip />
+ <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+ <skip />
<string name="magnification_mode_switch_description" msgid="2698364322069934733">"Iswishi yokukhulisa"</string>
<string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Khulisa isikrini esigcwele"</string>
<string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Khulisa ingxenye eyesikrini"</string>
@@ -1170,10 +1178,8 @@
<string name="assistant_attention_content_description" msgid="6830215897604642875">"Ukunaka kwe-Assistant kuvuliwe"</string>
<string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setha i-app yamanothi azenzakalelayo Kumsethingi"</string>
<string name="install_app" msgid="5066668100199613936">"Faka i-app"</string>
- <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
- <skip />
- <!-- no translation found for enable_display (8308309634883321977) -->
- <skip />
+ <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Fanisa nesibonisi sangaphandle?"</string>
+ <string name="enable_display" msgid="8308309634883321977">"Nika amandla isibonisi"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Imakrofoni Nekhamera"</string>
<string name="privacy_dialog_summary" msgid="2458769652125995409">"Ukusetshenziswa kwakamuva kwe-app"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Bona ukufinyelela kwakamuva"</string>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index c13480672102..c72f5657176b 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -592,6 +592,11 @@
<!-- Whether to use the split 2-column notification shade -->
<bool name="config_use_split_notification_shade">false</bool>
+ <!-- Whether to force split shade.
+ For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+ TODO (b/293290851) - change this comment/resource when flag is enabled -->
+ <bool name="force_config_use_split_notification_shade">false</bool>
+
<!-- Whether we use large screen shade header which takes only one row compared to QS header -->
<bool name="config_use_large_screen_shade_header">false</bool>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index b086ed8960b1..ae3138ef0c52 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -496,10 +496,10 @@
<dimen name="large_screen_shade_header_min_height">@dimen/qs_header_row_min_height</dimen>
<dimen name="large_screen_shade_header_left_padding">@dimen/qs_horizontal_margin</dimen>
<dimen name="shade_header_system_icons_height">@dimen/large_screen_shade_header_min_height</dimen>
- <dimen name="shade_header_system_icons_padding_start">0dp</dimen>
- <dimen name="shade_header_system_icons_padding_end">0dp</dimen>
- <dimen name="shade_header_system_icons_padding_top">0dp</dimen>
- <dimen name="shade_header_system_icons_padding_bottom">0dp</dimen>
+ <dimen name="hover_system_icons_container_padding_start">0dp</dimen>
+ <dimen name="hover_system_icons_container_padding_end">0dp</dimen>
+ <dimen name="hover_system_icons_container_padding_top">0dp</dimen>
+ <dimen name="hover_system_icons_container_padding_bottom">0dp</dimen>
<!-- The top margin of the panel that holds the list of notifications.
On phones it's always 0dp but it's overridden in Car UI
diff --git a/packages/SystemUI/res/values/flags.xml b/packages/SystemUI/res/values/flags.xml
index 0d45422f7369..090346364d6c 100644
--- a/packages/SystemUI/res/values/flags.xml
+++ b/packages/SystemUI/res/values/flags.xml
@@ -38,9 +38,6 @@
protected. -->
<bool name="flag_battery_shield_icon">false</bool>
- <!-- Whether face auth will immediately stop when the display state is OFF -->
- <bool name="flag_stop_face_auth_on_display_off">true</bool>
-
<!-- Whether we want to stop pulsing while running the face scanning animation -->
<bool name="flag_stop_pulsing_face_scanning_animation">true</bool>
</resources>
diff --git a/packages/SystemUI/shared/Android.bp b/packages/SystemUI/shared/Android.bp
index a6517c1dde1b..0415341c16b6 100644
--- a/packages/SystemUI/shared/Android.bp
+++ b/packages/SystemUI/shared/Android.bp
@@ -46,6 +46,7 @@ android_library {
":wm_shell_util-sources",
],
static_libs: [
+ "BiometricsSharedLib",
"PluginCoreLib",
"SystemUIAnimationLib",
"SystemUIPluginLib",
diff --git a/packages/SystemUI/shared/biometrics/Android.bp b/packages/SystemUI/shared/biometrics/Android.bp
new file mode 100644
index 000000000000..2bd7d9780bf5
--- /dev/null
+++ b/packages/SystemUI/shared/biometrics/Android.bp
@@ -0,0 +1,20 @@
+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_packages_SystemUI_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
+}
+
+android_library {
+ name: "BiometricsSharedLib",
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ ],
+ resource_dirs: [
+ "res",
+ ],
+ min_sdk_version: "current",
+}
diff --git a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml b/packages/SystemUI/shared/biometrics/AndroidManifest.xml
index 1a52e93df8ae..861321b9914f 100644
--- a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml
+++ b/packages/SystemUI/shared/biometrics/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2021 The Android Open Source Project
+ ~ 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.
@@ -15,7 +15,6 @@
~ limitations under the License.
-->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Don't use the smaller PIN pad keys if we have the screen space to support it. -->
- <string name="num_pad_key_ratio">1.0</string>
-</resources>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.systemui.shared.biometrics">
+</manifest> \ No newline at end of file
diff --git a/packages/SystemUI/shared/biometrics/res/values/strings.xml b/packages/SystemUI/shared/biometrics/res/values/strings.xml
new file mode 100644
index 000000000000..c15c2b3386c0
--- /dev/null
+++ b/packages/SystemUI/shared/biometrics/res/values/strings.xml
@@ -0,0 +1,27 @@
+<?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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+ <string name="udfps_accessibility_touch_hints_left"> Move left </string>
+ <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+ <string name="udfps_accessibility_touch_hints_down"> Move down </string>
+ <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+ <string name="udfps_accessibility_touch_hints_right"> Move right </string>
+ <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+ <string name="udfps_accessibility_touch_hints_up"> Move up </string>
+</resources> \ No newline at end of file
diff --git a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java
index 31f014c27a13..9574fba62269 100644
--- a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package com.android.settingslib.udfps;
+package com.android.systemui.biometrics;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.Point;
import android.util.DisplayUtils;
import android.util.Log;
@@ -26,7 +27,8 @@ import android.view.DisplayInfo;
import android.view.MotionEvent;
import android.view.Surface;
-import com.android.settingslib.R;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
+import com.android.systemui.shared.biometrics.R;
/** Utility class for working with udfps. */
public class UdfpsUtils {
@@ -95,12 +97,13 @@ public class UdfpsUtils {
return null;
}
- String[] touchHints = context.getResources().getStringArray(
- R.array.udfps_accessibility_touch_hints);
- if (touchHints.length != 4) {
- Log.e(TAG, "expected exactly 4 touch hints, got " + touchHints.length + "?");
- return null;
- }
+ Resources resources = context.getResources();
+ String[] touchHints = new String[] {
+ resources.getString(R.string.udfps_accessibility_touch_hints_left),
+ resources.getString(R.string.udfps_accessibility_touch_hints_down),
+ resources.getString(R.string.udfps_accessibility_touch_hints_right),
+ resources.getString(R.string.udfps_accessibility_touch_hints_up),
+ };
// Scale the coordinates to native resolution.
float scale = udfpsOverlayParams.getScaleFactor();
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt
index 1ca57e77034c..422f02f0a7c9 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt
@@ -47,12 +47,12 @@ object Utils {
const val CREDENTIAL_PATTERN = 2
const val CREDENTIAL_PASSWORD = 3
- /** Base set of layout flags for fingerprint overlay widgets. */
+ /** Base set of layout flags for fingerprint overlay widgets. */
const val FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS =
- (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
- or WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
- or WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- or WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
+ (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN or
+ WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL or
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or
+ WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
@JvmStatic
fun dpToPixels(context: Context, dp: Float): Float {
@@ -61,9 +61,8 @@ object Utils {
}
/**
- * Note: Talkback 14.0 has new rate-limitation design to reduce frequency
- * of TYPE_WINDOW_CONTENT_CHANGED events to once every 30 seconds.
- * (context: b/281765653#comment18)
+ * Note: Talkback 14.0 has new rate-limitation design to reduce frequency of
+ * TYPE_WINDOW_CONTENT_CHANGED events to once every 30 seconds. (context: b/281765653#comment18)
* Using {@link View#announceForAccessibility} instead as workaround when sending events
* exceeding this frequency is required.
*/
@@ -74,8 +73,7 @@ object Utils {
}
val event = AccessibilityEvent.obtain()
event.eventType = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
- event.contentChangeTypes =
- AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE
+ event.contentChangeTypes = AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE
view.sendAccessibilityEventUnchecked(event)
view.notifySubtreeAccessibilityStateChanged(
view,
@@ -119,8 +117,8 @@ object Utils {
@JvmStatic
fun isSystem(context: Context, clientPackage: String?): Boolean {
val hasPermission =
- (context.checkCallingOrSelfPermission(Manifest.permission.USE_BIOMETRIC_INTERNAL)
- == PackageManager.PERMISSION_GRANTED)
+ (context.checkCallingOrSelfPermission(Manifest.permission.USE_BIOMETRIC_INTERNAL) ==
+ PackageManager.PERMISSION_GRANTED)
return hasPermission && "android" == clientPackage
}
@@ -134,5 +132,5 @@ object Utils {
@Retention(RetentionPolicy.SOURCE)
@IntDef(CREDENTIAL_PIN, CREDENTIAL_PATTERN, CREDENTIAL_PASSWORD)
- internal annotation class CredentialType
-} \ No newline at end of file
+ annotation class CredentialType
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt
index 274f58a5266b..db46ccf6a827 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.biometrics.domain.model
+package com.android.systemui.biometrics.shared.model
import android.hardware.biometrics.SensorProperties
import android.hardware.face.FaceSensorPropertiesInternal
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
index fb580ca54aff..fb580ca54aff 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
index 39689ec16189..39689ec16189 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
index c6fdcb318998..6082fb93aa26 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
@@ -25,7 +25,7 @@ enum class FingerprintSensorType {
UDFPS_ULTRASONIC,
UDFPS_OPTICAL,
POWER_BUTTON,
- HOME_BUTTON,
+ HOME_BUTTON
}
/** Convert [this] to corresponding [FingerprintSensorType] */
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
index 68bba32537b0..68bba32537b0 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
index 476daac5ff00..476daac5ff00 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
diff --git a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt
index b386e5e12504..a9b4fe87cc47 100644
--- a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt
@@ -1,4 +1,4 @@
-package com.android.settingslib.udfps
+package com.android.systemui.biometrics.shared.model
import android.graphics.Rect
import android.view.Surface
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
index 8200e5c84186..905923039f8b 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
@@ -17,6 +17,7 @@
package com.android.systemui.shared.rotation;
import static android.content.pm.PackageManager.FEATURE_PC;
+import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
import static android.view.Display.DEFAULT_DISPLAY;
import static com.android.internal.view.RotationPolicy.NATURAL_ROTATION;
@@ -37,6 +38,8 @@ import android.content.IntentFilter;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.os.HandlerExecutor;
+import android.os.HandlerThread;
import android.os.Looper;
import android.os.RemoteException;
import android.os.SystemProperties;
@@ -67,6 +70,7 @@ import com.android.systemui.shared.system.TaskStackChangeListeners;
import java.io.PrintWriter;
import java.util.Optional;
+import java.util.concurrent.Executor;
import java.util.function.Supplier;
/**
@@ -119,6 +123,8 @@ public class RotationButtonController {
private final int mIconCwStart0ResId;
@DrawableRes
private final int mIconCwStart90ResId;
+ /** Defaults to mainExecutor if not set via {@link #setBgExecutor(Executor)}. */
+ private Executor mBgExecutor;
@DrawableRes
private int mIconResId;
@@ -178,6 +184,8 @@ public class RotationButtonController {
mAccessibilityManager = AccessibilityManager.getInstance(context);
mTaskStackListener = new TaskStackListenerImpl();
mWindowRotationProvider = windowRotationProvider;
+
+ mBgExecutor = context.getMainExecutor();
}
public void setRotationButton(RotationButton rotationButton,
@@ -193,6 +201,10 @@ public class RotationButtonController {
return mContext;
}
+ public void setBgExecutor(Executor bgExecutor) {
+ mBgExecutor = bgExecutor;
+ }
+
/**
* Called during Taskbar initialization.
*/
@@ -219,8 +231,11 @@ public class RotationButtonController {
mListenersRegistered = true;
- updateDockedState(mContext.registerReceiver(mDockedReceiver,
- new IntentFilter(Intent.ACTION_DOCK_EVENT)));
+ mBgExecutor.execute(() -> {
+ final Intent intent = mContext.registerReceiver(mDockedReceiver,
+ new IntentFilter(Intent.ACTION_DOCK_EVENT));
+ mContext.getMainExecutor().execute(() -> updateDockedState(intent));
+ });
if (registerRotationWatcher) {
try {
@@ -246,11 +261,13 @@ public class RotationButtonController {
mListenersRegistered = false;
- try {
- mContext.unregisterReceiver(mDockedReceiver);
- } catch (IllegalArgumentException e) {
- Log.e(TAG, "Docked receiver already unregistered", e);
- }
+ mBgExecutor.execute(() -> {
+ try {
+ mContext.unregisterReceiver(mDockedReceiver);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Docked receiver already unregistered", e);
+ }
+ });
if (mRotationWatcherRegistered) {
try {
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
index 77f6d03a03fb..eb2066936088 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
@@ -61,8 +61,6 @@ public final class InteractionJankMonitorWrapper {
InteractionJankMonitor.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS;
public static final int CUJ_OPEN_SEARCH_RESULT =
InteractionJankMonitor.CUJ_LAUNCHER_OPEN_SEARCH_RESULT;
- public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR =
- InteractionJankMonitor.CUJ_SHADE_EXPAND_FROM_STATUS_BAR;
@IntDef({
CUJ_APP_LAUNCH_FROM_RECENTS,
@@ -79,7 +77,6 @@ public final class InteractionJankMonitorWrapper {
CUJ_CLOSE_ALL_APPS_SWIPE,
CUJ_CLOSE_ALL_APPS_TO_HOME,
CUJ_OPEN_SEARCH_RESULT,
- CUJ_SHADE_EXPAND_FROM_STATUS_BAR,
})
@Retention(RetentionPolicy.SOURCE)
public @interface CujType {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
index a72d8137663b..98f082f78a38 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
@@ -64,8 +64,10 @@ public abstract class KeyguardInputView extends LinearLayout {
return false;
}
- /** Change motion layout constraint set based on orientation */
- protected void updateConstraints(int orientation) {
+ /** Updates the keyguard view's constraints (single or split constraints).
+ * Split constraints are only used for small landscape screens.
+ * Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+ protected void updateConstraints(boolean useSplitBouncer) {
//Unless overridden, never update constrains (keeping default portrait constraints)
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
index 42dbc487d774..8738d3300e93 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
@@ -16,6 +16,8 @@
package com.android.keyguard;
+import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
+
import android.annotation.CallSuper;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -257,6 +259,8 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
mFalsingCollector, mKeyguardViewController,
mFeatureFlags);
} else if (keyguardInputView instanceof KeyguardPINView) {
+ ((KeyguardPINView) keyguardInputView).setIsLockScreenLandscapeEnabled(
+ mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE));
return new KeyguardPinViewController((KeyguardPINView) keyguardInputView,
mKeyguardUpdateMonitor, securityMode, mLockPatternUtils,
keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker,
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
index d9b7bde66c67..bb3e759dc157 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
@@ -16,12 +16,15 @@
package com.android.keyguard;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_APPEAR;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_DISAPPEAR;
+import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_HALF_OPENED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
import android.animation.ValueAnimator;
+import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
@@ -30,6 +33,7 @@ import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
+import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
@@ -46,12 +50,15 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
ValueAnimator mAppearAnimator = ValueAnimator.ofFloat(0f, 1f);
private final DisappearAnimationUtils mDisappearAnimationUtils;
private final DisappearAnimationUtils mDisappearAnimationUtilsLocked;
- private ConstraintLayout mContainer;
+ @Nullable private MotionLayout mContainerMotionLayout;
+ @Nullable private ConstraintLayout mContainerConstraintLayout;
private int mDisappearYTranslation;
private View[][] mViews;
private int mYTrans;
private int mYTransOffset;
private View mBouncerMessageArea;
+ private boolean mAlreadyUsingSplitBouncer = false;
+ private boolean mIsLockScreenLandscapeEnabled = false;
@DevicePostureInt private int mLastDevicePosture = DEVICE_POSTURE_UNKNOWN;
public static final long ANIMATION_DURATION = 650;
@@ -76,6 +83,22 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
mYTransOffset = getResources().getDimensionPixelSize(R.dimen.pin_view_trans_y_entry_offset);
}
+ /** Use motion layout (new bouncer implementation) if LOCKSCREEN_ENABLE_LANDSCAPE flag is
+ * enabled, instead of constraint layout (old bouncer implementation) */
+ public void setIsLockScreenLandscapeEnabled(boolean isLockScreenLandscapeEnabled) {
+ mIsLockScreenLandscapeEnabled = isLockScreenLandscapeEnabled;
+ findContainerLayout();
+ }
+
+ private void findContainerLayout() {
+ if (mIsLockScreenLandscapeEnabled) {
+ mContainerMotionLayout = findViewById(R.id.pin_container);
+ } else {
+ mContainerConstraintLayout = findViewById(R.id.pin_container);
+ }
+ }
+
+
@Override
protected void onConfigurationChanged(Configuration newConfig) {
updateMargins();
@@ -84,6 +107,17 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
void onDevicePostureChanged(@DevicePostureInt int posture) {
if (mLastDevicePosture != posture) {
mLastDevicePosture = posture;
+
+ if (mIsLockScreenLandscapeEnabled) {
+ boolean useSplitBouncerAfterFold =
+ mLastDevicePosture == DEVICE_POSTURE_CLOSED
+ && getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE;
+
+ if (mAlreadyUsingSplitBouncer != useSplitBouncerAfterFold) {
+ updateConstraints(useSplitBouncerAfterFold);
+ }
+ }
+
updateMargins();
}
}
@@ -135,18 +169,40 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
float halfOpenPercentage =
mContext.getResources().getFloat(R.dimen.half_opened_bouncer_height_ratio);
- ConstraintSet cs = new ConstraintSet();
- cs.clone(mContainer);
- cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
- mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
- cs.applyTo(mContainer);
+ if (mIsLockScreenLandscapeEnabled) {
+ ConstraintSet cs = mContainerMotionLayout.getConstraintSet(R.id.single_constraints);
+ cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
+ mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
+ cs.applyTo(mContainerMotionLayout);
+ } else {
+ ConstraintSet cs = new ConstraintSet();
+ cs.clone(mContainerConstraintLayout);
+ cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
+ mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
+ cs.applyTo(mContainerConstraintLayout);
+ }
+ }
+
+ /** Updates the keyguard view's constraints (single or split constraints).
+ * Split constraints are only used for small landscape screens.
+ * Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+ @Override
+ protected void updateConstraints(boolean useSplitBouncer) {
+ mAlreadyUsingSplitBouncer = useSplitBouncer;
+ if (useSplitBouncer) {
+ mContainerMotionLayout.jumpToState(R.id.split_constraints);
+ mContainerMotionLayout.setMaxWidth(Integer.MAX_VALUE);
+ } else {
+ mContainerMotionLayout.jumpToState(R.id.single_constraints);
+ mContainerMotionLayout.setMaxWidth(getResources()
+ .getDimensionPixelSize(R.dimen.keyguard_security_width));
+ }
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- mContainer = findViewById(R.id.pin_container);
mBouncerMessageArea = findViewById(R.id.bouncer_message_area);
mViews = new View[][]{
new View[]{
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
index a2d8c50fdca7..e9dd08c67b99 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
@@ -17,7 +17,7 @@
package com.android.keyguard;
import static android.app.StatusBarManager.SESSION_KEYGUARD;
-
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_BIOMETRIC;
import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_EXTENDED_ACCESS;
import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_NONE_SECURITY;
@@ -74,6 +74,7 @@ import com.android.systemui.biometrics.FaceAuthAccessibilityDelegate;
import com.android.systemui.biometrics.SideFpsController;
import com.android.systemui.biometrics.SideFpsUiRequestSource;
import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor;
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.classifier.FalsingA11yDelegate;
import com.android.systemui.classifier.FalsingCollector;
import com.android.systemui.flags.FeatureFlags;
@@ -94,6 +95,8 @@ import com.android.systemui.util.ViewController;
import com.android.systemui.util.kotlin.JavaAdapter;
import com.android.systemui.util.settings.GlobalSettings;
+import dagger.Lazy;
+
import java.io.File;
import java.util.Optional;
@@ -201,7 +204,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
};
private KeyguardSecurityCallback mKeyguardSecurityCallback = new KeyguardSecurityCallback() {
-
@Override
public void onUserInput() {
mBouncerMessageInteractor.onPrimaryBouncerUserInput();
@@ -297,21 +299,23 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
*/
@Override
public void finish(int targetUserId) {
- // If there's a pending runnable because the user interacted with a widget
- // and we're leaving keyguard, then run it.
- boolean deferKeyguardDone = false;
- mWillRunDismissFromKeyguard = false;
- if (mDismissAction != null) {
- deferKeyguardDone = mDismissAction.onDismiss();
- mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard();
- mDismissAction = null;
- mCancelAction = null;
- }
- if (mViewMediatorCallback != null) {
- if (deferKeyguardDone) {
- mViewMediatorCallback.keyguardDonePending(targetUserId);
- } else {
- mViewMediatorCallback.keyguardDone(targetUserId);
+ if (!mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ // If there's a pending runnable because the user interacted with a widget
+ // and we're leaving keyguard, then run it.
+ boolean deferKeyguardDone = false;
+ mWillRunDismissFromKeyguard = false;
+ if (mDismissAction != null) {
+ deferKeyguardDone = mDismissAction.onDismiss();
+ mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard();
+ mDismissAction = null;
+ mCancelAction = null;
+ }
+ if (mViewMediatorCallback != null) {
+ if (deferKeyguardDone) {
+ mViewMediatorCallback.keyguardDonePending(targetUserId);
+ } else {
+ mViewMediatorCallback.keyguardDone(targetUserId);
+ }
}
}
@@ -326,7 +330,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
}
};
-
private final SwipeListener mSwipeListener = new SwipeListener() {
@Override
public void onSwipeUp() {
@@ -373,7 +376,8 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
public void onOrientationChanged(int orientation) {
if (mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE)
&& getResources().getBoolean(R.bool.update_bouncer_constraints)) {
- mSecurityViewFlipperController.updateConstraints(orientation);
+ boolean useSplitBouncer = orientation == ORIENTATION_LANDSCAPE;
+ mSecurityViewFlipperController.updateConstraints(useSplitBouncer);
}
}
};
@@ -416,6 +420,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
private final Provider<AuthenticationInteractor> mAuthenticationInteractor;
private final Provider<JavaAdapter> mJavaAdapter;
private final DeviceProvisionedController mDeviceProvisionedController;
+ private final Lazy<PrimaryBouncerInteractor> mPrimaryBouncerInteractor;
@Nullable private Job mSceneTransitionCollectionJob;
@Inject
@@ -448,6 +453,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
DeviceProvisionedController deviceProvisionedController,
FaceAuthAccessibilityDelegate faceAuthAccessibilityDelegate,
KeyguardTransitionInteractor keyguardTransitionInteractor,
+ Lazy<PrimaryBouncerInteractor> primaryBouncerInteractor,
Provider<AuthenticationInteractor> authenticationInteractor
) {
super(view);
@@ -482,6 +488,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
mJavaAdapter = javaAdapter;
mKeyguardTransitionInteractor = keyguardTransitionInteractor;
mDeviceProvisionedController = deviceProvisionedController;
+ mPrimaryBouncerInteractor = primaryBouncerInteractor;
}
@Override
@@ -618,6 +625,9 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
* @param action callback to be invoked when keyguard disappear animation completes.
*/
public void setOnDismissAction(ActivityStarter.OnDismissAction action, Runnable cancelAction) {
+ if (mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ return;
+ }
if (mCancelAction != null) {
mCancelAction.run();
}
@@ -820,7 +830,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
*/
public boolean showNextSecurityScreenOrFinish(boolean authenticated, int targetUserId,
boolean bypassSecondaryLockScreen, SecurityMode expectedSecurityMode) {
-
if (DEBUG) Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
if (expectedSecurityMode != SecurityMode.Invalid
&& expectedSecurityMode != getCurrentSecurityMode()) {
@@ -829,8 +838,8 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
return false;
}
+ boolean authenticatedWithPrimaryAuth = false;
boolean finish = false;
- boolean primaryAuth = false;
int eventSubtype = -1;
BouncerUiEvent uiEvent = BouncerUiEvent.UNKNOWN;
if (mUpdateMonitor.getUserHasTrust(targetUserId)) {
@@ -855,7 +864,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
case Pattern:
case Password:
case PIN:
- primaryAuth = true;
+ authenticatedWithPrimaryAuth = true;
finish = true;
eventSubtype = BOUNCER_DISMISS_PASSWORD;
uiEvent = BouncerUiEvent.BOUNCER_DISMISS_PASSWORD;
@@ -901,6 +910,17 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
if (uiEvent != BouncerUiEvent.UNKNOWN) {
mUiEventLogger.log(uiEvent, getSessionId());
}
+
+ if (mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ if (authenticatedWithPrimaryAuth) {
+ mPrimaryBouncerInteractor.get()
+ .notifyKeyguardAuthenticatedPrimaryAuth(targetUserId);
+ } else if (finish) {
+ mPrimaryBouncerInteractor.get().notifyUserRequestedBouncerWhenAlreadyAuthenticated(
+ targetUserId);
+ }
+ }
+
if (finish) {
mKeyguardSecurityCallback.finish(targetUserId);
}
@@ -1058,12 +1078,15 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
* one side).
*/
private boolean canUseOneHandedBouncer() {
- if (!(mCurrentSecurityMode == SecurityMode.Pattern
- || mCurrentSecurityMode == SecurityMode.PIN)) {
- return false;
+ switch(mCurrentSecurityMode) {
+ case PIN:
+ case Pattern:
+ case SimPin:
+ case SimPuk:
+ return getResources().getBoolean(R.bool.can_use_one_handed_bouncer);
+ default:
+ return false;
}
-
- return getResources().getBoolean(R.bool.can_use_one_handed_bouncer);
}
private boolean canDisplayUserSwitcher() {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
index 891eb149427b..74f90063096e 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
@@ -83,11 +83,13 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper {
return "";
}
- /** Updates the keyguard view's constraints based on orientation */
- public void updateConstraints(int orientation) {
+ /** Updates the keyguard view's constraints (single or split constraints).
+ * Split constraints are only used for small landscape screens.
+ * Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+ public void updateConstraints(boolean useSplitBouncer) {
KeyguardInputView securityView = getSecurityView();
if (securityView != null) {
- securityView.updateConstraints(orientation);
+ securityView.updateConstraints(useSplitBouncer);
}
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
index 74f0beb71eb2..4cc90c244cf2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
@@ -16,6 +16,7 @@
package com.android.keyguard;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
import android.util.Log;
@@ -136,12 +137,14 @@ public class KeyguardSecurityViewFlipperController
if (onViewInflatedListener != null) {
onViewInflatedListener.onViewInflated(childController);
- // Portrait constrains are default
+ // Single bouncer constrains are default
if (mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE)
&&
getResources().getBoolean(R.bool.update_bouncer_constraints)) {
- // updateConstraints based on orientation (only on small screens)
- updateConstraints(getResources().getConfiguration().orientation);
+ boolean useSplitBouncer =
+ getResources().getConfiguration().orientation
+ == ORIENTATION_LANDSCAPE;
+ updateConstraints(useSplitBouncer);
}
}
});
@@ -152,7 +155,7 @@ public class KeyguardSecurityViewFlipperController
// TODO (b/297863911, b/297864907) - implement motion layout for other bouncers
switch (securityMode) {
case Pattern: return R.layout.keyguard_pattern_view;
- case PIN: return R.layout.keyguard_pin_view;
+ case PIN: return R.layout.keyguard_pin_motion_layout;
case Password: return R.layout.keyguard_password_view;
case SimPin: return R.layout.keyguard_sim_pin_view;
case SimPuk: return R.layout.keyguard_sim_puk_view;
@@ -173,9 +176,11 @@ public class KeyguardSecurityViewFlipperController
}
}
- /** Updates the keyguard view's constraints based on orientation */
- public void updateConstraints(int orientation) {
- mView.updateConstraints(orientation);
+ /** Updates the keyguard view's constraints (single or split constraints).
+ * Split constraints are only used for small landscape screens.
+ * Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+ public void updateConstraints(boolean useSplitBouncer) {
+ mView.updateConstraints(useSplitBouncer);
}
/** Makes the supplied child visible if it is contained win this view, */
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
index 886a1b5f84cb..1fc88ab16e83 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
@@ -141,10 +141,10 @@ public class KeyguardSimPinViewController
// GSM 02.17 version 5.0.1, Section 5.6 PIN Management
if ((entry.length() < 4) || (entry.length() > 8)) {
// otherwise, display a message to the user, and don't submit.
- mMessageAreaController.setMessage(
- com.android.systemui.R.string.kg_invalid_sim_pin_hint);
mView.resetPasswordText(true /* animate */, true /* announce */);
getKeyguardSecurityCallback().userActivity();
+ mMessageAreaController.setMessage(
+ com.android.systemui.R.string.kg_invalid_sim_pin_hint);
return;
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 0ba6c0576663..e4bbd3a0b217 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -35,7 +35,6 @@ import static android.hardware.biometrics.BiometricSourceType.FINGERPRINT;
import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
import static android.os.BatteryManager.CHARGING_POLICY_DEFAULT;
import static android.os.PowerManager.WAKE_REASON_UNKNOWN;
-
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
@@ -161,8 +160,6 @@ import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.dump.DumpsysTableLogger;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.domain.interactor.FaceAuthenticationListener;
import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor;
import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent;
@@ -417,7 +414,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
private final ActiveUnlockConfig mActiveUnlockConfig;
private final IDreamManager mDreamManager;
private final TelephonyManager mTelephonyManager;
- private final FeatureFlags mFeatureFlags;
@Nullable
private final FingerprintManager mFpm;
@Nullable
@@ -2365,7 +2361,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
FaceWakeUpTriggersConfig faceWakeUpTriggersConfig,
DevicePostureController devicePostureController,
Optional<FingerprintInteractiveToAuthProvider> interactiveToAuthProvider,
- FeatureFlags featureFlags,
TaskStackChangeListeners taskStackChangeListeners,
IActivityTaskManager activityTaskManagerService,
DisplayTracker displayTracker) {
@@ -2400,7 +2395,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
mPackageManager = packageManager;
mFpm = fingerprintManager;
mFaceManager = faceManager;
- mFeatureFlags = featureFlags;
mActiveUnlockConfig.setKeyguardUpdateMonitor(this);
mFaceAcquiredInfoIgnoreList = Arrays.stream(
mContext.getResources().getIntArray(
@@ -2417,9 +2411,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
mTaskStackChangeListeners = taskStackChangeListeners;
mActivityTaskManager = activityTaskManagerService;
mDisplayTracker = displayTracker;
- if (mFeatureFlags.isEnabled(Flags.STOP_FACE_AUTH_ON_DISPLAY_OFF)) {
- mDisplayTracker.addDisplayChangeCallback(mDisplayCallback, mainExecutor);
- }
+ mDisplayTracker.addDisplayChangeCallback(mDisplayCallback, mainExecutor);
mHandler = new Handler(mainLooper) {
@Override
@@ -4205,21 +4197,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
@Override
public void onTaskStackChangedBackground() {
try {
- if (mFeatureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
- RootTaskInfo standardTask = mActivityTaskManager.getRootTaskInfo(
- WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
- final boolean previousState = mAllowFingerprintOnCurrentOccludingActivity;
- mAllowFingerprintOnCurrentOccludingActivity =
- standardTask.topActivity != null
- && !TextUtils.isEmpty(standardTask.topActivity.getPackageName())
- && mAllowFingerprintOnOccludingActivitiesFromPackage.contains(
- standardTask.topActivity.getPackageName())
- && standardTask.visible;
- if (mAllowFingerprintOnCurrentOccludingActivity != previousState) {
- mLogger.allowFingerprintOnCurrentOccludingActivityChanged(
- mAllowFingerprintOnCurrentOccludingActivity);
- updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE);
- }
+ RootTaskInfo standardTask = mActivityTaskManager.getRootTaskInfo(
+ WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
+ final boolean previousState = mAllowFingerprintOnCurrentOccludingActivity;
+ mAllowFingerprintOnCurrentOccludingActivity =
+ standardTask.topActivity != null
+ && !TextUtils.isEmpty(standardTask.topActivity.getPackageName())
+ && mAllowFingerprintOnOccludingActivitiesFromPackage.contains(
+ standardTask.topActivity.getPackageName())
+ && standardTask.visible;
+ if (mAllowFingerprintOnCurrentOccludingActivity != previousState) {
+ mLogger.allowFingerprintOnCurrentOccludingActivityChanged(
+ mAllowFingerprintOnCurrentOccludingActivity);
+ updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE);
}
RootTaskInfo assistantTask = mActivityTaskManager.getRootTaskInfo(
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
index 3990b10267e1..c64ae0106b4a 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
@@ -17,6 +17,7 @@
package com.android.keyguard;
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
+import static com.android.systemui.statusbar.StatusBarState.SHADE;
import android.util.Property;
import android.view.View;
@@ -124,7 +125,16 @@ public class KeyguardVisibilityHelper {
true /* animate */);
log("keyguardFadingAway transition w/ Y Aniamtion");
} else if (statusBarState == KEYGUARD) {
- if (keyguardFadingAway) {
+ // Sometimes, device will be unlocked and then locked very quickly.
+ // keyguardFadingAway hasn't been set to false cause unlock animation hasn't finished
+ // So we should not animate keyguard fading away in this case (when oldState is SHADE)
+ if (oldStatusBarState != SHADE) {
+ log("statusBarState == KEYGUARD && oldStatusBarState != SHADE");
+ } else {
+ log("statusBarState == KEYGUARD && oldStatusBarState == SHADE");
+ }
+
+ if (keyguardFadingAway && oldStatusBarState != SHADE) {
mKeyguardViewVisibilityAnimating = true;
AnimationProperties animProps = new AnimationProperties()
.setDelay(0)
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconView.java b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
index 1d37809a382e..c52288190a7c 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconView.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
@@ -134,8 +134,6 @@ public class LockIconView extends FrameLayout implements Dumpable {
mLockIcon.setPadding(mLockIconPadding, mLockIconPadding, mLockIconPadding,
mLockIconPadding);
- // mSensorProps coordinates assume portrait mode which is OK b/c the keyguard is always in
- // portrait.
mSensorRect.set(mLockIconCenter.x - mRadius,
mLockIconCenter.y - mRadius,
mLockIconCenter.x + mRadius,
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index ab9b647f5c2c..214b1228b87a 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -45,6 +45,7 @@ import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
+import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -54,12 +55,12 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.biometrics.AuthRippleController;
import com.android.systemui.biometrics.UdfpsController;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
@@ -423,7 +424,13 @@ public class LockIconViewController implements Dumpable {
private void updateConfiguration() {
WindowManager windowManager = mContext.getSystemService(WindowManager.class);
Rect bounds = windowManager.getCurrentWindowMetrics().getBounds();
+ WindowInsets insets = windowManager.getCurrentWindowMetrics().getWindowInsets();
mWidthPixels = bounds.right;
+ if (mFeatureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)) {
+ // Assumed to be initially neglected as there are no left or right insets in portrait
+ // However, on landscape, these insets need to included when calculating the midpoint
+ mWidthPixels -= insets.getSystemWindowInsetLeft() + insets.getSystemWindowInsetRight();
+ }
mHeightPixels = bounds.bottom;
mBottomPaddingPx = mResources.getDimensionPixelSize(R.dimen.lock_icon_margin_bottom);
mDefaultPaddingPx = mResources.getDimensionPixelSize(R.dimen.lock_icon_padding);
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
index 03ad132c452c..7a8161eb6c3d 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
@@ -17,7 +17,6 @@
package com.android.systemui.accessibility;
import static android.view.WindowManager.ScreenshotSource.SCREENSHOT_ACCESSIBILITY_ACTIONS;
-
import static com.android.internal.accessibility.common.ShortcutConstants.CHOOSER_PACKAGE_NAME;
import android.accessibilityservice.AccessibilityService;
@@ -57,8 +56,8 @@ import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.StatusBarWindowCallback;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.Assert;
import dagger.Lazy;
@@ -186,8 +185,8 @@ public class SystemActions implements CoreStartable {
private final DisplayTracker mDisplayTracker;
private Locale mLocale;
private final AccessibilityManager mA11yManager;
- private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
private final NotificationShadeWindowController mNotificationShadeController;
+ private final KeyguardStateController mKeyguardStateController;
private final ShadeController mShadeController;
private final Lazy<ShadeViewController> mShadeViewController;
private final StatusBarWindowCallback mNotificationShadeCallback;
@@ -197,13 +196,14 @@ public class SystemActions implements CoreStartable {
public SystemActions(Context context,
UserTracker userTracker,
NotificationShadeWindowController notificationShadeController,
+ KeyguardStateController keyguardStateController,
ShadeController shadeController,
Lazy<ShadeViewController> shadeViewController,
- Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
Optional<Recents> recentsOptional,
DisplayTracker displayTracker) {
mContext = context;
mUserTracker = userTracker;
+ mKeyguardStateController = keyguardStateController;
mShadeController = shadeController;
mShadeViewController = shadeViewController;
mRecentsOptional = recentsOptional;
@@ -219,7 +219,6 @@ public class SystemActions implements CoreStartable {
(keyguardShowing, keyguardOccluded, keyguardGoingAway, bouncerShowing, mDozing,
panelExpanded, isDreaming) ->
registerOrUnregisterDismissNotificationShadeAction();
- mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
}
@Override
@@ -307,8 +306,8 @@ public class SystemActions implements CoreStartable {
mA11yManager.registerSystemAction(actionBack, SYSTEM_ACTION_ID_BACK);
mA11yManager.registerSystemAction(actionHome, SYSTEM_ACTION_ID_HOME);
mA11yManager.registerSystemAction(actionRecents, SYSTEM_ACTION_ID_RECENTS);
- if (mCentralSurfacesOptionalLazy.get().isPresent()) {
- // These two actions require the CentralSurfaces instance.
+ if (mShadeController.isShadeEnabled()) {
+ // These two actions require the shade to be enabled.
mA11yManager.registerSystemAction(actionNotifications, SYSTEM_ACTION_ID_NOTIFICATIONS);
mA11yManager.registerSystemAction(actionQuickSettings, SYSTEM_ACTION_ID_QUICK_SETTINGS);
}
@@ -329,13 +328,8 @@ public class SystemActions implements CoreStartable {
private void registerOrUnregisterDismissNotificationShadeAction() {
Assert.isMainThread();
- // Saving state in instance variable since this callback is called quite often to avoid
- // binder calls
- final Optional<CentralSurfaces> centralSurfacesOptional =
- mCentralSurfacesOptionalLazy.get();
- if (centralSurfacesOptional.isPresent()
- && mShadeViewController.get().isPanelExpanded()
- && !centralSurfacesOptional.get().isKeyguardShowing()) {
+ if (mShadeViewController.get().isPanelExpanded()
+ && !mKeyguardStateController.isShowing()) {
if (!mDismissNotificationShadeActionRegistered) {
mA11yManager.registerSystemAction(
createRemoteAction(
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 8d1fc5d9d558..b2433d4832f4 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
@@ -109,6 +109,9 @@ interface AuthenticationRepository {
*/
val authenticationMethod: Flow<AuthenticationMethodModel>
+ /** The minimal length of a pattern. */
+ val minPatternLength: Int
+
/**
* Returns the currently-configured authentication method. This determines how the
* authentication challenge needs to be completed in order to unlock an otherwise locked device.
@@ -227,6 +230,8 @@ constructor(
}
}
+ override val minPatternLength: Int = LockPatternUtils.MIN_LOCK_PATTERN_SIZE
+
override suspend fun getAuthenticationMethod(): AuthenticationMethodModel {
return withContext(backgroundDispatcher) {
blockingAuthenticationMethodInternal(userRepository.selectedUserId)
diff --git a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
index ecd7baea7779..57a42247af76 100644
--- a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
@@ -185,6 +185,9 @@ constructor(
/** Whether the pattern should be visible for the currently-selected user. */
val isPatternVisible: StateFlow<Boolean> = repository.isPatternVisible
+ /** The minimal length of a pattern. */
+ val minPatternLength: Int = repository.minPatternLength
+
private var throttlingCountdownJob: Job? = null
init {
diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
index 87ea4111d8c8..6ca1c3de0b63 100644
--- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
@@ -356,11 +356,13 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
if (mPercentageStyleId != 0) { // Only set if specified as attribute
mBatteryPercentView.setTextAppearance(mPercentageStyleId);
}
+ float fontHeight = mBatteryPercentView.getPaint().getFontMetricsInt(null);
+ mBatteryPercentView.setLineHeight(TypedValue.COMPLEX_UNIT_PX, fontHeight);
if (mTextColor != 0) mBatteryPercentView.setTextColor(mTextColor);
updatePercentText();
addView(mBatteryPercentView, new LayoutParams(
LayoutParams.WRAP_CONTENT,
- LayoutParams.WRAP_CONTENT));
+ (int) Math.ceil(fontHeight)));
}
} else {
if (showing) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
index 0c7d56f46530..ea8f5d376ba7 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
@@ -20,14 +20,7 @@ import android.graphics.drawable.Drawable
import android.util.Log
import com.airbnb.lottie.LottieAnimationView
import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING_ANIMATING_IN
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_IDLE
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
private const val TAG = "AuthBiometricFaceIconController"
@@ -40,8 +33,7 @@ class AuthBiometricFaceIconController(
// false = dark to light, true = light to dark
private var lastPulseLightToDark = false
- @BiometricState
- private var state = 0
+ private var state: BiometricState = BiometricState.STATE_IDLE
init {
val size = context.resources.getDimensionPixelSize(R.dimen.biometric_dialog_face_icon_size)
@@ -66,54 +58,54 @@ class AuthBiometricFaceIconController(
}
override fun handleAnimationEnd(drawable: Drawable) {
- if (state == STATE_AUTHENTICATING || state == STATE_HELP) {
+ if (state == BiometricState.STATE_AUTHENTICATING || state == BiometricState.STATE_HELP) {
pulseInNextDirection()
}
}
- override fun updateIcon(@BiometricState oldState: Int, @BiometricState newState: Int) {
- val lastStateIsErrorIcon = (oldState == STATE_ERROR || oldState == STATE_HELP)
- if (newState == STATE_AUTHENTICATING_ANIMATING_IN) {
+ override fun updateIcon(oldState: BiometricState, newState: BiometricState) {
+ val lastStateIsErrorIcon = (oldState == BiometricState.STATE_ERROR || oldState == BiometricState.STATE_HELP)
+ if (newState == BiometricState.STATE_AUTHENTICATING_ANIMATING_IN) {
showStaticDrawable(R.drawable.face_dialog_pulse_dark_to_light)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_authenticating
)
- } else if (newState == STATE_AUTHENTICATING) {
+ } else if (newState == BiometricState.STATE_AUTHENTICATING) {
startPulsing()
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_authenticating
)
- } else if (oldState == STATE_PENDING_CONFIRMATION && newState == STATE_AUTHENTICATED) {
+ } else if (oldState == BiometricState.STATE_PENDING_CONFIRMATION && newState == BiometricState.STATE_AUTHENTICATED) {
animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_confirmed
)
- } else if (lastStateIsErrorIcon && newState == STATE_IDLE) {
+ } else if (lastStateIsErrorIcon && newState == BiometricState.STATE_IDLE) {
animateIconOnce(R.drawable.face_dialog_error_to_idle)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_idle
)
- } else if (lastStateIsErrorIcon && newState == STATE_AUTHENTICATED) {
+ } else if (lastStateIsErrorIcon && newState == BiometricState.STATE_AUTHENTICATED) {
animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_authenticated
)
- } else if (newState == STATE_ERROR && oldState != STATE_ERROR) {
+ } else if (newState == BiometricState.STATE_ERROR && oldState != BiometricState.STATE_ERROR) {
animateIconOnce(R.drawable.face_dialog_dark_to_error)
iconView.contentDescription = context.getString(
R.string.keyguard_face_failed
)
- } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
+ } else if (oldState == BiometricState.STATE_AUTHENTICATING && newState == BiometricState.STATE_AUTHENTICATED) {
animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_authenticated
)
- } else if (newState == STATE_PENDING_CONFIRMATION) {
+ } else if (newState == BiometricState.STATE_PENDING_CONFIRMATION) {
animateIconOnce(R.drawable.face_dialog_wink_from_dark)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_authenticated
)
- } else if (newState == STATE_IDLE) {
+ } else if (newState == BiometricState.STATE_IDLE) {
showStaticDrawable(R.drawable.face_dialog_idle_static)
iconView.contentDescription = context.getString(
R.string.biometric_dialog_face_icon_description_idle
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt
deleted file mode 100644
index be89d10393dd..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.biometrics
-
-import android.content.Context
-import android.hardware.biometrics.BiometricAuthenticator.Modality
-import android.util.AttributeSet
-
-/** Face only view for BiometricPrompt. */
-class AuthBiometricFaceView(
- context: Context,
- attrs: AttributeSet? = null
-) : AuthBiometricView(context, attrs) {
-
- override fun getDelayAfterAuthenticatedDurationMs() = HIDE_DELAY_MS
-
- override fun getStateForAfterError() = STATE_IDLE
-
- override fun handleResetAfterError() = resetErrorView()
-
- override fun handleResetAfterHelp() = resetErrorView()
-
- override fun supportsSmallDialog() = true
-
- override fun supportsManualRetry() = true
-
- override fun supportsRequireConfirmation() = true
-
- override fun createIconController(): AuthIconController =
- AuthBiometricFaceIconController(mContext, mIconView)
-
- override fun updateState(@BiometricState newState: Int) {
- if (newState == STATE_AUTHENTICATING_ANIMATING_IN ||
- newState == STATE_AUTHENTICATING && size == AuthDialog.SIZE_MEDIUM) {
- resetErrorView()
- }
-
- // Do this last since the state variable gets updated.
- super.updateState(newState)
- }
-
- override fun onAuthenticationFailed(
- @Modality modality: Int,
- failureReason: String?
- ) {
- if (size == AuthDialog.SIZE_MEDIUM) {
- if (supportsManualRetry()) {
- mTryAgainButton.visibility = VISIBLE
- mConfirmButton.visibility = GONE
- }
- }
-
- // Do this last since we want to know if the button is being animated (in the case of
- // small -> medium dialog)
- super.onAuthenticationFailed(modality, failureReason)
- }
-
- private fun resetErrorView() {
- mIndicatorView.setTextColor(mTextColorHint)
- mIndicatorView.visibility = INVISIBLE
- }
-
- companion object {
- /** Delay before dismissing after being authenticated/confirmed. */
- const val HIDE_DELAY_MS = 500
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
index 95610aec3562..fb22c6b07db4 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
@@ -20,11 +20,11 @@ import android.annotation.RawRes
import android.content.Context
import com.airbnb.lottie.LottieAnimationView
import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATED
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_ERROR
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_HELP
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
/** Face/Fingerprint combined icon animator for BiometricPrompt. */
open class AuthBiometricFingerprintAndFaceIconController(
@@ -36,8 +36,8 @@ open class AuthBiometricFingerprintAndFaceIconController(
override val actsAsConfirmButton: Boolean = true
override fun shouldAnimateIconViewForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
): Boolean = when (newState) {
STATE_PENDING_CONFIRMATION -> true
else -> super.shouldAnimateIconViewForTransition(oldState, newState)
@@ -45,8 +45,8 @@ open class AuthBiometricFingerprintAndFaceIconController(
@RawRes
override fun getAnimationForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
): Int? = when (newState) {
STATE_AUTHENTICATED -> {
if (oldState == STATE_PENDING_CONFIRMATION) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt
deleted file mode 100644
index 7ce74dbe91b4..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.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.systemui.biometrics
-
-import android.content.Context
-import android.hardware.biometrics.BiometricAuthenticator.Modality
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE
-import android.hardware.biometrics.BiometricConstants
-import android.hardware.face.FaceManager
-import android.util.AttributeSet
-import com.android.systemui.R
-
-/** Face/Fingerprint combined view for BiometricPrompt. */
-class AuthBiometricFingerprintAndFaceView(
- context: Context,
- attrs: AttributeSet?
-) : AuthBiometricFingerprintView(context, attrs) {
- var isFaceClass3 = false
-
- constructor (context: Context) : this(context, null)
-
- override fun getConfirmationPrompt() = R.string.biometric_dialog_tap_confirm_with_face
-
- override fun forceRequireConfirmation(@Modality modality: Int) = modality == TYPE_FACE
-
- override fun ignoreUnsuccessfulEventsFrom(@Modality modality: Int, unsuccessfulReason: String) =
- modality == TYPE_FACE && !(isFaceClass3 && isLockoutErrorString(unsuccessfulReason))
-
- override fun createIconController(): AuthIconController =
- AuthBiometricFingerprintAndFaceIconController(mContext, mIconView, mIconViewOverlay)
-
- override fun isCoex() = true
-
- private fun isLockoutErrorString(unsuccessfulReason: String) =
- unsuccessfulReason == FaceManager.getErrorString(
- mContext,
- BiometricConstants.BIOMETRIC_ERROR_LOCKOUT,
- 0 /*vendorCode */
- ) || unsuccessfulReason == FaceManager.getErrorString(
- mContext,
- BiometricConstants.BIOMETRIC_ERROR_LOCKOUT_PERMANENT,
- 0 /*vendorCode */
- )
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
index d82f458cbde2..683541bd1b5b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
@@ -27,14 +27,15 @@ import androidx.annotation.VisibleForTesting
import com.airbnb.lottie.LottieAnimationView
import com.android.settingslib.widget.LottieColorUtils
import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING_ANIMATING_IN
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_IDLE
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATED
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATING
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATING_ANIMATING_IN
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_ERROR
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_HELP
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_IDLE
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
+
/** Fingerprint only icon animator for BiometricPrompt. */
open class AuthBiometricFingerprintIconController(
@@ -76,7 +77,7 @@ open class AuthBiometricFingerprintIconController(
}
}
- private fun updateIconSideFps(@BiometricState lastState: Int, @BiometricState newState: Int) {
+ private fun updateIconSideFps(lastState: BiometricState, newState: BiometricState) {
val displayInfo = DisplayInfo()
context.display?.getDisplayInfo(displayInfo)
val rotation = getRotationFromDefault(displayInfo.rotation)
@@ -106,7 +107,7 @@ open class AuthBiometricFingerprintIconController(
LottieColorUtils.applyDynamicColors(context, iconViewOverlay)
}
- private fun updateIconNormal(@BiometricState lastState: Int, @BiometricState newState: Int) {
+ private fun updateIconNormal(lastState: BiometricState, newState: BiometricState) {
val icon = getAnimationForTransition(lastState, newState) ?: return
if (!(lastState == STATE_AUTHENTICATING_ANIMATING_IN && newState == STATE_AUTHENTICATING)) {
@@ -125,7 +126,7 @@ open class AuthBiometricFingerprintIconController(
LottieColorUtils.applyDynamicColors(context, iconView)
}
- override fun updateIcon(@BiometricState lastState: Int, @BiometricState newState: Int) {
+ override fun updateIcon(lastState: BiometricState, newState: BiometricState) {
if (isSideFps) {
updateIconSideFps(lastState, newState)
} else {
@@ -135,7 +136,7 @@ open class AuthBiometricFingerprintIconController(
}
@VisibleForTesting
- fun getIconContentDescription(@BiometricState newState: Int): CharSequence? {
+ fun getIconContentDescription(newState: BiometricState): CharSequence? {
val id = when (newState) {
STATE_IDLE,
STATE_AUTHENTICATING_ANIMATING_IN,
@@ -160,8 +161,8 @@ open class AuthBiometricFingerprintIconController(
}
protected open fun shouldAnimateIconViewForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
) = when (newState) {
STATE_HELP,
STATE_ERROR -> true
@@ -172,8 +173,8 @@ open class AuthBiometricFingerprintIconController(
}
private fun shouldAnimateSfpsIconViewForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
) = when (newState) {
STATE_HELP,
STATE_ERROR -> true
@@ -185,8 +186,8 @@ open class AuthBiometricFingerprintIconController(
}
protected open fun shouldAnimateIconViewOverlayForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
) = when (newState) {
STATE_HELP,
STATE_ERROR -> true
@@ -198,8 +199,8 @@ open class AuthBiometricFingerprintIconController(
@RawRes
protected open fun getAnimationForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int
+ oldState: BiometricState,
+ newState: BiometricState
): Int? {
val id = when (newState) {
STATE_HELP,
@@ -231,8 +232,8 @@ open class AuthBiometricFingerprintIconController(
@RawRes
private fun getSideFpsOverlayAnimationForTransition(
- @BiometricState oldState: Int,
- @BiometricState newState: Int,
+ oldState: BiometricState,
+ newState: BiometricState,
rotation: Int
): Int? = when (newState) {
STATE_HELP,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt
deleted file mode 100644
index f2e47018bf4e..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.biometrics
-
-import android.content.Context
-import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
-import android.util.AttributeSet
-import android.util.Log
-import android.widget.FrameLayout
-import android.widget.TextView
-import com.android.systemui.R
-import com.android.systemui.biometrics.AuthController.ScaleFactorProvider
-
-private const val TAG = "AuthBiometricFingerprintView"
-
-/** Fingerprint only view for BiometricPrompt. */
-open class AuthBiometricFingerprintView(
- context: Context,
- attrs: AttributeSet? = null
-) : AuthBiometricView(context, attrs) {
- /** If this view is for a SFPS sensor. */
- var isSfps = false
- private set
-
- /** If this view is for a UDFPS sensor. */
- var isUdfps = false
- private set
-
- private var udfpsAdapter: UdfpsDialogMeasureAdapter? = null
- private var scaleFactorProvider: ScaleFactorProvider? = null
-
- /** Set the [sensorProps] of this sensor so the view can be customized prior to layout. */
- fun setSensorProperties(sensorProps: FingerprintSensorPropertiesInternal) {
- isSfps = sensorProps.isAnySidefpsType
- isUdfps = sensorProps.isAnyUdfpsType
- udfpsAdapter = if (isUdfps) UdfpsDialogMeasureAdapter(this, sensorProps) else null
- }
-
- fun setScaleFactorProvider(scaleProvider: ScaleFactorProvider?) {
- scaleFactorProvider = scaleProvider
- }
-
- override fun onMeasureInternal(width: Int, height: Int): AuthDialog.LayoutParams {
- val layoutParams = super.onMeasureInternal(width, height)
- val scale = scaleFactorProvider?.provide() ?: 1.0f
- return udfpsAdapter?.onMeasureInternal(width, height, layoutParams,
- scale) ?: layoutParams
- }
-
- override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
- super.onLayout(changed, left, top, right, bottom)
-
- val adapter = udfpsAdapter
- if (adapter != null) {
- // Move the UDFPS icon and indicator text if necessary. This probably only needs to happen
- // for devices where the UDFPS sensor is too low.
- // TODO(b/201510778): Update this logic to support cases where the sensor or text overlap
- // the button bar area.
- val bottomSpacerHeight = adapter.bottomSpacerHeight
- Log.w(TAG, "bottomSpacerHeight: $bottomSpacerHeight")
- if (bottomSpacerHeight < 0) {
- val iconFrame = findViewById<FrameLayout>(R.id.biometric_icon_frame)!!
- iconFrame.translationY = -bottomSpacerHeight.toFloat()
- val indicator = findViewById<TextView>(R.id.indicator)!!
- indicator.translationY = -bottomSpacerHeight.toFloat()
- }
- }
- }
-
- override fun getDelayAfterAuthenticatedDurationMs() = 500
-
- override fun getStateForAfterError() = STATE_AUTHENTICATING
-
- override fun handleResetAfterError() = showTouchSensorString()
-
- override fun handleResetAfterHelp() = showTouchSensorString()
-
- override fun supportsSmallDialog() = false
-
- override fun createIconController(): AuthIconController =
- AuthBiometricFingerprintIconController(mContext, mIconView, mIconViewOverlay)
-
- fun updateOverrideIconLayoutParamsSize() {
- udfpsAdapter?.let {
- val sensorDiameter = it.getSensorDiameter(scaleFactorProvider?.provide() ?: 1.0f)
- (mIconController as? AuthBiometricFingerprintIconController)?.iconLayoutParamSize =
- Pair(sensorDiameter, sensorDiameter)
- }
- }
-
- override fun onAttachedToWindow() {
- super.onAttachedToWindow()
- showTouchSensorString()
- }
-
- private fun showTouchSensorString() {
- mIndicatorView.setText(R.string.fingerprint_dialog_touch_sensor)
- mIndicatorView.setTextColor(mTextColorHint)
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
deleted file mode 100644
index ed4b91c7c4e4..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
+++ /dev/null
@@ -1,984 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.biometrics;
-
-import static android.hardware.biometrics.BiometricAuthenticator.TYPE_NONE;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ValueAnimator;
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.StringRes;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.graphics.Insets;
-import android.hardware.biometrics.BiometricAuthenticator.Modality;
-import android.hardware.biometrics.BiometricPrompt;
-import android.hardware.biometrics.PromptInfo;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.text.TextUtils;
-import android.text.method.ScrollingMovementMethod;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.accessibility.AccessibilityManager;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.widget.LockPatternUtils;
-import com.android.systemui.R;
-
-import com.airbnb.lottie.LottieAnimationView;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Contains the Biometric views (title, subtitle, icon, buttons, etc.) and its controllers.
- */
-public abstract class AuthBiometricView extends LinearLayout implements AuthBiometricViewAdapter {
-
- private static final String TAG = "AuthBiometricView";
-
- /**
- * Authentication hardware idle.
- */
- public static final int STATE_IDLE = 0;
- /**
- * UI animating in, authentication hardware active.
- */
- public static final int STATE_AUTHENTICATING_ANIMATING_IN = 1;
- /**
- * UI animated in, authentication hardware active.
- */
- public static final int STATE_AUTHENTICATING = 2;
- /**
- * UI animated in, authentication hardware active.
- */
- public static final int STATE_HELP = 3;
- /**
- * Hard error, e.g. ERROR_TIMEOUT. Authentication hardware idle.
- */
- public static final int STATE_ERROR = 4;
- /**
- * Authenticated, waiting for user confirmation. Authentication hardware idle.
- */
- public static final int STATE_PENDING_CONFIRMATION = 5;
- /**
- * Authenticated, dialog animating away soon.
- */
- public static final int STATE_AUTHENTICATED = 6;
-
- @Retention(RetentionPolicy.SOURCE)
- @IntDef({STATE_IDLE, STATE_AUTHENTICATING_ANIMATING_IN, STATE_AUTHENTICATING, STATE_HELP,
- STATE_ERROR, STATE_PENDING_CONFIRMATION, STATE_AUTHENTICATED})
- @interface BiometricState {}
-
- /**
- * Callback to the parent when a user action has occurred.
- */
- public interface Callback {
- int ACTION_AUTHENTICATED = 1;
- int ACTION_USER_CANCELED = 2;
- int ACTION_BUTTON_NEGATIVE = 3;
- int ACTION_BUTTON_TRY_AGAIN = 4;
- int ACTION_ERROR = 5;
- int ACTION_USE_DEVICE_CREDENTIAL = 6;
- int ACTION_START_DELAYED_FINGERPRINT_SENSOR = 7;
- int ACTION_AUTHENTICATED_AND_CONFIRMED = 8;
-
- /**
- * When an action has occurred. The caller will only invoke this when the callback should
- * be propagated. e.g. the caller will handle any necessary delay.
- * @param action
- */
- void onAction(int action);
- }
-
- private final Handler mHandler;
- private final AccessibilityManager mAccessibilityManager;
- private final LockPatternUtils mLockPatternUtils;
- protected final int mTextColorError;
- protected final int mTextColorHint;
-
- private AuthPanelController mPanelController;
-
- private PromptInfo mPromptInfo;
- private boolean mRequireConfirmation;
- private int mUserId;
- private int mEffectiveUserId;
- private @AuthDialog.DialogSize int mSize = AuthDialog.SIZE_UNKNOWN;
-
- private TextView mTitleView;
- private TextView mSubtitleView;
- private TextView mDescriptionView;
- private View mIconHolderView;
- protected LottieAnimationView mIconViewOverlay;
- protected LottieAnimationView mIconView;
- protected TextView mIndicatorView;
-
- @VisibleForTesting @NonNull AuthIconController mIconController;
- @VisibleForTesting int mAnimationDurationShort = AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS;
- @VisibleForTesting int mAnimationDurationLong = AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS;
- @VisibleForTesting int mAnimationDurationHideDialog = BiometricPrompt.HIDE_DIALOG_DELAY;
-
- // Negative button position, exclusively for the app-specified behavior
- @VisibleForTesting Button mNegativeButton;
- // Negative button position, exclusively for cancelling auth after passive auth success
- @VisibleForTesting Button mCancelButton;
- // Negative button position, shown if device credentials are allowed
- @VisibleForTesting Button mUseCredentialButton;
-
- // Positive button position,
- @VisibleForTesting Button mConfirmButton;
- @VisibleForTesting Button mTryAgainButton;
-
- // Measurements when biometric view is showing text, buttons, etc.
- @Nullable @VisibleForTesting AuthDialog.LayoutParams mLayoutParams;
-
- private Callback mCallback;
- @BiometricState private int mState;
-
- private float mIconOriginalY;
-
- protected boolean mDialogSizeAnimating;
- protected Bundle mSavedState;
-
- private final Runnable mResetErrorRunnable;
- private final Runnable mResetHelpRunnable;
-
- private Animator.AnimatorListener mJankListener;
-
- private final boolean mUseCustomBpSize;
- private final int mCustomBpWidth;
- private final int mCustomBpHeight;
-
- private final OnClickListener mBackgroundClickListener = (view) -> {
- if (mState == STATE_AUTHENTICATED) {
- Log.w(TAG, "Ignoring background click after authenticated");
- return;
- } else if (mSize == AuthDialog.SIZE_SMALL) {
- Log.w(TAG, "Ignoring background click during small dialog");
- return;
- } else if (mSize == AuthDialog.SIZE_LARGE) {
- Log.w(TAG, "Ignoring background click during large dialog");
- return;
- }
- mCallback.onAction(Callback.ACTION_USER_CANCELED);
- };
-
- public AuthBiometricView(Context context) {
- this(context, null);
- }
-
- public AuthBiometricView(Context context, AttributeSet attrs) {
- super(context, attrs);
- mHandler = new Handler(Looper.getMainLooper());
- mTextColorError = getResources().getColor(
- R.color.biometric_dialog_error, context.getTheme());
- mTextColorHint = getResources().getColor(
- R.color.biometric_dialog_gray, context.getTheme());
-
- mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
- mLockPatternUtils = new LockPatternUtils(context);
-
- mResetErrorRunnable = () -> {
- updateState(getStateForAfterError());
- handleResetAfterError();
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- };
-
- mResetHelpRunnable = () -> {
- updateState(STATE_AUTHENTICATING);
- handleResetAfterHelp();
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- };
-
- mUseCustomBpSize = getResources().getBoolean(R.bool.use_custom_bp_size);
- mCustomBpWidth = getResources().getDimensionPixelSize(R.dimen.biometric_dialog_width);
- mCustomBpHeight = getResources().getDimensionPixelSize(R.dimen.biometric_dialog_height);
- }
-
- /** Delay after authentication is confirmed, before the dialog should be animated away. */
- protected int getDelayAfterAuthenticatedDurationMs() {
- return 0;
- }
-
- /** State that the dialog/icon should be in after showing a help message. */
- protected int getStateForAfterError() {
- return STATE_IDLE;
- }
-
- /** Invoked when the error message is being cleared. */
- protected void handleResetAfterError() {}
-
- /** Invoked when the help message is being cleared. */
- protected void handleResetAfterHelp() {}
-
- /** True if the dialog supports {@link AuthDialog.DialogSize#SIZE_SMALL}. */
- protected boolean supportsSmallDialog() {
- return false;
- }
-
- /** The string to show when the user must tap to confirm via the button or icon. */
- @StringRes
- protected int getConfirmationPrompt() {
- return R.string.biometric_dialog_tap_confirm;
- }
-
- /** True if require confirmation will be honored when set via the API. */
- protected boolean supportsRequireConfirmation() {
- return false;
- }
-
- /** True if confirmation will be required even if it was not supported/requested. */
- protected boolean forceRequireConfirmation(@Modality int modality) {
- return false;
- }
-
- /** Ignore all events from this (secondary) modality except successful authentication. */
- protected boolean ignoreUnsuccessfulEventsFrom(@Modality int modality,
- String unsuccessfulReason) {
- return false;
- }
-
- /** Create the controller for managing the icons transitions during the prompt.*/
- @NonNull
- protected abstract AuthIconController createIconController();
-
- @Override
- public AuthIconController getLegacyIconController() {
- return mIconController;
- }
-
- @Override
- public void cancelAnimation() {
- animate().cancel();
- }
-
- @Override
- public View asView() {
- return this;
- }
-
- @Override
- public boolean isCoex() {
- return false;
- }
-
- void setPanelController(AuthPanelController panelController) {
- mPanelController = panelController;
- }
- void setPromptInfo(PromptInfo promptInfo) {
- mPromptInfo = promptInfo;
- }
-
- void setCallback(Callback callback) {
- mCallback = callback;
- }
-
- void setBackgroundView(View backgroundView) {
- backgroundView.setOnClickListener(mBackgroundClickListener);
- }
-
- void setUserId(int userId) {
- mUserId = userId;
- }
-
- void setEffectiveUserId(int effectiveUserId) {
- mEffectiveUserId = effectiveUserId;
- }
-
- void setRequireConfirmation(boolean requireConfirmation) {
- mRequireConfirmation = requireConfirmation && supportsRequireConfirmation();
- }
-
- void setJankListener(Animator.AnimatorListener jankListener) {
- mJankListener = jankListener;
- }
-
- private void updatePaddings(int size) {
- final Insets navBarInsets = Utils.getNavbarInsets(mContext);
- if (size != AuthDialog.SIZE_LARGE) {
- if (mPanelController.getPosition() == AuthPanelController.POSITION_LEFT) {
- setPadding(navBarInsets.left, 0, 0, 0);
- } else if (mPanelController.getPosition() == AuthPanelController.POSITION_RIGHT) {
- setPadding(0, 0, navBarInsets.right, 0);
- } else {
- setPadding(0, 0, 0, navBarInsets.bottom);
- }
- } else {
- setPadding(0, 0, 0, 0);
- }
- }
-
- @VisibleForTesting
- final void updateSize(@AuthDialog.DialogSize int newSize) {
- Log.v(TAG, "Current size: " + mSize + " New size: " + newSize);
- updatePaddings(newSize);
- if (newSize == AuthDialog.SIZE_SMALL) {
- mTitleView.setVisibility(View.GONE);
- mSubtitleView.setVisibility(View.GONE);
- mDescriptionView.setVisibility(View.GONE);
- mIndicatorView.setVisibility(View.GONE);
- mNegativeButton.setVisibility(View.GONE);
- mUseCredentialButton.setVisibility(View.GONE);
-
- final float iconPadding = getResources()
- .getDimension(R.dimen.biometric_dialog_icon_padding);
- mIconHolderView.setY(getHeight() - mIconHolderView.getHeight() - iconPadding);
-
- // Subtract the vertical padding from the new height since it's only used to create
- // extra space between the other elements, and not part of the actual icon.
- final int newHeight = mIconHolderView.getHeight() + 2 * (int) iconPadding
- - mIconHolderView.getPaddingTop() - mIconHolderView.getPaddingBottom();
- mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth, newHeight,
- 0 /* animateDurationMs */);
-
- mSize = newSize;
- } else if (mSize == AuthDialog.SIZE_SMALL && newSize == AuthDialog.SIZE_MEDIUM) {
- if (mDialogSizeAnimating) {
- return;
- }
- mDialogSizeAnimating = true;
-
- // Animate the icon back to original position
- final ValueAnimator iconAnimator =
- ValueAnimator.ofFloat(mIconHolderView.getY(), mIconOriginalY);
- iconAnimator.addUpdateListener((animation) -> {
- mIconHolderView.setY((float) animation.getAnimatedValue());
- });
-
- // Animate the text
- final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(0, 1);
- opacityAnimator.addUpdateListener((animation) -> {
- final float opacity = (float) animation.getAnimatedValue();
- mTitleView.setAlpha(opacity);
- mIndicatorView.setAlpha(opacity);
- mNegativeButton.setAlpha(opacity);
- mCancelButton.setAlpha(opacity);
- mTryAgainButton.setAlpha(opacity);
-
- if (!TextUtils.isEmpty(mSubtitleView.getText())) {
- mSubtitleView.setAlpha(opacity);
- }
- if (!TextUtils.isEmpty(mDescriptionView.getText())) {
- mDescriptionView.setAlpha(opacity);
- }
- });
-
- // Choreograph together
- final AnimatorSet as = new AnimatorSet();
- as.setDuration(mAnimationDurationShort);
- as.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- super.onAnimationStart(animation);
- mTitleView.setVisibility(View.VISIBLE);
- mIndicatorView.setVisibility(View.VISIBLE);
-
- if (isDeviceCredentialAllowed()) {
- mUseCredentialButton.setVisibility(View.VISIBLE);
- } else {
- mNegativeButton.setVisibility(View.VISIBLE);
- }
- if (supportsManualRetry()) {
- mTryAgainButton.setVisibility(View.VISIBLE);
- }
-
- if (!TextUtils.isEmpty(mSubtitleView.getText())) {
- mSubtitleView.setVisibility(View.VISIBLE);
- }
- if (!TextUtils.isEmpty(mDescriptionView.getText())) {
- mDescriptionView.setVisibility(View.VISIBLE);
- }
- }
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mSize = newSize;
- mDialogSizeAnimating = false;
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager,
- AuthBiometricView.this);
- }
- });
-
- if (mJankListener != null) {
- as.addListener(mJankListener);
- }
- as.play(iconAnimator).with(opacityAnimator);
- as.start();
- // Animate the panel
- mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth,
- mLayoutParams.mMediumHeight,
- AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS);
- } else if (newSize == AuthDialog.SIZE_MEDIUM) {
- mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth,
- mLayoutParams.mMediumHeight,
- 0 /* animateDurationMs */);
- mSize = newSize;
- } else if (newSize == AuthDialog.SIZE_LARGE) {
- final float translationY = getResources().getDimension(
- R.dimen.biometric_dialog_medium_to_large_translation_offset);
- final AuthBiometricView biometricView = this;
-
- // Translate at full duration
- final ValueAnimator translationAnimator = ValueAnimator.ofFloat(
- biometricView.getY(), biometricView.getY() - translationY);
- translationAnimator.setDuration(mAnimationDurationLong);
- translationAnimator.addUpdateListener((animation) -> {
- final float translation = (float) animation.getAnimatedValue();
- biometricView.setTranslationY(translation);
- });
- translationAnimator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- if (biometricView.getParent() instanceof ViewGroup) {
- ((ViewGroup) biometricView.getParent()).removeView(biometricView);
- }
- mSize = newSize;
- }
- });
-
- // Opacity to 0 in half duration
- final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(1, 0);
- opacityAnimator.setDuration(mAnimationDurationLong / 2);
- opacityAnimator.addUpdateListener((animation) -> {
- final float opacity = (float) animation.getAnimatedValue();
- biometricView.setAlpha(opacity);
- });
-
- mPanelController.setUseFullScreen(true);
- mPanelController.updateForContentDimensions(
- mPanelController.getContainerWidth(),
- mPanelController.getContainerHeight(),
- mAnimationDurationLong);
-
- // Start the animations together
- AnimatorSet as = new AnimatorSet();
- List<Animator> animators = new ArrayList<>();
- animators.add(translationAnimator);
- animators.add(opacityAnimator);
-
- if (mJankListener != null) {
- as.addListener(mJankListener);
- }
- as.playTogether(animators);
- as.setDuration(mAnimationDurationLong * 2 / 3);
- as.start();
- } else {
- Log.e(TAG, "Unknown transition from: " + mSize + " to: " + newSize);
- }
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- }
-
- protected boolean supportsManualRetry() {
- return false;
- }
-
- /**
- * Updates mIconView animation on updates to fold state, device rotation, or rear display mode
- * @param animation new asset to use for iconw
- */
- public void updateIconViewAnimation(int animation) {
- mIconView.setAnimation(animation);
- }
-
- public void updateState(@BiometricState int newState) {
- Log.d(TAG, "newState: " + newState);
-
- mIconController.updateState(mState, newState);
-
- switch (newState) {
- case STATE_AUTHENTICATING_ANIMATING_IN:
- case STATE_AUTHENTICATING:
- removePendingAnimations();
- if (mRequireConfirmation) {
- mConfirmButton.setEnabled(false);
- mConfirmButton.setVisibility(View.VISIBLE);
- }
- break;
-
- case STATE_AUTHENTICATED:
- removePendingAnimations();
- if (mSize != AuthDialog.SIZE_SMALL) {
- mConfirmButton.setVisibility(View.GONE);
- mNegativeButton.setVisibility(View.GONE);
- mUseCredentialButton.setVisibility(View.GONE);
- mCancelButton.setVisibility(View.GONE);
- mIndicatorView.setVisibility(View.INVISIBLE);
- }
- announceForAccessibility(getResources()
- .getString(R.string.biometric_dialog_authenticated));
- if (mState == STATE_PENDING_CONFIRMATION) {
- mHandler.postDelayed(() -> mCallback.onAction(
- Callback.ACTION_AUTHENTICATED_AND_CONFIRMED),
- getDelayAfterAuthenticatedDurationMs());
- } else {
- mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_AUTHENTICATED),
- getDelayAfterAuthenticatedDurationMs());
- }
- break;
-
- case STATE_PENDING_CONFIRMATION:
- removePendingAnimations();
- mNegativeButton.setVisibility(View.GONE);
- mCancelButton.setVisibility(View.VISIBLE);
- mUseCredentialButton.setVisibility(View.GONE);
- // forced confirmations (multi-sensor) use the icon view as the confirm button
- mConfirmButton.setEnabled(mRequireConfirmation);
- mConfirmButton.setVisibility(mRequireConfirmation ? View.VISIBLE : View.GONE);
- mIndicatorView.setTextColor(mTextColorHint);
- mIndicatorView.setText(getConfirmationPrompt());
- mIndicatorView.setVisibility(View.VISIBLE);
- break;
-
- case STATE_ERROR:
- if (mSize == AuthDialog.SIZE_SMALL) {
- updateSize(AuthDialog.SIZE_MEDIUM);
- }
- break;
-
- default:
- Log.w(TAG, "Unhandled state: " + newState);
- break;
- }
-
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- mState = newState;
- }
-
- public void onOrientationChanged() {
- // Update padding and AuthPanel outline by calling updateSize when the orientation changed.
- updateSize(mSize);
- }
-
- public void onDialogAnimatedIn(boolean fingerprintWasStarted) {
- updateState(STATE_AUTHENTICATING);
- }
-
- public void onAuthenticationSucceeded(@Modality int modality) {
- removePendingAnimations();
- if (mRequireConfirmation || forceRequireConfirmation(modality)) {
- updateState(STATE_PENDING_CONFIRMATION);
- } else {
- updateState(STATE_AUTHENTICATED);
- }
- }
-
- /**
- * Notify the view that auth has failed.
- *
- * @param modality sensor modality that failed
- * @param failureReason message
- */
- public void onAuthenticationFailed(
- @Modality int modality, @Nullable String failureReason) {
- if (ignoreUnsuccessfulEventsFrom(modality, failureReason)) {
- return;
- }
-
- showTemporaryMessage(failureReason, mResetErrorRunnable);
- updateState(STATE_ERROR);
- }
-
- /**
- * Notify the view that an error occurred.
- *
- * @param modality sensor modality that failed
- * @param error message
- */
- public void onError(@Modality int modality, String error) {
- if (ignoreUnsuccessfulEventsFrom(modality, error)) {
- return;
- }
-
- showTemporaryMessage(error, mResetErrorRunnable);
- updateState(STATE_ERROR);
-
- mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_ERROR),
- mAnimationDurationHideDialog);
- }
-
- /**
- * Show a help message to the user.
- *
- * @param modality sensor modality
- * @param help message
- */
- public void onHelp(@Modality int modality, String help) {
- if (ignoreUnsuccessfulEventsFrom(modality, help)) {
- return;
- }
- if (mSize != AuthDialog.SIZE_MEDIUM) {
- Log.w(TAG, "Help received in size: " + mSize);
- return;
- }
- if (TextUtils.isEmpty(help)) {
- Log.w(TAG, "Ignoring blank help message");
- return;
- }
-
- showTemporaryMessage(help, mResetHelpRunnable);
- updateState(STATE_HELP);
- }
-
- public void onSaveState(@NonNull Bundle outState) {
- outState.putInt(AuthDialog.KEY_BIOMETRIC_CONFIRM_VISIBILITY,
- mConfirmButton.getVisibility());
- outState.putInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY,
- mTryAgainButton.getVisibility());
- outState.putInt(AuthDialog.KEY_BIOMETRIC_STATE, mState);
- outState.putString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING,
- mIndicatorView.getText() != null ? mIndicatorView.getText().toString() : "");
- outState.putBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING,
- mHandler.hasCallbacks(mResetErrorRunnable));
- outState.putBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_HELP_SHOWING,
- mHandler.hasCallbacks(mResetHelpRunnable));
- outState.putInt(AuthDialog.KEY_BIOMETRIC_DIALOG_SIZE, mSize);
- }
-
- /**
- * Invoked after inflation but before being attached to window.
- * @param savedState
- */
- public void restoreState(@Nullable Bundle savedState) {
- mSavedState = savedState;
- }
- private void setTextOrHide(TextView view, CharSequence charSequence) {
- if (TextUtils.isEmpty(charSequence)) {
- view.setVisibility(View.GONE);
- } else {
- view.setText(charSequence);
- }
-
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- }
-
- // Remove all pending icon and text animations
- private void removePendingAnimations() {
- mHandler.removeCallbacks(mResetHelpRunnable);
- mHandler.removeCallbacks(mResetErrorRunnable);
- }
-
- private void showTemporaryMessage(String message, Runnable resetMessageRunnable) {
- removePendingAnimations();
- mIndicatorView.setText(message);
- mIndicatorView.setTextColor(mTextColorError);
- mIndicatorView.setVisibility(View.VISIBLE);
- // select to enable marquee unless a screen reader is enabled
- mIndicatorView.setSelected(!mAccessibilityManager.isEnabled()
- || !mAccessibilityManager.isTouchExplorationEnabled());
- mHandler.postDelayed(resetMessageRunnable, mAnimationDurationHideDialog);
-
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- }
-
- @Override
- protected void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- if (mSavedState != null) {
- updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
- }
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
-
- mTitleView = findViewById(R.id.title);
- mSubtitleView = findViewById(R.id.subtitle);
- mDescriptionView = findViewById(R.id.description);
- mIconViewOverlay = findViewById(R.id.biometric_icon_overlay);
- mIconView = findViewById(R.id.biometric_icon);
- mIconHolderView = findViewById(R.id.biometric_icon_frame);
- mIndicatorView = findViewById(R.id.indicator);
-
- // Negative-side (left) buttons
- mNegativeButton = findViewById(R.id.button_negative);
- mCancelButton = findViewById(R.id.button_cancel);
- mUseCredentialButton = findViewById(R.id.button_use_credential);
-
- // Positive-side (right) buttons
- mConfirmButton = findViewById(R.id.button_confirm);
- mTryAgainButton = findViewById(R.id.button_try_again);
-
- mNegativeButton.setOnClickListener((view) -> {
- mCallback.onAction(Callback.ACTION_BUTTON_NEGATIVE);
- });
-
- mCancelButton.setOnClickListener((view) -> {
- mCallback.onAction(Callback.ACTION_USER_CANCELED);
- });
-
- mUseCredentialButton.setOnClickListener((view) -> {
- startTransitionToCredentialUI(false /* isError */);
- });
-
- mConfirmButton.setOnClickListener((view) -> {
- updateState(STATE_AUTHENTICATED);
- });
-
- mTryAgainButton.setOnClickListener((view) -> {
- updateState(STATE_AUTHENTICATING);
- mCallback.onAction(Callback.ACTION_BUTTON_TRY_AGAIN);
- mTryAgainButton.setVisibility(View.GONE);
- Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
- });
-
- mIconController = createIconController();
- if (mIconController.getActsAsConfirmButton()) {
- mIconViewOverlay.setOnClickListener((view)->{
- if (mState == STATE_PENDING_CONFIRMATION) {
- updateState(STATE_AUTHENTICATED);
- }
- });
- mIconView.setOnClickListener((view) -> {
- if (mState == STATE_PENDING_CONFIRMATION) {
- updateState(STATE_AUTHENTICATED);
- }
- });
- }
- }
-
- /**
- * Kicks off the animation process and invokes the callback.
- *
- * @param isError if this was triggered due to an error and not a user action (unused,
- * previously for haptics).
- */
- @Override
- public void startTransitionToCredentialUI(boolean isError) {
- updateSize(AuthDialog.SIZE_LARGE);
- mCallback.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL);
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
-
- mTitleView.setText(mPromptInfo.getTitle());
-
- // setSelected could make marquee work
- mTitleView.setSelected(true);
- mSubtitleView.setSelected(true);
- // make description view become scrollable
- mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
-
- if (isDeviceCredentialAllowed()) {
- final CharSequence credentialButtonText;
- @Utils.CredentialType final int credentialType =
- Utils.getCredentialType(mLockPatternUtils, mEffectiveUserId);
- switch (credentialType) {
- case Utils.CREDENTIAL_PIN:
- credentialButtonText =
- getResources().getString(R.string.biometric_dialog_use_pin);
- break;
- case Utils.CREDENTIAL_PATTERN:
- credentialButtonText =
- getResources().getString(R.string.biometric_dialog_use_pattern);
- break;
- case Utils.CREDENTIAL_PASSWORD:
- default:
- credentialButtonText =
- getResources().getString(R.string.biometric_dialog_use_password);
- break;
- }
-
- mNegativeButton.setVisibility(View.GONE);
-
- mUseCredentialButton.setText(credentialButtonText);
- mUseCredentialButton.setVisibility(View.VISIBLE);
- } else {
- mNegativeButton.setText(mPromptInfo.getNegativeButtonText());
- }
-
- setTextOrHide(mSubtitleView, mPromptInfo.getSubtitle());
- setTextOrHide(mDescriptionView, mPromptInfo.getDescription());
-
- if (mSavedState == null) {
- updateState(STATE_AUTHENTICATING_ANIMATING_IN);
- } else {
- // Restore as much state as possible first
- updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
-
- // Restore positive button(s) state
- mConfirmButton.setVisibility(
- mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_CONFIRM_VISIBILITY));
- if (mConfirmButton.getVisibility() == View.GONE) {
- setRequireConfirmation(false);
- }
- mTryAgainButton.setVisibility(
- mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY));
-
- }
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
-
- mIconController.setDeactivated(true);
-
- // Empty the handler, otherwise things like ACTION_AUTHENTICATED may be duplicated once
- // the new dialog is restored.
- mHandler.removeCallbacksAndMessages(null /* all */);
- }
-
- /**
- * Contains all of the testable logic that should be invoked when {@link #onMeasure(int, int)}
- * is invoked. In addition, this allows subclasses to implement custom measuring logic while
- * allowing the base class to have common code to apply the custom measurements.
- *
- * @param width Width to constrain the measurements to.
- * @param height Height to constrain the measurements to.
- * @return See {@link AuthDialog.LayoutParams}
- */
- @NonNull
- AuthDialog.LayoutParams onMeasureInternal(int width, int height) {
- int totalHeight = 0;
- final int numChildren = getChildCount();
- for (int i = 0; i < numChildren; i++) {
- final View child = getChildAt(i);
-
- if (child.getId() == R.id.space_above_icon
- || child.getId() == R.id.space_below_icon
- || child.getId() == R.id.button_bar) {
- child.measure(
- MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
- MeasureSpec.makeMeasureSpec(child.getLayoutParams().height,
- MeasureSpec.EXACTLY));
- } else if (child.getId() == R.id.biometric_icon_frame) {
- final View iconView = findViewById(R.id.biometric_icon);
- child.measure(
- MeasureSpec.makeMeasureSpec(iconView.getLayoutParams().width,
- MeasureSpec.EXACTLY),
- MeasureSpec.makeMeasureSpec(iconView.getLayoutParams().height,
- MeasureSpec.EXACTLY));
- } else if (child.getId() == R.id.biometric_icon) {
- child.measure(
- MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST),
- MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
- } else {
- child.measure(
- MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
- MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
- }
-
- if (child.getVisibility() != View.GONE) {
- totalHeight += child.getMeasuredHeight();
- }
- }
-
- return new AuthDialog.LayoutParams(width, totalHeight);
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int width = MeasureSpec.getSize(widthMeasureSpec);
- int height = MeasureSpec.getSize(heightMeasureSpec);
-
- if (mUseCustomBpSize) {
- width = mCustomBpWidth;
- height = mCustomBpHeight;
- } else {
- width = Math.min(width, height);
- }
-
- mLayoutParams = onMeasureInternal(width, height);
-
- final Insets navBarInsets = Utils.getNavbarInsets(mContext);
- final int navBarHeight = navBarInsets.bottom;
- final int navBarWidth;
- if (mPanelController.getPosition() == AuthPanelController.POSITION_LEFT) {
- navBarWidth = navBarInsets.left;
- } else if (mPanelController.getPosition() == AuthPanelController.POSITION_RIGHT) {
- navBarWidth = navBarInsets.right;
- } else {
- navBarWidth = 0;
- }
-
- // The actual auth dialog w/h should include navigation bar size.
- if (navBarWidth != 0 || navBarHeight != 0) {
- mLayoutParams = new AuthDialog.LayoutParams(
- mLayoutParams.mMediumWidth + navBarWidth,
- mLayoutParams.mMediumHeight + navBarInsets.bottom);
- }
-
- setMeasuredDimension(mLayoutParams.mMediumWidth, mLayoutParams.mMediumHeight);
- }
-
- @Override
- public void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
-
- // Start with initial size only once. Subsequent layout changes don't matter since we
- // only care about the initial icon position.
- if (mIconOriginalY == 0) {
- mIconOriginalY = mIconHolderView.getY();
- if (mSavedState == null) {
- updateSize(!mRequireConfirmation && supportsSmallDialog() ? AuthDialog.SIZE_SMALL
- : AuthDialog.SIZE_MEDIUM);
- } else {
- updateSize(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_DIALOG_SIZE));
-
- // Restore indicator text state only after size has been restored
- final String indicatorText =
- mSavedState.getString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING);
- if (mSavedState.getBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_HELP_SHOWING)) {
- onHelp(TYPE_NONE, indicatorText);
- } else if (mSavedState.getBoolean(
- AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING)) {
- onAuthenticationFailed(TYPE_NONE, indicatorText);
- }
- }
- }
- }
-
- private boolean isDeviceCredentialAllowed() {
- return Utils.isDeviceCredentialAllowed(mPromptInfo);
- }
-
- public LottieAnimationView getIconView() {
- return mIconView;
- }
-
- @AuthDialog.DialogSize int getSize() {
- return mSize;
- }
-
- /** If authentication has successfully occurred and the view is done. */
- boolean isAuthenticated() {
- return mState == STATE_AUTHENTICATED;
- }
-
- /** If authentication is currently in progress. */
- boolean isAuthenticating() {
- return mState == STATE_AUTHENTICATING;
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt
deleted file mode 100644
index 68db564606fd..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt
+++ /dev/null
@@ -1,56 +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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator
-import android.os.Bundle
-import android.view.View
-
-/** TODO(b/251476085): Temporary interface while legacy biometric prompt is around. */
-@Deprecated("temporary adapter while migrating biometric prompt - do not expand")
-interface AuthBiometricViewAdapter {
- val legacyIconController: AuthIconController?
-
- fun onDialogAnimatedIn(fingerprintWasStarted: Boolean)
-
- fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int)
-
- fun onAuthenticationFailed(
- @BiometricAuthenticator.Modality modality: Int,
- failureReason: String
- )
-
- fun onError(@BiometricAuthenticator.Modality modality: Int, error: String)
-
- fun onHelp(@BiometricAuthenticator.Modality modality: Int, help: String)
-
- fun startTransitionToCredentialUI(isError: Boolean)
-
- fun requestLayout()
-
- fun onSaveState(bundle: Bundle?)
-
- fun restoreState(bundle: Bundle?)
-
- fun onOrientationChanged()
-
- fun cancelAnimation()
-
- fun isCoex(): Boolean
-
- fun asView(): View
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
index 7464c8803c99..c7d7fe32be31 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
@@ -17,9 +17,7 @@
package com.android.systemui.biometrics;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
-import static android.hardware.biometrics.SensorProperties.STRENGTH_STRONG;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-
import static com.android.internal.jank.InteractionJankMonitor.CUJ_BIOMETRIC_PROMPT_TRANSITION;
import android.animation.Animator;
@@ -35,7 +33,6 @@ import android.hardware.biometrics.PromptInfo;
import android.hardware.face.FaceSensorPropertiesInternal;
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
import android.os.Binder;
-import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -70,15 +67,16 @@ import com.android.systemui.R;
import com.android.systemui.biometrics.AuthController.ScaleFactorProvider;
import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor;
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor;
-import com.android.systemui.biometrics.domain.model.BiometricModalities;
+import com.android.systemui.biometrics.shared.model.BiometricModalities;
import com.android.systemui.biometrics.ui.BiometricPromptLayout;
import com.android.systemui.biometrics.ui.CredentialView;
import com.android.systemui.biometrics.ui.binder.BiometricViewBinder;
+import com.android.systemui.biometrics.ui.binder.BiometricViewSizeBinder;
+import com.android.systemui.biometrics.ui.binder.Spaghetti;
import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.util.concurrency.DelayableExecutor;
@@ -96,7 +94,10 @@ import kotlinx.coroutines.CoroutineScope;
/**
* Top level container/controller for the BiometricPrompt UI.
+ *
+ * @deprecated TODO(b/287311775): remove and merge view/layouts into new prompt.
*/
+@Deprecated
public class AuthContainerView extends LinearLayout
implements AuthDialog, WakefulnessLifecycle.Observer, CredentialView.Host {
@@ -104,6 +105,7 @@ public class AuthContainerView extends LinearLayout
private static final int ANIMATION_DURATION_SHOW_MS = 250;
private static final int ANIMATION_DURATION_AWAY_MS = 350;
+ private static final int ANIMATE_CREDENTIAL_START_DELAY_MS = 300;
private static final int STATE_UNKNOWN = 0;
private static final int STATE_ANIMATING_IN = 1;
@@ -138,16 +140,16 @@ public class AuthContainerView extends LinearLayout
private final InteractionJankMonitor mInteractionJankMonitor;
private final CoroutineScope mApplicationCoroutineScope;
- // TODO: these should be migrated out once ready
+ // TODO(b/287311775): these should be migrated out once ready
private final Provider<PromptCredentialInteractor> mPromptCredentialInteractor;
private final @NonNull Provider<PromptSelectorInteractor> mPromptSelectorInteractorProvider;
- // TODO(b/251476085): these should be migrated out of the view
+ // TODO(b/287311775): these should be migrated out of the view
private final Provider<CredentialViewModel> mCredentialViewModelProvider;
private final PromptViewModel mPromptViewModel;
@VisibleForTesting final BiometricCallback mBiometricCallback;
- @Nullable private AuthBiometricViewAdapter mBiometricView;
+ @Nullable private Spaghetti mBiometricView;
@Nullable private View mCredentialView;
private final AuthPanelController mPanelController;
private final FrameLayout mFrameLayout;
@@ -166,7 +168,7 @@ public class AuthContainerView extends LinearLayout
// HAT received from LockSettingsService when credential is verified.
@Nullable private byte[] mCredentialAttestation;
- // TODO(b/251476085): remove when legacy prompt is replaced
+ // TODO(b/287311775): remove when legacy prompt is replaced
@Deprecated
static class Config {
Context mContext;
@@ -184,42 +186,50 @@ public class AuthContainerView extends LinearLayout
}
@VisibleForTesting
- final class BiometricCallback implements AuthBiometricView.Callback {
+ final class BiometricCallback implements Spaghetti.Callback {
@Override
- public void onAction(int action) {
- switch (action) {
- case AuthBiometricView.Callback.ACTION_AUTHENTICATED:
- animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED);
- break;
- case AuthBiometricView.Callback.ACTION_USER_CANCELED:
- sendEarlyUserCanceled();
- animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
- break;
- case AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE:
- animateAway(AuthDialogCallback.DISMISSED_BUTTON_NEGATIVE);
- break;
- case AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN:
- mFailedModalities.clear();
- mConfig.mCallback.onTryAgainPressed(getRequestId());
- break;
- case AuthBiometricView.Callback.ACTION_ERROR:
- animateAway(AuthDialogCallback.DISMISSED_ERROR);
- break;
- case AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL:
- mConfig.mCallback.onDeviceCredentialPressed(getRequestId());
- mHandler.postDelayed(() -> {
- addCredentialView(false /* animatePanel */, true /* animateContents */);
- }, mConfig.mSkipAnimation ? 0 : AuthDialog.ANIMATE_CREDENTIAL_START_DELAY_MS);
- break;
- case AuthBiometricView.Callback.ACTION_START_DELAYED_FINGERPRINT_SENSOR:
- mConfig.mCallback.onStartFingerprintNow(getRequestId());
- break;
- case AuthBiometricView.Callback.ACTION_AUTHENTICATED_AND_CONFIRMED:
- animateAway(AuthDialogCallback.DISMISSED_BUTTON_POSITIVE);
- break;
- default:
- Log.e(TAG, "Unhandled action: " + action);
- }
+ public void onAuthenticated() {
+ animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED);
+ }
+
+ @Override
+ public void onUserCanceled() {
+ sendEarlyUserCanceled();
+ animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
+ }
+
+ @Override
+ public void onButtonNegative() {
+ animateAway(AuthDialogCallback.DISMISSED_BUTTON_NEGATIVE);
+ }
+
+ @Override
+ public void onButtonTryAgain() {
+ mFailedModalities.clear();
+ mConfig.mCallback.onTryAgainPressed(getRequestId());
+ }
+
+ @Override
+ public void onError() {
+ animateAway(AuthDialogCallback.DISMISSED_ERROR);
+ }
+
+ @Override
+ public void onUseDeviceCredential() {
+ mConfig.mCallback.onDeviceCredentialPressed(getRequestId());
+ mHandler.postDelayed(() -> {
+ addCredentialView(false /* animatePanel */, true /* animateContents */);
+ }, mConfig.mSkipAnimation ? 0 : ANIMATE_CREDENTIAL_START_DELAY_MS);
+ }
+
+ @Override
+ public void onStartDelayedFingerprintSensor() {
+ mConfig.mCallback.onStartFingerprintNow(getRequestId());
+ }
+
+ @Override
+ public void onAuthenticatedAndConfirmed() {
+ animateAway(AuthDialogCallback.DISMISSED_BUTTON_POSITIVE);
}
}
@@ -355,14 +365,10 @@ public class AuthContainerView extends LinearLayout
mCredentialViewModelProvider = credentialViewModelProvider;
mPromptViewModel = promptViewModel;
- if (featureFlags.isEnabled(Flags.BIOMETRIC_BP_STRONG)) {
- showPrompt(config, layoutInflater, promptViewModel,
- Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds),
- Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds),
- vibratorHelper, featureFlags);
- } else {
- showLegacyPrompt(config, layoutInflater, fpProps, faceProps);
- }
+ showPrompt(config, layoutInflater, promptViewModel,
+ Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds),
+ Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds),
+ vibratorHelper, featureFlags);
// TODO: De-dupe the logic with AuthCredentialPasswordView
setOnKeyListener((v, keyCode, event) -> {
@@ -398,7 +404,8 @@ public class AuthContainerView extends LinearLayout
R.layout.biometric_prompt_layout, null, false);
mBiometricView = BiometricViewBinder.bind(view, viewModel, mPanelController,
// TODO(b/201510778): This uses the wrong timeout in some cases
- getJankListener(view, TRANSIT, AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS),
+ getJankListener(view, TRANSIT,
+ BiometricViewSizeBinder.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS),
mBackgroundView, mBiometricCallback, mApplicationCoroutineScope,
vibratorHelper, featureFlags);
@@ -412,60 +419,6 @@ public class AuthContainerView extends LinearLayout
}
}
- // TODO(b/251476085): remove entirely
- private void showLegacyPrompt(@NonNull Config config, @NonNull LayoutInflater layoutInflater,
- @Nullable List<FingerprintSensorPropertiesInternal> fpProps,
- @Nullable List<FaceSensorPropertiesInternal> faceProps
- ) {
- // Inflate biometric view only if necessary.
- if (Utils.isBiometricAllowed(mConfig.mPromptInfo)) {
- final FingerprintSensorPropertiesInternal fpProperties =
- Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds);
- final FaceSensorPropertiesInternal faceProperties =
- Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds);
-
- if (fpProperties != null && faceProperties != null) {
- final AuthBiometricFingerprintAndFaceView fingerprintAndFaceView =
- (AuthBiometricFingerprintAndFaceView) layoutInflater.inflate(
- R.layout.auth_biometric_fingerprint_and_face_view, null, false);
- fingerprintAndFaceView.setSensorProperties(fpProperties);
- fingerprintAndFaceView.setScaleFactorProvider(config.mScaleProvider);
- fingerprintAndFaceView.updateOverrideIconLayoutParamsSize();
- fingerprintAndFaceView.setFaceClass3(
- faceProperties.sensorStrength == STRENGTH_STRONG);
- mBiometricView = fingerprintAndFaceView;
- } else if (fpProperties != null) {
- final AuthBiometricFingerprintView fpView =
- (AuthBiometricFingerprintView) layoutInflater.inflate(
- R.layout.auth_biometric_fingerprint_view, null, false);
- fpView.setSensorProperties(fpProperties);
- fpView.setScaleFactorProvider(config.mScaleProvider);
- fpView.updateOverrideIconLayoutParamsSize();
- mBiometricView = fpView;
- } else if (faceProperties != null) {
- mBiometricView = (AuthBiometricFaceView) layoutInflater.inflate(
- R.layout.auth_biometric_face_view, null, false);
- } else {
- Log.e(TAG, "No sensors found!");
- }
- }
-
- // init view before showing
- if (mBiometricView != null) {
- final AuthBiometricView view = (AuthBiometricView) mBiometricView;
- view.setRequireConfirmation(mConfig.mRequireConfirmation);
- view.setPanelController(mPanelController);
- view.setPromptInfo(mConfig.mPromptInfo);
- view.setCallback(mBiometricCallback);
- view.setBackgroundView(mBackgroundView);
- view.setUserId(mConfig.mUserId);
- view.setEffectiveUserId(mEffectiveUserId);
- // TODO(b/201510778): This uses the wrong timeout in some cases (remove w/ above)
- view.setJankListener(getJankListener(view, TRANSIT,
- AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS));
- }
- }
-
private void onBackInvoked() {
sendEarlyUserCanceled();
animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
@@ -533,9 +486,6 @@ public class AuthContainerView extends LinearLayout
@Override
public void onOrientationChanged() {
maybeUpdatePositionForUdfps(true /* invalidate */);
- if (mBiometricView != null) {
- mBiometricView.onOrientationChanged();
- }
}
@Override
@@ -621,10 +571,6 @@ public class AuthContainerView extends LinearLayout
}
private static boolean shouldUpdatePositionForUdfps(@NonNull View view) {
- // TODO(b/251476085): legacy view (delete when removed)
- if (view instanceof AuthBiometricFingerprintView) {
- return ((AuthBiometricFingerprintView) view).isUdfps();
- }
if (view instanceof BiometricPromptLayout) {
// this will force the prompt to align itself on the edge of the screen
// instead of centering (temporary workaround to prevent small implicit view
@@ -672,7 +618,6 @@ public class AuthContainerView extends LinearLayout
if (invalidate) {
mPanelView.invalidateOutline();
- mBiometricView.requestLayout();
}
return true;
@@ -702,11 +647,7 @@ public class AuthContainerView extends LinearLayout
}
@Override
- public void show(WindowManager wm, @Nullable Bundle savedState) {
- if (mBiometricView != null) {
- mBiometricView.restoreState(savedState);
- }
-
+ public void show(WindowManager wm) {
wm.addView(this, getLayoutParams(mWindowToken, mConfig.mPromptInfo.getTitle()));
}
@@ -781,7 +722,7 @@ public class AuthContainerView extends LinearLayout
if (mFailedModalities.contains(TYPE_FACE)) {
Log.d(TAG, "retrying failed modalities (pointer down)");
mFailedModalities.remove(TYPE_FACE);
- mBiometricCallback.onAction(AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN);
+ mBiometricCallback.onButtonTryAgain();
}
} else {
Log.e(TAG, "onPointerDown(): mBiometricView is null");
@@ -789,21 +730,6 @@ public class AuthContainerView extends LinearLayout
}
@Override
- public void onSaveState(@NonNull Bundle outState) {
- outState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY,
- mContainerState == STATE_ANIMATING_OUT);
- // In the case where biometric and credential are both allowed, we can assume that
- // biometric isn't showing if credential is showing since biometric is shown first.
- outState.putBoolean(AuthDialog.KEY_BIOMETRIC_SHOWING,
- mBiometricView != null && mCredentialView == null);
- outState.putBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING, mCredentialView != null);
-
- if (mBiometricView != null) {
- mBiometricView.onSaveState(outState);
- }
- }
-
- @Override
public String getOpPackageName() {
return mConfig.mOpPackageName;
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
index d5289a49be51..b752c3b80cae 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -50,7 +50,6 @@ import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback;
import android.hardware.fingerprint.IUdfpsRefreshRateRequestCallback;
-import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
import android.os.UserManager;
@@ -67,12 +66,11 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.os.SomeArgs;
import com.android.internal.widget.LockPatternUtils;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
import com.android.systemui.CoreStartable;
import com.android.systemui.biometrics.domain.interactor.LogContextInteractor;
import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor;
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
import com.android.systemui.dagger.SysUISingleton;
@@ -88,8 +86,6 @@ import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.Execution;
-import kotlin.Unit;
-
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -103,6 +99,8 @@ import java.util.Set;
import javax.inject.Inject;
import javax.inject.Provider;
+import kotlin.Unit;
+
import kotlinx.coroutines.CoroutineScope;
/**
@@ -967,7 +965,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
skipAnimation = true;
}
- showDialog(args, skipAnimation, null /* savedState */, mPromptViewModelProvider.get());
+ showDialog(args, skipAnimation, mPromptViewModelProvider.get());
}
/**
@@ -1199,7 +1197,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
return mFpEnrolledForUser.getOrDefault(userId, false);
}
- private void showDialog(SomeArgs args, boolean skipAnimation, Bundle savedState,
+ private void showDialog(SomeArgs args, boolean skipAnimation,
@Nullable PromptViewModel viewModel) {
mCurrentDialogArgs = args;
@@ -1239,7 +1237,6 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
if (DEBUG) {
Log.d(TAG, "userId: " + userId
- + " savedState: " + savedState
+ " mCurrentDialog: " + mCurrentDialog
+ " newDialog: " + newDialog);
}
@@ -1261,7 +1258,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
if (!promptInfo.isAllowBackgroundAuthentication() && !isOwnerInForeground()) {
cancelIfOwnerIsNotInForeground();
} else {
- mCurrentDialog.show(mWindowManager, savedState);
+ mCurrentDialog.show(mWindowManager);
}
}
@@ -1283,29 +1280,12 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
public void onConfigurationChanged(Configuration newConfig) {
updateSensorLocations();
- // Save the state of the current dialog (buttons showing, etc)
+ // TODO(b/287311775): consider removing this to retain the UI cleanly vs re-creating
if (mCurrentDialog != null) {
final PromptViewModel viewModel = mCurrentDialog.getViewModel();
- final Bundle savedState = new Bundle();
- mCurrentDialog.onSaveState(savedState);
mCurrentDialog.dismissWithoutCallback(false /* animate */);
mCurrentDialog = null;
-
- // Only show the dialog if necessary. If it was animating out, the dialog is supposed
- // to send its pending callback immediately.
- if (!savedState.getBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false)) {
- final boolean credentialShowing =
- savedState.getBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING);
- if (credentialShowing) {
- // There may be a cleaner way to do this, rather than altering the current
- // authentication's parameters. This gets the job done and should be clear
- // enough for now.
- PromptInfo promptInfo = (PromptInfo) mCurrentDialogArgs.arg1;
- promptInfo.setAuthenticators(Authenticators.DEVICE_CREDENTIAL);
- }
-
- showDialog(mCurrentDialogArgs, true /* skipAnimation */, savedState, viewModel);
- }
+ showDialog(mCurrentDialogArgs, true /* skipAnimation */, viewModel);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
index 3cfc6f280110..3fd488c34121 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
@@ -16,59 +16,20 @@
package com.android.systemui.biometrics;
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.hardware.biometrics.BiometricAuthenticator.Modality;
-import android.os.Bundle;
import android.view.WindowManager;
import com.android.systemui.Dumpable;
import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
/**
* Interface for the biometric dialog UI.
*
- * TODO(b/251476085): remove along with legacy controller once flag is removed
+ * TODO(b/287311775): remove along with legacy controller once flag is removed
*/
@Deprecated
public interface AuthDialog extends Dumpable {
- String KEY_CONTAINER_GOING_AWAY = "container_going_away";
- String KEY_BIOMETRIC_SHOWING = "biometric_showing";
- String KEY_CREDENTIAL_SHOWING = "credential_showing";
-
- String KEY_BIOMETRIC_CONFIRM_VISIBILITY = "confirm_visibility";
- String KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY = "try_agian_visibility";
- String KEY_BIOMETRIC_STATE = "state";
- String KEY_BIOMETRIC_INDICATOR_STRING = "indicator_string"; // error / help / hint
- String KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING = "error_is_temporary";
- String KEY_BIOMETRIC_INDICATOR_HELP_SHOWING = "hint_is_temporary";
- String KEY_BIOMETRIC_DIALOG_SIZE = "size";
-
- String KEY_BIOMETRIC_SENSOR_TYPE = "sensor_type";
- String KEY_BIOMETRIC_SENSOR_PROPS = "sensor_props";
-
- int SIZE_UNKNOWN = 0;
- /**
- * Minimal UI, showing only biometric icon.
- */
- int SIZE_SMALL = 1;
- /**
- * Normal-sized biometric UI, showing title, icon, buttons, etc.
- */
- int SIZE_MEDIUM = 2;
- /**
- * Full-screen credential UI.
- */
- int SIZE_LARGE = 3;
- @Retention(RetentionPolicy.SOURCE)
- @IntDef({SIZE_UNKNOWN, SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE})
- @interface DialogSize {}
-
/**
* Parameters used when laying out {@link AuthBiometricView}, its subclasses, and
* {@link AuthPanelController}.
@@ -84,27 +45,10 @@ public interface AuthDialog extends Dumpable {
}
/**
- * Animation duration, from small to medium dialog, including back panel, icon translation, etc
- */
- int ANIMATE_SMALL_TO_MEDIUM_DURATION_MS = 150;
- /**
- * Animation duration from medium to large dialog, including biometric fade out, back panel, etc
- */
- int ANIMATE_MEDIUM_TO_LARGE_DURATION_MS = 450;
- /**
- * Delay before notifying {@link AuthCredentialView} to start animating in.
- */
- int ANIMATE_CREDENTIAL_START_DELAY_MS = ANIMATE_MEDIUM_TO_LARGE_DURATION_MS * 2 / 3;
- /**
- * Animation duration when sliding in credential UI
- */
- int ANIMATE_CREDENTIAL_INITIAL_DURATION_MS = 150;
-
- /**
* Show the dialog.
* @param wm
*/
- void show(WindowManager wm, @Nullable Bundle savedState);
+ void show(WindowManager wm);
/**
* Dismiss the dialog without sending a callback.
@@ -146,12 +90,6 @@ public interface AuthDialog extends Dumpable {
void onPointerDown();
/**
- * Save the current state.
- * @param outState
- */
- void onSaveState(@NonNull Bundle outState);
-
- /**
* Get the client's package name
*/
String getOpPackageName();
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
index f56bb881d8b7..958213afacdf 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
@@ -24,7 +24,7 @@ import android.graphics.drawable.Drawable
import android.util.Log
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieCompositionFactory
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
private const val TAG = "AuthIconController"
@@ -76,7 +76,7 @@ abstract class AuthIconController(
}
/** Update the icon to reflect the [newState]. */
- fun updateState(@BiometricState lastState: Int, @BiometricState newState: Int) {
+ fun updateState(lastState: BiometricState, newState: BiometricState) {
if (deactivated) {
Log.w(TAG, "Ignoring updateState when deactivated: $newState")
} else {
@@ -85,7 +85,7 @@ abstract class AuthIconController(
}
/** Call during [updateState] if the controller is not [deactivated]. */
- abstract fun updateIcon(@BiometricState lastState: Int, @BiometricState newState: Int)
+ abstract fun updateIcon(lastState: BiometricState, newState: BiometricState)
/** Called during [onAnimationEnd] if the controller is not [deactivated]. */
open fun handleAnimationEnd(drawable: Drawable) {}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
index ea9fe5fce53e..141983ba548d 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
@@ -25,14 +25,14 @@ import android.hardware.biometrics.BiometricFingerprintConstants
import android.hardware.biometrics.BiometricSourceType
import android.util.DisplayMetrics
import androidx.annotation.VisibleForTesting
+import com.android.app.animation.Interpolators
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.keyguard.KeyguardUpdateMonitorCallback
import com.android.keyguard.logging.KeyguardLogger
import com.android.settingslib.Utils
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.CoreStartable
import com.android.systemui.R
-import com.android.app.animation.Interpolators
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
index 94b5fb2861b1..66fb8ca2832d 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
@@ -18,14 +18,22 @@ package com.android.systemui.biometrics
import android.animation.ValueAnimator
import android.graphics.PointF
import android.graphics.RectF
-import com.android.systemui.Dumpable
+import androidx.annotation.VisibleForTesting
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.repeatOnLifecycle
import com.android.app.animation.Interpolators
+import com.android.systemui.Dumpable
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
+import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionListener
-import com.android.systemui.shade.ShadeExpansionStateManager
+import com.android.systemui.statusbar.StatusBarState.SHADE
import com.android.systemui.statusbar.phone.SystemUIDialogManager
import com.android.systemui.util.ViewController
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.launch
import java.io.PrintWriter
/**
@@ -41,7 +49,7 @@ import java.io.PrintWriter
abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
view: T,
protected val statusBarStateController: StatusBarStateController,
- protected val shadeExpansionStateManager: ShadeExpansionStateManager,
+ protected val primaryBouncerInteractor: PrimaryBouncerInteractor,
protected val dialogManager: SystemUIDialogManager,
private val dumpManager: DumpManager
) : ViewController<T>(view), Dumpable {
@@ -54,14 +62,6 @@ abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
private var dialogAlphaAnimator: ValueAnimator? = null
private val dialogListener = SystemUIDialogManager.Listener { runDialogAlphaAnimator() }
- private val shadeExpansionListener = ShadeExpansionListener { event ->
- // Notification shade can be expanded but not visible (fraction: 0.0), for example
- // when a heads-up notification (HUN) is showing.
- notificationShadeVisible = event.expanded && event.fraction > 0f
- view.onExpansionChanged(event.fraction)
- updatePauseAuth()
- }
-
/** If the notification shade is visible. */
var notificationShadeVisible: Boolean = false
@@ -88,6 +88,30 @@ abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
view.updateAlpha()
}
+ init {
+ view.repeatWhenAttached {
+ // repeatOnLifecycle CREATED (as opposed to STARTED) because the Bouncer expansion
+ // can make the view not visible; and we still want to listen for events
+ // that may make the view visible again.
+ repeatOnLifecycle(Lifecycle.State.CREATED) {
+ listenForBouncerExpansion(this)
+ }
+ }
+ }
+
+ @VisibleForTesting
+ open suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
+ return scope.launch {
+ primaryBouncerInteractor.bouncerExpansion.map { 1f - it }.collect { expansion: Float ->
+ if (statusBarStateController.state != SHADE) {
+ notificationShadeVisible = expansion > 0f
+ view.onExpansionChanged(expansion)
+ updatePauseAuth()
+ }
+ }
+ }
+ }
+
fun runDialogAlphaAnimator() {
val hideAffordance = dialogManager.shouldHideAffordance()
dialogAlphaAnimator?.cancel()
@@ -108,15 +132,11 @@ abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
}
override fun onViewAttached() {
- val currentState =
- shadeExpansionStateManager.addExpansionListener(shadeExpansionListener)
- shadeExpansionListener.onPanelExpansionChanged(currentState)
dialogManager.registerListener(dialogListener)
dumpManager.registerDumpable(dumpTag, this)
}
override fun onViewDetached() {
- shadeExpansionStateManager.removeExpansionListener(shadeExpansionListener)
dialogManager.unregisterListener(dialogListener)
dumpManager.unregisterDumpable(dumpTag)
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
index 802eea300bd4..03749a9dc0df 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
@@ -15,9 +15,9 @@
*/
package com.android.systemui.biometrics
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.phone.SystemUIDialogManager
/**
@@ -26,13 +26,13 @@ import com.android.systemui.statusbar.phone.SystemUIDialogManager
class UdfpsBpViewController(
view: UdfpsBpView,
statusBarStateController: StatusBarStateController,
- shadeExpansionStateManager: ShadeExpansionStateManager,
+ primaryBouncerInteractor: PrimaryBouncerInteractor,
systemUIDialogManager: SystemUIDialogManager,
dumpManager: DumpManager
) : UdfpsAnimationViewController<UdfpsBpView>(
view,
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
systemUIDialogManager,
dumpManager
) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
index a36870346b9a..026435623042 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
@@ -60,6 +60,7 @@ import android.view.accessibility.AccessibilityManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.OptIn;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
@@ -67,11 +68,10 @@ import com.android.internal.logging.InstanceId;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.FaceAuthApiRequestReason;
import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
import com.android.systemui.Dumpable;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.biometrics.dagger.BiometricsBackground;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
import com.android.systemui.biometrics.udfps.InteractionEvent;
import com.android.systemui.biometrics.udfps.NormalizedTouchData;
import com.android.systemui.biometrics.udfps.SinglePointerTouchProcessor;
@@ -92,7 +92,6 @@ import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.systemui.statusbar.LockscreenShadeTransitionController;
import com.android.systemui.statusbar.VibratorHelper;
@@ -118,6 +117,8 @@ import java.util.concurrent.Executor;
import javax.inject.Inject;
import javax.inject.Provider;
+import kotlinx.coroutines.ExperimentalCoroutinesApi;
+
/**
* Shows and hides the under-display fingerprint sensor (UDFPS) overlay, handles UDFPS touch events,
* and toggles the UDFPS display mode.
@@ -149,7 +150,6 @@ public class UdfpsController implements DozeReceiver, Dumpable {
private final WindowManager mWindowManager;
private final DelayableExecutor mFgExecutor;
@NonNull private final Executor mBiometricExecutor;
- @NonNull private final ShadeExpansionStateManager mShadeExpansionStateManager;
@NonNull private final StatusBarStateController mStatusBarStateController;
@NonNull private final KeyguardStateController mKeyguardStateController;
@NonNull private final StatusBarKeyguardViewManager mKeyguardViewManager;
@@ -256,31 +256,53 @@ public class UdfpsController implements DozeReceiver, Dumpable {
@Override
public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
+ final int touchConfigId = mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_selected_udfps_touch_detection);
pw.println("mSensorProps=(" + mSensorProps + ")");
pw.println("Using new touch detection framework: " + mFeatureFlags.isEnabled(
Flags.UDFPS_NEW_TOUCH_DETECTION));
- pw.println("Using ellipse touch detection: " + mFeatureFlags.isEnabled(
- Flags.UDFPS_ELLIPSE_DETECTION));
+ pw.println("touchConfigId: " + touchConfigId);
}
public class UdfpsOverlayController extends IUdfpsOverlayController.Stub {
+ @OptIn(markerClass = ExperimentalCoroutinesApi.class)
@Override
public void showUdfpsOverlay(long requestId, int sensorId, int reason,
@NonNull IUdfpsOverlayControllerCallback callback) {
mFgExecutor.execute(() -> UdfpsController.this.showUdfpsOverlay(
- new UdfpsControllerOverlay(mContext, mFingerprintManager, mInflater,
- mWindowManager, mAccessibilityManager, mStatusBarStateController,
- mShadeExpansionStateManager, mKeyguardViewManager,
- mKeyguardUpdateMonitor, mDialogManager, mDumpManager,
- mLockscreenShadeTransitionController, mConfigurationController,
- mKeyguardStateController,
- mUnlockedScreenOffAnimationController,
- mUdfpsDisplayMode, mSecureSettings, requestId, reason, callback,
- (view, event, fromUdfpsView) -> onTouch(requestId, event,
- fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags,
- mPrimaryBouncerInteractor, mAlternateBouncerInteractor, mUdfpsUtils,
- mUdfpsKeyguardAccessibilityDelegate,
- mUdfpsKeyguardViewModels)));
+ new UdfpsControllerOverlay(
+ mContext,
+ mFingerprintManager,
+ mInflater,
+ mWindowManager,
+ mAccessibilityManager,
+ mStatusBarStateController,
+ mKeyguardViewManager,
+ mKeyguardUpdateMonitor,
+ mDialogManager,
+ mDumpManager,
+ mLockscreenShadeTransitionController,
+ mConfigurationController,
+ mKeyguardStateController,
+ mUnlockedScreenOffAnimationController,
+ mUdfpsDisplayMode,
+ mSecureSettings,
+ requestId,
+ reason,
+ callback,
+ (view, event, fromUdfpsView) -> onTouch(
+ requestId,
+ event,
+ fromUdfpsView
+ ),
+ mActivityLaunchAnimator,
+ mFeatureFlags,
+ mPrimaryBouncerInteractor,
+ mAlternateBouncerInteractor,
+ mUdfpsUtils,
+ mUdfpsKeyguardAccessibilityDelegate,
+ mUdfpsKeyguardViewModels
+ )));
}
@Override
@@ -814,7 +836,6 @@ public class UdfpsController implements DozeReceiver, Dumpable {
@NonNull WindowManager windowManager,
@NonNull StatusBarStateController statusBarStateController,
@Main DelayableExecutor fgExecutor,
- @NonNull ShadeExpansionStateManager shadeExpansionStateManager,
@NonNull StatusBarKeyguardViewManager statusBarKeyguardViewManager,
@NonNull DumpManager dumpManager,
@NonNull KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -859,7 +880,6 @@ public class UdfpsController implements DozeReceiver, Dumpable {
mFingerprintManager = checkNotNull(fingerprintManager);
mWindowManager = windowManager;
mFgExecutor = fgExecutor;
- mShadeExpansionStateManager = shadeExpansionStateManager;
mStatusBarStateController = statusBarStateController;
mKeyguardStateController = keyguardStateController;
mKeyguardViewManager = statusBarKeyguardViewManager;
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
index d6ef94d18e71..941df687ead9 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
@@ -46,10 +46,9 @@ import android.view.accessibility.AccessibilityManager.TouchExplorationStateChan
import androidx.annotation.LayoutRes
import androidx.annotation.VisibleForTesting
import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
-import com.android.settingslib.udfps.UdfpsUtils
import com.android.systemui.R
import com.android.systemui.animation.ActivityLaunchAnimator
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.biometrics.ui.controller.UdfpsKeyguardViewController
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
@@ -60,7 +59,6 @@ import com.android.systemui.flags.Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS
import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.LockscreenShadeTransitionController
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
import com.android.systemui.statusbar.phone.SystemUIDialogManager
@@ -90,7 +88,6 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
private val windowManager: WindowManager,
private val accessibilityManager: AccessibilityManager,
private val statusBarStateController: StatusBarStateController,
- private val shadeExpansionStateManager: ShadeExpansionStateManager,
private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager,
private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
private val dialogManager: SystemUIDialogManager,
@@ -245,7 +242,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
updateAccessibilityViewLocation(sensorBounds)
},
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
dialogManager,
dumpManager
)
@@ -256,7 +253,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
UdfpsKeyguardViewController(
view.addUdfpsView(R.layout.udfps_keyguard_view),
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
dialogManager,
dumpManager,
alternateBouncerInteractor,
@@ -268,7 +265,6 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
updateSensorLocation(sensorBounds)
},
statusBarStateController,
- shadeExpansionStateManager,
statusBarKeyguardViewManager,
keyguardUpdateMonitor,
dumpManager,
@@ -291,7 +287,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
UdfpsBpViewController(
view.addUdfpsView(R.layout.udfps_bp_view),
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
dialogManager,
dumpManager
)
@@ -301,7 +297,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
UdfpsFpmEmptyViewController(
view.addUdfpsView(R.layout.udfps_fpm_empty_view),
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
dialogManager,
dumpManager
)
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
index d122d64aab2c..88002e7b8492 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
@@ -15,9 +15,9 @@
*/
package com.android.systemui.biometrics
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.phone.SystemUIDialogManager
/**
@@ -28,13 +28,13 @@ import com.android.systemui.statusbar.phone.SystemUIDialogManager
class UdfpsFpmEmptyViewController(
view: UdfpsFpmEmptyView,
statusBarStateController: StatusBarStateController,
- shadeExpansionStateManager: ShadeExpansionStateManager,
+ primaryBouncerInteractor: PrimaryBouncerInteractor,
systemUIDialogManager: SystemUIDialogManager,
dumpManager: DumpManager
) : UdfpsAnimationViewController<UdfpsFpmEmptyView>(
view,
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
systemUIDialogManager,
dumpManager
) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
index e3fd3ce1bcbf..84a746ca2b8f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
@@ -37,8 +37,6 @@ import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionListener
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.LockscreenShadeTransitionController
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.notification.stack.StackStateAnimator
@@ -55,11 +53,9 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
/** Class that coordinates non-HBM animations during keyguard authentication. */
-open class UdfpsKeyguardViewControllerLegacy
-constructor(
+open class UdfpsKeyguardViewControllerLegacy(
private val view: UdfpsKeyguardViewLegacy,
statusBarStateController: StatusBarStateController,
- shadeExpansionStateManager: ShadeExpansionStateManager,
private val keyguardViewManager: StatusBarKeyguardViewManager,
private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
dumpManager: DumpManager,
@@ -71,14 +67,14 @@ constructor(
private val udfpsController: UdfpsController,
private val activityLaunchAnimator: ActivityLaunchAnimator,
featureFlags: FeatureFlags,
- private val primaryBouncerInteractor: PrimaryBouncerInteractor,
+ primaryBouncerInteractor: PrimaryBouncerInteractor,
private val alternateBouncerInteractor: AlternateBouncerInteractor,
private val udfpsKeyguardAccessibilityDelegate: UdfpsKeyguardAccessibilityDelegate,
) :
UdfpsAnimationViewController<UdfpsKeyguardViewLegacy>(
view,
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
systemUIDialogManager,
dumpManager,
),
@@ -159,17 +155,6 @@ constructor(
}
}
- private val shadeExpansionListener = ShadeExpansionListener { (fraction) ->
- panelExpansionFraction =
- if (keyguardViewManager.isPrimaryBouncerInTransit) {
- aboutToShowBouncerProgress(fraction)
- } else {
- fraction
- }
- updateAlpha()
- updatePauseAuth()
- }
-
private val keyguardStateControllerCallback: KeyguardStateController.Callback =
object : KeyguardStateController.Callback {
override fun onUnlockedChanged() {
@@ -262,10 +247,17 @@ constructor(
}
@VisibleForTesting
- suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
+ override suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
return scope.launch {
primaryBouncerInteractor.bouncerExpansion.collect { bouncerExpansion: Float ->
inputBouncerExpansion = bouncerExpansion
+
+ panelExpansionFraction =
+ if (keyguardViewManager.isPrimaryBouncerInTransit) {
+ aboutToShowBouncerProgress(1f - bouncerExpansion)
+ } else {
+ 1f - bouncerExpansion
+ }
updateAlpha()
updatePauseAuth()
}
@@ -295,8 +287,6 @@ constructor(
qsExpansion = keyguardViewManager.qsExpansion
keyguardViewManager.addCallback(statusBarKeyguardViewManagerCallback)
configurationController.addCallback(configurationListener)
- val currentState = shadeExpansionStateManager.addExpansionListener(shadeExpansionListener)
- shadeExpansionListener.onPanelExpansionChanged(currentState)
updateScaleFactor()
view.updatePadding()
updateAlpha()
@@ -321,7 +311,6 @@ constructor(
keyguardViewManager.removeOccludingAppBiometricUI(occludingAppBiometricUI)
keyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false)
configurationController.removeCallback(configurationListener)
- shadeExpansionStateManager.removeExpansionListener(shadeExpansionListener)
if (lockScreenShadeTransitionController.mUdfpsKeyguardViewControllerLegacy === this) {
lockScreenShadeTransitionController.mUdfpsKeyguardViewControllerLegacy = null
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
index 06dee7a2b9f6..54e62154bca3 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
@@ -26,8 +26,8 @@ import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
import android.widget.FrameLayout
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.R
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.doze.DozeReceiver
private const val TAG = "UdfpsView"
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
index 53dc0e3d4846..f2d4f8912c3f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
@@ -16,7 +16,10 @@
package com.android.systemui.biometrics.dagger
-import com.android.settingslib.udfps.UdfpsUtils
+import com.android.systemui.biometrics.UdfpsUtils
+import android.content.res.Resources
+import com.android.internal.R
+import com.android.systemui.biometrics.EllipseOverlapDetectorParams
import com.android.systemui.biometrics.data.repository.FacePropertyRepository
import com.android.systemui.biometrics.data.repository.FacePropertyRepositoryImpl
import com.android.systemui.biometrics.data.repository.FaceSettingsRepository
@@ -25,18 +28,21 @@ import com.android.systemui.biometrics.data.repository.FingerprintPropertyReposi
import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepositoryImpl
import com.android.systemui.biometrics.data.repository.PromptRepository
import com.android.systemui.biometrics.data.repository.PromptRepositoryImpl
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepositoryImpl
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.data.repository.DisplayStateRepositoryImpl
import com.android.systemui.biometrics.domain.interactor.CredentialInteractor
import com.android.systemui.biometrics.domain.interactor.CredentialInteractorImpl
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.biometrics.domain.interactor.LogContextInteractor
import com.android.systemui.biometrics.domain.interactor.LogContextInteractorImpl
-import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractor
-import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractorImpl
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
+import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractor
+import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractorImpl
+import com.android.systemui.biometrics.udfps.BoundingBoxOverlapDetector
+import com.android.systemui.biometrics.udfps.EllipseOverlapDetector
+import com.android.systemui.biometrics.udfps.OverlapDetector
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.util.concurrency.ThreadFactory
import dagger.Binds
@@ -63,16 +69,19 @@ interface BiometricsModule {
@Binds
@SysUISingleton
- fun fingerprintRepository(impl: FingerprintPropertyRepositoryImpl):
- FingerprintPropertyRepository
+ fun fingerprintRepository(
+ impl: FingerprintPropertyRepositoryImpl
+ ): FingerprintPropertyRepository
+
@Binds
@SysUISingleton
- fun rearDisplayStateRepository(impl: RearDisplayStateRepositoryImpl): RearDisplayStateRepository
+ fun displayStateRepository(impl: DisplayStateRepositoryImpl): DisplayStateRepository
@Binds
@SysUISingleton
- fun providesPromptSelectorInteractor(impl: PromptSelectorInteractorImpl):
- PromptSelectorInteractor
+ fun providesPromptSelectorInteractor(
+ impl: PromptSelectorInteractorImpl
+ ): PromptSelectorInteractor
@Binds
@SysUISingleton
@@ -88,8 +97,9 @@ interface BiometricsModule {
@Binds
@SysUISingleton
- fun providesSideFpsOverlayInteractor(impl: SideFpsOverlayInteractorImpl):
- SideFpsOverlayInteractor
+ fun providesSideFpsOverlayInteractor(
+ impl: SideFpsOverlayInteractorImpl
+ ): SideFpsOverlayInteractor
companion object {
/** Background [Executor] for HAL related operations. */
@@ -102,6 +112,30 @@ interface BiometricsModule {
@Provides
fun providesUdfpsUtils(): UdfpsUtils = UdfpsUtils()
+
+ @Provides
+ @SysUISingleton
+ fun providesOverlapDetector(): OverlapDetector {
+ val selectedOption =
+ Resources.getSystem().getInteger(R.integer.config_selected_udfps_touch_detection)
+ val values =
+ Resources.getSystem()
+ .getStringArray(R.array.config_udfps_touch_detection_options)[selectedOption]
+ .split(",")
+ .map { it.toFloat() }
+
+ return if (values[0] == 1f) {
+ EllipseOverlapDetector(
+ EllipseOverlapDetectorParams(
+ minOverlap = values[3],
+ targetSize = values[2],
+ stepSize = values[4].toInt()
+ )
+ )
+ } else {
+ BoundingBoxOverlapDetector(values[2])
+ }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt
deleted file mode 100644
index f7f910391566..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt
+++ /dev/null
@@ -1,66 +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.biometrics.dagger
-
-import android.content.res.Resources
-import com.android.internal.R
-import com.android.systemui.biometrics.EllipseOverlapDetectorParams
-import com.android.systemui.biometrics.udfps.BoundingBoxOverlapDetector
-import com.android.systemui.biometrics.udfps.EllipseOverlapDetector
-import com.android.systemui.biometrics.udfps.OverlapDetector
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
-import dagger.Module
-import dagger.Provides
-
-/** Dagger module for all things UDFPS. TODO(b/260558624): Move to BiometricsModule. */
-@Module
-interface UdfpsModule {
- companion object {
-
- @Provides
- @SysUISingleton
- fun providesOverlapDetector(featureFlags: FeatureFlags): OverlapDetector {
- if (featureFlags.isEnabled(Flags.UDFPS_ELLIPSE_DETECTION)) {
- val selectedOption =
- Resources.getSystem()
- .getInteger(R.integer.config_selected_udfps_touch_detection)
- val values =
- Resources.getSystem()
- .getStringArray(R.array.config_udfps_touch_detection_options)[
- selectedOption]
- .split(",")
- .map { it.toFloat() }
-
- return if (values[0] == 1f) {
- EllipseOverlapDetector(
- EllipseOverlapDetectorParams(
- minOverlap = values[3],
- targetSize = values[2],
- stepSize = values[4].toInt()
- )
- )
- } else {
- BoundingBoxOverlapDetector(values[2])
- }
- } else {
- return BoundingBoxOverlapDetector(1f)
- }
- }
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
index d17d961b5279..7a9efcf78999 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
@@ -18,7 +18,14 @@ package com.android.systemui.biometrics.data.repository
import android.content.Context
import android.hardware.devicestate.DeviceStateManager
+import android.hardware.display.DisplayManager
+import android.hardware.display.DisplayManager.DisplayListener
+import android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CHANGED
+import android.os.Handler
+import android.view.DisplayInfo
import com.android.internal.util.ArrayUtils
+import com.android.systemui.biometrics.shared.model.DisplayRotation
+import com.android.systemui.biometrics.shared.model.toDisplayRotation
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
@@ -32,21 +39,26 @@ import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
-/** Provide current rear display state. */
-interface RearDisplayStateRepository {
+/** Repository for the current state of the display */
+interface DisplayStateRepository {
/** Provides the current rear display state. */
val isInRearDisplayMode: StateFlow<Boolean>
+
+ /** Provides the current display rotation */
+ val currentRotation: StateFlow<DisplayRotation>
}
@SysUISingleton
-class RearDisplayStateRepositoryImpl
+class DisplayStateRepositoryImpl
@Inject
constructor(
@Application applicationScope: CoroutineScope,
- @Application context: Context,
+ @Application val context: Context,
deviceStateManager: DeviceStateManager,
+ displayManager: DisplayManager,
+ @Main handler: Handler,
@Main mainExecutor: Executor
-) : RearDisplayStateRepository {
+) : DisplayStateRepository {
override val isInRearDisplayMode: StateFlow<Boolean> =
conflatedCallbackFlow {
val sendRearDisplayStateUpdate = { state: Boolean ->
@@ -79,7 +91,43 @@ constructor(
initialValue = false,
)
+ private fun getDisplayRotation(): DisplayRotation {
+ val cachedDisplayInfo = DisplayInfo()
+ context.display?.getDisplayInfo(cachedDisplayInfo)
+ return cachedDisplayInfo.rotation.toDisplayRotation()
+ }
+
+ override val currentRotation: StateFlow<DisplayRotation> =
+ conflatedCallbackFlow {
+ val callback =
+ object : DisplayListener {
+ override fun onDisplayRemoved(displayId: Int) {}
+
+ override fun onDisplayAdded(displayId: Int) {}
+
+ override fun onDisplayChanged(displayId: Int) {
+ val rotation = getDisplayRotation()
+ trySendWithFailureLogging(
+ rotation,
+ TAG,
+ "Error sending display rotation to $rotation"
+ )
+ }
+ }
+ displayManager.registerDisplayListener(
+ callback,
+ handler,
+ EVENT_FLAG_DISPLAY_CHANGED
+ )
+ awaitClose { displayManager.unregisterDisplayListener(callback) }
+ }
+ .stateIn(
+ applicationScope,
+ started = SharingStarted.Eagerly,
+ initialValue = getDisplayRotation(),
+ )
+
companion object {
- const val TAG = "RearDisplayStateRepositoryImpl"
+ const val TAG = "DisplayStateRepositoryImpl"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
index 26b6f2a7a3cc..f36a3ec89e3f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
@@ -18,13 +18,17 @@ package com.android.systemui.biometrics.domain.interactor
import android.content.Context
import android.content.res.Configuration
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
+import android.view.Display
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.shared.model.DisplayRotation
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.display.data.repository.DisplayRepository
import com.android.systemui.unfold.compat.ScreenSizeFoldProvider
import com.android.systemui.unfold.updates.FoldProvider
+import com.android.systemui.util.kotlin.sample
import java.util.concurrent.Executor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -32,10 +36,14 @@ import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
/** Aggregates display state information. */
interface DisplayStateInteractor {
+ /** Whether the default display is currently off. */
+ val isDefaultDisplayOff: Flow<Boolean>
/** Whether the device is currently in rear display mode. */
val isInRearDisplayMode: StateFlow<Boolean>
@@ -43,6 +51,9 @@ interface DisplayStateInteractor {
/** Whether the device is currently folded. */
val isFolded: Flow<Boolean>
+ /** Current rotation of the display */
+ val currentRotation: StateFlow<DisplayRotation>
+
/** Called on configuration changes, used to keep the display state in sync */
fun onConfigurationChanged(newConfig: Configuration)
}
@@ -54,7 +65,8 @@ constructor(
@Application applicationScope: CoroutineScope,
@Application context: Context,
@Main mainExecutor: Executor,
- rearDisplayStateRepository: RearDisplayStateRepository,
+ displayStateRepository: DisplayStateRepository,
+ displayRepository: DisplayRepository,
) : DisplayStateInteractor {
private var screenSizeFoldProvider: ScreenSizeFoldProvider = ScreenSizeFoldProvider(context)
@@ -90,12 +102,26 @@ constructor(
)
override val isInRearDisplayMode: StateFlow<Boolean> =
- rearDisplayStateRepository.isInRearDisplayMode
+ displayStateRepository.isInRearDisplayMode
+
+ override val currentRotation: StateFlow<DisplayRotation> =
+ displayStateRepository.currentRotation
override fun onConfigurationChanged(newConfig: Configuration) {
screenSizeFoldProvider.onConfigurationChange(newConfig)
}
+ private val defaultDisplay =
+ displayRepository.displays.map { displays ->
+ displays.firstOrNull { it.displayId == Display.DEFAULT_DISPLAY }
+ }
+
+ override val isDefaultDisplayOff =
+ displayRepository.displayChangeEvent
+ .filter { it == Display.DEFAULT_DISPLAY }
+ .sample(defaultDisplay)
+ .map { it?.state == Display.STATE_OFF }
+
companion object {
private const val TAG = "DisplayStateInteractor"
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
index a6ad24e47edb..65a2c0a2490f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
@@ -23,9 +23,9 @@ import com.android.systemui.biometrics.Utils.getCredentialType
import com.android.systemui.biometrics.Utils.isDeviceCredentialAllowed
import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepository
import com.android.systemui.biometrics.data.repository.PromptRepository
-import com.android.systemui.biometrics.domain.model.BiometricModalities
import com.android.systemui.biometrics.domain.model.BiometricOperationInfo
import com.android.systemui.biometrics.domain.model.BiometricPromptRequest
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricUserInfo
import com.android.systemui.biometrics.shared.model.FingerprintSensorType
import com.android.systemui.biometrics.shared.model.PromptKind
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
index 9a0792ee7923..2a1047ac6f76 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
@@ -18,8 +18,8 @@ package com.android.systemui.biometrics.domain.interactor
import android.view.MotionEvent
import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.biometrics.AuthController
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
index a3ee220d3c3f..8fbb25040f50 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
@@ -1,6 +1,7 @@
package com.android.systemui.biometrics.domain.model
import android.hardware.biometrics.PromptInfo
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricUserInfo
/**
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt
new file mode 100644
index 000000000000..10a3e915fe80
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt
@@ -0,0 +1,21 @@
+package com.android.systemui.biometrics.shared.model
+
+import android.view.Surface
+
+/** Shadows [Surface.Rotation] for kotlin use within SysUI. */
+enum class DisplayRotation {
+ ROTATION_0,
+ ROTATION_90,
+ ROTATION_180,
+ ROTATION_270,
+}
+
+/** Converts [Surface.Rotation] to corresponding [DisplayRotation] */
+fun Int.toDisplayRotation(): DisplayRotation =
+ when (this) {
+ Surface.ROTATION_0 -> DisplayRotation.ROTATION_0
+ Surface.ROTATION_90 -> DisplayRotation.ROTATION_90
+ Surface.ROTATION_180 -> DisplayRotation.ROTATION_180
+ Surface.ROTATION_270 -> DisplayRotation.ROTATION_270
+ else -> throw IllegalArgumentException("Invalid DisplayRotation value: $this")
+ }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
index 416fc64e69a3..a97e2dc42607 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
@@ -17,7 +17,6 @@
package com.android.systemui.biometrics.shared.model
import com.android.systemui.biometrics.Utils
-import com.android.systemui.biometrics.domain.model.BiometricModalities
// TODO(b/251476085): this should eventually replace Utils.CredentialType
/** Credential options for biometric prompt. Shadows [Utils.CredentialType]. */
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
index eeb0f4c7bb13..83b3380ae6be 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
@@ -21,7 +21,7 @@ import android.util.RotationUtils
import android.view.MotionEvent
import android.view.MotionEvent.INVALID_POINTER_ID
import android.view.Surface
-import com.android.settingslib.udfps.UdfpsOverlayParams
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.biometrics.udfps.TouchProcessorResult.Failure
import com.android.systemui.biometrics.udfps.TouchProcessorResult.ProcessedTouch
import com.android.systemui.dagger.SysUISingleton
@@ -41,7 +41,6 @@ class SinglePointerTouchProcessor @Inject constructor(val overlapDetector: Overl
previousPointerOnSensorId: Int,
overlayParams: UdfpsOverlayParams,
): TouchProcessorResult {
-
fun preprocess(): PreprocessedTouch {
val touchData = List(event.pointerCount) { event.normalize(it, overlayParams) }
val pointersOnSensor =
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
index 4bf0ef69a4f9..78e1dc0b0047 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
@@ -17,7 +17,7 @@
package com.android.systemui.biometrics.udfps
import android.view.MotionEvent
-import com.android.settingslib.udfps.UdfpsOverlayParams
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
/**
* Determines whether a finger entered or left the area of the under-display fingerprint sensor
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 b1439fd7421d..02847c283738 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
@@ -23,7 +23,6 @@ import android.hardware.biometrics.BiometricAuthenticator
import android.hardware.biometrics.BiometricConstants
import android.hardware.biometrics.BiometricPrompt
import android.hardware.face.FaceManager
-import android.os.Bundle
import android.text.method.ScrollingMovementMethod
import android.util.Log
import android.view.HapticFeedbackConstants
@@ -43,12 +42,9 @@ import com.android.systemui.R
import com.android.systemui.biometrics.AuthBiometricFaceIconController
import com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceIconController
import com.android.systemui.biometrics.AuthBiometricFingerprintIconController
-import com.android.systemui.biometrics.AuthBiometricView
-import com.android.systemui.biometrics.AuthBiometricView.Callback
-import com.android.systemui.biometrics.AuthBiometricViewAdapter
import com.android.systemui.biometrics.AuthIconController
import com.android.systemui.biometrics.AuthPanelController
-import com.android.systemui.biometrics.domain.model.BiometricModalities
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricModality
import com.android.systemui.biometrics.shared.model.PromptKind
import com.android.systemui.biometrics.shared.model.asBiometricModality
@@ -63,7 +59,6 @@ import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.statusbar.VibratorHelper
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
-import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
@@ -83,11 +78,11 @@ object BiometricViewBinder {
panelViewController: AuthPanelController,
jankListener: BiometricJankListener,
backgroundView: View,
- legacyCallback: Callback,
+ legacyCallback: Spaghetti.Callback,
applicationScope: CoroutineScope,
vibratorHelper: VibratorHelper,
featureFlags: FeatureFlags,
- ): AuthBiometricViewAdapter {
+ ): Spaghetti {
val accessibilityManager = view.context.getSystemService(AccessibilityManager::class.java)!!
val textColorError =
@@ -141,24 +136,20 @@ object BiometricViewBinder {
subtitleView.text = viewModel.subtitle.first()
// set button listeners
- negativeButton.setOnClickListener {
- legacyCallback.onAction(Callback.ACTION_BUTTON_NEGATIVE)
- }
- cancelButton.setOnClickListener {
- legacyCallback.onAction(Callback.ACTION_USER_CANCELED)
- }
+ negativeButton.setOnClickListener { legacyCallback.onButtonNegative() }
+ cancelButton.setOnClickListener { legacyCallback.onUserCanceled() }
credentialFallbackButton.setOnClickListener {
viewModel.onSwitchToCredential()
- legacyCallback.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL)
+ legacyCallback.onUseDeviceCredential()
}
confirmationButton.setOnClickListener { viewModel.confirmAuthenticated() }
retryButton.setOnClickListener {
viewModel.showAuthenticating(isRetry = true)
- legacyCallback.onAction(Callback.ACTION_BUTTON_TRY_AGAIN)
+ legacyCallback.onButtonTryAgain()
}
// TODO(b/251476085): migrate legacy icon controllers and remove
- var legacyState: Int = viewModel.legacyState.value
+ var legacyState = viewModel.legacyState.value
val iconController =
modalities.asIconController(
view.context,
@@ -219,7 +210,7 @@ object BiometricViewBinder {
oldMode == FingerprintStartMode.Pending &&
newMode == FingerprintStartMode.Delayed
) {
- legacyCallback.onAction(Callback.ACTION_START_DELAYED_FINGERPRINT_SENSOR)
+ legacyCallback.onStartDelayedFingerprintSensor()
}
if (newMode.isStarted) {
@@ -246,7 +237,7 @@ object BiometricViewBinder {
.collect { dismissOnClick ->
backgroundView.setOnClickListener {
if (dismissOnClick) {
- legacyCallback.onAction(Callback.ACTION_USER_CANCELED)
+ legacyCallback.onUserCanceled()
} else {
Log.w(TAG, "Ignoring background click")
}
@@ -261,6 +252,18 @@ object BiometricViewBinder {
}
}
+ // set padding
+ launch {
+ viewModel.promptPadding.collect { promptPadding ->
+ view.setPadding(
+ promptPadding.left,
+ promptPadding.top,
+ promptPadding.right,
+ promptPadding.bottom
+ )
+ }
+ }
+
// configure & hide/disable buttons
launch {
viewModel.credentialKind
@@ -360,13 +363,11 @@ object BiometricViewBinder {
launch {
delay(authState.delay)
- legacyCallback.onAction(
- if (authState.isAuthenticatedAndExplicitlyConfirmed) {
- Callback.ACTION_AUTHENTICATED_AND_CONFIRMED
- } else {
- Callback.ACTION_AUTHENTICATED
- }
- )
+ if (authState.isAuthenticatedAndExplicitlyConfirmed) {
+ legacyCallback.onAuthenticatedAndConfirmed()
+ } else {
+ legacyCallback.onAuthenticated()
+ }
}
}
}
@@ -428,21 +429,50 @@ object BiometricViewBinder {
* the view model (which will be retained) via the application scope.
*
* Do not reference the [view] for anything other than [asView].
- *
- * TODO(b/251476085): remove after replacing AuthContainerView
*/
-private class Spaghetti(
+@Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+class Spaghetti(
private val view: View,
private val viewModel: PromptViewModel,
private val applicationContext: Context,
private val applicationScope: CoroutineScope,
-) : AuthBiometricViewAdapter {
+) {
+
+ @Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+ interface Callback {
+ fun onAuthenticated()
+ fun onUserCanceled()
+ fun onButtonNegative()
+ fun onButtonTryAgain()
+ fun onError()
+ fun onUseDeviceCredential()
+ fun onStartDelayedFingerprintSensor()
+ fun onAuthenticatedAndConfirmed()
+ }
+
+ @Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+ enum class BiometricState {
+ /** Authentication hardware idle. */
+ STATE_IDLE,
+ /** UI animating in, authentication hardware active. */
+ STATE_AUTHENTICATING_ANIMATING_IN,
+ /** UI animated in, authentication hardware active. */
+ STATE_AUTHENTICATING,
+ /** UI animated in, authentication hardware active. */
+ STATE_HELP,
+ /** Hard error, e.g. ERROR_TIMEOUT. Authentication hardware idle. */
+ STATE_ERROR,
+ /** Authenticated, waiting for user confirmation. Authentication hardware idle. */
+ STATE_PENDING_CONFIRMATION,
+ /** Authenticated, dialog animating away soon. */
+ STATE_AUTHENTICATED,
+ }
private var lifecycleScope: CoroutineScope? = null
private var modalities: BiometricModalities = BiometricModalities()
private var legacyCallback: Callback? = null
- override var legacyIconController: AuthIconController? = null
+ var legacyIconController: AuthIconController? = null
private set
// hacky way to suppress lockout errors
@@ -478,7 +508,7 @@ private class Spaghetti(
)
}
- override fun onDialogAnimatedIn(fingerprintWasStarted: Boolean) {
+ fun onDialogAnimatedIn(fingerprintWasStarted: Boolean) {
if (fingerprintWasStarted) {
viewModel.ensureFingerprintHasStarted(isDelayed = false)
viewModel.showAuthenticating(modalities.asDefaultHelpMessage(applicationContext))
@@ -487,7 +517,7 @@ private class Spaghetti(
}
}
- override fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int) {
+ fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int) {
applicationScope.launch {
val authenticatedModality = modality.asBiometricModality()
val msgId = getHelpForSuccessfulAuthentication(authenticatedModality)
@@ -511,7 +541,7 @@ private class Spaghetti(
else -> null
}
- override fun onAuthenticationFailed(
+ fun onAuthenticationFailed(
@BiometricAuthenticator.Modality modality: Int,
failureReason: String,
) {
@@ -533,7 +563,7 @@ private class Spaghetti(
}
}
- override fun onError(modality: Int, error: String) {
+ fun onError(modality: Int, error: String) {
val errorModality = modality.asBiometricModality()
if (ignoreUnsuccessfulEventsFrom(errorModality, error)) {
return
@@ -546,11 +576,11 @@ private class Spaghetti(
authenticateAfterError = modalities.hasFingerprint,
)
delay(BiometricPrompt.HIDE_DIALOG_DELAY.toLong())
- legacyCallback?.onAction(Callback.ACTION_ERROR)
+ legacyCallback?.onError()
}
}
- override fun onHelp(modality: Int, help: String) {
+ fun onHelp(modality: Int, help: String) {
if (ignoreUnsuccessfulEventsFrom(modality.asBiometricModality(), "")) {
return
}
@@ -574,36 +604,20 @@ private class Spaghetti(
else -> false
}
- override fun startTransitionToCredentialUI(isError: Boolean) {
+ fun startTransitionToCredentialUI(isError: Boolean) {
applicationScope.launch {
viewModel.onSwitchToCredential()
- legacyCallback?.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL)
+ legacyCallback?.onUseDeviceCredential()
}
}
- override fun requestLayout() {
- // nothing, for legacy view...
- }
-
- override fun restoreState(bundle: Bundle?) {
- // nothing, for legacy view...
- }
-
- override fun onSaveState(bundle: Bundle?) {
- // nothing, for legacy view...
- }
-
- override fun onOrientationChanged() {
- // nothing, for legacy view...
- }
-
- override fun cancelAnimation() {
+ fun cancelAnimation() {
view.animate()?.cancel()
}
- override fun isCoex() = modalities.hasFaceAndFingerprint
+ fun isCoex() = modalities.hasFaceAndFingerprint
- override fun asView() = view
+ fun asView() = view
}
private fun BiometricModalities.asDefaultHelpMessage(context: Context): String =
@@ -638,7 +652,7 @@ private class HackyCoexIconController(
iconViewOverlay: LottieAnimationView,
) : AuthBiometricFingerprintAndFaceIconController(context, iconView, iconViewOverlay) {
- private var state: Int? = null
+ private var state: Spaghetti.BiometricState? = null
private val faceController = AuthBiometricFaceIconController(context, iconView)
var faceMode: Boolean = true
@@ -649,11 +663,14 @@ private class HackyCoexIconController(
faceController.deactivated = !value
iconView.setImageIcon(null)
iconViewOverlay.setImageIcon(null)
- state?.let { updateIcon(AuthBiometricView.STATE_IDLE, it) }
+ state?.let { updateIcon(Spaghetti.BiometricState.STATE_IDLE, it) }
}
}
- override fun updateIcon(lastState: Int, newState: Int) {
+ override fun updateIcon(
+ lastState: Spaghetti.BiometricState,
+ newState: Spaghetti.BiometricState,
+ ) {
if (deactivated) {
return
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
index 370b36bcaec2..b9af03166fed 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
@@ -31,7 +31,6 @@ import androidx.core.view.doOnLayout
import androidx.core.view.isGone
import androidx.lifecycle.lifecycleScope
import com.android.systemui.R
-import com.android.systemui.biometrics.AuthDialog
import com.android.systemui.biometrics.AuthPanelController
import com.android.systemui.biometrics.Utils
import com.android.systemui.biometrics.ui.BiometricPromptLayout
@@ -47,6 +46,10 @@ import kotlinx.coroutines.launch
/** Helper for [BiometricViewBinder] to handle resize transitions. */
object BiometricViewSizeBinder {
+ private const val ANIMATE_SMALL_TO_MEDIUM_DURATION_MS = 150
+ // TODO(b/201510778): make private when related misuse is fixed
+ const val ANIMATE_MEDIUM_TO_LARGE_DURATION_MS = 450
+
/** Resizes [BiometricPromptLayout] and the [panelViewController] via the [PromptViewModel]. */
fun bind(
view: BiometricPromptLayout,
@@ -134,7 +137,7 @@ object BiometricViewSizeBinder {
)
}
size.isMedium && currentSize.isSmall -> {
- val duration = AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS
+ val duration = ANIMATE_SMALL_TO_MEDIUM_DURATION_MS
panelViewController.updateForContentDimensions(
width,
height,
@@ -165,7 +168,7 @@ object BiometricViewSizeBinder {
)
}
size.isLarge -> {
- val duration = AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS
+ val duration = ANIMATE_MEDIUM_TO_LARGE_DURATION_MS
panelViewController.setUseFullScreen(true)
panelViewController.updateForContentDimensions(
panelViewController.containerWidth,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
index 25fe61916644..931946aaa382 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
@@ -9,7 +9,6 @@ import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
import com.android.app.animation.Interpolators
import com.android.systemui.R
-import com.android.systemui.biometrics.AuthDialog
import com.android.systemui.biometrics.AuthPanelController
import com.android.systemui.biometrics.ui.CredentialPasswordView
import com.android.systemui.biometrics.ui.CredentialPatternView
@@ -22,6 +21,8 @@ import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
+private const val ANIMATE_CREDENTIAL_INITIAL_DURATION_MS = 150
+
/**
* View binder for all credential variants of BiometricPrompt, including [CredentialPatternView] and
* [CredentialPasswordView].
@@ -147,7 +148,7 @@ private fun View.animateCredentialViewIn() {
postOnAnimation {
animate()
.translationY(0f)
- .setDuration(AuthDialog.ANIMATE_CREDENTIAL_INITIAL_DURATION_MS.toLong())
+ .setDuration(ANIMATE_CREDENTIAL_INITIAL_DURATION_MS.toLong())
.alpha(1f)
.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
.withLayer()
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
index c9b1624d4d50..6f4e1a3cae46 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
@@ -19,11 +19,11 @@ package com.android.systemui.biometrics.ui.controller
import com.android.systemui.biometrics.UdfpsAnimationViewController
import com.android.systemui.biometrics.UdfpsKeyguardView
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.phone.SystemUIDialogManager
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -32,7 +32,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
open class UdfpsKeyguardViewController(
val view: UdfpsKeyguardView,
statusBarStateController: StatusBarStateController,
- shadeExpansionStateManager: ShadeExpansionStateManager,
+ primaryBouncerInteractor: PrimaryBouncerInteractor,
systemUIDialogManager: SystemUIDialogManager,
dumpManager: DumpManager,
private val alternateBouncerInteractor: AlternateBouncerInteractor,
@@ -41,7 +41,7 @@ open class UdfpsKeyguardViewController(
UdfpsAnimationViewController<UdfpsKeyguardView>(
view,
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
systemUIDialogManager,
dumpManager,
),
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
index be08932cfa64..267afae118e6 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
@@ -15,16 +15,21 @@
*/
package com.android.systemui.biometrics.ui.viewmodel
+import android.content.Context
+import android.graphics.Rect
import android.hardware.biometrics.BiometricPrompt
import android.util.Log
import android.view.HapticFeedbackConstants
import android.view.MotionEvent
-import com.android.systemui.biometrics.AuthBiometricView
+import com.android.systemui.biometrics.Utils
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
-import com.android.systemui.biometrics.domain.model.BiometricModalities
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricModality
+import com.android.systemui.biometrics.shared.model.DisplayRotation
import com.android.systemui.biometrics.shared.model.PromptKind
+import com.android.systemui.biometrics.ui.binder.Spaghetti
+import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION
import com.android.systemui.statusbar.VibratorHelper
@@ -49,6 +54,7 @@ constructor(
private val displayStateInteractor: DisplayStateInteractor,
private val promptSelectorInteractor: PromptSelectorInteractor,
private val vibrator: VibratorHelper,
+ @Application context: Context,
private val featureFlags: FeatureFlags,
) {
/** Models UI of [BiometricPromptLayout.iconView] */
@@ -62,8 +68,8 @@ constructor(
.distinctUntilChanged()
// TODO(b/251476085): remove after icon controllers are migrated - do not keep this state
- private var _legacyState = MutableStateFlow(AuthBiometricView.STATE_IDLE)
- val legacyState: StateFlow<Int> = _legacyState.asStateFlow()
+ private var _legacyState = MutableStateFlow(Spaghetti.BiometricState.STATE_IDLE)
+ val legacyState: StateFlow<Spaghetti.BiometricState> = _legacyState.asStateFlow()
private val _isAuthenticating: MutableStateFlow<Boolean> = MutableStateFlow(false)
@@ -135,6 +141,23 @@ constructor(
!isOverlayTouched && size.isNotSmall
}
+ /** Padding for prompt UI elements */
+ val promptPadding: Flow<Rect> =
+ combine(size, displayStateInteractor.currentRotation) { size, rotation ->
+ if (size != PromptSize.LARGE) {
+ val navBarInsets = Utils.getNavbarInsets(context)
+ if (rotation == DisplayRotation.ROTATION_90) {
+ Rect(0, 0, navBarInsets.right, 0)
+ } else if (rotation == DisplayRotation.ROTATION_270) {
+ Rect(navBarInsets.left, 0, 0, 0)
+ } else {
+ Rect(0, 0, 0, navBarInsets.bottom)
+ }
+ } else {
+ Rect(0, 0, 0, 0)
+ }
+ }
+
/** Title for the prompt. */
val title: Flow<String> =
promptSelectorInteractor.prompt.map { it?.title ?: "" }.distinctUntilChanged()
@@ -270,7 +293,7 @@ constructor(
_isAuthenticated.value = PromptAuthState(false)
_forceMediumSize.value = true
_message.value = PromptMessage.Error(message)
- _legacyState.value = AuthBiometricView.STATE_ERROR
+ _legacyState.value = Spaghetti.BiometricState.STATE_ERROR
if (hapticFeedback) {
vibrator.error(failedModality)
@@ -322,13 +345,13 @@ constructor(
_forceMediumSize.value = true
_legacyState.value =
if (alreadyAuthenticated && isConfirmationRequired.first()) {
- AuthBiometricView.STATE_PENDING_CONFIRMATION
+ Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
} else if (alreadyAuthenticated && !isConfirmationRequired.first()) {
- AuthBiometricView.STATE_AUTHENTICATED
+ Spaghetti.BiometricState.STATE_AUTHENTICATED
} else if (clearIconError) {
- AuthBiometricView.STATE_IDLE
+ Spaghetti.BiometricState.STATE_IDLE
} else {
- AuthBiometricView.STATE_HELP
+ Spaghetti.BiometricState.STATE_HELP
}
messageJob?.cancel()
@@ -353,7 +376,7 @@ constructor(
_message.value =
if (message.isNotBlank()) PromptMessage.Help(message) else PromptMessage.Empty
_forceMediumSize.value = true
- _legacyState.value = AuthBiometricView.STATE_HELP
+ _legacyState.value = Spaghetti.BiometricState.STATE_HELP
messageJob?.cancel()
messageJob = launch {
@@ -373,7 +396,7 @@ constructor(
_isAuthenticating.value = true
_isAuthenticated.value = PromptAuthState(false)
_message.value = if (message.isBlank()) PromptMessage.Empty else PromptMessage.Help(message)
- _legacyState.value = AuthBiometricView.STATE_AUTHENTICATING
+ _legacyState.value = Spaghetti.BiometricState.STATE_AUTHENTICATING
// reset the try again button(s) after the user attempts a retry
if (isRetry) {
@@ -406,9 +429,9 @@ constructor(
_message.value = PromptMessage.Empty
_legacyState.value =
if (needsUserConfirmation) {
- AuthBiometricView.STATE_PENDING_CONFIRMATION
+ Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
} else {
- AuthBiometricView.STATE_AUTHENTICATED
+ Spaghetti.BiometricState.STATE_AUTHENTICATED
}
if (!needsUserConfirmation) {
@@ -449,7 +472,7 @@ constructor(
_isAuthenticated.value = authState.asExplicitlyConfirmed()
_message.value = PromptMessage.Empty
- _legacyState.value = AuthBiometricView.STATE_AUTHENTICATED
+ _legacyState.value = Spaghetti.BiometricState.STATE_AUTHENTICATED
vibrator.success(authState.authenticatedModality)
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
index f2b4e09c9850..c0b21534c5f3 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
@@ -28,8 +28,11 @@ import com.android.systemui.log.table.logDiffsForTable
import com.android.systemui.util.time.SystemClock
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.launchIn
@@ -47,8 +50,10 @@ interface KeyguardBouncerRepository {
val primaryBouncerShowingSoon: StateFlow<Boolean>
val primaryBouncerStartingToHide: StateFlow<Boolean>
val primaryBouncerStartingDisappearAnimation: StateFlow<Runnable?>
+
/** Determines if we want to instantaneously show the primary bouncer instead of translating. */
val primaryBouncerScrimmed: StateFlow<Boolean>
+
/**
* Set how much of the notification panel is showing on the screen.
*
@@ -60,8 +65,23 @@ interface KeyguardBouncerRepository {
val panelExpansionAmount: StateFlow<Float>
val keyguardPosition: StateFlow<Float?>
val isBackButtonEnabled: StateFlow<Boolean?>
- /** Determines if user is already unlocked */
- val keyguardAuthenticated: StateFlow<Boolean?>
+
+ /**
+ * Triggers when the user has successfully used biometrics to authenticate. True = biometrics
+ * used to authenticate is Class 3, else false. When null, biometrics haven't authenticated the
+ * device.
+ */
+ val keyguardAuthenticatedBiometrics: StateFlow<Boolean?>
+
+ /**
+ * Triggers when the given userId (Int) has successfully used primary authentication to
+ * authenticate
+ */
+ val keyguardAuthenticatedPrimaryAuth: Flow<Int>
+
+ /** Triggers when the given userId (Int) has requested the bouncer when already authenticated */
+ val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int>
+
val showMessage: StateFlow<BouncerShowMessageModel?>
val resourceUpdateRequests: StateFlow<Boolean>
val alternateBouncerVisible: StateFlow<Boolean>
@@ -88,7 +108,11 @@ interface KeyguardBouncerRepository {
fun setShowMessage(bouncerShowMessageModel: BouncerShowMessageModel?)
- fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?)
+ fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticatedBiometrics: Boolean?)
+
+ suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int)
+
+ suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int)
fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean)
@@ -117,9 +141,11 @@ constructor(
private val _primaryBouncerDisappearAnimation = MutableStateFlow<Runnable?>(null)
override val primaryBouncerStartingDisappearAnimation =
_primaryBouncerDisappearAnimation.asStateFlow()
+
/** Determines if we want to instantaneously show the primary bouncer instead of translating. */
private val _primaryBouncerScrimmed = MutableStateFlow(false)
override val primaryBouncerScrimmed = _primaryBouncerScrimmed.asStateFlow()
+
/**
* Set how much of the notification panel is showing on the screen.
*
@@ -134,13 +160,26 @@ constructor(
override val keyguardPosition = _keyguardPosition.asStateFlow()
private val _isBackButtonEnabled = MutableStateFlow<Boolean?>(null)
override val isBackButtonEnabled = _isBackButtonEnabled.asStateFlow()
- private val _keyguardAuthenticated = MutableStateFlow<Boolean?>(null)
- /** Determines if user is already unlocked */
- override val keyguardAuthenticated = _keyguardAuthenticated.asStateFlow()
+
+ /** Whether the user is already unlocked by biometrics */
+ private val _keyguardAuthenticatedBiometrics = MutableStateFlow<Boolean?>(null)
+ override val keyguardAuthenticatedBiometrics = _keyguardAuthenticatedBiometrics.asStateFlow()
+
+ /** Whether the user is unlocked via a primary authentication method (pin/pattern/password). */
+ private val _keyguardAuthenticatedPrimaryAuth = MutableSharedFlow<Int>()
+ override val keyguardAuthenticatedPrimaryAuth: Flow<Int> =
+ _keyguardAuthenticatedPrimaryAuth.asSharedFlow()
+
+ /** Whether the user requested to show the bouncer when device is already authenticated */
+ private val _userRequestedBouncerWhenAlreadyAuthenticated = MutableSharedFlow<Int>()
+ override val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+ _userRequestedBouncerWhenAlreadyAuthenticated.asSharedFlow()
+
private val _showMessage = MutableStateFlow<BouncerShowMessageModel?>(null)
override val showMessage = _showMessage.asStateFlow()
private val _resourceUpdateRequests = MutableStateFlow(false)
override val resourceUpdateRequests = _resourceUpdateRequests.asStateFlow()
+
/** Values associated with the AlternateBouncer */
private val _alternateBouncerVisible = MutableStateFlow(false)
override val alternateBouncerVisible = _alternateBouncerVisible.asStateFlow()
@@ -204,8 +243,16 @@ constructor(
_showMessage.value = bouncerShowMessageModel
}
- override fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?) {
- _keyguardAuthenticated.value = keyguardAuthenticated
+ override fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticatedBiometrics: Boolean?) {
+ _keyguardAuthenticatedBiometrics.value = keyguardAuthenticatedBiometrics
+ }
+
+ override suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+ _keyguardAuthenticatedPrimaryAuth.emit(userId)
+ }
+
+ override suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+ _userRequestedBouncerWhenAlreadyAuthenticated.emit(userId)
}
override fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean) {
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
index 9527f327a837..abddb0a322ea 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
@@ -92,6 +92,9 @@ constructor(
/** Whether the pattern should be visible for the currently-selected user. */
val isPatternVisible: StateFlow<Boolean> = authenticationInteractor.isPatternVisible
+ /** The minimal length of a pattern. */
+ val minPatternLength = authenticationInteractor.minPatternLength
+
init {
if (flags.isEnabled()) {
// Clear the message if moved from throttling to no-longer throttling.
@@ -204,12 +207,24 @@ constructor(
loggingReason = "successful authentication",
)
} else {
- repository.setMessage(errorMessage(authenticationInteractor.getAuthenticationMethod()))
+ showErrorMessage()
}
return isAuthenticated
}
+ /**
+ * Shows the error message.
+ *
+ * Callers should use this instead of [authenticate] when they know ahead of time that an auth
+ * attempt will fail but aren't interested in the other side effects like triggering throttling.
+ * For example, if the user entered a pattern that's too short, the system can show the error
+ * message without having the attempt trigger throttling.
+ */
+ suspend fun showErrorMessage() {
+ repository.setMessage(errorMessage(authenticationInteractor.getAuthenticationMethod()))
+ }
+
private fun promptMessage(authMethod: AuthenticationMethodModel): String {
return when (authMethod) {
is AuthenticationMethodModel.Pin ->
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 0e0f1f6265d7..579f0b7b3185 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
@@ -79,14 +79,18 @@ constructor(
) {
private val passiveAuthBouncerDelay =
context.resources.getInteger(R.integer.primary_bouncer_passive_auth_delay).toLong()
+
/** Runnable to show the primary bouncer. */
val showRunnable = Runnable {
repository.setPrimaryShow(true)
repository.setPrimaryShowingSoon(false)
primaryBouncerCallbackInteractor.dispatchVisibilityChanged(View.VISIBLE)
}
-
- val keyguardAuthenticated: Flow<Boolean> = repository.keyguardAuthenticated.filterNotNull()
+ val keyguardAuthenticatedPrimaryAuth: Flow<Int> = repository.keyguardAuthenticatedPrimaryAuth
+ val keyguardAuthenticatedBiometrics: Flow<Boolean> =
+ repository.keyguardAuthenticatedBiometrics.filterNotNull()
+ val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+ repository.userRequestedBouncerWhenAlreadyAuthenticated.filterNotNull()
val isShowing: StateFlow<Boolean> = repository.primaryBouncerShow
val startingToHide: Flow<Unit> = repository.primaryBouncerStartingToHide.filter { it }.map {}
val isBackButtonEnabled: Flow<Boolean> = repository.isBackButtonEnabled.filterNotNull()
@@ -96,6 +100,7 @@ constructor(
val resourceUpdateRequests: Flow<Boolean> = repository.resourceUpdateRequests.filter { it }
val keyguardPosition: Flow<Float> = repository.keyguardPosition.filterNotNull()
val panelExpansionAmount: Flow<Float> = repository.panelExpansionAmount
+
/** 0f = bouncer fully hidden. 1f = bouncer fully visible. */
val bouncerExpansion: Flow<Float> =
combine(repository.panelExpansionAmount, repository.primaryBouncerShow) {
@@ -107,6 +112,7 @@ constructor(
0f
}
}
+
/** Allow for interaction when just about fully visible */
val isInteractable: Flow<Boolean> = bouncerExpansion.map { it > 0.9 }
val sideFpsShowing: Flow<Boolean> = repository.sideFpsShowing
@@ -144,7 +150,7 @@ constructor(
@JvmOverloads
fun show(isScrimmed: Boolean) {
// Reset some states as we show the bouncer.
- repository.setKeyguardAuthenticated(null)
+ repository.setKeyguardAuthenticatedBiometrics(null)
repository.setPrimaryStartingToHide(false)
val resumeBouncer =
@@ -268,9 +274,19 @@ constructor(
repository.setResourceUpdateRequests(true)
}
- /** Tell the bouncer that keyguard is authenticated. */
- fun notifyKeyguardAuthenticated(strongAuth: Boolean) {
- repository.setKeyguardAuthenticated(strongAuth)
+ /** Tell the bouncer that keyguard is authenticated with primary authentication. */
+ fun notifyKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+ applicationScope.launch { repository.setKeyguardAuthenticatedPrimaryAuth(userId) }
+ }
+
+ /** Tell the bouncer that bouncer is requested when device is already authenticated */
+ fun notifyUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+ applicationScope.launch { repository.setKeyguardAuthenticatedPrimaryAuth(userId) }
+ }
+
+ /** Tell the bouncer that keyguard is authenticated with biometrics. */
+ fun notifyKeyguardAuthenticatedBiometrics(strongAuth: Boolean) {
+ repository.setKeyguardAuthenticatedBiometrics(strongAuth)
}
/** Update the position of the bouncer when showing. */
@@ -280,7 +296,7 @@ constructor(
/** Notifies that the state change was handled. */
fun notifyKeyguardAuthenticatedHandled() {
- repository.setKeyguardAuthenticated(null)
+ repository.setKeyguardAuthenticatedBiometrics(null)
}
/** Notifies that the message was shown. */
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
index 6ba84399585d..649ae2fb1007 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
@@ -59,7 +59,7 @@ constructor(
val bouncerShowMessage: Flow<BouncerShowMessageModel> = interactor.showMessage
/** Observe whether keyguard is authenticated already. */
- val keyguardAuthenticated: Flow<Boolean> = interactor.keyguardAuthenticated
+ val keyguardAuthenticated: Flow<Boolean> = interactor.keyguardAuthenticatedBiometrics
/** Observe whether the side fps is showing. */
val sideFpsShowing: Flow<Boolean> = interactor.sideFpsShowing
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
index 80a41ce672ec..d21479746744 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
@@ -40,20 +40,21 @@ class PasswordBouncerViewModel(
/** Notifies that the UI has been shown to the user. */
fun onShown() {
+ _password.value = ""
interactor.resetMessage()
}
/** Notifies that the user has changed the password input. */
- fun onPasswordInputChanged(password: String) {
- if (this.password.value.isEmpty() && password.isNotEmpty()) {
+ fun onPasswordInputChanged(newPassword: String) {
+ if (this.password.value.isEmpty() && newPassword.isNotEmpty()) {
interactor.clearMessage()
}
- if (password.isNotEmpty()) {
+ if (newPassword.isNotEmpty()) {
interactor.onIntentionalUserInput()
}
- _password.value = password
+ _password.value = newPassword
}
/** Notifies that the user has pressed the key for attempting to authenticate the password. */
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
index 85eaf0b8db5a..1985c37e1d5d 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
@@ -129,7 +129,12 @@ class PatternBouncerViewModel(
buildList {
var dot = previousDot
while (dot != hitDot) {
- add(dot)
+ // Move along the direction of the line connecting the previously
+ // selected dot and current hit dot, and see if they were skipped over
+ // but fall on that line.
+ if (dot.isOnLineSegment(previousDot, hitDot)) {
+ add(dot)
+ }
dot =
PatternDotViewModel(
x =
@@ -170,7 +175,9 @@ class PatternBouncerViewModel(
_selectedDots.value = linkedSetOf()
applicationScope.launch {
- if (interactor.authenticate(pattern) != true) {
+ if (pattern.size < interactor.minPatternLength) {
+ interactor.showErrorMessage()
+ } else if (interactor.authenticate(pattern) != true) {
showFailureAnimation()
}
}
@@ -206,6 +213,34 @@ class PatternBouncerViewModel(
}
}
+/**
+ * Determines whether [this] dot is present on the line segment connecting [first] and [second]
+ * dots.
+ */
+private fun PatternDotViewModel.isOnLineSegment(
+ first: PatternDotViewModel,
+ second: PatternDotViewModel
+): Boolean {
+ val anotherPoint = this
+ // No need to consider any points outside the bounds of two end points
+ val isWithinBounds =
+ anotherPoint.x.isBetween(first.x, second.x) && anotherPoint.y.isBetween(first.y, second.y)
+ if (!isWithinBounds) {
+ return false
+ }
+
+ // Uses the 2 point line equation: (y-y1)/(x-x1) = (y2-y1)/(x2-x1)
+ // which can be rewritten as: (y-y1)*(x2-x1) = (x-x1)*(y2-y1)
+ // This is true for any point on the line passing through these two points
+ return (anotherPoint.y - first.y) * (second.x - first.x) ==
+ (anotherPoint.x - first.x) * (second.y - first.y)
+}
+
+/** Is [this] Int between [a] and [b] */
+private fun Int.isBetween(a: Int, b: Int): Boolean {
+ return (this in a..b) || (this in b..a)
+}
+
data class PatternDotViewModel(
val x: Int,
val y: Int,
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
index ebf939b264fa..dc5c5288df9f 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
@@ -70,13 +70,7 @@ class PinBouncerViewModel(
/** Appearance of the confirm button. */
val confirmButtonAppearance: StateFlow<ActionButtonAppearance> =
interactor.isAutoConfirmEnabled
- .map {
- if (it) {
- ActionButtonAppearance.Hidden
- } else {
- ActionButtonAppearance.Shown
- }
- }
+ .map { if (it) ActionButtonAppearance.Hidden else ActionButtonAppearance.Shown }
.stateIn(
scope = applicationScope,
started = SharingStarted.Eagerly,
@@ -85,6 +79,7 @@ class PinBouncerViewModel(
/** Notifies that the UI has been shown to the user. */
fun onShown() {
+ clearPinInput()
interactor.resetMessage()
}
@@ -113,7 +108,7 @@ class PinBouncerViewModel(
/** Notifies that the user long-pressed the backspace button. */
fun onBackspaceButtonLongPressed() {
- mutablePinInput.value = mutablePinInput.value.clearAll()
+ clearPinInput()
}
/** Notifies that the user clicked the "enter" button. */
@@ -121,6 +116,10 @@ class PinBouncerViewModel(
tryAuthenticate(useAutoConfirm = false)
}
+ private fun clearPinInput() {
+ mutablePinInput.value = mutablePinInput.value.clearAll()
+ }
+
private fun tryAuthenticate(useAutoConfirm: Boolean) {
val pinCode = mutablePinInput.value.getPin()
@@ -133,7 +132,7 @@ class PinBouncerViewModel(
// TODO(b/291528545): this should not be cleared on success (at least until the view
// is animated away).
- mutablePinInput.value = mutablePinInput.value.clearAll()
+ clearPinInput()
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
index 7ce7ce94e4c9..f12b91956c80 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
@@ -34,9 +34,11 @@ import com.android.systemui.dreams.DreamMonitor
import com.android.systemui.globalactions.GlobalActionsComponent
import com.android.systemui.keyboard.KeyboardUI
import com.android.systemui.keyboard.PhysicalKeyboardCoreStartable
-import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.KeyguardViewConfigurator
+import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceCoreStartable
+import com.android.systemui.keyguard.ui.binder.KeyguardDismissActionBinder
+import com.android.systemui.keyguard.ui.binder.KeyguardDismissBinder
import com.android.systemui.log.SessionTracker
import com.android.systemui.media.RingtonePlayer
import com.android.systemui.media.dialog.MediaOutputSwitcherDialogUI
@@ -74,12 +76,14 @@ import dagger.multibindings.IntoMap
/**
* Collection of {@link CoreStartable}s that should be run on AOSP.
*/
-@Module(includes = [
- MultiUserUtilsModule::class,
- StartControlsStartableModule::class,
- StartBinderLoggerModule::class,
- WallpaperModule::class,
-])
+@Module(
+ includes = [
+ MultiUserUtilsModule::class,
+ StartControlsStartableModule::class,
+ StartBinderLoggerModule::class,
+ WallpaperModule::class,
+ ]
+)
abstract class SystemUICoreStartableModule {
/** Inject into AuthController. */
@Binds
@@ -352,4 +356,14 @@ abstract class SystemUICoreStartableModule {
@IntoMap
@ClassKey(BackActionInteractor::class)
abstract fun bindBackActionInteractor(impl: BackActionInteractor): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(KeyguardDismissActionBinder::class)
+ abstract fun bindKeyguardDismissActionBinder(impl: KeyguardDismissActionBinder): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(KeyguardDismissBinder::class)
+ abstract fun bindKeyguardDismissBinder(impl: KeyguardDismissBinder): CoreStartable
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 7ee0ff4568be..3a942bd8203f 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -37,7 +37,6 @@ import com.android.systemui.biometrics.AlternateUdfpsTouchProvider;
import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider;
import com.android.systemui.biometrics.UdfpsDisplayModeProvider;
import com.android.systemui.biometrics.dagger.BiometricsModule;
-import com.android.systemui.biometrics.dagger.UdfpsModule;
import com.android.systemui.bouncer.ui.BouncerViewModule;
import com.android.systemui.classifier.FalsingModule;
import com.android.systemui.clipboardoverlay.dagger.ClipboardOverlayModule;
@@ -207,7 +206,6 @@ import javax.inject.Named;
TelephonyRepositoryModule.class,
TemporaryDisplayModule.class,
TunerModule.class,
- UdfpsModule.class,
UserModule.class,
UtilModule.class,
NoteTaskModule.class,
diff --git a/packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt b/packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt
new file mode 100644
index 000000000000..626a68f6a59d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.display.data
+
+sealed interface DisplayEvent {
+ val displayId: Int
+ data class Added(override val displayId: Int) : DisplayEvent
+ data class Removed(override val displayId: Int) : DisplayEvent
+ data class Changed(override val displayId: Int) : DisplayEvent
+}
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 3444af41d44d..17513589fa82 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
@@ -29,6 +29,7 @@ import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCall
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.display.data.DisplayEvent
import com.android.systemui.util.Compile
import com.android.systemui.util.traceSection
import javax.inject.Inject
@@ -41,6 +42,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.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
@@ -48,7 +50,13 @@ import kotlinx.coroutines.flow.stateIn
/** Provides a [Flow] of [Display] as returned by [DisplayManager]. */
interface DisplayRepository {
- /** Provides a nullable set of displays. */
+ /** Display change event indicating a change to the given displayId has occurred. */
+ val displayChangeEvent: Flow<Int>
+
+ /**
+ * Provides a nullable set of displays. Updates when new displays have been added or removed but
+ * not when a display's info has changed.
+ */
val displays: Flow<Set<Display>>
/**
@@ -86,33 +94,36 @@ constructor(
@Application applicationScope: CoroutineScope,
@Background backgroundCoroutineDispatcher: CoroutineDispatcher
) : DisplayRepository {
-
// Displays are enabled only after receiving them in [onDisplayAdded]
- private val enabledDisplays: StateFlow<Set<Display>> =
- conflatedCallbackFlow {
- val callback =
- object : DisplayListener {
- override fun onDisplayAdded(displayId: Int) {
- trySend(getDisplays())
- }
+ private val allDisplayEvents: Flow<DisplayEvent> = conflatedCallbackFlow {
+ val callback =
+ object : DisplayListener {
+ override fun onDisplayAdded(displayId: Int) {
+ trySend(DisplayEvent.Added(displayId))
+ }
- override fun onDisplayRemoved(displayId: Int) {
- trySend(getDisplays())
- }
+ override fun onDisplayRemoved(displayId: Int) {
+ trySend(DisplayEvent.Removed(displayId))
+ }
- override fun onDisplayChanged(displayId: Int) {
- trySend(getDisplays())
- }
- }
- displayManager.registerDisplayListener(
- callback,
- backgroundHandler,
- EVENT_FLAG_DISPLAY_ADDED or
- EVENT_FLAG_DISPLAY_CHANGED or
- EVENT_FLAG_DISPLAY_REMOVED,
- )
- awaitClose { displayManager.unregisterDisplayListener(callback) }
+ override fun onDisplayChanged(displayId: Int) {
+ trySend(DisplayEvent.Changed(displayId))
+ }
}
+ displayManager.registerDisplayListener(
+ callback,
+ backgroundHandler,
+ EVENT_FLAG_DISPLAY_ADDED or EVENT_FLAG_DISPLAY_CHANGED or EVENT_FLAG_DISPLAY_REMOVED,
+ )
+ awaitClose { displayManager.unregisterDisplayListener(callback) }
+ }
+
+ override val displayChangeEvent: Flow<Int> =
+ allDisplayEvents.filter { it is DisplayEvent.Changed }.map { it.displayId }
+
+ private val enabledDisplays =
+ allDisplayEvents
+ .map { getDisplays() }
.flowOn(backgroundCoroutineDispatcher)
.stateIn(
applicationScope,
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
index 1cd37749e2c3..4e4b79c5cfa2 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
@@ -155,9 +155,12 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
return true;
}
- // Don't set expansion if the user doesn't have a pin/password set.
+ // Don't set expansion if the user doesn't have a pin/password set so that no
+ // animations are played we're not transitioning to the bouncer.
if (!mLockPatternUtils.isSecure(mUserTracker.getUserId())) {
- return true;
+ // Return false so the gesture is not consumed, allowing the dream to wake
+ // if it wants instead of doing nothing.
+ return false;
}
// For consistency, we adopt the expansion definition found in the
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index bb4fcc869992..e11fcb75e190 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -115,14 +115,14 @@ object Flags {
val BUILDER_EXTRAS_OVERRIDE =
sysPropBooleanFlag(
"persist.sysui.notification.builder_extras_override",
- default = false
+ default = true
)
/** Only notify group expansion listeners when a change happens. */
// TODO(b/292213543): Tracking Bug
@JvmField
val NOTIFICATION_GROUP_EXPANSION_CHANGE =
- unreleasedFlag("notification_group_expansion_change", teamfood = true)
+ unreleasedFlag("notification_group_expansion_change")
// 200 - keyguard/lockscreen
// ** Flag retired **
@@ -268,9 +268,9 @@ object Flags {
val MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA =
unreleasedFlag("migrate_split_keyguard_bottom_area", teamfood = true)
- /** Whether to listen for fingerprint authentication over keyguard occluding activities. */
- // TODO(b/283260512): Tracking bug.
- @JvmField val FP_LISTEN_OCCLUDING_APPS = releasedFlag("fp_listen_occluding_apps")
+ // TODO(b/297037052): Tracking bug.
+ @JvmField
+ val REMOVE_NPVC_BOTTOM_AREA_USAGE = unreleasedFlag("remove_npvc_bottom_area_usage")
/** Flag meant to guard the talkback fix for the KeyguardIndicationTextView */
// TODO(b/286563884): Tracking bug
@@ -312,11 +312,6 @@ object Flags {
val KEYGUARD_WM_STATE_REFACTOR: UnreleasedFlag =
unreleasedFlag("keyguard_wm_state_refactor")
- /** Stop running face auth when the display state changes to OFF. */
- // TODO(b/294221702): Tracking bug.
- @JvmField val STOP_FACE_AUTH_ON_DISPLAY_OFF = resourceBooleanFlag(
- R.bool.flag_stop_face_auth_on_display_off, "stop_face_auth_on_display_off")
-
/** Flag to disable the face scanning animation pulsing. */
// TODO(b/295245791): Tracking bug.
@JvmField val STOP_PULSING_FACE_SCANNING_ANIMATION = resourceBooleanFlag(
@@ -365,6 +360,10 @@ object Flags {
@JvmField
val QS_PIPELINE_AUTO_ADD = unreleasedFlag("qs_pipeline_auto_add", teamfood = true)
+ // TODO(b/296357483): Tracking Bug
+ @JvmField
+ val QS_PIPELINE_NEW_TILES = unreleasedFlag("qs_pipeline_new_tiles")
+
// TODO(b/254512383): Tracking Bug
@JvmField
val FULL_SCREEN_USER_SWITCHER =
@@ -389,9 +388,6 @@ object Flags {
// TODO(b/265892345): Tracking Bug
val PLUG_IN_STATUS_BAR_CHIP = releasedFlag("plug_in_status_bar_chip")
- // TODO(b/280426085): Tracking Bug
- @JvmField val NEW_BLUETOOTH_REPOSITORY = releasedFlag("new_bluetooth_repository")
-
// TODO(b/292533677): Tracking Bug
val WIFI_TRACKER_LIB_FOR_WIFI_ICON = releasedFlag("wifi_tracker_lib_for_wifi_icon")
@@ -666,9 +662,6 @@ object Flags {
// 2200 - biometrics (udfps, sfps, BiometricPrompt, etc.)
// TODO(b/259264861): Tracking Bug
@JvmField val UDFPS_NEW_TOUCH_DETECTION = releasedFlag("udfps_new_touch_detection")
- @JvmField val UDFPS_ELLIPSE_DETECTION = releasedFlag("udfps_ellipse_detection")
- // TODO(b/278622168): Tracking Bug
- @JvmField val BIOMETRIC_BP_STRONG = releasedFlag("biometric_bp_strong")
// 2300 - stylus
@JvmField val TRACK_STYLUS_EVER_USED = releasedFlag("track_stylus_ever_used")
@@ -746,8 +739,7 @@ object Flags {
// 3000 - dream
// TODO(b/285059790) : Tracking Bug
@JvmField
- val LOCKSCREEN_WALLPAPER_DREAM_ENABLED =
- unreleasedFlag(name = "enable_lockscreen_wallpaper_dream", teamfood = true)
+ val LOCKSCREEN_WALLPAPER_DREAM_ENABLED = unreleasedFlag("enable_lockscreen_wallpaper_dream")
// TODO(b/283084712): Tracking Bug
@JvmField val IMPROVED_HUN_ANIMATIONS = unreleasedFlag("improved_hun_animations")
@@ -781,7 +773,8 @@ object Flags {
// TODO(b/290213663): Tracking Bug
@JvmField
- val ONE_WAY_HAPTICS_API_MIGRATION = unreleasedFlag("oneway_haptics_api_migration")
+ val ONE_WAY_HAPTICS_API_MIGRATION =
+ unreleasedFlag("oneway_haptics_api_migration", teamfood = true)
/** TODO(b/296223317): Enables the new keyguard presentation containing a clock. */
@JvmField
@@ -807,4 +800,8 @@ object Flags {
// TODO(b/287205379): Tracking bug
@JvmField
val QS_CONTAINER_GRAPH_OPTIMIZER = unreleasedFlag( "qs_container_graph_optimizer")
+
+ /** Enable showing a dialog when clicking on Quick Settings bluetooth tile. */
+ @JvmField
+ val BLUETOOTH_QS_TILE_DIALOG = unreleasedFlag("bluetooth_qs_tile_dialog")
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 2b4dc8108418..991572003e4d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -2208,14 +2208,21 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
// we explicitly re-set state.
if (mShowing && mKeyguardStateController.isShowing()) {
if (mPM.isInteractive() && !mHiding) {
- // It's already showing, and we're not trying to show it while the screen is off.
- // We can simply reset all of the views, but don't hide the bouncer in case the user
- // is currently interacting with it.
- if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is "
- + "already showing, we're interactive, and we were not previously hiding. "
- + "It should be safe to short-circuit here.");
- resetStateLocked(/* hideBouncer= */ false);
- return;
+ if (mKeyguardStateController.isKeyguardGoingAway()) {
+ Log.e(TAG, "doKeyguard: we're still showing, but going away. Re-show the "
+ + "keyguard rather than short-circuiting and resetting.");
+ } else {
+ // It's already showing, and we're not trying to show it while the screen is
+ // off. We can simply reset all of the views, but don't hide the bouncer in case
+ // the user is currently interacting with it.
+ if (DEBUG) Log.d(TAG,
+ "doKeyguard: not showing (instead, resetting) because it is "
+ + "already showing, we're interactive, we were not "
+ + "previously hiding. It should be safe to short-circuit "
+ + "here.");
+ resetStateLocked(/* hideBouncer= */ false);
+ return;
+ }
} else {
// We are trying to show the keyguard while the screen is off or while we were in
// the middle of hiding - this results from race conditions involving locking while
@@ -2740,13 +2747,18 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
setUnlockAndWakeFromDream(false, WakeAndUnlockUpdateReason.SHOW);
setPendingLock(false);
- // Force if we we're showing in the middle of hiding, to ensure we end up in the correct
- // state.
- setShowingLocked(true, mHiding /* force */);
- if (mHiding) {
- Log.d(TAG, "Forcing setShowingLocked because mHiding=true, which means we're "
- + "showing in the middle of hiding.");
+ final boolean hidingOrGoingAway =
+ mHiding || mKeyguardStateController.isKeyguardGoingAway();
+ if (hidingOrGoingAway) {
+ Log.d(TAG, "Forcing setShowingLocked because one of these is true:"
+ + "mHiding=" + mHiding
+ + ", keyguardGoingAway=" + mKeyguardStateController.isKeyguardGoingAway()
+ + ", which means we're showing in the middle of hiding.");
}
+
+ // Force if we we're showing in the middle of unlocking, to ensure we end up in the
+ // correct state.
+ setShowingLocked(true, hidingOrGoingAway /* force */);
mHiding = false;
if (!mFeatureFlags.isEnabled(Flags.KEYGUARD_WM_STATE_REFACTOR)) {
@@ -2954,7 +2966,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
+ " fadeoutDuration=" + fadeoutDuration);
synchronized (KeyguardViewMediator.this) {
-
// Tell ActivityManager that we canceled the keyguard animation if
// handleStartKeyguardExitAnimation was called, but we're not hiding the keyguard,
// unless we're animating the surface behind the keyguard and will be hiding the
@@ -3222,10 +3233,13 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
// Post layout changes to the next frame, so we don't hang at the end of the animation.
DejankUtils.postAfterTraversal(() -> {
- if (!mPM.isInteractive()) {
- Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal" +
- "Not interactive after traversal. Don't hide the keyguard. This means we " +
- "re-locked the device during unlock.");
+ if (!mPM.isInteractive() && !mPendingLock) {
+ Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal:"
+ + "mPM.isInteractive()=" + mPM.isInteractive()
+ + "mPendingLock=" + mPendingLock + "."
+ + "One of these being false means we re-locked the device during unlock. "
+ + "Do not proceed to finish keyguard exit and unlock.");
+ finishSurfaceBehindRemoteAnimation(true /* showKeyguard */);
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
index b82e01b1a0a8..6db21b2c1e9e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
@@ -26,6 +26,7 @@ import com.android.internal.logging.UiEventLogger
import com.android.keyguard.FaceAuthUiEvent
import com.android.systemui.Dumpable
import com.android.systemui.R
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
@@ -161,6 +162,7 @@ constructor(
@FaceDetectTableLog private val faceDetectLog: TableLogBuffer,
@FaceAuthTableLog private val faceAuthLog: TableLogBuffer,
private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
+ private val displayStateInteractor: DisplayStateInteractor,
private val featureFlags: FeatureFlags,
dumpManager: DumpManager,
) : DeviceEntryFaceAuthRepository, Dumpable {
@@ -363,6 +365,16 @@ constructor(
private fun gatingConditionsForAuthAndDetect(): Array<Pair<Flow<Boolean>, String>> {
return arrayOf(
Pair(
+ and(
+ displayStateInteractor.isDefaultDisplayOff,
+ keyguardRepository.wakefulness.map { it.isAwake() },
+ )
+ .isFalse(),
+ // this can happen if an app is requesting for screen off, the display can
+ // turn off without wakefulness.isStartingToSleepOrAsleep calls
+ "displayIsNotOffWhileAwake",
+ ),
+ Pair(
biometricSettingsRepository.isFaceAuthEnrolledAndEnabled,
"isFaceAuthEnrolledAndEnabled"
),
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 d399e4c145fc..2557e8112e1e 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
@@ -35,8 +35,10 @@ import com.android.systemui.keyguard.ScreenLifecycle
import com.android.systemui.keyguard.WakefulnessLifecycle
import com.android.systemui.keyguard.shared.model.BiometricUnlockModel
import com.android.systemui.keyguard.shared.model.BiometricUnlockSource
+import com.android.systemui.keyguard.shared.model.DismissAction
import com.android.systemui.keyguard.shared.model.DozeStateModel
import com.android.systemui.keyguard.shared.model.DozeTransitionModel
+import com.android.systemui.keyguard.shared.model.KeyguardDone
import com.android.systemui.keyguard.shared.model.KeyguardRootViewVisibilityState
import com.android.systemui.keyguard.shared.model.ScreenModel
import com.android.systemui.keyguard.shared.model.StatusBarState
@@ -53,9 +55,11 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flowOn
@@ -187,6 +191,12 @@ interface KeyguardRepository {
/** Receive an event for doze time tick */
val dozeTimeTick: Flow<Long>
+ /** Observable for DismissAction */
+ val dismissAction: StateFlow<DismissAction>
+
+ /** Observable updated when keyguardDone should be called either now or soon. */
+ val keyguardDone: Flow<KeyguardDone>
+
/**
* Returns `true` if the keyguard is showing; `false` otherwise.
*
@@ -239,6 +249,10 @@ interface KeyguardRepository {
fun setIsActiveDreamLockscreenHosted(isLockscreenHosted: Boolean)
fun dozeTimeTick()
+
+ fun setDismissAction(dismissAction: DismissAction)
+
+ suspend fun setKeyguardDone(keyguardDoneType: KeyguardDone)
}
/** Encapsulates application state for the keyguard. */
@@ -261,6 +275,19 @@ constructor(
@Application private val scope: CoroutineScope,
private val systemClock: SystemClock,
) : KeyguardRepository {
+ private val _dismissAction: MutableStateFlow<DismissAction> =
+ MutableStateFlow(DismissAction.None)
+ override val dismissAction = _dismissAction.asStateFlow()
+ override fun setDismissAction(dismissAction: DismissAction) {
+ _dismissAction.value = dismissAction
+ }
+
+ private val _keyguardDone: MutableSharedFlow<KeyguardDone> = MutableSharedFlow()
+ override val keyguardDone = _keyguardDone.asSharedFlow()
+ override suspend fun setKeyguardDone(keyguardDoneType: KeyguardDone) {
+ _keyguardDone.emit(keyguardDoneType)
+ }
+
private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
override val animateBottomAreaDozingTransitions =
_animateBottomAreaDozingTransitions.asStateFlow()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
index 867675bab790..00036ce5e226 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.data.repository
import android.app.trust.TrustManager
+import com.android.keyguard.TrustGrantFlags
import com.android.keyguard.logging.TrustRepositoryLogger
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
@@ -34,6 +35,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.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
@@ -50,6 +52,9 @@ interface TrustRepository {
/** Reports that whether trust is managed has changed for the current user. */
val isCurrentUserTrustManaged: StateFlow<Boolean>
+
+ /** A trust agent is requesting to dismiss the keyguard from a trust change. */
+ val trustAgentRequestingToDismissKeyguard: Flow<TrustModel>
}
@SysUISingleton
@@ -78,7 +83,7 @@ constructor(
) {
logger.onTrustChanged(enabled, newlyUnlocked, userId, flags, grantMsgs)
trySendWithFailureLogging(
- TrustModel(enabled, userId),
+ TrustModel(enabled, userId, TrustGrantFlags(flags)),
TrustRepositoryLogger.TAG,
"onTrustChanged"
)
@@ -158,6 +163,17 @@ constructor(
initialValue = false
)
+ override val trustAgentRequestingToDismissKeyguard: Flow<TrustModel>
+ get() =
+ combine(trust, userRepository.selectedUserInfo, ::Pair)
+ .map { latestTrustModelForUser[it.second.id] }
+ .distinctUntilChanged()
+ .filter {
+ it != null &&
+ (it.flags.isInitiatedByUser || it.flags.dismissKeyguardRequested())
+ }
+ .map { it!! }
+
private fun isUserTrustManaged(userId: Int) =
trustManagedForUser[userId]?.isTrustManaged ?: false
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
new file mode 100644
index 000000000000..08d29d4fc0a6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+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.util.kotlin.sample
+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.filter
+import kotlinx.coroutines.flow.filterNot
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
+import kotlinx.coroutines.flow.stateIn
+
+/** Encapsulates business-logic for actions to run when the keyguard is dismissed. */
+@ExperimentalCoroutinesApi
+@SysUISingleton
+class KeyguardDismissActionInteractor
+@Inject
+constructor(
+ private val repository: KeyguardRepository,
+ transitionInteractor: KeyguardTransitionInteractor,
+ val dismissInteractor: KeyguardDismissInteractor,
+ @Application private val applicationScope: CoroutineScope,
+) {
+ val dismissAction: Flow<DismissAction> = repository.dismissAction
+
+ val onCancel: Flow<Runnable> = dismissAction.map { it.onCancelAction }
+
+ // TODO (b/268240415): use message in alt + primary bouncer message
+ // message to show to the user about the dismiss action, else empty string
+ val message = dismissAction.map { it.message }
+
+ /**
+ * True if the dismiss action will run an animation on the lockscreen and requires any views
+ * that would obscure this animation (ie: the primary bouncer) to immediately hide, so the
+ * animation would be visible.
+ */
+ val willAnimateDismissActionOnLockscreen: StateFlow<Boolean> =
+ dismissAction
+ .map { it.willAnimateOnLockscreen }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = false,
+ )
+
+ private val finishedTransitionToGone: Flow<Unit> =
+ transitionInteractor.finishedKeyguardState.filter { it == GONE }.map {} // map to Unit
+ val executeDismissAction: Flow<() -> KeyguardDone> =
+ merge(
+ finishedTransitionToGone,
+ dismissInteractor.dismissKeyguardRequestWithImmediateDismissAction
+ )
+ .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
+
+ fun runDismissAnimationOnKeyguard(): Boolean {
+ return willAnimateDismissActionOnLockscreen.value
+ }
+
+ fun runAfterKeyguardGone(runnable: Runnable) {
+ setDismissAction(
+ DismissAction.RunAfterKeyguardGone(
+ dismissAction = { runnable.run() },
+ onCancelAction = {},
+ message = "",
+ willAnimateOnLockscreen = false,
+ )
+ )
+ }
+
+ fun setDismissAction(dismissAction: DismissAction) {
+ repository.dismissAction.value.onCancelAction.run()
+ repository.setDismissAction(dismissAction)
+ }
+
+ fun handleDismissAction() {
+ repository.setDismissAction(DismissAction.None)
+ }
+
+ suspend fun setKeyguardDone(keyguardDoneTiming: KeyguardDone) {
+ dismissInteractor.setKeyguardDone(keyguardDoneTiming)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt
new file mode 100644
index 000000000000..cab69285cc94
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.data.repository.TrustRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.user.domain.interactor.UserInteractor
+import com.android.systemui.util.kotlin.Utils.Companion.toQuad
+import com.android.systemui.util.kotlin.sample
+import javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
+
+/** Encapsulates business logic for requesting the keyguard to dismiss/finish/done. */
+@SysUISingleton
+class KeyguardDismissInteractor
+@Inject
+constructor(
+ trustRepository: TrustRepository,
+ val keyguardRepository: KeyguardRepository,
+ val primaryBouncerInteractor: PrimaryBouncerInteractor,
+ val alternateBouncerInteractor: AlternateBouncerInteractor,
+ val powerInteractor: PowerInteractor,
+ val userInteractor: UserInteractor,
+) {
+ /*
+ * Updates when a biometric has authenticated the device and is requesting to dismiss
+ * the keyguard. When true, a class 3 biometrics has authenticated. Else, a lower class
+ * biometric strength has authenticated and is requesting to dismiss the keyguard.
+ */
+ private val biometricAuthenticatedRequestDismissKeyguard: Flow<Unit> =
+ primaryBouncerInteractor.keyguardAuthenticatedBiometrics.map {} // map to Unit
+
+ /*
+ * Updates when a trust change is requesting to dismiss the keyguard and is able to do so
+ * in the current device state.
+ */
+ private val onTrustGrantedRequestDismissKeyguard: Flow<Unit> =
+ trustRepository.trustAgentRequestingToDismissKeyguard
+ .sample(
+ combine(
+ primaryBouncerInteractor.isShowing,
+ alternateBouncerInteractor.isVisible,
+ powerInteractor.isInteractive,
+ ::Triple
+ ),
+ ::toQuad
+ )
+ .filter { (trustModel, primaryBouncerShowing, altBouncerShowing, interactive) ->
+ val bouncerShowing = primaryBouncerShowing || altBouncerShowing
+ (interactive || trustModel.flags.temporaryAndRenewable()) &&
+ (bouncerShowing || trustModel.flags.dismissKeyguardRequested())
+ }
+ .map {} // map to Unit
+
+ /*
+ * Updates when the current user successfully has authenticated via primary authentication
+ * (pin/pattern/password).
+ */
+ private val primaryAuthenticated: Flow<Unit> =
+ primaryBouncerInteractor.keyguardAuthenticatedPrimaryAuth
+ .filter { authedUserId -> authedUserId == userInteractor.getSelectedUserId() }
+ .map {} // map to Unit
+
+ /*
+ * Updates when the current user requests the bouncer after they've already successfully
+ * authenticated (ie: from non-bypass face auth, from a trust agent that didn't immediately
+ * dismiss the keyguard, or if keyguard security is set to SWIPE or NONE).
+ */
+ private val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Unit> =
+ primaryBouncerInteractor.userRequestedBouncerWhenAlreadyAuthenticated
+ .filter { authedUserId -> authedUserId == userInteractor.getSelectedUserId() }
+ .map {} // map to Unit
+
+ /** Updates when keyguardDone should be requested. */
+ val keyguardDone: Flow<KeyguardDone> = keyguardRepository.keyguardDone
+
+ /** Updates when any request to dismiss the current user's keyguard has arrived. */
+ private val dismissKeyguardRequest: Flow<DismissAction> =
+ merge(
+ biometricAuthenticatedRequestDismissKeyguard,
+ onTrustGrantedRequestDismissKeyguard,
+ primaryAuthenticated,
+ userRequestedBouncerWhenAlreadyAuthenticated,
+ )
+ .sample(keyguardRepository.dismissAction)
+
+ /**
+ * Updates when a request to dismiss the current user's keyguard has arrived and there's a
+ * dismiss action to run immediately. It's expected that the consumer will request keyguardDone
+ * with or without a deferral.
+ */
+ val dismissKeyguardRequestWithImmediateDismissAction: Flow<Unit> =
+ dismissKeyguardRequest.filter { it is DismissAction.RunImmediately }.map {} // map to Unit
+
+ /**
+ * Updates when a request to dismiss the current user's keyguard has arrived and there's isn't a
+ * dismiss action to run immediately. There may still be a dismiss action to run after the
+ * keyguard transitions to GONE.
+ */
+ val dismissKeyguardRequestWithoutImmediateDismissAction: Flow<Unit> =
+ dismissKeyguardRequest.filter { it !is DismissAction.RunImmediately }.map {} // map to Unit
+
+ suspend fun setKeyguardDone(keyguardDoneTiming: KeyguardDone) {
+ keyguardRepository.setKeyguardDone(keyguardDoneTiming)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
index 3ec660a5b6b9..f6ad8290d034 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
@@ -22,8 +22,6 @@ import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.data.repository.DeviceEntryFingerprintAuthRepository
import com.android.systemui.keyguard.shared.model.ErrorFingerprintAuthenticationStatus
import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus
@@ -60,7 +58,6 @@ constructor(
private val context: Context,
activityStarter: ActivityStarter,
powerInteractor: PowerInteractor,
- featureFlags: FeatureFlags,
) {
private val keyguardOccludedByApp: Flow<Boolean> =
combine(
@@ -93,37 +90,35 @@ constructor(
.ifKeyguardOccludedByApp(/* elseFlow */ flowOf(null))
init {
- if (featureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
- scope.launch {
- // On fingerprint success when the screen is on, go to the home screen
- fingerprintUnlockSuccessEvents.sample(powerInteractor.isInteractive).collect {
- if (it) {
- goToHomeScreen()
- }
- // don't go to the home screen if the authentication is from AOD/dozing/off
+ scope.launch {
+ // On fingerprint success when the screen is on, go to the home screen
+ fingerprintUnlockSuccessEvents.sample(powerInteractor.isInteractive).collect {
+ if (it) {
+ goToHomeScreen()
}
+ // don't go to the home screen if the authentication is from AOD/dozing/off
}
+ }
- scope.launch {
- // On device fingerprint lockout, request the bouncer with a runnable to
- // go to the home screen. Without this, the bouncer won't proceed to the home
- // screen.
- fingerprintLockoutEvents.collect {
- activityStarter.dismissKeyguardThenExecute(
- object : ActivityStarter.OnDismissAction {
- override fun onDismiss(): Boolean {
- goToHomeScreen()
- return false
- }
+ scope.launch {
+ // On device fingerprint lockout, request the bouncer with a runnable to
+ // go to the home screen. Without this, the bouncer won't proceed to the home
+ // screen.
+ fingerprintLockoutEvents.collect {
+ activityStarter.dismissKeyguardThenExecute(
+ object : ActivityStarter.OnDismissAction {
+ override fun onDismiss(): Boolean {
+ goToHomeScreen()
+ return false
+ }
- override fun willRunAnimationOnKeyguard(): Boolean {
- return false
- }
- },
- /* cancel= */ null,
- /* afterKeyguardGone */ false
- )
- }
+ override fun willRunAnimationOnKeyguard(): Boolean {
+ return false
+ }
+ },
+ /* cancel= */ null,
+ /* afterKeyguardGone */ false
+ )
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt
new file mode 100644
index 000000000000..c8d55996f200
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.systemui.keyguard.shared.model
+
+/** DismissAction models */
+sealed interface DismissAction {
+ val onDismissAction: () -> KeyguardDone
+ val onCancelAction: Runnable
+ val message: String
+ /**
+ * True if the dismiss action will run an animation on the keyguard and requires any views that
+ * would obscure this animation (ie: the primary bouncer) to immediately hide, so the animation
+ * would be visible.
+ */
+ val willAnimateOnLockscreen: Boolean
+ val runAfterKeyguardGone: Boolean
+
+ class RunImmediately(
+ override val onDismissAction: () -> KeyguardDone,
+ override val onCancelAction: Runnable,
+ override val message: String,
+ override val willAnimateOnLockscreen: Boolean,
+ ) : DismissAction {
+ override val runAfterKeyguardGone: Boolean = false
+ }
+
+ class RunAfterKeyguardGone(
+ val dismissAction: () -> Unit,
+ override val onCancelAction: Runnable,
+ override val message: String,
+ override val willAnimateOnLockscreen: Boolean,
+ ) : DismissAction {
+ override val onDismissAction: () -> KeyguardDone = {
+ dismissAction()
+ // no-op, when this dismissAction is run after the keyguard is gone,
+ // the keyguard is already done so KeyguardDone timing is irrelevant
+ KeyguardDone.IMMEDIATE
+ }
+ override val runAfterKeyguardGone: Boolean = true
+ }
+
+ data object None : DismissAction {
+ override val onDismissAction: () -> KeyguardDone = { KeyguardDone.IMMEDIATE }
+ override val onCancelAction: Runnable = Runnable {}
+ override val message: String = ""
+ override val willAnimateOnLockscreen: Boolean = false
+ override val runAfterKeyguardGone: Boolean = false
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt
new file mode 100644
index 000000000000..5e8cf5738e53
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.systemui.keyguard.shared.model
+
+/**
+ * When to send the keyguard done signal. Should it immediately be sent when the keyguard is
+ * requested to be dismissed? Or should it be sent later?
+ */
+enum class KeyguardDone {
+ IMMEDIATE, // keyguard is immediately done, immediately start transitioning away keyguard
+ LATER, // keyguard is dismissible pending the next keyguardDone call
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
index cdfab1a90b66..206b792e6f8e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
@@ -16,6 +16,8 @@
package com.android.systemui.keyguard.shared.model
+import com.android.keyguard.TrustGrantFlags
+
sealed class TrustMessage
/** Represents the trust state */
@@ -24,6 +26,7 @@ data class TrustModel(
val isTrusted: Boolean,
/** The user, for which the trust changed. */
val userId: Int,
+ val flags: TrustGrantFlags,
) : TrustMessage()
/** Represents where trust agents are enabled for a particular user. */
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
index 62f43ed82a96..2a5beaffcfa0 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
@@ -36,7 +36,7 @@ data class WakefulnessModel(
private fun isAsleep() = state == ASLEEP
- private fun isAwake() = state == AWAKE
+ fun isAwake() = state == AWAKE
fun isStartingToWakeOrAwake() = isStartingToWake() || isAwake()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
index a8070c25fe72..3dd3e0762c7c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
@@ -18,11 +18,13 @@
package com.android.systemui.keyguard.ui.binder
import android.os.Trace
+import android.transition.TransitionManager
import android.util.Log
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
+import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.BaseBlueprintTransition
import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel
import com.android.systemui.lifecycle.repeatWhenAttached
import kotlinx.coroutines.launch
@@ -40,17 +42,29 @@ class KeyguardBlueprintViewBinder {
Trace.beginSection("KeyguardBlueprint#applyBlueprint")
Log.d(TAG, "applying blueprint: $blueprint")
- ConstraintSet().apply {
- clone(constraintLayout)
- val emptyLayout = ConstraintSet.Layout()
- knownIds.forEach { getConstraint(it).layout.copyFrom(emptyLayout) }
- blueprint.applyConstraints(this)
- // Add and remove views of sections that are not contained by the
- // other.
- blueprint?.replaceViews(prevBluePrint, constraintLayout)
- applyTo(constraintLayout)
+ val cs =
+ ConstraintSet().apply {
+ clone(constraintLayout)
+ val emptyLayout = ConstraintSet.Layout()
+ knownIds.forEach {
+ getConstraint(it).layout.copyFrom(emptyLayout)
+ }
+ blueprint.applyConstraints(this)
+ }
+
+ // Apply transition.
+ if (prevBluePrint != null && prevBluePrint != blueprint) {
+ TransitionManager.beginDelayedTransition(
+ constraintLayout,
+ BaseBlueprintTransition()
+ )
}
+ // Add and remove views of sections that are not contained by the
+ // other.
+ blueprint.replaceViews(prevBluePrint, constraintLayout)
+ cs.applyTo(constraintLayout)
+
viewModel.currentBluePrint = blueprint
Trace.endSection()
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
index 44acf4f0fd2d..a9c71adc095d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
@@ -79,12 +79,6 @@ object KeyguardBottomAreaViewBinder {
//If updated, be sure to update [KeyguardQuickAffordanceViewBinder.kt]
@Deprecated("Deprecated as part of b/278057014")
interface Binding {
- /**
- * Returns a collection of [ViewPropertyAnimator] instances that can be used to animate the
- * indication areas.
- */
- fun getIndicationAreaAnimators(): List<ViewPropertyAnimator>
-
/** Notifies that device configuration has changed. */
fun onConfigurationChanged()
@@ -281,10 +275,6 @@ object KeyguardBottomAreaViewBinder {
}
return object : Binding {
- override fun getIndicationAreaAnimators(): List<ViewPropertyAnimator> {
- return listOf(ambientIndicationArea).mapNotNull { it?.animate() }
- }
-
override fun onConfigurationChanged() {
configurationBasedDimensions.value = loadFromResources(view)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt
new file mode 100644
index 000000000000..d5add61822b1
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+package com.android.systemui.keyguard.ui.binder
+
+import com.android.keyguard.logging.KeyguardLogger
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.util.kotlin.sample
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.launch
+
+/** Runs actions on keyguard dismissal. */
+@OptIn(ExperimentalCoroutinesApi::class)
+@SysUISingleton
+class KeyguardDismissActionBinder
+@Inject
+constructor(
+ private val interactor: KeyguardDismissActionInteractor,
+ @Application private val scope: CoroutineScope,
+ private val keyguardLogger: KeyguardLogger,
+ private val featureFlags: FeatureFlagsClassic,
+) : CoreStartable {
+
+ override fun start() {
+ if (!featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ return
+ }
+
+ scope.launch {
+ interactor.executeDismissAction.collect {
+ log("executeDismissAction")
+ interactor.setKeyguardDone(it())
+ interactor.handleDismissAction()
+ }
+ }
+
+ scope.launch {
+ interactor.resetDismissAction.sample(interactor.onCancel).collect {
+ log("resetDismissAction")
+ it.run()
+ interactor.handleDismissAction()
+ }
+ }
+
+ scope.launch { interactor.dismissAction.collect { log("updatedDismissAction=$it") } }
+ }
+
+ private fun log(message: String) {
+ keyguardLogger.log(TAG, LogLevel.DEBUG, message)
+ }
+
+ companion object {
+ private const val TAG = "KeyguardDismissAction"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt
new file mode 100644
index 000000000000..f14552ba0685
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+package com.android.systemui.keyguard.ui.binder
+
+import com.android.keyguard.ViewMediatorCallback
+import com.android.keyguard.logging.KeyguardLogger
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.user.domain.interactor.UserInteractor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.launch
+
+/** Handles keyguard dismissal requests. */
+@OptIn(ExperimentalCoroutinesApi::class)
+@SysUISingleton
+class KeyguardDismissBinder
+@Inject
+constructor(
+ private val interactor: KeyguardDismissInteractor,
+ private val userInteractor: UserInteractor,
+ private val viewMediatorCallback: ViewMediatorCallback,
+ @Application private val scope: CoroutineScope,
+ private val keyguardLogger: KeyguardLogger,
+ private val featureFlags: FeatureFlagsClassic,
+) : CoreStartable {
+
+ override fun start() {
+ if (!featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ return
+ }
+
+ scope.launch {
+ interactor.keyguardDone.collect { keyguardDoneTiming ->
+ when (keyguardDoneTiming) {
+ KeyguardDone.LATER -> {
+ log("keyguardDonePending")
+ viewMediatorCallback.keyguardDonePending(userInteractor.getSelectedUserId())
+ }
+ else -> {
+ log("keyguardDone")
+ viewMediatorCallback.keyguardDone(userInteractor.getSelectedUserId())
+ }
+ }
+ }
+ }
+
+ scope.launch {
+ interactor.dismissKeyguardRequestWithoutImmediateDismissAction.collect {
+ log("dismissKeyguardRequestWithoutImmediateDismissAction-keyguardDone")
+ interactor.setKeyguardDone(KeyguardDone.IMMEDIATE)
+ }
+ }
+ }
+
+ private fun log(message: String) {
+ keyguardLogger.log(TAG, LogLevel.DEBUG, message)
+ }
+
+ companion object {
+ private const val TAG = "KeyguardDismiss"
+ }
+}
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 9503f2c75052..4b768211dc61 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
@@ -59,20 +59,18 @@ object KeyguardRootViewBinder {
val disposableHandle =
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.CREATED) {
- if (featureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
- launch {
- occludingAppDeviceEntryMessageViewModel.message.collect {
- biometricMessage ->
- if (biometricMessage?.message != null) {
- chipbarCoordinator.displayView(
- createChipbarInfo(
- biometricMessage.message,
- R.drawable.ic_lock,
- )
+ launch {
+ occludingAppDeviceEntryMessageViewModel.message.collect { biometricMessage
+ ->
+ if (biometricMessage?.message != null) {
+ chipbarCoordinator.displayView(
+ createChipbarInfo(
+ biometricMessage.message,
+ R.drawable.ic_lock,
)
- } else {
- chipbarCoordinator.removeView(ID, "occludingAppMsgNull")
- }
+ )
+ } else {
+ chipbarCoordinator.removeView(ID, "occludingAppMsgNull")
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt
new file mode 100644
index 000000000000..42b1c1044cda
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.keyguard.ui.view.layout.blueprints.transitions
+
+import android.animation.Animator
+import android.animation.ObjectAnimator
+import android.transition.ChangeBounds
+import android.transition.TransitionSet
+import android.transition.TransitionValues
+import android.transition.Visibility
+import android.view.View
+import android.view.ViewGroup
+
+class BaseBlueprintTransition : TransitionSet() {
+ init {
+ ordering = ORDERING_SEQUENTIAL
+ addTransition(AlphaOutVisibility())
+ .addTransition(ChangeBounds())
+ .addTransition(AlphaInVisibility())
+ }
+ class AlphaOutVisibility : Visibility() {
+ override fun onDisappear(
+ sceneRoot: ViewGroup?,
+ view: View,
+ startValues: TransitionValues?,
+ endValues: TransitionValues?
+ ): Animator {
+ return ObjectAnimator.ofFloat(view, "alpha", 0f).apply {
+ addUpdateListener { view.alpha = it.animatedValue as Float }
+ start()
+ }
+ }
+ }
+
+ class AlphaInVisibility : Visibility() {
+ override fun onAppear(
+ sceneRoot: ViewGroup?,
+ view: View,
+ startValues: TransitionValues?,
+ endValues: TransitionValues?
+ ): Animator {
+ return ObjectAnimator.ofFloat(view, "alpha", 1f).apply {
+ addUpdateListener { view.alpha = it.animatedValue as Float }
+ start()
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
index 9c6e953ad2d5..100099d3988e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
@@ -73,7 +73,13 @@ constructor(
val mBottomPaddingPx =
context.resources.getDimensionPixelSize(R.dimen.lock_icon_margin_bottom)
val bounds = windowManager.currentWindowMetrics.bounds
- val widthPixels = bounds.right.toFloat()
+ val insets = windowManager.currentWindowMetrics.windowInsets
+ var widthPixels = bounds.right.toFloat()
+ if (featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)) {
+ // Assumed to be initially neglected as there are no left or right insets in portrait.
+ // However, on landscape, these insets need to included when calculating the midpoint.
+ widthPixels -= (insets.systemWindowInsetLeft + insets.systemWindowInsetRight).toFloat()
+ }
val heightPixels = bounds.bottom.toFloat()
val defaultDensity =
DisplayMetrics.DENSITY_DEVICE_STABLE.toFloat() /
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
index b1dd373a7657..c7b0cb995acc 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
@@ -39,7 +39,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.media.controls.ui.KeyguardMediaController
import com.android.systemui.shade.NotificationPanelView
import com.android.systemui.shade.NotificationPanelViewController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.Utils
import dagger.Lazy
import javax.inject.Inject
@@ -55,6 +55,7 @@ constructor(
private val keyguardViewConfigurator: Lazy<KeyguardViewConfigurator>,
private val notificationPanelViewController: Lazy<NotificationPanelViewController>,
private val keyguardMediaController: KeyguardMediaController,
+ private val splitShadeStateController: SplitShadeStateController
) : KeyguardSection() {
private val statusViewId = R.id.keyguard_status_view
@@ -104,7 +105,7 @@ constructor(
connect(statusViewId, END, PARENT_ID, END)
val margin =
- if (LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)) {
+ if (splitShadeStateController.shouldUseSplitNotificationShade(context.resources)) {
context.resources.getDimensionPixelSize(R.dimen.keyguard_split_shade_top_margin)
} else {
context.resources.getDimensionPixelSize(R.dimen.keyguard_clock_top_margin) +
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 cca96b7830c5..078318196883 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
@@ -19,27 +19,36 @@ package com.android.systemui.keyguard.ui.viewmodel
import com.android.app.animation.Interpolators.EMPHASIZED_ACCELERATE
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.domain.interactor.FromPrimaryBouncerTransitionInteractor.Companion.TO_GONE_DURATION
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.keyguard.shared.model.ScrimAlpha
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.statusbar.SysuiStatusBarStateController
+import dagger.Lazy
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.map
/**
* Breaks down PRIMARY_BOUNCER->GONE transition into discrete steps for corresponding views to
* consume.
*/
+@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
class PrimaryBouncerToGoneTransitionViewModel
@Inject
constructor(
- private val interactor: KeyguardTransitionInteractor,
+ interactor: KeyguardTransitionInteractor,
private val statusBarStateController: SysuiStatusBarStateController,
private val primaryBouncerInteractor: PrimaryBouncerInteractor,
+ keyguardDismissActionInteractor: Lazy<KeyguardDismissActionInteractor>,
+ featureFlags: FeatureFlagsClassic,
) {
private val transitionAnimation =
KeyguardTransitionAnimationFlow(
@@ -52,11 +61,18 @@ constructor(
/** Bouncer container alpha */
val bouncerAlpha: Flow<Float> =
- transitionAnimation.createFlow(
+ if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ keyguardDismissActionInteractor
+ .get()
+ .willAnimateDismissActionOnLockscreen
+ .flatMapLatest { createBouncerAlphaFlow { it } }
+ } else {
+ createBouncerAlphaFlow(primaryBouncerInteractor::willRunDismissFromKeyguard)
+ }
+ private fun createBouncerAlphaFlow(willRunAnimationOnKeyguard: () -> Boolean): Flow<Float> {
+ return transitionAnimation.createFlow(
duration = 200.milliseconds,
- onStart = {
- willRunDismissFromKeyguard = primaryBouncerInteractor.willRunDismissFromKeyguard()
- },
+ onStart = { willRunDismissFromKeyguard = willRunAnimationOnKeyguard() },
onStep = {
if (willRunDismissFromKeyguard) {
0f
@@ -65,14 +81,24 @@ constructor(
}
},
)
+ }
/** Lockscreen alpha */
val lockscreenAlpha: Flow<Float> =
- transitionAnimation.createFlow(
+ if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ keyguardDismissActionInteractor
+ .get()
+ .willAnimateDismissActionOnLockscreen
+ .flatMapLatest { createLockscreenAlpha { it } }
+ } else {
+ createLockscreenAlpha(primaryBouncerInteractor::willRunDismissFromKeyguard)
+ }
+ private fun createLockscreenAlpha(willRunAnimationOnKeyguard: () -> Boolean): Flow<Float> {
+ return transitionAnimation.createFlow(
duration = 50.milliseconds,
onStart = {
leaveShadeOpen = statusBarStateController.leaveOpenOnKeyguardHide()
- willRunDismissFromKeyguard = primaryBouncerInteractor.willRunDismissFromKeyguard()
+ willRunDismissFromKeyguard = willRunAnimationOnKeyguard()
},
onStep = {
if (willRunDismissFromKeyguard || leaveShadeOpen) {
@@ -82,17 +108,26 @@ constructor(
}
},
)
+ }
/** Scrim alpha values */
val scrimAlpha: Flow<ScrimAlpha> =
- transitionAnimation
+ if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ keyguardDismissActionInteractor
+ .get()
+ .willAnimateDismissActionOnLockscreen
+ .flatMapLatest { createScrimAlphaFlow { it } }
+ } else {
+ createScrimAlphaFlow(primaryBouncerInteractor::willRunDismissFromKeyguard)
+ }
+ private fun createScrimAlphaFlow(willRunAnimationOnKeyguard: () -> Boolean): Flow<ScrimAlpha> {
+ return transitionAnimation
.createFlow(
duration = TO_GONE_DURATION,
interpolator = EMPHASIZED_ACCELERATE,
onStart = {
leaveShadeOpen = statusBarStateController.leaveOpenOnKeyguardHide()
- willRunDismissFromKeyguard =
- primaryBouncerInteractor.willRunDismissFromKeyguard()
+ willRunDismissFromKeyguard = willRunAnimationOnKeyguard()
},
onStep = { 1f - it },
)
@@ -108,4 +143,5 @@ constructor(
ScrimAlpha(behindAlpha = it)
}
}
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
index 053c9b56ef96..60fd10492628 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
@@ -29,7 +29,10 @@ import android.os.Bundle
import android.os.IBinder
import android.os.ResultReceiver
import android.os.UserHandle
+import android.util.Log
+import android.view.View
import android.view.ViewGroup
+import android.view.accessibility.AccessibilityEvent
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
@@ -40,6 +43,9 @@ import com.android.internal.app.ChooserActivity
import com.android.internal.app.ResolverListController
import com.android.internal.app.chooser.NotSelectableTargetInfo
import com.android.internal.app.chooser.TargetInfo
+import com.android.internal.widget.RecyclerView
+import com.android.internal.widget.RecyclerViewAccessibilityDelegate
+import com.android.internal.widget.ResolverDrawerLayout
import com.android.systemui.R
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorComponent
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorController
@@ -105,6 +111,10 @@ class MediaProjectionAppSelectorActivity(
super.onCreate(bundle)
controller.init()
+ // we override AppList's AccessibilityDelegate set in ResolverActivity.onCreate because in
+ // our case this delegate must extend RecyclerViewAccessibilityDelegate, otherwise
+ // RecyclerView scrolling is broken
+ setAppListAccessibilityDelegate()
}
override fun onStart() {
@@ -277,6 +287,8 @@ class MediaProjectionAppSelectorActivity(
recentsViewController.createView(parent)
companion object {
+ const val TAG = "MediaProjectionAppSelectorActivity"
+
/**
* When EXTRA_CAPTURE_REGION_RESULT_RECEIVER is passed as intent extra the activity will
* send the [CaptureRegion] to the result receiver instead of returning media projection
@@ -313,4 +325,42 @@ class MediaProjectionAppSelectorActivity(
putExtra(EXTRA_SELECTED_PROFILE, selectedProfile)
}
}
+
+ private fun setAppListAccessibilityDelegate() {
+ val rdl = requireViewById<ResolverDrawerLayout>(com.android.internal.R.id.contentPanel)
+ for (i in 0 until mMultiProfilePagerAdapter.count) {
+ val list =
+ mMultiProfilePagerAdapter
+ .getItem(i)
+ .rootView
+ .findViewById<View>(com.android.internal.R.id.resolver_list)
+ if (list == null || list !is RecyclerView) {
+ Log.wtf(TAG, "MediaProjection only supports RecyclerView")
+ } else {
+ list.accessibilityDelegate = RecyclerViewExpandingAccessibilityDelegate(rdl, list)
+ }
+ }
+ }
+
+ /**
+ * An a11y delegate propagating all a11y events to [AppListAccessibilityDelegate] so that it can
+ * expand drawer when needed. It needs to extend [RecyclerViewAccessibilityDelegate] because
+ * that superclass handles RecyclerView scrolling while using a11y services.
+ */
+ private class RecyclerViewExpandingAccessibilityDelegate(
+ rdl: ResolverDrawerLayout,
+ view: RecyclerView
+ ) : RecyclerViewAccessibilityDelegate(view) {
+
+ private val delegate = AppListAccessibilityDelegate(rdl)
+
+ override fun onRequestSendAccessibilityEvent(
+ host: ViewGroup,
+ child: View,
+ event: AccessibilityEvent
+ ): Boolean {
+ super.onRequestSendAccessibilityEvent(host, child, event)
+ return delegate.onRequestSendAccessibilityEvent(host, child, event)
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
index dddbedac3dcc..e79fc74ffc86 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
@@ -22,12 +22,14 @@ import android.app.Notification
import android.app.Notification.EXTRA_SUBSTITUTE_APP_NAME
import android.app.PendingIntent
import android.app.StatusBarManager
+import android.app.UriGrantsManager
import android.app.smartspace.SmartspaceAction
import android.app.smartspace.SmartspaceConfig
import android.app.smartspace.SmartspaceManager
import android.app.smartspace.SmartspaceSession
import android.app.smartspace.SmartspaceTarget
import android.content.BroadcastReceiver
+import android.content.ContentProvider
import android.content.ContentResolver
import android.content.Context
import android.content.Intent
@@ -700,10 +702,13 @@ class MediaDataManager(
Log.d(TAG, "adding track for $userId from browser: $desc")
}
+ val currentEntry = mediaEntries.get(packageName)
+ val appUid = currentEntry?.appUid ?: Process.INVALID_UID
+
// Album art
var artworkBitmap = desc.iconBitmap
if (artworkBitmap == null && desc.iconUri != null) {
- artworkBitmap = loadBitmapFromUri(desc.iconUri!!)
+ artworkBitmap = loadBitmapFromUriForUser(desc.iconUri!!, userId, appUid, packageName)
}
val artworkIcon =
if (artworkBitmap != null) {
@@ -712,9 +717,7 @@ class MediaDataManager(
null
}
- val currentEntry = mediaEntries.get(packageName)
val instanceId = currentEntry?.instanceId ?: logger.getNewInstanceId()
- val appUid = currentEntry?.appUid ?: Process.INVALID_UID
val isExplicit =
desc.extras?.getLong(MediaConstants.METADATA_KEY_IS_EXPLICIT) ==
MediaConstants.METADATA_VALUE_ATTRIBUTE_PRESENT
@@ -1261,6 +1264,30 @@ class MediaDataManager(
false
}
}
+
+ /** Returns a bitmap if the user can access the given URI, else null */
+ private fun loadBitmapFromUriForUser(
+ uri: Uri,
+ userId: Int,
+ appUid: Int,
+ packageName: String,
+ ): Bitmap? {
+ try {
+ val ugm = UriGrantsManager.getService()
+ ugm.checkGrantUriPermission_ignoreNonSystem(
+ appUid,
+ packageName,
+ ContentProvider.getUriWithoutUserId(uri),
+ Intent.FLAG_GRANT_READ_URI_PERMISSION,
+ ContentProvider.getUserIdFromUri(uri, userId)
+ )
+ return loadBitmapFromUri(uri)
+ } catch (e: SecurityException) {
+ Log.e(TAG, "Failed to get URI permission: $e")
+ }
+ return null
+ }
+
/**
* Load a bitmap from a URI
*
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
index 2883210805d3..83a6e58cc444 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
@@ -35,7 +35,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.stack.MediaContainerView
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.settings.SecureSettings
import javax.inject.Inject
import javax.inject.Named
@@ -55,6 +55,7 @@ constructor(
private val secureSettings: SecureSettings,
@Main private val handler: Handler,
configurationController: ConfigurationController,
+ private val splitShadeStateController: SplitShadeStateController
) {
init {
@@ -108,7 +109,7 @@ constructor(
}
private fun updateResources() {
- useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ useSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
}
@VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
index c1c757e424dc..0b30e597ab1c 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
@@ -52,7 +52,7 @@ import com.android.systemui.statusbar.notification.stack.StackStateAnimator
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.KeyguardStateController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.animation.UniqueObjectHostView
import com.android.systemui.util.settings.SecureSettings
import com.android.systemui.util.traceSection
@@ -101,6 +101,7 @@ constructor(
panelEventsEvents: ShadeStateEvents,
private val secureSettings: SecureSettings,
@Main private val handler: Handler,
+ private val splitShadeStateController: SplitShadeStateController
) {
/** Track the media player setting status on lock screen. */
@@ -568,7 +569,7 @@ constructor(
context.resources.getDimensionPixelSize(
R.dimen.lockscreen_shade_media_transition_distance
)
- inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
index bb0e9d182579..7011ad992a91 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
@@ -127,7 +127,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
private final ActivityStarter mActivityStarter;
private final DialogLaunchAnimator mDialogLaunchAnimator;
private final CommonNotifCollection mNotifCollection;
- private final Object mMediaDevicesLock = new Object();
+ protected final Object mMediaDevicesLock = new Object();
@VisibleForTesting
final List<MediaDevice> mGroupMediaDevices = new CopyOnWriteArrayList<>();
final List<MediaDevice> mCachedMediaDevices = new CopyOnWriteArrayList<>();
@@ -222,7 +222,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
R.dimen.media_output_dialog_selectable_margin_end);
}
- void start(@NonNull Callback cb) {
+ protected void start(@NonNull Callback cb) {
synchronized (mMediaDevicesLock) {
mCachedMediaDevices.clear();
mMediaItemList.clear();
@@ -256,15 +256,15 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
return false;
}
- boolean isRefreshing() {
+ public boolean isRefreshing() {
return mIsRefreshing;
}
- void setRefreshing(boolean refreshing) {
+ public void setRefreshing(boolean refreshing) {
mIsRefreshing = refreshing;
}
- void stop() {
+ protected void stop() {
if (mMediaController != null) {
mMediaController.unregisterCallback(mCb);
}
@@ -551,7 +551,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
}
- void refreshDataSetIfNeeded() {
+ public void refreshDataSetIfNeeded() {
if (mNeedRefresh) {
buildMediaItems(mCachedMediaDevices);
mCallback.onDeviceListChanged();
@@ -605,6 +605,15 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
private void buildMediaItems(List<MediaDevice> devices) {
synchronized (mMediaDevicesLock) {
+ List<MediaItem> updatedMediaItems = buildMediaItems(mMediaItemList, devices);
+ mMediaItemList.clear();
+ mMediaItemList.addAll(updatedMediaItems);
+ }
+ }
+
+ protected List<MediaItem> buildMediaItems(List<MediaItem> oldMediaItems,
+ List<MediaDevice> devices) {
+ synchronized (mMediaDevicesLock) {
if (!mLocalMediaManager.isPreferenceRouteListingExist()) {
attachRangeInfo(devices);
Collections.sort(devices, Comparator.naturalOrder());
@@ -616,22 +625,20 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
final MediaDevice connectedMediaDevice =
needToHandleMutingExpectedDevice ? null
: getCurrentConnectedMediaDevice();
- if (mMediaItemList.isEmpty()) {
+ if (oldMediaItems.isEmpty()) {
if (connectedMediaDevice == null) {
if (DEBUG) {
Log.d(TAG, "No connected media device or muting expected device exist.");
}
- categorizeMediaItems(null, devices, needToHandleMutingExpectedDevice);
- return;
+ return categorizeMediaItems(null, devices, needToHandleMutingExpectedDevice);
}
// selected device exist
- categorizeMediaItems(connectedMediaDevice, devices, false);
- return;
+ return categorizeMediaItems(connectedMediaDevice, devices, false);
}
// To keep the same list order
final List<MediaDevice> targetMediaDevices = new ArrayList<>();
final Map<Integer, MediaItem> dividerItems = new HashMap<>();
- for (MediaItem originalMediaItem : mMediaItemList) {
+ for (MediaItem originalMediaItem : oldMediaItems) {
for (MediaDevice newDevice : devices) {
if (originalMediaItem.getMediaDevice().isPresent()
&& TextUtils.equals(originalMediaItem.getMediaDevice().get().getId(),
@@ -642,7 +649,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
if (originalMediaItem.getMediaItemType()
== MediaItem.MediaItemType.TYPE_GROUP_DIVIDER) {
- dividerItems.put(mMediaItemList.indexOf(originalMediaItem), originalMediaItem);
+ dividerItems.put(oldMediaItems.indexOf(originalMediaItem), originalMediaItem);
}
}
if (targetMediaDevices.size() != devices.size()) {
@@ -651,16 +658,18 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
List<MediaItem> finalMediaItems = targetMediaDevices.stream().map(
MediaItem::new).collect(Collectors.toList());
- dividerItems.forEach((key, item) -> {
- finalMediaItems.add(key, item);
- });
+ dividerItems.forEach(finalMediaItems::add);
attachConnectNewDeviceItemIfNeeded(finalMediaItems);
- mMediaItemList.clear();
- mMediaItemList.addAll(finalMediaItems);
+ return finalMediaItems;
}
}
- private void categorizeMediaItems(MediaDevice connectedMediaDevice, List<MediaDevice> devices,
+ /**
+ * Initial categorization of current devices, will not be called for updates to the devices
+ * list.
+ */
+ private List<MediaItem> categorizeMediaItems(MediaDevice connectedMediaDevice,
+ List<MediaDevice> devices,
boolean needToHandleMutingExpectedDevice) {
synchronized (mMediaDevicesLock) {
List<MediaItem> finalMediaItems = new ArrayList<>();
@@ -691,8 +700,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
}
attachConnectNewDeviceItemIfNeeded(finalMediaItems);
- mMediaItemList.clear();
- mMediaItemList.addAll(finalMediaItems);
+ return finalMediaItems;
}
}
@@ -765,7 +773,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
mGroupMediaDevices.clear();
}
- void connectDevice(MediaDevice device) {
+ protected void connectDevice(MediaDevice device) {
mMetricLogger.updateOutputEndPoints(getCurrentConnectedMediaDevice(), device);
ThreadUtils.postOnBackgroundThread(() -> {
@@ -777,7 +785,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
return mMediaItemList;
}
- MediaDevice getCurrentConnectedMediaDevice() {
+ public MediaDevice getCurrentConnectedMediaDevice() {
return mLocalMediaManager.getCurrentConnectedDevice();
}
@@ -794,7 +802,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
return mLocalMediaManager.getSelectableMediaDevice();
}
- List<MediaDevice> getSelectedMediaDevice() {
+ public List<MediaDevice> getSelectedMediaDevice() {
return mLocalMediaManager.getSelectedMediaDevice();
}
@@ -859,7 +867,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
UserHandle.of(UserHandle.myUserId()));
}
- boolean isAnyDeviceTransferring() {
+ public boolean isAnyDeviceTransferring() {
synchronized (mMediaDevicesLock) {
for (MediaItem mediaItem : mMediaItemList) {
if (mediaItem.getMediaDevice().isPresent()
@@ -976,7 +984,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
broadcast.setBroadcastCode(broadcastCode.getBytes(StandardCharsets.UTF_8));
}
- void setTemporaryAllowListExceptionIfNeeded(MediaDevice targetDevice) {
+ protected void setTemporaryAllowListExceptionIfNeeded(MediaDevice targetDevice) {
if (mPowerExemptionManager == null || mPackageName == null) {
Log.w(TAG, "powerExemptionManager or package name is null");
return;
@@ -1221,7 +1229,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
};
- interface Callback {
+ public interface Callback {
/**
* Override to handle the media content updating.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
index af659378e8f7..2b38edb3c47e 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
@@ -38,7 +38,7 @@ import javax.inject.Inject
/**
* Factory to create [MediaOutputDialog] objects.
*/
-class MediaOutputDialogFactory @Inject constructor(
+open class MediaOutputDialogFactory @Inject constructor(
private val context: Context,
private val mediaSessionManager: MediaSessionManager,
private val lbm: LocalBluetoothManager?,
@@ -60,7 +60,7 @@ class MediaOutputDialogFactory @Inject constructor(
}
/** Creates a [MediaOutputDialog] for the given package. */
- fun create(packageName: String, aboveStatusBar: Boolean, view: View? = null) {
+ open fun create(packageName: String, aboveStatusBar: Boolean, view: View? = null) {
// Dismiss the previous dialog, if any.
mediaOutputDialog?.dismiss()
@@ -89,7 +89,7 @@ class MediaOutputDialogFactory @Inject constructor(
}
/** dismiss [MediaOutputDialog] if exist. */
- fun dismiss() {
+ open fun dismiss() {
mediaOutputDialog?.dismiss()
mediaOutputDialog = null
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
index 5d732fb8ace9..cbb7e1d0ef83 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
@@ -17,6 +17,7 @@
package com.android.systemui.mediaprojection.appselector.view
import android.app.ActivityOptions
+import android.app.ComponentOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
import android.app.IActivityTaskManager
import android.graphics.Rect
import android.os.Binder
@@ -129,6 +130,9 @@ constructor(
view.width,
view.height
)
+ activityOptions.setPendingIntentBackgroundActivityStartMode(
+ MODE_BACKGROUND_ACTIVITY_START_ALLOWED
+ )
activityOptions.launchCookie = launchCookie
activityTaskManager.startActivityFromRecents(task.taskId, activityOptions.toBundle())
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index 555269d14cec..62b22c50c1dc 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -133,7 +133,6 @@ import com.android.systemui.recents.Recents;
import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserContextProvider;
import com.android.systemui.settings.UserTracker;
-import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.navigationbar.RegionSamplingHelper;
import com.android.systemui.shared.recents.utilities.Utilities;
@@ -156,6 +155,7 @@ import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.DeviceConfigProxy;
import com.android.systemui.util.ViewController;
import com.android.wm.shell.back.BackAnimation;
@@ -200,7 +200,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private final SysUiState mSysUiFlagsContainer;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
- private final ShadeController mShadeController;
+ private final KeyguardStateController mKeyguardStateController;
private final ShadeViewController mShadeViewController;
private final NotificationRemoteInputManager mNotificationRemoteInputManager;
private final OverviewProxyService mOverviewProxyService;
@@ -262,7 +262,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
@VisibleForTesting
public int mDisplayId;
private boolean mIsOnDefaultDisplay;
- public boolean mHomeBlockedThisTouch;
+ private boolean mHomeBlockedThisTouch;
/**
* When user is QuickSwitching between apps of different orientations, we'll draw a fake
@@ -531,7 +531,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
@Inject
NavigationBar(
NavigationBarView navigationBarView,
- ShadeController shadeController,
NavigationBarFrame navigationBarFrame,
@Nullable Bundle savedState,
@DisplayId Context context,
@@ -550,6 +549,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
Optional<Pip> pipOptional,
Optional<Recents> recentsOptional,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
+ KeyguardStateController keyguardStateController,
ShadeViewController shadeViewController,
NotificationRemoteInputManager notificationRemoteInputManager,
NotificationShadeDepthController notificationShadeDepthController,
@@ -585,7 +585,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mSysUiFlagsContainer = sysUiFlagsContainer;
mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
- mShadeController = shadeController;
+ mKeyguardStateController = keyguardStateController;
mShadeViewController = shadeViewController;
mNotificationRemoteInputManager = notificationRemoteInputManager;
mOverviewProxyService = overviewProxyService;
@@ -1326,8 +1326,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
mHomeBlockedThisTouch = false;
if (mTelecomManagerOptional.isPresent()
&& mTelecomManagerOptional.get().isRinging()) {
- if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing)
- .orElse(false)) {
+ if (mKeyguardStateController.isShowing()) {
Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " +
"No heads up");
mHomeBlockedThisTouch = true;
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
index 580facdda7d7..5a42028ae83e 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
@@ -19,7 +19,6 @@ package com.android.systemui.navigationbar;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_GESTURE;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR;
-
import static com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler.DEBUG_MISSING_GESTURE_TAG;
import static com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen;
@@ -58,7 +57,6 @@ import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.TaskStackChangeListeners;
import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.CommandQueue.Callbacks;
import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
import com.android.systemui.statusbar.phone.LightBarController;
@@ -75,7 +73,6 @@ import javax.inject.Inject;
/** A controller to handle navigation bars. */
@SysUISingleton
public class NavigationBarController implements
- Callbacks,
ConfigurationController.ConfigurationListener,
NavigationModeController.ModeChangedListener,
Dumpable {
@@ -130,7 +127,7 @@ public class NavigationBarController implements
mSecureSettings = secureSettings;
mDisplayTracker = displayTracker;
mDisplayManager = mContext.getSystemService(DisplayManager.class);
- commandQueue.addCallback(this);
+ commandQueue.addCallback(mCommandQueueCallbacks);
configurationController.addCallback(this);
mConfigChanges.applyNewConfig(mContext.getResources());
mNavMode = navigationModeController.addListener(this);
@@ -270,25 +267,51 @@ public class NavigationBarController implements
return taskbarEnabled;
}
- @Override
- public void onDisplayRemoved(int displayId) {
- removeNavigationBar(displayId);
- }
+ private final CommandQueue.Callbacks mCommandQueueCallbacks = new CommandQueue.Callbacks() {
+ @Override
+ public void onDisplayRemoved(int displayId) {
+ removeNavigationBar(displayId);
+ }
- @Override
- public void onDisplayReady(int displayId) {
- Display display = mDisplayManager.getDisplay(displayId);
- mIsLargeScreen = isLargeScreen(mContext);
- createNavigationBar(display, null /* savedState */, null /* result */);
- }
+ @Override
+ public void onDisplayReady(int displayId) {
+ Display display = mDisplayManager.getDisplay(displayId);
+ mIsLargeScreen = isLargeScreen(mContext);
+ createNavigationBar(display, null /* savedState */, null /* result */);
+ }
- @Override
- public void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
- final NavigationBar navigationBar = getNavigationBar(displayId);
- if (navigationBar != null) {
- navigationBar.setNavigationBarLumaSamplingEnabled(enable);
+ @Override
+ public void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
+ final NavigationBar navigationBar = getNavigationBar(displayId);
+ if (navigationBar != null) {
+ navigationBar.setNavigationBarLumaSamplingEnabled(enable);
+ }
}
- }
+
+ @Override
+ public void showPinningEnterExitToast(boolean entering) {
+ int displayId = mContext.getDisplayId();
+ final NavigationBarView navBarView = getNavigationBarView(displayId);
+ if (navBarView != null) {
+ navBarView.showPinningEnterExitToast(entering);
+ } else if (displayId == mDisplayTracker.getDefaultDisplayId()
+ && mTaskbarDelegate.isInitialized()) {
+ mTaskbarDelegate.showPinningEnterExitToast(entering);
+ }
+ }
+
+ @Override
+ public void showPinningEscapeToast() {
+ int displayId = mContext.getDisplayId();
+ final NavigationBarView navBarView = getNavigationBarView(displayId);
+ if (navBarView != null) {
+ navBarView.showPinningEscapeToast();
+ } else if (displayId == mDisplayTracker.getDefaultDisplayId()
+ && mTaskbarDelegate.isInitialized()) {
+ mTaskbarDelegate.showPinningEscapeToast();
+ }
+ }
+ };
/**
* Recreates the navigation bar for the given display.
@@ -446,26 +469,6 @@ public class NavigationBarController implements
return mNavigationBars.get(displayId);
}
- public void showPinningEnterExitToast(int displayId, boolean entering) {
- final NavigationBarView navBarView = getNavigationBarView(displayId);
- if (navBarView != null) {
- navBarView.showPinningEnterExitToast(entering);
- } else if (displayId == mDisplayTracker.getDefaultDisplayId()
- && mTaskbarDelegate.isInitialized()) {
- mTaskbarDelegate.showPinningEnterExitToast(entering);
- }
- }
-
- public void showPinningEscapeToast(int displayId) {
- final NavigationBarView navBarView = getNavigationBarView(displayId);
- if (navBarView != null) {
- navBarView.showPinningEscapeToast();
- } else if (displayId == mDisplayTracker.getDefaultDisplayId()
- && mTaskbarDelegate.isInitialized()) {
- mTaskbarDelegate.showPinningEscapeToast();
- }
- }
-
public boolean isOverviewEnabled(int displayId) {
final NavigationBarView navBarView = getNavigationBarView(displayId);
if (navBarView != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
index 146b5f57630e..79e7b710c56e 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
@@ -359,6 +359,7 @@ public class NavigationBarView extends FrameLayout {
public void setBackgroundExecutor(Executor bgExecutor) {
mBgExecutor = bgExecutor;
+ mRotationButtonController.setBgExecutor(bgExecutor);
}
public void setDisplayTracker(DisplayTracker displayTracker) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
index 856a92e85ad7..9359958397d1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
@@ -39,6 +39,7 @@ import com.android.systemui.settings.brightness.BrightnessMirrorHandler;
import com.android.systemui.settings.brightness.BrightnessSliderController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.tuner.TunerService;
import javax.inject.Inject;
@@ -80,9 +81,10 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
QSLogger qsLogger, BrightnessController.Factory brightnessControllerFactory,
BrightnessSliderController.Factory brightnessSliderFactory,
FalsingManager falsingManager,
- StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
+ StatusBarKeyguardViewManager statusBarKeyguardViewManager,
+ SplitShadeStateController splitShadeStateController) {
super(view, qsHost, qsCustomizerController, usingMediaPlayer, mediaHost,
- metricsLogger, uiEventLogger, qsLogger, dumpManager);
+ metricsLogger, uiEventLogger, qsLogger, dumpManager, splitShadeStateController);
mTunerService = tunerService;
mQsCustomizerController = qsCustomizerController;
mQsTileRevealControllerFactory = qsTileRevealControllerFactory;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
index 20f035260ba4..81e3a2f68bfd 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
@@ -40,7 +40,7 @@ import com.android.systemui.qs.customize.QSCustomizerController;
import com.android.systemui.qs.external.CustomTile;
import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.qs.tileimpl.QSTileViewImpl;
-import com.android.systemui.util.LargeScreenUtils;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.util.ViewController;
import com.android.systemui.util.animation.DisappearParameters;
@@ -86,6 +86,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
private final QSHost.Callback mQSHostCallback = this::setTiles;
+ private SplitShadeStateController mSplitShadeStateController;
+
@VisibleForTesting
protected final QSPanel.OnConfigurationChangedListener mOnConfigurationChangedListener =
new QSPanel.OnConfigurationChangedListener() {
@@ -93,8 +95,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
public void onConfigurationChange(Configuration newConfig) {
final boolean previousSplitShadeState = mShouldUseSplitNotificationShade;
final int previousOrientation = mLastOrientation;
- mShouldUseSplitNotificationShade =
- LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+ mShouldUseSplitNotificationShade = mSplitShadeStateController
+ .shouldUseSplitNotificationShade(getResources());
mLastOrientation = newConfig.orientation;
mQSLogger.logOnConfigurationChanged(
@@ -138,7 +140,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
MetricsLogger metricsLogger,
UiEventLogger uiEventLogger,
QSLogger qsLogger,
- DumpManager dumpManager
+ DumpManager dumpManager,
+ SplitShadeStateController splitShadeStateController
) {
super(view);
mHost = host;
@@ -149,8 +152,9 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
mUiEventLogger = uiEventLogger;
mQSLogger = qsLogger;
mDumpManager = dumpManager;
+ mSplitShadeStateController = splitShadeStateController;
mShouldUseSplitNotificationShade =
- LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+ mSplitShadeStateController.shouldUseSplitNotificationShade(getResources());
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
index 2d543139a1b4..585136ad0789 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
@@ -32,6 +32,7 @@ import com.android.systemui.plugins.qs.QSTile;
import com.android.systemui.qs.customize.QSCustomizerController;
import com.android.systemui.qs.dagger.QSScope;
import com.android.systemui.qs.logging.QSLogger;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.util.leak.RotationUtils;
import java.util.ArrayList;
@@ -55,10 +56,10 @@ public class QuickQSPanelController extends QSPanelControllerBase<QuickQSPanel>
@Named(QS_USING_COLLAPSED_LANDSCAPE_MEDIA)
Provider<Boolean> usingCollapsedLandscapeMediaProvider,
MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger,
- DumpManager dumpManager
+ DumpManager dumpManager, SplitShadeStateController splitShadeStateController
) {
super(view, qsHost, qsCustomizerController, usingMediaPlayer, mediaHost, metricsLogger,
- uiEventLogger, qsLogger, dumpManager);
+ uiEventLogger, qsLogger, dumpManager, splitShadeStateController);
mUsingCollapsedLandscapeMediaProvider = usingCollapsedLandscapeMediaProvider;
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 30218a6a3180..26912f82b3a3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -226,7 +226,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> {
listenToMetadata(device);
} else {
stopListeningToStaleDeviceMetadata();
- batteryLevel = device.getBatteryLevel();
+ batteryLevel = device.getMinBatteryLevelWithMemberDevices();
}
if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt
new file mode 100644
index 000000000000..1a03481b9fca
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt
@@ -0,0 +1,26 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.flow.Flow
+
+/**
+ * Provides data and availability for the tile. In most cases it would delegate data retrieval to
+ * repository, manager, controller or a combination of those. Avoid doing long running operations in
+ * these methods because there is no background thread guarantee. Use [Flow.flowOn] (typically
+ * with @Background [CoroutineDispatcher]) instead to move the calculations to another thread.
+ */
+interface QSTileDataInteractor<DATA_TYPE> {
+
+ /**
+ * Returns the data to be mapped to [QSTileState]. Make sure to start the flow [Flow.onStart]
+ * with the current state to update the tile as soon as possible.
+ */
+ fun tileData(qsTileDataRequest: QSTileDataRequest): Flow<DATA_TYPE>
+
+ /**
+ * Returns tile availability - whether this device currently supports this tile. Make sure to
+ * start the flow [Flow.onStart] with the current state to update the tile as soon as possible.
+ */
+ fun availability(): Flow<Boolean>
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt
new file mode 100644
index 000000000000..82897044f06c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt
@@ -0,0 +1,6 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+data class QSTileDataRequest(
+ val userId: Int,
+ val trigger: StateUpdateTrigger,
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt
new file mode 100644
index 000000000000..8569fc73adb4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt
@@ -0,0 +1,13 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import android.annotation.WorkerThread
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+
+interface QSTileUserActionInteractor<DATA_TYPE> {
+
+ /**
+ * Processes user input based on [userAction] and [currentData]. It's safe to run long running
+ * computations inside this function in this.
+ */
+ @WorkerThread suspend fun handleInput(userAction: QSTileUserAction, currentData: DATA_TYPE)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt
new file mode 100644
index 000000000000..ed7ec8e32de4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt
@@ -0,0 +1,11 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+
+sealed interface StateUpdateTrigger {
+ class UserAction<T>(val action: QSTileUserAction, val tileState: QSTileState, val tileData: T) :
+ StateUpdateTrigger
+ data object ForceUpdate : StateUpdateTrigger
+ data object InitialRequest : StateUpdateTrigger
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt
new file mode 100644
index 000000000000..a5eaac154230
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt
@@ -0,0 +1,14 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.graphics.drawable.Icon
+import com.android.systemui.qs.pipeline.shared.TileSpec
+
+data class QSTileConfig(
+ val tileSpec: TileSpec,
+ val tileIcon: Icon,
+ val tileLabel: CharSequence,
+// TODO(b/299908705): Fill necessary params
+/*
+val instanceId: InstanceId,
+ */
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt
new file mode 100644
index 000000000000..39db7038bfa2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt
@@ -0,0 +1,6 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+enum class QSTileLifecycle {
+ ON_CREATE,
+ ON_DESTROY,
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt
new file mode 100644
index 000000000000..53f9edfb954c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt
@@ -0,0 +1,18 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.graphics.drawable.Icon
+
+data class QSTileState(
+ val icon: Icon,
+ val label: CharSequence,
+// TODO(b/299908705): Fill necessary params
+/*
+ val subtitle: CharSequence = "",
+ val activeState: ActivationState = Active,
+ val enabledState: Enabled = Enabled,
+ val loopIconAnimation: Boolean = false,
+ val secondaryIcon: Icon? = null,
+ val slashState: SlashState? = null,
+ val supportedActions: Collection<UserAction> = listOf(Click), clicks should be a default action
+*/
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt
new file mode 100644
index 000000000000..f1f8f0152c67
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt
@@ -0,0 +1,13 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.content.Context
+import android.view.View
+
+sealed interface QSTileUserAction {
+
+ val context: Context
+ val view: View?
+
+ class Click(override val context: Context, override val view: View?) : QSTileUserAction
+ class LongClick(override val context: Context, override val view: View?) : QSTileUserAction
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt
new file mode 100644
index 000000000000..49077f3f310d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt
@@ -0,0 +1,41 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.StateFlow
+
+/**
+ * Represents tiles behaviour logic. This ViewModel is a connection between tile view and data
+ * layers.
+ */
+interface QSTileViewModel {
+
+ /**
+ * State of the tile to be shown by the view. Favor reactive consumption over the
+ * [StateFlow.value], because there is no guarantee that current value would be available at any
+ * time.
+ */
+ val state: StateFlow<QSTileState>
+
+ val config: QSTileConfig
+
+ val isAvailable: Flow<Boolean>
+
+ /**
+ * Handles ViewModel lifecycle. Implementations should be inactive outside of
+ * [QSTileLifecycle.ON_CREATE] and [QSTileLifecycle.ON_DESTROY] bounds.
+ */
+ fun onLifecycle(lifecycle: QSTileLifecycle)
+
+ /**
+ * Notifies about the user change. Implementations should avoid using 3rd party userId sources
+ * and use this value instead. This is to maintain consistent and concurrency-free behaviour
+ * across different parts of QS.
+ */
+ fun onUserIdChanged(userId: Int)
+
+ /** Triggers emit of the new [QSTileState] in [state]. */
+ fun forceUpdate()
+
+ /** Notifies underlying logic about user input. */
+ fun onActionPerformed(userAction: QSTileUserAction)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
index 4b22edcc29ad..21c5ae8aec40 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
@@ -16,7 +16,6 @@
package com.android.systemui.recents;
-import android.annotation.Nullable;
import android.content.Context;
import android.os.Handler;
import android.os.RemoteException;
@@ -25,11 +24,7 @@ import android.util.Log;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.shared.recents.IOverviewProxy;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
-
-import dagger.Lazy;
-
-import java.util.Optional;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
import javax.inject.Inject;
@@ -40,20 +35,20 @@ import javax.inject.Inject;
public class OverviewProxyRecentsImpl implements RecentsImplementation {
private final static String TAG = "OverviewProxyRecentsImpl";
- @Nullable
- private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
-
private Handler mHandler;
private final OverviewProxyService mOverviewProxyService;
private final ActivityStarter mActivityStarter;
+ private final KeyguardStateController mKeyguardStateController;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
@Inject
- public OverviewProxyRecentsImpl(Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
- OverviewProxyService overviewProxyService, ActivityStarter activityStarter) {
- mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
+ public OverviewProxyRecentsImpl(
+ OverviewProxyService overviewProxyService,
+ ActivityStarter activityStarter,
+ KeyguardStateController keyguardStateController) {
mOverviewProxyService = overviewProxyService;
mActivityStarter = activityStarter;
+ mKeyguardStateController = keyguardStateController;
}
@Override
@@ -101,9 +96,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation {
}
};
// Preload only if device for current user is unlocked
- final Optional<CentralSurfaces> centralSurfacesOptional =
- mCentralSurfacesOptionalLazy.get();
- if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) {
+ if (mKeyguardStateController.isShowing()) {
mActivityStarter.executeRunnableDismissingKeyguard(
() -> mHandler.post(toggleRecents), null, true /* dismissShade */,
false /* afterKeyguardGone */,
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
index 83fb723eda82..291d273d611f 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
@@ -69,7 +69,9 @@ constructor(
listOf(ComposeMustBeAvailable(), CompileTimeFlagMustBeEnabled())
override fun isEnabled(): Boolean {
- return requirements.all { it.isMet() }
+ // SCENE_CONTAINER_ENABLED is an explicit static flag check that helps with downstream
+ // optimizations, e.g., unused code stripping. Do not remove!
+ return Flags.SCENE_CONTAINER_ENABLED && requirements.all { it.isMet() }
}
override fun requirementDescription(): String {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 246ea0ed1e13..15a097239704 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -97,6 +97,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.policy.SystemBarUtils;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.ActiveUnlockConfig;
import com.android.keyguard.FaceAuthApiRequestReason;
@@ -140,7 +141,6 @@ import com.android.systemui.keyguard.shared.model.TransitionState;
import com.android.systemui.keyguard.shared.model.TransitionStep;
import com.android.systemui.keyguard.shared.model.WakefulnessModel;
import com.android.systemui.keyguard.ui.binder.KeyguardLongPressViewBinder;
-import com.android.systemui.keyguard.ui.view.KeyguardRootView;
import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel;
import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel;
import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingTransitionViewModel;
@@ -165,7 +165,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.shade.data.repository.ShadeRepository;
import com.android.systemui.shade.transition.ShadeTransitionController;
-import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.GestureRecorder;
@@ -223,10 +222,10 @@ import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcherController;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcherView;
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.statusbar.window.StatusBarWindowStateController;
import com.android.systemui.unfold.SysUIUnfoldComponent;
import com.android.systemui.util.Compile;
-import com.android.systemui.util.LargeScreenUtils;
import com.android.systemui.util.Utils;
import com.android.systemui.util.time.SystemClock;
import com.android.wm.shell.animation.FlingAnimationUtils;
@@ -236,7 +235,6 @@ import kotlin.Unit;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
@@ -320,7 +318,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private final NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
private final LayoutInflater mLayoutInflater;
private final FeatureFlags mFeatureFlags;
- private final PowerManager mPowerManager;
private final AccessibilityManager mAccessibilityManager;
private final NotificationWakeUpCoordinator mWakeUpCoordinator;
private final PulseExpansionHandler mPulseExpansionHandler;
@@ -336,6 +333,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private final KeyguardUserSwitcherComponent.Factory mKeyguardUserSwitcherComponentFactory;
private final KeyguardStatusBarViewComponent.Factory mKeyguardStatusBarViewComponentFactory;
private final FragmentService mFragmentService;
+ private final IStatusBarService mStatusBarService;
private final ScrimController mScrimController;
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
private final TapAgainViewController mTapAgainViewController;
@@ -356,7 +354,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private final AccessibilityDelegate mAccessibilityDelegate = new ShadeAccessibilityDelegate();
private final NotificationGutsManager mGutsManager;
private final AlternateBouncerInteractor mAlternateBouncerInteractor;
- private final KeyguardRootView mKeyguardRootView;
private final QuickSettingsController mQsController;
private final TouchHandler mTouchHandler = new TouchHandler();
@@ -369,9 +366,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private float mExpandedHeight = 0;
/** The current squish amount for the predictive back animation */
private float mCurrentBackProgress = 0.0f;
- private boolean mTracking;
- private boolean mIsTrackingExpansionFromStatusBar;
- private boolean mHintAnimationRunning;
@Deprecated
private KeyguardBottomAreaView mKeyguardBottomArea;
private boolean mExpanding;
@@ -622,7 +616,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private int mLockscreenToDreamingTransitionTranslationY;
private int mGoneToDreamingTransitionTranslationY;
private int mLockscreenToOccludedTransitionTranslationY;
-
+ private SplitShadeStateController mSplitShadeStateController;
private final Runnable mFlingCollapseRunnable = () -> fling(0, false /* expand */,
mNextCollapseSpeedUpFactor, false /* expandBecauseOfFalsing */);
private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable =
@@ -744,6 +738,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
NavigationBarController navigationBarController,
QuickSettingsController quickSettingsController,
FragmentService fragmentService,
+ IStatusBarService statusBarService,
ContentResolver contentResolver,
ShadeHeaderController shadeHeaderController,
ScreenOffAnimationController screenOffAnimationController,
@@ -780,7 +775,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
SharedNotificationContainerInteractor sharedNotificationContainerInteractor,
KeyguardViewConfigurator keyguardViewConfigurator,
KeyguardFaceAuthInteractor keyguardFaceAuthInteractor,
- KeyguardRootView keyguardRootView) {
+ SplitShadeStateController splitShadeStateController) {
keyguardStateController.addCallback(new KeyguardStateController.Callback() {
@Override
public void onKeyguardFadingAwayChanged() {
@@ -874,9 +869,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory;
mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory;
mFragmentService = fragmentService;
+ mStatusBarService = statusBarService;
mSettingsChangeObserver = new SettingsChangeObserver(handler);
+ mSplitShadeStateController = splitShadeStateController;
mSplitShadeEnabled =
- LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+ mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
mView.setWillNotDraw(!DEBUG_DRAWABLE);
mShadeHeaderController = shadeHeaderController;
mLayoutInflater = layoutInflater;
@@ -884,7 +881,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mAnimateBack = mFeatureFlags.isEnabled(Flags.WM_SHADE_ANIMATE_BACK_GESTURE);
mTrackpadGestureFeaturesEnabled = mFeatureFlags.isEnabled(Flags.TRACKPAD_GESTURE_FEATURES);
mFalsingCollector = falsingCollector;
- mPowerManager = powerManager;
mWakeUpCoordinator = coordinator;
mMainDispatcher = mainDispatcher;
mAccessibilityManager = accessibilityManager;
@@ -985,7 +981,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
});
mAlternateBouncerInteractor = alternateBouncerInteractor;
- mKeyguardRootView = keyguardRootView;
dumpManager.registerDumpable(this);
}
@@ -1004,7 +999,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// cause blurring. This will eventually be re-enabled by the panel view on
// ACTION_UP, since the user's finger might still be down after a swipe to
// unlock gesture, and we don't want that to cause blurring either.
- mDepthController.setBlursDisabledForUnlock(mTracking);
+ mDepthController.setBlursDisabledForUnlock(isTracking());
if (playingCannedAnimation && !isWakeAndUnlockNotFromDream) {
// Hide the panel so it's not in the way or the surface behind the
@@ -1298,7 +1293,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
@Override
public void updateResources() {
final boolean newSplitShadeEnabled =
- LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+ mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
final boolean splitShadeChanged = mSplitShadeEnabled != newSplitShadeEnabled;
mSplitShadeEnabled = newSplitShadeEnabled;
mQsController.updateResources();
@@ -1517,7 +1512,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
private boolean shouldAvoidChangingNotificationsCount() {
- return mHintAnimationRunning || mUnlockedScreenOffAnimationController.isAnimationPlaying();
+ return mUnlockedScreenOffAnimationController.isAnimationPlaying();
}
@Deprecated
@@ -2547,10 +2542,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private void onHeightUpdated(float expandedHeight) {
if (expandedHeight <= 0) {
mShadeLog.logExpansionChanged("onHeightUpdated: fully collapsed.",
- mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx);
+ mExpandedFraction, isExpanded(), isTracking(), mExpansionDragDownAmountPx);
} else if (isFullyExpanded()) {
mShadeLog.logExpansionChanged("onHeightUpdated: fully expanded.",
- mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx);
+ mExpandedFraction, isExpanded(), isTracking(), mExpansionDragDownAmountPx);
}
if (!mQsController.getExpanded() || mQsController.isExpandImmediate()
|| mIsExpandingOrCollapsing && mQsController.getExpandedWhenExpandingStarted()) {
@@ -2643,7 +2638,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
&& !mHeadsUpManager.hasPinnedHeadsUp()) {
alpha = getFadeoutAlpha();
}
- if (mBarState == KEYGUARD && !mHintAnimationRunning
+ if (mBarState == KEYGUARD
&& !mKeyguardBypassController.getBypassEnabled()
&& !mQsController.getFullyExpanded()) {
alpha *= mClockPositionResult.clockAlpha;
@@ -2681,7 +2676,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// change due to "unlock hint animation." In this case, fading out the bottom area
// would also hide the message that says "swipe to unlock," we don't want to do that.
float expansionAlpha = MathUtils.constrainedMap(0f, 1f,
- isUnlockHintRunning() ? 0f : KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
+ KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
getExpandedFraction());
float alpha = Math.min(expansionAlpha, 1 - mQsController.computeExpansionFraction());
@@ -2743,7 +2738,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mAnimateAfterExpanding = animate;
mUpdateFlingOnLayout = false;
abortAnimations();
- if (mTracking) {
+ if (isTracking()) {
// The panel is expanded after this call.
onTrackingStopped(true /* expands */);
}
@@ -2830,7 +2825,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private void onTrackingStarted() {
endClosing();
- mTracking = true;
+ mShadeRepository.setLegacyShadeTracking(true);
mTrackingStartedListener.onTrackingStarted();
notifyExpandingStarted();
updateExpansionAndVisibility();
@@ -2844,8 +2839,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
private void onTrackingStopped(boolean expand) {
- mTracking = false;
- maybeStopTrackingExpansionFromStatusBar(expand);
+ mShadeRepository.setLegacyShadeTracking(false);
updateExpansionAndVisibility();
if (expand) {
@@ -2864,44 +2858,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mView.getHeight(), mNavigationBarBottomHeight);
}
- @VisibleForTesting
- void startUnlockHintAnimation() {
- if (mPowerManager.isPowerSaveMode() || mAmbientState.getDozeAmount() > 0f) {
- onUnlockHintStarted();
- onUnlockHintFinished();
- return;
- }
-
- // We don't need to hint the user if an animation is already running or the user is changing
- // the expansion.
- if (mHeightAnimator != null || mTracking) {
- return;
- }
- notifyExpandingStarted();
- startUnlockHintAnimationPhase1(() -> {
- notifyExpandingFinished();
- onUnlockHintFinished();
- mHintAnimationRunning = false;
- });
- onUnlockHintStarted();
- mHintAnimationRunning = true;
- }
-
- @VisibleForTesting
- void onUnlockHintFinished() {
- // Delay the reset a bit so the user can read the text.
- mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS);
- mScrimController.setExpansionAffectsAlpha(true);
- mNotificationStackScrollLayoutController.setUnlockHintRunning(false);
- }
-
- @VisibleForTesting
- void onUnlockHintStarted() {
- mKeyguardIndicationController.showActionToUnlock();
- mScrimController.setExpansionAffectsAlpha(false);
- mNotificationStackScrollLayoutController.setUnlockHintRunning(true);
- }
-
private boolean shouldUseDismissingAnimation() {
return mBarState != StatusBarState.SHADE && (mKeyguardStateController.canDismissLockScreen()
|| !isTracking());
@@ -2988,7 +2944,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
mLockscreenGestureLogger
.log(LockscreenUiEvent.LOCKSCREEN_LOCK_SHOW_HINT);
- startUnlockHintAnimation();
+ mKeyguardIndicationController.showActionToUnlock();
}
}
break;
@@ -3036,7 +2992,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private void setHeadsUpManager(HeadsUpManagerPhone headsUpManager) {
mHeadsUpManager = headsUpManager;
mHeadsUpManager.addListener(mOnHeadsUpChangedListener);
- mHeadsUpTouchHelper = new HeadsUpTouchHelper(headsUpManager,
+ mHeadsUpTouchHelper = new HeadsUpTouchHelper(
+ headsUpManager,
+ mStatusBarService,
mNotificationStackScrollLayoutController.getHeadsUpCallback(),
new HeadsUpNotificationViewControllerImpl());
}
@@ -3053,7 +3011,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
private void updateExpandedHeight(float expandedHeight) {
- if (mTracking) {
+ if (isTracking()) {
mNotificationStackScrollLayoutController
.setExpandingVelocity(getCurrentExpandVelocity());
}
@@ -3142,7 +3100,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mTouchDisabled = disabled;
if (mTouchDisabled) {
cancelHeightAnimator();
- if (mTracking) {
+ if (isTracking()) {
onTrackingStopped(true /* expanded */);
}
notifyExpandingFinished();
@@ -3381,7 +3339,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
@Override
public void blockExpansionForCurrentTouch() {
- mBlockingExpansionForCurrentTouch = mTracking;
+ mBlockingExpansionForCurrentTouch = isTracking();
}
@Override
@@ -3395,8 +3353,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
ipw.print("mIsLaunchAnimationRunning="); ipw.println(mIsLaunchAnimationRunning);
ipw.print("mOverExpansion="); ipw.println(mOverExpansion);
ipw.print("mExpandedHeight="); ipw.println(mExpandedHeight);
- ipw.print("mTracking="); ipw.println(mTracking);
- ipw.print("mHintAnimationRunning="); ipw.println(mHintAnimationRunning);
+ ipw.print("isTracking()="); ipw.println(isTracking());
ipw.print("mExpanding="); ipw.println(mExpanding);
ipw.print("mSplitShadeEnabled="); ipw.println(mSplitShadeEnabled);
ipw.print("mKeyguardNotificationBottomPadding=");
@@ -3734,7 +3691,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mQsController.beginJankMonitoring(isFullyCollapsed());
}
mInitialOffsetOnTouch = expandedHeight;
- if (!mTracking || isFullyCollapsed()) {
+ if (!isTracking() || isFullyCollapsed()) {
mInitialExpandY = newY;
mInitialExpandX = newX;
} else {
@@ -3752,7 +3709,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mShadeLog.logEndMotionEvent("endMotionEvent called", forceCancel, false);
mTrackingPointer = -1;
mAmbientState.setSwipingUp(false);
- if ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
+ if ((isTracking() && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
|| Math.abs(y - mInitialExpandY) > mTouchSlop
|| (!isFullyExpanded() && !isFullyCollapsed())
|| event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
@@ -3916,7 +3873,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return;
}
- if (mTracking && !(mBlockingExpansionForCurrentTouch
+ if (isTracking() && !(mBlockingExpansionForCurrentTouch
|| mQsController.isTrackingBlocked())) {
return;
}
@@ -3942,7 +3899,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
float maxPanelHeight = getMaxPanelTransitionDistance();
if (mHeightAnimator == null) {
// Split shade has its own overscroll logic
- if (mTracking) {
+ if (isTracking()) {
float overExpansionPixels = Math.max(0, h - maxPanelHeight);
setOverExpansionInternal(overExpansionPixels, true /* isFromGesture */);
}
@@ -4029,12 +3986,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
public boolean isTracking() {
- return mTracking;
+ return mShadeRepository.getLegacyShadeTracking().getValue();
}
@Override
public boolean canBeCollapsed() {
- return !isFullyCollapsed() && !mTracking && !mClosing;
+ return !isFullyCollapsed() && !isTracking() && !mClosing;
}
@Override
@@ -4055,73 +4012,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mView.removeCallbacks(mFlingCollapseRunnable);
}
- @Override
- public boolean isUnlockHintRunning() {
- return mHintAnimationRunning;
- }
-
- /**
- * Phase 1: Move everything upwards.
- */
- private void startUnlockHintAnimationPhase1(final Runnable onAnimationFinished) {
- float target = Math.max(0, getMaxPanelHeight() - mHintDistance);
- ValueAnimator animator = createHeightAnimator(target);
- animator.setDuration(250);
- animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
- animator.addListener(new AnimatorListenerAdapter() {
- private boolean mCancelled;
-
- @Override
- public void onAnimationCancel(Animator animation) {
- mCancelled = true;
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- if (mCancelled) {
- setAnimator(null);
- onAnimationFinished.run();
- } else {
- startUnlockHintAnimationPhase2(onAnimationFinished);
- }
- }
- });
- animator.start();
- setAnimator(animator);
-
-
- if (mFeatureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- final ViewPropertyAnimator mKeyguardRootViewAnimator = mKeyguardRootView.animate();
- mKeyguardRootViewAnimator
- .translationY(-mHintDistance)
- .setDuration(250)
- .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
- .withEndAction(() -> mKeyguardRootViewAnimator
- .translationY(0)
- .setDuration(450)
- .setInterpolator(mBounceInterpolator)
- .start())
- .start();
- } else {
- final List<ViewPropertyAnimator> indicationAnimators =
- mKeyguardBottomArea.getIndicationAreaAnimators();
-
- for (final ViewPropertyAnimator indicationAreaAnimator : indicationAnimators) {
- indicationAreaAnimator
- .translationY(-mHintDistance)
- .setDuration(250)
- .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
- .withEndAction(() -> indicationAreaAnimator
- .translationY(0)
- .setDuration(450)
- .setInterpolator(mBounceInterpolator)
- .start())
- .start();
- }
- }
-
- }
-
private void setAnimator(ValueAnimator animator) {
mHeightAnimator = animator;
if (animator == null && mPanelUpdateWhenAnimatorEnds) {
@@ -4132,7 +4022,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
/** Returns whether a shade or QS expansion animation is running */
private boolean isShadeOrQsHeightAnimationRunning() {
- return mHeightAnimator != null && !mHintAnimationRunning && !mIsSpringBackAnimation;
+ return mHeightAnimator != null && !mIsSpringBackAnimation;
}
/**
@@ -4193,7 +4083,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
@Override
public void updateExpansionAndVisibility() {
mShadeExpansionStateManager.onPanelExpansionChanged(
- mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx);
+ mExpandedFraction, isExpanded(), isTracking(), mExpansionDragDownAmountPx);
updateVisibility();
}
@@ -4203,7 +4093,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return mExpandedFraction > 0f
|| mInstantExpanding
|| isPanelVisibleBecauseOfHeadsUp()
- || mTracking
+ || isTracking()
|| mHeightAnimator != null
|| isPanelVisibleBecauseScrimIsAnimatingOff()
&& !mIsSpringBackAnimation;
@@ -4211,9 +4101,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
/** Called when the user performs a click anywhere in the empty area of the panel. */
private void onEmptySpaceClick() {
- if (!mHintAnimationRunning) {
- onMiddleClicked();
- }
+ onMiddleClicked();
}
@VisibleForTesting
@@ -4244,42 +4132,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
@Override
- public void startTrackingExpansionFromStatusBar() {
- mIsTrackingExpansionFromStatusBar = true;
- InteractionJankMonitorWrapper.begin(
- mView, InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
- }
-
- /**
- * Stops tracking an expansion that originated from the status bar (if we had started tracking
- * it).
- *
- * @param expand the expand boolean passed to {@link #onTrackingStopped(boolean)}.
- */
- private void maybeStopTrackingExpansionFromStatusBar(boolean expand) {
- if (!mIsTrackingExpansionFromStatusBar) {
- return;
- }
- mIsTrackingExpansionFromStatusBar = false;
-
- // Determine whether the shade actually expanded due to the status bar touch:
- // - If the user just taps on the status bar, then #isExpanded is false but
- // #onTrackingStopped is called with `true`.
- // - If the user drags down on the status bar but doesn't drag down far enough, then
- // #onTrackingStopped is called with `false` but #isExpanded is true.
- // So, we need *both* #onTrackingStopped called with `true` *and* #isExpanded to be true in
- // order to confirm that the shade successfully opened.
- boolean shadeExpansionFromStatusBarSucceeded = expand && isExpanded();
- if (shadeExpansionFromStatusBarSucceeded) {
- InteractionJankMonitorWrapper.end(
- InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
- } else {
- InteractionJankMonitorWrapper.cancel(
- InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
- }
- }
-
- @Override
public void updateTouchableRegion() {
//A layout will ensure that onComputeInternalInsets will be called and after that we can
// resize the layout. Make sure that the window stays small for one frame until the
@@ -4849,11 +4701,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return mStatusBarStateListener;
}
- @VisibleForTesting
- boolean isHintAnimationRunning() {
- return mHintAnimationRunning;
- }
-
private void onStatusBarWindowStateChanged(@StatusBarManager.WindowVisibleState int state) {
if (state != WINDOW_STATE_SHOWING
&& mStatusBarStateController.getState() == StatusBarState.SHADE) {
@@ -4942,15 +4789,14 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mAnimatingOnDown = mHeightAnimator != null && !mIsSpringBackAnimation;
mMinExpandHeight = 0.0f;
mDownTime = mSystemClock.uptimeMillis();
- if (mAnimatingOnDown && mClosing && !mHintAnimationRunning) {
+ if (mAnimatingOnDown && mClosing) {
cancelHeightAnimator();
mTouchSlopExceeded = true;
mShadeLog.v("NotificationPanelViewController MotionEvent intercepted:"
- + " mAnimatingOnDown: true, mClosing: true, mHintAnimationRunning:"
- + " false");
+ + " mAnimatingOnDown: true, mClosing: true");
return true;
}
- if (!mTracking || isFullyCollapsed()) {
+ if (!isTracking() || isFullyCollapsed()) {
mInitialExpandY = y;
mInitialExpandX = x;
} else {
@@ -5127,7 +4973,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// If dragging should not expand the notifications shade, then return false.
if (!mNotificationsDragEnabled) {
- if (mTracking) {
+ if (isTracking()) {
// Turn off tracking if it's on or the shade can get stuck in the down position.
onTrackingStopped(true /* expand */);
}
@@ -5253,7 +5099,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
&& (Math.abs(h) > Math.abs(x - mInitialExpandX)
|| mIgnoreXTouchSlop)) {
mTouchSlopExceeded = true;
- if (mGestureWaitForTouchSlop && !mTracking && !mCollapsedAndHeadsUpOnDown) {
+ if (mGestureWaitForTouchSlop
+ && !isTracking()
+ && !mCollapsedAndHeadsUpOnDown) {
if (mInitialOffsetOnTouch != 0f) {
startExpandMotion(x, y, false /* startTracking */, mExpandedHeight);
h = 0;
@@ -5268,7 +5116,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mTouchAboveFalsingThreshold = true;
mUpwardsWhenThresholdReached = isDirectionUpwards(x, y);
}
- if ((!mGestureWaitForTouchSlop || mTracking)
+ if ((!mGestureWaitForTouchSlop || isTracking())
&& !(mBlockingExpansionForCurrentTouch
|| mQsController.isTrackingBlocked())) {
// Count h==0 as part of swipe-up,
@@ -5294,7 +5142,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
break;
}
- return !mGestureWaitForTouchSlop || mTracking;
+ return !mGestureWaitForTouchSlop || isTracking();
}
}
@@ -5318,11 +5166,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
public void startExpand(float x, float y, boolean startTracking, float expandedHeight) {
startExpandMotion(x, y, startTracking, expandedHeight);
}
-
- @Override
- public void clearNotificationEffects() {
- mCentralSurfaces.clearNotificationEffects();
- }
}
private final class ShadeAccessibilityDelegate extends AccessibilityDelegate {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
index 0f85c7616071..880ba92123c6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
@@ -37,6 +37,7 @@ import com.android.keyguard.LockIconViewController;
import com.android.keyguard.dagger.KeyguardBouncerComponent;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
+import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.back.domain.interactor.BackActionInteractor;
import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor;
import com.android.systemui.bouncer.ui.binder.KeyguardBouncerViewBinder;
@@ -560,7 +561,9 @@ public class NotificationShadeWindowViewController implements Dumpable {
void setExpandAnimationRunning(boolean running) {
if (mExpandAnimationRunning != running) {
// TODO(b/288507023): Remove this log.
- Log.d(TAG, "Setting mExpandAnimationRunning=" + running);
+ if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "Setting mExpandAnimationRunning=" + running);
+ }
if (running) {
mLaunchAnimationTimeout = mClock.uptimeMillis() + 5000;
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
index 941254223965..bdf114efb2b4 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
@@ -39,6 +39,7 @@ import com.android.systemui.recents.OverviewProxyService
import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
import com.android.systemui.shared.system.QuickStepContract
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.LargeScreenUtils
import com.android.systemui.util.ViewController
import com.android.systemui.util.concurrency.DelayableExecutor
@@ -61,6 +62,7 @@ class NotificationsQSContainerController @Inject constructor(
private val featureFlags: FeatureFlags,
private val
notificationStackScrollLayoutController: NotificationStackScrollLayoutController,
+ private val splitShadeStateController: SplitShadeStateController
) : ViewController<NotificationsQuickSettingsContainer>(view), QSContainerController {
private var qsExpanded = false
@@ -149,7 +151,8 @@ class NotificationsQSContainerController @Inject constructor(
}
fun updateResources() {
- val newSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(resources)
+ val newSplitShadeEnabled =
+ splitShadeStateController.shouldUseSplitNotificationShade(resources)
val splitShadeEnabledChanged = newSplitShadeEnabled != splitShadeEnabled
splitShadeEnabled = newSplitShadeEnabled
largeScreenShadeHeaderActive = LargeScreenUtils.shouldUseLargeScreenShadeHeader(resources)
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index b2bbffdb5453..ff0d78f89e68 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -100,6 +100,7 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.util.LargeScreenUtils;
import com.android.systemui.util.kotlin.JavaAdapter;
@@ -150,6 +151,7 @@ public class QuickSettingsController implements Dumpable {
private final ShadeLogger mShadeLog;
private final KeyguardFaceAuthInteractor mKeyguardFaceAuthInteractor;
private final CastController mCastController;
+ private final SplitShadeStateController mSplitShadeStateController;
private final FeatureFlags mFeatureFlags;
private final InteractionJankMonitor mInteractionJankMonitor;
private final ShadeRepository mShadeRepository;
@@ -199,8 +201,6 @@ public class QuickSettingsController implements Dumpable {
private float mInitialTouchY;
/** whether current touch Y delta is above falsing threshold */
private boolean mTouchAboveFalsingThreshold;
- /** whether we are tracking a touch on QS container */
- private boolean mTracking;
/** pointerId of the pointer we're currently tracking */
private int mTrackingPointer;
@@ -344,14 +344,16 @@ public class QuickSettingsController implements Dumpable {
ShadeRepository shadeRepository,
ShadeInteractor shadeInteractor,
JavaAdapter javaAdapter,
- CastController castController
+ CastController castController,
+ SplitShadeStateController splitShadeStateController
) {
mPanelViewControllerLazy = panelViewControllerLazy;
mPanelView = panelView;
mQsFrame = mPanelView.findViewById(R.id.qs_frame);
mKeyguardStatusBar = mPanelView.findViewById(R.id.keyguard_header);
mResources = mPanelView.getResources();
- mSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+ mSplitShadeStateController = splitShadeStateController;
+ mSplitShadeEnabled = mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
mQsFrameTranslateController = qsFrameTranslateController;
mShadeTransitionController = shadeTransitionController;
mPulseExpansionHandler = pulseExpansionHandler;
@@ -437,7 +439,7 @@ public class QuickSettingsController implements Dumpable {
}
void updateResources() {
- mSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+ mSplitShadeEnabled = mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
if (mQs != null) {
mQs.setInSplitShade(mSplitShadeEnabled);
}
@@ -596,7 +598,7 @@ public class QuickSettingsController implements Dumpable {
@VisibleForTesting
boolean isTracking() {
- return mTracking;
+ return mShadeRepository.getLegacyQsTracking().getValue();
}
public boolean getFullyExpanded() {
@@ -609,10 +611,14 @@ public class QuickSettingsController implements Dumpable {
// split shade as there QS are always expanded so every collapsing motion is motion from
// expanded QS to closed panel
return mExpandImmediate || (mExpanded
- && !mTracking && !isExpansionAnimating()
+ && !isTracking() && !isExpansionAnimating()
&& !mExpansionFromOverscroll);
}
+ private void setTracking(boolean tracking) {
+ mShadeRepository.setLegacyQsTracking(tracking);
+ }
+
private boolean isQsFragmentCreated() {
return mQs != null;
}
@@ -1597,7 +1603,7 @@ public class QuickSettingsController implements Dumpable {
if (action == MotionEvent.ACTION_DOWN && expandedShadeCollapsedQs) {
// Down in the empty area while fully expanded - go to QS.
mShadeLog.logMotionEvent(event, "handleQsTouch: down action, QS tracking enabled");
- mTracking = true;
+ setTracking(true);
traceQsJank(true, false);
mConflictingExpansionGesture = true;
onExpansionStarted();
@@ -1612,9 +1618,9 @@ public class QuickSettingsController implements Dumpable {
// as sometimes the qsExpansionFraction can be a tiny value instead of 0 when in QQS.
if (!mSplitShadeEnabled && !mLastShadeFlingWasExpanding
&& computeExpansionFraction() <= 0.01 && mShadeExpandedFraction < 1.0) {
- mTracking = false;
+ setTracking(false);
}
- if (!isExpandImmediate() && mTracking) {
+ if (!isExpandImmediate() && isTracking()) {
onTouch(event);
if (!mConflictingExpansionGesture && !mSplitShadeEnabled) {
return true;
@@ -1658,7 +1664,7 @@ public class QuickSettingsController implements Dumpable {
if (shouldQuickSettingsIntercept(event.getX(), event.getY(), -1)) {
mShadeLog.logMotionEvent(event,
"handleQsDown: down action, QS tracking enabled");
- mTracking = true;
+ setTracking(true);
onExpansionStarted();
mInitialHeightOnTouch = mExpansionHeight;
mInitialTouchY = event.getY();
@@ -1684,7 +1690,7 @@ public class QuickSettingsController implements Dumpable {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
mShadeLog.logMotionEvent(event, "onQsTouch: down action, QS tracking enabled");
- mTracking = true;
+ setTracking(true);
traceQsJank(true, false);
mInitialTouchY = y;
mInitialTouchX = x;
@@ -1721,7 +1727,7 @@ public class QuickSettingsController implements Dumpable {
case MotionEvent.ACTION_CANCEL:
mShadeLog.logMotionEvent(event,
"onQsTouch: up/cancel action, QS tracking disabled");
- mTracking = false;
+ setTracking(false);
mTrackingPointer = -1;
trackMovement(event);
float fraction = computeExpansionFraction();
@@ -1776,7 +1782,7 @@ public class QuickSettingsController implements Dumpable {
mInitialHeightOnTouch = mExpansionHeight;
mShadeLog.logMotionEvent(event,
"onQsIntercept: down action, QS tracking enabled");
- mTracking = true;
+ setTracking(true);
traceQsJank(true, false);
mNotificationStackScrollLayoutController.cancelLongPress();
}
@@ -1795,7 +1801,7 @@ public class QuickSettingsController implements Dumpable {
case MotionEvent.ACTION_MOVE:
final float h = y - mInitialTouchY;
trackMovement(event);
- if (mTracking) {
+ if (isTracking()) {
// Already tracking because onOverscrolled was called. We need to update here
// so we don't stop for a frame until the next touch event gets handled in
// onTouchEvent.
@@ -1815,7 +1821,7 @@ public class QuickSettingsController implements Dumpable {
mInitialTouchX, mInitialTouchY, h)) {
mPanelView.getParent().requestDisallowInterceptTouchEvent(true);
mShadeLog.onQsInterceptMoveQsTrackingEnabled(h);
- mTracking = true;
+ setTracking(true);
traceQsJank(true, false);
onExpansionStarted();
mPanelViewControllerLazy.get().notifyExpandingFinished();
@@ -1835,7 +1841,7 @@ public class QuickSettingsController implements Dumpable {
case MotionEvent.ACTION_UP:
trackMovement(event);
mShadeLog.logMotionEvent(event, "onQsIntercept: up action, QS tracking disabled");
- mTracking = false;
+ setTracking(false);
break;
}
return false;
@@ -2061,7 +2067,7 @@ public class QuickSettingsController implements Dumpable {
ipw.print("mTouchAboveFalsingThreshold=");
ipw.println(mTouchAboveFalsingThreshold);
ipw.print("mTracking=");
- ipw.println(mTracking);
+ ipw.println(isTracking());
ipw.print("mTrackingPointer=");
ipw.println(mTrackingPointer);
ipw.print("mExpanded=");
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
index 02f337a8752a..447a15d34c05 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
@@ -33,6 +33,8 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
* {@link com.android.systemui.keyguard.KeyguardViewMediator} and others.
*/
public interface ShadeController extends CoreStartable {
+ /** True if the shade UI is enabled on this particular Android variant and false otherwise. */
+ boolean isShadeEnabled();
/** Make our window larger and the shade expanded */
void instantExpandShade();
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
index 5f95bcae030e..82959eea562b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
@@ -23,6 +23,7 @@ import javax.inject.Inject
/** Empty implementation of ShadeController for variants of Android without shades. */
@SysUISingleton
open class ShadeControllerEmptyImpl @Inject constructor() : ShadeController {
+ override fun isShadeEnabled() = false
override fun start() {}
override fun instantExpandShade() {}
override fun instantCollapseShade() {}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
index 9a3e4e577634..367449b9d59d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
@@ -114,6 +114,11 @@ public final class ShadeControllerImpl implements ShadeController {
}
@Override
+ public boolean isShadeEnabled() {
+ return true;
+ }
+
+ @Override
public void instantExpandShade() {
// Make our window larger and the panel expanded.
makeExpandedVisible(true /* force */);
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
index 656411874de5..9a356ad1fd0b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
@@ -135,7 +135,8 @@ constructor(
private val date: TextView = header.requireViewById(R.id.date)
private val iconContainer: StatusIconContainer = header.requireViewById(R.id.statusIcons)
private val mShadeCarrierGroup: ShadeCarrierGroup = header.requireViewById(R.id.carrier_group)
- private val systemIcons: View = header.requireViewById(R.id.shade_header_system_icons)
+ private val systemIconsHoverContainer: View =
+ header.requireViewById(R.id.hover_system_icons_container)
private var roundedCorners = 0
private var cutout: DisplayCutout? = null
@@ -259,14 +260,18 @@ constructor(
header.paddingRight,
header.paddingBottom
)
- systemIcons.setPaddingRelative(
+ systemIconsHoverContainer.setPaddingRelative(
resources.getDimensionPixelSize(
- R.dimen.shade_header_system_icons_padding_start
+ R.dimen.hover_system_icons_container_padding_start
),
- resources.getDimensionPixelSize(R.dimen.shade_header_system_icons_padding_top),
- resources.getDimensionPixelSize(R.dimen.shade_header_system_icons_padding_end),
resources.getDimensionPixelSize(
- R.dimen.shade_header_system_icons_padding_bottom
+ R.dimen.hover_system_icons_container_padding_top
+ ),
+ resources.getDimensionPixelSize(
+ R.dimen.hover_system_icons_container_padding_end
+ ),
+ resources.getDimensionPixelSize(
+ R.dimen.hover_system_icons_container_padding_bottom
)
)
}
@@ -330,8 +335,8 @@ constructor(
demoModeController.addCallback(demoModeReceiver)
statusBarIconController.addIconGroup(iconManager)
nextAlarmController.addCallback(nextAlarmCallback)
- systemIcons.setOnHoverListener(
- statusOverlayHoverListenerFactory.createListener(systemIcons)
+ systemIconsHoverContainer.setOnHoverListener(
+ statusOverlayHoverListenerFactory.createListener(systemIconsHoverContainer)
)
}
@@ -343,7 +348,7 @@ constructor(
demoModeController.removeCallback(demoModeReceiver)
statusBarIconController.removeIconGroup(iconManager)
nextAlarmController.removeCallback(nextAlarmCallback)
- systemIcons.setOnHoverListener(null)
+ systemIconsHoverContainer.setOnHoverListener(null)
}
fun disable(state1: Int, state2: Int, animate: Boolean) {
@@ -479,11 +484,11 @@ constructor(
if (largeScreenActive) {
logInstantEvent("Large screen constraints set")
header.setTransition(LARGE_SCREEN_HEADER_TRANSITION_ID)
- systemIcons.setOnClickListener { shadeCollapseAction?.run() }
+ systemIconsHoverContainer.setOnClickListener { shadeCollapseAction?.run() }
} else {
logInstantEvent("Small screen constraints set")
header.setTransition(HEADER_TRANSITION_ID)
- systemIcons.setOnClickListener(null)
+ systemIconsHoverContainer.setOnClickListener(null)
}
header.jumpToState(header.startState)
updatePosition()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
index 1121834f196d..b3f6e1681ad6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
@@ -199,12 +199,6 @@ interface ShadeViewController {
/** Animate to expanded shade after a delay in ms. Used for lockscreen to shade transition. */
fun transitionToExpandedShade(delay: Long)
- /**
- * Returns whether the unlock hint animation is running. The unlock hint animation is when the
- * user taps the lock screen, causing the contents of the lock screen visually bounce.
- */
- val isUnlockHintRunning: Boolean
-
/** @see ViewGroupFadeHelper.reset */
fun resetViewGroupFade()
@@ -248,9 +242,6 @@ interface ShadeViewController {
/** Sends an external (e.g. Status Bar) touch event to the Shade touch handler. */
fun handleExternalTouch(event: MotionEvent): Boolean
- /** Starts tracking a shade expansion gesture that originated from the status bar. */
- fun startTrackingExpansionFromStatusBar()
-
/**
* Performs haptic feedback from a view with a haptic feedback constant.
*
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
index 6a2bef296b6b..b8a41019419d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
@@ -73,7 +73,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : ShadeViewController {
return false
}
override fun transitionToExpandedShade(delay: Long) {}
- override val isUnlockHintRunning: Boolean = false
override fun resetViewGroupFade() {}
override fun setKeyguardTransitionProgress(keyguardAlpha: Float, keyguardTranslationY: Int) {}
@@ -86,7 +85,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : ShadeViewController {
override fun handleExternalTouch(event: MotionEvent): Boolean {
return false
}
- override fun startTrackingExpansionFromStatusBar() {}
override fun performHapticFeedback(constant: Int) {}
override val shadeHeadsUpTracker = ShadeHeadsUpTrackerEmptyImpl()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt
index f1e75b150271..3f7512a25732 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt
@@ -76,7 +76,7 @@ abstract class ShadeViewProviderModule {
scenesProvider: Provider<Set<@JvmSuppressWildcards Scene>>,
layoutInsetController: NotificationInsetsController,
): WindowRootView {
- return if (Flags.SCENE_CONTAINER_ENABLED && sceneContainerFlags.isEnabled()) {
+ return if (sceneContainerFlags.isEnabled()) {
val sceneWindowRootView =
layoutInflater.inflate(R.layout.scene_window_root, null) as SceneWindowRootView
sceneWindowRootView.init(
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 947259a79345..52a99af3eee4 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
@@ -56,6 +56,30 @@ interface ShadeRepository {
@Deprecated("Use ShadeInteractor.shadeExpansion instead")
val legacyShadeExpansion: StateFlow<Float>
+ /**
+ * NotificationPanelViewController.mTracking as a flow. "Tracking" means that the user is moving
+ * the shade up or down with a pointer. Going forward, this concept will be replaced by checks
+ * for whether a transition was driven by user input instead of whether a pointer is currently
+ * touching the screen, i.e. after the user has lifted their finger to fling the shade, these
+ * values would be different.
+ */
+ @Deprecated("Use ShadeInteractor instead") val legacyShadeTracking: StateFlow<Boolean>
+
+ /**
+ * QuickSettingsController.mTracking as a flow. "Tracking" means that the user is moving quick
+ * settings up or down with a pointer. Going forward, this concept will be replaced by checks
+ * for whether a transition was driven by user input instead of whether a pointer is currently
+ * touching the screen, i.e. after the user has lifted their finger to fling the QS, these
+ * values would be different.
+ */
+ @Deprecated("Use ShadeInteractor instead") val legacyQsTracking: StateFlow<Boolean>
+
+ /** Sets whether the user is moving Quick Settings with a pointer */
+ fun setLegacyQsTracking(legacyQsTracking: Boolean)
+
+ /** Sets whether the user is moving the shade with a pointer */
+ fun setLegacyShadeTracking(tracking: Boolean)
+
/** Amount shade has expanded with regard to the UDFPS location */
val udfpsTransitionToFullShadeProgress: StateFlow<Float>
@@ -123,6 +147,24 @@ constructor(shadeExpansionStateManager: ShadeExpansionStateManager) : ShadeRepos
@Deprecated("Use ShadeInteractor.shadeExpansion instead")
override val legacyShadeExpansion: StateFlow<Float> = _legacyShadeExpansion.asStateFlow()
+ private val _legacyShadeTracking = MutableStateFlow(false)
+ @Deprecated("Use ShadeInteractor instead")
+ override val legacyShadeTracking: StateFlow<Boolean> = _legacyShadeTracking.asStateFlow()
+
+ private val _legacyQsTracking = MutableStateFlow(false)
+ @Deprecated("Use ShadeInteractor instead")
+ override val legacyQsTracking: StateFlow<Boolean> = _legacyQsTracking.asStateFlow()
+
+ @Deprecated("Should only be called by NPVC and tests")
+ override fun setLegacyQsTracking(legacyQsTracking: Boolean) {
+ _legacyQsTracking.value = legacyQsTracking
+ }
+
+ @Deprecated("Should only be called by NPVC and tests")
+ override fun setLegacyShadeTracking(tracking: Boolean) {
+ _legacyShadeTracking.value = tracking
+ }
+
override fun setQsExpansion(qsExpansion: Float) {
_qsExpansion.value = qsExpansion
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
index fd57f21b2e1e..4ba56749de91 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
@@ -20,7 +20,7 @@ import android.content.Context
import android.content.res.Configuration
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import javax.inject.Inject
/** Interpolator responsible for the shade when on large screens. */
@@ -32,6 +32,7 @@ internal constructor(
private val context: Context,
private val splitShadeInterpolator: SplitShadeInterpolator,
private val portraitShadeInterpolator: LargeScreenPortraitShadeInterpolator,
+ private val splitShadeStateController: SplitShadeStateController
) : LargeScreenShadeInterpolator {
private var inSplitShade = false
@@ -48,7 +49,7 @@ internal constructor(
}
private fun updateResources() {
- inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
}
private val impl: LargeScreenShadeInterpolator
diff --git a/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
index ec16109fe1c7..971507055873 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
@@ -18,7 +18,6 @@ package com.android.systemui.shade.transition
import android.content.Context
import android.content.res.Configuration
-import com.android.systemui.R
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.qs.QS
@@ -31,6 +30,7 @@ import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import java.io.PrintWriter
import javax.inject.Inject
@@ -45,6 +45,7 @@ constructor(
private val context: Context,
private val scrimShadeTransitionController: ScrimShadeTransitionController,
private val statusBarStateController: SysuiStatusBarStateController,
+ private val splitShadeStateController: SplitShadeStateController
) {
lateinit var shadeViewController: ShadeViewController
@@ -73,7 +74,7 @@ constructor(
}
private fun updateResources() {
- inSplitShade = context.resources.getBoolean(R.bool.config_use_split_notification_shade)
+ inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
}
private fun onPanelStateChanged(@PanelState state: Int) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
index 5b24af038b6b..b6a633fdd1a6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
@@ -6,14 +6,15 @@ import android.util.IndentingPrintWriter
import com.android.systemui.Dumpable
import com.android.systemui.dump.DumpManager
import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import java.io.PrintWriter
/** An abstract implementation of a class that controls the lockscreen to shade transition. */
abstract class AbstractLockscreenShadeTransitionController(
protected val context: Context,
configurationController: ConfigurationController,
- dumpManager: DumpManager
+ dumpManager: DumpManager,
+ private val splitShadeStateController: SplitShadeStateController
) : Dumpable {
protected var useSplitShade = false
@@ -44,7 +45,8 @@ abstract class AbstractLockscreenShadeTransitionController(
}
private fun updateResourcesInternal() {
- useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ useSplitShade = splitShadeStateController
+ .shouldUseSplitNotificationShade(context.resources)
updateResources()
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
index fec61124bc86..238317cfc99e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
@@ -8,6 +8,7 @@ import com.android.systemui.dump.DumpManager
import com.android.systemui.media.controls.ui.MediaHierarchyManager
import com.android.systemui.shade.ShadeViewController
import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
@@ -16,12 +17,14 @@ import dagger.assisted.AssistedInject
class LockscreenShadeKeyguardTransitionController
@AssistedInject
constructor(
- private val mediaHierarchyManager: MediaHierarchyManager,
- @Assisted private val notificationPanelController: ShadeViewController,
- context: Context,
- configurationController: ConfigurationController,
- dumpManager: DumpManager
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+ private val mediaHierarchyManager: MediaHierarchyManager,
+ @Assisted private val notificationPanelController: ShadeViewController,
+ context: Context,
+ configurationController: ConfigurationController,
+ dumpManager: DumpManager,
+ splitShadeStateController: SplitShadeStateController
+) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager,
+ splitShadeStateController) {
/**
* Distance that the full shade transition takes in order for the keyguard content on
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
index df8c6abfff97..5f3d75786973 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
@@ -25,6 +25,7 @@ import com.android.systemui.R
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.qs.QS
import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
@@ -38,7 +39,14 @@ constructor(
configurationController: ConfigurationController,
dumpManager: DumpManager,
@Assisted private val qsProvider: () -> QS,
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+ splitShadeStateController: SplitShadeStateController
+) :
+ AbstractLockscreenShadeTransitionController(
+ context,
+ configurationController,
+ dumpManager,
+ splitShadeStateController
+ ) {
private val qs: QS
get() = qsProvider()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
index 00d3701a0cc7..af4a1aa98d9e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
@@ -7,6 +7,7 @@ import com.android.systemui.R
import com.android.systemui.dump.DumpManager
import com.android.systemui.statusbar.phone.ScrimController
import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import javax.inject.Inject
/** Controls the lockscreen to shade transition for scrims. */
@@ -16,8 +17,10 @@ constructor(
private val scrimController: ScrimController,
context: Context,
configurationController: ConfigurationController,
- dumpManager: DumpManager
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+ dumpManager: DumpManager,
+ splitShadeStateController: SplitShadeStateController
+) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager,
+ splitShadeStateController) {
/**
* Distance that the full shade transition takes in order for scrim to fully transition to the
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
index 73bbbca09fe8..29ca0f438aac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
@@ -42,7 +42,7 @@ import com.android.systemui.statusbar.phone.CentralSurfaces
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.phone.LSShadeTransitionLogger
import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.wm.shell.animation.Interpolators
import java.io.PrintWriter
import javax.inject.Inject
@@ -79,6 +79,7 @@ class LockscreenShadeTransitionController @Inject constructor(
private val shadeRepository: ShadeRepository,
private val shadeInteractor: ShadeInteractor,
private val powerInteractor: PowerInteractor,
+ private val splitShadeStateController: SplitShadeStateController
) : Dumpable {
private var pulseHeight: Float = 0f
@@ -267,7 +268,9 @@ class LockscreenShadeTransitionController @Inject constructor(
R.dimen.lockscreen_shade_udfps_keyguard_transition_distance)
statusBarTransitionDistance = context.resources.getDimensionPixelSize(
R.dimen.lockscreen_shade_status_bar_transition_distance)
- useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+
+ useSplitShade = splitShadeStateController
+ .shouldUseSplitNotificationShade(context.resources)
}
fun setStackScroller(nsslController: NotificationStackScrollLayoutController) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
index 59c63aa28d0f..5c45f3d1bbc8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
@@ -46,7 +46,7 @@ import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.phone.ScrimController
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.KeyguardStateController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.WallpaperController
import java.io.PrintWriter
import javax.inject.Inject
@@ -67,6 +67,7 @@ class NotificationShadeDepthController @Inject constructor(
private val notificationShadeWindowController: NotificationShadeWindowController,
private val dozeParameters: DozeParameters,
private val context: Context,
+ private val splitShadeStateController: SplitShadeStateController,
dumpManager: DumpManager,
configurationController: ConfigurationController
) : ShadeExpansionListener, Dumpable {
@@ -329,7 +330,7 @@ class NotificationShadeDepthController @Inject constructor(
}
private fun updateResources() {
- inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
}
fun addListener(listener: DepthListener) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 3f37c60bee8d..c760227aa124 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -776,7 +776,7 @@ public class NotificationShelf extends ActivatableNotificationView implements St
}
} else if (viewEnd >= shelfClipStart
- && (!mAmbientState.isUnlockHintRunning() || view.isInShelf())
+ && view.isInShelf()
&& (mAmbientState.isShadeExpanded()
|| (!view.isPinned() && !view.isHeadsUpAnimatingAway()))) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
index 0aedbf36563a..c62546f67f8d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
@@ -140,8 +140,9 @@ class NotificationLaunchAnimatorController(
}
override fun onIntentStarted(willAnimate: Boolean) {
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "onIntentStarted(willAnimate=$willAnimate)")
+ if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "onIntentStarted(willAnimate=$willAnimate)")
+ }
notificationExpansionRepository.setIsExpandAnimationRunning(willAnimate)
notificationEntry.isExpandAnimationRunning = willAnimate
@@ -172,8 +173,9 @@ class NotificationLaunchAnimatorController(
}
override fun onLaunchAnimationCancelled(newKeyguardOccludedState: Boolean?) {
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "onLaunchAnimationCancelled()")
+ if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "onLaunchAnimationCancelled()")
+ }
// TODO(b/184121838): Should we call InteractionJankMonitor.cancel if the animation started
// here?
@@ -191,8 +193,9 @@ class NotificationLaunchAnimatorController(
}
override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "onLaunchAnimationEnd()")
+ if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "onLaunchAnimationEnd()")
+ }
jankMonitor.end(InteractionJankMonitor.CUJ_NOTIFICATION_APP_START)
notification.isExpandAnimationRunning = false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
index 8754c4a0d7c3..6f0a97adb311 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.data.repository
import android.util.Log
+import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.dagger.SysUISingleton
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
@@ -40,8 +41,9 @@ class NotificationExpansionRepository @Inject constructor() {
/** Sets whether the notification expansion animation is currently running. */
fun setIsExpandAnimationRunning(running: Boolean) {
- // TODO(b/288507023): Remove this log.
- Log.d(TAG, "setIsExpandAnimationRunning(running=$running)")
+ if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+ Log.d(TAG, "setIsExpandAnimationRunning(running=$running)")
+ }
_isExpandAnimationRunning.value = running
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
index 51eb9f7220fc..c24e9dcea29d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
@@ -36,7 +36,7 @@ import javax.inject.Inject;
@SysUISingleton
public class NotifInflationErrorManager {
- Set<NotificationEntry> mErroredNotifs = new ArraySet<>();
+ Set<String> mErroredNotifs = new ArraySet<>();
List<NotifInflationErrorListener> mListeners = new ArrayList<>();
@Inject
@@ -48,7 +48,7 @@ public class NotifInflationErrorManager {
* @param e the exception encountered while inflating
*/
public void setInflationError(NotificationEntry entry, Exception e) {
- mErroredNotifs.add(entry);
+ mErroredNotifs.add(entry.getKey());
for (int i = 0; i < mListeners.size(); i++) {
mListeners.get(i).onNotifInflationError(entry, e);
}
@@ -58,8 +58,8 @@ public class NotifInflationErrorManager {
* Notification inflated successfully and is no longer errored out.
*/
public void clearInflationError(NotificationEntry entry) {
- if (mErroredNotifs.contains(entry)) {
- mErroredNotifs.remove(entry);
+ if (mErroredNotifs.contains(entry.getKey())) {
+ mErroredNotifs.remove(entry.getKey());
for (int i = 0; i < mListeners.size(); i++) {
mListeners.get(i).onNotifInflationErrorCleared(entry);
}
@@ -70,7 +70,7 @@ public class NotifInflationErrorManager {
* Whether or not the notification encountered an exception while inflating.
*/
public boolean hasInflationError(@NonNull NotificationEntry entry) {
- return mErroredNotifs.contains(entry);
+ return mErroredNotifs.contains(entry.getKey());
}
/**
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 95e74f210c5d..38a368e1fdc8 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
@@ -86,7 +86,6 @@ public class AmbientState implements Dumpable {
private boolean mExpansionChanging;
private boolean mIsSmallScreen;
private boolean mPulsing;
- private boolean mUnlockHintRunning;
private float mHideAmount;
private boolean mAppearing;
private float mPulseHeight = MAX_PULSE_HEIGHT;
@@ -592,14 +591,6 @@ public class AmbientState implements Dumpable {
mIsSmallScreen = smallScreen;
}
- public void setUnlockHintRunning(boolean unlockHintRunning) {
- mUnlockHintRunning = unlockHintRunning;
- }
-
- public boolean isUnlockHintRunning() {
- return mUnlockHintRunning;
- }
-
/**
* @return Whether we need to do a fling down after swiping up on lockscreen.
*/
@@ -770,7 +761,6 @@ public class AmbientState implements Dumpable {
pw.println("mPulseHeight=" + mPulseHeight);
pw.println("mTrackedHeadsUpRow.key=" + logKey(mTrackedHeadsUpRow));
pw.println("mMaxHeadsUpTranslation=" + mMaxHeadsUpTranslation);
- pw.println("mUnlockHintRunning=" + mUnlockHintRunning);
pw.println("mDozeAmount=" + mDozeAmount);
pw.println("mDozing=" + mDozing);
pw.println("mFractionToShade=" + mFractionToShade);
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 5e3a67ece4a5..e8521d1673cf 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
@@ -118,9 +118,9 @@ import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
import com.android.systemui.statusbar.policy.HeadsUpUtil;
import com.android.systemui.statusbar.policy.ScrollAdapter;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.util.Assert;
import com.android.systemui.util.DumpUtilsKt;
-import com.android.systemui.util.LargeScreenUtils;
import com.google.errorprone.annotations.CompileTimeConstant;
@@ -568,6 +568,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
private final ScreenOffAnimationController mScreenOffAnimationController;
private boolean mShouldUseSplitNotificationShade;
private boolean mHasFilteredOutSeenNotifications;
+ @Nullable private SplitShadeStateController mSplitShadeStateController = null;
+
+ /** Pass splitShadeStateController to view and update split shade */
+ public void passSplitShadeStateController(SplitShadeStateController splitShadeStateController) {
+ mSplitShadeStateController = splitShadeStateController;
+ updateSplitNotificationShade();
+ }
private final ExpandableView.OnHeightChangedListener mOnChildHeightChangedListener =
new ExpandableView.OnHeightChangedListener() {
@@ -630,7 +637,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
mSectionsManager = Dependency.get(NotificationSectionsManager.class);
mScreenOffAnimationController =
Dependency.get(ScreenOffAnimationController.class);
- updateSplitNotificationShade();
mSectionsManager.initialize(this);
mSections = mSectionsManager.createSectionsForBuckets();
@@ -1350,8 +1356,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
*/
private boolean shouldSkipHeightUpdate() {
return mAmbientState.isOnKeyguard()
- && (mAmbientState.isUnlockHintRunning()
- || mAmbientState.isSwipingUp()
+ && (mAmbientState.isSwipingUp()
|| mAmbientState.isFlingingAfterSwipeUpOnLockscreen());
}
@@ -5071,14 +5076,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
mAmbientState.setSmallScreen(isFullWidth);
}
- public void setUnlockHintRunning(boolean running) {
- mAmbientState.setUnlockHintRunning(running);
- if (!running) {
- // re-calculate the stack height which was frozen while running this animation
- updateStackPosition();
- }
- }
-
public void setPanelFlinging(boolean flinging) {
mAmbientState.setFlinging(flinging);
if (!flinging) {
@@ -5675,7 +5672,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
@VisibleForTesting
void updateSplitNotificationShade() {
- boolean split = LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+ boolean split = mSplitShadeStateController.shouldUseSplitNotificationShade(getResources());
if (split != mShouldUseSplitNotificationShade) {
mShouldUseSplitNotificationShade = split;
updateDismissBehavior();
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 93b5ff7268e3..b051809f2c5c 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
@@ -128,6 +128,7 @@ import com.android.systemui.statusbar.policy.ConfigurationController.Configurati
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.util.Compile;
@@ -672,7 +673,8 @@ public class NotificationStackScrollLayoutController {
NotificationTargetsHelper notificationTargetsHelper,
SecureSettings secureSettings,
NotificationDismissibilityProvider dismissibilityProvider,
- ActivityStarter activityStarter) {
+ ActivityStarter activityStarter,
+ SplitShadeStateController splitShadeStateController) {
mView = view;
mKeyguardTransitionRepo = keyguardTransitionRepo;
mStackStateLogger = stackLogger;
@@ -722,6 +724,7 @@ public class NotificationStackScrollLayoutController {
mSecureSettings = secureSettings;
mDismissibilityProvider = dismissibilityProvider;
mActivityStarter = activityStarter;
+ mView.passSplitShadeStateController(splitShadeStateController);
updateResources();
setUpView();
}
@@ -1200,10 +1203,6 @@ public class NotificationStackScrollLayoutController {
mView.setHeadsUpBoundaries(height, bottomBarHeight);
}
- public void setUnlockHintRunning(boolean running) {
- mView.setUnlockHintRunning(running);
- }
-
public void setPanelFlinging(boolean flinging) {
mView.setPanelFlinging(flinging);
}
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 c7cb70c1da05..24104d2f37e1 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
@@ -29,8 +29,8 @@ import com.android.systemui.statusbar.StatusBarState.KEYGUARD
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.ExpandableView
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.Compile
-import com.android.systemui.util.LargeScreenUtils.shouldUseSplitNotificationShade
import com.android.systemui.util.children
import java.io.PrintWriter
import javax.inject.Inject
@@ -54,7 +54,8 @@ constructor(
private val statusBarStateController: SysuiStatusBarStateController,
private val lockscreenShadeTransitionController: LockscreenShadeTransitionController,
private val mediaDataManager: MediaDataManager,
- @Main private val resources: Resources
+ @Main private val resources: Resources,
+ private val splitShadeStateController: SplitShadeStateController
) {
/**
@@ -181,7 +182,8 @@ constructor(
// How many notifications we can show at heightWithoutLockscreenConstraints
var minCountAtHeightWithoutConstraints =
- if (isMediaShowing && !shouldUseSplitNotificationShade(resources)) 2 else 1
+ if (isMediaShowing && !splitShadeStateController
+ .shouldUseSplitNotificationShade(resources)) 2 else 1
log {
"\t---maxNotifWithoutSavingSpace=$maxNotifWithoutSavingSpace " +
"isMediaShowing=$isMediaShowing" +
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
index 4ed31c2cec89..51b6c75f44b0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
@@ -21,6 +21,7 @@ import android.content.Context
import com.android.systemui.R
import com.android.systemui.common.ui.data.repository.ConfigurationRepository
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.statusbar.policy.SplitShadeStateController
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
@@ -36,6 +37,7 @@ class SharedNotificationContainerInteractor
constructor(
configurationRepository: ConfigurationRepository,
private val context: Context,
+ private val splitShadeStateController: SplitShadeStateController
) {
private val _topPosition = MutableStateFlow(0f)
@@ -47,7 +49,10 @@ constructor(
.map { _ ->
with(context.resources) {
ConfigurationBasedDimensions(
- useSplitShade = getBoolean(R.bool.config_use_split_notification_shade),
+ useSplitShade =
+ splitShadeStateController.shouldUseSplitNotificationShade(
+ context.resources
+ ),
useLargeScreenHeader =
getBoolean(R.bool.config_use_large_screen_shade_header),
marginHorizontal =
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 0031b5745d10..3b9afa1a5eab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -17,8 +17,6 @@
package com.android.systemui.statusbar.phone;
import static android.app.StatusBarManager.SESSION_KEYGUARD;
-
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
import static com.android.systemui.keyguard.WakefulnessLifecycle.UNKNOWN_LAST_WAKE_TIME;
@@ -702,8 +700,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
}
final boolean screenOff = !mUpdateMonitor.isDeviceInteractive();
- if (!mVibratorHelper.hasVibrator() && (screenOff || (mUpdateMonitor.isDreaming()
- && !mFeatureFlags.isEnabled(FP_LISTEN_OCCLUDING_APPS)))) {
+ if (!mVibratorHelper.hasVibrator() && screenOff) {
mLogger.d("wakeup device on authentication failure (device doesn't have a vibrator)");
startWakeAndUnlock(MODE_ONLY_WAKE);
} else if (biometricSourceType == BiometricSourceType.FINGERPRINT
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
index 67c0c94d6544..cfa481eaf7ef 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
@@ -265,10 +265,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
boolean isOverviewEnabled();
- void showPinningEnterExitToast(boolean entering);
-
- void showPinningEscapeToast();
-
void setBouncerShowing(boolean bouncerShowing);
boolean isScreenFullyOff();
@@ -295,16 +291,12 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
@VisibleForTesting
void updateScrimController();
- boolean isKeyguardShowing();
-
boolean shouldIgnoreTouch();
boolean isDeviceInteractive();
void awakenDreams();
- void clearNotificationEffects();
-
boolean isBouncerShowing();
boolean isBouncerShowingScrimmed();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
index 0a57046638e8..28bb58108916 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
@@ -510,16 +510,6 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
}
@Override
- public void showPinningEnterExitToast(boolean entering) {
- mCentralSurfaces.showPinningEnterExitToast(entering);
- }
-
- @Override
- public void showPinningEscapeToast() {
- mCentralSurfaces.showPinningEscapeToast();
- }
-
- @Override
public void showScreenPinningRequest(int taskId) {
if (mKeyguardStateController.isShowing()) {
// Don't allow apps to trigger this from keyguard.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
index 98ba6d91413f..ff380db99c16 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
@@ -69,8 +69,6 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces {
) {}
override fun getNavigationBarView(): NavigationBarView? = null
override fun isOverviewEnabled() = false
- override fun showPinningEnterExitToast(entering: Boolean) {}
- override fun showPinningEscapeToast() {}
override fun setBouncerShowing(bouncerShowing: Boolean) {}
override fun isScreenFullyOff() = false
override fun showScreenPinningRequest(taskId: Int, allowCancel: Boolean) {}
@@ -81,11 +79,9 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces {
override fun setTransitionToFullShadeProgress(transitionToFullShadeProgress: Float) {}
override fun setPrimaryBouncerHiddenFraction(expansion: Float) {}
override fun updateScrimController() {}
- override fun isKeyguardShowing() = false
override fun shouldIgnoreTouch() = false
override fun isDeviceInteractive() = false
override fun awakenDreams() {}
- override fun clearNotificationEffects() {}
override fun isBouncerShowing() = false
override fun isBouncerShowingScrimmed() = false
override fun isBouncerShowingOverDream() = false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index b45a688e6760..490c469261d9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -24,11 +24,9 @@ import static android.app.StatusBarManager.windowStateToString;
import static android.view.WindowInsetsController.APPEARANCE_LOW_PROFILE_BARS;
import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_STATUS_BARS;
import static android.view.WindowInsetsController.APPEARANCE_SEMI_TRANSPARENT_STATUS_BARS;
-
import static androidx.core.view.ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO;
import static androidx.core.view.ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
import static androidx.lifecycle.Lifecycle.State.RESUMED;
-
import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
import static com.android.systemui.charging.WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL;
import static com.android.systemui.statusbar.NotificationLockscreenUserManager.PERMISSION_SELF;
@@ -1433,7 +1431,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
// - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
// keyguard.
// - Shade is in QQS over keyguard - swiping up should take us back to keyguard
- if (!isKeyguardShowing()
+ if (!mKeyguardStateController.isShowing()
|| mStatusBarKeyguardViewManager.primaryBouncerIsOrWillBeShowing()
|| mKeyguardStateController.isOccluded()
|| !mKeyguardStateController.canDismissLockScreen()
@@ -2548,16 +2546,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
return mNavigationBarController.isOverviewEnabled(mDisplayId);
}
- @Override
- public void showPinningEnterExitToast(boolean entering) {
- mNavigationBarController.showPinningEnterExitToast(mDisplayId, entering);
- }
-
- @Override
- public void showPinningEscapeToast() {
- mNavigationBarController.showPinningEscapeToast(mDisplayId);
- }
-
/**
* Propagation of the bouncer state, indicating that it's fully visible.
*/
@@ -2883,7 +2871,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
if (mDevicePolicyManager.getCameraDisabled(null,
mLockscreenUserManager.getCurrentUserId())) {
return false;
- } else if (isKeyguardShowing() && mStatusBarKeyguardViewManager.isSecure()) {
+ } else if (mKeyguardStateController.isShowing()
+ && mStatusBarKeyguardViewManager.isSecure()) {
// Check if the admin has disabled the camera specifically for the keyguard
return (mDevicePolicyManager.getKeyguardDisabledFeatures(null,
mLockscreenUserManager.getCurrentUserId())
@@ -2999,12 +2988,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
Trace.endSection();
}
-
- @Override
- public boolean isKeyguardShowing() {
- return mKeyguardStateController.isShowing();
- }
-
@Override
public boolean shouldIgnoreTouch() {
return (mStatusBarStateController.isDozing()
@@ -3153,11 +3136,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
}
- /**
- * Clear Buzz/Beep/Blink.
- */
- @Override
- public void clearNotificationEffects() {
+ private void clearNotificationEffects() {
try {
mBarService.clearNotificationEffects();
} catch (RemoteException e) {
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 16c2e36af6b8..dcbaac20eacc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
@@ -17,9 +17,11 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.os.RemoteException;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.systemui.Gefingerpoken;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
@@ -31,6 +33,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableView;
public class HeadsUpTouchHelper implements Gefingerpoken {
private final HeadsUpManagerPhone mHeadsUpManager;
+ private final IStatusBarService mStatusBarService;
private final Callback mCallback;
private int mTrackingPointer;
private final float mTouchSlop;
@@ -43,9 +46,11 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
private ExpandableNotificationRow mPickedChild;
public HeadsUpTouchHelper(HeadsUpManagerPhone headsUpManager,
+ IStatusBarService statusBarService,
Callback callback,
HeadsUpNotificationViewController notificationPanelView) {
mHeadsUpManager = headsUpManager;
+ mStatusBarService = statusBarService;
mCallback = callback;
mPanel = notificationPanelView;
Context context = mCallback.getContext();
@@ -119,7 +124,7 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
// This call needs to be after the expansion start otherwise we will get a
// flicker of one frame as it's not expanded yet.
mHeadsUpManager.unpinAll(true);
- mPanel.clearNotificationEffects();
+ clearNotificationEffects();
endMotion();
return true;
}
@@ -175,6 +180,14 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
mTouchingHeadsUpView = false;
}
+ private void clearNotificationEffects() {
+ try {
+ mStatusBarService.clearNotificationEffects();
+ } catch (RemoteException e) {
+ // Won't fail unless the world has ended.
+ }
+ }
+
public interface Callback {
ExpandableView getChildAtRawPosition(float touchX, float touchY);
boolean isExpanded();
@@ -191,8 +204,5 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
/** Called when a MotionEvent is about to trigger expansion. */
void startExpand(float newX, float newY, boolean startTracking, float expandedHeight);
-
- /** Clear any effects that were added for the expansion. */
- void clearNotificationEffects();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
index cdd410e766a2..47ab316bb239 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
@@ -20,7 +20,6 @@ import android.content.res.Configuration
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
-import android.view.ViewPropertyAnimator
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.annotation.StringRes
@@ -32,7 +31,6 @@ import com.android.systemui.keyguard.ui.viewmodel.KeyguardBottomAreaViewModel
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.statusbar.VibratorHelper
-import com.android.systemui.util.animation.requiresRemeasuring
/**
* Renders the bottom area of the lock-screen. Concerned primarily with the quick affordance UI
@@ -61,6 +59,7 @@ constructor(
}
private var ambientIndicationArea: View? = null
+ private var keyguardIndicationArea: View? = null
private var binding: KeyguardBottomAreaViewBinder.Binding? = null
private var lockIconViewController: LockIconViewController? = null
@@ -124,13 +123,14 @@ constructor(
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
binding?.onConfigurationChanged()
- }
-
- /** Returns a list of animators to use to animate the indication areas. */
- @Deprecated("Deprecated as part of b/278057014")
- val indicationAreaAnimators: List<ViewPropertyAnimator>
- get() = checkNotNull(binding).getIndicationAreaAnimators()
+ keyguardIndicationArea?.let {
+ val params = it.layoutParams as FrameLayout.LayoutParams
+ params.bottomMargin =
+ resources.getDimensionPixelSize(R.dimen.keyguard_indication_margin_bottom)
+ it.layoutParams = params
+ }
+ }
override fun hasOverlappingRendering(): Boolean {
return false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 83a040cc17b8..1966033363d4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -40,6 +40,7 @@ import com.android.systemui.R;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
import com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer;
+import com.android.systemui.statusbar.policy.Clock;
import com.android.systemui.user.ui.binder.StatusBarUserChipViewBinder;
import com.android.systemui.user.ui.viewmodel.StatusBarUserChipViewModel;
import com.android.systemui.util.leak.RotationUtils;
@@ -51,7 +52,7 @@ public class PhoneStatusBarView extends FrameLayout {
private final StatusBarContentInsetsProvider mContentInsetsProvider;
private DarkReceiver mBattery;
- private DarkReceiver mClock;
+ private Clock mClock;
private int mRotationOrientation = -1;
@Nullable
private View mCutoutSpace;
@@ -123,6 +124,10 @@ public class PhoneStatusBarView extends FrameLayout {
}
}
+ void onDensityOrFontScaleChanged() {
+ mClock.onDensityOrFontScaleChanged();
+ }
+
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
if (updateDisplayParameters()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
index 23b0ee0ec9bc..fc5f91506c06 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
@@ -75,6 +75,10 @@ private constructor(
override fun onConfigChanged(newConfig: Configuration?) {
mView.updateResources()
}
+
+ override fun onDensityOrFontScaleChanged() {
+ mView.onDensityOrFontScaleChanged()
+ }
}
override fun onViewAttached() {
@@ -82,6 +86,10 @@ private constructor(
statusContainer.setOnHoverListener(
statusOverlayHoverListenerFactory.createDarkAwareListener(statusContainer)
)
+
+ progressProvider?.setReadyToHandleTransition(true)
+ configurationController.addCallback(configurationListener)
+
if (moveFromCenterAnimationController == null) return
val statusBarLeftSide: View =
@@ -106,9 +114,6 @@ private constructor(
moveFromCenterAnimationController.onStatusBarWidthChanged()
}
}
-
- progressProvider?.setReadyToHandleTransition(true)
- configurationController.addCallback(configurationListener)
}
override fun onViewDetached() {
@@ -206,7 +211,6 @@ private constructor(
shadeLogger.logMotionEvent(event, "top edge touch ignored")
return true
}
- shadeViewController.startTrackingExpansionFromStatusBar()
}
return shadeViewController.handleExternalTouch(event)
}
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 27b8406e3bf9..e337215089ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.phone;
import static android.view.WindowInsets.Type.navigationBars;
-
import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_HIDDEN;
import static com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK;
@@ -67,9 +66,12 @@ import com.android.systemui.dock.DockManager;
import com.android.systemui.dreams.DreamOverlayStateController;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
import com.android.systemui.keyguard.domain.interactor.WindowManagerLockscreenVisibilityInteractor;
+import com.android.systemui.keyguard.shared.model.DismissAction;
+import com.android.systemui.keyguard.shared.model.KeyguardDone;
import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.TaskbarDelegate;
@@ -104,6 +106,7 @@ import java.util.Set;
import javax.inject.Inject;
import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.ExperimentalCoroutinesApi;
/**
* Manages creating, showing, hiding and resetting the keyguard within the status bar. Calls back
@@ -111,7 +114,7 @@ import kotlinx.coroutines.CoroutineDispatcher;
* which is in turn, reported to this class by the current
* {@link com.android.keyguard.KeyguardViewController}.
*/
-@SysUISingleton
+@ExperimentalCoroutinesApi @SysUISingleton
public class StatusBarKeyguardViewManager implements RemoteInputController.Callback,
StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener,
ShadeExpansionListener, NavigationModeController.ModeChangedListener,
@@ -338,6 +341,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
}
};
private Lazy<WindowManagerLockscreenVisibilityInteractor> mWmLockscreenVisibilityInteractor;
+ private Lazy<KeyguardDismissActionInteractor> mKeyguardDismissActionInteractor;
@Inject
public StatusBarKeyguardViewManager(
@@ -367,7 +371,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
ActivityStarter activityStarter,
KeyguardTransitionInteractor keyguardTransitionInteractor,
@Main CoroutineDispatcher mainDispatcher,
- Lazy<WindowManagerLockscreenVisibilityInteractor> wmLockscreenVisibilityInteractor
+ Lazy<WindowManagerLockscreenVisibilityInteractor> wmLockscreenVisibilityInteractor,
+ Lazy<KeyguardDismissActionInteractor> keyguardDismissActionInteractorLazy
) {
mContext = context;
mViewMediatorCallback = callback;
@@ -400,6 +405,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
mKeyguardTransitionInteractor = keyguardTransitionInteractor;
mMainDispatcher = mainDispatcher;
mWmLockscreenVisibilityInteractor = wmLockscreenVisibilityInteractor;
+ mKeyguardDismissActionInteractor = keyguardDismissActionInteractorLazy;
}
KeyguardTransitionInteractor mKeyguardTransitionInteractor;
@@ -559,7 +565,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
&& !mKeyguardStateController.isOccluded()
&& !mKeyguardStateController.canDismissLockScreen()
&& !bouncerIsAnimatingAway()
- && !mShadeViewController.isUnlockHintRunning()
&& !(mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED);
}
@@ -692,6 +697,45 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
public void dismissWithAction(OnDismissAction r, Runnable cancelAction,
boolean afterKeyguardGone, String message) {
+ if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ if (r == null) {
+ return;
+ }
+ Trace.beginSection("StatusBarKeyguardViewManager#interactorDismissWithAction");
+ if (afterKeyguardGone) {
+ mKeyguardDismissActionInteractor.get().setDismissAction(
+ new DismissAction.RunAfterKeyguardGone(
+ () -> {
+ r.onDismiss();
+ return null;
+ },
+ (cancelAction != null) ? cancelAction : () -> {},
+ message == null ? "" : message,
+ r.willRunAnimationOnKeyguard()
+ )
+ );
+ } else {
+ mKeyguardDismissActionInteractor.get().setDismissAction(
+ new DismissAction.RunImmediately(
+ () -> {
+ if (r.onDismiss()) {
+ return KeyguardDone.LATER;
+ } else {
+ return KeyguardDone.IMMEDIATE;
+ }
+ },
+ (cancelAction != null) ? cancelAction : () -> {},
+ message == null ? "" : message,
+ r.willRunAnimationOnKeyguard()
+ )
+ );
+ }
+
+ showBouncer(true);
+ Trace.endSection();
+ return;
+ }
+
if (mKeyguardStateController.isShowing()) {
try {
Trace.beginSection("StatusBarKeyguardViewManager#dismissWithAction");
@@ -705,9 +749,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
return;
}
- mAfterKeyguardGoneAction = r;
- mKeyguardGoneCancelAction = cancelAction;
- mDismissActionWillAnimateOnKeyguard = r != null && r.willRunAnimationOnKeyguard();
+ if (!mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ mAfterKeyguardGoneAction = r;
+ mKeyguardGoneCancelAction = cancelAction;
+ mDismissActionWillAnimateOnKeyguard = r != null
+ && r.willRunAnimationOnKeyguard();
+ }
// If there is an alternate auth interceptor (like the UDFPS), show that one
// instead of the bouncer.
@@ -755,6 +802,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
* Adds a {@param runnable} to be executed after Keyguard is gone.
*/
public void addAfterKeyguardGoneRunnable(Runnable runnable) {
+ if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ if (runnable != null) {
+ mKeyguardDismissActionInteractor.get().runAfterKeyguardGone(runnable);
+ }
+ return;
+ }
mAfterKeyguardGoneRunnables.add(runnable);
}
@@ -936,7 +989,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
// We update the state (which will show the keyguard) only if an animation will run on
// the keyguard. If there is no animation, we wait before updating the state so that we
// go directly from bouncer to launcher/app.
- if (mDismissActionWillAnimateOnKeyguard) {
+ if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ if (mKeyguardDismissActionInteractor.get().runDismissAnimationOnKeyguard()) {
+ updateStates();
+ }
+ } else if (mDismissActionWillAnimateOnKeyguard) {
updateStates();
}
} else if (finishRunnable != null) {
@@ -1059,6 +1116,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
}
private void executeAfterKeyguardGoneAction() {
+ if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+ return;
+ }
if (mAfterKeyguardGoneAction != null) {
mAfterKeyguardGoneAction.onDismiss();
mAfterKeyguardGoneAction = null;
@@ -1351,10 +1411,10 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
/**
* Notifies that the user has authenticated by other means than using the bouncer, for example,
- * fingerprint.
+ * fingerprint and the keyguard should immediately dismiss.
*/
public void notifyKeyguardAuthenticated(boolean strongAuth) {
- mPrimaryBouncerInteractor.notifyKeyguardAuthenticated(strongAuth);
+ mPrimaryBouncerInteractor.notifyKeyguardAuthenticatedBiometrics(strongAuth);
if (mAlternateBouncerInteractor.isVisibleState()) {
hideAlternateBouncer(false);
@@ -1442,6 +1502,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
pw.println(" isBouncerShowing(): " + isBouncerShowing());
pw.println(" bouncerIsOrWillBeShowing(): " + primaryBouncerIsOrWillBeShowing());
pw.println(" Registered KeyguardViewManagerCallbacks:");
+ pw.println(" refactorKeyguardDismissIntent enabled:"
+ + mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT));
for (KeyguardViewManagerCallback callback : mCallbacks) {
pw.println(" " + callback);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
index ecc996c57ac6..53662f4334e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
@@ -53,8 +53,8 @@ import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
import com.android.systemui.statusbar.notification.domain.interactor.NotificationsInteractor;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor;
+import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
@@ -116,7 +116,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
NotificationMediaManager notificationMediaManager,
NotificationGutsManager notificationGutsManager,
InitController initController,
- NotificationInterruptStateProvider notificationInterruptStateProvider,
+ VisualInterruptionDecisionProvider visualInterruptionDecisionProvider,
NotificationRemoteInputManager remoteInputManager,
NotificationRemoteInputManager.Callback remoteInputManagerCallback,
NotificationListContainer notificationListContainer) {
@@ -162,7 +162,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
initController.addPostInitTask(() -> {
mNotifShadeEventSource.setShadeEmptiedCallback(this::maybeClosePanelForShadeEmptied);
mNotifShadeEventSource.setNotifRemovedByUserCallback(this::maybeEndAmbientPulse);
- notificationInterruptStateProvider.addSuppressor(mInterruptSuppressor);
+ visualInterruptionDecisionProvider.addLegacySuppressor(mInterruptSuppressor);
mLockscreenUserManager.setUpWithPresenter(this);
mGutsManager.setUpWithPresenter(
this, mNotifListContainer, mOnSettingsClickListener);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
index 249ca35b610a..7ec8e12e557e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.pipeline.mobile.ui.binder
import android.content.res.ColorStateList
import android.view.View
import android.view.View.GONE
-import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.ViewGroup
import android.widget.ImageView
@@ -34,12 +33,11 @@ import com.android.systemui.common.ui.binder.ContentDescriptionViewBinder
import com.android.systemui.common.ui.binder.IconViewBinder
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.StatusBarIconView.STATE_DOT
import com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN
-import com.android.systemui.statusbar.StatusBarIconView.STATE_ICON
import com.android.systemui.statusbar.pipeline.mobile.ui.MobileViewLogger
import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.LocationBasedMobileViewModel
import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewBinding
+import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewVisibilityHelper
import kotlinx.coroutines.awaitCancellation
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
@@ -106,20 +104,11 @@ object MobileIconBinder {
launch {
visibilityState.collect { state ->
- when (state) {
- STATE_ICON -> {
- mobileGroupView.visibility = VISIBLE
- dotView.visibility = GONE
- }
- STATE_DOT -> {
- mobileGroupView.visibility = INVISIBLE
- dotView.visibility = VISIBLE
- }
- STATE_HIDDEN -> {
- mobileGroupView.visibility = INVISIBLE
- dotView.visibility = INVISIBLE
- }
- }
+ ModernStatusBarViewVisibilityHelper.setVisibilityState(
+ state,
+ mobileGroupView,
+ dotView,
+ )
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt
new file mode 100644
index 000000000000..6668cbc290fc
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt
@@ -0,0 +1,52 @@
+/*
+ * 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.pipeline.shared.ui.binder
+
+import android.view.View
+import com.android.systemui.statusbar.StatusBarIconView
+import com.android.systemui.statusbar.pipeline.mobile.ui.binder.MobileIconBinder
+import com.android.systemui.statusbar.pipeline.wifi.ui.binder.WifiViewBinder
+
+/**
+ * The helper to update the groupView and dotView visibility based on given visibility state, only
+ * used for [MobileIconBinder] and [WifiViewBinder] now.
+ */
+class ModernStatusBarViewVisibilityHelper {
+ companion object {
+
+ fun setVisibilityState(
+ @StatusBarIconView.VisibleState state: Int,
+ groupView: View,
+ dotView: View,
+ ) {
+ when (state) {
+ StatusBarIconView.STATE_ICON -> {
+ groupView.visibility = View.VISIBLE
+ dotView.visibility = View.GONE
+ }
+ StatusBarIconView.STATE_DOT -> {
+ groupView.visibility = View.INVISIBLE
+ dotView.visibility = View.VISIBLE
+ }
+ StatusBarIconView.STATE_HIDDEN -> {
+ groupView.visibility = View.INVISIBLE
+ dotView.visibility = View.INVISIBLE
+ }
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
index 3082a6629dc2..e593575bd791 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
@@ -27,10 +27,9 @@ import com.android.systemui.R
import com.android.systemui.common.ui.binder.IconViewBinder
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.StatusBarIconView.STATE_DOT
import com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN
-import com.android.systemui.statusbar.StatusBarIconView.STATE_ICON
import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewBinding
+import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewVisibilityHelper
import com.android.systemui.statusbar.pipeline.wifi.ui.model.WifiIcon
import com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.LocationBasedWifiViewModel
import kotlinx.coroutines.InternalCoroutinesApi
@@ -83,8 +82,18 @@ object WifiViewBinder {
launch {
visibilityState.collect { visibilityState ->
- groupView.isVisible = visibilityState == STATE_ICON
- dotView.isVisible = visibilityState == STATE_DOT
+ // for b/296864006, we can not hide all the child views if visibilityState
+ // is STATE_HIDDEN. Because hiding all child views would cause the
+ // getWidth() of this view return 0, and that would cause the translation
+ // calculation fails in StatusIconContainer. Therefore, like class
+ // MobileIconBinder, instead of set the child views visibility to View.GONE,
+ // we set their visibility to View.INVISIBLE to make them invisible but
+ // keep the width.
+ ModernStatusBarViewVisibilityHelper.setVisibilityState(
+ visibilityState,
+ groupView,
+ dotView,
+ )
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
index ba5fa1df4b15..3d51ab0a2b27 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
@@ -45,6 +45,7 @@ public class AospPolicyModule {
BroadcastDispatcher broadcastDispatcher,
DemoModeController demoModeController,
DumpManager dumpManager,
+ BatteryControllerLogger logger,
@Main Handler mainHandler,
@Background Handler bgHandler) {
BatteryController bC = new BatteryControllerImpl(
@@ -54,6 +55,7 @@ public class AospPolicyModule {
broadcastDispatcher,
demoModeController,
dumpManager,
+ logger,
mainHandler,
bgHandler);
bC.init();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
index 4b515115dd77..41ed76d7edb1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
@@ -20,7 +20,6 @@ import static android.os.BatteryManager.CHARGING_POLICY_ADAPTIVE_LONGLIFE;
import static android.os.BatteryManager.CHARGING_POLICY_DEFAULT;
import static android.os.BatteryManager.EXTRA_CHARGING_STATUS;
import static android.os.BatteryManager.EXTRA_PRESENT;
-
import static com.android.settingslib.fuelgauge.BatterySaverLogging.SAVER_ENABLED_QS;
import static com.android.systemui.util.DumpUtilsKt.asIndenting;
@@ -85,6 +84,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
private final PowerManager mPowerManager;
private final DemoModeController mDemoModeController;
private final DumpManager mDumpManager;
+ private final BatteryControllerLogger mLogger;
private final Handler mMainHandler;
private final Handler mBgHandler;
protected final Context mContext;
@@ -122,6 +122,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
BroadcastDispatcher broadcastDispatcher,
DemoModeController demoModeController,
DumpManager dumpManager,
+ BatteryControllerLogger logger,
@Main Handler mainHandler,
@Background Handler bgHandler) {
mContext = context;
@@ -132,6 +133,8 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
mBroadcastDispatcher = broadcastDispatcher;
mDemoModeController = demoModeController;
mDumpManager = dumpManager;
+ mLogger = logger;
+ mLogger.logBatteryControllerInstance(this);
}
private void registerReceiver() {
@@ -145,6 +148,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
@Override
public void init() {
+ mLogger.logBatteryControllerInit(this, mHasReceivedBattery);
registerReceiver();
if (!mHasReceivedBattery) {
// Get initial state. Relying on Sticky behavior until API for getting info.
@@ -232,8 +236,13 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
@Override
public void onReceive(final Context context, Intent intent) {
final String action = intent.getAction();
+ mLogger.logIntentReceived(action);
if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
- if (mTestMode && !intent.getBooleanExtra("testmode", false)) return;
+ mLogger.logBatteryChangedIntent(intent);
+ if (mTestMode && !intent.getBooleanExtra("testmode", false)) {
+ mLogger.logBatteryChangedSkipBecauseTest();
+ return;
+ }
mHasReceivedBattery = true;
mLevel = (int) (100f
* intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0)
@@ -275,6 +284,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
fireIsIncompatibleChargingChanged();
}
} else if (action.equals(ACTION_LEVEL_TEST)) {
+ mLogger.logEnterTestMode();
mTestMode = true;
mMainHandler.post(new Runnable() {
int mCurrentLevel = 0;
@@ -286,6 +296,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
@Override
public void run() {
if (mCurrentLevel < 0) {
+ mLogger.logExitTestMode();
mTestMode = false;
mTestIntent.putExtra("level", mSavedLevel);
mTestIntent.putExtra("plugged", mSavedPluggedIn);
@@ -438,6 +449,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
}
protected void fireBatteryLevelChanged() {
+ mLogger.logBatteryLevelChangedCallback(mLevel, mPluggedIn, mCharging);
synchronized (mChangeCallbacks) {
final int N = mChangeCallbacks.size();
for (int i = 0; i < N; i++) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt
new file mode 100644
index 000000000000..4a2a2dbad638
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy
+
+import android.content.Intent
+import android.os.BatteryManager.EXTRA_LEVEL
+import android.os.BatteryManager.EXTRA_SCALE
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.statusbar.policy.dagger.BatteryControllerLog
+import javax.inject.Inject
+
+/** Detailed, [LogBuffer]-backed logs for [BatteryControllerImpl] */
+@SysUISingleton
+class BatteryControllerLogger
+@Inject
+constructor(@BatteryControllerLog private val logBuffer: LogBuffer) {
+ fun logBatteryControllerInstance(controller: BatteryController) {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ { int1 = System.identityHashCode(controller) },
+ { "BatteryController CREATE (${Integer.toHexString(int1)})" }
+ )
+ }
+
+ fun logBatteryControllerInit(controller: BatteryController, hasReceivedBattery: Boolean) {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ int1 = System.identityHashCode(controller)
+ bool1 = hasReceivedBattery
+ },
+ { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" }
+ )
+ }
+
+ fun logIntentReceived(action: String) {
+ logBuffer.log(TAG, LogLevel.DEBUG, { str1 = action }, { "Received intent $str1" })
+ }
+
+ fun logBatteryChangedIntent(intent: Intent) {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ int1 = intent.getIntExtra(EXTRA_LEVEL, DEFAULT)
+ int2 = intent.getIntExtra(EXTRA_SCALE, DEFAULT)
+ },
+ { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" }
+ )
+ }
+
+ fun logBatteryChangedSkipBecauseTest() {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "Detected test intent. Will not execute battery level callbacks." }
+ )
+ }
+
+ fun logEnterTestMode() {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "Entering test mode for BATTERY_LEVEL_TEST intent" }
+ )
+ }
+
+ fun logExitTestMode() {
+ logBuffer.log(TAG, LogLevel.DEBUG, {}, { "Exiting test mode" })
+ }
+
+ fun logBatteryLevelChangedCallback(level: Int, plugged: Boolean, charging: Boolean) {
+ logBuffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ int1 = level
+ bool1 = plugged
+ bool2 = charging
+ },
+ {
+ "Sending onBatteryLevelChanged callbacks " +
+ "with level=$int1, plugged=$bool1, charging=$bool2"
+ }
+ )
+ }
+
+ private fun Int.report(): String =
+ if (this == DEFAULT) {
+ "(missing)"
+ } else {
+ toString()
+ }
+
+ companion object {
+ const val TAG: String = "BatteryControllerLog"
+ }
+}
+
+// Use a token value so we can determine if we got the default
+private const val DEFAULT = -11
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
index 9b0daca2f8ba..945cc6bc2519 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -38,8 +38,6 @@ import com.android.systemui.bluetooth.BluetoothLogger;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.policy.bluetooth.BluetoothRepository;
import com.android.systemui.statusbar.policy.bluetooth.ConnectionStatusModel;
@@ -64,7 +62,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
CachedBluetoothDevice.Callback, LocalBluetoothProfileManager.ServiceListener {
private static final String TAG = "BluetoothController";
- private final FeatureFlags mFeatureFlags;
private final DumpManager mDumpManager;
private final BluetoothLogger mLogger;
private final BluetoothRepository mBluetoothRepository;
@@ -89,7 +86,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
@Inject
public BluetoothControllerImpl(
Context context,
- FeatureFlags featureFlags,
UserTracker userTracker,
DumpManager dumpManager,
BluetoothLogger logger,
@@ -97,7 +93,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
@Main Looper mainLooper,
@Nullable LocalBluetoothManager localBluetoothManager,
@Nullable BluetoothAdapter bluetoothAdapter) {
- mFeatureFlags = featureFlags;
mDumpManager = dumpManager;
mLogger = logger;
mBluetoothRepository = bluetoothRepository;
@@ -252,37 +247,8 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
}
private void updateConnected() {
- if (mFeatureFlags.isEnabled(Flags.NEW_BLUETOOTH_REPOSITORY)) {
- mBluetoothRepository.fetchConnectionStatusInBackground(
- getDevices(), this::onConnectionStatusFetched);
- } else {
- updateConnectedOld();
- }
- }
-
- /** Used only if {@link Flags.NEW_BLUETOOTH_REPOSITORY} is *not* enabled. */
- private void updateConnectedOld() {
- // Make sure our connection state is up to date.
- int state = mLocalBluetoothManager.getBluetoothAdapter().getConnectionState();
- List<CachedBluetoothDevice> newList = new ArrayList<>();
- // If any of the devices are in a higher state than the adapter, move the adapter into
- // that state.
- for (CachedBluetoothDevice device : getDevices()) {
- int maxDeviceState = device.getMaxConnectionState();
- if (maxDeviceState > state) {
- state = maxDeviceState;
- }
- if (device.isConnected()) {
- newList.add(device);
- }
- }
-
- if (newList.isEmpty() && state == BluetoothAdapter.STATE_CONNECTED) {
- // If somehow we think we are connected, but have no connected devices, we aren't
- // connected.
- state = BluetoothAdapter.STATE_DISCONNECTED;
- }
- onConnectionStatusFetched(new ConnectionStatusModel(state, newList));
+ mBluetoothRepository.fetchConnectionStatusInBackground(
+ getDevices(), this::onConnectionStatusFetched);
}
private void onConnectionStatusFetched(ConnectionStatusModel status) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index f9943729ac7d..b7ae233c8e52 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -37,9 +37,11 @@ import android.text.format.DateFormat;
import android.text.style.CharacterStyle;
import android.text.style.RelativeSizeSpan;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.TextView;
import com.android.settingslib.Utils;
@@ -143,6 +145,8 @@ public class Clock extends TextView implements
}
mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
mUserTracker = Dependency.get(UserTracker.class);
+
+ setIncludeFontPadding(false);
}
@Override
@@ -389,6 +393,15 @@ public class Clock extends TextView implements
mContext.getResources().getDimensionPixelSize(
R.dimen.status_bar_clock_end_padding),
0);
+
+ float fontHeight = getPaint().getFontMetricsInt(null);
+ setLineHeight(TypedValue.COMPLEX_UNIT_PX, fontHeight);
+
+ ViewGroup.LayoutParams lp = getLayoutParams();
+ if (lp != null) {
+ lp.height = (int) Math.ceil(fontHeight);
+ setLayoutParams(lp);
+ }
}
private void updateShowSeconds() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
index d5f2d210b9b0..67a8e3d0e345 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
@@ -20,7 +20,6 @@ import android.content.Context
import android.content.res.Configuration
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.CommandQueue
-import com.android.systemui.util.LargeScreenUtils
import javax.inject.Inject
/**
@@ -30,9 +29,10 @@ import javax.inject.Inject
*/
@SysUISingleton
class RemoteInputQuickSettingsDisabler @Inject constructor(
- private val context: Context,
- private val commandQueue: CommandQueue,
- configController: ConfigurationController
+ private val context: Context,
+ private val commandQueue: CommandQueue,
+ private val splitShadeStateController: SplitShadeStateController,
+ configController: ConfigurationController
) : ConfigurationController.ConfigurationListener {
private var remoteInputActive = false
@@ -43,7 +43,7 @@ class RemoteInputQuickSettingsDisabler @Inject constructor(
isLandscape =
context.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
shouldUseSplitNotificationShade =
- LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
configController.addCallback(this)
}
@@ -74,7 +74,8 @@ class RemoteInputQuickSettingsDisabler @Inject constructor(
needToRecompute = true
}
- val newSplitShadeFlag = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+ val newSplitShadeFlag = splitShadeStateController
+ .shouldUseSplitNotificationShade(context.resources)
if (newSplitShadeFlag != shouldUseSplitNotificationShade) {
shouldUseSplitNotificationShade = newSplitShadeFlag
needToRecompute = true
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt
new file mode 100644
index 000000000000..e71c972266f2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.systemui.statusbar.policy
+
+import android.content.res.Resources
+import com.android.systemui.R
+
+/**
+ * Fake SplitShadeStateController
+ *
+ * Identical behaviour to legacy implementation (that used LargeScreenUtils.kt) I.E., behaviour
+ * based solely on resources, no extra flag logic.
+ */
+class ResourcesSplitShadeStateController : SplitShadeStateController {
+ override fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
+ return resources.getBoolean(R.bool.config_use_split_notification_shade)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
new file mode 100644
index 000000000000..f64d4c67ea23
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.systemui.statusbar.policy
+
+import android.content.res.Resources
+
+/** Source of truth for split shade state: should or should not use split shade. */
+interface SplitShadeStateController {
+ /** Returns true if the device should use the split notification shade. */
+ fun shouldUseSplitNotificationShade(resources: Resources): Boolean
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt
new file mode 100644
index 000000000000..ab4a8afcc3c9
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.systemui.statusbar.policy
+
+import android.content.res.Resources
+import com.android.systemui.R
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.flags.FeatureFlags
+import com.android.systemui.flags.Flags
+import javax.inject.Inject
+
+/**
+ * Source of truth for split shade state: should or should not use split shade based on orientation,
+ * screen width, and flags.
+ */
+@SysUISingleton
+class SplitShadeStateControllerImpl @Inject constructor(private val featureFlags: FeatureFlags) :
+ SplitShadeStateController {
+ /**
+ * Returns true if the device should use the split notification shade. Based on orientation,
+ * screen width, and flags.
+ */
+ override fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
+ return (resources.getBoolean(R.bool.config_use_split_notification_shade) ||
+ (featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE) &&
+ resources.getBoolean(R.bool.force_config_use_split_notification_shade)))
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt
new file mode 100644
index 000000000000..5322b3811f95
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy.dagger
+
+import javax.inject.Qualifier
+
+/** Logs for Battery events. See [BatteryControllerImpl] */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class BatteryControllerLog
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 c2a8e701653a..927024fbdd34 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
@@ -24,6 +24,8 @@ import com.android.internal.R;
import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.log.LogBuffer;
+import com.android.systemui.log.LogBufferFactory;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.connectivity.AccessPointController;
import com.android.systemui.statusbar.connectivity.AccessPointControllerImpl;
@@ -31,6 +33,7 @@ import com.android.systemui.statusbar.connectivity.NetworkController;
import com.android.systemui.statusbar.connectivity.NetworkControllerImpl;
import com.android.systemui.statusbar.connectivity.WifiPickerTrackerFactory;
import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
+import com.android.systemui.statusbar.policy.BatteryControllerLogger;
import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.BluetoothControllerImpl;
import com.android.systemui.statusbar.policy.CastController;
@@ -57,6 +60,8 @@ import com.android.systemui.statusbar.policy.RotationLockController;
import com.android.systemui.statusbar.policy.RotationLockControllerImpl;
import com.android.systemui.statusbar.policy.SecurityController;
import com.android.systemui.statusbar.policy.SecurityControllerImpl;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
+import com.android.systemui.statusbar.policy.SplitShadeStateControllerImpl;
import com.android.systemui.statusbar.policy.UserInfoController;
import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.WalletController;
@@ -110,6 +115,11 @@ public interface StatusBarPolicyModule {
/** */
@Binds
+ SplitShadeStateController provideSplitShadeStateController(
+ SplitShadeStateControllerImpl splitShadeStateControllerImpl);
+
+ /** */
+ @Binds
HotspotController provideHotspotController(HotspotControllerImpl controllerImpl);
/** */
@@ -202,4 +212,13 @@ public interface StatusBarPolicyModule {
static DataSaverController provideDataSaverController(NetworkController networkController) {
return networkController.getDataSaverController();
}
+
+ /** Provides a log bufffer for BatteryControllerImpl */
+ @Provides
+ @SysUISingleton
+ @BatteryControllerLog
+ //TODO(b/300147438): reduce the size of this log buffer
+ static LogBuffer provideBatteryControllerLog(LogBufferFactory factory) {
+ return factory.create(BatteryControllerLogger.TAG, 300);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt b/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
index 8b29310cf1c5..9b241a72b708 100644
--- a/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
@@ -4,16 +4,6 @@ import android.content.res.Resources
import com.android.systemui.R
object LargeScreenUtils {
-
- /**
- * Returns true if the device should use the split notification shade, based on orientation and
- * screen width.
- */
- @JvmStatic
- fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
- return resources.getBoolean(R.bool.config_use_split_notification_shade)
- }
-
/**
* Returns true if we should use large screen shade header:
* [com.android.systemui.statusbar.phone.LargeScreenShadeHeaderController]
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
index 61acacdb99a8..33d40976a2e4 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
@@ -113,6 +113,7 @@ class KeyguardPinViewControllerTest : SysuiTestCase() {
// For posture tests:
`when`(mockKeyguardPinView.buttons).thenReturn(arrayOf())
`when`(lockPatternUtils.getPinLength(anyInt())).thenReturn(6)
+ `when`(featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)).thenReturn(false)
objectKeyguardPINView =
View.inflate(mContext, R.layout.keyguard_pin_view, null)
@@ -122,6 +123,7 @@ class KeyguardPinViewControllerTest : SysuiTestCase() {
private fun constructPinViewController(
mKeyguardPinView: KeyguardPINView
): KeyguardPinViewController {
+ mKeyguardPinView.setIsLockScreenLandscapeEnabled(false)
return KeyguardPinViewController(
mKeyguardPinView,
keyguardUpdateMonitor,
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
index 5da919b22afe..7c1861e42d6d 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
@@ -43,6 +43,7 @@ import com.android.systemui.authentication.domain.interactor.AuthenticationInter
import com.android.systemui.biometrics.FaceAuthAccessibilityDelegate
import com.android.systemui.biometrics.SideFpsController
import com.android.systemui.biometrics.SideFpsUiRequestSource
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants
import com.android.systemui.classifier.FalsingA11yDelegate
import com.android.systemui.classifier.FalsingCollector
@@ -72,6 +73,7 @@ import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
import com.android.systemui.util.settings.GlobalSettings
import com.google.common.truth.Truth
+import dagger.Lazy
import java.util.Optional
import junit.framework.Assert
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -154,6 +156,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
private lateinit var sceneInteractor: SceneInteractor
private lateinit var keyguardTransitionInteractor: KeyguardTransitionInteractor
private lateinit var authenticationInteractor: AuthenticationInteractor
+ @Mock private lateinit var primaryBouncerInteractor: Lazy<PrimaryBouncerInteractor>
private lateinit var sceneTransitionStateFlow: MutableStateFlow<ObservableTransitionState>
private lateinit var underTest: KeyguardSecurityContainerController
@@ -193,6 +196,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
featureFlags.set(Flags.REVAMPED_BOUNCER_MESSAGES, true)
featureFlags.set(Flags.BOUNCER_USER_SWITCHER, false)
featureFlags.set(Flags.KEYGUARD_WM_STATE_REFACTOR, false)
+ featureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
keyguardPasswordViewController =
KeyguardPasswordViewController(
@@ -257,7 +261,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
userInteractor,
deviceProvisionedController,
faceAuthAccessibilityDelegate,
- keyguardTransitionInteractor
+ keyguardTransitionInteractor,
+ primaryBouncerInteractor,
) {
authenticationInteractor
}
@@ -381,6 +386,36 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
}
@Test
+ fun showSecurityScreen_oneHandedMode_flagEnabled_oneHandedMode_simpin() {
+ testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
+ setupGetSecurityView(SecurityMode.SimPin)
+ verify(view)
+ .initMode(
+ eq(KeyguardSecurityContainer.MODE_ONE_HANDED),
+ eq(globalSettings),
+ eq(falsingManager),
+ eq(userSwitcherController),
+ any(),
+ eq(falsingA11yDelegate)
+ )
+ }
+
+ @Test
+ fun showSecurityScreen_oneHandedMode_flagEnabled_oneHandedMode_simpuk() {
+ testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
+ setupGetSecurityView(SecurityMode.SimPuk)
+ verify(view)
+ .initMode(
+ eq(KeyguardSecurityContainer.MODE_ONE_HANDED),
+ eq(globalSettings),
+ eq(falsingManager),
+ eq(userSwitcherController),
+ any(),
+ eq(falsingA11yDelegate)
+ )
+ }
+
+ @Test
fun showSecurityScreen_twoHandedMode_flagEnabled_noOneHandedMode() {
testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
setupGetSecurityView(SecurityMode.Password)
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 0cd82f09b6c2..562d3a557ea2 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -29,7 +29,6 @@ import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_POWE
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
import static android.telephony.SubscriptionManager.DATA_ROAMING_DISABLE;
import static android.telephony.SubscriptionManager.NAME_SOURCE_CARRIER_ID;
-
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
@@ -39,16 +38,11 @@ import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_STATE_CANCELL
import static com.android.keyguard.KeyguardUpdateMonitor.DEFAULT_CANCEL_SIGNAL_TIMEOUT;
import static com.android.keyguard.KeyguardUpdateMonitor.HAL_POWER_PRESS_TIMEOUT;
import static com.android.keyguard.KeyguardUpdateMonitor.getCurrentUser;
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
-import static com.android.systemui.flags.Flags.STOP_FACE_AUTH_ON_DISPLAY_OFF;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_OPENED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
-
import static com.google.common.truth.Truth.assertThat;
-
import static junit.framework.Assert.assertEquals;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -145,7 +139,6 @@ import com.android.systemui.biometrics.AuthController;
import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FakeFeatureFlags;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.settings.FakeDisplayTracker;
@@ -299,7 +292,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
private final Executor mBackgroundExecutor = Runnable::run;
private final Executor mMainExecutor = Runnable::run;
private TestableLooper mTestableLooper;
- private FakeFeatureFlags mFeatureFlags;
private Handler mHandler;
private TestableKeyguardUpdateMonitor mKeyguardUpdateMonitor;
private MockitoSession mMockitoSession;
@@ -354,9 +346,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
mTestableLooper = TestableLooper.get(this);
allowTestableLooperAsMainThread();
- mFeatureFlags = new FakeFeatureFlags();
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
- mFeatureFlags.set(STOP_FACE_AUTH_ON_DISPLAY_OFF, false);
when(mSecureSettings.getUriFor(anyString())).thenReturn(mURI);
@@ -1593,8 +1582,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
@Test
public void listenForFingerprint_whenOccludingAppPkgOnAllowlist()
throws RemoteException {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
// GIVEN keyguard isn't visible (app occluding)
mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
mKeyguardUpdateMonitor.setKeyguardShowing(true, true);
@@ -1616,8 +1603,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
@Test
public void doNotListenForFingerprint_whenOccludingAppPkgNotOnAllowlist()
throws RemoteException {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
// GIVEN keyguard isn't visible (app occluding)
mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
mKeyguardUpdateMonitor.setKeyguardShowing(true, true);
@@ -2979,11 +2964,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
}
@Test
- public void stopFaceAuthOnDisplayOffFlagNotEnabled_doNotRegisterForDisplayCallback() {
- assertThat(mDisplayTracker.getDisplayCallbacks().size()).isEqualTo(0);
- }
-
- @Test
public void onDisplayOn_nothingHappens() throws RemoteException {
// GIVEN
keyguardIsVisible();
@@ -3325,7 +3305,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
clearInvocations(mFingerprintManager);
clearInvocations(mBiometricManager);
clearInvocations(mStatusBarStateController);
- mFeatureFlags.set(STOP_FACE_AUTH_ON_DISPLAY_OFF, true);
mKeyguardUpdateMonitor = new TestableKeyguardUpdateMonitor(mContext);
setupBiometrics(mKeyguardUpdateMonitor);
assertThat(mDisplayTracker.getDisplayCallbacks().size()).isEqualTo(1);
@@ -3407,7 +3386,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
mDreamManager, mDevicePolicyManager, mSensorPrivacyManager, mTelephonyManager,
mPackageManager, mFaceManager, mFingerprintManager, mBiometricManager,
mFaceWakeUpTriggersConfig, mDevicePostureController,
- Optional.of(mInteractiveToAuthProvider), mFeatureFlags,
+ Optional.of(mInteractiveToAuthProvider),
mTaskStackChangeListeners, mActivityTaskManager, mDisplayTracker);
setStrongAuthTracker(KeyguardUpdateMonitorTest.this.mStrongAuthTracker);
}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
index 09ff546120c6..0e4b3c9b6a23 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
@@ -19,6 +19,7 @@ package com.android.keyguard;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
import static com.android.systemui.flags.Flags.DOZING_MIGRATION_1;
import static com.android.systemui.flags.Flags.FACE_AUTH_REFACTOR;
+import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED;
import static com.android.systemui.flags.Flags.MIGRATE_LOCK_ICON;
@@ -146,6 +147,7 @@ public class LockIconViewControllerBaseTest extends SysuiTestCase {
mFeatureFlags.set(FACE_AUTH_REFACTOR, false);
mFeatureFlags.set(MIGRATE_LOCK_ICON, false);
mFeatureFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false);
+ mFeatureFlags.set(LOCKSCREEN_ENABLE_LANDSCAPE, false);
mUnderTest = new LockIconViewController(
mStatusBarStateController,
mKeyguardUpdateMonitor,
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
index 979fc83ec43a..a2dc7763d0ea 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
@@ -17,11 +17,9 @@
package com.android.keyguard;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
-
import static com.android.keyguard.LockIconView.ICON_LOCK;
import static com.android.keyguard.LockIconView.ICON_UNLOCK;
import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyInt;
@@ -40,8 +38,8 @@ import android.view.View;
import androidx.test.filters.SmallTest;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
import com.android.systemui.biometrics.UdfpsController;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
import com.android.systemui.doze.util.BurnInHelperKt;
import org.junit.Test;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
index 576f689a16d0..b478d5cc9d50 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
@@ -17,7 +17,6 @@
package com.android.systemui.accessibility;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doAnswer;
@@ -41,9 +40,7 @@ import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
-
-import dagger.Lazy;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
import org.junit.Before;
import org.junit.Test;
@@ -64,12 +61,12 @@ public class SystemActionsTest extends SysuiTestCase {
@Mock
private NotificationShadeWindowController mNotificationShadeController;
@Mock
+ private KeyguardStateController mKeyguardStateController;
+ @Mock
private ShadeController mShadeController;
@Mock
private ShadeViewController mShadeViewController;
@Mock
- private Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
- @Mock
private Optional<Recents> mRecentsOptional;
@Mock
private TelecomManager mTelecomManager;
@@ -84,9 +81,15 @@ public class SystemActionsTest extends SysuiTestCase {
MockitoAnnotations.initMocks(this);
mContext.addMockSystemService(TelecomManager.class, mTelecomManager);
mContext.addMockSystemService(InputManager.class, mInputManager);
- mSystemActions = new SystemActions(mContext, mUserTracker, mNotificationShadeController,
- mShadeController, () -> mShadeViewController, mCentralSurfacesOptionalLazy,
- mRecentsOptional, mDisplayTracker);
+ mSystemActions = new SystemActions(
+ mContext,
+ mUserTracker,
+ mNotificationShadeController,
+ mKeyguardStateController,
+ mShadeController,
+ () -> mShadeViewController,
+ mRecentsOptional,
+ mDisplayTracker);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt
deleted file mode 100644
index a93af7dd7450..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt
+++ /dev/null
@@ -1,164 +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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT
-import android.hardware.biometrics.BiometricConstants
-import android.hardware.face.FaceManager
-import android.testing.TestableLooper
-import android.testing.TestableLooper.RunWithLooper
-import android.view.View
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import com.android.systemui.R
-import com.android.systemui.RoboPilotTest
-import com.android.systemui.SysuiTestCase
-import com.google.common.truth.Truth.assertThat
-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.never
-import org.mockito.Mockito.verify
-import org.mockito.Mockito.times
-import org.mockito.junit.MockitoJUnit
-
-
-@RunWith(AndroidJUnit4::class)
-@RunWithLooper(setAsMainLooper = true)
-@SmallTest
-@RoboPilotTest
-class AuthBiometricFingerprintAndFaceViewTest : SysuiTestCase() {
-
- @JvmField
- @Rule
- var mockitoRule = MockitoJUnit.rule()
-
- @Mock
- private lateinit var callback: AuthBiometricView.Callback
-
- @Mock
- private lateinit var panelController: AuthPanelController
-
- private lateinit var biometricView: AuthBiometricFingerprintAndFaceView
-
- @Before
- fun setup() {
- biometricView = R.layout.auth_biometric_fingerprint_and_face_view
- .asTestAuthBiometricView(mContext, callback, panelController)
- waitForIdleSync()
- }
-
- @After
- fun tearDown() {
- biometricView.destroyDialog()
- }
-
- @Test
- fun fingerprintSuccessDoesNotRequireExplicitConfirmation() {
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.onAuthenticationSucceeded(TYPE_FINGERPRINT)
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticated).isTrue()
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
- }
-
- @Test
- fun faceSuccessRequiresExplicitConfirmation() {
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.onAuthenticationSucceeded(TYPE_FACE)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticated).isFalse()
- assertThat(biometricView.isAuthenticating).isFalse()
- assertThat(biometricView.mConfirmButton.visibility).isEqualTo(View.GONE)
- verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
-
- // icon acts as confirm button
- biometricView.mIconView.performClick()
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticated).isTrue()
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED_AND_CONFIRMED)
- }
-
- @Test
- fun ignoresFaceErrors_faceIsNotClass3_notLockoutError() {
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.onError(TYPE_FACE, "not a face")
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticating).isTrue()
- verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
- biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
- }
-
- @Test
- fun doNotIgnoresFaceErrors_faceIsClass3_notLockoutError() {
- biometricView.isFaceClass3 = true
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.onError(TYPE_FACE, "not a face")
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticating).isTrue()
- verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
- biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
- }
-
- @Test
- fun doNotIgnoresFaceErrors_faceIsClass3_lockoutError() {
- biometricView.isFaceClass3 = true
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.onError(
- TYPE_FACE,
- FaceManager.getErrorString(
- biometricView.context,
- BiometricConstants.BIOMETRIC_ERROR_LOCKOUT_PERMANENT,
- 0 /*vendorCode */
- )
- )
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticating).isTrue()
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
- biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback, times(2)).onAction(AuthBiometricView.Callback.ACTION_ERROR)
- }
-
-
- override fun waitForIdleSync() = TestableLooper.get(this).processAllMessages()
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
index cac618b21dc7..52bf350bfcc8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
@@ -27,6 +27,7 @@ import androidx.test.filters.SmallTest
import com.airbnb.lottie.LottieAnimationView
import com.android.systemui.R
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
import com.google.common.truth.Truth.assertThat
import org.junit.Before
import org.junit.Rule
@@ -63,7 +64,7 @@ class AuthBiometricFingerprintIconControllerTest : SysuiTestCase() {
setupFingerprintSensorProperties(FingerprintSensorProperties.TYPE_POWER_BUTTON)
controller = AuthBiometricFingerprintIconController(context, iconView, iconViewOverlay)
- assertThat(controller.getIconContentDescription(AuthBiometricView.STATE_AUTHENTICATING))
+ assertThat(controller.getIconContentDescription(BiometricState.STATE_AUTHENTICATING))
.isEqualTo(
context.resources.getString(
R.string.security_settings_sfps_enroll_find_sensor_message
@@ -76,7 +77,7 @@ class AuthBiometricFingerprintIconControllerTest : SysuiTestCase() {
setupFingerprintSensorProperties(FingerprintSensorProperties.TYPE_UDFPS_OPTICAL)
controller = AuthBiometricFingerprintIconController(context, iconView, iconViewOverlay)
- assertThat(controller.getIconContentDescription(AuthBiometricView.STATE_AUTHENTICATING))
+ assertThat(controller.getIconContentDescription(BiometricState.STATE_AUTHENTICATING))
.isEqualTo(context.resources.getString(R.string.fingerprint_dialog_touch_sensor))
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt
deleted file mode 100644
index 8e5d96b0a2c6..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt
+++ /dev/null
@@ -1,283 +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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator
-import android.os.Bundle
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import android.testing.TestableLooper
-import android.testing.TestableLooper.RunWithLooper
-import android.view.View
-import androidx.test.filters.SmallTest
-import com.android.systemui.R
-import com.android.systemui.RoboPilotTest
-import com.android.systemui.SysuiTestCase
-import com.google.common.truth.Truth.assertThat
-import org.junit.After
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentMatchers
-import org.mockito.ArgumentMatchers.eq
-import org.mockito.Mock
-import org.mockito.Mockito.never
-import org.mockito.Mockito.verify
-import org.mockito.junit.MockitoJUnit
-
-@RunWith(AndroidJUnit4::class)
-@RunWithLooper(setAsMainLooper = true)
-@SmallTest
-@RoboPilotTest
-class AuthBiometricFingerprintViewTest : SysuiTestCase() {
-
- @JvmField
- @Rule
- val mockitoRule = MockitoJUnit.rule()
-
- @Mock
- private lateinit var callback: AuthBiometricView.Callback
-
- @Mock
- private lateinit var panelController: AuthPanelController
-
- private lateinit var biometricView: AuthBiometricView
-
- private fun createView(allowDeviceCredential: Boolean = false): AuthBiometricFingerprintView {
- val view: AuthBiometricFingerprintView =
- R.layout.auth_biometric_fingerprint_view.asTestAuthBiometricView(
- mContext, callback, panelController, allowDeviceCredential = allowDeviceCredential
- )
- waitForIdleSync()
- return view
- }
-
- @Before
- fun setup() {
- biometricView = createView()
- }
-
- @After
- fun tearDown() {
- biometricView.destroyDialog()
- }
-
- @Test
- fun testOnAuthenticationSucceeded_noConfirmationRequired_sendsActionAuthenticated() {
- biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticated).isTrue()
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
- }
-
- @Test
- fun testOnAuthenticationSucceeded_confirmationRequired_updatesDialogContents() {
- biometricView.setRequireConfirmation(true)
- biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- // TODO: this should be tested in the subclasses
- if (biometricView.supportsRequireConfirmation()) {
- verify(callback, never()).onAction(ArgumentMatchers.anyInt())
- assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
- assertThat(biometricView.mCancelButton.visibility).isEqualTo(View.VISIBLE)
- assertThat(biometricView.mCancelButton.isEnabled).isTrue()
- assertThat(biometricView.mConfirmButton.isEnabled).isTrue()
- assertThat(biometricView.mIndicatorView.text)
- .isEqualTo(mContext.getText(R.string.biometric_dialog_tap_confirm))
- assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
- } else {
- assertThat(biometricView.isAuthenticated).isTrue()
- verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_AUTHENTICATED))
- }
- }
-
- @Test
- fun testPositiveButton_sendsActionAuthenticated() {
- biometricView.mConfirmButton.performClick()
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
- assertThat(biometricView.isAuthenticated).isTrue()
- }
-
- @Test
- fun testNegativeButton_beforeAuthentication_sendsActionButtonNegative() {
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- biometricView.mNegativeButton.performClick()
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE)
- }
-
- @Test
- fun testCancelButton_whenPendingConfirmation_sendsActionUserCanceled() {
- biometricView.setRequireConfirmation(true)
- biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
-
- assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
- biometricView.mCancelButton.performClick()
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_USER_CANCELED)
- }
-
- @Test
- fun testTryAgainButton_sendsActionTryAgain() {
- biometricView.mTryAgainButton.performClick()
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN)
- assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
- assertThat(biometricView.isAuthenticating).isTrue()
- }
-
- @Test
- fun testOnErrorSendsActionError() {
- biometricView.onError(BiometricAuthenticator.TYPE_FACE, "testError")
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_ERROR))
- }
-
- @Test
- fun testOnErrorShowsMessage() {
- // prevent error state from instantly returning to authenticating in the test
- biometricView.mAnimationDurationHideDialog = 10_000
-
- val message = "another error"
- biometricView.onError(BiometricAuthenticator.TYPE_FACE, message)
- TestableLooper.get(this).moveTimeForward(1000)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticating).isFalse()
- assertThat(biometricView.isAuthenticated).isFalse()
- assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
- assertThat(biometricView.mIndicatorView.text).isEqualTo(message)
- }
-
- @Test
- fun testBackgroundClicked_sendsActionUserCanceled() {
- val view = View(mContext)
- biometricView.setBackgroundView(view)
- view.performClick()
-
- verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
- }
-
- @Test
- fun testBackgroundClicked_afterAuthenticated_neverSendsUserCanceled() {
- val view = View(mContext)
- biometricView.setBackgroundView(view)
- biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
- waitForIdleSync()
- view.performClick()
-
- verify(callback, never())
- .onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
- }
-
- @Test
- fun testBackgroundClicked_whenSmallDialog_neverSendsUserCanceled() {
- biometricView.mLayoutParams = AuthDialog.LayoutParams(0, 0)
- biometricView.updateSize(AuthDialog.SIZE_SMALL)
- val view = View(mContext)
- biometricView.setBackgroundView(view)
- view.performClick()
-
- verify(callback, never()).onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
- }
-
- @Test
- fun testIgnoresUselessHelp() {
- biometricView.mAnimationDurationHideDialog = 10_000
- biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
- waitForIdleSync()
-
- assertThat(biometricView.isAuthenticating).isTrue()
-
- val helpText = biometricView.mIndicatorView.text
- biometricView.onHelp(BiometricAuthenticator.TYPE_FINGERPRINT, "")
- waitForIdleSync()
-
- // text should not change
- assertThat(biometricView.mIndicatorView.text).isEqualTo(helpText)
- verify(callback, never()).onAction(eq(AuthBiometricView.Callback.ACTION_ERROR))
- }
-
- @Test
- fun testRestoresState() {
- val requireConfirmation = true
- biometricView.mAnimationDurationHideDialog = 10_000
- val failureMessage = "testFailureMessage"
- biometricView.setRequireConfirmation(requireConfirmation)
- biometricView.onAuthenticationFailed(BiometricAuthenticator.TYPE_FACE, failureMessage)
- waitForIdleSync()
-
- val state = Bundle()
- biometricView.onSaveState(state)
- assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
- assertThat(state.getInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY))
- .isEqualTo(View.GONE)
- assertThat(state.getInt(AuthDialog.KEY_BIOMETRIC_STATE))
- .isEqualTo(AuthBiometricView.STATE_ERROR)
- assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
- assertThat(state.getBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING)).isTrue()
- assertThat(biometricView.mIndicatorView.text).isEqualTo(failureMessage)
- assertThat(state.getString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING))
- .isEqualTo(failureMessage)
-
- // TODO: Test dialog size. Should move requireConfirmation to buildBiometricPromptBundle
-
- // Create new dialog and restore the previous state into it
- biometricView.destroyDialog()
- biometricView = createView()
- biometricView.restoreState(state)
- biometricView.mAnimationDurationHideDialog = 10_000
- biometricView.setRequireConfirmation(requireConfirmation)
- waitForIdleSync()
-
- assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
- assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
-
- // TODO: Test restored text. Currently cannot test this, since it gets restored only after
- // dialog size is known.
- }
-
- @Test
- fun testCredentialButton_whenDeviceCredentialAllowed() {
- biometricView.destroyDialog()
- biometricView = createView(allowDeviceCredential = true)
-
- assertThat(biometricView.mUseCredentialButton.visibility).isEqualTo(View.VISIBLE)
- assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
-
- biometricView.mUseCredentialButton.performClick()
- waitForIdleSync()
-
- verify(callback).onAction(AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL)
- }
-
- override fun waitForIdleSync() = TestableLooper.get(this).processAllMessages()
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
index 9584d888b01f..969a01164734 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
@@ -41,13 +41,15 @@ import com.android.systemui.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.biometrics.domain.interactor.FakeCredentialInteractor
import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel
import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel
+import com.android.systemui.display.data.repository.FakeDisplayRepository
import com.android.systemui.flags.FakeFeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.WakefulnessLifecycle
@@ -103,14 +105,11 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Mock
lateinit var vibrator: VibratorHelper
- // TODO(b/278622168): remove with flag
- open val useNewBiometricPrompt = false
-
private val testScope = TestScope(StandardTestDispatcher())
private val fakeExecutor = FakeExecutor(FakeSystemClock())
private val biometricPromptRepository = FakePromptRepository()
private val fingerprintRepository = FakeFingerprintPropertyRepository()
- private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+ private val displayStateRepository = FakeDisplayStateRepository()
private val credentialInteractor = FakeCredentialInteractor()
private val bpCredentialInteractor = PromptCredentialInteractor(
Dispatchers.Main.immediate,
@@ -125,13 +124,8 @@ open class AuthContainerViewTest : SysuiTestCase() {
)
}
- private val displayStateInteractor = DisplayStateInteractorImpl(
- testScope.backgroundScope,
- mContext,
- fakeExecutor,
- rearDisplayStateRepository
- )
-
+ private lateinit var displayRepository: FakeDisplayRepository
+ private lateinit var displayStateInteractor: DisplayStateInteractor
private val credentialViewModel = CredentialViewModel(mContext, bpCredentialInteractor)
@@ -139,8 +133,17 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Before
fun setup() {
- featureFlags.set(Flags.BIOMETRIC_BP_STRONG, useNewBiometricPrompt)
+ displayRepository = FakeDisplayRepository()
featureFlags.set(Flags.ONE_WAY_HAPTICS_API_MIGRATION, false)
+
+ displayStateInteractor =
+ DisplayStateInteractorImpl(
+ testScope.backgroundScope,
+ mContext,
+ fakeExecutor,
+ displayStateRepository,
+ displayRepository,
+ )
}
@After
@@ -228,9 +231,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Test
fun testActionCancel_panelInteractionDetectorDisable() {
val container = initializeFingerprintContainer()
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_USER_CANCELED
- )
+ container.mBiometricCallback.onUserCanceled()
waitForIdleSync()
verify(panelInteractionDetector).disable()
}
@@ -239,9 +240,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Test
fun testActionAuthenticated_sendsDismissedAuthenticated() {
val container = initializeFingerprintContainer()
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_AUTHENTICATED
- )
+ container.mBiometricCallback.onAuthenticated()
waitForIdleSync()
verify(callback).onDismissed(
@@ -255,9 +254,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Test
fun testActionUserCanceled_sendsDismissedUserCanceled() {
val container = initializeFingerprintContainer()
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_USER_CANCELED
- )
+ container.mBiometricCallback.onUserCanceled()
waitForIdleSync()
verify(callback).onSystemEvent(
@@ -275,9 +272,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Test
fun testActionButtonNegative_sendsDismissedButtonNegative() {
val container = initializeFingerprintContainer()
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE
- )
+ container.mBiometricCallback.onButtonNegative()
waitForIdleSync()
verify(callback).onDismissed(
@@ -293,9 +288,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
val container = initializeFingerprintContainer(
authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK
)
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN
- )
+ container.mBiometricCallback.onButtonTryAgain()
waitForIdleSync()
verify(callback).onTryAgainPressed(authContainer?.requestId ?: 0L)
@@ -304,9 +297,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
@Test
fun testActionError_sendsDismissedError() {
val container = initializeFingerprintContainer()
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_ERROR
- )
+ container.mBiometricCallback.onError()
waitForIdleSync()
verify(callback).onDismissed(
@@ -324,9 +315,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK or
BiometricManager.Authenticators.DEVICE_CREDENTIAL
)
- container.mBiometricCallback.onAction(
- AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL
- )
+ container.mBiometricCallback.onUseDeviceCredential()
waitForIdleSync()
verify(callback).onDeviceCredentialPressed(authContainer?.requestId ?: 0L)
@@ -531,6 +520,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
displayStateInteractor,
promptSelectorInteractor,
vibrator,
+ context,
featureFlags
),
{ credentialViewModel },
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
index 6d71dd5cd8ba..d0b3833a24a1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
@@ -17,22 +17,17 @@
package com.android.systemui.biometrics;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
-import static android.hardware.biometrics.BiometricManager.Authenticators;
-
import static com.google.common.truth.Truth.assertThat;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotSame;
import static junit.framework.Assert.assertNull;
import static junit.framework.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.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -48,7 +43,6 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Point;
import android.hardware.biometrics.BiometricAuthenticator;
@@ -69,7 +63,6 @@ import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintSensorProperties;
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback;
-import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
import android.os.UserManager;
@@ -86,7 +79,6 @@ import androidx.test.filters.SmallTest;
import com.android.internal.R;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.widget.LockPatternUtils;
-import com.android.settingslib.udfps.UdfpsUtils;
import com.android.systemui.RoboPilotTest;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.biometrics.domain.interactor.LogContextInteractor;
@@ -95,7 +87,6 @@ import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteracto
import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.VibratorHelper;
@@ -207,10 +198,6 @@ public class AuthControllerTest extends SysuiTestCase {
@Before
public void setup() throws RemoteException {
- // TODO(b/278622168): remove with flag
- // AuthController simply passes this through to AuthContainerView (does not impact test)
- mFeatureFlags.set(Flags.BIOMETRIC_BP_STRONG, false);
-
mContextSpy = spy(mContext);
mExecution = new FakeExecution();
mTestableLooper = TestableLooper.get(this);
@@ -463,7 +450,7 @@ public class AuthControllerTest extends SysuiTestCase {
@Test
public void testShowInvoked_whenSystemRequested() {
showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
- verify(mDialog1).show(any(), any());
+ verify(mDialog1).show(any());
}
@Test
@@ -664,7 +651,7 @@ public class AuthControllerTest extends SysuiTestCase {
// 2) Client cancels authentication
showDialog(new int[0] /* sensorIds */, true /* credentialAllowed */);
- verify(mDialog1).show(any(), any());
+ verify(mDialog1).show(any());
final byte[] credentialAttestation = generateRandomHAT();
@@ -680,7 +667,7 @@ public class AuthControllerTest extends SysuiTestCase {
@Test
public void testShowNewDialog_beforeOldDialogDismissed_SkipsAnimations() {
showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
- verify(mDialog1).show(any(), any());
+ verify(mDialog1).show(any());
showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
@@ -688,59 +675,7 @@ public class AuthControllerTest extends SysuiTestCase {
verify(mDialog1).dismissWithoutCallback(eq(false) /* animate */);
// Second dialog should be shown without animation
- verify(mDialog2).show(any(), any());
- }
-
- @Test
- public void testConfigurationPersists_whenOnConfigurationChanged() {
- showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
- verify(mDialog1).show(any(), any());
-
- // Return that the UI is in "showing" state
- doAnswer(invocation -> {
- Object[] args = invocation.getArguments();
- Bundle savedState = (Bundle) args[0];
- savedState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false);
- return null; // onSaveState returns void
- }).when(mDialog1).onSaveState(any());
-
- mAuthController.onConfigurationChanged(new Configuration());
-
- ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class);
- verify(mDialog1).onSaveState(captor.capture());
-
- // Old dialog doesn't animate
- verify(mDialog1).dismissWithoutCallback(eq(false /* animate */));
-
- // Saved state is restored into new dialog
- ArgumentCaptor<Bundle> captor2 = ArgumentCaptor.forClass(Bundle.class);
- verify(mDialog2).show(any(), captor2.capture());
-
- // TODO: This should check all values we want to save/restore
- assertEquals(captor.getValue(), captor2.getValue());
- }
-
- @Test
- public void testConfigurationPersists_whenBiometricFallbackToCredential() {
- showDialog(new int[] {1} /* sensorIds */, true /* credentialAllowed */);
- verify(mDialog1).show(any(), any());
-
- // Pretend that the UI is now showing device credential UI.
- doAnswer(invocation -> {
- Object[] args = invocation.getArguments();
- Bundle savedState = (Bundle) args[0];
- savedState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false);
- savedState.putBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING, true);
- return null; // onSaveState returns void
- }).when(mDialog1).onSaveState(any());
-
- mAuthController.onConfigurationChanged(new Configuration());
-
- // Check that the new dialog was initialized to the credential UI.
- ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class);
- verify(mDialog2).show(any(), captor.capture());
- assertEquals(Authenticators.DEVICE_CREDENTIAL,
- mAuthController.mLastBiometricPromptInfo.getAuthenticators());
+ verify(mDialog2).show(any());
}
@Test
@@ -1010,7 +945,7 @@ public class AuthControllerTest extends SysuiTestCase {
REQUEST_ID);
assertNull(mAuthController.mCurrentDialog);
- verify(mDialog1, never()).show(any(), any());
+ verify(mDialog1, never()).show(any());
}
private void showDialog(int[] sensorIds, boolean credentialAllowed) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
index 2bb3785f0eef..8fc63b246c9d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
@@ -36,6 +36,7 @@ import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFl
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
import com.android.systemui.user.data.repository.FakeUserRepository
@@ -72,6 +73,7 @@ class AuthDialogPanelInteractionDetectorTest : SysuiTestCase() {
SharedNotificationContainerInteractor(
configurationRepository,
mContext,
+ ResourcesSplitShadeStateController()
)
private lateinit var detector: AuthDialogPanelInteractionDetector
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
index 94244cdf271d..9f24a9f553a1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
@@ -16,8 +16,6 @@
package com.android.systemui.biometrics
-import android.annotation.IdRes
-import android.content.Context
import android.hardware.biometrics.BiometricManager.Authenticators
import android.hardware.biometrics.ComponentInfoInternal
import android.hardware.biometrics.PromptInfo
@@ -27,57 +25,6 @@ import android.hardware.face.FaceSensorProperties
import android.hardware.face.FaceSensorPropertiesInternal
import android.hardware.fingerprint.FingerprintSensorProperties
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
-import android.os.Bundle
-import android.testing.ViewUtils
-import android.view.LayoutInflater
-
-/**
- * Inflate the given BiometricPrompt layout and initialize it with test parameters.
- *
- * This attaches the view so be sure to call [destroyDialog] at the end of the test.
- */
-@IdRes
-internal fun <T : AuthBiometricView> Int.asTestAuthBiometricView(
- context: Context,
- callback: AuthBiometricView.Callback,
- panelController: AuthPanelController,
- allowDeviceCredential: Boolean = false,
- savedState: Bundle? = null,
- hideDelay: Int = 0
-): T {
- val view = LayoutInflater.from(context).inflate(this, null, false) as T
- view.mAnimationDurationLong = 0
- view.mAnimationDurationShort = 0
- view.mAnimationDurationHideDialog = hideDelay
- view.setPromptInfo(buildPromptInfo(allowDeviceCredential))
- view.setCallback(callback)
- view.restoreState(savedState)
- view.setPanelController(panelController)
-
- ViewUtils.attachView(view)
-
- return view
-}
-
-private fun buildPromptInfo(allowDeviceCredential: Boolean): PromptInfo {
- val promptInfo = PromptInfo()
- promptInfo.title = "Title"
- var authenticators = Authenticators.BIOMETRIC_WEAK
- if (allowDeviceCredential) {
- authenticators = authenticators or Authenticators.DEVICE_CREDENTIAL
- } else {
- promptInfo.negativeButtonText = "Negative"
- }
- promptInfo.authenticators = authenticators
- return promptInfo
-}
-
-/** Detach the view, if needed. */
-internal fun AuthBiometricView?.destroyDialog() {
- if (this != null && isAttachedToWindow) {
- ViewUtils.detachView(this)
- }
-}
/** Create [FingerprintSensorPropertiesInternal] for a test. */
internal fun fingerprintSensorPropertiesInternal(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
index 994db460cdbb..17928a3da140 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
@@ -56,11 +56,12 @@ import com.android.systemui.R
import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.SysuiTestableContext
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.display.data.repository.FakeDisplayRepository
import com.android.systemui.dump.DumpManager
import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository
import com.android.systemui.plugins.statusbar.StatusBarStateController
@@ -115,12 +116,13 @@ class SideFpsControllerTest : SysuiTestCase() {
@Captor lateinit var overlayCaptor: ArgumentCaptor<View>
@Captor lateinit var overlayViewParamsCaptor: ArgumentCaptor<WindowManager.LayoutParams>
+ private lateinit var displayRepository: FakeDisplayRepository
+ private lateinit var displayStateRepository: FakeDisplayStateRepository
private lateinit var keyguardBouncerRepository: FakeKeyguardBouncerRepository
private lateinit var alternateBouncerInteractor: AlternateBouncerInteractor
private lateinit var displayStateInteractor: DisplayStateInteractor
private val executor = FakeExecutor(FakeSystemClock())
- private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
private val testScope = TestScope(StandardTestDispatcher())
private lateinit var overlayController: ISidefpsController
@@ -142,6 +144,8 @@ class SideFpsControllerTest : SysuiTestCase() {
@Before
fun setup() {
+ displayRepository = FakeDisplayRepository()
+ displayStateRepository = FakeDisplayStateRepository()
keyguardBouncerRepository = FakeKeyguardBouncerRepository()
alternateBouncerInteractor =
AlternateBouncerInteractor(
@@ -157,7 +161,8 @@ class SideFpsControllerTest : SysuiTestCase() {
testScope.backgroundScope,
context,
executor,
- rearDisplayStateRepository
+ displayStateRepository,
+ displayRepository,
)
context.addMockSystemService(DisplayManager::class.java, displayManager)
@@ -268,7 +273,7 @@ class SideFpsControllerTest : SysuiTestCase() {
TestCoroutineScope(),
dumpManager
)
- rearDisplayStateRepository.setIsInRearDisplayMode(inRearDisplayMode)
+ displayStateRepository.setIsInRearDisplayMode(inRearDisplayMode)
overlayController =
ArgumentCaptor.forClass(ISidefpsController::class.java)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
index 7de78a60b73e..469f65a6cae5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
@@ -21,6 +21,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.shade.ShadeExpansionStateManager
@@ -44,6 +45,7 @@ class UdfpsBpViewControllerTest : SysuiTestCase() {
@Mock lateinit var udfpsBpView: UdfpsBpView
@Mock lateinit var statusBarStateController: StatusBarStateController
@Mock lateinit var shadeExpansionStateManager: ShadeExpansionStateManager
+ @Mock lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor
@Mock lateinit var systemUIDialogManager: SystemUIDialogManager
@Mock lateinit var dumpManager: DumpManager
@@ -55,12 +57,13 @@ class UdfpsBpViewControllerTest : SysuiTestCase() {
UdfpsBpViewController(
udfpsBpView,
statusBarStateController,
- shadeExpansionStateManager,
+ primaryBouncerInteractor,
systemUIDialogManager,
dumpManager
)
}
+ @TestableLooper.RunWithLooper(setAsMainLooper = true)
@Test
fun testShouldNeverPauseAuth() {
assertFalse(udfpsBpViewController.shouldPauseAuth())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
index 0e0d0e3f3748..c73541972a3c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
@@ -37,12 +37,11 @@ import android.view.accessibility.AccessibilityManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
-import com.android.settingslib.udfps.UdfpsUtils
import com.android.systemui.R
import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.animation.ActivityLaunchAnimator
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
@@ -50,7 +49,6 @@ import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.LockscreenShadeTransitionController
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
import com.android.systemui.statusbar.phone.SystemUIDialogManager
@@ -97,7 +95,6 @@ class UdfpsControllerOverlayTest : SysuiTestCase() {
@Mock private lateinit var windowManager: WindowManager
@Mock private lateinit var accessibilityManager: AccessibilityManager
@Mock private lateinit var statusBarStateController: StatusBarStateController
- @Mock private lateinit var shadeExpansionStateManager: ShadeExpansionStateManager
@Mock private lateinit var statusBarKeyguardViewManager: StatusBarKeyguardViewManager
@Mock private lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor
@Mock private lateinit var dialogManager: SystemUIDialogManager
@@ -145,13 +142,32 @@ class UdfpsControllerOverlayTest : SysuiTestCase() {
block: () -> Unit
) {
controllerOverlay = UdfpsControllerOverlay(
- context, fingerprintManager, inflater, windowManager, accessibilityManager,
- statusBarStateController, shadeExpansionStateManager, statusBarKeyguardViewManager,
- keyguardUpdateMonitor, dialogManager, dumpManager, transitionController,
- configurationController, keyguardStateController, unlockedScreenOffAnimationController,
- udfpsDisplayMode, secureSettings, REQUEST_ID, reason,
- controllerCallback, onTouch, activityLaunchAnimator, featureFlags,
- primaryBouncerInteractor, alternateBouncerInteractor, isDebuggable, udfpsUtils,
+ context,
+ fingerprintManager,
+ inflater,
+ windowManager,
+ accessibilityManager,
+ statusBarStateController,
+ statusBarKeyguardViewManager,
+ keyguardUpdateMonitor,
+ dialogManager,
+ dumpManager,
+ transitionController,
+ configurationController,
+ keyguardStateController,
+ unlockedScreenOffAnimationController,
+ udfpsDisplayMode,
+ secureSettings,
+ REQUEST_ID,
+ reason,
+ controllerCallback,
+ onTouch,
+ activityLaunchAnimator,
+ featureFlags,
+ primaryBouncerInteractor,
+ alternateBouncerInteractor,
+ isDebuggable,
+ udfpsUtils,
udfpsKeyguardAccessibilityDelegate,
udfpsKeyguardViewModels,
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
index e01b5afefe0a..b6bc7afe2c7a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
@@ -20,15 +20,12 @@ import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPR
import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_MOVE;
import static android.view.MotionEvent.ACTION_UP;
-
import static com.android.internal.util.FunctionalUtils.ThrowingConsumer;
import static com.android.systemui.classifier.Classifier.UDFPS_AUTHENTICATION;
import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyFloat;
@@ -77,12 +74,11 @@ import androidx.test.filters.SmallTest;
import com.android.internal.logging.InstanceIdSequence;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
import com.android.systemui.R;
import com.android.systemui.RoboPilotTest;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.animation.ActivityLaunchAnimator;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
import com.android.systemui.biometrics.udfps.InteractionEvent;
import com.android.systemui.biometrics.udfps.NormalizedTouchData;
import com.android.systemui.biometrics.udfps.SinglePointerTouchProcessor;
@@ -98,7 +94,6 @@ import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.statusbar.LockscreenShadeTransitionController;
import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -314,19 +309,48 @@ public class UdfpsControllerTest extends SysuiTestCase {
(Provider<AlternateUdfpsTouchProvider>) () -> mAlternateTouchProvider)
: Optional.empty();
- mUdfpsController = new UdfpsController(mContext, new FakeExecution(), mLayoutInflater,
- mFingerprintManager, mWindowManager, mStatusBarStateController, mFgExecutor,
- new ShadeExpansionStateManager(), mStatusBarKeyguardViewManager, mDumpManager,
- mKeyguardUpdateMonitor, mFeatureFlags, mFalsingManager, mPowerManager,
- mAccessibilityManager, mLockscreenShadeTransitionController, mScreenLifecycle,
- mVibrator, mUdfpsHapticsSimulator, mUdfpsShell, mKeyguardStateController,
- mDisplayManager, mHandler, mConfigurationController, mSystemClock,
- mUnlockedScreenOffAnimationController, mSystemUIDialogManager, mLatencyTracker,
- mActivityLaunchAnimator, alternateTouchProvider, mBiometricExecutor,
- mPrimaryBouncerInteractor, mSinglePointerTouchProcessor, mSessionTracker,
- mAlternateBouncerInteractor, mSecureSettings, mInputManager, mUdfpsUtils,
+ mUdfpsController = new UdfpsController(
+ mContext,
+ new FakeExecution(),
+ mLayoutInflater,
+ mFingerprintManager,
+ mWindowManager,
+ mStatusBarStateController,
+ mFgExecutor,
+ mStatusBarKeyguardViewManager,
+ mDumpManager,
+ mKeyguardUpdateMonitor,
+ mFeatureFlags,
+ mFalsingManager,
+ mPowerManager,
+ mAccessibilityManager,
+ mLockscreenShadeTransitionController,
+ mScreenLifecycle,
+ mVibrator,
+ mUdfpsHapticsSimulator,
+ mUdfpsShell,
+ mKeyguardStateController,
+ mDisplayManager,
+ mHandler,
+ mConfigurationController,
+ mSystemClock,
+ mUnlockedScreenOffAnimationController,
+ mSystemUIDialogManager,
+ mLatencyTracker,
+ mActivityLaunchAnimator,
+ alternateTouchProvider,
+ mBiometricExecutor,
+ mPrimaryBouncerInteractor,
+ mSinglePointerTouchProcessor,
+ mSessionTracker,
+ mAlternateBouncerInteractor,
+ mSecureSettings,
+ mInputManager,
+ mUdfpsUtils,
mock(KeyguardFaceAuthInteractor.class),
- mUdfpsKeyguardAccessibilityDelegate, mUdfpsKeyguardViewModels);
+ mUdfpsKeyguardAccessibilityDelegate,
+ mUdfpsKeyguardViewModels
+ );
verify(mFingerprintManager).setUdfpsOverlayController(mOverlayCaptor.capture());
mOverlayController = mOverlayCaptor.getValue();
verify(mScreenLifecycle).addObserver(mScreenObserverCaptor.capture());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
index 032753a19044..3276e6624004 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
@@ -18,7 +18,6 @@ package com.android.systemui.biometrics;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -27,15 +26,14 @@ import android.content.Context;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.animation.ActivityLaunchAnimator;
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FakeFeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
-import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.shade.ShadeExpansionChangeEvent;
-import com.android.systemui.shade.ShadeExpansionListener;
import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.statusbar.LockscreenShadeTransitionController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -51,8 +49,6 @@ import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import java.util.List;
-
public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase {
// Dependencies
protected @Mock UdfpsKeyguardViewLegacy mView;
@@ -83,9 +79,6 @@ public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase {
private @Captor ArgumentCaptor<StatusBarStateController.StateListener> mStateListenerCaptor;
protected StatusBarStateController.StateListener mStatusBarStateListener;
- private @Captor ArgumentCaptor<ShadeExpansionListener> mExpansionListenerCaptor;
- protected List<ShadeExpansionListener> mExpansionListeners;
-
private @Captor ArgumentCaptor<KeyguardStateController.Callback>
mKeyguardStateControllerCallbackCaptor;
protected KeyguardStateController.Callback mKeyguardStateControllerCallback;
@@ -116,23 +109,6 @@ public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase {
mStatusBarStateListener = mStateListenerCaptor.getValue();
}
- protected void captureStatusBarExpansionListeners() {
- verify(mShadeExpansionStateManager, times(2))
- .addExpansionListener(mExpansionListenerCaptor.capture());
- // first (index=0) is from super class, UdfpsAnimationViewController.
- // second (index=1) is from UdfpsKeyguardViewController
- mExpansionListeners = mExpansionListenerCaptor.getAllValues();
- }
-
- protected void updateStatusBarExpansion(float fraction, boolean expanded) {
- ShadeExpansionChangeEvent event =
- new ShadeExpansionChangeEvent(
- fraction, expanded, /* tracking= */ false, /* dragDownPxAmount= */ 0f);
- for (ShadeExpansionListener listener : mExpansionListeners) {
- listener.onPanelExpansionChanged(event);
- }
- }
-
protected void captureKeyguardStateControllerCallback() {
verify(mKeyguardStateController).addCallback(
mKeyguardStateControllerCallbackCaptor.capture());
@@ -155,7 +131,6 @@ public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase {
UdfpsKeyguardViewControllerLegacy controller = new UdfpsKeyguardViewControllerLegacy(
mView,
mStatusBarStateController,
- mShadeExpansionStateManager,
mStatusBarKeyguardViewManager,
mKeyguardUpdateMonitor,
mDumpManager,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
index d24290f6f2e4..8508f45b02f3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
@@ -21,9 +21,7 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.atLeast;
-import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -34,7 +32,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import com.android.systemui.RoboPilotTest;
-import com.android.systemui.shade.ShadeExpansionListener;
import com.android.systemui.statusbar.StatusBarState;
import org.junit.Test;
@@ -66,12 +63,6 @@ public class UdfpsKeyguardViewLegacyControllerTest extends
}
@Test
- public void testRegistersExpansionChangedListenerOnAttached() {
- mController.onViewAttached();
- captureStatusBarExpansionListeners();
- }
-
- @Test
public void testRegistersStatusBarStateListenersOnAttached() {
mController.onViewAttached();
captureStatusBarStateListeners();
@@ -98,14 +89,10 @@ public class UdfpsKeyguardViewLegacyControllerTest extends
public void testListenersUnregisteredOnDetached() {
mController.onViewAttached();
captureStatusBarStateListeners();
- captureStatusBarExpansionListeners();
captureKeyguardStateControllerCallback();
mController.onViewDetached();
verify(mStatusBarStateController).removeCallback(mStatusBarStateListener);
- for (ShadeExpansionListener listener : mExpansionListeners) {
- verify(mShadeExpansionStateManager).removeExpansionListener(listener);
- }
verify(mKeyguardStateController).removeCallback(mKeyguardStateControllerCallback);
}
@@ -134,23 +121,6 @@ public class UdfpsKeyguardViewLegacyControllerTest extends
}
@Test
- public void testFadeFromDialogSuggestedAlpha() {
- // GIVEN view is attached and status bar expansion is 1f
- mController.onViewAttached();
- captureStatusBarStateListeners();
- captureStatusBarExpansionListeners();
- updateStatusBarExpansion(1f, true);
- reset(mView);
-
- // WHEN dialog suggested alpha is .6f
- when(mView.getDialogSuggestedAlpha()).thenReturn(.6f);
- sendStatusBarStateChanged(StatusBarState.KEYGUARD);
-
- // THEN alpha is updated based on dialog suggested alpha
- verify(mView).setUnpausedAlpha((int) (.6f * 255));
- }
-
- @Test
public void testShouldNotPauseAuthOnKeyguard() {
mController.onViewAttached();
captureStatusBarStateListeners();
@@ -250,72 +220,6 @@ public class UdfpsKeyguardViewLegacyControllerTest extends
}
@Test
- public void testFadeInWithStatusBarExpansion() {
- // GIVEN view is attached
- mController.onViewAttached();
- captureStatusBarExpansionListeners();
- captureKeyguardStateControllerCallback();
- reset(mView);
-
- // WHEN status bar expansion is 0
- updateStatusBarExpansion(0, true);
-
- // THEN alpha is 0
- verify(mView).setUnpausedAlpha(0);
- }
-
- @Test
- public void testTransitionToFullShadeProgress() {
- // GIVEN view is attached and status bar expansion is 1f
- mController.onViewAttached();
- captureStatusBarExpansionListeners();
- updateStatusBarExpansion(1f, true);
- reset(mView);
- when(mView.getDialogSuggestedAlpha()).thenReturn(1f);
-
- // WHEN we're transitioning to the full shade
- float transitionProgress = .6f;
- mController.setTransitionToFullShadeProgress(transitionProgress);
-
- // THEN alpha is between 0 and 255
- verify(mView).setUnpausedAlpha((int) ((1f - transitionProgress) * 255));
- }
-
- @Test
- public void testUpdatePanelExpansion_pauseAuth() {
- // GIVEN view is attached + on the keyguard
- mController.onViewAttached();
- captureStatusBarStateListeners();
- captureStatusBarExpansionListeners();
- sendStatusBarStateChanged(StatusBarState.KEYGUARD);
- reset(mView);
-
- // WHEN panelViewExpansion changes to hide
- when(mView.getUnpausedAlpha()).thenReturn(0);
- updateStatusBarExpansion(0f, false);
-
- // THEN pause auth is updated to PAUSE
- verify(mView, atLeastOnce()).setPauseAuth(true);
- }
-
- @Test
- public void testUpdatePanelExpansion_unpauseAuth() {
- // GIVEN view is attached + on the keyguard + panel expansion is 0f
- mController.onViewAttached();
- captureStatusBarStateListeners();
- captureStatusBarExpansionListeners();
- sendStatusBarStateChanged(StatusBarState.KEYGUARD);
- reset(mView);
-
- // WHEN panelViewExpansion changes to expanded
- when(mView.getUnpausedAlpha()).thenReturn(255);
- updateStatusBarExpansion(1f, true);
-
- // THEN pause auth is updated to NOT pause
- verify(mView, atLeastOnce()).setPauseAuth(false);
- }
-
- @Test
// TODO(b/259264861): Tracking Bug
public void testUdfpsExpandedOverlayOn() {
// GIVEN view is attached and useExpandedOverlay is true
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
index 8dfeb3bde0c0..1885f6499299 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
@@ -39,8 +39,10 @@ import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.util.mockito.whenever
import com.android.systemui.util.time.FakeSystemClock
import com.android.systemui.util.time.SystemClock
+import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
@@ -51,6 +53,7 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers.any
import org.mockito.Mock
+import org.mockito.Mockito
import org.mockito.Mockito.mock
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
@@ -62,15 +65,15 @@ import org.mockito.MockitoAnnotations
@kotlinx.coroutines.ExperimentalCoroutinesApi
class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest :
UdfpsKeyguardViewLegacyControllerBaseTest() {
- lateinit var keyguardBouncerRepository: KeyguardBouncerRepository
- @Mock private lateinit var bouncerLogger: TableLogBuffer
+ private val testDispatcher = StandardTestDispatcher()
+ private val testScope = TestScope(testDispatcher)
+
+ private lateinit var keyguardBouncerRepository: KeyguardBouncerRepository
- private lateinit var testScope: TestScope
+ @Mock private lateinit var bouncerLogger: TableLogBuffer
@Before
override fun setUp() {
- testScope = TestScope()
-
allowTestableLooperAsMainThread() // repeatWhenAttached requires the main thread
MockitoAnnotations.initMocks(this)
keyguardBouncerRepository =
@@ -82,7 +85,7 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest :
super.setUp()
}
- override fun createUdfpsKeyguardViewController(): UdfpsKeyguardViewControllerLegacy? {
+ override fun createUdfpsKeyguardViewController(): UdfpsKeyguardViewControllerLegacy {
mPrimaryBouncerInteractor =
PrimaryBouncerInteractor(
keyguardBouncerRepository,
@@ -115,6 +118,70 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest :
}
@Test
+ fun bouncerExpansionChange_fadeIn() =
+ testScope.runTest {
+ // GIVEN view is attached
+ mController.onViewAttached()
+ captureKeyguardStateControllerCallback()
+ Mockito.reset(mView)
+
+ // WHEN status bar expansion is 0
+ val job = mController.listenForBouncerExpansion(this)
+ keyguardBouncerRepository.setPrimaryShow(true)
+ keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
+ runCurrent()
+
+ // THEN alpha is 0
+ verify(mView).unpausedAlpha = 0
+
+ job.cancel()
+ }
+
+ @Test
+ fun bouncerExpansionChange_pauseAuth() =
+ testScope.runTest {
+ // GIVEN view is attached + on the keyguard
+ mController.onViewAttached()
+ captureStatusBarStateListeners()
+ sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+ Mockito.reset(mView)
+
+ // WHEN panelViewExpansion changes to hide
+ whenever(mView.unpausedAlpha).thenReturn(0)
+ val job = mController.listenForBouncerExpansion(this)
+ keyguardBouncerRepository.setPrimaryShow(true)
+ keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
+ runCurrent()
+
+ // THEN pause auth is updated to PAUSE
+ verify(mView, Mockito.atLeastOnce()).setPauseAuth(true)
+
+ job.cancel()
+ }
+
+ @Test
+ fun bouncerExpansionChange_unpauseAuth() =
+ testScope.runTest {
+ // GIVEN view is attached + on the keyguard + panel expansion is 0f
+ mController.onViewAttached()
+ captureStatusBarStateListeners()
+ sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+ Mockito.reset(mView)
+
+ // WHEN panelViewExpansion changes to expanded
+ whenever(mView.unpausedAlpha).thenReturn(255)
+ val job = mController.listenForBouncerExpansion(this)
+ keyguardBouncerRepository.setPrimaryShow(true)
+ keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+ runCurrent()
+
+ // THEN pause auth is updated to NOT pause
+ verify(mView, Mockito.atLeastOnce()).setPauseAuth(false)
+
+ job.cancel()
+ }
+
+ @Test
fun shadeLocked_showAlternateBouncer_unpauseAuth() =
testScope.runTest {
// GIVEN view is attached + on the SHADE_LOCKED (udfps view not showing)
@@ -154,4 +221,48 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest :
job.cancel()
}
+
+ @Test
+ fun fadeFromDialogSuggestedAlpha() =
+ testScope.runTest {
+ // GIVEN view is attached and status bar expansion is 1f
+ mController.onViewAttached()
+ captureStatusBarStateListeners()
+ val job = mController.listenForBouncerExpansion(this)
+ keyguardBouncerRepository.setPrimaryShow(true)
+ keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+ runCurrent()
+ Mockito.reset(mView)
+
+ // WHEN dialog suggested alpha is .6f
+ whenever(mView.dialogSuggestedAlpha).thenReturn(.6f)
+ sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+
+ // THEN alpha is updated based on dialog suggested alpha
+ verify(mView).unpausedAlpha = (.6f * 255).toInt()
+
+ job.cancel()
+ }
+
+ @Test
+ fun transitionToFullShadeProgress() =
+ testScope.runTest {
+ // GIVEN view is attached and status bar expansion is 1f
+ mController.onViewAttached()
+ val job = mController.listenForBouncerExpansion(this)
+ keyguardBouncerRepository.setPrimaryShow(true)
+ keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+ runCurrent()
+ Mockito.reset(mView)
+ whenever(mView.dialogSuggestedAlpha).thenReturn(1f)
+
+ // WHEN we're transitioning to the full shade
+ val transitionProgress = .6f
+ mController.setTransitionToFullShadeProgress(transitionProgress)
+
+ // THEN alpha is between 0 and 255
+ verify(mView).unpausedAlpha = ((1f - transitionProgress) * 255).toInt()
+
+ job.cancel()
+ }
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java
index f4f0ef9a163a..2aeba9a09b84 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java
@@ -14,40 +14,45 @@
* limitations under the License.
*/
-package com.android.settingslib.udfps;
+package com.android.systemui.biometrics;
import static com.google.common.truth.Truth.assertThat;
-import android.content.Context;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.view.Surface;
-import com.android.settingslib.R;
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
+import com.android.systemui.shared.biometrics.R;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-
-@RunWith(RobolectricTestRunner.class)
-public class UdfpsUtilsTest {
+@RunWith(JUnit4.class)
+@SmallTest
+public class UdfpsUtilsTest extends SysuiTestCase {
@Rule
public final MockitoRule rule = MockitoJUnit.rule();
-
- private Context mContext;
private String[] mTouchHints;
private UdfpsUtils mUdfpsUtils;
@Before
public void setUp() {
- mContext = RuntimeEnvironment.application;
- mTouchHints = mContext.getResources().getStringArray(
- R.array.udfps_accessibility_touch_hints);
+ Resources resources = mContext.getResources();
+ mTouchHints = new String[]{
+ resources.getString(R.string.udfps_accessibility_touch_hints_left),
+ resources.getString(R.string.udfps_accessibility_touch_hints_down),
+ resources.getString(R.string.udfps_accessibility_touch_hints_right),
+ resources.getString(R.string.udfps_accessibility_touch_hints_up),
+ };
mUdfpsUtils = new UdfpsUtils();
}
@@ -86,7 +91,7 @@ public class UdfpsUtilsTest {
@Test
- public void testTouchOutsideAreaNoRotation90Degrees() {
+ public void testTouchOutsideAreaRotation90Degrees() {
int rotation = Surface.ROTATION_90;
// touch at 0 degrees -> 90 degrees
assertThat(
@@ -120,7 +125,7 @@ public class UdfpsUtilsTest {
@Test
- public void testTouchOutsideAreaNoRotation270Degrees() {
+ public void testTouchOutsideAreaRotation270Degrees() {
int rotation = Surface.ROTATION_270;
// touch at 0 degrees -> 270 degrees
assertThat(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
index d11c965f4b76..6d4588da7751 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
@@ -19,16 +19,16 @@ package com.android.systemui.biometrics
import android.graphics.PointF
import android.graphics.RectF
import android.hardware.biometrics.SensorLocationInternal
-import androidx.test.ext.junit.runners.AndroidJUnit4
import android.testing.TestableLooper
import android.testing.ViewUtils
import android.view.LayoutInflater
import android.view.Surface
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.R
import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.withArgCaptor
@@ -42,8 +42,8 @@ import org.mockito.Mock
import org.mockito.Mockito.never
import org.mockito.Mockito.nullable
import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when` as whenever
import org.mockito.junit.MockitoJUnit
+import org.mockito.Mockito.`when` as whenever
private const val SENSOR_X = 50
private const val SENSOR_Y = 250
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt
index dfe8d36504d0..c9c46cbe8420 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt
@@ -17,13 +17,21 @@
package com.android.systemui.keyguard.data.repository
import android.hardware.devicestate.DeviceStateManager
+import android.hardware.display.DisplayManager
+import android.os.Handler
+import android.view.Display
+import android.view.DisplayInfo
+import android.view.Surface
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepositoryImpl
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.data.repository.DisplayStateRepositoryImpl
+import com.android.systemui.biometrics.shared.model.DisplayRotation
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.eq
+import com.android.systemui.util.mockito.whenever
import com.android.systemui.util.mockito.withArgCaptor
import com.android.systemui.util.time.FakeSystemClock
import com.google.common.truth.Truth.assertThat
@@ -38,8 +46,10 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.same
import org.mockito.Captor
import org.mockito.Mock
+import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
@@ -50,16 +60,19 @@ private const val REAR_DISPLAY_MODE_DEVICE_STATE = 3
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(JUnit4::class)
-class RearDisplayStateRepositoryTest : SysuiTestCase() {
+class DisplayStateRepositoryTest : SysuiTestCase() {
@JvmField @Rule var mockitoRule: MockitoRule = MockitoJUnit.rule()
@Mock private lateinit var deviceStateManager: DeviceStateManager
- private lateinit var underTest: RearDisplayStateRepository
+ @Mock private lateinit var displayManager: DisplayManager
+ @Mock private lateinit var handler: Handler
+ @Mock private lateinit var display: Display
+ private lateinit var underTest: DisplayStateRepository
private val testScope = TestScope(StandardTestDispatcher())
private val fakeExecutor = FakeExecutor(FakeSystemClock())
@Captor
- private lateinit var callbackCaptor: ArgumentCaptor<DeviceStateManager.DeviceStateCallback>
+ private lateinit var displayListenerCaptor: ArgumentCaptor<DisplayManager.DisplayListener>
@Before
fun setUp() {
@@ -69,11 +82,16 @@ class RearDisplayStateRepositoryTest : SysuiTestCase() {
rearDisplayDeviceStates
)
+ mContext = spy(mContext)
+ whenever(mContext.display).thenReturn(display)
+
underTest =
- RearDisplayStateRepositoryImpl(
+ DisplayStateRepositoryImpl(
testScope.backgroundScope,
mContext,
deviceStateManager,
+ displayManager,
+ handler,
fakeExecutor
)
}
@@ -81,16 +99,46 @@ class RearDisplayStateRepositoryTest : SysuiTestCase() {
@Test
fun updatesIsInRearDisplayMode_whenRearDisplayStateChanges() =
testScope.runTest {
- val isInRearDisplayMode = collectLastValue(underTest.isInRearDisplayMode)
+ val isInRearDisplayMode by collectLastValue(underTest.isInRearDisplayMode)
runCurrent()
val callback = deviceStateManager.captureCallback()
callback.onStateChanged(NORMAL_DISPLAY_MODE_DEVICE_STATE)
- assertThat(isInRearDisplayMode()).isFalse()
+ assertThat(isInRearDisplayMode).isFalse()
callback.onStateChanged(REAR_DISPLAY_MODE_DEVICE_STATE)
- assertThat(isInRearDisplayMode()).isTrue()
+ assertThat(isInRearDisplayMode).isTrue()
+ }
+
+ @Test
+ fun updatesCurrentRotation_whenDisplayStateChanges() =
+ testScope.runTest {
+ val currentRotation by collectLastValue(underTest.currentRotation)
+ runCurrent()
+
+ verify(displayManager)
+ .registerDisplayListener(
+ displayListenerCaptor.capture(),
+ same(handler),
+ eq(DisplayManager.EVENT_FLAG_DISPLAY_CHANGED)
+ )
+
+ whenever(display.getDisplayInfo(any())).then {
+ val info = it.getArgument<DisplayInfo>(0)
+ info.rotation = Surface.ROTATION_90
+ return@then true
+ }
+ displayListenerCaptor.value.onDisplayChanged(Surface.ROTATION_90)
+ assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_90)
+
+ whenever(display.getDisplayInfo(any())).then {
+ val info = it.getArgument<DisplayInfo>(0)
+ info.rotation = Surface.ROTATION_180
+ return@then true
+ }
+ displayListenerCaptor.value.onDisplayChanged(Surface.ROTATION_180)
+ assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_180)
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
index 2217c5c677d5..bf6caad688e2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
@@ -1,9 +1,13 @@
package com.android.systemui.biometrics.domain.interactor
+import android.view.Display
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
+import com.android.systemui.biometrics.shared.model.DisplayRotation
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.FakeDisplayRepository
+import com.android.systemui.display.data.repository.display
import com.android.systemui.unfold.compat.ScreenSizeFoldProvider
import com.android.systemui.unfold.updates.FoldProvider
import com.android.systemui.util.concurrency.FakeExecutor
@@ -34,19 +38,23 @@ class DisplayStateInteractorImplTest : SysuiTestCase() {
private val fakeExecutor = FakeExecutor(FakeSystemClock())
private val testScope = TestScope(StandardTestDispatcher())
- private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+ private lateinit var displayStateRepository: FakeDisplayStateRepository
+ private lateinit var displayRepository: FakeDisplayRepository
@Mock private lateinit var screenSizeFoldProvider: ScreenSizeFoldProvider
private lateinit var interactor: DisplayStateInteractorImpl
@Before
fun setup() {
+ displayStateRepository = FakeDisplayStateRepository()
+ displayRepository = FakeDisplayRepository()
interactor =
DisplayStateInteractorImpl(
testScope.backgroundScope,
mContext,
fakeExecutor,
- rearDisplayStateRepository
+ displayStateRepository,
+ displayRepository,
)
interactor.setScreenSizeFoldProvider(screenSizeFoldProvider)
}
@@ -54,27 +62,54 @@ class DisplayStateInteractorImplTest : SysuiTestCase() {
@Test
fun isInRearDisplayModeChanges() =
testScope.runTest {
- val isInRearDisplayMode = collectLastValue(interactor.isInRearDisplayMode)
+ val isInRearDisplayMode by collectLastValue(interactor.isInRearDisplayMode)
- rearDisplayStateRepository.setIsInRearDisplayMode(false)
- assertThat(isInRearDisplayMode()).isFalse()
+ displayStateRepository.setIsInRearDisplayMode(false)
+ assertThat(isInRearDisplayMode).isFalse()
- rearDisplayStateRepository.setIsInRearDisplayMode(true)
- assertThat(isInRearDisplayMode()).isTrue()
+ displayStateRepository.setIsInRearDisplayMode(true)
+ assertThat(isInRearDisplayMode).isTrue()
+ }
+
+ @Test
+ fun currentRotationChanges() =
+ testScope.runTest {
+ val currentRotation by collectLastValue(interactor.currentRotation)
+
+ displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_180)
+ assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_180)
+
+ displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_90)
+ assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_90)
}
@Test
fun isFoldedChanges() =
testScope.runTest {
- val isFolded = collectLastValue(interactor.isFolded)
+ val isFolded by collectLastValue(interactor.isFolded)
runCurrent()
val callback = screenSizeFoldProvider.captureCallback()
callback.onFoldUpdated(isFolded = true)
- assertThat(isFolded()).isTrue()
+ assertThat(isFolded).isTrue()
callback.onFoldUpdated(isFolded = false)
- assertThat(isFolded()).isFalse()
+ assertThat(isFolded).isFalse()
+ }
+
+ @Test
+ fun isDefaultDisplayOffChanges() =
+ testScope.runTest {
+ val isDefaultDisplayOff by collectLastValue(interactor.isDefaultDisplayOff)
+ runCurrent()
+
+ displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF)))
+ displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+ assertThat(isDefaultDisplayOff).isTrue()
+
+ displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_ON)))
+ displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+ assertThat(isDefaultDisplayOff).isFalse()
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
index 4d5e1b7de60f..f15b738f3e95 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
@@ -25,9 +25,9 @@ import com.android.systemui.SysuiTestCase
import com.android.systemui.biometrics.Utils
import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.domain.model.BiometricModalities
import com.android.systemui.biometrics.faceSensorPropertiesInternal
import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.PromptKind
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.util.mockito.any
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
index 9431d86f63e1..6b9c34bbd237 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
@@ -20,9 +20,9 @@ import android.graphics.Rect
import android.test.suitebuilder.annotation.SmallTest
import android.view.MotionEvent
import android.view.Surface
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.SysuiTestCase
import com.android.systemui.biometrics.AuthController
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.android.systemui.coroutines.collectLastValue
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.StandardTestDispatcher
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
index be0276a0413e..9e3c576ac536 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
@@ -4,6 +4,7 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
import com.android.systemui.biometrics.promptInfo
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricUserInfo
import com.google.common.truth.Truth.assertThat
import org.junit.Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt
index 526b83356ee9..22e3e7fedda0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.biometrics.domain.model
+package com.android.systemui.biometrics.shared.model
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
index ec2c1bc1006b..99c2c4076403 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
@@ -23,8 +23,8 @@ import android.view.MotionEvent.PointerProperties
import android.view.Surface
import android.view.Surface.Rotation
import androidx.test.filters.SmallTest
-import com.android.settingslib.udfps.UdfpsOverlayParams
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
index 7697c098ed3d..fd86486aeff8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
@@ -4,9 +4,9 @@ import android.content.res.Configuration
import androidx.test.filters.SmallTest
import com.android.internal.widget.LockPatternUtils
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
@@ -14,6 +14,7 @@ import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteracto
import com.android.systemui.biometrics.shared.model.FingerprintSensorType
import com.android.systemui.biometrics.shared.model.SensorStrength
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.FakeDisplayRepository
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.time.FakeSystemClock
import com.google.common.truth.Truth.assertThat
@@ -39,9 +40,10 @@ class PromptFingerprintIconViewModelTest : SysuiTestCase() {
@Mock private lateinit var lockPatternUtils: LockPatternUtils
- private val fingerprintRepository = FakeFingerprintPropertyRepository()
- private val promptRepository = FakePromptRepository()
- private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+ private lateinit var displayRepository: FakeDisplayRepository
+ private lateinit var fingerprintRepository: FakeFingerprintPropertyRepository
+ private lateinit var promptRepository: FakePromptRepository
+ private lateinit var displayStateRepository: FakeDisplayStateRepository
private val testScope = TestScope(StandardTestDispatcher())
private val fakeExecutor = FakeExecutor(FakeSystemClock())
@@ -52,6 +54,11 @@ class PromptFingerprintIconViewModelTest : SysuiTestCase() {
@Before
fun setup() {
+ displayRepository = FakeDisplayRepository()
+ fingerprintRepository = FakeFingerprintPropertyRepository()
+ promptRepository = FakePromptRepository()
+ displayStateRepository = FakeDisplayStateRepository()
+
promptSelectorInteractor =
PromptSelectorInteractorImpl(fingerprintRepository, promptRepository, lockPatternUtils)
displayStateInteractor =
@@ -59,7 +66,8 @@ class PromptFingerprintIconViewModelTest : SysuiTestCase() {
testScope.backgroundScope,
mContext,
fakeExecutor,
- rearDisplayStateRepository
+ displayStateRepository,
+ displayRepository,
)
viewModel = PromptFingerprintIconViewModel(displayStateInteractor, promptSelectorInteractor)
}
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 0ed46da27b55..ca6df4027ea9 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
@@ -24,20 +24,22 @@ import android.view.MotionEvent
import androidx.test.filters.SmallTest
import com.android.internal.widget.LockPatternUtils
import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.AuthBiometricView
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
-import com.android.systemui.biometrics.domain.model.BiometricModalities
import com.android.systemui.biometrics.extractAuthenticatorTypes
import com.android.systemui.biometrics.faceSensorPropertiesInternal
import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
+import com.android.systemui.biometrics.shared.model.BiometricModalities
import com.android.systemui.biometrics.shared.model.BiometricModality
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
+import com.android.systemui.display.data.repository.FakeDisplayRepository
import com.android.systemui.flags.FakeFeatureFlags
import com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION
import com.android.systemui.statusbar.VibratorHelper
@@ -77,17 +79,12 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
private val fakeExecutor = FakeExecutor(FakeSystemClock())
private val testScope = TestScope()
- private val fingerprintRepository = FakeFingerprintPropertyRepository()
- private val promptRepository = FakePromptRepository()
- private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
-
- private val displayStateInteractor =
- DisplayStateInteractorImpl(
- testScope.backgroundScope,
- mContext,
- fakeExecutor,
- rearDisplayStateRepository
- )
+
+ private lateinit var fingerprintRepository: FakeFingerprintPropertyRepository
+ private lateinit var promptRepository: FakePromptRepository
+ private lateinit var displayStateRepository: FakeDisplayStateRepository
+ private lateinit var displayRepository: FakeDisplayRepository
+ private lateinit var displayStateInteractor: DisplayStateInteractor
private lateinit var selector: PromptSelectorInteractor
private lateinit var viewModel: PromptViewModel
@@ -95,11 +92,24 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
@Before
fun setup() {
+ fingerprintRepository = FakeFingerprintPropertyRepository()
+ promptRepository = FakePromptRepository()
+ displayStateRepository = FakeDisplayStateRepository()
+ displayRepository = FakeDisplayRepository()
+ displayStateInteractor =
+ DisplayStateInteractorImpl(
+ testScope.backgroundScope,
+ mContext,
+ fakeExecutor,
+ displayStateRepository,
+ displayRepository,
+ )
selector =
PromptSelectorInteractorImpl(fingerprintRepository, promptRepository, lockPatternUtils)
selector.resetPrompt()
- viewModel = PromptViewModel(displayStateInteractor, selector, vibrator, featureFlags)
+ viewModel =
+ PromptViewModel(displayStateInteractor, selector, vibrator, mContext, featureFlags)
featureFlags.set(ONE_WAY_HAPTICS_API_MIGRATION, false)
}
@@ -123,7 +133,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
}
assertThat(message).isEqualTo(PromptMessage.Empty)
assertThat(size).isEqualTo(expectedSize)
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_IDLE)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_IDLE)
val startMessage = "here we go"
viewModel.showAuthenticating(startMessage, isRetry = false)
@@ -133,7 +143,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(authenticated?.isNotAuthenticated).isTrue()
assertThat(size).isEqualTo(expectedSize)
assertButtonsVisible(negative = expectedSize != PromptSize.SMALL)
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATING)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATING)
}
@Test
@@ -211,7 +221,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(authenticating).isTrue()
assertThat(authenticated?.isNotAuthenticated).isTrue()
assertThat(size).isEqualTo(if (authWithSmallPrompt) PromptSize.SMALL else PromptSize.MEDIUM)
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATING)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATING)
assertButtonsVisible(negative = !authWithSmallPrompt)
val delay = 1000L
@@ -231,9 +241,9 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(legacyState)
.isEqualTo(
if (expectConfirmation) {
- AuthBiometricView.STATE_PENDING_CONFIRMATION
+ BiometricState.STATE_PENDING_CONFIRMATION
} else {
- AuthBiometricView.STATE_AUTHENTICATED
+ BiometricState.STATE_AUTHENTICATED
}
)
assertButtonsVisible(
@@ -302,7 +312,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(size).isEqualTo(PromptSize.MEDIUM)
assertThat(message).isEqualTo(PromptMessage.Error(errorMessage))
assertThat(messageVisible).isTrue()
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_ERROR)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_ERROR)
// temporary error should disappear after a delay
errorJob.join()
@@ -317,11 +327,11 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(legacyState)
.isEqualTo(
if (restart) {
- AuthBiometricView.STATE_AUTHENTICATING
+ BiometricState.STATE_AUTHENTICATING
} else if (clearIconError) {
- AuthBiometricView.STATE_IDLE
+ BiometricState.STATE_IDLE
} else {
- AuthBiometricView.STATE_HELP
+ BiometricState.STATE_HELP
}
)
@@ -496,7 +506,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(authenticating).isFalse()
assertThat(authenticated?.isAuthenticated).isTrue()
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
assertThat(canTryAgain).isFalse()
}
@@ -522,7 +532,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(authenticated?.isAuthenticated).isTrue()
if (testCase.isFaceOnly && expectConfirmation) {
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_PENDING_CONFIRMATION)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_PENDING_CONFIRMATION)
assertThat(size).isEqualTo(PromptSize.MEDIUM)
assertButtonsVisible(
@@ -534,7 +544,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(message).isEqualTo(PromptMessage.Empty)
assertButtonsVisible()
} else {
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
}
}
@@ -571,7 +581,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(authenticating).isFalse()
assertThat(authenticated?.isAuthenticated).isTrue()
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
assertThat(canTryAgain).isFalse()
}
@@ -605,7 +615,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
viewModel.showHelp(helpMessage)
assertThat(size).isEqualTo(PromptSize.MEDIUM)
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_HELP)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_HELP)
assertThat(message).isEqualTo(PromptMessage.Help(helpMessage))
assertThat(messageVisible).isTrue()
@@ -633,9 +643,9 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
assertThat(size).isEqualTo(PromptSize.MEDIUM)
if (confirmationRequired == true) {
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_PENDING_CONFIRMATION)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_PENDING_CONFIRMATION)
} else {
- assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+ assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
}
assertThat(message).isEqualTo(PromptMessage.Help(helpMessage))
assertThat(messageVisible).isTrue()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
index f892453b3a57..420fdba7fde2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
@@ -115,7 +115,7 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() {
@Test
fun testShow_isScrimmed() {
underTest.show(true)
- verify(repository).setKeyguardAuthenticated(null)
+ verify(repository).setKeyguardAuthenticatedBiometrics(null)
verify(repository).setPrimaryStartingToHide(false)
verify(repository).setPrimaryScrimmed(true)
verify(repository).setPanelExpansion(EXPANSION_VISIBLE)
@@ -222,8 +222,8 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() {
@Test
fun testNotifyKeyguardAuthenticated() {
- underTest.notifyKeyguardAuthenticated(true)
- verify(repository).setKeyguardAuthenticated(true)
+ underTest.notifyKeyguardAuthenticatedBiometrics(true)
+ verify(repository).setKeyguardAuthenticatedBiometrics(true)
}
@Test
@@ -241,7 +241,7 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() {
@Test
fun testNotifyKeyguardAuthenticatedHandled() {
underTest.notifyKeyguardAuthenticatedHandled()
- verify(repository).setKeyguardAuthenticated(null)
+ verify(repository).setKeyguardAuthenticatedBiometrics(null)
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
index 4380af80efbd..12090e5264df 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
@@ -185,6 +185,41 @@ class PasswordBouncerViewModelTest : SysuiTestCase() {
assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone))
}
+ @Test
+ fun onShown_againAfterSceneChange_resetsPassword() =
+ testScope.runTest {
+ val currentScene by collectLastValue(sceneInteractor.desiredScene)
+ val password by collectLastValue(underTest.password)
+ utils.authenticationRepository.setAuthenticationMethod(
+ AuthenticationMethodModel.Password
+ )
+ utils.authenticationRepository.setUnlocked(false)
+ sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ underTest.onShown()
+
+ // The user types a password.
+ underTest.onPasswordInputChanged("password")
+ assertThat(password).isEqualTo("password")
+
+ // The user doesn't confirm the password, but navigates back to the lockscreen instead.
+ sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason")
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen))
+
+ // The user navigates to the bouncer again.
+ sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+
+ underTest.onShown()
+
+ // Ensure the previously-entered password is not shown.
+ assertThat(password).isEmpty()
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ }
+
companion object {
private const val ENTER_YOUR_PASSWORD = "Enter your password"
private const val WRONG_PASSWORD = "Wrong password"
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
index ea2cad2ab517..8ce738ca89f6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
@@ -21,6 +21,7 @@ import com.android.systemui.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.model.AuthenticationMethodModel
import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
+import com.android.systemui.authentication.shared.model.AuthenticationPatternCoordinate as Point
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.scene.SceneTestUtils
import com.android.systemui.scene.shared.model.SceneKey
@@ -30,6 +31,7 @@ import com.google.common.truth.Truth.assertWithMessage
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
+import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -67,6 +69,9 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
isInputEnabled = MutableStateFlow(true).asStateFlow(),
)
+ private val containerSize = 90 // px
+ private val dotSize = 30 // px
+
@Before
fun setUp() {
overrideResource(R.string.keyguard_enter_your_pattern, ENTER_YOUR_PATTERN)
@@ -80,13 +85,7 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
val message by collectLastValue(bouncerViewModel.message)
val selectedDots by collectLastValue(underTest.selectedDots)
val currentDot by collectLastValue(underTest.currentDot)
- utils.authenticationRepository.setAuthenticationMethod(
- AuthenticationMethodModel.Pattern
- )
- utils.authenticationRepository.setUnlocked(false)
- sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
- sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
- assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ transitionToPatternBouncer()
underTest.onShown()
@@ -103,13 +102,7 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
val message by collectLastValue(bouncerViewModel.message)
val selectedDots by collectLastValue(underTest.selectedDots)
val currentDot by collectLastValue(underTest.currentDot)
- utils.authenticationRepository.setAuthenticationMethod(
- AuthenticationMethodModel.Pattern
- )
- utils.authenticationRepository.setUnlocked(false)
- sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
- sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
- assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ transitionToPatternBouncer()
underTest.onShown()
runCurrent()
@@ -127,23 +120,12 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
val currentScene by collectLastValue(sceneInteractor.desiredScene)
val selectedDots by collectLastValue(underTest.selectedDots)
val currentDot by collectLastValue(underTest.currentDot)
- utils.authenticationRepository.setAuthenticationMethod(
- AuthenticationMethodModel.Pattern
- )
- utils.authenticationRepository.setUnlocked(false)
- sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
- sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
- assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ transitionToPatternBouncer()
underTest.onShown()
underTest.onDragStart()
assertThat(currentDot).isNull()
CORRECT_PATTERN.forEachIndexed { index, coordinate ->
- underTest.onDrag(
- xPx = 30f * coordinate.x + 15,
- yPx = 30f * coordinate.y + 15,
- containerSizePx = 90,
- verticalOffsetPx = 0f,
- )
+ dragToCoordinate(coordinate)
assertWithMessage("Wrong selected dots for index $index")
.that(selectedDots)
.isEqualTo(
@@ -176,23 +158,10 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
val message by collectLastValue(bouncerViewModel.message)
val selectedDots by collectLastValue(underTest.selectedDots)
val currentDot by collectLastValue(underTest.currentDot)
- utils.authenticationRepository.setAuthenticationMethod(
- AuthenticationMethodModel.Pattern
- )
- utils.authenticationRepository.setUnlocked(false)
- sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
- sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
- assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ transitionToPatternBouncer()
underTest.onShown()
underTest.onDragStart()
- CORRECT_PATTERN.subList(0, 3).forEach { coordinate ->
- underTest.onDrag(
- xPx = 30f * coordinate.x + 15,
- yPx = 30f * coordinate.y + 15,
- containerSizePx = 90,
- verticalOffsetPx = 0f,
- )
- }
+ CORRECT_PATTERN.subList(0, 3).forEach { coordinate -> dragToCoordinate(coordinate) }
underTest.onDragEnd()
@@ -203,12 +172,155 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
}
@Test
- fun onDragEnd_correctAfterWrong() =
+ fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheSameRow() =
+ testScope.runTest {
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ transitionToPatternBouncer()
+ underTest.onShown()
+
+ /*
+ * Pattern setup, coordinates are (column, row)
+ * 0 1 2
+ * 0 x x x
+ * 1 x x x
+ * 2 x x x
+ */
+ // Select (0,0), Skip over (1,0) and select (2,0)
+ dragOverCoordinates(Point(0, 0), Point(2, 0))
+
+ assertThat(selectedDots)
+ .isEqualTo(
+ listOf(
+ PatternDotViewModel(0, 0),
+ PatternDotViewModel(1, 0),
+ PatternDotViewModel(2, 0)
+ )
+ )
+ }
+
+ @Test
+ fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheSameColumn() =
+ testScope.runTest {
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ transitionToPatternBouncer()
+ underTest.onShown()
+
+ /*
+ * Pattern setup, coordinates are (column, row)
+ * 0 1 2
+ * 0 x x x
+ * 1 x x x
+ * 2 x x x
+ */
+ // Select (1,0), Skip over (1,1) and select (1, 2)
+ dragOverCoordinates(Point(1, 0), Point(1, 2))
+
+ assertThat(selectedDots)
+ .isEqualTo(
+ listOf(
+ PatternDotViewModel(1, 0),
+ PatternDotViewModel(1, 1),
+ PatternDotViewModel(1, 2)
+ )
+ )
+ }
+
+ @Test
+ fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheDiagonal() =
+ testScope.runTest {
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ transitionToPatternBouncer()
+ underTest.onShown()
+
+ /*
+ * Pattern setup
+ * 0 1 2
+ * 0 x x x
+ * 1 x x x
+ * 2 x x x
+ *
+ * Coordinates are (column, row)
+ * Select (2,0), Skip over (1,1) and select (0, 2)
+ */
+ dragOverCoordinates(Point(2, 0), Point(0, 2))
+
+ assertThat(selectedDots)
+ .isEqualTo(
+ listOf(
+ PatternDotViewModel(2, 0),
+ PatternDotViewModel(1, 1),
+ PatternDotViewModel(0, 2)
+ )
+ )
+ }
+
+ @Test
+ fun onDrag_shouldNotIncludeDotIfItIsNotOnTheLine() =
+ testScope.runTest {
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ transitionToPatternBouncer()
+ underTest.onShown()
+
+ /*
+ * Pattern setup
+ * 0 1 2
+ * 0 x x x
+ * 1 x x x
+ * 2 x x x
+ *
+ * Coordinates are (column, row)
+ */
+ dragOverCoordinates(Point(0, 0), Point(1, 0), Point(2, 0), Point(0, 1))
+
+ assertThat(selectedDots)
+ .isEqualTo(
+ listOf(
+ PatternDotViewModel(0, 0),
+ PatternDotViewModel(1, 0),
+ PatternDotViewModel(2, 0),
+ PatternDotViewModel(0, 1),
+ )
+ )
+ }
+
+ @Test
+ fun onDrag_shouldNotIncludeSkippedOverDotsIfTheyAreAlreadySelected() =
+ testScope.runTest {
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ transitionToPatternBouncer()
+ underTest.onShown()
+
+ /*
+ * Pattern setup
+ * 0 1 2
+ * 0 x x x
+ * 1 x x x
+ * 2 x x x
+ *
+ * Coordinates are (column, row)
+ */
+ dragOverCoordinates(Point(1, 0), Point(1, 1), Point(0, 0), Point(2, 0))
+
+ assertThat(selectedDots)
+ .isEqualTo(
+ listOf(
+ PatternDotViewModel(1, 0),
+ PatternDotViewModel(1, 1),
+ PatternDotViewModel(0, 0),
+ PatternDotViewModel(2, 0),
+ )
+ )
+ }
+
+ @Test
+ fun onDragEnd_whenPatternTooShort() =
testScope.runTest {
val currentScene by collectLastValue(sceneInteractor.desiredScene)
val message by collectLastValue(bouncerViewModel.message)
val selectedDots by collectLastValue(underTest.selectedDots)
val currentDot by collectLastValue(underTest.currentDot)
+ val throttlingDialogMessage by
+ collectLastValue(bouncerViewModel.throttlingDialogMessage)
utils.authenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.Pattern
)
@@ -217,15 +329,43 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
underTest.onShown()
- underTest.onDragStart()
- CORRECT_PATTERN.subList(2, 7).forEach { coordinate ->
- underTest.onDrag(
- xPx = 30f * coordinate.x + 15,
- yPx = 30f * coordinate.y + 15,
- containerSizePx = 90,
- verticalOffsetPx = 0f,
- )
+
+ // Enter a pattern that's too short more than enough times that would normally trigger
+ // throttling if the pattern were not too short and wrong:
+ val attempts = FakeAuthenticationRepository.MAX_FAILED_AUTH_TRIES_BEFORE_THROTTLING + 1
+ repeat(attempts) { attempt ->
+ underTest.onDragStart()
+ CORRECT_PATTERN.subList(
+ 0,
+ authenticationInteractor.minPatternLength - 1,
+ )
+ .forEach { coordinate ->
+ underTest.onDrag(
+ xPx = 30f * coordinate.x + 15,
+ yPx = 30f * coordinate.y + 15,
+ containerSizePx = 90,
+ verticalOffsetPx = 0f,
+ )
+ }
+
+ underTest.onDragEnd()
+
+ assertWithMessage("Attempt #$attempt").that(message?.text).isEqualTo(WRONG_PATTERN)
+ assertWithMessage("Attempt #$attempt").that(throttlingDialogMessage).isNull()
}
+ }
+
+ @Test
+ fun onDragEnd_correctAfterWrong() =
+ testScope.runTest {
+ val currentScene by collectLastValue(sceneInteractor.desiredScene)
+ val message by collectLastValue(bouncerViewModel.message)
+ val selectedDots by collectLastValue(underTest.selectedDots)
+ val currentDot by collectLastValue(underTest.currentDot)
+ transitionToPatternBouncer()
+ underTest.onShown()
+ underTest.onDragStart()
+ CORRECT_PATTERN.subList(2, 7).forEach { coordinate -> dragToCoordinate(coordinate) }
underTest.onDragEnd()
assertThat(selectedDots).isEmpty()
assertThat(currentDot).isNull()
@@ -233,20 +373,36 @@ class PatternBouncerViewModelTest : SysuiTestCase() {
assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
// Enter the correct pattern:
- CORRECT_PATTERN.forEach { coordinate ->
- underTest.onDrag(
- xPx = 30f * coordinate.x + 15,
- yPx = 30f * coordinate.y + 15,
- containerSizePx = 90,
- verticalOffsetPx = 0f,
- )
- }
+ CORRECT_PATTERN.forEach { coordinate -> dragToCoordinate(coordinate) }
underTest.onDragEnd()
assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone))
}
+ private fun dragOverCoordinates(vararg coordinatesDragged: Point) {
+ underTest.onDragStart()
+ coordinatesDragged.forEach { dragToCoordinate(it) }
+ }
+
+ private fun dragToCoordinate(coordinate: Point) {
+ underTest.onDrag(
+ xPx = dotSize * coordinate.x + 15f,
+ yPx = dotSize * coordinate.y + 15f,
+ containerSizePx = containerSize,
+ verticalOffsetPx = 0f,
+ )
+ }
+
+ private fun TestScope.transitionToPatternBouncer() {
+ utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pattern)
+ utils.authenticationRepository.setUnlocked(false)
+ sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+ assertThat(collectLastValue(sceneInteractor.desiredScene).invoke())
+ .isEqualTo(SceneModel(SceneKey.Bouncer))
+ }
+
companion object {
private const val ENTER_YOUR_PATTERN = "Enter your pattern"
private const val WRONG_PATTERN = "Wrong pattern"
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
index 531f86abdfbc..a684221e1a78 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
@@ -314,6 +314,42 @@ class PinBouncerViewModelTest : SysuiTestCase() {
}
@Test
+ fun onShown_againAfterSceneChange_resetsPin() =
+ testScope.runTest {
+ val currentScene by collectLastValue(sceneInteractor.desiredScene)
+ val pin by collectLastValue(underTest.pinInput.map { it.getPin() })
+ utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin)
+ utils.authenticationRepository.setUnlocked(false)
+ sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ underTest.onShown()
+
+ // The user types a PIN.
+ FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit ->
+ underTest.onPinButtonClicked(digit)
+ }
+ assertThat(pin).isNotEmpty()
+
+ // The user doesn't confirm the PIN, but navigates back to the lockscreen instead.
+ sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason")
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen))
+
+ // The user navigates to the bouncer again.
+ sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+ sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+
+ underTest.onShown()
+
+ // Ensure the previously-entered PIN is not shown.
+ assertThat(pin).isEmpty()
+ assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+ }
+
+ @Test
fun backspaceButtonAppearance_withoutAutoConfirm_alwaysShown() =
testScope.runTest {
val backspaceButtonAppearance by collectLastValue(underTest.backspaceButtonAppearance)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
index 90076fd21520..ffcaeee52596 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
@@ -17,7 +17,6 @@
package com.android.systemui.dreams.touch;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.ArgumentMatchers.eq;
@@ -295,7 +294,8 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase {
}
/**
- * Makes sure the expansion amount is proportional to (1 - scroll).
+ * Verifies that swiping up when the lock pattern is not secure does not consume the scroll
+ * gesture or expand.
*/
@Test
public void testSwipeUp_keyguardNotSecure_doesNotExpand() {
@@ -314,8 +314,10 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase {
0, SCREEN_HEIGHT_PX - distanceY, 0);
reset(mScrimController);
+
+ // Scroll gesture is not consumed.
assertThat(gestureListener.onScroll(event1, event2, 0, distanceY))
- .isTrue();
+ .isFalse();
// We should not expand since the keyguard is not secure
verify(mScrimController, never()).expand(any());
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
index ec1541666a6f..a76c88579dca 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
@@ -29,6 +29,7 @@ import android.hardware.face.FaceManager
import android.hardware.face.FaceSensorProperties
import android.hardware.face.FaceSensorPropertiesInternal
import android.os.CancellationSignal
+import android.view.Display
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.logging.InstanceId.fakeInstanceId
@@ -40,12 +41,17 @@ import com.android.keyguard.KeyguardUpdateMonitor
import com.android.systemui.R
import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.coroutines.FlowValue
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
+import com.android.systemui.display.data.repository.FakeDisplayRepository
+import com.android.systemui.display.data.repository.display
import com.android.systemui.dump.DumpManager
import com.android.systemui.dump.logcatLogBuffer
import com.android.systemui.flags.FakeFeatureFlags
@@ -73,6 +79,7 @@ import com.android.systemui.statusbar.phone.FakeKeyguardStateController
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.user.data.model.SelectionStatus
import com.android.systemui.user.data.repository.FakeUserRepository
+import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.KotlinArgumentCaptor
import com.android.systemui.util.mockito.captureMany
import com.android.systemui.util.mockito.mock
@@ -151,7 +158,9 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
private lateinit var keyguardRepository: FakeKeyguardRepository
private lateinit var keyguardInteractor: KeyguardInteractor
private lateinit var alternateBouncerInteractor: AlternateBouncerInteractor
+ private lateinit var displayStateInteractor: DisplayStateInteractor
private lateinit var bouncerRepository: FakeKeyguardBouncerRepository
+ private lateinit var displayRepository: FakeDisplayRepository
private lateinit var fakeCommandQueue: FakeCommandQueue
private lateinit var featureFlags: FakeFeatureFlags
private lateinit var fakeFacePropertyRepository: FakeFacePropertyRepository
@@ -162,9 +171,10 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
+ testDispatcher = StandardTestDispatcher()
+ testScope = TestScope(testDispatcher)
fakeUserRepository = FakeUserRepository()
fakeUserRepository.setUserInfos(listOf(primaryUser, secondaryUser))
- testDispatcher = StandardTestDispatcher()
biometricSettingsRepository = FakeBiometricSettingsRepository()
deviceEntryFingerprintAuthRepository = FakeDeviceEntryFingerprintAuthRepository()
trustRepository = FakeTrustRepository()
@@ -192,9 +202,18 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
keyguardUpdateMonitor = keyguardUpdateMonitor,
)
+ displayRepository = FakeDisplayRepository()
+ displayStateInteractor =
+ DisplayStateInteractorImpl(
+ applicationScope = testScope.backgroundScope,
+ context = context,
+ mainExecutor = FakeExecutor(FakeSystemClock()),
+ displayStateRepository = FakeDisplayStateRepository(),
+ displayRepository = displayRepository,
+ )
+
bypassStateChangedListener =
KotlinArgumentCaptor(KeyguardBypassController.OnBypassStateChangedListener::class.java)
- testScope = TestScope(testDispatcher)
whenever(sessionTracker.getSessionId(SESSION_KEYGUARD)).thenReturn(keyguardSessionId)
whenever(faceManager.sensorPropertiesInternal)
.thenReturn(listOf(createFaceSensorProperties(supportsFaceDetection = true)))
@@ -253,6 +272,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
faceDetectBuffer,
faceAuthBuffer,
keyguardTransitionInteractor,
+ displayStateInteractor,
featureFlags,
dumpManager,
)
@@ -683,6 +703,44 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
}
@Test
+ fun authenticateCanRunWhenDisplayIsOffAndWakingUp() =
+ testScope.runTest {
+ initCollectors()
+ allPreconditionsToRunFaceAuthAreTrue()
+
+ displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF)))
+ displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+ keyguardRepository.setWakefulnessModel(
+ WakefulnessModel(
+ WakefulnessState.STARTING_TO_WAKE,
+ lastWakeReason = WakeSleepReason.POWER_BUTTON,
+ lastSleepReason = WakeSleepReason.POWER_BUTTON
+ )
+ )
+
+ assertThat(canFaceAuthRun()).isTrue()
+ }
+
+ @Test
+ fun authenticateDoesNotRunWhenDisplayIsOffAndAwake() =
+ testScope.runTest {
+ testGatingCheckForFaceAuth {
+ keyguardRepository.setWakefulnessModel(
+ WakefulnessModel(
+ WakefulnessState.AWAKE,
+ lastWakeReason = WakeSleepReason.POWER_BUTTON,
+ lastSleepReason = WakeSleepReason.POWER_BUTTON
+ )
+ )
+
+ displayRepository.emit(
+ setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF))
+ )
+ displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+ }
+ }
+
+ @Test
fun everythingWorksWithFaceAuthRefactorFlagDisabled() =
testScope.runTest {
featureFlags.set(FACE_AUTH_REFACTOR, false)
@@ -1017,7 +1075,9 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
faceAuthenticateIsCalled()
}
- private suspend fun TestScope.testGatingCheckForFaceAuth(gatingCheckModifier: () -> Unit) {
+ private suspend fun TestScope.testGatingCheckForFaceAuth(
+ gatingCheckModifier: suspend () -> Unit
+ ) {
initCollectors()
allPreconditionsToRunFaceAuthAreTrue()
@@ -1108,6 +1168,8 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
faceLockoutResetCallback.value.onLockoutReset(0)
bouncerRepository.setAlternateVisible(true)
keyguardRepository.setKeyguardShowing(true)
+ displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_ON)))
+ displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
runCurrent()
}
@@ -1120,6 +1182,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
authenticated = collectLastValue(underTest.isAuthenticated)
bypassEnabled = collectLastValue(underTest.isBypassEnabled)
fakeUserRepository.setSelectedUserInfo(primaryUser)
+ runCurrent()
}
private fun successResult() = FaceManager.AuthenticationResult(null, null, primaryUserId, false)
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
new file mode 100644
index 000000000000..181cc884c9f5
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
@@ -0,0 +1,265 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+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.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestDispatcher
+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.MockitoAnnotations
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+class KeyguardDismissActionInteractorTest : SysuiTestCase() {
+ private lateinit var keyguardRepository: FakeKeyguardRepository
+ private lateinit var transitionRepository: FakeKeyguardTransitionRepository
+
+ private lateinit var dispatcher: TestDispatcher
+ private lateinit var testScope: TestScope
+
+ private lateinit var dismissInteractorWithDependencies:
+ KeyguardDismissInteractorFactory.WithDependencies
+ private lateinit var underTest: KeyguardDismissActionInteractor
+
+ @Before
+ fun setUp() {
+ MockitoAnnotations.initMocks(this)
+ dispatcher = StandardTestDispatcher()
+ testScope = TestScope(dispatcher)
+
+ dismissInteractorWithDependencies =
+ KeyguardDismissInteractorFactory.create(
+ context = context,
+ testScope = testScope,
+ broadcastDispatcher = fakeBroadcastDispatcher,
+ dispatcher = dispatcher,
+ )
+ keyguardRepository = dismissInteractorWithDependencies.keyguardRepository
+ transitionRepository = FakeKeyguardTransitionRepository()
+
+ underTest =
+ KeyguardDismissActionInteractor(
+ keyguardRepository,
+ KeyguardTransitionInteractorFactory.create(
+ scope = testScope.backgroundScope,
+ repository = transitionRepository,
+ )
+ .keyguardTransitionInteractor,
+ dismissInteractorWithDependencies.interactor,
+ testScope.backgroundScope,
+ )
+ }
+
+ @Test
+ fun updateDismissAction_onRepoChange() =
+ testScope.runTest {
+ val dismissAction by collectLastValue(underTest.dismissAction)
+
+ val newDismissAction =
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "",
+ willAnimateOnLockscreen = true,
+ )
+ keyguardRepository.setDismissAction(newDismissAction)
+ assertThat(dismissAction).isEqualTo(newDismissAction)
+ }
+
+ @Test
+ fun messageUpdate() =
+ testScope.runTest {
+ val message by collectLastValue(underTest.message)
+ keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ assertThat(message).isEqualTo("message")
+ }
+
+ @Test
+ fun runDismissAnimationOnKeyguard_defaultStateFalse() =
+ testScope.runTest { assertThat(underTest.runDismissAnimationOnKeyguard()).isFalse() }
+
+ @Test
+ fun runDismissAnimationOnKeyguardUpdates() =
+ testScope.runTest {
+ val animate by collectLastValue(underTest.willAnimateDismissActionOnLockscreen)
+ keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ assertThat(animate).isEqualTo(true)
+
+ keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = false,
+ )
+ )
+ assertThat(animate).isEqualTo(false)
+ }
+
+ @Test
+ fun executeDismissAction_dismissKeyguardRequestWithImmediateDismissAction_biometricAuthed() =
+ testScope.runTest {
+ val executeDismissAction by collectLastValue(underTest.executeDismissAction)
+
+ val onDismissAction = { KeyguardDone.IMMEDIATE }
+ keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = onDismissAction,
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ dismissInteractorWithDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(
+ true
+ )
+ assertThat(executeDismissAction).isEqualTo(onDismissAction)
+ }
+
+ @Test
+ fun executeDismissAction_dismissKeyguardRequestWithoutImmediateDismissAction() =
+ testScope.runTest {
+ val executeDismissAction by collectLastValue(underTest.executeDismissAction)
+
+ // WHEN a keyguard action will run after the keyguard is gone
+ val onDismissAction = {}
+ keyguardRepository.setDismissAction(
+ DismissAction.RunAfterKeyguardGone(
+ dismissAction = onDismissAction,
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ assertThat(executeDismissAction).isNull()
+
+ // WHEN the keyguard is GONE
+ transitionRepository.sendTransitionStep(
+ TransitionStep(to = KeyguardState.GONE, transitionState = TransitionState.FINISHED)
+ )
+ assertThat(executeDismissAction).isNotNull()
+ }
+
+ @Test
+ fun resetDismissAction() =
+ testScope.runTest {
+ val resetDismissAction by collectLastValue(underTest.resetDismissAction)
+
+ keyguardRepository.setDismissAction(
+ DismissAction.RunAfterKeyguardGone(
+ dismissAction = {},
+ onCancelAction = {},
+ message = "message",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ transitionRepository.sendTransitionStep(
+ TransitionStep(
+ to = KeyguardState.AOD,
+ transitionState = TransitionState.FINISHED,
+ )
+ )
+ assertThat(resetDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun setDismissAction_callsCancelRunnableOnPreviousDismissAction() =
+ testScope.runTest {
+ val dismissAction by collectLastValue(underTest.dismissAction)
+ var previousDismissActionCancelCalled = false
+ keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = { previousDismissActionCancelCalled = true },
+ message = "",
+ willAnimateOnLockscreen = true,
+ )
+ )
+
+ val newDismissAction =
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "",
+ willAnimateOnLockscreen = true,
+ )
+ underTest.setDismissAction(newDismissAction)
+
+ // THEN previous dismiss action got its onCancel called
+ assertThat(previousDismissActionCancelCalled).isTrue()
+
+ // THEN dismiss action is updated
+ assertThat(dismissAction).isEqualTo(newDismissAction)
+ }
+
+ @Test
+ fun handleDismissAction() =
+ testScope.runTest {
+ val dismissAction by collectLastValue(underTest.dismissAction)
+ underTest.handleDismissAction()
+ assertThat(dismissAction).isEqualTo(DismissAction.None)
+ }
+
+ @Test
+ fun setKeyguardDone() =
+ testScope.runTest {
+ val keyguardDoneTiming by
+ collectLastValue(dismissInteractorWithDependencies.interactor.keyguardDone)
+ runCurrent()
+
+ underTest.setKeyguardDone(KeyguardDone.LATER)
+ assertThat(keyguardDoneTiming).isEqualTo(KeyguardDone.LATER)
+
+ underTest.setKeyguardDone(KeyguardDone.IMMEDIATE)
+ assertThat(keyguardDoneTiming).isEqualTo(KeyguardDone.IMMEDIATE)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt
new file mode 100644
index 000000000000..c407b14dcf65
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import android.content.pm.UserInfo
+import android.service.trust.TrustAgentService
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.keyguard.TrustGrantFlags
+import com.android.systemui.RoboPilotTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.keyguard.shared.model.TrustModel
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestDispatcher
+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.MockitoAnnotations
+
+@SmallTest
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+class KeyguardDismissInteractorTest : SysuiTestCase() {
+ private lateinit var dispatcher: TestDispatcher
+ private lateinit var testScope: TestScope
+
+ private lateinit var underTestDependencies: KeyguardDismissInteractorFactory.WithDependencies
+ private lateinit var underTest: KeyguardDismissInteractor
+ private val userInfo = UserInfo(0, "", 0)
+
+ @Before
+ fun setUp() {
+ MockitoAnnotations.initMocks(this)
+ dispatcher = StandardTestDispatcher()
+ testScope = TestScope(dispatcher)
+
+ underTestDependencies =
+ KeyguardDismissInteractorFactory.create(
+ context = context,
+ testScope = testScope,
+ broadcastDispatcher = fakeBroadcastDispatcher,
+ dispatcher = dispatcher,
+ )
+ underTest = underTestDependencies.interactor
+ underTestDependencies.userRepository.setUserInfos(listOf(userInfo))
+ }
+
+ @Test
+ fun biometricAuthenticatedRequestDismissKeyguard_noDismissAction() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithoutImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+
+ underTestDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(null)
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+ underTestDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(true)
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun onTrustGrantedRequestDismissKeyguard_noDismissAction() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithoutImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+ underTestDependencies.trustRepository.setRequestDismissKeyguard(
+ TrustModel(
+ true,
+ 0,
+ TrustGrantFlags(0),
+ )
+ )
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+ underTestDependencies.powerRepository.setInteractive(true)
+ underTestDependencies.trustRepository.setRequestDismissKeyguard(
+ TrustModel(
+ true,
+ 0,
+ TrustGrantFlags(TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD),
+ )
+ )
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun primaryAuthenticated_noDismissAction() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithoutImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+ underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+ runCurrent()
+
+ // authenticated different user
+ underTestDependencies.bouncerRepository.setKeyguardAuthenticatedPrimaryAuth(22)
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+ // authenticated correct user
+ underTestDependencies.bouncerRepository.setKeyguardAuthenticatedPrimaryAuth(userInfo.id)
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun userRequestedBouncerWhenAlreadyAuthenticated_noDismissAction() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithoutImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+ underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+ runCurrent()
+
+ // requested from different user
+ underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+ 22
+ )
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+ // requested from correct user
+ underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+ userInfo.id
+ )
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun keyguardDone() =
+ testScope.runTest {
+ val keyguardDone by collectLastValue(underTest.keyguardDone)
+ assertThat(keyguardDone).isNull()
+
+ underTest.setKeyguardDone(KeyguardDone.IMMEDIATE)
+ assertThat(keyguardDone).isEqualTo(KeyguardDone.IMMEDIATE)
+
+ underTest.setKeyguardDone(KeyguardDone.LATER)
+ assertThat(keyguardDone).isEqualTo(KeyguardDone.LATER)
+ }
+
+ @Test
+ fun userRequestedBouncerWhenAlreadyAuthenticated_dismissActionRunImmediately() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithoutImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+ val dismissKeyguardRequestWithImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithImmediateDismissAction)
+ underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+ runCurrent()
+
+ underTestDependencies.keyguardRepository.setDismissAction(
+ DismissAction.RunImmediately(
+ onDismissAction = { KeyguardDone.IMMEDIATE },
+ onCancelAction = {},
+ message = "",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+ userInfo.id
+ )
+ assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+ assertThat(dismissKeyguardRequestWithImmediateDismissAction).isEqualTo(Unit)
+ }
+
+ @Test
+ fun userRequestedBouncerWhenAlreadyAuthenticated_dismissActionRunAfterKeyguardGone() =
+ testScope.runTest {
+ val dismissKeyguardRequestWithImmediateWithoutDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+ val dismissKeyguardRequestWithImmediateDismissAction by
+ collectLastValue(underTest.dismissKeyguardRequestWithImmediateDismissAction)
+ underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+ runCurrent()
+
+ underTestDependencies.keyguardRepository.setDismissAction(
+ DismissAction.RunAfterKeyguardGone(
+ dismissAction = {},
+ onCancelAction = {},
+ message = "",
+ willAnimateOnLockscreen = true,
+ )
+ )
+ underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+ userInfo.id
+ )
+ assertThat(dismissKeyguardRequestWithImmediateDismissAction).isNull()
+ assertThat(dismissKeyguardRequestWithImmediateWithoutDismissAction).isEqualTo(Unit)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
index bdcb9abba745..b81a3d46b434 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
@@ -159,7 +159,6 @@ class OccludingAppDeviceEntryInteractorTest : SysuiTestCase() {
screenOffAnimationController = mock(),
statusBarStateController = mock(),
),
- FakeFeatureFlags().apply { set(Flags.FP_LISTEN_OCCLUDING_APPS, true) },
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
index 904662ed9210..da372eaf158c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
@@ -22,7 +22,10 @@ import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.coroutines.collectValues
+import com.android.systemui.flags.FakeFeatureFlags
+import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractorFactory
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.ScrimAlpha
@@ -32,6 +35,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.util.mockito.whenever
import com.google.common.collect.Range
import com.google.common.truth.Truth.assertThat
+import dagger.Lazy
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
@@ -47,13 +51,21 @@ import org.mockito.MockitoAnnotations
class PrimaryBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
private lateinit var underTest: PrimaryBouncerToGoneTransitionViewModel
private lateinit var repository: FakeKeyguardTransitionRepository
+ private lateinit var featureFlags: FakeFeatureFlags
@Mock private lateinit var statusBarStateController: SysuiStatusBarStateController
@Mock private lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor
+ @Mock
+ private lateinit var keyguardDismissActionInteractor: Lazy<KeyguardDismissActionInteractor>
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
repository = FakeKeyguardTransitionRepository()
+ val featureFlags =
+ FakeFeatureFlags().apply {
+ set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
+ set(Flags.UDFPS_NEW_TOUCH_DETECTION, true)
+ }
val interactor =
KeyguardTransitionInteractorFactory.create(
scope = TestScope().backgroundScope,
@@ -64,7 +76,9 @@ class PrimaryBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
PrimaryBouncerToGoneTransitionViewModel(
interactor,
statusBarStateController,
- primaryBouncerInteractor
+ primaryBouncerInteractor,
+ keyguardDismissActionInteractor,
+ featureFlags,
)
whenever(primaryBouncerInteractor.willRunDismissFromKeyguard()).thenReturn(false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
index d1299d40ea12..5939bb50bb25 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
@@ -16,10 +16,12 @@
package com.android.systemui.media.controls.pipeline
+import android.app.IUriGrantsManager
import android.app.Notification
import android.app.Notification.FLAG_NO_CLEAR
import android.app.Notification.MediaStyle
import android.app.PendingIntent
+import android.app.UriGrantsManager
import android.app.smartspace.SmartspaceAction
import android.app.smartspace.SmartspaceConfig
import android.app.smartspace.SmartspaceManager
@@ -27,12 +29,14 @@ import android.app.smartspace.SmartspaceTarget
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.Bitmap
+import android.graphics.ImageDecoder
import android.graphics.drawable.Icon
import android.media.MediaDescription
import android.media.MediaMetadata
import android.media.session.MediaController
import android.media.session.MediaSession
import android.media.session.PlaybackState
+import android.net.Uri
import android.os.Bundle
import android.provider.Settings
import android.service.notification.StatusBarNotification
@@ -40,6 +44,7 @@ import android.testing.AndroidTestingRunner
import android.testing.TestableLooper.RunWithLooper
import androidx.media.utils.MediaConstants
import androidx.test.filters.SmallTest
+import com.android.dx.mockito.inline.extended.ExtendedMockito
import com.android.internal.logging.InstanceId
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.systemui.InstanceIdSequenceFake
@@ -83,7 +88,9 @@ import org.mockito.Mockito.reset
import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyNoMoreInteractions
import org.mockito.Mockito.`when` as whenever
+import org.mockito.MockitoSession
import org.mockito.junit.MockitoJUnit
+import org.mockito.quality.Strictness
private const val KEY = "KEY"
private const val KEY_2 = "KEY_2"
@@ -149,6 +156,8 @@ class MediaDataManagerTest : SysuiTestCase() {
@Captor lateinit var stateCallbackCaptor: ArgumentCaptor<(String, PlaybackState) -> Unit>
@Captor lateinit var sessionCallbackCaptor: ArgumentCaptor<(String) -> Unit>
@Captor lateinit var smartSpaceConfigBuilderCaptor: ArgumentCaptor<SmartspaceConfig>
+ @Mock private lateinit var ugm: IUriGrantsManager
+ @Mock private lateinit var imageSource: ImageDecoder.Source
private val instanceIdSequence = InstanceIdSequenceFake(1 shl 20)
@@ -159,8 +168,17 @@ class MediaDataManagerTest : SysuiTestCase() {
1
)
+ private lateinit var staticMockSession: MockitoSession
+
@Before
fun setup() {
+ staticMockSession =
+ ExtendedMockito.mockitoSession()
+ .mockStatic<UriGrantsManager>(UriGrantsManager::class.java)
+ .mockStatic<ImageDecoder>(ImageDecoder::class.java)
+ .strictness(Strictness.LENIENT)
+ .startMocking()
+ whenever(UriGrantsManager.getService()).thenReturn(ugm)
foregroundExecutor = FakeExecutor(clock)
backgroundExecutor = FakeExecutor(clock)
uiExecutor = FakeExecutor(clock)
@@ -270,6 +288,7 @@ class MediaDataManagerTest : SysuiTestCase() {
@After
fun tearDown() {
+ staticMockSession.finishMocking()
session.release()
mediaDataManager.destroy()
Settings.Secure.putInt(
@@ -2198,6 +2217,66 @@ class MediaDataManagerTest : SysuiTestCase() {
verify(listener).onMediaDataRemoved(eq(KEY))
}
+ @Test
+ fun testResumeMediaLoaded_hasArtPermission_artLoaded() {
+ // When resume media is loaded and user/app has permission to access the art URI,
+ whenever(
+ ugm.checkGrantUriPermission_ignoreNonSystem(
+ anyInt(),
+ any(),
+ any(),
+ anyInt(),
+ anyInt()
+ )
+ )
+ .thenReturn(1)
+ val artwork = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
+ val uri = Uri.parse("content://example")
+ whenever(ImageDecoder.createSource(any(), eq(uri))).thenReturn(imageSource)
+ whenever(ImageDecoder.decodeBitmap(any(), any())).thenReturn(artwork)
+
+ val desc =
+ MediaDescription.Builder().run {
+ setTitle(SESSION_TITLE)
+ setIconUri(uri)
+ build()
+ }
+ addResumeControlAndLoad(desc)
+
+ // Then the artwork is loaded
+ assertThat(mediaDataCaptor.value.artwork).isNotNull()
+ }
+
+ @Test
+ fun testResumeMediaLoaded_noArtPermission_noArtLoaded() {
+ // When resume media is loaded and user/app does not have permission to access the art URI
+ whenever(
+ ugm.checkGrantUriPermission_ignoreNonSystem(
+ anyInt(),
+ any(),
+ any(),
+ anyInt(),
+ anyInt()
+ )
+ )
+ .thenThrow(SecurityException("Test no permission"))
+ val artwork = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
+ val uri = Uri.parse("content://example")
+ whenever(ImageDecoder.createSource(any(), eq(uri))).thenReturn(imageSource)
+ whenever(ImageDecoder.decodeBitmap(any(), any())).thenReturn(artwork)
+
+ val desc =
+ MediaDescription.Builder().run {
+ setTitle(SESSION_TITLE)
+ setIconUri(uri)
+ build()
+ }
+ addResumeControlAndLoad(desc)
+
+ // Then the artwork is not loaded
+ assertThat(mediaDataCaptor.value.artwork).isNull()
+ }
+
/** Helper function to add a basic media notification and capture the resulting MediaData */
private fun addNotificationAndLoad() {
addNotificationAndLoad(mediaNotification)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
index 91b0245be8d3..7ad2ce8ae110 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
@@ -30,6 +30,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.stack.MediaContainerView
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.animation.UniqueObjectHostView
import com.android.systemui.util.mockito.whenever
import com.android.systemui.util.settings.FakeSettings
@@ -90,6 +91,7 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
settings,
fakeHandler,
configurationController,
+ ResourcesSplitShadeStateController()
)
keyguardMediaController.attachSinglePaneContainer(mediaContainerView)
keyguardMediaController.useSplitShade = false
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
index 2ce236d4ba89..33ed01f115b5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
@@ -38,6 +38,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.policy.FakeConfigurationController
import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.animation.UniqueObjectHostView
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.mock
@@ -120,6 +121,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() {
notifPanelEvents,
settings,
fakeHandler,
+ ResourcesSplitShadeStateController()
)
verify(wakefulnessLifecycle).addObserver(wakefullnessObserver.capture())
verify(statusBarStateController).addCallback(statusBarCallback.capture())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
index cbfad56ed617..48a36cb5eb12 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
@@ -30,6 +30,8 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.HOME_B
import static com.android.systemui.navigationbar.NavigationBar.NavBarActionEvent.NAVBAR_ASSIST_LONGPRESS;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
+import static com.google.common.truth.Truth.assertThat;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -93,7 +95,6 @@ import com.android.systemui.settings.FakeDisplayTracker;
import com.android.systemui.settings.UserContextProvider;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.NotificationShadeWindowView;
-import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.rotation.RotationButtonController;
import com.android.systemui.shared.system.TaskStackChangeListeners;
@@ -330,6 +331,58 @@ public class NavigationBarTest extends SysuiTestCase {
}
@Test
+ public void onHomeTouch_isRinging_keyguardShowing_touchBlocked() {
+ when(mTelecomManager.isRinging()).thenReturn(true);
+ when(mKeyguardStateController.isShowing()).thenReturn(true);
+
+ boolean result = mNavigationBar.onHomeTouch(
+ mNavigationBar.getView(),
+ MotionEvent.obtain(
+ /*downTime=*/SystemClock.uptimeMillis(),
+ /*eventTime=*/SystemClock.uptimeMillis(),
+ /*action=*/MotionEvent.ACTION_DOWN,
+ 0, 0, 0));
+
+ assertThat(result).isTrue();
+
+ // Verify subsequent touches are also blocked
+ boolean nextTouchEvent = mNavigationBar.onHomeTouch(
+ mNavigationBar.getView(),
+ MotionEvent.obtain(
+ /*downTime=*/SystemClock.uptimeMillis(),
+ /*eventTime=*/SystemClock.uptimeMillis(),
+ /*action=*/MotionEvent.ACTION_MOVE,
+ 0, 0, 0));
+ assertThat(nextTouchEvent).isTrue();
+ }
+
+ @Test
+ public void onHomeTouch_isRinging_keyguardNotShowing_touchNotBlocked() {
+ when(mTelecomManager.isRinging()).thenReturn(true);
+ when(mKeyguardStateController.isShowing()).thenReturn(false);
+
+ boolean result = mNavigationBar.onHomeTouch(
+ mNavigationBar.getView(),
+ MotionEvent.obtain(
+ /*downTime=*/SystemClock.uptimeMillis(),
+ /*eventTime=*/SystemClock.uptimeMillis(),
+ /*action=*/MotionEvent.ACTION_DOWN,
+ 0, 0, 0));
+
+ assertThat(result).isFalse();
+
+ // Verify subsequent touches are also not blocked
+ boolean nextTouchEvent = mNavigationBar.onHomeTouch(
+ mNavigationBar.getView(),
+ MotionEvent.obtain(
+ /*downTime=*/SystemClock.uptimeMillis(),
+ /*eventTime=*/SystemClock.uptimeMillis(),
+ /*action=*/MotionEvent.ACTION_MOVE,
+ 0, 0, 0));
+ assertThat(nextTouchEvent).isFalse();
+ }
+
+ @Test
public void testRegisteredWithUserTracker() {
mNavigationBar.init();
mNavigationBar.onViewAttached();
@@ -468,7 +521,6 @@ public class NavigationBarTest extends SysuiTestCase {
when(deviceProvisionedController.isDeviceProvisioned()).thenReturn(true);
return spy(new NavigationBar(
mNavigationBarView,
- mock(ShadeController.class),
mNavigationBarFrame,
null,
context,
@@ -487,6 +539,7 @@ public class NavigationBarTest extends SysuiTestCase {
Optional.of(mock(Pip.class)),
Optional.of(mock(Recents.class)),
() -> Optional.of(mCentralSurfaces),
+ mKeyguardStateController,
mock(ShadeViewController.class),
mock(NotificationRemoteInputManager.class),
mock(NotificationShadeDepthController.class),
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
index fcda5f50cef2..8afe095cbaf0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
@@ -66,6 +66,7 @@ import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
import com.android.systemui.util.animation.UniqueObjectHostView;
@@ -524,7 +525,10 @@ public class QSFragmentTest extends SysuiBaseFragmentTest {
return new QSFragment(
new RemoteInputQuickSettingsDisabler(
- context, commandQueue, mock(ConfigurationController.class)),
+ context,
+ commandQueue,
+ new ResourcesSplitShadeStateController(),
+ mock(ConfigurationController.class)),
mStatusBarStateController,
commandQueue,
mQSMediaHost,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
index 6720dae10230..2ac220c1975d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
@@ -50,6 +50,7 @@ import com.android.systemui.plugins.qs.QSTileView;
import com.android.systemui.qs.customize.QSCustomizerController;
import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.qs.tileimpl.QSTileImpl;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.util.animation.DisappearParameters;
import org.junit.Before;
@@ -110,7 +111,7 @@ public class QSPanelControllerBaseTest extends SysuiTestCase {
MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger,
DumpManager dumpManager) {
super(view, host, qsCustomizerController, true, mediaHost, metricsLogger, uiEventLogger,
- qsLogger, dumpManager);
+ qsLogger, dumpManager, new ResourcesSplitShadeStateController());
}
@Override
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
index 9d9d0c7de2ad..8a530dd7206c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
@@ -18,6 +18,7 @@ import com.android.systemui.qs.logging.QSLogger
import com.android.systemui.settings.brightness.BrightnessController
import com.android.systemui.settings.brightness.BrightnessSliderController
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.tuner.TunerService
import com.google.common.truth.Truth.assertThat
import org.junit.After
@@ -91,7 +92,8 @@ class QSPanelControllerTest : SysuiTestCase() {
brightnessControllerFactory,
brightnessSliderFactory,
falsingManager,
- statusBarKeyguardViewManager
+ statusBarKeyguardViewManager,
+ ResourcesSplitShadeStateController()
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
index 71ea831e0f92..f188b4e19a2b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
@@ -29,6 +29,7 @@ import com.android.systemui.plugins.qs.QSTile
import com.android.systemui.plugins.qs.QSTileView
import com.android.systemui.qs.customize.QSCustomizerController
import com.android.systemui.qs.logging.QSLogger
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.leak.RotationUtils
import org.junit.After
import org.junit.Before
@@ -167,7 +168,8 @@ class QuickQSPanelControllerTest : SysuiTestCase() {
metricsLogger,
uiEventLogger,
qsLogger,
- dumpManager) {
+ dumpManager,
+ ResourcesSplitShadeStateController()) {
private var rotation = RotationUtils.ROTATION_NONE
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
index 77b3e69f4384..9386d711374a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
@@ -17,8 +17,9 @@
package com.android.systemui.qs.pipeline.data.repository
import android.provider.Settings
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.shared.TileSpec
@@ -34,7 +35,8 @@ import org.junit.runner.RunWith
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class AutoAddSettingsRepositoryTest : SysuiTestCase() {
private val secureSettings = FakeSettings()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
index d7ab903c1e2e..30f5811c3731 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
@@ -18,8 +18,9 @@ package com.android.systemui.qs.pipeline.data.repository
import android.content.ComponentName
import android.content.SharedPreferences
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.settings.UserFileManager
import com.android.systemui.util.FakeSharedPreferences
@@ -29,7 +30,8 @@ import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class CustomTileAddedSharedPreferencesRepositoryTest : SysuiTestCase() {
private lateinit var underTest: CustomTileAddedSharedPrefsRepository
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
index dc0fae53f0c5..995de662aaf0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
@@ -29,8 +29,10 @@ import android.content.pm.ResolveInfo
import android.content.pm.ServiceInfo
import android.os.UserHandle
import android.service.quicksettings.TileService
-import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.util.mockito.any
@@ -60,7 +62,9 @@ import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+@TestableLooper.RunWithLooper
@OptIn(ExperimentalCoroutinesApi::class)
class InstalledTilesComponentRepositoryImplTest : SysuiTestCase() {
private val testDispatcher = StandardTestDispatcher()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
index 72c31b1bcf4d..aef5fafe05ba 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
@@ -17,9 +17,10 @@
package com.android.systemui.qs.pipeline.data.repository
import android.provider.Settings
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.QSHost
@@ -41,7 +42,8 @@ import org.mockito.Mock
import org.mockito.MockitoAnnotations
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
class TileSpecSettingsRepositoryTest : SysuiTestCase() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
index 817ac61e5303..6e579d46fc34 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
@@ -17,9 +17,10 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
import android.content.ComponentName
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.util.mockito.mock
@@ -28,7 +29,8 @@ import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class AutoAddableSettingListTest : SysuiTestCase() {
private val factory =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
index 36c3c9d79e86..7c6dd242a569 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
@@ -35,7 +36,8 @@ import org.junit.runner.RunWith
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class AutoAddableSettingTest : SysuiTestCase() {
private val testDispatcher = StandardTestDispatcher()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
index afb43c7e9c16..469eee363889 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -35,7 +36,8 @@ import org.junit.runner.RunWith
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class CallbackControllerAutoAddableTest : SysuiTestCase() {
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
index a357dad65b2a..b6eaa3922278 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -41,7 +42,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class CastAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var castController: CastController
@@ -128,6 +130,6 @@ class CastAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(CastTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(CastTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
index 098ffc304a7a..a755fbbdfd7f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class DataSaverAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var dataSaverController: DataSaverController
@@ -80,6 +82,6 @@ class DataSaverAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(DataSaverTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(DataSaverTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
index a2e353877e67..daacca51a915 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -43,7 +44,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class DeviceControlsAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var deviceControlsController: DeviceControlsController
@@ -110,6 +112,6 @@ class DeviceControlsAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(DeviceControlsTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(DeviceControlsTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
index ee96b471bc18..4b5f7f6d07ef 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class HotspotAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var hotspotController: HotspotController
@@ -78,6 +80,6 @@ class HotspotAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(HotspotTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(HotspotTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
index e03072abce27..32d9db24a3b2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
@@ -17,8 +17,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
import android.hardware.display.NightDisplayListener
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.dagger.NightDisplayListenerModule
@@ -49,7 +50,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class NightDisplayAutoAddableTest : SysuiTestCase() {
@Mock(answer = Answers.RETURNS_SELF)
@@ -121,6 +123,6 @@ class NightDisplayAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(NightDisplayTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(NightDisplayTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
index 7b4a55ed1750..fb513a6bd197 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.ReduceBrightColorsController
@@ -43,7 +44,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class ReduceBrightColorsAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var reduceBrightColorsController: ReduceBrightColorsController
@@ -103,6 +105,6 @@ class ReduceBrightColorsAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(ReduceBrightColorsTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(ReduceBrightColorsTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
index fb35a3a70e92..8036cb44e45d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
@@ -18,9 +18,10 @@ package com.android.systemui.qs.pipeline.domain.autoaddable
import android.content.ComponentName
import android.content.pm.PackageManager
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
@@ -51,7 +52,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class SafetyCenterAutoAddableTest : SysuiTestCase() {
private val testDispatcher = StandardTestDispatcher()
private val testScope = TestScope(testDispatcher)
@@ -155,9 +157,10 @@ class SafetyCenterAutoAddableTest : SysuiTestCase() {
companion object {
private const val SAFETY_TILE_CLASS_NAME = "cls"
private const val PERMISSION_CONTROLLER_PACKAGE_NAME = "pkg"
- private val SPEC =
+ private val SPEC by lazy {
TileSpec.create(
ComponentName(PERMISSION_CONTROLLER_PACKAGE_NAME, SAFETY_TILE_CLASS_NAME)
)
+ }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
index 6b250f4d9af9..1c8cb541e613 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.autoaddable
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -37,7 +38,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class WalletAutoAddableTest : SysuiTestCase() {
@Mock private lateinit var walletController: WalletController
@@ -76,6 +78,6 @@ class WalletAutoAddableTest : SysuiTestCase() {
}
companion object {
- private val SPEC = TileSpec.create(QuickAccessWalletTile.TILE_SPEC)
+ private val SPEC by lazy { TileSpec.create(QuickAccessWalletTile.TILE_SPEC) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
index e9f7c8ab20cf..de1d29fdcbe5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
@@ -21,8 +21,9 @@ import android.content.pm.UserInfo.FLAG_FULL
import android.content.pm.UserInfo.FLAG_MANAGED_PROFILE
import android.content.pm.UserInfo.FLAG_PRIMARY
import android.content.pm.UserInfo.FLAG_PROFILE
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class WorkTileAutoAddableTest : SysuiTestCase() {
private lateinit var userTracker: FakeUserTracker
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
index f924b35d9c9c..bb18115c960c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
@@ -16,8 +16,9 @@
package com.android.systemui.qs.pipeline.domain.interactor
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.dump.DumpManager
@@ -46,7 +47,8 @@ import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
class AutoAddInteractorTest : SysuiTestCase() {
private val testScope = TestScope()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
index 54a93608a10d..dc1b9c4d0d14 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
@@ -22,8 +22,9 @@ import android.content.Intent
import android.content.pm.UserInfo
import android.os.UserHandle
import android.service.quicksettings.Tile
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.dump.nano.SystemUIProtoDump
@@ -69,7 +70,8 @@ import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
class CurrentTilesInteractorImplTest : SysuiTestCase() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
index 6556cfd22901..151b256c4f5c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
@@ -15,8 +15,9 @@
*/
package com.android.systemui.qs.pipeline.domain.interactor
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.shade.ShadeController
import org.junit.Before
@@ -26,7 +27,8 @@ import org.mockito.Mock
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
@SmallTest
class PanelInteractorImplTest : SysuiTestCase() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
index d880172c1ba6..34c4c9842986 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
@@ -17,15 +17,17 @@
package com.android.systemui.qs.pipeline.shared
import android.content.ComponentName
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
import com.android.systemui.SysuiTestCase
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
class TileSpecTest : SysuiTestCase() {
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
index 5e7f68ccf3d7..e5c55d8b6c56 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
@@ -168,7 +168,7 @@ class BluetoothTileTest : SysuiTestCase() {
val btDevice = mock<BluetoothDevice>()
whenever(cachedDevice2.device).thenReturn(btDevice)
whenever(btDevice.getMetadata(BluetoothDevice.METADATA_MAIN_BATTERY)).thenReturn(null)
- whenever(cachedDevice2.batteryLevel).thenReturn(25)
+ whenever(cachedDevice2.minBatteryLevelWithMemberDevices).thenReturn(25)
addConnectedDevice(cachedDevice2)
tile.handleUpdateState(state, /* arg= */ null)
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 1c9ec27c6a1b..9130bc266d11 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
@@ -65,6 +65,7 @@ import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.testing.UiEventLoggerFake;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.KeyguardClockSwitch;
import com.android.keyguard.KeyguardClockSwitchController;
@@ -119,6 +120,7 @@ import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.qs.QSFragment;
import com.android.systemui.screenrecord.RecordingController;
+import com.android.systemui.shade.data.repository.FakeShadeRepository;
import com.android.systemui.shade.data.repository.ShadeRepository;
import com.android.systemui.shade.domain.interactor.ShadeInteractor;
import com.android.systemui.shade.transition.ShadeTransitionController;
@@ -171,6 +173,7 @@ import com.android.systemui.statusbar.policy.KeyguardQsUserSwitchController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcherController;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcherView;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.statusbar.window.StatusBarWindowStateController;
import com.android.systemui.unfold.SysUIUnfoldComponent;
import com.android.systemui.util.kotlin.JavaAdapter;
@@ -271,6 +274,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
@Mock protected KeyguardIndicationController mKeyguardIndicationController;
@Mock protected FragmentService mFragmentService;
@Mock protected FragmentHostManager mFragmentHostManager;
+ @Mock protected IStatusBarService mStatusBarService;
@Mock protected NotificationRemoteInputManager mNotificationRemoteInputManager;
@Mock protected RecordingController mRecordingController;
@Mock protected LockscreenGestureLogger mLockscreenGestureLogger;
@@ -318,7 +322,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mEmptySpaceClickListenerCaptor;
@Mock protected ActivityStarter mActivityStarter;
@Mock protected KeyguardFaceAuthInteractor mKeyguardFaceAuthInteractor;
- @Mock protected ShadeRepository mShadeRepository;
@Mock private ShadeInteractor mShadeInteractor;
@Mock private JavaAdapter mJavaAdapter;
@Mock private CastController mCastController;
@@ -339,6 +342,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
protected Handler mMainHandler;
protected View.OnLayoutChangeListener mLayoutChangeListener;
protected KeyguardStatusViewController mKeyguardStatusViewController;
+ protected ShadeRepository mShadeRepository;
protected final FalsingManagerFake mFalsingManager = new FalsingManagerFake();
protected final Optional<SysUIUnfoldComponent> mSysUIUnfoldComponent = Optional.empty();
@@ -360,6 +364,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mFakeKeyguardRepository = keyguardInteractorDeps.getRepository();
mKeyguardBottomAreaInteractor = new KeyguardBottomAreaInteractor(mFakeKeyguardRepository);
mKeyguardInteractor = keyguardInteractorDeps.getKeyguardInteractor();
+ mShadeRepository = new FakeShadeRepository();
SystemClock systemClock = new FakeSystemClock();
mStatusBarStateController = new StatusBarStateControllerImpl(mUiEventLogger, mDumpManager,
@@ -621,6 +626,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mNavigationBarController,
mQsController,
mFragmentService,
+ mStatusBarService,
mContentResolver,
mShadeHeaderController,
mScreenOffAnimationController,
@@ -656,7 +662,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mSharedNotificationContainerInteractor,
mKeyguardViewConfigurator,
mKeyguardFaceAuthInteractor,
- mKeyguardRootView);
+ new ResourcesSplitShadeStateController());
mNotificationPanelViewController.initDependencies(
mCentralSurfaces,
null,
@@ -728,7 +734,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mShadeRepository,
mShadeInteractor,
mJavaAdapter,
- mCastController
+ mCastController,
+ new ResourcesSplitShadeStateController()
);
}
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 7aeafeb2a752..638c2665cb20 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -866,37 +866,6 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
- public void testUnlockAnimationDoesNotAffectScrim() {
- mNotificationPanelViewController.onUnlockHintStarted();
- verify(mScrimController).setExpansionAffectsAlpha(false);
- mNotificationPanelViewController.onUnlockHintFinished();
- verify(mScrimController).setExpansionAffectsAlpha(true);
- }
-
- @Test
- public void testUnlockHintAnimation_runs_whenNotInPowerSaveMode_andDozeAmountIsZero() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(false);
- when(mAmbientState.getDozeAmount()).thenReturn(0f);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isTrue();
- }
-
- @Test
- public void testUnlockHintAnimation_doesNotRun_inPowerSaveMode() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(true);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
- }
-
- @Test
- public void testUnlockHintAnimation_doesNotRun_whenDozeAmountNotZero() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(false);
- when(mAmbientState.getDozeAmount()).thenReturn(0.5f);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
- }
-
- @Test
public void setKeyguardStatusBarAlpha_setsAlphaOnKeyguardStatusBarController() {
float statusBarAlpha = 0.5f;
@@ -1056,36 +1025,6 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
- public void onEmptySpaceClicked_notDozingAndFaceDetectionIsNotRunning_startsUnlockAnimation() {
- StatusBarStateController.StateListener statusBarStateListener =
- mNotificationPanelViewController.getStatusBarStateListener();
- statusBarStateListener.onStateChanged(KEYGUARD);
- mNotificationPanelViewController.setDozing(false, false);
- when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(false);
-
- // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
- mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
- mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
- verify(mNotificationStackScrollLayoutController).setUnlockHintRunning(true);
- }
-
- @Test
- public void onEmptySpaceClicked_notDozingAndFaceDetectionIsRunning_doesNotStartUnlockHint() {
- StatusBarStateController.StateListener statusBarStateListener =
- mNotificationPanelViewController.getStatusBarStateListener();
- statusBarStateListener.onStateChanged(KEYGUARD);
- mNotificationPanelViewController.setDozing(false, false);
- when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(true);
-
- // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
- mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
- mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
- verify(mNotificationStackScrollLayoutController, never()).setUnlockHintRunning(true);
- }
-
- @Test
public void onEmptySpaceClicked_whenDozingAndOnKeyguard_doesNotRequestFaceAuth() {
StatusBarStateController.StateListener statusBarStateListener =
mNotificationPanelViewController.getStatusBarStateListener();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
index 577b6e0bc58a..36cf1d96b891 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
@@ -39,6 +39,7 @@ import com.android.systemui.plugins.qs.QS
import com.android.systemui.recents.OverviewProxyService
import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.capture
import com.android.systemui.util.mockito.whenever
@@ -118,6 +119,7 @@ class NotificationsQSContainerControllerLegacyTest : SysuiTestCase() {
delayableExecutor,
featureFlags,
notificationStackScrollLayoutController,
+ ResourcesSplitShadeStateController()
)
overrideResource(R.dimen.split_shade_notifications_scrim_margin_bottom, SCRIM_MARGIN)
@@ -474,6 +476,7 @@ class NotificationsQSContainerControllerLegacyTest : SysuiTestCase() {
delayableExecutor,
featureFlags,
notificationStackScrollLayoutController,
+ ResourcesSplitShadeStateController()
)
controller.updateConstraints()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
index 405199ed4ecb..090bee2c772e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
@@ -39,6 +39,7 @@ import com.android.systemui.plugins.qs.QS
import com.android.systemui.recents.OverviewProxyService
import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.capture
import com.android.systemui.util.mockito.whenever
@@ -117,6 +118,7 @@ class NotificationsQSContainerControllerTest : SysuiTestCase() {
delayableExecutor,
featureFlags,
notificationStackScrollLayoutController,
+ ResourcesSplitShadeStateController()
)
overrideResource(R.dimen.split_shade_notifications_scrim_margin_bottom, SCRIM_MARGIN)
@@ -457,6 +459,7 @@ class NotificationsQSContainerControllerTest : SysuiTestCase() {
delayableExecutor,
featureFlags,
notificationStackScrollLayoutController,
+ ResourcesSplitShadeStateController()
)
controller.updateConstraints()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
index 46b636b264be..849127ed10e6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
@@ -75,6 +75,7 @@ import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.user.domain.interactor.UserInteractor;
import com.android.systemui.util.kotlin.JavaAdapter;
@@ -182,7 +183,8 @@ public class QuickSettingsControllerBaseTest extends SysuiTestCase {
mUserInteractor,
new SharedNotificationContainerInteractor(
new FakeConfigurationRepository(),
- mContext),
+ mContext,
+ new ResourcesSplitShadeStateController()),
mShadeRepository
);
@@ -260,7 +262,8 @@ public class QuickSettingsControllerBaseTest extends SysuiTestCase {
mShadeRepository,
mShadeInteractor,
new JavaAdapter(mTestScope.getBackgroundScope()),
- mCastController
+ mCastController,
+ new ResourcesSplitShadeStateController()
);
mQsController.init();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
index 8f8b840b03c9..7d5f68e783d5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
@@ -130,7 +130,7 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
var viewVisibility = View.GONE
var viewAlpha = 1f
- private val systemIcons = LinearLayout(context)
+ private val systemIconsHoverContainer = LinearLayout(context)
private lateinit var shadeHeaderController: ShadeHeaderController
private lateinit var carrierIconSlots: List<String>
private val configurationController = FakeConfigurationController()
@@ -150,7 +150,8 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
.thenReturn(batteryMeterView)
whenever<StatusIconContainer>(view.requireViewById(R.id.statusIcons)).thenReturn(statusIcons)
- whenever<View>(view.requireViewById(R.id.shade_header_system_icons)).thenReturn(systemIcons)
+ whenever<View>(view.requireViewById(R.id.hover_system_icons_container))
+ .thenReturn(systemIconsHoverContainer)
viewContext = Mockito.spy(context)
whenever(view.context).thenReturn(viewContext)
@@ -457,12 +458,12 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
}
@Test
- fun testLargeScreenActive_collapseActionRun_onSystemIconsClick() {
+ fun testLargeScreenActive_collapseActionRun_onSystemIconsHoverContainerClick() {
shadeHeaderController.largeScreenActive = true
var wasRun = false
shadeHeaderController.shadeCollapseAction = Runnable { wasRun = true }
- systemIcons.performClick()
+ systemIconsHoverContainer.performClick()
assertThat(wasRun).isTrue()
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
index dd6ab73b7d11..9275ccb6d473 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
@@ -45,6 +45,7 @@ import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFl
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
import com.android.systemui.user.data.model.UserSwitcherSettingsModel
@@ -85,6 +86,7 @@ class ShadeInteractorTest : SysuiTestCase() {
SharedNotificationContainerInteractor(
configurationRepository,
mContext,
+ ResourcesSplitShadeStateController()
)
@Mock private lateinit var manager: UserManager
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 e086712308b6..19d59fd4f1b1 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
@@ -151,6 +151,24 @@ class ShadeRepositoryImplTest : SysuiTestCase() {
}
@Test
+ fun updateLegacyShadeTracking() =
+ testScope.runTest {
+ assertThat(underTest.legacyShadeTracking.value).isEqualTo(false)
+
+ underTest.setLegacyShadeTracking(true)
+ assertThat(underTest.legacyShadeTracking.value).isEqualTo(true)
+ }
+
+ @Test
+ fun updateLegacyQsTracking() =
+ testScope.runTest {
+ assertThat(underTest.legacyQsTracking.value).isEqualTo(false)
+
+ underTest.setLegacyQsTracking(true)
+ assertThat(underTest.legacyQsTracking.value).isEqualTo(true)
+ }
+
+ @Test
fun updateUdfpsTransitionToFullShadeProgress() =
testScope.runTest {
assertThat(underTest.udfpsTransitionToFullShadeProgress.value).isEqualTo(0f)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
index 8309342d2c60..36f82c2a0e1c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
@@ -5,6 +5,7 @@ import androidx.test.filters.SmallTest
import com.android.systemui.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.google.common.truth.Expect
import org.junit.Rule
import org.junit.Test
@@ -23,7 +24,8 @@ class LargeScreenShadeInterpolatorImplTest : SysuiTestCase() {
configurationController,
context,
splitShadeInterpolator,
- portraitShadeInterpolator
+ portraitShadeInterpolator,
+ ResourcesSplitShadeStateController()
)
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
index d5a1f804e6a0..7737b4313e3c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
@@ -9,6 +9,7 @@ import com.android.systemui.shade.ShadeExpansionChangeEvent
import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -41,6 +42,7 @@ class ShadeTransitionControllerTest : SysuiTestCase() {
context,
scrimShadeTransitionController,
statusBarStateController,
+ ResourcesSplitShadeStateController()
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
index 70412626420d..673d63f3a07d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
@@ -23,6 +23,7 @@ import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.qs.QS
import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.google.common.truth.Expect
import com.google.common.truth.Truth.assertThat
import org.junit.Before
@@ -59,7 +60,8 @@ class LockscreenShadeQsTransitionControllerTest : SysuiTestCase() {
context,
configurationController,
dumpManager,
- qsProvider = { qS }
+ qsProvider = { qS },
+ ResourcesSplitShadeStateController()
)
}
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 2446234bb022..2c9dfcc25324 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
@@ -39,6 +39,7 @@ import com.android.systemui.statusbar.phone.LSShadeTransitionLogger
import com.android.systemui.statusbar.phone.ScrimController
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.mockito.mock
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
@@ -110,6 +111,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
private val sharedNotificationContainerInteractor = SharedNotificationContainerInteractor(
configurationRepository,
mContext,
+ ResourcesSplitShadeStateController()
)
private val shadeInteractor =
ShadeInteractor(
@@ -172,7 +174,8 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
scrimController,
context,
configurationController,
- dumpManager
+ dumpManager,
+ ResourcesSplitShadeStateController()
),
keyguardTransitionControllerFactory = { notificationPanelController ->
LockscreenShadeKeyguardTransitionController(
@@ -180,7 +183,8 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
notificationPanelController,
context,
configurationController,
- dumpManager
+ dumpManager,
+ ResourcesSplitShadeStateController()
)
},
qsTransitionControllerFactory = { qsTransitionController },
@@ -188,6 +192,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
shadeRepository = FakeShadeRepository(),
shadeInteractor = shadeInteractor,
powerInteractor = powerInteractor,
+ splitShadeStateController = ResourcesSplitShadeStateController()
)
transitionController.addCallback(transitionControllerCallback)
whenever(nsslController.view).thenReturn(stackscroller)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
index c49f179c925e..a258f67932bd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
@@ -33,6 +33,7 @@ import com.android.systemui.statusbar.phone.BiometricUnlockController
import com.android.systemui.statusbar.phone.DozeParameters
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.statusbar.policy.KeyguardStateController
import com.android.systemui.util.WallpaperController
import com.android.systemui.util.mockito.eq
@@ -114,8 +115,9 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
notificationShadeWindowController,
dozeParameters,
context,
+ ResourcesSplitShadeStateController(),
dumpManager,
- configurationController)
+ configurationController,)
notificationShadeDepthController.shadeAnimation = shadeAnimation
notificationShadeDepthController.brightnessMirrorSpring = brightnessSpring
notificationShadeDepthController.root = root
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
index 2e5afa4a8b50..98315d0ca3c9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
@@ -18,6 +18,8 @@ package com.android.systemui.statusbar.connectivity;
import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS;
+import static android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_DENIED;
+import static android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_HOME;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
@@ -439,11 +441,29 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
public void setVoiceRegState(int voiceRegState) {
when(mServiceState.getState()).thenReturn(voiceRegState);
+ when(mServiceState.getVoiceRegState()).thenReturn(voiceRegState);
updateServiceState();
}
- public void setDataRegState(int dataRegState) {
- when(mServiceState.getDataRegistrationState()).thenReturn(dataRegState);
+ public void setDataRegInService(boolean inService) {
+ // mFakeRegInfo#isInService()
+ // Utils#isInService uses NetworkRegistrationInfo#isInService(). Since we can't
+ // mock the answer here, just set the bit based on what the caller wants
+ NetworkRegistrationInfo.Builder builder = new NetworkRegistrationInfo.Builder()
+ .setTransportType(TRANSPORT_TYPE_WWAN)
+ .setDomain(DOMAIN_PS)
+ .setAccessNetworkTechnology(TelephonyManager.NETWORK_TYPE_LTE);
+
+ if (inService) {
+ builder.setRegistrationState(REGISTRATION_STATE_HOME);
+ } else {
+ builder.setRegistrationState(REGISTRATION_STATE_DENIED);
+ }
+
+ NetworkRegistrationInfo fakeRegInfo = builder.build();
+ when(mServiceState.getNetworkRegistrationInfo(DOMAIN_PS, TRANSPORT_TYPE_WWAN))
+ .thenReturn(fakeRegInfo);
+
updateServiceState();
}
@@ -658,3 +678,4 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
assertEquals("Data network name", expected, mNetworkController.getMobileDataNetworkName());
}
}
+
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
index d5689dcb3173..f667b831e440 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
@@ -340,7 +340,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
public void testIsDataInService_notInService_false() {
setupDefaultSignal();
setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE);
- setDataRegState(ServiceState.STATE_OUT_OF_SERVICE);
+ setDataRegInService(false);
assertFalse(mNetworkController.isMobileDataNetworkInService());
}
@@ -408,3 +408,4 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
false);
}
}
+
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
index 580463a3010f..88ddc2d9ef03 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
@@ -31,6 +31,7 @@ import com.android.systemui.statusbar.disableflags.DisableFlagsLogger
import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
import com.android.systemui.util.mockito.mock
@@ -56,6 +57,7 @@ class DisableFlagsRepositoryTest : SysuiTestCase() {
RemoteInputQuickSettingsDisabler(
context,
commandQueue,
+ ResourcesSplitShadeStateController(),
configurationController,
)
private val logBuffer = LogBufferFactory(DumpManager(), mock()).create("buffer", 10)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt
new file mode 100644
index 000000000000..e38adeb0fcd9
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.row
+
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
+import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener
+import com.android.systemui.util.mockito.any
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+class NotifInflationErrorManagerTest : SysuiTestCase() {
+ private lateinit var manager: NotifInflationErrorManager
+
+ private val listener1 = mock(NotifInflationErrorListener::class.java)
+ private val listener2 = mock(NotifInflationErrorListener::class.java)
+
+ private val foo: NotificationEntry = NotificationEntryBuilder().setPkg("foo").build()
+ private val bar: NotificationEntry = NotificationEntryBuilder().setPkg("bar").build()
+ private val baz: NotificationEntry = NotificationEntryBuilder().setPkg("baz").build()
+
+ private val fooException = Exception("foo")
+ private val barException = Exception("bar")
+
+ @Before
+ fun setUp() {
+ // Reset manager instance before each test.
+ manager = NotifInflationErrorManager()
+ }
+
+ @Test
+ fun testTracksInflationErrors() {
+ manager.setInflationError(foo, fooException)
+ manager.setInflationError(bar, barException)
+
+ assertThat(manager.hasInflationError(foo)).isTrue()
+ assertThat(manager.hasInflationError(bar)).isTrue()
+ assertThat(manager.hasInflationError(baz)).isFalse()
+
+ manager.clearInflationError(bar)
+
+ assertThat(manager.hasInflationError(bar)).isFalse()
+ }
+
+ @Test
+ fun testNotifiesListeners() {
+ manager.addInflationErrorListener(listener1)
+ manager.setInflationError(foo, fooException)
+
+ verify(listener1).onNotifInflationError(foo, fooException)
+
+ manager.addInflationErrorListener(listener2)
+ manager.setInflationError(bar, barException)
+
+ verify(listener1).onNotifInflationError(bar, barException)
+ verify(listener2).onNotifInflationError(bar, barException)
+
+ manager.clearInflationError(foo)
+
+ verify(listener1).onNotifInflationErrorCleared(foo)
+ verify(listener2).onNotifInflationErrorCleared(foo)
+ }
+
+ @Test
+ fun testClearUnknownEntry() {
+ manager.addInflationErrorListener(listener1)
+ manager.clearInflationError(foo)
+
+ verify(listener1, never()).onNotifInflationErrorCleared(any())
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
index 79cf932a1880..b3f5ea26f9f4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
@@ -95,6 +95,7 @@ import com.android.systemui.statusbar.phone.NotificationIconAreaController;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.util.settings.SecureSettings;
@@ -713,7 +714,8 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
mNotificationTargetsHelper,
mSecureSettings,
mock(NotificationDismissibilityProvider.class),
- mActivityStarter
+ mActivityStarter,
+ new ResourcesSplitShadeStateController()
);
}
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 72fcdec3c44c..4307066e2d44 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
@@ -87,6 +87,7 @@ import com.android.systemui.statusbar.notification.row.FooterView;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import org.junit.Assert;
import org.junit.Before;
@@ -322,26 +323,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
}
@Test
- public void setUnlockHintRunning_updatesStackEndHeightOnlyOnFinish() {
- final float expansionFraction = 0.5f;
- mAmbientState.setStatusBarState(StatusBarState.KEYGUARD);
- mStackScroller.setUnlockHintRunning(true);
-
- // Validate that when the animation is running, we update only the stackHeight
- clearInvocations(mAmbientState);
- mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction);
- verify(mAmbientState, never()).setStackEndHeight(anyFloat());
- verify(mAmbientState).setStackHeight(anyFloat());
-
- // Validate that when the animation ends the stackEndHeight is recalculated immediately
- clearInvocations(mAmbientState);
- mStackScroller.setUnlockHintRunning(false);
- verify(mAmbientState).setUnlockHintRunning(eq(false));
- verify(mAmbientState).setStackEndHeight(anyFloat());
- verify(mAmbientState).setStackHeight(anyFloat());
- }
-
- @Test
public void testNotDimmedOnKeyguard() {
when(mBarState.getState()).thenReturn(StatusBarState.SHADE);
mStackScroller.setDimmed(true /* dimmed */, false /* animate */);
@@ -865,6 +846,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
public void testSplitShade_hasTopOverscroll() {
mTestableResources
.addOverride(R.bool.config_use_split_notification_shade, /* value= */ true);
+ mStackScroller.passSplitShadeStateController(new ResourcesSplitShadeStateController());
mStackScroller.updateSplitNotificationShade();
mAmbientState.setExpansionFraction(1f);
@@ -880,6 +862,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
public void testNormalShade_hasNoTopOverscroll() {
mTestableResources
.addOverride(R.bool.config_use_split_notification_shade, /* value= */ false);
+ mStackScroller.passSplitShadeStateController(new ResourcesSplitShadeStateController());
mStackScroller.updateSplitNotificationShade();
mAmbientState.setExpansionFraction(1f);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
index 5279740a8702..bc12bb0fca4e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
@@ -30,6 +30,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.ExpandableView
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.eq
import com.android.systemui.util.mockito.nullable
@@ -70,7 +71,8 @@ class NotificationStackSizeCalculatorTest : SysuiTestCase() {
statusBarStateController = sysuiStatusBarStateController,
lockscreenShadeTransitionController = lockscreenShadeTransitionController,
mediaDataManager = mediaDataManager,
- testableResources.resources
+ testableResources.resources,
+ ResourcesSplitShadeStateController()
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
index 7bbb09483b5f..7fc399b44795 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
@@ -23,6 +23,7 @@ import com.android.systemui.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
@@ -43,6 +44,7 @@ class SharedNotificationContainerInteractorTest : SysuiTestCase() {
SharedNotificationContainerInteractor(
configurationRepository,
mContext,
+ ResourcesSplitShadeStateController()
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
index 521069f15569..bfc09103ba41 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
@@ -43,6 +43,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackSizeCa
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.user.domain.interactor.UserInteractor
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.mock
@@ -106,6 +107,7 @@ class SharedNotificationContainerViewModelTest : SysuiTestCase() {
SharedNotificationContainerInteractor(
configurationRepository,
mContext,
+ ResourcesSplitShadeStateController()
)
shadeInteractor =
ShadeInteractor(
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 5107ecc6bc1a..20e732ad5296 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
@@ -16,12 +16,9 @@
package com.android.systemui.statusbar.phone;
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK;
-
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -133,7 +130,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
public void setUp() {
MockitoAnnotations.initMocks(this);
mFeatureFlags = new FakeFeatureFlags();
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
mFeatureFlags.set(ONE_WAY_HAPTICS_API_MIGRATION, false);
when(mKeyguardStateController.isShowing()).thenReturn(true);
when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
@@ -439,24 +435,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
@Test
public void onFPFailureNoHaptics_notInteractive_showLockScreen() {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
- // GIVEN no vibrator and device is not interactive
- when(mVibratorHelper.hasVibrator()).thenReturn(false);
- when(mUpdateMonitor.isDeviceInteractive()).thenReturn(false);
- when(mUpdateMonitor.isDreaming()).thenReturn(false);
-
- // WHEN FP fails
- mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT);
-
- // THEN wakeup the device
- verify(mPowerManager).wakeUp(anyLong(), anyInt(), anyString());
- }
-
- @Test
- public void onFPFailureNoHaptics_notInteractive_showLockScreen_doNotListenOccludingApps() {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
-
// GIVEN no vibrator and device is not interactive
when(mVibratorHelper.hasVibrator()).thenReturn(false);
when(mUpdateMonitor.isDeviceInteractive()).thenReturn(false);
@@ -471,8 +449,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
@Test
public void onFPFailureNoHaptics_dreaming_showLockScreen() {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
// GIVEN no vibrator and device is dreaming
when(mVibratorHelper.hasVibrator()).thenReturn(false);
when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
@@ -486,22 +462,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
}
@Test
- public void onFPFailureNoHaptics_dreaming_showLockScreen_doNotListeOccludingApps() {
- mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
-
- // GIVEN no vibrator and device is dreaming
- when(mVibratorHelper.hasVibrator()).thenReturn(false);
- when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
- when(mUpdateMonitor.isDreaming()).thenReturn(true);
-
- // WHEN FP fails
- mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT);
-
- // THEN wakeup the device
- verify(mPowerManager).wakeUp(anyLong(), anyInt(), anyString());
- }
-
- @Test
public void onSideFingerprintSuccess_recentPowerButtonPress_noHaptic() {
// GIVEN side fingerprint enrolled, last wake reason was power button
when(mAuthController.isSfpsEnrolled(anyInt())).thenReturn(true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
index 4349d738b0f3..3a629e642d3d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
@@ -104,6 +104,21 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
}
@Test
+ fun onViewAttachedAndDrawn_startListeningConfigurationControllerCallback() {
+ val view = createViewMock()
+ val argumentCaptor = ArgumentCaptor.forClass(
+ ConfigurationController.ConfigurationListener::class.java)
+ InstrumentationRegistry.getInstrumentation().runOnMainSync {
+ controller = createAndInitController(view)
+ }
+
+ verify(configurationController).addCallback(argumentCaptor.capture())
+ argumentCaptor.value.onDensityOrFontScaleChanged()
+
+ verify(view).onDensityOrFontScaleChanged()
+ }
+
+ @Test
fun onViewAttachedAndDrawn_moveFromCenterAnimationEnabled_moveFromCenterAnimationInitialized() {
whenever(featureFlags.isEnabled(Flags.ENABLE_UNFOLD_STATUS_BAR_ANIMATIONS)).thenReturn(true)
val view = createViewMock()
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 0da736003e22..ba4e8d325abc 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
@@ -18,7 +18,6 @@ package com.android.systemui.statusbar.phone;
import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_HIDDEN;
import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_VISIBLE;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
@@ -34,7 +33,6 @@ import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-
import static kotlinx.coroutines.test.TestCoroutineDispatchersKt.StandardTestDispatcher;
import android.service.trust.TrustAgentService;
@@ -73,8 +71,9 @@ import com.android.systemui.bouncer.ui.BouncerView;
import com.android.systemui.bouncer.ui.BouncerViewDelegate;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dreams.DreamOverlayStateController;
-import com.android.systemui.flags.FeatureFlags;
+import com.android.systemui.flags.FakeFeatureFlags;
import com.android.systemui.flags.Flags;
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
import com.android.systemui.keyguard.domain.interactor.WindowManagerLockscreenVisibilityInteractor;
import com.android.systemui.navigationbar.NavigationModeController;
@@ -131,7 +130,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Mock private SysUIUnfoldComponent mSysUiUnfoldComponent;
@Mock private DreamOverlayStateController mDreamOverlayStateController;
@Mock private LatencyTracker mLatencyTracker;
- @Mock private FeatureFlags mFeatureFlags;
+ private FakeFeatureFlags mFeatureFlags;
@Mock private KeyguardSecurityModel mKeyguardSecurityModel;
@Mock private PrimaryBouncerCallbackInteractor mPrimaryBouncerCallbackInteractor;
@Mock private PrimaryBouncerInteractor mPrimaryBouncerInteractor;
@@ -171,9 +170,11 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
.thenReturn(mKeyguardMessageAreaController);
when(mBouncerView.getDelegate()).thenReturn(mBouncerViewDelegate);
when(mBouncerViewDelegate.getBackCallback()).thenReturn(mBouncerViewDelegateBackCallback);
- when(mFeatureFlags
- .isEnabled(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM))
- .thenReturn(true);
+ mFeatureFlags = new FakeFeatureFlags();
+ mFeatureFlags.set(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM, true);
+ mFeatureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false);
+ mFeatureFlags.set(Flags.UDFPS_NEW_TOUCH_DETECTION, true);
+ mFeatureFlags.set(Flags.KEYGUARD_WM_STATE_REFACTOR, false);
when(mNotificationShadeWindowController.getWindowRootView())
.thenReturn(mNotificationShadeWindowView);
@@ -208,7 +209,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
mActivityStarter,
mock(KeyguardTransitionInteractor.class),
StandardTestDispatcher(null, null),
- () -> mock(WindowManagerLockscreenVisibilityInteractor.class)) {
+ () -> mock(WindowManagerLockscreenVisibilityInteractor.class),
+ () -> mock(KeyguardDismissActionInteractor.class)) {
@Override
public ViewRootImpl getViewRootImpl() {
return mViewRootImpl;
@@ -266,7 +268,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Test
public void onPanelExpansionChanged_neverShowsDuringHintAnimation() {
- when(mShadeViewController.isUnlockHintRunning()).thenReturn(true);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
verify(mPrimaryBouncerInteractor, never()).setPanelExpansion(anyFloat());
}
@@ -711,7 +712,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
mActivityStarter,
mock(KeyguardTransitionInteractor.class),
StandardTestDispatcher(null, null),
- () -> mock(WindowManagerLockscreenVisibilityInteractor.class)) {
+ () -> mock(WindowManagerLockscreenVisibilityInteractor.class),
+ () -> mock(KeyguardDismissActionInteractor.class)) {
@Override
public ViewRootImpl getViewRootImpl() {
return mViewRootImpl;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
index 34c4ac1f4b67..233f407813b2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
@@ -15,7 +15,6 @@
package com.android.systemui.statusbar.phone;
import static android.view.Display.DEFAULT_DISPLAY;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
@@ -54,8 +53,8 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
import com.android.systemui.statusbar.notification.domain.interactor.NotificationsInteractor;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor;
+import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
@@ -72,8 +71,8 @@ import org.mockito.ArgumentCaptor;
@RunWithLooper()
public class StatusBarNotificationPresenterTest extends SysuiTestCase {
private StatusBarNotificationPresenter mStatusBarNotificationPresenter;
- private final NotificationInterruptStateProvider mNotificationInterruptStateProvider =
- mock(NotificationInterruptStateProvider.class);
+ private final VisualInterruptionDecisionProvider mVisualInterruptionDecisionProvider =
+ mock(VisualInterruptionDecisionProvider.class);
private NotificationInterruptSuppressor mInterruptSuppressor;
private CommandQueue mCommandQueue;
private FakeMetricsLogger mMetricsLogger;
@@ -125,14 +124,14 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
mock(NotificationMediaManager.class),
mock(NotificationGutsManager.class),
mInitController,
- mNotificationInterruptStateProvider,
+ mVisualInterruptionDecisionProvider,
mock(NotificationRemoteInputManager.class),
mock(NotificationRemoteInputManager.Callback.class),
mock(NotificationListContainer.class));
mInitController.executePostInitTasks();
ArgumentCaptor<NotificationInterruptSuppressor> suppressorCaptor =
ArgumentCaptor.forClass(NotificationInterruptSuppressor.class);
- verify(mNotificationInterruptStateProvider).addSuppressor(suppressorCaptor.capture());
+ verify(mVisualInterruptionDecisionProvider).addLegacySuppressor(suppressorCaptor.capture());
mInterruptSuppressor = suppressorCaptor.getValue();
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
index 3af960b74a5f..8ef82c9fe7bc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
@@ -19,8 +19,13 @@ package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
+import android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WLAN
+import android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN
import android.telephony.CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL
import android.telephony.NetworkRegistrationInfo
+import android.telephony.NetworkRegistrationInfo.DOMAIN_PS
+import android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
+import android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_HOME
import android.telephony.ServiceState
import android.telephony.ServiceState.STATE_IN_SERVICE
import android.telephony.ServiceState.STATE_OUT_OF_SERVICE
@@ -80,7 +85,6 @@ import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityMod
import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
-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
@@ -801,11 +805,18 @@ class MobileConnectionRepositoryTest : SysuiTestCase() {
var latest: Boolean? = null
val job = underTest.isInService.onEach { latest = it }.launchIn(this)
+ val nriInService =
+ NetworkRegistrationInfo.Builder()
+ .setDomain(DOMAIN_PS)
+ .setTransportType(TRANSPORT_TYPE_WWAN)
+ .setRegistrationState(REGISTRATION_STATE_HOME)
+ .build()
+
getTelephonyCallbackForType<ServiceStateListener>()
.onServiceStateChanged(
ServiceState().also {
it.voiceRegState = STATE_IN_SERVICE
- it.dataRegState = STATE_IN_SERVICE
+ it.addNetworkRegistrationInfo(nriInService)
}
)
@@ -814,17 +825,23 @@ class MobileConnectionRepositoryTest : SysuiTestCase() {
getTelephonyCallbackForType<ServiceStateListener>()
.onServiceStateChanged(
ServiceState().also {
- it.dataRegState = STATE_IN_SERVICE
it.voiceRegState = STATE_OUT_OF_SERVICE
+ it.addNetworkRegistrationInfo(nriInService)
}
)
assertThat(latest).isTrue()
+ val nriNotInService =
+ NetworkRegistrationInfo.Builder()
+ .setDomain(DOMAIN_PS)
+ .setTransportType(TRANSPORT_TYPE_WWAN)
+ .setRegistrationState(REGISTRATION_STATE_DENIED)
+ .build()
getTelephonyCallbackForType<ServiceStateListener>()
.onServiceStateChanged(
ServiceState().also {
it.voiceRegState = STATE_OUT_OF_SERVICE
- it.dataRegState = STATE_OUT_OF_SERVICE
+ it.addNetworkRegistrationInfo(nriNotInService)
}
)
assertThat(latest).isFalse()
@@ -838,18 +855,17 @@ class MobileConnectionRepositoryTest : SysuiTestCase() {
var latest: Boolean? = null
val job = underTest.isInService.onEach { latest = it }.launchIn(this)
- // Mock the service state here so we can make it specifically IWLAN
- val serviceState: ServiceState = mock()
- whenever(serviceState.state).thenReturn(STATE_OUT_OF_SERVICE)
- whenever(serviceState.dataRegistrationState).thenReturn(STATE_IN_SERVICE)
-
- // See [com.android.settingslib.Utils.isInService] for more info. This is one way to
- // make the network look like IWLAN
- val networkRegWlan: NetworkRegistrationInfo = mock()
- whenever(serviceState.getNetworkRegistrationInfo(any(), any()))
- .thenReturn(networkRegWlan)
- whenever(networkRegWlan.registrationState)
- .thenReturn(NetworkRegistrationInfo.REGISTRATION_STATE_HOME)
+ val iwlanData =
+ NetworkRegistrationInfo.Builder()
+ .setDomain(DOMAIN_PS)
+ .setTransportType(TRANSPORT_TYPE_WLAN)
+ .setRegistrationState(REGISTRATION_STATE_HOME)
+ .build()
+ val serviceState =
+ ServiceState().also {
+ it.voiceRegState = STATE_OUT_OF_SERVICE
+ it.addNetworkRegistrationInfo(iwlanData)
+ }
getTelephonyCallbackForType<ServiceStateListener>().onServiceStateChanged(serviceState)
assertThat(latest).isFalse()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
index a0d4d1390b2c..bbf048d6697f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
@@ -22,6 +22,7 @@ import android.testing.TestableLooper
import android.testing.TestableLooper.RunWithLooper
import android.testing.ViewUtils
import android.view.View
+import android.view.ViewGroup
import android.widget.ImageView
import androidx.test.filters.SmallTest
import com.android.systemui.R
@@ -138,7 +139,7 @@ class ModernStatusBarWifiViewTest : SysuiTestCase() {
ViewUtils.attachView(view)
testableLooper.processAllMessages()
- assertThat(view.getIconGroupView().visibility).isEqualTo(View.GONE)
+ assertThat(view.getIconGroupView().visibility).isEqualTo(View.INVISIBLE)
assertThat(view.getDotView().visibility).isEqualTo(View.VISIBLE)
ViewUtils.detachView(view)
@@ -153,8 +154,36 @@ class ModernStatusBarWifiViewTest : SysuiTestCase() {
ViewUtils.attachView(view)
testableLooper.processAllMessages()
- assertThat(view.getIconGroupView().visibility).isEqualTo(View.GONE)
- assertThat(view.getDotView().visibility).isEqualTo(View.GONE)
+ assertThat(view.getIconGroupView().visibility).isEqualTo(View.INVISIBLE)
+ assertThat(view.getDotView().visibility).isEqualTo(View.INVISIBLE)
+
+ ViewUtils.detachView(view)
+ }
+
+ /* Regression test for b/296864006. When STATE_HIDDEN we need to ensure the wifi view width
+ * would not break the StatusIconContainer translation calculation. */
+ @Test
+ fun setVisibleState_hidden_keepWidth() {
+ val view = ModernStatusBarWifiView.constructAndBind(context, SLOT_NAME, viewModel)
+
+ view.setVisibleState(STATE_ICON, /* animate= */ false)
+
+ // get the view width when it's in visible state
+ ViewUtils.attachView(view)
+ val lp = view.layoutParams
+ lp.width = ViewGroup.LayoutParams.WRAP_CONTENT
+ lp.height = ViewGroup.LayoutParams.WRAP_CONTENT
+ view.layoutParams = lp
+ testableLooper.processAllMessages()
+ val currentWidth = view.width
+
+ view.setVisibleState(STATE_HIDDEN, /* animate= */ false)
+ testableLooper.processAllMessages()
+
+ // the view width when STATE_HIDDEN should be at least the width when STATE_ICON. Because
+ // when STATE_HIDDEN the invisible dot view width might be larger than group view width,
+ // then the wifi view width would be enlarged.
+ assertThat(view.width).isAtLeast(currentWidth)
ViewUtils.detachView(view)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
index cdeb59278851..58d93c98f015 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
@@ -17,12 +17,10 @@
package com.android.systemui.statusbar.policy;
import static android.os.BatteryManager.EXTRA_PRESENT;
-
import static com.android.dx.mockito.inline.extended.ExtendedMockito.inOrder;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.staticMockMarker;
import static com.android.settingslib.fuelgauge.BatterySaverLogging.SAVER_ENABLED_QS;
-
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -91,6 +89,7 @@ public class BatteryControllerTest extends SysuiTestCase {
mBroadcastDispatcher,
mDemoModeController,
mock(DumpManager.class),
+ mock(BatteryControllerLogger.class),
new Handler(),
new Handler());
// Can throw if updateEstimate is called on the main thread
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
index 243f881f9357..e76163575738 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
@@ -46,8 +46,6 @@ import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.bluetooth.BluetoothLogger;
import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.policy.bluetooth.BluetoothRepository;
import com.android.systemui.statusbar.policy.bluetooth.FakeBluetoothRepository;
@@ -75,8 +73,6 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
private DumpManager mMockDumpManager;
private BluetoothControllerImpl mBluetoothControllerImpl;
private BluetoothAdapter mMockAdapter;
- private final FakeFeatureFlags mFakeFeatureFlags = new FakeFeatureFlags();
-
private List<CachedBluetoothDevice> mDevices;
@Before
@@ -98,11 +94,9 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
BluetoothRepository bluetoothRepository =
new FakeBluetoothRepository(mMockBluetoothManager);
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
mBluetoothControllerImpl = new BluetoothControllerImpl(
mContext,
- mFakeFeatureFlags,
mUserTracker,
mMockDumpManager,
mock(BluetoothLogger.class),
@@ -111,27 +105,8 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
mMockBluetoothManager,
mMockAdapter);
}
-
@Test
- public void testNoConnectionWithDevices_repoFlagOff() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
- CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
- when(device.isConnected()).thenReturn(true);
- when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
- mDevices.add(device);
- when(mMockLocalAdapter.getConnectionState())
- .thenReturn(BluetoothAdapter.STATE_DISCONNECTED);
-
- mBluetoothControllerImpl.onConnectionStateChanged(null,
- BluetoothAdapter.STATE_DISCONNECTED);
- assertTrue(mBluetoothControllerImpl.isBluetoothConnected());
- }
-
- @Test
- public void testNoConnectionWithDevices_repoFlagOn() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+ public void testNoConnectionWithDevices() {
CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
when(device.isConnected()).thenReturn(true);
when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
@@ -147,9 +122,7 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
}
@Test
- public void testOnServiceConnected_updatesConnectionState_repoFlagOff() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
+ public void testOnServiceConnected_updatesConnectionState() {
when(mMockLocalAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING);
mBluetoothControllerImpl.onServiceConnected();
@@ -159,41 +132,7 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
}
@Test
- public void testOnServiceConnected_updatesConnectionState_repoFlagOn() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
- when(mMockLocalAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING);
-
- mBluetoothControllerImpl.onServiceConnected();
-
- assertTrue(mBluetoothControllerImpl.isBluetoothConnecting());
- assertFalse(mBluetoothControllerImpl.isBluetoothConnected());
- }
-
- @Test
- public void getConnectedDevices_onlyReturnsConnected_repoFlagOff() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
- CachedBluetoothDevice device1Disconnected = mock(CachedBluetoothDevice.class);
- when(device1Disconnected.isConnected()).thenReturn(false);
- mDevices.add(device1Disconnected);
-
- CachedBluetoothDevice device2Connected = mock(CachedBluetoothDevice.class);
- when(device2Connected.isConnected()).thenReturn(true);
- mDevices.add(device2Connected);
-
- mBluetoothControllerImpl.onDeviceAdded(device1Disconnected);
- mBluetoothControllerImpl.onDeviceAdded(device2Connected);
-
- assertThat(mBluetoothControllerImpl.getConnectedDevices()).hasSize(1);
- assertThat(mBluetoothControllerImpl.getConnectedDevices().get(0))
- .isEqualTo(device2Connected);
- }
-
- @Test
- public void getConnectedDevices_onlyReturnsConnected_repoFlagOn() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+ public void getConnectedDevices_onlyReturnsConnected() {
CachedBluetoothDevice device1Disconnected = mock(CachedBluetoothDevice.class);
when(device1Disconnected.isConnected()).thenReturn(false);
mDevices.add(device1Disconnected);
@@ -235,31 +174,7 @@ public class BluetoothControllerImplTest extends SysuiTestCase {
}
@Test
- public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection_repoFlagOff() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
- BluetoothController.Callback callback = mock(BluetoothController.Callback.class);
- mBluetoothControllerImpl.addCallback(callback);
-
- assertFalse(mBluetoothControllerImpl.isBluetoothConnected());
- CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
- mDevices.add(device);
- when(device.isConnected()).thenReturn(true);
- when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
- reset(callback);
- mBluetoothControllerImpl.onAclConnectionStateChanged(device,
- BluetoothProfile.STATE_CONNECTED);
-
- mTestableLooper.processAllMessages();
-
- assertTrue(mBluetoothControllerImpl.isBluetoothConnected());
- verify(callback, atLeastOnce()).onBluetoothStateChange(anyBoolean());
- }
-
- @Test
- public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection_repoFlagOn() {
- mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+ public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection() {
BluetoothController.Callback callback = mock(BluetoothController.Callback.class);
mBluetoothControllerImpl.addCallback(callback);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
index 1ab0582a6c5b..cfb48a8f6995 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
@@ -49,7 +49,9 @@ class RemoteInputQuickSettingsDisablerTest : SysuiTestCase() {
remoteInputQuickSettingsDisabler = RemoteInputQuickSettingsDisabler(
mContext,
- commandQueue, Mockito.mock(ConfigurationController::class.java)
+ commandQueue,
+ ResourcesSplitShadeStateController(),
+ Mockito.mock(ConfigurationController::class.java),
)
configuration = Configuration(mContext.resources.configuration)
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 65cac6efad1c..3152fd14bf48 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
@@ -44,6 +44,7 @@ import android.media.AudioManager;
import android.os.SystemClock;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
+import android.util.Log;
import android.view.Gravity;
import android.view.InputDevice;
import android.view.MotionEvent;
@@ -98,6 +99,8 @@ public class VolumeDialogImplTest extends SysuiTestCase {
private ConfigurationController mConfigurationController;
private int mOriginalOrientation;
+ private static final String TAG = "VolumeDialogImplTest";
+
@Mock
VolumeDialogController mVolumeDialogController;
@Mock
@@ -674,12 +677,20 @@ public class VolumeDialogImplTest extends SysuiTestCase {
@After
public void teardown() {
+ // Detailed logs to track down timeout issues in b/299491332
+ Log.d(TAG, "teardown: entered");
setOrientation(mOriginalOrientation);
+ Log.d(TAG, "teardown: after setOrientation");
mAnimatorTestRule.advanceTimeBy(mLongestHideShowAnimationDuration);
+ Log.d(TAG, "teardown: after advanceTimeBy");
mTestableLooper.moveTimeForward(mLongestHideShowAnimationDuration);
+ Log.d(TAG, "teardown: after moveTimeForward");
mTestableLooper.processAllMessages();
+ Log.d(TAG, "teardown: after processAllMessages");
reset(mPostureController);
+ Log.d(TAG, "teardown: after reset");
cleanUp(mDialog);
+ Log.d(TAG, "teardown: after cleanUp");
}
private void cleanUp(VolumeDialogImpl dialog) {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
index 7c98df6c6317..f2e45281da93 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
@@ -51,6 +51,8 @@ class FakeAuthenticationRepository(
override val authenticationMethod: StateFlow<AuthenticationMethodModel> =
_authenticationMethod.asStateFlow()
+ override val minPatternLength: Int = 4
+
private var isLockscreenEnabled = true
private var failedAttemptCount = 0
private var throttlingEndTimestamp = 0L
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt
index fd9139165c85..60291eece70b 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt
@@ -17,15 +17,23 @@
package com.android.systemui.biometrics.data.repository
+import com.android.systemui.biometrics.shared.model.DisplayRotation
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
-class FakeRearDisplayStateRepository : RearDisplayStateRepository {
+class FakeDisplayStateRepository : DisplayStateRepository {
private val _isInRearDisplayMode = MutableStateFlow<Boolean>(false)
override val isInRearDisplayMode: StateFlow<Boolean> = _isInRearDisplayMode.asStateFlow()
+ private val _currentRotation = MutableStateFlow<DisplayRotation>(DisplayRotation.ROTATION_0)
+ override val currentRotation: StateFlow<DisplayRotation> = _currentRotation.asStateFlow()
+
fun setIsInRearDisplayMode(isInRearDisplayMode: Boolean) {
_isInRearDisplayMode.value = isInRearDisplayMode
}
+
+ fun setCurrentRotation(currentRotation: DisplayRotation) {
+ _currentRotation.value = currentRotation
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
index 0847c8535e4e..b45c198b5515 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
@@ -2,11 +2,14 @@ package com.android.systemui.bouncer.data.repository
import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants
import com.android.systemui.bouncer.shared.model.BouncerShowMessageModel
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.asStateFlow
-/** Fake implementation of [KeyguardRepository] */
+/** Fake implementation of [KeyguardBouncerRepository] */
class FakeKeyguardBouncerRepository : KeyguardBouncerRepository {
private val _primaryBouncerShow = MutableStateFlow(false)
override val primaryBouncerShow = _primaryBouncerShow.asStateFlow()
@@ -26,7 +29,13 @@ class FakeKeyguardBouncerRepository : KeyguardBouncerRepository {
private val _isBackButtonEnabled = MutableStateFlow<Boolean?>(null)
override val isBackButtonEnabled = _isBackButtonEnabled.asStateFlow()
private val _keyguardAuthenticated = MutableStateFlow<Boolean?>(null)
- override val keyguardAuthenticated = _keyguardAuthenticated.asStateFlow()
+ override val keyguardAuthenticatedBiometrics = _keyguardAuthenticated.asStateFlow()
+ private val _keyguardAuthenticatedPrimaryAuth = MutableSharedFlow<Int>()
+ override val keyguardAuthenticatedPrimaryAuth: Flow<Int> =
+ _keyguardAuthenticatedPrimaryAuth.asSharedFlow()
+ private val _userRequestedBouncerWhenAlreadyAuthenticated = MutableSharedFlow<Int>()
+ override val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+ _userRequestedBouncerWhenAlreadyAuthenticated.asSharedFlow()
private val _showMessage = MutableStateFlow<BouncerShowMessageModel?>(null)
override val showMessage = _showMessage.asStateFlow()
private val _resourceUpdateRequests = MutableStateFlow(false)
@@ -83,10 +92,18 @@ class FakeKeyguardBouncerRepository : KeyguardBouncerRepository {
_showMessage.value = bouncerShowMessageModel
}
- override fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?) {
+ override fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticated: Boolean?) {
_keyguardAuthenticated.value = keyguardAuthenticated
}
+ override suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+ _keyguardAuthenticatedPrimaryAuth.emit(userId)
+ }
+
+ override suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+ _userRequestedBouncerWhenAlreadyAuthenticated.emit(userId)
+ }
+
override fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean) {
_isBackButtonEnabled.value = isBackButtonEnabled
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
index 2ac625d68bfe..5cd09d8df429 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
@@ -22,11 +22,19 @@ import kotlinx.coroutines.flow.MutableSharedFlow
import org.mockito.Mockito.`when` as whenever
/** Creates a mock display. */
-fun display(type: Int, flags: Int = 0, id: Int = 0): Display {
+fun display(
+ type: Int,
+ flags: Int = 0,
+ id: Int = 0,
+ state: Int? = null,
+): Display {
return mock {
whenever(this.displayId).thenReturn(id)
whenever(this.type).thenReturn(type)
whenever(this.flags).thenReturn(flags)
+ if (state != null) {
+ whenever(this.state).thenReturn(state)
+ }
}
}
@@ -35,7 +43,7 @@ fun createPendingDisplay(id: Int = 0): DisplayRepository.PendingDisplay =
mock<DisplayRepository.PendingDisplay> { whenever(this.id).thenReturn(id) }
/** Fake [DisplayRepository] implementation for testing. */
-class FakeDisplayRepository : DisplayRepository {
+class FakeDisplayRepository() : DisplayRepository {
private val flow = MutableSharedFlow<Set<Display>>()
private val pendingDisplayFlow = MutableSharedFlow<DisplayRepository.PendingDisplay?>()
@@ -50,4 +58,8 @@ class FakeDisplayRepository : DisplayRepository {
override val pendingDisplay: Flow<DisplayRepository.PendingDisplay?>
get() = pendingDisplayFlow
+
+ private val _displayChangeEvent = MutableSharedFlow<Int>()
+ override val displayChangeEvent: Flow<Int> = _displayChangeEvent
+ suspend fun emitDisplayChangeEvent(displayId: Int) = _displayChangeEvent.emit(displayId)
}
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 cc0c943bdbbe..dae8644466fb 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
@@ -21,7 +21,9 @@ import android.graphics.Point
import com.android.systemui.common.shared.model.Position
import com.android.systemui.keyguard.shared.model.BiometricUnlockModel
import com.android.systemui.keyguard.shared.model.BiometricUnlockSource
+import com.android.systemui.keyguard.shared.model.DismissAction
import com.android.systemui.keyguard.shared.model.DozeTransitionModel
+import com.android.systemui.keyguard.shared.model.KeyguardDone
import com.android.systemui.keyguard.shared.model.KeyguardRootViewVisibilityState
import com.android.systemui.keyguard.shared.model.ScreenModel
import com.android.systemui.keyguard.shared.model.ScreenState
@@ -30,12 +32,18 @@ import com.android.systemui.keyguard.shared.model.WakeSleepReason
import com.android.systemui.keyguard.shared.model.WakefulnessModel
import com.android.systemui.keyguard.shared.model.WakefulnessState
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
/** Fake implementation of [KeyguardRepository] */
class FakeKeyguardRepository : KeyguardRepository {
+ private val _deferKeyguardDone: MutableSharedFlow<KeyguardDone> = MutableSharedFlow()
+ override val keyguardDone: Flow<KeyguardDone> = _deferKeyguardDone
+
+ private val _dismissAction = MutableStateFlow<DismissAction>(DismissAction.None)
+ override val dismissAction: StateFlow<DismissAction> = _dismissAction
private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
override val animateBottomAreaDozingTransitions: StateFlow<Boolean> =
@@ -175,6 +183,14 @@ class FakeKeyguardRepository : KeyguardRepository {
_dozeTimeTick.value = _dozeTimeTick.value + 1
}
+ override fun setDismissAction(dismissAction: DismissAction) {
+ _dismissAction.value = dismissAction
+ }
+
+ override suspend fun setKeyguardDone(timing: KeyguardDone) {
+ _deferKeyguardDone.emit(timing)
+ }
+
fun dozeTimeTick(millis: Long) {
_dozeTimeTick.value = millis
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
index 817e1db4876a..9d98f9409ed9 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
@@ -17,6 +17,8 @@
package com.android.systemui.keyguard.data.repository
+import com.android.keyguard.TrustGrantFlags
+import com.android.systemui.keyguard.shared.model.TrustModel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
@@ -35,6 +37,9 @@ class FakeTrustRepository : TrustRepository {
override val isCurrentUserTrustManaged: StateFlow<Boolean>
get() = _isCurrentUserTrustManaged
+ private val _requestDismissKeyguard = MutableStateFlow(TrustModel(false, 0, TrustGrantFlags(0)))
+ override val trustAgentRequestingToDismissKeyguard: Flow<TrustModel> = _requestDismissKeyguard
+
fun setCurrentUserTrusted(trust: Boolean) {
_isCurrentUserTrusted.value = trust
}
@@ -46,4 +51,8 @@ class FakeTrustRepository : TrustRepository {
fun setCurrentUserActiveUnlockAvailable(available: Boolean) {
_isCurrentUserActiveUnlockAvailable.value = available
}
+
+ fun setRequestDismissKeyguard(trustModel: TrustModel) {
+ _requestDismissKeyguard.value = trustModel
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt
new file mode 100644
index 000000000000..6dd41f488e2d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import android.app.ActivityManager
+import android.content.Context
+import android.os.Handler
+import android.os.UserManager
+import com.android.internal.logging.UiEventLogger
+import com.android.keyguard.KeyguardSecurityModel
+import com.android.keyguard.KeyguardUpdateMonitor
+import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerCallbackInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
+import com.android.systemui.bouncer.ui.BouncerView
+import com.android.systemui.broadcast.FakeBroadcastDispatcher
+import com.android.systemui.classifier.FalsingCollector
+import com.android.systemui.flags.FakeFeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.DismissCallbackRegistry
+import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository
+import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.FakeTrustRepository
+import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.power.data.repository.FakePowerRepository
+import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.statusbar.phone.ScreenOffAnimationController
+import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
+import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
+import com.android.systemui.user.data.repository.FakeUserRepository
+import com.android.systemui.user.domain.interactor.GuestUserInteractor
+import com.android.systemui.user.domain.interactor.HeadlessSystemUserMode
+import com.android.systemui.user.domain.interactor.RefreshUsersScheduler
+import com.android.systemui.user.domain.interactor.UserInteractor
+import com.android.systemui.util.time.FakeSystemClock
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.test.TestScope
+import org.mockito.Mockito.mock
+
+/**
+ * Helper to create a new KeyguardDismissInteractor in a way that doesn't require modifying many
+ * tests whenever we add a constructor param.
+ */
+object KeyguardDismissInteractorFactory {
+ @JvmOverloads
+ @JvmStatic
+ fun create(
+ context: Context,
+ testScope: TestScope,
+ broadcastDispatcher: FakeBroadcastDispatcher,
+ dispatcher: CoroutineDispatcher,
+ trustRepository: FakeTrustRepository = FakeTrustRepository(),
+ keyguardRepository: FakeKeyguardRepository = FakeKeyguardRepository(),
+ bouncerRepository: FakeKeyguardBouncerRepository = FakeKeyguardBouncerRepository(),
+ keyguardUpdateMonitor: KeyguardUpdateMonitor = mock(KeyguardUpdateMonitor::class.java),
+ featureFlags: FakeFeatureFlagsClassic =
+ FakeFeatureFlagsClassic().apply {
+ set(Flags.DELAY_BOUNCER, true)
+ set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, true)
+ set(Flags.FULL_SCREEN_USER_SWITCHER, false)
+ },
+ powerRepository: FakePowerRepository = FakePowerRepository(),
+ userRepository: FakeUserRepository = FakeUserRepository(),
+ ): WithDependencies {
+ val primaryBouncerInteractor =
+ PrimaryBouncerInteractor(
+ bouncerRepository,
+ mock(BouncerView::class.java),
+ mock(Handler::class.java),
+ mock(KeyguardStateController::class.java),
+ mock(KeyguardSecurityModel::class.java),
+ mock(PrimaryBouncerCallbackInteractor::class.java),
+ mock(FalsingCollector::class.java),
+ mock(DismissCallbackRegistry::class.java),
+ context,
+ keyguardUpdateMonitor,
+ trustRepository,
+ featureFlags,
+ testScope.backgroundScope,
+ )
+ val alternateBouncerInteractor =
+ AlternateBouncerInteractor(
+ mock(StatusBarStateController::class.java),
+ mock(KeyguardStateController::class.java),
+ bouncerRepository,
+ FakeBiometricSettingsRepository(),
+ FakeSystemClock(),
+ keyguardUpdateMonitor,
+ )
+ val powerInteractor =
+ PowerInteractor(
+ powerRepository,
+ keyguardRepository,
+ mock(FalsingCollector::class.java),
+ mock(ScreenOffAnimationController::class.java),
+ mock(StatusBarStateController::class.java),
+ )
+ val userInteractor =
+ UserInteractor(
+ applicationContext = context,
+ repository = userRepository,
+ mock(ActivityStarter::class.java),
+ keyguardInteractor =
+ KeyguardInteractorFactory.create(
+ repository = keyguardRepository,
+ bouncerRepository = bouncerRepository,
+ featureFlags = featureFlags,
+ )
+ .keyguardInteractor,
+ featureFlags = featureFlags,
+ manager = mock(UserManager::class.java),
+ headlessSystemUserMode = mock(HeadlessSystemUserMode::class.java),
+ applicationScope = testScope.backgroundScope,
+ telephonyInteractor =
+ TelephonyInteractor(
+ repository = FakeTelephonyRepository(),
+ ),
+ broadcastDispatcher = broadcastDispatcher,
+ keyguardUpdateMonitor = keyguardUpdateMonitor,
+ backgroundDispatcher = dispatcher,
+ activityManager = mock(ActivityManager::class.java),
+ refreshUsersScheduler = mock(RefreshUsersScheduler::class.java),
+ guestUserInteractor = mock(GuestUserInteractor::class.java),
+ uiEventLogger = mock(UiEventLogger::class.java),
+ )
+ return WithDependencies(
+ trustRepository = trustRepository,
+ keyguardRepository = keyguardRepository,
+ bouncerRepository = bouncerRepository,
+ keyguardUpdateMonitor = keyguardUpdateMonitor,
+ powerRepository = powerRepository,
+ userRepository = userRepository,
+ interactor =
+ KeyguardDismissInteractor(
+ trustRepository,
+ keyguardRepository,
+ primaryBouncerInteractor,
+ alternateBouncerInteractor,
+ powerInteractor,
+ userInteractor,
+ ),
+ )
+ }
+
+ data class WithDependencies(
+ val trustRepository: FakeTrustRepository,
+ val keyguardRepository: FakeKeyguardRepository,
+ val bouncerRepository: FakeKeyguardBouncerRepository,
+ val keyguardUpdateMonitor: KeyguardUpdateMonitor,
+ val powerRepository: FakePowerRepository,
+ val userRepository: FakeUserRepository,
+ val interactor: KeyguardDismissInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
index 2865710c2eae..aa8dbe120ca4 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
@@ -16,7 +16,6 @@
package com.android.systemui.qs.pipeline.data.repository
-import android.util.Log
import com.android.systemui.qs.pipeline.data.repository.TileSpecRepository.Companion.POSITION_AT_END
import com.android.systemui.qs.pipeline.shared.TileSpec
import kotlinx.coroutines.flow.Flow
@@ -28,7 +27,7 @@ class FakeTileSpecRepository : TileSpecRepository {
private val tilesPerUser = mutableMapOf<Int, MutableStateFlow<List<TileSpec>>>()
override fun tilesSpecs(userId: Int): Flow<List<TileSpec>> {
- return getFlow(userId).asStateFlow().also { Log.d("Fabian", "Retrieving flow for $userId") }
+ return getFlow(userId).asStateFlow()
}
override suspend fun addTile(userId: Int, tile: TileSpec, position: Int) {
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 08152a3c49cd..e72544a24740 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
@@ -40,6 +40,23 @@ class FakeShadeRepository : ShadeRepository {
@Deprecated("Use ShadeInteractor instead")
override val legacyShadeExpansion = _legacyShadeExpansion
+ private val _legacyShadeTracking = MutableStateFlow(false)
+ @Deprecated("Use ShadeInteractor instead")
+ override val legacyShadeTracking = _legacyShadeTracking
+
+ private val _legacyQsTracking = MutableStateFlow(false)
+ @Deprecated("Use ShadeInteractor instead") override val legacyQsTracking = _legacyQsTracking
+
+ @Deprecated("Should only be called by NPVC and tests")
+ override fun setLegacyQsTracking(legacyQsTracking: Boolean) {
+ _legacyQsTracking.value = legacyQsTracking
+ }
+
+ @Deprecated("Should only be called by NPVC and tests")
+ override fun setLegacyShadeTracking(tracking: Boolean) {
+ _legacyShadeTracking.value = tracking
+ }
+
fun setShadeModel(model: ShadeModel) {
_shadeModel.value = model
}
diff --git a/services/accessibility/accessibility.aconfig b/services/accessibility/accessibility.aconfig
index b5fc2b6be22d..3709f4714a4f 100644
--- a/services/accessibility/accessibility.aconfig
+++ b/services/accessibility/accessibility.aconfig
@@ -1,7 +1,22 @@
package: "com.android.server.accessibility"
+
flag {
name: "proxy_use_apps_on_virtual_device_listener"
namespace: "accessibility"
description: "Fixes race condition described in b/286587811"
bug: "286587811"
}
+
+flag {
+ name: "enable_magnification_multiple_finger_multiple_tap_gesture"
+ namespace: "accessibility"
+ description: "Whether to enable multi-finger-multi-tap gesture for magnification"
+ bug: "257274411"
+}
+
+flag {
+ name: "enable_magnification_joystick"
+ namespace: "accessibility"
+ description: "Whether to enable joystick controls for magnification"
+ bug: "297211257"
+} \ No newline at end of file
diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
index ebb127d888d3..2ca84f884f78 100644
--- a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
+++ b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
@@ -217,7 +217,8 @@ public class FullScreenMagnificationGestureHandler extends MagnificationGestureH
}
if (!activated) {
- clearAndTransitionToStateDetecting();
+ // cancel the magnification shortcut
+ mDetectingState.setShortcutTriggered(false);
}
}
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index 70382f1d5274..4488d86c60b5 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -443,7 +443,8 @@ final class SaveUi {
}
final BatchUpdates batchUpdates = pair.second;
// First apply the updates...
- final RemoteViews templateUpdates = batchUpdates.getUpdates();
+ final RemoteViews templateUpdates =
+ Helper.sanitizeRemoteView(batchUpdates.getUpdates());
if (templateUpdates != null) {
if (sDebug) Slog.d(TAG, "Applying template updates for batch update #" + i);
templateUpdates.reapply(context, customSubtitleView);
diff --git a/services/backup/java/com/android/server/backup/TransportManager.java b/services/backup/java/com/android/server/backup/TransportManager.java
index 05327dcc7903..a792db0f7c78 100644
--- a/services/backup/java/com/android/server/backup/TransportManager.java
+++ b/services/backup/java/com/android/server/backup/TransportManager.java
@@ -738,6 +738,9 @@ public class TransportManager {
try {
String transportName = transport.name();
String transportDirName = transport.transportDirName();
+ if (transportName == null || transportDirName == null) {
+ return BackupManager.ERROR_TRANSPORT_INVALID;
+ }
registerTransport(transportComponent, transport);
// If registerTransport() hasn't thrown...
Slog.d(TAG, addUserIdToLogMessage(mUserId, "Transport " + transportString
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
index 1ce7d9691fb5..ba4533960db4 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
@@ -74,6 +74,7 @@ import android.companion.IOnAssociationsChangedListener;
import android.companion.IOnMessageReceivedListener;
import android.companion.IOnTransportsChangedListener;
import android.companion.ISystemDataTransferCallback;
+import android.companion.datatransfer.PermissionSyncRequest;
import android.companion.utils.FeatureUtils;
import android.content.ComponentName;
import android.content.Context;
@@ -873,6 +874,29 @@ public class CompanionDeviceManagerService extends SystemService {
}
@Override
+ public void enablePermissionsSync(int associationId) {
+ getAssociationWithCallerChecks(associationId);
+ mSystemDataTransferProcessor.enablePermissionsSync(associationId);
+ }
+
+ @Override
+ public void disablePermissionsSync(int associationId) {
+ getAssociationWithCallerChecks(associationId);
+ mSystemDataTransferProcessor.disablePermissionsSync(associationId);
+ }
+
+ @Override
+ public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+ // TODO: temporary fix, will remove soon
+ AssociationInfo association = mAssociationStore.getAssociationById(associationId);
+ if (association == null) {
+ return null;
+ }
+ getAssociationWithCallerChecks(associationId);
+ return mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ }
+
+ @Override
@EnforcePermission(MANAGE_COMPANION_DEVICES)
public void enableSecureTransport(boolean enabled) {
enableSecureTransport_enforcePermission();
@@ -1041,7 +1065,7 @@ public class CompanionDeviceManagerService extends SystemService {
String[] args, ShellCallback callback, ResultReceiver resultReceiver)
throws RemoteException {
new CompanionDeviceShellCommand(CompanionDeviceManagerService.this, mAssociationStore,
- mDevicePresenceMonitor, mTransportManager, mSystemDataTransferRequestStore,
+ mDevicePresenceMonitor, mTransportManager, mSystemDataTransferProcessor,
mAssociationRequestsProcessor)
.exec(this, in, out, err, args, callback, resultReceiver);
}
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
index d368b8626e2e..1f6261383961 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
@@ -27,7 +27,7 @@ import android.os.Binder;
import android.os.ShellCommand;
import android.util.proto.ProtoOutputStream;
-import com.android.server.companion.datatransfer.SystemDataTransferRequestStore;
+import com.android.server.companion.datatransfer.SystemDataTransferProcessor;
import com.android.server.companion.datatransfer.contextsync.BitmapUtils;
import com.android.server.companion.datatransfer.contextsync.CrossDeviceSyncController;
import com.android.server.companion.presence.CompanionDevicePresenceMonitor;
@@ -44,20 +44,20 @@ class CompanionDeviceShellCommand extends ShellCommand {
private final CompanionDevicePresenceMonitor mDevicePresenceMonitor;
private final CompanionTransportManager mTransportManager;
- private final SystemDataTransferRequestStore mSystemDataTransferRequestStore;
+ private final SystemDataTransferProcessor mSystemDataTransferProcessor;
private final AssociationRequestsProcessor mAssociationRequestsProcessor;
CompanionDeviceShellCommand(CompanionDeviceManagerService service,
AssociationStoreImpl associationStore,
CompanionDevicePresenceMonitor devicePresenceMonitor,
CompanionTransportManager transportManager,
- SystemDataTransferRequestStore systemDataTransferRequestStore,
+ SystemDataTransferProcessor systemDataTransferProcessor,
AssociationRequestsProcessor associationRequestsProcessor) {
mService = service;
mAssociationStore = associationStore;
mDevicePresenceMonitor = devicePresenceMonitor;
mTransportManager = transportManager;
- mSystemDataTransferRequestStore = systemDataTransferRequestStore;
+ mSystemDataTransferProcessor = systemDataTransferProcessor;
mAssociationRequestsProcessor = associationRequestsProcessor;
}
@@ -261,16 +261,47 @@ class CompanionDeviceShellCommand extends ShellCommand {
break;
}
- case "allow-permission-sync": {
- int userId = getNextIntArgRequired();
+ case "get-perm-sync-state": {
associationId = getNextIntArgRequired();
- boolean enabled = getNextBooleanArgRequired();
- PermissionSyncRequest request = new PermissionSyncRequest(associationId);
- request.setUserId(userId);
- request.setUserConsented(enabled);
- mSystemDataTransferRequestStore.writeRequest(userId, request);
+ PermissionSyncRequest request =
+ mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.println((request == null ? "null" : request.isUserConsented()));
+ break;
+ }
+
+ case "remove-perm-sync-state": {
+ associationId = getNextIntArgRequired();
+ PermissionSyncRequest request =
+ mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.print((request == null ? "null" : request.isUserConsented()));
+ mSystemDataTransferProcessor.removePermissionSyncRequest(associationId);
+ request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ // should print " -> null"
+ out.println(" -> " + (request == null ? "null" : request.isUserConsented()));
+ break;
+ }
+
+ case "enable-perm-sync": {
+ associationId = getNextIntArgRequired();
+ PermissionSyncRequest request =
+ mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.print((request == null ? "null" : request.isUserConsented()));
+ mSystemDataTransferProcessor.enablePermissionsSync(associationId);
+ request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.println(" -> " + request.isUserConsented()); // should print " -> true"
+ break;
+ }
+
+ case "disable-perm-sync": {
+ associationId = getNextIntArgRequired();
+ PermissionSyncRequest request =
+ mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.print((request == null ? "null" : request.isUserConsented()));
+ mSystemDataTransferProcessor.disablePermissionsSync(associationId);
+ request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+ out.println(" -> " + request.isUserConsented()); // should print " -> false"
+ break;
}
- break;
default:
return handleDefaultCommands(cmd);
@@ -346,5 +377,14 @@ class CompanionDeviceShellCommand extends ShellCommand {
pw.println(" create-emulated-transport <ASSOCIATION_ID>");
pw.println(" Create an EmulatedTransport for testing purposes only");
+
+ pw.println(" enable-perm-sync <ASSOCIATION_ID>");
+ pw.println(" Enable perm sync for the association.");
+ pw.println(" disable-perm-sync <ASSOCIATION_ID>");
+ pw.println(" Disable perm sync for the association.");
+ pw.println(" get-perm-sync-state <ASSOCIATION_ID>");
+ pw.println(" Get perm sync state for the association.");
+ pw.println(" remove-perm-sync-state <ASSOCIATION_ID>");
+ pw.println(" Remove perm sync state for the association.");
}
}
diff --git a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
index 13f41ed2ebb1..e5c847acad6e 100644
--- a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
+++ b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
@@ -139,6 +139,13 @@ public class SystemDataTransferProcessor {
@UserIdInt int userId, int associationId) {
if (PackageUtils.isPackageAllowlisted(mContext, mPackageManager, packageName)) {
Slog.i(LOG_TAG, "User consent Intent should be skipped. Returning null.");
+ // Auto enable perm sync for the allowlisted packages, but don't override user decision
+ PermissionSyncRequest request = getPermissionSyncRequest(associationId);
+ if (request == null) {
+ PermissionSyncRequest newRequest = new PermissionSyncRequest(associationId);
+ newRequest.setUserConsented(true);
+ mSystemDataTransferRequestStore.writeRequest(userId, newRequest);
+ }
return null;
}
@@ -185,29 +192,17 @@ public class SystemDataTransferProcessor {
final AssociationInfo association = resolveAssociation(packageName, userId, associationId);
// Check if the request has been consented by the user.
- if (PackageUtils.isPackageAllowlisted(mContext, mPackageManager, packageName)) {
- Slog.i(LOG_TAG, "Skip user consent check due to the same OEM package.");
- } else {
- List<SystemDataTransferRequest> storedRequests =
- mSystemDataTransferRequestStore.readRequestsByAssociationId(userId,
- associationId);
- boolean hasConsented = false;
- for (SystemDataTransferRequest storedRequest : storedRequests) {
- if (storedRequest instanceof PermissionSyncRequest
- && storedRequest.isUserConsented()) {
- hasConsented = true;
- break;
- }
- }
- if (!hasConsented) {
- String message = "User " + userId + " hasn't consented permission sync.";
- Slog.e(LOG_TAG, message);
- try {
- callback.onError(message);
- } catch (RemoteException ignored) {
- }
- return;
+ PermissionSyncRequest request = getPermissionSyncRequest(associationId);
+ if (request == null || !request.isUserConsented()) {
+ String message =
+ "User " + userId + " hasn't consented permission sync for associationId ["
+ + associationId + ".";
+ Slog.e(LOG_TAG, message);
+ try {
+ callback.onError(message);
+ } catch (RemoteException ignored) {
}
+ return;
}
// Start permission sync
@@ -225,6 +220,71 @@ public class SystemDataTransferProcessor {
}
}
+ /**
+ * Enable perm sync for the association
+ */
+ public void enablePermissionsSync(int associationId) {
+ final long callingIdentityToken = Binder.clearCallingIdentity();
+ try {
+ int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+ PermissionSyncRequest request = new PermissionSyncRequest(associationId);
+ request.setUserConsented(true);
+ mSystemDataTransferRequestStore.writeRequest(userId, request);
+ } finally {
+ Binder.restoreCallingIdentity(callingIdentityToken);
+ }
+ }
+
+ /**
+ * Disable perm sync for the association
+ */
+ public void disablePermissionsSync(int associationId) {
+ final long callingIdentityToken = Binder.clearCallingIdentity();
+ try {
+ int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+ PermissionSyncRequest request = new PermissionSyncRequest(associationId);
+ request.setUserConsented(false);
+ mSystemDataTransferRequestStore.writeRequest(userId, request);
+ } finally {
+ Binder.restoreCallingIdentity(callingIdentityToken);
+ }
+ }
+
+ /**
+ * Get perm sync request for the association.
+ */
+ @Nullable
+ public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+ final long callingIdentityToken = Binder.clearCallingIdentity();
+ try {
+ int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+ List<SystemDataTransferRequest> requests =
+ mSystemDataTransferRequestStore.readRequestsByAssociationId(userId,
+ associationId);
+ for (SystemDataTransferRequest request : requests) {
+ if (request instanceof PermissionSyncRequest) {
+ return (PermissionSyncRequest) request;
+ }
+ }
+ return null;
+ } finally {
+ Binder.restoreCallingIdentity(callingIdentityToken);
+ }
+ }
+
+ /**
+ * Remove perm sync request for the association.
+ */
+ public void removePermissionSyncRequest(int associationId) {
+ final long callingIdentityToken = Binder.clearCallingIdentity();
+ try {
+ int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+ mSystemDataTransferRequestStore.removeRequestsByAssociationId(userId, associationId);
+ } finally {
+ Binder.restoreCallingIdentity(callingIdentityToken);
+ }
+ }
+
private void onReceivePermissionRestore(byte[] message) {
Slog.i(LOG_TAG, "Applying permissions.");
// Start applying permissions
diff --git a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
index 720cefa11d7c..9f489e8d613a 100644
--- a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
+++ b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
@@ -104,7 +104,7 @@ public class SystemDataTransferRequestStore {
}
@NonNull
- List<SystemDataTransferRequest> readRequestsByAssociationId(@UserIdInt int userId,
+ public List<SystemDataTransferRequest> readRequestsByAssociationId(@UserIdInt int userId,
int associationId) {
List<SystemDataTransferRequest> cachedRequests;
synchronized (mLock) {
diff --git a/services/core/Android.bp b/services/core/Android.bp
index b941aaf32853..d9c269410b93 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -192,8 +192,8 @@ java_library_static {
"apache-commons-math",
"power_optimization_flags_lib",
"notification_flags_lib",
- "pm_flags_lib",
"camera_platform_flags_core_java_lib",
+ "biometrics_flags_lib",
],
javac_shard_size: 50,
javacflags: [
diff --git a/services/core/java/com/android/server/SmartStorageMaintIdler.java b/services/core/java/com/android/server/SmartStorageMaintIdler.java
index 899692611086..44f1e76f7a22 100644
--- a/services/core/java/com/android/server/SmartStorageMaintIdler.java
+++ b/services/core/java/com/android/server/SmartStorageMaintIdler.java
@@ -25,6 +25,7 @@ import android.content.Context;
import android.util.Slog;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
public class SmartStorageMaintIdler extends JobService {
private static final String TAG = "SmartStorageMaintIdler";
@@ -34,15 +35,15 @@ public class SmartStorageMaintIdler extends JobService {
private static final int SMART_MAINT_JOB_ID = 2808;
- private boolean mStarted;
+ private final AtomicBoolean mStarted = new AtomicBoolean(false);
private JobParameters mJobParams;
private final Runnable mFinishCallback = new Runnable() {
@Override
public void run() {
Slog.i(TAG, "Got smart storage maintenance service completion callback");
- if (mStarted) {
+ if (mStarted.get()) {
jobFinished(mJobParams, false);
- mStarted = false;
+ mStarted.set(false);
}
// ... and try again in a next period
scheduleSmartIdlePass(SmartStorageMaintIdler.this,
@@ -52,18 +53,26 @@ public class SmartStorageMaintIdler extends JobService {
@Override
public boolean onStartJob(JobParameters params) {
- mJobParams = params;
- StorageManagerService ms = StorageManagerService.sSelf;
- if (ms != null) {
- mStarted = true;
- ms.runSmartIdleMaint(mFinishCallback);
+ final StorageManagerService ms = StorageManagerService.sSelf;
+ if (mStarted.compareAndSet(false, true)) {
+ new Thread() {
+ public void run() {
+ mJobParams = params;
+ if (ms != null) {
+ ms.runSmartIdleMaint(mFinishCallback);
+ } else {
+ mStarted.set(false);
+ }
+ }
+ }.start();
+ return ms != null;
}
- return ms != null;
+ return false;
}
@Override
public boolean onStopJob(JobParameters params) {
- mStarted = false;
+ mStarted.set(false);
return false;
}
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index a78764456d8b..25ca509cb949 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -2842,7 +2842,7 @@ class StorageManagerService extends IStorageManager.Stub
return true;
}
- void runSmartIdleMaint(Runnable callback) {
+ synchronized void runSmartIdleMaint(Runnable callback) {
enforcePermission(android.Manifest.permission.MOUNT_FORMAT_FILESYSTEMS);
try {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index b5911f69b156..ba1f84aadb83 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -9851,6 +9851,10 @@ public class ActivityManagerService extends IActivityManager.Stub
PriorityDump.dump(mPriorityDumper, fd, pw, args);
}
+ private static final String TICK =
+ "---------------------------------------"
+ + "----------------------------------------";
+
private void dumpEverything(FileDescriptor fd, PrintWriter pw, String[] args, int opti,
boolean dumpAll, String dumpPackage, int displayIdFilter, boolean dumpClient,
boolean dumpNormalPriority, int dumpAppId, boolean dumpProxies) {
@@ -9906,6 +9910,11 @@ public class ActivityManagerService extends IActivityManager.Stub
sdumper.dumpLocked();
}
}
+
+ // No need to hold the lock.
+ pw.println(TICK);
+ AnrTimer.dump(pw, false);
+
// We drop the lock here because we can't call dumpWithClient() with the lock held;
// if the caller wants a consistent state for the !dumpClient case, it can call this
// method with the lock held.
@@ -10351,6 +10360,8 @@ public class ActivityManagerService extends IActivityManager.Stub
mOomAdjuster.dumpCachedAppOptimizerSettings(pw);
mOomAdjuster.dumpCacheOomRankerSettings(pw);
}
+ } else if ("timers".equals(cmd)) {
+ AnrTimer.dump(pw, true);
} else if ("services".equals(cmd) || "s".equals(cmd)) {
if (dumpClient) {
ActiveServices.ServiceDumper dumper;
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 942d35a1d842..a057f32386f6 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -4095,6 +4095,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
pw.println(" lru: raw LRU process list");
pw.println(" binder-proxies: stats on binder objects and IPCs");
pw.println(" settings: currently applied config settings");
+ pw.println(" timers: the current ANR timer state");
pw.println(" service [COMP_SPEC]: service client-side state");
pw.println(" package [PACKAGE_NAME]: all state related to given package");
pw.println(" all: dump all activities");
diff --git a/services/core/java/com/android/server/am/AnrHelper.java b/services/core/java/com/android/server/am/AnrHelper.java
index 7d984434284c..e0a224629174 100644
--- a/services/core/java/com/android/server/am/AnrHelper.java
+++ b/services/core/java/com/android/server/am/AnrHelper.java
@@ -20,6 +20,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
import android.content.pm.ApplicationInfo;
+import android.os.Process;
import android.os.SystemClock;
import android.os.Trace;
import android.util.ArraySet;
@@ -267,6 +268,7 @@ class AnrHelper {
private class AnrRecord {
final ProcessRecord mApp;
final int mPid;
+ final int mUid;
final String mActivityShortComponentName;
final String mParentShortComponentName;
final TimeoutRecord mTimeoutRecord;
@@ -283,6 +285,7 @@ class AnrHelper {
Future<File> firstPidFilePromise) {
mApp = anrProcess;
mPid = anrProcess.mPid;
+ mUid = anrProcess.uid;
mActivityShortComponentName = activityShortComponentName;
mParentShortComponentName = parentShortComponentName;
mTimeoutRecord = timeoutRecord;
diff --git a/services/core/java/com/android/server/am/AnrTimer.java b/services/core/java/com/android/server/am/AnrTimer.java
new file mode 100644
index 000000000000..cd6f009a4106
--- /dev/null
+++ b/services/core/java/com/android/server/am/AnrTimer.java
@@ -0,0 +1,834 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.am;
+
+import static android.text.TextUtils.formatSimple;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Process;
+import android.os.SystemClock;
+import android.os.Trace;
+import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.IndentingPrintWriter;
+import android.util.Log;
+import android.util.MathUtils;
+import android.util.SparseArray;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.Keep;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.os.ProcessCpuTracker;
+
+import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * This class managers AnrTimers. An AnrTimer is a substitute for a delayed Message. In legacy
+ * mode, the timer just sends a delayed message. In modern mode, the timer is implemented in
+ * native code; on expiration, the message is sent without delay.
+ *
+ * <p>There are four external operations on a timer:
+ * <ul>
+ *
+ * <li>{@link #start} starts a timer. The timer is started with an object that the message
+ * argument. The timer is also given the pid and uid of the target. A timer that is started must
+ * be canceled, accepted, or discarded.
+ *
+ * <li>{@link #cancel} stops a timer and removes any in-flight expiration messages.
+ *
+ * <li>{@link #accept} acknowledges that the timer has expired, and that an ANR should be
+ * generated. This clears bookkeeping information for the timer.
+ *
+ * <li>{@link #discard} acknowledges that the timer has expired but, for other reasons, no ANR
+ * will be generated. This clears bookkeeping information for the timer.
+ *
+ *</li></p>
+ *
+ * <p>There is one internal operation on a timer: {@link #expire}. A timer may have automatic
+ * extensions enabled. If so, the extension is computed and if the extension is non-zero, the timer
+ * is restarted with the extension timeout. If extensions are disabled or if the extension is zero,
+ * the client process is notified of the expiration.
+ *
+ * @hide
+ */
+abstract class AnrTimer<V> {
+
+ /**
+ * The log tag.
+ */
+ final static String TAG = "AnrTimer";
+
+ /**
+ * The trace track for these events. There is a single track for all AnrTimer instances. The
+ * tracks give a sense of handler latency: the time between timer expiration and ANR
+ * collection.
+ */
+ private final static String TRACK = "AnrTimer";
+
+ /**
+ * Enable debug messages.
+ */
+ private static boolean DEBUG = false;
+
+ /**
+ * The trace tag.
+ */
+ private static final long TRACE_TAG = Trace.TRACE_TAG_ACTIVITY_MANAGER;
+
+ /**
+ * Enable tracing from the time a timer expires until it is accepted or discarded. This is
+ * used to diagnose long latencies in the client.
+ */
+ private static final boolean ENABLE_TRACING = false;
+
+ /**
+ * The status of an ANR timer. TIMER_INVALID status is returned when an error is detected.
+ */
+ private static final int TIMER_INVALID = 0;
+ private static final int TIMER_RUNNING = 1;
+ private static final int TIMER_EXPIRED = 2;
+
+ @IntDef(prefix = { "TIMER_" }, value = {
+ TIMER_INVALID, TIMER_RUNNING, TIMER_EXPIRED
+ })
+ private @interface TimerStatus {}
+
+ /**
+ * A static list of all known AnrTimer instances, used for dumping and testing.
+ */
+ @GuardedBy("sAnrTimerList")
+ private static final ArrayList<WeakReference<AnrTimer>> sAnrTimerList = new ArrayList<>();
+
+ /**
+ * An error is defined by its issue, the operation that detected the error, the tag of the
+ * affected service, a short stack of the bad call, and the stringified arg associated with
+ * the error.
+ */
+ private static final class Error {
+ /** The issue is the kind of error that was detected. This is a free-form string. */
+ final String issue;
+ /** The operation that detected the error: start, cancel, accept, or discard. */
+ final String operation;
+ /** The argument (stringified) passed in to the operation. */
+ final String arg;
+ /** The tag of the associated AnrTimer. */
+ final String tag;
+ /** A partial stack that localizes the caller of the operation. */
+ final StackTraceElement[] stack;
+
+ Error(@NonNull String issue, @NonNull String operation, @NonNull String tag,
+ @NonNull StackTraceElement[] stack, @NonNull String arg) {
+ this.issue = issue;
+ this.operation = operation;
+ this.tag = tag;
+ this.stack = stack;
+ this.arg = arg;
+ }
+ }
+
+ /**
+ * A list of errors detected during processing. Errors correspond to "timer not found"
+ * conditions. The stack trace identifies the source of the call. The list is
+ * first-in/first-out, and the size is limited to MAX_SAVED_ERROR_COUNT.
+ */
+ @GuardedBy("sErrors")
+ private static final ArrayList<Error> sErrors = new ArrayList<>();
+
+ /**
+ * The maximum number of errors that are saved in the sErrors list.
+ */
+ private static final int MAX_SAVED_ERROR_COUNT = 20;
+
+ /**
+ * A record of a single anr timer. The pid and uid are retained for reference but they do not
+ * participate in the equality tests. A {@link Timer} is bound to its parent {@link AnrTimer}
+ * through the owner field. Access to timer fields is guarded by the mLock of the owner.
+ */
+ private static class Timer {
+ /** The AnrTimer that is managing this Timer. */
+ final AnrTimer owner;
+
+ /** The argument that uniquely identifies the Timer in the context of its current owner. */
+ final Object arg;
+ /** The pid of the process being tracked by this Timer. */
+ final int pid;
+ /** The uid of the process being tracked by this Timer as reported by the kernel. */
+ final int uid;
+ /** The original timeout. */
+ final long timeoutMs;
+
+ /** The status of the Timer. */
+ @GuardedBy("owner.mLock")
+ @TimerStatus
+ int status;
+
+ /** The absolute time the timer was startd */
+ final long startedMs;
+
+ /** Fields used by the native timer service. */
+
+ /** The timer ID: used to exchange information with the native service. */
+ int timerId;
+
+ /** Fields used by the legacy timer service. */
+
+ /**
+ * The process's cpu delay time when the timer starts . It is meaningful only if
+ * extendable is true. The cpu delay is cumulative, so the incremental delay that occurs
+ * during a timer is the delay at the end of the timer minus this value. Units are in
+ * milliseconds.
+ */
+ @GuardedBy("owner.mLock")
+ long initialCpuDelayMs;
+
+ /** True if the timer has been extended. */
+ @GuardedBy("owner.mLock")
+ boolean extended;
+
+ /**
+ * Fetch a new Timer. This is private. Clients should get a new timer using the obtain()
+ * method.
+ */
+ private Timer(int pid, int uid, @Nullable Object arg, long timeoutMs,
+ @NonNull AnrTimer service) {
+ this.arg = arg;
+ this.pid = pid;
+ this.uid = uid;
+ this.timerId = 0;
+ this.timeoutMs = timeoutMs;
+ this.startedMs = now();
+ this.owner = service;
+ this.initialCpuDelayMs = 0;
+ this.extended = false;
+ this.status = TIMER_INVALID;
+ }
+
+ /** Get a timer. This implementation constructs a new timer. */
+ static Timer obtain(int pid, int uid, @Nullable Object arg, long timeout,
+ @NonNull AnrTimer service) {
+ return new Timer(pid, uid, arg, timeout, service);
+ }
+
+ /** Release a timer. This implementation simply drops the timer. */
+ void release() {
+ }
+
+ /** Return the age of the timer. This is used for debugging. */
+ long age() {
+ return now() - startedMs;
+ }
+
+ /**
+ * The hash code is generated from the owner and the argument. By definition, the
+ * combination must be unique for the lifetime of an in-use Timer.
+ */
+ @Override
+ public int hashCode() {
+ return Objects.hash(owner, arg);
+ }
+
+ /**
+ * The equality check compares the owner and the argument. By definition, the combination
+ * must be unique for the lifetime of an in-use Timer.
+ */
+ @Override
+ public boolean equals(Object r) {
+ if (r instanceof Timer) {
+ Timer t = (Timer) r;
+ return Objects.equals(owner, t.owner) && Objects.equals(arg, t.arg);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ final int myStatus;
+ synchronized (owner.mLock) {
+ myStatus = status;
+ }
+ return "timerId=" + timerId + " pid=" + pid + " uid=" + uid
+ + " " + statusString(myStatus) + " " + owner.mLabel;
+ }
+ }
+
+ /** A lock for the AnrTimer instance. */
+ private final Object mLock = new Object();
+
+ /**
+ * The map from client argument to the associated timer.
+ */
+ @GuardedBy("mLock")
+ private final ArrayMap<V, Timer> mTimerMap = new ArrayMap<>();
+
+ /** The highwater mark of started, but not closed, timers. */
+ @GuardedBy("mLock")
+ private int mMaxStarted = 0;
+
+ /**
+ * The total number of timers started.
+ */
+ @GuardedBy("mLock")
+ private int mTotalStarted = 0;
+
+ /**
+ * The total number of errors detected.
+ */
+ @GuardedBy("mLock")
+ private int mTotalErrors = 0;
+
+ /**
+ * The total number of timers that have expired.
+ */
+ @GuardedBy("mLock")
+ private int mTotalExpired = 0;
+
+ /**
+ * A TimerService that generates a timeout event <n> milliseconds in the future. See the
+ * class documentation for an explanation of the operations.
+ */
+ private abstract class TimerService {
+ /** Start a timer. The timeout must be initialized. */
+ abstract boolean start(@NonNull Timer timer);
+
+ abstract void cancel(@NonNull Timer timer);
+
+ abstract void accept(@NonNull Timer timer);
+
+ abstract void discard(@NonNull Timer timer);
+ }
+
+ /**
+ * A class to assist testing. All methods are null by default but can be overridden as
+ * necessary for a test.
+ */
+ @VisibleForTesting
+ static class Injector {
+ /**
+ * Return a handler for the given Callback.
+ */
+ Handler getHandler(@NonNull Handler.Callback callback) {
+ return null;
+ };
+
+ /**
+ * Return a CpuTracker.
+ */
+ CpuTracker getTracker() {
+ return null;
+ }
+ }
+
+ /**
+ * A helper class to measure CPU delays. Given a process ID, this class will return the
+ * cumulative CPU delay for the PID, since process inception. This class is defined to assist
+ * testing.
+ */
+ @VisibleForTesting
+ static class CpuTracker {
+ /**
+ * The parameter to ProcessCpuTracker indicates that statistics should be collected on a
+ * single process and not on the collection of threads associated with that process.
+ */
+ private final ProcessCpuTracker mCpu = new ProcessCpuTracker(false);
+
+ /** A simple wrapper to fetch the delay. This method can be overridden for testing. */
+ long delay(int pid) {
+ return mCpu.getCpuDelayTimeForPid(pid);
+ }
+ }
+
+ /**
+ * The "user-space" implementation of the timer service. This service uses its own message
+ * handler to create timeouts.
+ */
+ private class HandlerTimerService extends TimerService {
+ /** The lock for this handler */
+ private final Object mLock = new Object();
+
+ /** The message handler for scheduling future events. */
+ private final Handler mHandler;
+
+ /** The interface to fetch process statistics that might extend an ANR timeout. */
+ private final CpuTracker mCpu;
+
+ /** Create a HandlerTimerService based on the input handler. */
+ HandlerTimerService(@NonNull Handler handler) {
+ mHandler = new Handler(handler.getLooper(), this::expires);
+ mCpu = new CpuTracker();
+ }
+
+ /** Create a HandlerTimerService that directly uses the supplied handler and tracker. */
+ @VisibleForTesting
+ HandlerTimerService(@NonNull Injector injector) {
+ mHandler = injector.getHandler(this::expires);
+ mCpu = injector.getTracker();
+ }
+
+ /** Post a message with the specified timeout. The timer is not modified. */
+ private void post(@NonNull Timer t, long timeoutMillis) {
+ final Message msg = mHandler.obtainMessage();
+ msg.obj = t;
+ mHandler.sendMessageDelayed(msg, timeoutMillis);
+ }
+
+ /**
+ * The local expiration handler first attempts to compute a timer extension. If the timer
+ * should be extended, it is rescheduled in the future (granting more time to the
+ * associated process). If the timer should not be extended then the timeout is delivered
+ * to the client.
+ *
+ * A process is extended to account for the time the process was swapped out and was not
+ * runnable through no fault of its own. A timer can only be extended once and only if
+ * the AnrTimer permits extensions. Finally, a timer will never be extended by more than
+ * the original timeout, so the total timeout will never be more than twice the originally
+ * configured timeout.
+ */
+ private boolean expires(Message msg) {
+ Timer t = (Timer) msg.obj;
+ synchronized (mLock) {
+ long extension = 0;
+ if (mExtend && !t.extended) {
+ extension = mCpu.delay(t.pid) - t.initialCpuDelayMs;
+ if (extension < 0) extension = 0;
+ if (extension > t.timeoutMs) extension = t.timeoutMs;
+ t.extended = true;
+ }
+ if (extension > 0) {
+ post(t, extension);
+ } else {
+ onExpiredLocked(t, now());
+ }
+ }
+ return true;
+ }
+
+ @GuardedBy("mLock")
+ @Override
+ boolean start(@NonNull Timer t) {
+ if (mExtend) {
+ t.initialCpuDelayMs = mCpu.delay(t.pid);
+ }
+ post(t, t.timeoutMs);
+ return true;
+ }
+
+ @Override
+ void cancel(@NonNull Timer t) {
+ mHandler.removeMessages(0, t);
+ }
+
+ @Override
+ void accept(@NonNull Timer t) {
+ // Nothing to do.
+ }
+
+ @Override
+ void discard(@NonNull Timer t) {
+ // Nothing to do.
+ }
+
+ /** The string identifies this subclass of AnrTimerService as being based on handlers. */
+ @Override
+ public String toString() {
+ return "handler";
+ }
+ }
+
+ /**
+ * The handler for messages sent from this instance.
+ */
+ private final Handler mHandler;
+
+ /**
+ * The message type for messages sent from this interface.
+ */
+ private final int mWhat;
+
+ /**
+ * A label that identifies the AnrTimer associated with a Timer in log messages.
+ */
+ private final String mLabel;
+
+ /**
+ * Whether this timer instance supports extending timeouts.
+ */
+ private final boolean mExtend;
+
+ /**
+ * The timer service to use for this AnrTimer.
+ */
+ private final TimerService mTimerService;
+
+ /**
+ * Whether or not canceling a non-existent timer is an error. Clients often cancel freely
+ * preemptively, without knowing if the timer was ever started. Keeping this variable true
+ * means that such behavior is not an error.
+ */
+ private final boolean mLenientCancel = true;
+
+ /**
+ * The common constructor. A null injector results in a normal, production timer.
+ */
+ @VisibleForTesting
+ AnrTimer(@NonNull Handler handler, int what, @NonNull String label, boolean extend,
+ @Nullable Injector injector) {
+ mHandler = handler;
+ mWhat = what;
+ mLabel = label;
+ mExtend = extend;
+ if (injector == null) {
+ mTimerService = new HandlerTimerService(handler);
+ } else {
+ mTimerService = new HandlerTimerService(injector);
+ }
+ synchronized (sAnrTimerList) {
+ sAnrTimerList.add(new WeakReference(this));
+ }
+ Log.i(TAG, formatSimple("created %s label: \"%s\"", mTimerService.toString(), label));
+ }
+
+ /**
+ * Create one timer instance for production. The client can ask for extensible timeouts.
+ */
+ AnrTimer(@NonNull Handler handler, int what, @NonNull String label, boolean extend) {
+ this(handler, what, label, extend, null);
+ }
+
+ /**
+ * Create one timer instance for production. There are no extensible timeouts.
+ */
+ AnrTimer(@NonNull Handler handler, int what, @NonNull String label) {
+ this(handler, what, label, false, null);
+ }
+
+ /**
+ * Start a trace on the timer. The trace is laid down in the AnrTimerTrack.
+ */
+ private void traceBegin(Timer t, String what) {
+ if (ENABLE_TRACING) {
+ final String label = formatSimple("%s(%d,%d,%s)", what, t.pid, t.uid, mLabel);
+ final int cookie = t.hashCode();
+ Trace.asyncTraceForTrackBegin(TRACE_TAG, TRACK, label, cookie);
+ }
+ }
+
+ /**
+ * End a trace on the timer.
+ */
+ private void traceEnd(Timer t) {
+ if (ENABLE_TRACING) {
+ final int cookie = t.hashCode();
+ Trace.asyncTraceForTrackEnd(TRACE_TAG, TRACK, cookie);
+ }
+ }
+
+ /**
+ * Return the string representation for a timer status.
+ */
+ private static String statusString(int s) {
+ switch (s) {
+ case TIMER_INVALID: return "invalid";
+ case TIMER_RUNNING: return "running";
+ case TIMER_EXPIRED: return "expired";
+ }
+ return formatSimple("unknown: %d", s);
+ }
+
+ /**
+ * Delete the timer associated with arg from the maps and return it. Return null if the timer
+ * was not found.
+ */
+ @GuardedBy("mLock")
+ private Timer removeLocked(V arg) {
+ Timer timer = mTimerMap.remove(arg);
+ return timer;
+ }
+
+ /**
+ * Return the number of timers currently running.
+ */
+ @VisibleForTesting
+ static int sizeOfTimerList() {
+ synchronized (sAnrTimerList) {
+ int totalTimers = 0;
+ for (int i = 0; i < sAnrTimerList.size(); i++) {
+ AnrTimer client = sAnrTimerList.get(i).get();
+ if (client != null) totalTimers += client.mTimerMap.size();
+ }
+ return totalTimers;
+ }
+ }
+
+ /**
+ * Clear out all existing timers. This will lead to unexpected behavior if used carelessly.
+ * It is available only for testing. It returns the number of times that were actually
+ * erased.
+ */
+ @VisibleForTesting
+ static int resetTimerListForHermeticTest() {
+ synchronized (sAnrTimerList) {
+ int mapLen = 0;
+ for (int i = 0; i < sAnrTimerList.size(); i++) {
+ AnrTimer client = sAnrTimerList.get(i).get();
+ if (client != null) {
+ mapLen += client.mTimerMap.size();
+ client.mTimerMap.clear();
+ }
+ }
+ if (mapLen > 0) {
+ Log.w(TAG, formatSimple("erasing timer list: clearing %d timers", mapLen));
+ }
+ return mapLen;
+ }
+ }
+
+ /**
+ * Report something about a timer.
+ */
+ private void report(@NonNull Timer timer, @NonNull String msg) {
+ Log.i(TAG, msg + " " + timer + " " + Objects.toString(timer.arg));
+ }
+
+ /**
+ * Start a timer.
+ */
+ boolean start(@NonNull V arg, int pid, int uid, long timeoutMs) {
+ final Timer timer = Timer.obtain(pid, uid, arg, timeoutMs, this);
+ synchronized (mLock) {
+ Timer old = mTimerMap.get(arg);
+ if (old != null) {
+ // There is an existing timer. This is a protocol error in the client. Record
+ // the error and then clean up by canceling running timers and discarding expired
+ // timers.
+ restartedLocked(old.status, arg);
+ if (old.status == TIMER_EXPIRED) {
+ discard(arg);
+ } else {
+ cancel(arg);
+ }
+ }
+ if (mTimerService.start(timer)) {
+ timer.status = TIMER_RUNNING;
+ mTimerMap.put(arg, timer);
+ mTotalStarted++;
+ mMaxStarted = Math.max(mMaxStarted, mTimerMap.size());
+ if (DEBUG) report(timer, "start");
+ return true;
+ } else {
+ Log.e(TAG, "AnrTimer.start failed");
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Cancel a timer. Return false if the timer was not found.
+ */
+ boolean cancel(@NonNull V arg) {
+ synchronized (mLock) {
+ Timer timer = removeLocked(arg);
+ if (timer == null) {
+ if (!mLenientCancel) notFoundLocked("cancel", arg);
+ return false;
+ }
+ mTimerService.cancel(timer);
+ // There may be an expiration message in flight. Cancel it.
+ mHandler.removeMessages(mWhat, arg);
+ if (DEBUG) report(timer, "cancel");
+ timer.release();
+ return true;
+ }
+ }
+
+ /**
+ * Accept a timer in the framework-level handler. The timeout has been accepted and the
+ * timeout handler is executing. Return false if the timer was not found.
+ */
+ boolean accept(@NonNull V arg) {
+ synchronized (mLock) {
+ Timer timer = removeLocked(arg);
+ if (timer == null) {
+ notFoundLocked("accept", arg);
+ return false;
+ }
+ mTimerService.accept(timer);
+ traceEnd(timer);
+ if (DEBUG) report(timer, "accept");
+ timer.release();
+ return true;
+ }
+ }
+
+ /**
+ * Discard a timer in the framework-level handler. For whatever reason, the timer is no
+ * longer interesting. No statistics are collected. Return false if the time was not found.
+ */
+ boolean discard(@NonNull V arg) {
+ synchronized (mLock) {
+ Timer timer = removeLocked(arg);
+ if (timer == null) {
+ notFoundLocked("discard", arg);
+ return false;
+ }
+ mTimerService.discard(timer);
+ traceEnd(timer);
+ if (DEBUG) report(timer, "discard");
+ timer.release();
+ return true;
+ }
+ }
+
+ /**
+ * The notifier that a timer has fired. The timer is not modified.
+ */
+ @GuardedBy("mLock")
+ private void onExpiredLocked(@NonNull Timer timer, long when) {
+ if (DEBUG) report(timer, "expire");
+ traceBegin(timer, "expired");
+ mHandler.sendMessage(Message.obtain(mHandler, mWhat, timer.arg));
+ synchronized (mLock) {
+ mTotalExpired++;
+ }
+ }
+
+ /**
+ * Dump a single AnrTimer.
+ */
+ private void dump(IndentingPrintWriter pw) {
+ synchronized (mLock) {
+ pw.format("timer: %s\n", mLabel);
+ pw.increaseIndent();
+ pw.format("started=%d maxStarted=%d running=%d expired=%d error=%d\n",
+ mTotalStarted, mMaxStarted, mTimerMap.size(),
+ mTotalExpired, mTotalErrors);
+ pw.decreaseIndent();
+ }
+ }
+
+ /**
+ * Enable or disable debugging.
+ */
+ static void debug(boolean f) {
+ DEBUG = f;
+ }
+
+ /**
+ * The current time in milliseconds.
+ */
+ private static long now() {
+ return SystemClock.uptimeMillis();
+ }
+
+ /**
+ * Log an error. A limited stack trace leading to the client call that triggered the error is
+ * recorded. The stack trace assumes that this method is not called directly.
+ *
+ * If DEBUG is true, a log message is generated as well.
+ */
+ @GuardedBy("mLock")
+ private void recordErrorLocked(String operation, String errorMsg, Object arg) {
+ StackTraceElement[] s = Thread.currentThread().getStackTrace();
+ final String what = Objects.toString(arg);
+ // The copy range starts at the caller of the timer operation, and includes three levels.
+ // This should be enough to isolate the location of the call.
+ StackTraceElement[] location = Arrays.copyOfRange(s, 6, 9);
+ synchronized (sErrors) {
+ // Ensure the error list does not grow beyond the limit.
+ while (sErrors.size() >= MAX_SAVED_ERROR_COUNT) {
+ sErrors.remove(0);
+ }
+ // Add the new error to the list.
+ sErrors.add(new Error(errorMsg, operation, mLabel, location, what));
+ }
+ if (DEBUG) Log.w(TAG, operation + " " + errorMsg + " " + mLabel + " timer " + what);
+ mTotalErrors++;
+ }
+
+ /**
+ * Log an error about a timer not found.
+ */
+ @GuardedBy("mLock")
+ private void notFoundLocked(String operation, Object arg) {
+ recordErrorLocked(operation, "notFound", arg);
+ }
+
+ /**
+ * Log an error about a timer that is started when there is an existing timer.
+ */
+ @GuardedBy("mLock")
+ private void restartedLocked(@TimerStatus int status, Object arg) {
+ recordErrorLocked("start", status == TIMER_EXPIRED ? "autoDiscard" : "autoCancel", arg);
+ }
+
+ /**
+ * Dump a single error to the output stream.
+ */
+ private static void dump(IndentingPrintWriter ipw, int seq, Error err) {
+ ipw.format("%2d: op:%s tag:%s issue:%s arg:%s\n", seq, err.operation, err.tag,
+ err.issue, err.arg);
+ ipw.increaseIndent();
+ for (int i = 0; i < err.stack.length; i++) {
+ ipw.println(" " + err.stack[i].toString());
+ }
+ ipw.decreaseIndent();
+ }
+
+ /**
+ * Dump all errors to the output stream.
+ */
+ private static void dumpErrors(IndentingPrintWriter ipw) {
+ ArrayList<Error> errors;
+ synchronized (sErrors) {
+ if (sErrors.size() == 0) return;
+ errors = (ArrayList<Error>) sErrors.clone();
+ }
+ ipw.println("Errors");
+ ipw.increaseIndent();
+ for (int i = 0; i < errors.size(); i++) {
+ dump(ipw, i, errors.get(i));
+ }
+ ipw.decreaseIndent();
+ }
+
+ /**
+ * Dumpsys output.
+ */
+ static void dump(@NonNull PrintWriter pw, boolean verbose) {
+ final IndentingPrintWriter ipw = new IndentingPrintWriter(pw);
+ ipw.println("AnrTimer statistics");
+ ipw.increaseIndent();
+ synchronized (sAnrTimerList) {
+ for (int i = 0; i < sAnrTimerList.size(); i++) {
+ AnrTimer client = sAnrTimerList.get(i).get();
+ if (client != null) client.dump(ipw);
+ }
+ }
+ if (verbose) dumpErrors(ipw);
+ ipw.format("AnrTimerEnd\n");
+ ipw.decreaseIndent();
+ }
+}
diff --git a/services/core/java/com/android/server/am/BroadcastProcessQueue.java b/services/core/java/com/android/server/am/BroadcastProcessQueue.java
index fc8175b76ecd..c35a3b2474aa 100644
--- a/services/core/java/com/android/server/am/BroadcastProcessQueue.java
+++ b/services/core/java/com/android/server/am/BroadcastProcessQueue.java
@@ -101,10 +101,9 @@ class BroadcastProcessQueue {
boolean runningOomAdjusted;
/**
- * Snapshotted value of {@link ProcessRecord#getCpuDelayTime()}, typically
- * used when deciding if we should extend the soft ANR timeout.
+ * True if a timer has been started against this queue.
*/
- long lastCpuDelayTime;
+ private boolean mTimeoutScheduled;
/**
* Snapshotted value of {@link ProcessStateRecord#getCurProcState()} before
@@ -1344,6 +1343,21 @@ class BroadcastProcessQueue {
return head;
}
+ /**
+ * Set the timeout flag to indicate that an ANR timer has been started. A value of true means a
+ * timer is running; a value of false means there is no timer running.
+ */
+ void setTimeoutScheduled(boolean timeoutStarted) {
+ mTimeoutScheduled = timeoutStarted;
+ }
+
+ /**
+ * Get the timeout flag
+ */
+ boolean timeoutScheduled() {
+ return mTimeoutScheduled;
+ }
+
@Override
public String toString() {
if (mCachedToString == null) {
diff --git a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
index 8d2edaaadb63..5b71595256da 100644
--- a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
+++ b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
@@ -149,6 +149,8 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
// We configure runnable size only once at boot; it'd be too complex to
// try resizing dynamically at runtime
mRunning = new BroadcastProcessQueue[mConstants.getMaxRunningQueues()];
+
+ mAnrTimer = new BroadcastAnrTimer(mLocalHandler);
}
/**
@@ -242,14 +244,19 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
*/
private @UptimeMillisLong long mLastTestFailureTime;
+ /**
+ * The ANR timer service for broadcasts.
+ */
+ @GuardedBy("mService")
+ private final BroadcastAnrTimer mAnrTimer;
+
private static final int MSG_UPDATE_RUNNING_LIST = 1;
- private static final int MSG_DELIVERY_TIMEOUT_SOFT = 2;
- private static final int MSG_DELIVERY_TIMEOUT_HARD = 3;
- private static final int MSG_BG_ACTIVITY_START_TIMEOUT = 4;
- private static final int MSG_CHECK_HEALTH = 5;
- private static final int MSG_CHECK_PENDING_COLD_START_VALIDITY = 6;
- private static final int MSG_PROCESS_FREEZABLE_CHANGED = 7;
- private static final int MSG_UID_STATE_CHANGED = 8;
+ private static final int MSG_DELIVERY_TIMEOUT = 2;
+ private static final int MSG_BG_ACTIVITY_START_TIMEOUT = 3;
+ private static final int MSG_CHECK_HEALTH = 4;
+ private static final int MSG_CHECK_PENDING_COLD_START_VALIDITY = 5;
+ private static final int MSG_PROCESS_FREEZABLE_CHANGED = 6;
+ private static final int MSG_UID_STATE_CHANGED = 7;
private void enqueueUpdateRunningList() {
mLocalHandler.removeMessages(MSG_UPDATE_RUNNING_LIST);
@@ -264,12 +271,8 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
updateRunningList();
return true;
}
- case MSG_DELIVERY_TIMEOUT_SOFT: {
- deliveryTimeoutSoft((BroadcastProcessQueue) msg.obj, msg.arg1);
- return true;
- }
- case MSG_DELIVERY_TIMEOUT_HARD: {
- deliveryTimeoutHard((BroadcastProcessQueue) msg.obj);
+ case MSG_DELIVERY_TIMEOUT: {
+ deliveryTimeout((BroadcastProcessQueue) msg.obj);
return true;
}
case MSG_BG_ACTIVITY_START_TIMEOUT: {
@@ -1024,12 +1027,12 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
// immediately assume delivery success
final boolean assumeDelivered = r.isAssumedDelivered(index);
if (mService.mProcessesReady && !r.timeoutExempt && !assumeDelivered) {
- queue.lastCpuDelayTime = queue.app.getCpuDelayTime();
-
+ queue.setTimeoutScheduled(true);
final int softTimeoutMillis = (int) (r.isForeground() ? mFgConstants.TIMEOUT
: mBgConstants.TIMEOUT);
- mLocalHandler.sendMessageDelayed(Message.obtain(mLocalHandler,
- MSG_DELIVERY_TIMEOUT_SOFT, softTimeoutMillis, 0, queue), softTimeoutMillis);
+ mAnrTimer.start(queue, softTimeoutMillis);
+ } else {
+ queue.setTimeoutScheduled(false);
}
if (r.mBackgroundStartPrivileges.allowsAny()) {
@@ -1107,7 +1110,7 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
// If we were trying to deliver a manifest broadcast, throw the error as we need
// to try redelivering the broadcast to this receiver.
if (receiver instanceof ResolveInfo) {
- mLocalHandler.removeMessages(MSG_DELIVERY_TIMEOUT_SOFT, queue);
+ mAnrTimer.cancel(queue);
throw new BroadcastDeliveryFailedException(e);
}
finishReceiverActiveLocked(queue, BroadcastRecord.DELIVERY_FAILURE,
@@ -1156,39 +1159,27 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
r.resultTo = null;
}
- private void deliveryTimeoutSoft(@NonNull BroadcastProcessQueue queue,
- int softTimeoutMillis) {
+ private void deliveryTimeout(@NonNull BroadcastProcessQueue queue) {
synchronized (mService) {
- deliveryTimeoutSoftLocked(queue, softTimeoutMillis);
+ deliveryTimeoutLocked(queue);
}
}
- private void deliveryTimeoutSoftLocked(@NonNull BroadcastProcessQueue queue,
- int softTimeoutMillis) {
- if (queue.app != null) {
- // Instead of immediately triggering an ANR, extend the timeout by
- // the amount of time the process was runnable-but-waiting; we're
- // only willing to do this once before triggering an hard ANR
- final long cpuDelayTime = queue.app.getCpuDelayTime() - queue.lastCpuDelayTime;
- final long hardTimeoutMillis = MathUtils.constrain(cpuDelayTime, 0, softTimeoutMillis);
- mLocalHandler.sendMessageDelayed(
- Message.obtain(mLocalHandler, MSG_DELIVERY_TIMEOUT_HARD, queue),
- hardTimeoutMillis);
- } else {
- deliveryTimeoutHardLocked(queue);
- }
+ private void deliveryTimeoutLocked(@NonNull BroadcastProcessQueue queue) {
+ finishReceiverActiveLocked(queue, BroadcastRecord.DELIVERY_TIMEOUT,
+ "deliveryTimeoutLocked");
+ demoteFromRunningLocked(queue);
}
- private void deliveryTimeoutHard(@NonNull BroadcastProcessQueue queue) {
- synchronized (mService) {
- deliveryTimeoutHardLocked(queue);
+ private class BroadcastAnrTimer extends AnrTimer<BroadcastProcessQueue> {
+ BroadcastAnrTimer(Handler handler) {
+ super(Objects.requireNonNull(handler),
+ MSG_DELIVERY_TIMEOUT, "BROADCAST_TIMEOUT", true);
}
- }
- private void deliveryTimeoutHardLocked(@NonNull BroadcastProcessQueue queue) {
- finishReceiverActiveLocked(queue, BroadcastRecord.DELIVERY_TIMEOUT,
- "deliveryTimeoutHardLocked");
- demoteFromRunningLocked(queue);
+ void start(@NonNull BroadcastProcessQueue queue, long timeoutMillis) {
+ start(queue, queue.app.getPid(), queue.app.uid, timeoutMillis);
+ }
}
@Override
@@ -1292,14 +1283,16 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
if (deliveryState == BroadcastRecord.DELIVERY_TIMEOUT) {
r.anrCount++;
if (app != null && !app.isDebugging()) {
+ mAnrTimer.accept(queue);
final String packageName = getReceiverPackageName(receiver);
final String className = getReceiverClassName(receiver);
mService.appNotResponding(queue.app,
TimeoutRecord.forBroadcastReceiver(r.intent, packageName, className));
+ } else {
+ mAnrTimer.discard(queue);
}
- } else {
- mLocalHandler.removeMessages(MSG_DELIVERY_TIMEOUT_SOFT, queue);
- mLocalHandler.removeMessages(MSG_DELIVERY_TIMEOUT_HARD, queue);
+ } else if (queue.timeoutScheduled()) {
+ mAnrTimer.cancel(queue);
}
// Given that a receiver just finished, check if the "waitingFor" conditions are met.
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index 87077a677758..a451f361a933 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -159,7 +159,6 @@ import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.CompositeRWLock;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.LocalServices;
import com.android.server.ServiceThread;
import com.android.server.am.PlatformCompatCache.CachedCompatChangeId;
import com.android.server.wm.ActivityServiceConnectionsHolder;
@@ -317,11 +316,6 @@ public class OomAdjuster {
static final long USE_SHORT_FGS_USAGE_INTERACTION_TIME = 183972877L;
/**
- * For some direct access we need to power manager.
- */
- PowerManagerInternal mLocalPowerManager;
-
- /**
* Service for optimizing resource usage from background apps.
*/
CachedAppOptimizer mCachedAppOptimizer;
@@ -431,7 +425,6 @@ public class OomAdjuster {
mProcLock = service.mProcLock;
mActiveUids = activeUids;
- mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class);
mConstants = mService.mConstants;
mCachedAppOptimizer = new CachedAppOptimizer(mService);
mCacheOomRanker = new CacheOomRanker(service);
@@ -1480,8 +1473,8 @@ public class OomAdjuster {
becameIdle.clear();
// Update from any uid changes.
- if (mLocalPowerManager != null) {
- mLocalPowerManager.startUidChanges();
+ if (mService.mLocalPowerManager != null) {
+ mService.mLocalPowerManager.startUidChanges();
}
for (int i = activeUids.size() - 1; i >= 0; i--) {
final UidRecord uidRec = activeUids.valueAt(i);
@@ -1575,8 +1568,8 @@ public class OomAdjuster {
}
mService.mInternal.deletePendingTopUid(uidRec.getUid(), nowElapsed);
}
- if (mLocalPowerManager != null) {
- mLocalPowerManager.finishUidChanges();
+ if (mService.mLocalPowerManager != null) {
+ mService.mLocalPowerManager.finishUidChanges();
}
int size = becameIdle.size();
@@ -3613,8 +3606,8 @@ public class OomAdjuster {
final long nowElapsed = SystemClock.elapsedRealtime();
final long maxBgTime = nowElapsed - mConstants.BACKGROUND_SETTLE_TIME;
long nextTime = 0;
- if (mLocalPowerManager != null) {
- mLocalPowerManager.startUidChanges();
+ if (mService.mLocalPowerManager != null) {
+ mService.mLocalPowerManager.startUidChanges();
}
for (int i = N - 1; i >= 0; i--) {
final UidRecord uidRec = mActiveUids.valueAt(i);
@@ -3634,8 +3627,8 @@ public class OomAdjuster {
}
}
}
- if (mLocalPowerManager != null) {
- mLocalPowerManager.finishUidChanges();
+ if (mService.mLocalPowerManager != null) {
+ mService.mLocalPowerManager.finishUidChanges();
}
// Also check if there are any apps in cached and background restricted mode,
// if so, kill it if it's been there long enough, or kick off a msg to check
diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
index b79ba7ba6b45..6d2fc0dc21f6 100644
--- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
+++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
@@ -115,28 +115,47 @@ public class SettingsToPropertiesMapper {
};
// All the aconfig flags under the listed DeviceConfig scopes will be synced to native level.
+ // The list is sorted.
@VisibleForTesting
static final String[] sDeviceConfigAconfigScopes = new String[] {
+ "android_core_networking",
+ "angle",
+ "arc_next",
+ "bluetooth",
"biometrics_framework",
- "core_experiments_team_internal",
+ "biometrics_integration",
"camera_platform",
- "power",
- "vibrator",
+ "car_framework",
+ "car_perception",
+ "car_security",
+ "car_telemetry",
+ "codec_fwk",
+ "companion",
+ "context_hub",
+ "core_experiments_team_internal",
"haptics",
- "text",
- "arc_next",
- "test_suites",
"hardware_backed_security_mainline",
- "threadnetwork",
+ "media_audio",
"media_solutions",
+ "nfc",
+ "pixel_system_sw_touch",
+ "pixel_watch",
+ "platform_security",
+ "power",
+ "preload_safety",
"responsible_apis",
"rust",
- "pixel_biometrics",
- "car_perception",
- "car_security",
- "car_telemetry",
- "car_framework",
- "android-nfc",
+ "system_performance",
+ "test_suites",
+ "text",
+ "threadnetwork",
+ "tv_system_ui",
+ "vibrator",
+ "wear_frameworks",
+ "wear_system_health",
+ "wear_systems",
+ "window_surfaces",
+ "windowing_frontend"
};
private final String[] mGlobalSettings;
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 27708330efd3..de4ad20bdccc 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -2212,6 +2212,7 @@ class UserController implements Handler.Callback {
final IRemoteCallback callback = new IRemoteCallback.Stub() {
@Override
public void sendResult(Bundle data) throws RemoteException {
+ asyncTraceEnd("onUserSwitching-" + name, newUserId);
synchronized (mLock) {
long delayForObserver = SystemClock.elapsedRealtime()
- dispatchStartedTimeForObserver;
@@ -2229,8 +2230,6 @@ class UserController implements Handler.Callback {
+ " ms after dispatchUserSwitch.");
}
- TimingsTraceAndSlog t2 = new TimingsTraceAndSlog(TAG);
- t2.traceBegin("onUserSwitchingReply-" + name);
curWaitingUserSwitchCallbacks.remove(name);
// Continue switching if all callbacks have been notified and
// user switching session is still valid
@@ -2239,13 +2238,11 @@ class UserController implements Handler.Callback {
== mCurWaitingUserSwitchCallbacks)) {
sendContinueUserSwitchLU(uss, oldUserId, newUserId);
}
- t2.traceEnd();
}
}
};
- t.traceBegin("onUserSwitching-" + name);
+ asyncTraceBegin("onUserSwitching-" + name, newUserId);
mUserSwitchObservers.getBroadcastItem(i).onUserSwitching(newUserId, callback);
- t.traceEnd();
} catch (RemoteException e) {
// Ignore
}
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index c05a1f645674..9cfac9af3991 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -539,6 +539,62 @@ public class AudioDeviceBroker {
}
}
}
+
+ // check playback or record activity after 6 seconds for UIDs
+ private static final int CHECK_CLIENT_STATE_DELAY_MS = 6000;
+
+ /*package */
+ void postCheckCommunicationRouteClientState(int uid, boolean wasActive, int delay) {
+ CommunicationRouteClient client = getCommunicationRouteClientForUid(uid);
+ if (client != null) {
+ sendMsgForCheckClientState(MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE,
+ SENDMSG_REPLACE,
+ uid,
+ wasActive ? 1 : 0,
+ client,
+ delay);
+ }
+ }
+
+ @GuardedBy("mDeviceStateLock")
+ void onCheckCommunicationRouteClientState(int uid, boolean wasActive) {
+ CommunicationRouteClient client = getCommunicationRouteClientForUid(uid);
+ if (client == null) {
+ return;
+ }
+ updateCommunicationRouteClientState(client, wasActive);
+ }
+
+ @GuardedBy("mDeviceStateLock")
+ /*package*/ void updateCommunicationRouteClientState(
+ CommunicationRouteClient client, boolean wasActive) {
+ boolean wasBtScoRequested = isBluetoothScoRequested();
+ client.setPlaybackActive(mAudioService.isPlaybackActiveForUid(client.getUid()));
+ client.setRecordingActive(mAudioService.isRecordingActiveForUid(client.getUid()));
+ if (wasActive != client.isActive()) {
+ postUpdateCommunicationRouteClient(
+ wasBtScoRequested, "updateCommunicationRouteClientState");
+ }
+ }
+
+ @GuardedBy("mDeviceStateLock")
+ /*package*/ void setForceCommunicationClientStateAndDelayedCheck(
+ CommunicationRouteClient client,
+ boolean forcePlaybackActive,
+ boolean forceRecordingActive) {
+ if (client == null) {
+ return;
+ }
+ if (forcePlaybackActive) {
+ client.setPlaybackActive(true);
+ }
+ if (forceRecordingActive) {
+ client.setRecordingActive(true);
+ }
+ postCheckCommunicationRouteClientState(
+ client.getUid(), client.isActive(), CHECK_CLIENT_STATE_DELAY_MS);
+ }
+
/* package */ static List<AudioDeviceInfo> getAvailableCommunicationDevices() {
ArrayList<AudioDeviceInfo> commDevices = new ArrayList<>();
AudioDeviceInfo[] allDevices =
@@ -1899,6 +1955,12 @@ public class AudioDeviceBroker {
case MSG_PERSIST_AUDIO_DEVICE_SETTINGS:
onPersistAudioDeviceSettings();
break;
+
+ case MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE: {
+ synchronized (mDeviceStateLock) {
+ onCheckCommunicationRouteClientState(msg.arg1, msg.arg2 == 1);
+ }
+ } break;
default:
Log.wtf(TAG, "Invalid message " + msg.what);
}
@@ -1980,6 +2042,8 @@ public class AudioDeviceBroker {
private static final int MSG_L_RECEIVED_BT_EVENT = 55;
+ private static final int MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE = 56;
+
private static boolean isMessageHandledUnderWakelock(int msgId) {
switch(msgId) {
case MSG_L_SET_WIRED_DEVICE_CONNECTION_STATE:
@@ -2093,6 +2157,23 @@ public class AudioDeviceBroker {
}
}
+ private void removeMsgForCheckClientState(int uid) {
+ CommunicationRouteClient crc = getCommunicationRouteClientForUid(uid);
+ if (crc != null) {
+ mBrokerHandler.removeEqualMessages(MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE, crc);
+ }
+ }
+
+ private void sendMsgForCheckClientState(int msg, int existingMsgPolicy,
+ int arg1, int arg2, Object obj, int delay) {
+ if ((existingMsgPolicy == SENDMSG_REPLACE) && (obj != null)) {
+ mBrokerHandler.removeEqualMessages(msg, obj);
+ }
+
+ long time = SystemClock.uptimeMillis() + delay;
+ mBrokerHandler.sendMessageAtTime(mBrokerHandler.obtainMessage(msg, arg1, arg2, obj), time);
+ }
+
/** List of messages for which music is muted while processing is pending */
private static final Set<Integer> MESSAGES_MUTE_MUSIC;
static {
@@ -2365,6 +2446,7 @@ public class AudioDeviceBroker {
if (unregister) {
cl.unregisterDeathRecipient();
}
+ removeMsgForCheckClientState(cl.getUid());
mCommunicationRouteClients.remove(cl);
return cl;
}
@@ -2381,6 +2463,13 @@ public class AudioDeviceBroker {
new CommunicationRouteClient(cb, uid, device, isPrivileged);
if (client.registerDeathRecipient()) {
mCommunicationRouteClients.add(0, client);
+ if (!client.isActive()) {
+ // initialize the inactive client's state as active and check it after 6 seconds
+ setForceCommunicationClientStateAndDelayedCheck(
+ client,
+ !mAudioService.isPlaybackActiveForUid(client.getUid()),
+ !mAudioService.isRecordingActiveForUid(client.getUid()));
+ }
return client;
}
return null;
@@ -2437,16 +2526,16 @@ public class AudioDeviceBroker {
List<AudioRecordingConfiguration> recordConfigs) {
synchronized (mSetModeLock) {
synchronized (mDeviceStateLock) {
- final boolean wasBtScoRequested = isBluetoothScoRequested();
- boolean updateCommunicationRoute = false;
for (CommunicationRouteClient crc : mCommunicationRouteClients) {
boolean wasActive = crc.isActive();
+ boolean updateClientState = false;
if (playbackConfigs != null) {
crc.setPlaybackActive(false);
for (AudioPlaybackConfiguration config : playbackConfigs) {
if (config.getClientUid() == crc.getUid()
&& config.isActive()) {
crc.setPlaybackActive(true);
+ updateClientState = true;
break;
}
}
@@ -2457,18 +2546,23 @@ public class AudioDeviceBroker {
if (config.getClientUid() == crc.getUid()
&& !config.isClientSilenced()) {
crc.setRecordingActive(true);
+ updateClientState = true;
break;
}
}
}
- if (wasActive != crc.isActive()) {
- updateCommunicationRoute = true;
+ if (updateClientState) {
+ removeMsgForCheckClientState(crc.getUid());
+ updateCommunicationRouteClientState(crc, wasActive);
+ } else {
+ if (wasActive) {
+ setForceCommunicationClientStateAndDelayedCheck(
+ crc,
+ playbackConfigs != null /* forcePlaybackActive */,
+ recordConfigs != null /* forceRecordingActive */);
+ }
}
}
- if (updateCommunicationRoute) {
- postUpdateCommunicationRouteClient(
- wasBtScoRequested, "updateCommunicationRouteClientsActivity");
- }
}
}
}
diff --git a/services/core/java/com/android/server/biometrics/Android.bp b/services/core/java/com/android/server/biometrics/Android.bp
new file mode 100644
index 000000000000..6cbe4adbcdbe
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+ name: "biometrics_flags",
+ package: "com.android.server.biometrics",
+ srcs: [
+ "biometrics.aconfig",
+ ],
+}
+
+java_aconfig_library {
+ name: "biometrics_flags_lib",
+ aconfig_declarations: "biometrics_flags",
+}
diff --git a/services/core/java/com/android/server/biometrics/AuthSession.java b/services/core/java/com/android/server/biometrics/AuthSession.java
index 2ae3118d7bfa..b9ccbfbf55e7 100644
--- a/services/core/java/com/android/server/biometrics/AuthSession.java
+++ b/services/core/java/com/android/server/biometrics/AuthSession.java
@@ -275,7 +275,8 @@ public final class AuthSession implements IBinder.DeathRecipient {
}
sensor.goToStateWaitingForCookie(requireConfirmation, mToken, mOperationId,
mUserId, mSensorReceiver, mOpPackageName, mRequestId, cookie,
- mPromptInfo.isAllowBackgroundAuthentication());
+ mPromptInfo.isAllowBackgroundAuthentication(),
+ mPromptInfo.isForLegacyFingerprintManager());
}
}
@@ -747,7 +748,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
Slog.v(TAG, "Confirmed! Modality: " + statsModality()
+ ", User: " + mUserId
+ ", IsCrypto: " + isCrypto()
- + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
+ + ", Client: " + getStatsClient()
+ ", RequireConfirmation: " + mPreAuthInfo.confirmationRequested
+ ", State: " + FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
+ ", Latency: " + latency
@@ -758,7 +759,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
mOperationContext,
statsModality(),
BiometricsProtoEnums.ACTION_UNKNOWN,
- BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+ getStatsClient(),
mDebugEnabled,
latency,
FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
@@ -784,7 +785,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
+ ", User: " + mUserId
+ ", IsCrypto: " + isCrypto()
+ ", Action: " + BiometricsProtoEnums.ACTION_AUTHENTICATE
- + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
+ + ", Client: " + getStatsClient()
+ ", Reason: " + reason
+ ", Error: " + error
+ ", Latency: " + latency
@@ -796,7 +797,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
mOperationContext,
statsModality(),
BiometricsProtoEnums.ACTION_AUTHENTICATE,
- BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+ getStatsClient(),
mDebugEnabled,
latency,
error,
@@ -998,6 +999,12 @@ public final class AuthSession implements IBinder.DeathRecipient {
}
}
+ private int getStatsClient() {
+ return mPromptInfo.isForLegacyFingerprintManager()
+ ? BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER
+ : BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT;
+ }
+
@Override
public String toString() {
return "State: " + mState
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStats.java b/services/core/java/com/android/server/biometrics/AuthenticationStats.java
index 707240bf41f8..3c1cc006ffda 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationStats.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStats.java
@@ -16,12 +16,16 @@
package com.android.server.biometrics;
+import android.util.Slog;
+
/**
* Utility class for on-device biometric authentication data, including total authentication,
* rejections, and the number of sent enrollment notifications.
*/
public class AuthenticationStats {
+ private static final String TAG = "AuthenticationStats";
+
private static final float FRR_NOT_ENOUGH_ATTEMPTS = -1.0f;
private final int mUserId;
@@ -88,6 +92,7 @@ public class AuthenticationStats {
public void resetData() {
mTotalAttempts = 0;
mRejectedAttempts = 0;
+ Slog.d(TAG, "Reset Counters.");
}
/** Update enrollment notification counter after sending a notification. */
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java b/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java
new file mode 100644
index 000000000000..832d73fd5d2d
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.biometrics;
+
+import android.annotation.NonNull;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.hardware.biometrics.BiometricAuthenticator;
+import android.os.UserHandle;
+import android.util.Slog;
+
+import com.android.server.biometrics.sensors.BiometricNotificationImpl;
+
+import java.util.function.Consumer;
+
+/**
+ * Receives broadcast to initialize AuthenticationStatsCollector.
+ */
+public class AuthenticationStatsBroadcastReceiver extends BroadcastReceiver {
+
+ private static final String TAG = "AuthenticationStatsBroadcastReceiver";
+
+ @NonNull
+ private final Consumer<AuthenticationStatsCollector> mCollectorConsumer;
+ @BiometricAuthenticator.Modality
+ private final int mModality;
+
+ public AuthenticationStatsBroadcastReceiver(@NonNull Context context,
+ @BiometricAuthenticator.Modality int modality,
+ @NonNull Consumer<AuthenticationStatsCollector> callback) {
+ IntentFilter intentFilter = new IntentFilter();
+ intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
+ context.registerReceiver(this, intentFilter);
+
+ mCollectorConsumer = callback;
+ mModality = modality;
+ }
+
+ @Override
+ public void onReceive(@NonNull Context context, @NonNull Intent intent) {
+ final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
+
+ if (userId != UserHandle.USER_NULL
+ && Intent.ACTION_USER_UNLOCKED.equals(intent.getAction())) {
+ Slog.d(TAG, "Received: " + intent.getAction());
+
+ mCollectorConsumer.accept(
+ new AuthenticationStatsCollector(context, mModality,
+ new BiometricNotificationImpl()));
+
+ context.unregisterReceiver(this);
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
index 64691e0b062b..6edbfb7752a1 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
@@ -59,12 +59,9 @@ public class AuthenticationStatsCollector {
private final float mThreshold;
private final int mModality;
- private boolean mPersisterInitialized = false;
@NonNull private final Map<Integer, AuthenticationStats> mUserAuthenticationStatsMap;
-
- // TODO(b/295582896): Find a way to make this NonNull
- @Nullable private AuthenticationStatsPersister mAuthenticationStatsPersister;
+ @NonNull private AuthenticationStatsPersister mAuthenticationStatsPersister;
@NonNull private BiometricNotification mBiometricNotification;
private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@@ -93,23 +90,20 @@ public class AuthenticationStatsCollector {
mFaceManager = mContext.getSystemService(FaceManager.class);
mFingerprintManager = mContext.getSystemService(FingerprintManager.class);
+ mAuthenticationStatsPersister = new AuthenticationStatsPersister(mContext);
+
+ initializeUserAuthenticationStatsMap();
+ mAuthenticationStatsPersister.persistFrrThreshold(mThreshold);
+
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_USER_REMOVED);
context.registerReceiver(mBroadcastReceiver, intentFilter);
}
private void initializeUserAuthenticationStatsMap() {
- try {
- mAuthenticationStatsPersister = new AuthenticationStatsPersister(mContext);
- for (AuthenticationStats stats :
- mAuthenticationStatsPersister.getAllFrrStats(mModality)) {
- mUserAuthenticationStatsMap.put(stats.getUserId(), stats);
- }
- mAuthenticationStatsPersister.persistFrrThreshold(mThreshold);
-
- mPersisterInitialized = true;
- } catch (IllegalStateException e) {
- Slog.w(TAG, "Failed to initialize AuthenticationStatsPersister.", e);
+ for (AuthenticationStats stats :
+ mAuthenticationStatsPersister.getAllFrrStats(mModality)) {
+ mUserAuthenticationStatsMap.put(stats.getUserId(), stats);
}
}
@@ -143,9 +137,7 @@ public class AuthenticationStatsCollector {
sendNotificationIfNeeded(userId);
- if (mPersisterInitialized) {
- persistDataIfNeeded(userId);
- }
+ persistDataIfNeeded(userId);
}
/** Check if a notification should be sent after a calculation cycle. */
@@ -188,13 +180,8 @@ public class AuthenticationStatsCollector {
}
private void onUserRemoved(final int userId) {
- if (!mPersisterInitialized) {
- initializeUserAuthenticationStatsMap();
- }
- if (mPersisterInitialized) {
- mUserAuthenticationStatsMap.remove(userId);
- mAuthenticationStatsPersister.removeFrrStats(userId);
- }
+ mUserAuthenticationStatsMap.remove(userId);
+ mAuthenticationStatsPersister.removeFrrStats(userId);
}
private boolean isSingleModalityDevice() {
diff --git a/services/core/java/com/android/server/biometrics/BiometricSensor.java b/services/core/java/com/android/server/biometrics/BiometricSensor.java
index 937e3f8f8668..42dd36a5c35a 100644
--- a/services/core/java/com/android/server/biometrics/BiometricSensor.java
+++ b/services/core/java/com/android/server/biometrics/BiometricSensor.java
@@ -106,12 +106,13 @@ public abstract class BiometricSensor {
void goToStateWaitingForCookie(boolean requireConfirmation, IBinder token, long sessionId,
int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
- long requestId, int cookie, boolean allowBackgroundAuthentication)
+ long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager)
throws RemoteException {
mCookie = cookie;
impl.prepareForAuthentication(requireConfirmation, token,
sessionId, userId, sensorReceiver, opPackageName, requestId, mCookie,
- allowBackgroundAuthentication);
+ allowBackgroundAuthentication, isForLegacyFingerprintManager);
mSensorState = STATE_WAITING_FOR_COOKIE;
}
diff --git a/services/core/java/com/android/server/biometrics/biometrics.aconfig b/services/core/java/com/android/server/biometrics/biometrics.aconfig
new file mode 100644
index 000000000000..b537e0eae548
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/biometrics.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.server.biometrics"
+
+flag {
+ name: "face_vhal_feature"
+ namespace: "biometrics_framework"
+ description: "This flag controls tunscany virtual HAL feature"
+ bug: "294254230"
+}
diff --git a/services/core/java/com/android/server/biometrics/log/BiometricLogger.java b/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
index 87037af11a84..dbef7178efd0 100644
--- a/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
+++ b/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
@@ -17,6 +17,7 @@
package com.android.server.biometrics.log;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.content.Context;
import android.hardware.SensorManager;
import android.hardware.biometrics.BiometricConstants;
@@ -42,7 +43,7 @@ public class BiometricLogger {
private final int mStatsAction;
private final int mStatsClient;
private final BiometricFrameworkStatsLogger mSink;
- @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+ @Nullable private final AuthenticationStatsCollector mAuthenticationStatsCollector;
@NonNull private final ALSProbe mALSProbe;
private long mFirstAcquireTimeMs;
@@ -68,7 +69,7 @@ public class BiometricLogger {
*/
public BiometricLogger(
@NonNull Context context, int statsModality, int statsAction, int statsClient,
- AuthenticationStatsCollector authenticationStatsCollector) {
+ @Nullable AuthenticationStatsCollector authenticationStatsCollector) {
this(statsModality, statsAction, statsClient,
BiometricFrameworkStatsLogger.getInstance(),
authenticationStatsCollector,
@@ -79,7 +80,7 @@ public class BiometricLogger {
BiometricLogger(
int statsModality, int statsAction, int statsClient,
BiometricFrameworkStatsLogger logSink,
- @NonNull AuthenticationStatsCollector statsCollector,
+ @Nullable AuthenticationStatsCollector statsCollector,
SensorManager sensorManager) {
mStatsModality = statsModality;
mStatsAction = statsAction;
@@ -206,7 +207,9 @@ public class BiometricLogger {
return;
}
- mAuthenticationStatsCollector.authenticate(targetUserId, authenticated);
+ if (mAuthenticationStatsCollector != null) {
+ mAuthenticationStatsCollector.authenticate(targetUserId, authenticated);
+ }
int authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__UNKNOWN;
if (!authenticated) {
diff --git a/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java b/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
index 6ac163121d8c..78c95ad4576b 100644
--- a/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
+++ b/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
@@ -283,7 +283,11 @@ public abstract class AuthenticationClient<T, O extends AuthenticateOptions>
}
try {
- listener.onAuthenticationFailed(getSensorId());
+ if (listener != null) {
+ listener.onAuthenticationFailed(getSensorId());
+ } else {
+ Slog.e(TAG, "Received failed auth, but client was not listening");
+ }
} catch (RemoteException e) {
Slog.e(TAG, "Unable to notify listener", e);
mCallback.onClientFinished(this, false);
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
index fb64bcc3abc1..22110037890f 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
@@ -62,7 +62,8 @@ public final class FaceAuthenticator extends IBiometricAuthenticator.Stub {
@Override
public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
long operationId, int userId, IBiometricSensorReceiver sensorReceiver,
- String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+ String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager)
throws RemoteException {
mFaceService.prepareForAuthentication(requireConfirmation, token, operationId,
sensorReceiver, new FaceAuthenticateOptions.Builder()
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
index 6f26e7b3e4b4..5084b602bff2 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
@@ -58,6 +58,7 @@ import android.view.Surface;
import com.android.internal.util.DumpUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.server.SystemService;
+import com.android.server.biometrics.Flags;
import com.android.server.biometrics.Utils;
import com.android.server.biometrics.log.BiometricContext;
import com.android.server.biometrics.sensors.BiometricStateCallback;
@@ -67,6 +68,8 @@ import com.android.server.biometrics.sensors.LockoutTracker;
import com.android.server.biometrics.sensors.face.aidl.FaceProvider;
import com.android.server.biometrics.sensors.face.hidl.Face10;
+import com.google.android.collect.Lists;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -639,15 +642,24 @@ public class FaceService extends SystemService {
provider.second.scheduleGetFeature(provider.first, token, userId, feature,
new ClientMonitorCallbackConverter(receiver), opPackageName);
}
-
- private List<ServiceProvider> getAidlProviders() {
+ @NonNull
+ private List<ServiceProvider> getHidlProviders(
+ @NonNull List<FaceSensorPropertiesInternal> hidlSensors) {
final List<ServiceProvider> providers = new ArrayList<>();
- final String[] instances = ServiceManager.getDeclaredInstances(IFace.DESCRIPTOR);
- if (instances == null || instances.length == 0) {
- return providers;
+ for (FaceSensorPropertiesInternal hidlSensor : hidlSensors) {
+ providers.add(
+ Face10.newInstance(getContext(), mBiometricStateCallback,
+ hidlSensor, mLockoutResetDispatcher));
}
+ return providers;
+ }
+
+ @NonNull
+ private List<ServiceProvider> getAidlProviders(@NonNull List<String> instances) {
+ final List<ServiceProvider> providers = new ArrayList<>();
+
for (String instance : instances) {
final String fqName = IFace.DESCRIPTOR + "/" + instance;
final IFace face = IFace.Stub.asInterface(
@@ -676,17 +688,55 @@ public class FaceService extends SystemService {
super.registerAuthenticators_enforcePermission();
mRegistry.registerAll(() -> {
- final List<ServiceProvider> providers = new ArrayList<>();
- for (FaceSensorPropertiesInternal hidlSensor : hidlSensors) {
- providers.add(
- Face10.newInstance(getContext(), mBiometricStateCallback,
- hidlSensor, mLockoutResetDispatcher));
+ List<String> aidlSensors = new ArrayList<>();
+ final String[] instances = ServiceManager.getDeclaredInstances(IFace.DESCRIPTOR);
+ if (instances != null) {
+ aidlSensors.addAll(Lists.newArrayList(instances));
}
- providers.addAll(getAidlProviders());
+
+ final Pair<List<FaceSensorPropertiesInternal>, List<String>>
+ filteredInstances = filterAvailableHalInstances(hidlSensors, aidlSensors);
+
+ final List<ServiceProvider> providers = new ArrayList<>();
+ providers.addAll(getHidlProviders(filteredInstances.first));
+ providers.addAll(getAidlProviders(filteredInstances.second));
return providers;
});
}
+ private Pair<List<FaceSensorPropertiesInternal>, List<String>>
+ filterAvailableHalInstances(
+ @NonNull List<FaceSensorPropertiesInternal> hidlInstances,
+ @NonNull List<String> aidlInstances) {
+ if ((hidlInstances.size() + aidlInstances.size()) <= 1) {
+ return new Pair(hidlInstances, aidlInstances);
+ }
+
+ if (Flags.faceVhalFeature()) {
+ Slog.i(TAG, "Face VHAL feature is on");
+ } else {
+ Slog.i(TAG, "Face VHAL feature is off");
+ }
+
+ final int virtualAt = aidlInstances.indexOf("virtual");
+ if (Flags.faceVhalFeature() && Utils.isVirtualEnabled(getContext())) {
+ if (virtualAt != -1) {
+ //only virtual instance should be returned
+ return new Pair(new ArrayList<>(), List.of(aidlInstances.get(virtualAt)));
+ } else {
+ Slog.e(TAG, "Could not find virtual interface while it is enabled");
+ return new Pair(hidlInstances, aidlInstances);
+ }
+ } else {
+ //remove virtual instance
+ aidlInstances = new ArrayList<>(aidlInstances);
+ if (virtualAt != -1) {
+ aidlInstances.remove(virtualAt);
+ }
+ return new Pair(hidlInstances, aidlInstances);
+ }
+ }
+
@Override
public void addAuthenticatorsRegisteredCallback(
IFaceAuthenticatorsRegisteredCallback callback) {
@@ -749,7 +799,7 @@ public class FaceService extends SystemService {
void syncEnrollmentsNow() {
Utils.checkPermissionOrShell(getContext(), MANAGE_FACE);
- if (Utils.isVirtualEnabled(getContext())) {
+ if (Flags.faceVhalFeature() && Utils.isVirtualEnabled(getContext())) {
Slog.i(TAG, "Sync virtual enrollments");
final int userId = ActivityManager.getCurrentUser();
for (ServiceProvider provider : mRegistry.getProviders()) {
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
index 28f0a4dadbd5..cc3118cc3433 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
@@ -49,6 +49,7 @@ import android.util.proto.ProtoOutputStream;
import android.view.Surface;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
import com.android.server.biometrics.AuthenticationStatsCollector;
import com.android.server.biometrics.Utils;
import com.android.server.biometrics.log.BiometricContext;
@@ -56,7 +57,6 @@ import com.android.server.biometrics.log.BiometricLogger;
import com.android.server.biometrics.sensors.AuthSessionCoordinator;
import com.android.server.biometrics.sensors.AuthenticationClient;
import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
import com.android.server.biometrics.sensors.BiometricScheduler;
import com.android.server.biometrics.sensors.BiometricStateCallback;
import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -114,8 +114,8 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider {
private final BiometricContext mBiometricContext;
@NonNull
private final AuthSessionCoordinator mAuthSessionCoordinator;
- @NonNull
- private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+ @Nullable
+ private AuthenticationStatsCollector mAuthenticationStatsCollector;
@Nullable
private IFace mDaemon;
@@ -177,8 +177,14 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider {
mAuthSessionCoordinator = mBiometricContext.getAuthSessionCoordinator();
mDaemon = daemon;
- mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
- BiometricsProtoEnums.MODALITY_FACE, new BiometricNotificationImpl());
+ AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+ new AuthenticationStatsBroadcastReceiver(
+ mContext,
+ BiometricsProtoEnums.MODALITY_FACE,
+ (AuthenticationStatsCollector collector) -> {
+ Slog.d(getTag(), "Initializing AuthenticationStatsCollector");
+ mAuthenticationStatsCollector = collector;
+ });
for (SensorProps prop : props) {
final int sensorId = prop.commonProps.sensorId;
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
index 808626120c1e..1499317478aa 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
@@ -52,6 +52,7 @@ import android.view.Surface;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
import com.android.server.biometrics.AuthenticationStatsCollector;
import com.android.server.biometrics.SensorServiceStateProto;
import com.android.server.biometrics.SensorStateProto;
@@ -62,7 +63,6 @@ import com.android.server.biometrics.log.BiometricLogger;
import com.android.server.biometrics.sensors.AcquisitionClient;
import com.android.server.biometrics.sensors.AuthenticationConsumer;
import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
import com.android.server.biometrics.sensors.BiometricScheduler;
import com.android.server.biometrics.sensors.BiometricStateCallback;
import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -125,7 +125,7 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider {
@Nullable private IBiometricsFace mDaemon;
@NonNull private final HalResultController mHalResultController;
@NonNull private final BiometricContext mBiometricContext;
- @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+ @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
// for requests that do not use biometric prompt
@NonNull private final AtomicLong mRequestCounter = new AtomicLong(0);
private int mCurrentUserId = UserHandle.USER_NULL;
@@ -366,8 +366,14 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider {
mCurrentUserId = UserHandle.USER_NULL;
});
- mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
- BiometricsProtoEnums.MODALITY_FACE, new BiometricNotificationImpl());
+ AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+ new AuthenticationStatsBroadcastReceiver(
+ mContext,
+ BiometricsProtoEnums.MODALITY_FACE,
+ (AuthenticationStatsCollector collector) -> {
+ Slog.d(TAG, "Initializing AuthenticationStatsCollector");
+ mAuthenticationStatsCollector = collector;
+ });
try {
ActivityManager.getService().registerUserSwitchObserver(mUserSwitchObserver, TAG);
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
index d47a57ad6742..b6fa0c126cd6 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
@@ -62,7 +62,8 @@ public final class FingerprintAuthenticator extends IBiometricAuthenticator.Stub
@Override
public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
long operationId, int userId, IBiometricSensorReceiver sensorReceiver,
- String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+ String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager)
throws RemoteException {
mFingerprintService.prepareForAuthentication(token, operationId, sensorReceiver,
new FingerprintAuthenticateOptions.Builder()
@@ -70,7 +71,7 @@ public final class FingerprintAuthenticator extends IBiometricAuthenticator.Stub
.setUserId(userId)
.setOpPackageName(opPackageName)
.build(),
- requestId, cookie, allowBackgroundAuthentication);
+ requestId, cookie, allowBackgroundAuthentication, isForLegacyFingerprintManager);
}
@Override
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
index 7cc6940f4b9d..5ce0c8b384ef 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
@@ -464,7 +464,8 @@ public class FingerprintService extends SystemService {
public void prepareForAuthentication(IBinder token, long operationId,
IBiometricSensorReceiver sensorReceiver,
@NonNull FingerprintAuthenticateOptions options,
- long requestId, int cookie, boolean allowBackgroundAuthentication) {
+ long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager) {
super.prepareForAuthentication_enforcePermission();
final ServiceProvider provider = mRegistry.getProviderForSensor(options.getSensorId());
@@ -473,10 +474,13 @@ public class FingerprintService extends SystemService {
return;
}
+ final int statsClient =
+ isForLegacyFingerprintManager ? BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER
+ : BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT;
final boolean restricted = true; // BiometricPrompt is always restricted
provider.scheduleAuthenticate(token, operationId, cookie,
new ClientMonitorCallbackConverter(sensorReceiver), options, requestId,
- restricted, BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+ restricted, statsClient,
allowBackgroundAuthentication);
}
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
index 51a938558e57..4502e5d0c4b6 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
@@ -128,7 +128,11 @@ class FingerprintDetectClient extends AcquisitionClient<AidlSession> implements
vibrateSuccess();
try {
- getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
+ if (getListener() != null) {
+ getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
+ } else {
+ Slog.e(TAG, "Listener is null!");
+ }
mCallback.onClientFinished(this, true /* success */);
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception when sending onDetected", e);
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
index 5f4b89439fd0..f74b45cbdb0e 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
@@ -57,6 +57,7 @@ import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
import com.android.server.biometrics.AuthenticationStatsCollector;
import com.android.server.biometrics.Utils;
import com.android.server.biometrics.log.BiometricContext;
@@ -64,7 +65,6 @@ import com.android.server.biometrics.log.BiometricLogger;
import com.android.server.biometrics.sensors.AuthSessionCoordinator;
import com.android.server.biometrics.sensors.AuthenticationClient;
import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
import com.android.server.biometrics.sensors.BiometricScheduler;
import com.android.server.biometrics.sensors.BiometricStateCallback;
import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -124,7 +124,7 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi
@Nullable private IUdfpsOverlayController mUdfpsOverlayController;
@Nullable private ISidefpsController mSidefpsController;
private AuthSessionCoordinator mAuthSessionCoordinator;
- @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+ @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
private final class BiometricTaskStackListener extends TaskStackListener {
@Override
@@ -184,8 +184,14 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi
mAuthSessionCoordinator = mBiometricContext.getAuthSessionCoordinator();
mDaemon = daemon;
- mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
- BiometricsProtoEnums.MODALITY_FINGERPRINT, new BiometricNotificationImpl());
+ AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+ new AuthenticationStatsBroadcastReceiver(
+ mContext,
+ BiometricsProtoEnums.MODALITY_FINGERPRINT,
+ (AuthenticationStatsCollector collector) -> {
+ Slog.d(getTag(), "Initializing AuthenticationStatsCollector");
+ mAuthenticationStatsCollector = collector;
+ });
final List<SensorLocationInternal> workaroundLocations = getWorkaroundSensorProps(context);
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
index d0b71fcf2dbb..a655f3601a07 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
@@ -52,6 +52,7 @@ import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
import com.android.server.biometrics.AuthenticationStatsCollector;
import com.android.server.biometrics.SensorServiceStateProto;
import com.android.server.biometrics.SensorStateProto;
@@ -66,7 +67,6 @@ import com.android.server.biometrics.sensors.AcquisitionClient;
import com.android.server.biometrics.sensors.AuthenticationClient;
import com.android.server.biometrics.sensors.AuthenticationConsumer;
import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
import com.android.server.biometrics.sensors.BiometricScheduler;
import com.android.server.biometrics.sensors.BiometricStateCallback;
import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -125,7 +125,7 @@ public class Fingerprint21 implements IHwBinder.DeathRecipient, ServiceProvider
@Nullable private IUdfpsOverlayController mUdfpsOverlayController;
@Nullable private ISidefpsController mSidefpsController;
@NonNull private final BiometricContext mBiometricContext;
- @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+ @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
// for requests that do not use biometric prompt
@NonNull private final AtomicLong mRequestCounter = new AtomicLong(0);
private int mCurrentUserId = UserHandle.USER_NULL;
@@ -354,8 +354,14 @@ public class Fingerprint21 implements IHwBinder.DeathRecipient, ServiceProvider
mCurrentUserId = UserHandle.USER_NULL;
});
- mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
- BiometricsProtoEnums.MODALITY_FINGERPRINT, new BiometricNotificationImpl());
+ AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+ new AuthenticationStatsBroadcastReceiver(
+ mContext,
+ BiometricsProtoEnums.MODALITY_FINGERPRINT,
+ (AuthenticationStatsCollector collector) -> {
+ Slog.d(TAG, "Initializing AuthenticationStatsCollector");
+ mAuthenticationStatsCollector = collector;
+ });
try {
ActivityManager.getService().registerUserSwitchObserver(mUserSwitchObserver, TAG);
diff --git a/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
index 5c0c3626037a..01d1e378a735 100644
--- a/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
@@ -59,7 +59,8 @@ public final class IrisAuthenticator extends IBiometricAuthenticator.Stub {
@Override
public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
long sessionId, int userId, IBiometricSensorReceiver sensorReceiver,
- String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+ String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+ boolean isForLegacyFingerprintManager)
throws RemoteException {
}
diff --git a/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java b/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
index d4232ab60eec..6bed42b54bd9 100644
--- a/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
+++ b/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
@@ -323,10 +323,15 @@ final class ConversionUtils {
static ProgramIdentifier identifierToHalProgramIdentifier(ProgramSelector.Identifier id) {
ProgramIdentifier hwId = new ProgramIdentifier();
hwId.type = id.getType();
- if (hwId.type == ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT) {
+ if (id.getType() == ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT) {
hwId.type = IdentifierType.DAB_SID_EXT;
}
- hwId.value = id.getValue();
+ long value = id.getValue();
+ if (id.getType() == ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT) {
+ hwId.value = (value & 0xFFFF) | ((value >>> 16) << 32);
+ } else {
+ hwId.value = value;
+ }
return hwId;
}
@@ -584,6 +589,9 @@ final class ConversionUtils {
|| isNewIdentifierInU(info.getPhysicallyTunedTo())) {
return false;
}
+ if (info.getRelatedContent() == null) {
+ return true;
+ }
Iterator<ProgramSelector.Identifier> relatedContentIt = info.getRelatedContent().iterator();
while (relatedContentIt.hasNext()) {
if (isNewIdentifierInU(relatedContentIt.next())) {
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index e072eeb5ca30..8736a53bb9f5 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -3046,7 +3046,7 @@ public class SyncManager {
public static void sendMessage(Message message) {
final SyncManager instance = getInstance();
- if (instance != null) {
+ if (instance != null && instance.mSyncHandler != null) {
instance.mSyncHandler.sendMessage(message);
}
}
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index d88fe8a6c201..d2aff254890d 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -324,7 +324,8 @@ public final class DreamManagerService extends SystemService {
pw.println("mWhenToDream=" + mWhenToDream);
pw.println("mKeepDreamingWhenUnpluggingDefault=" + mKeepDreamingWhenUnpluggingDefault);
pw.println("getDozeComponent()=" + getDozeComponent());
- pw.println("mDreamOverlayServiceName=" + mDreamOverlayServiceName.flattenToString());
+ pw.println("mDreamOverlayServiceName="
+ + ComponentName.flattenToShortString(mDreamOverlayServiceName));
pw.println();
DumpUtils.dumpAsync(mHandler, (pw1, prefix) -> mController.dump(pw1), pw, "", 200);
diff --git a/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java b/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
index 2ede56dcecd9..a2c8748a9142 100644
--- a/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
+++ b/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
@@ -62,10 +62,10 @@ class GestureMonitorSpyWindow {
mWindowHandle.ownerUid = uid;
mWindowHandle.scaleFactor = 1.0f;
mWindowHandle.replaceTouchableRegionWithCrop(null /* use this surface's bounds */);
- mWindowHandle.inputConfig =
- InputConfig.NOT_FOCUSABLE | InputConfig.SPY | InputConfig.TRUSTED_OVERLAY;
+ mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.SPY;
final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
t.setInputWindowInfo(mInputSurface, mWindowHandle);
t.setLayer(mInputSurface, InputManagerService.INPUT_OVERLAY_LAYER_GESTURE_MONITOR);
t.setPosition(mInputSurface, 0, 0);
diff --git a/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java b/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
index 7726f40fa2ae..dbbbed31df76 100644
--- a/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
+++ b/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
@@ -57,13 +57,13 @@ final class HandwritingEventReceiverSurface {
InputConfig.NOT_FOCUSABLE
| InputConfig.NOT_TOUCHABLE
| InputConfig.SPY
- | InputConfig.INTERCEPTS_STYLUS
- | InputConfig.TRUSTED_OVERLAY;
+ | InputConfig.INTERCEPTS_STYLUS;
// Configure the surface to receive stylus events across the entire display.
mWindowHandle.replaceTouchableRegionWithCrop(null /* use this surface's bounds */);
final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
t.setInputWindowInfo(mInputSurface, mWindowHandle);
t.setLayer(mInputSurface, InputManagerService.INPUT_OVERLAY_LAYER_HANDWRITING_SURFACE);
t.setPosition(mInputSurface, 0, 0);
diff --git a/services/core/java/com/android/server/inputmethod/HandwritingModeController.java b/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
index 26df16276bf5..749d6b0a7ef7 100644
--- a/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
+++ b/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
@@ -224,6 +224,7 @@ final class HandwritingModeController {
@Nullable
HandwritingSession startHandwritingSession(
int requestId, int imePid, int imeUid, IBinder focusedWindowToken) {
+ clearPendingHandwritingDelegation();
if (mHandwritingSurface == null) {
Slog.e(TAG, "Cannot start handwriting session: Handwriting was not initialized.");
return null;
diff --git a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
index 2efb0beaa567..b090334db352 100644
--- a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
+++ b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
@@ -259,19 +259,16 @@ public final class ImeTrackerService extends IImeTracker.Stub {
.withZone(ZoneId.systemDefault());
pw.print(prefix);
- pw.println("ImeTrackerService#History.mLiveEntries: "
- + mLiveEntries.size() + " elements");
+ pw.println("mLiveEntries: " + mLiveEntries.size() + " elements");
for (final var entry: mLiveEntries.values()) {
- dumpEntry(entry, pw, prefix, formatter);
+ dumpEntry(entry, pw, prefix + " ", formatter);
}
-
pw.print(prefix);
- pw.println("ImeTrackerService#History.mEntries: "
- + mEntries.size() + " elements");
+ pw.println("mEntries: " + mEntries.size() + " elements");
for (final var entry: mEntries) {
- dumpEntry(entry, pw, prefix, formatter);
+ dumpEntry(entry, pw, prefix + " ", formatter);
}
}
@@ -279,22 +276,22 @@ public final class ImeTrackerService extends IImeTracker.Stub {
private void dumpEntry(@NonNull Entry entry, @NonNull PrintWriter pw,
@NonNull String prefix, @NonNull DateTimeFormatter formatter) {
pw.print(prefix);
- pw.print(" #" + entry.mSequenceNumber);
+ pw.print("#" + entry.mSequenceNumber);
pw.print(" " + ImeTracker.Debug.typeToString(entry.mType));
pw.print(" - " + ImeTracker.Debug.statusToString(entry.mStatus));
pw.print(" - " + entry.mTag);
pw.println(" (" + entry.mDuration + "ms):");
pw.print(prefix);
- pw.print(" startTime=" + formatter.format(Instant.ofEpochMilli(entry.mStartTime)));
+ pw.print(" startTime=" + formatter.format(Instant.ofEpochMilli(entry.mStartTime)));
pw.println(" " + ImeTracker.Debug.originToString(entry.mOrigin));
pw.print(prefix);
- pw.print(" reason=" + InputMethodDebug.softInputDisplayReasonToString(entry.mReason));
+ pw.print(" reason=" + InputMethodDebug.softInputDisplayReasonToString(entry.mReason));
pw.println(" " + ImeTracker.Debug.phaseToString(entry.mPhase));
pw.print(prefix);
- pw.println(" requestWindowName=" + entry.mRequestWindowName);
+ pw.println(" requestWindowName=" + entry.mRequestWindowName);
}
/** A history entry. */
diff --git a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
index 2e0274b79d1f..0dd48ae6c9e1 100644
--- a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
+++ b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
@@ -588,12 +588,12 @@ public final class ImeVisibilityStateComputer {
proto.write(INPUT_SHOWN, mInputShown);
}
- void dump(PrintWriter pw) {
+ void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
final Printer p = new PrintWriterPrinter(pw);
- p.println(" mRequestedShowExplicitly=" + mRequestedShowExplicitly
+ p.println(prefix + "mRequestedShowExplicitly=" + mRequestedShowExplicitly
+ " mShowForced=" + mShowForced);
- p.println(" mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
- p.println(" mInputShown=" + mInputShown);
+ p.println(prefix + "mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
+ p.println(prefix + "mInputShown=" + mInputShown);
}
/**
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
index 20c7029b77cb..2fe2271bb23f 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
@@ -70,7 +70,7 @@ final class InputMethodBindingController {
@NonNull private final WindowManagerInternal mWindowManagerInternal;
@GuardedBy("ImfLock.class") private long mLastBindTime;
- @GuardedBy("ImfLock.class") private boolean mHasConnection;
+ @GuardedBy("ImfLock.class") private boolean mHasMainConnection;
@GuardedBy("ImfLock.class") @Nullable private String mCurId;
@GuardedBy("ImfLock.class") @Nullable private String mSelectedMethodId;
@GuardedBy("ImfLock.class") @Nullable private Intent mCurIntent;
@@ -137,8 +137,8 @@ final class InputMethodBindingController {
* a service (whether or not we have gotten its IBinder back yet).
*/
@GuardedBy("ImfLock.class")
- boolean hasConnection() {
- return mHasConnection;
+ boolean hasMainConnection() {
+ return mHasMainConnection;
}
/**
@@ -369,7 +369,7 @@ final class InputMethodBindingController {
unbindVisibleConnection();
}
- if (hasConnection()) {
+ if (hasMainConnection()) {
unbindMainConnection();
}
@@ -464,7 +464,7 @@ final class InputMethodBindingController {
@GuardedBy("ImfLock.class")
private void unbindMainConnection() {
mContext.unbindService(mMainConnection);
- mHasConnection = false;
+ mHasMainConnection = false;
}
@GuardedBy("ImfLock.class")
@@ -485,8 +485,9 @@ final class InputMethodBindingController {
@GuardedBy("ImfLock.class")
private boolean bindCurrentInputMethodServiceMainConnection() {
- mHasConnection = bindCurrentInputMethodService(mMainConnection, mImeConnectionBindFlags);
- return mHasConnection;
+ mHasMainConnection = bindCurrentInputMethodService(mMainConnection,
+ mImeConnectionBindFlags);
+ return mHasMainConnection;
}
/**
@@ -499,7 +500,7 @@ final class InputMethodBindingController {
void setCurrentMethodVisible() {
if (mCurMethod != null) {
if (DEBUG) Slog.d(TAG, "setCurrentMethodVisible: mCurToken=" + mCurToken);
- if (hasConnection() && !isVisibleBound()) {
+ if (hasMainConnection() && !isVisibleBound()) {
mVisibleBound = bindCurrentInputMethodService(mVisibleConnection,
IME_VISIBLE_BIND_FLAGS);
}
@@ -507,7 +508,7 @@ final class InputMethodBindingController {
}
// No IME is currently connected. Reestablish the main connection.
- if (!hasConnection()) {
+ if (!hasMainConnection()) {
if (DEBUG) {
Slog.d(TAG, "Cannot show input: no IME bound. Rebinding.");
}
@@ -528,7 +529,7 @@ final class InputMethodBindingController {
bindCurrentInputMethodServiceMainConnection();
} else {
if (DEBUG) {
- Slog.d(TAG, "Can't show input: connection = " + mHasConnection + ", time = "
+ Slog.d(TAG, "Can't show input: connection = " + mHasMainConnection + ", time = "
+ (TIME_TO_RECONNECT - bindingDuration));
}
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 131eec36f403..699e9c8bcfe0 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -358,12 +358,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
@Override
public String toString() {
- return "SessionState{uid " + mClient.mUid + " pid " + mClient.mPid
- + " method " + Integer.toHexString(
+ return "SessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
+ + " method=" + Integer.toHexString(
IInputMethodInvoker.getBinderIdentityHashCode(mMethod))
- + " session " + Integer.toHexString(
+ + " session=" + Integer.toHexString(
System.identityHashCode(mSession))
- + " channel " + mChannel
+ + " channel=" + mChannel
+ "}";
}
@@ -388,9 +388,9 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
@Override
public String toString() {
- return "AccessibilitySessionState{uid " + mClient.mUid + " pid " + mClient.mPid
- + " id " + Integer.toHexString(mId)
- + " session " + Integer.toHexString(
+ return "AccessibilitySessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
+ + " id=" + Integer.toHexString(mId)
+ + " session=" + Integer.toHexString(
System.identityHashCode(mSession))
+ "}";
}
@@ -603,7 +603,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
*/
@GuardedBy("ImfLock.class")
private boolean hasConnectionLocked() {
- return mBindingController.hasConnection();
+ return mBindingController.hasMainConnection();
}
/** The token tracking the current IME request or {@code null} otherwise. */
@@ -884,47 +884,47 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
continue;
}
pw.print(prefix);
- pw.println("SoftInputShowHideHistory #" + entry.mSequenceNumber + ":");
+ pw.println("SoftInputShowHide #" + entry.mSequenceNumber + ":");
pw.print(prefix);
- pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+ pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+ " (timestamp=" + entry.mTimestamp + ")");
pw.print(prefix);
- pw.print(" reason=" + InputMethodDebug.softInputDisplayReasonToString(
+ pw.print(" reason=" + InputMethodDebug.softInputDisplayReasonToString(
entry.mReason));
pw.println(" inFullscreenMode=" + entry.mInFullscreenMode);
pw.print(prefix);
- pw.println(" requestClient=" + entry.mClientState);
+ pw.println(" requestClient=" + entry.mClientState);
pw.print(prefix);
- pw.println(" focusedWindowName=" + entry.mFocusedWindowName);
+ pw.println(" focusedWindowName=" + entry.mFocusedWindowName);
pw.print(prefix);
- pw.println(" requestWindowName=" + entry.mRequestWindowName);
+ pw.println(" requestWindowName=" + entry.mRequestWindowName);
pw.print(prefix);
- pw.println(" imeControlTargetName=" + entry.mImeControlTargetName);
+ pw.println(" imeControlTargetName=" + entry.mImeControlTargetName);
pw.print(prefix);
- pw.println(" imeTargetNameFromWm=" + entry.mImeTargetNameFromWm);
+ pw.println(" imeTargetNameFromWm=" + entry.mImeTargetNameFromWm);
pw.print(prefix);
- pw.println(" imeSurfaceParentName=" + entry.mImeSurfaceParentName);
+ pw.println(" imeSurfaceParentName=" + entry.mImeSurfaceParentName);
pw.print(prefix);
- pw.print(" editorInfo: ");
+ pw.print(" editorInfo:");
if (entry.mEditorInfo != null) {
pw.print(" inputType=" + entry.mEditorInfo.inputType);
pw.print(" privateImeOptions=" + entry.mEditorInfo.privateImeOptions);
pw.println(" fieldId (viewId)=" + entry.mEditorInfo.fieldId);
} else {
- pw.println("null");
+ pw.println(" null");
}
pw.print(prefix);
- pw.println(" focusedWindowSoftInputMode=" + InputMethodDebug.softInputModeToString(
+ pw.println(" focusedWindowSoftInputMode=" + InputMethodDebug.softInputModeToString(
entry.mFocusedWindowSoftInputMode));
}
}
@@ -1052,30 +1052,30 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
pw.println("StartInput #" + entry.mSequenceNumber + ":");
pw.print(prefix);
- pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+ pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+ " (timestamp=" + entry.mTimestamp + ")"
+ " reason="
+ InputMethodDebug.startInputReasonToString(entry.mStartInputReason)
+ " restarting=" + entry.mRestarting);
pw.print(prefix);
- pw.print(" imeToken=" + entry.mImeTokenString + " [" + entry.mImeId + "]");
+ pw.print(" imeToken=" + entry.mImeTokenString + " [" + entry.mImeId + "]");
pw.print(" imeUserId=" + entry.mImeUserId);
pw.println(" imeDisplayId=" + entry.mImeDisplayId);
pw.print(prefix);
- pw.println(" targetWin=" + entry.mTargetWindowString
+ pw.println(" targetWin=" + entry.mTargetWindowString
+ " [" + entry.mEditorInfo.packageName + "]"
+ " targetUserId=" + entry.mTargetUserId
+ " targetDisplayId=" + entry.mTargetDisplayId
+ " clientBindSeq=" + entry.mClientBindSequenceNumber);
pw.print(prefix);
- pw.println(" softInputMode=" + InputMethodDebug.softInputModeToString(
+ pw.println(" softInputMode=" + InputMethodDebug.softInputModeToString(
entry.mTargetWindowSoftInputMode));
pw.print(prefix);
- pw.println(" inputType=0x" + Integer.toHexString(entry.mEditorInfo.inputType)
+ pw.println(" inputType=0x" + Integer.toHexString(entry.mEditorInfo.inputType)
+ " imeOptions=0x" + Integer.toHexString(entry.mEditorInfo.imeOptions)
+ " fieldId=0x" + Integer.toHexString(entry.mEditorInfo.fieldId)
+ " fieldName=" + entry.mEditorInfo.fieldName
@@ -3369,13 +3369,19 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
@BinderThread
@Override
public void startStylusHandwriting(IInputMethodClient client) {
+ startStylusHandwriting(client, false /* usesDelegation */);
+ }
+
+ private void startStylusHandwriting(IInputMethodClient client, boolean usesDelegation) {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.startStylusHandwriting");
try {
ImeTracing.getInstance().triggerManagerServiceDump(
"InputMethodManagerService#startStylusHandwriting");
int uid = Binder.getCallingUid();
synchronized (ImfLock.class) {
- mHwController.clearPendingHandwritingDelegation();
+ if (!usesDelegation) {
+ mHwController.clearPendingHandwritingDelegation();
+ }
if (!canInteractWithImeLocked(uid, client, "startStylusHandwriting",
null /* statsToken */)) {
return;
@@ -3457,7 +3463,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
return false;
}
- startStylusHandwriting(client);
+ startStylusHandwriting(client, true /* usesDelegation */);
return true;
}
@@ -5946,11 +5952,11 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
p.println(" InputMethod #" + i + ":");
info.dump(p, " ");
}
- p.println(" Clients:");
+ p.println(" ClientStates:");
final int numClients = mClients.size();
for (int i = 0; i < numClients; ++i) {
final ClientState ci = mClients.valueAt(i);
- p.println(" Client " + ci + ":");
+ p.println(" " + ci + ":");
p.println(" client=" + ci.mClient);
p.println(" fallbackInputConnection=" + ci.mFallbackInputConnection);
p.println(" sessionRequested=" + ci.mSessionRequested);
@@ -5977,7 +5983,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
method = getCurMethodLocked();
p.println(" mCurMethod=" + getCurMethodLocked());
p.println(" mEnabledSession=" + mEnabledSession);
- mVisibilityStateComputer.dump(pw);
+ mVisibilityStateComputer.dump(pw, " ");
p.println(" mInFullscreenMode=" + mInFullscreenMode);
p.println(" mSystemReady=" + mSystemReady + " mInteractive=" + mIsInteractive);
p.println(" ENABLE_HIDE_IME_CAPTION_BAR="
@@ -5991,13 +5997,13 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
mSettings.dumpLocked(p, " ");
p.println(" mStartInputHistory:");
- mStartInputHistory.dump(pw, " ");
+ mStartInputHistory.dump(pw, " ");
p.println(" mSoftInputShowHideHistory:");
- mSoftInputShowHideHistory.dump(pw, " ");
+ mSoftInputShowHideHistory.dump(pw, " ");
p.println(" mImeTrackerService#History:");
- mImeTrackerService.dump(pw, " ");
+ mImeTrackerService.dump(pw, " ");
}
// Exit here for critical dump, as remaining sections require IPCs to other processes.
diff --git a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
index 487346763f0f..7cf6eae892ed 100644
--- a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
+++ b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
@@ -154,6 +154,23 @@ class AudioPlayerStateMonitor {
}
/**
+ * Returns whether the given uid corresponds to the last process to audio or not.
+ *
+ * <p> This is useful for handling the cases where the foreground app is playing media without
+ * a media session. Then, volume events should affect the local music stream rather than other
+ * media sessions.
+ *
+ * @return {@code true} if the given uid corresponds to the last process to audio or
+ * {@code false} otherwise.
+ */
+ public boolean hasUidPlayedAudioLast(int uid) {
+ synchronized (mLock) {
+ return !mSortedAudioPlaybackClientUids.isEmpty()
+ && uid == mSortedAudioPlaybackClientUids.get(0);
+ }
+ }
+
+ /**
* Returns if the audio playback is active for the uid.
*/
public boolean isPlaybackActive(int uid) {
@@ -234,7 +251,7 @@ class AudioPlayerStateMonitor {
}
}
- // Update mSortedAuioPlaybackClientUids.
+ // Update mSortedAudioPlaybackClientUids.
for (int i = 0; i < activeAudioPlaybackConfigs.size(); ++i) {
AudioPlaybackConfiguration config = activeAudioPlaybackConfigs.valueAt(i);
final int uid = config.getClientUid();
diff --git a/services/core/java/com/android/server/media/BluetoothRouteController.java b/services/core/java/com/android/server/media/BluetoothRouteController.java
index 66985e0b2533..ddeeacc76579 100644
--- a/services/core/java/com/android/server/media/BluetoothRouteController.java
+++ b/services/core/java/com/android/server/media/BluetoothRouteController.java
@@ -24,6 +24,8 @@ import android.content.Context;
import android.media.MediaRoute2Info;
import android.os.UserHandle;
+import com.android.media.flags.Flags;
+
import java.util.Collections;
import java.util.List;
import java.util.Objects;
@@ -53,15 +55,10 @@ import java.util.Objects;
return new NoOpBluetoothRouteController();
}
- MediaFeatureFlagManager flagManager = MediaFeatureFlagManager.getInstance();
- boolean isUsingLegacyController = flagManager.getBoolean(
- MediaFeatureFlagManager.FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
- true);
-
- if (isUsingLegacyController) {
- return new LegacyBluetoothRouteController(context, btAdapter, listener);
- } else {
+ if (Flags.enableAudioPoliciesDeviceAndBluetoothController()) {
return new AudioPoliciesBluetoothRouteController(context, btAdapter, listener);
+ } else {
+ return new LegacyBluetoothRouteController(context, btAdapter, listener);
}
}
diff --git a/services/core/java/com/android/server/media/DeviceRouteController.java b/services/core/java/com/android/server/media/DeviceRouteController.java
index 3875c84e618b..e17f4a3fd42f 100644
--- a/services/core/java/com/android/server/media/DeviceRouteController.java
+++ b/services/core/java/com/android/server/media/DeviceRouteController.java
@@ -25,6 +25,8 @@ import android.media.IAudioService;
import android.media.MediaRoute2Info;
import android.os.ServiceManager;
+import com.android.media.flags.Flags;
+
/**
* Controls device routes.
*
@@ -44,18 +46,13 @@ import android.os.ServiceManager;
IAudioService audioService = IAudioService.Stub.asInterface(
ServiceManager.getService(Context.AUDIO_SERVICE));
- MediaFeatureFlagManager flagManager = MediaFeatureFlagManager.getInstance();
- boolean isUsingLegacyController = flagManager.getBoolean(
- MediaFeatureFlagManager.FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
- true);
-
- if (isUsingLegacyController) {
- return new LegacyDeviceRouteController(context,
+ if (Flags.enableAudioPoliciesDeviceAndBluetoothController()) {
+ return new AudioPoliciesDeviceRouteController(context,
audioManager,
audioService,
onDeviceRouteChangedListener);
} else {
- return new AudioPoliciesDeviceRouteController(context,
+ return new LegacyDeviceRouteController(context,
audioManager,
audioService,
onDeviceRouteChangedListener);
diff --git a/services/core/java/com/android/server/media/MediaFeatureFlagManager.java b/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
index f55550509f46..f90f64a19301 100644
--- a/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
+++ b/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
@@ -36,7 +36,6 @@ import java.lang.annotation.Target;
@StringDef(
prefix = "FEATURE_",
value = {
- FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
FEATURE_SCANNING_MINIMUM_PACKAGE_IMPORTANCE
})
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@@ -44,14 +43,6 @@ import java.lang.annotation.Target;
/* package */ @interface MediaFeatureFlag {}
/**
- * Whether to use old legacy implementation of BluetoothRouteController or new
- * 'Audio Strategies'-aware controller.
- */
- /* package */ static final @MediaFeatureFlag String
- FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER =
- "BluetoothRouteController__enable_legacy_bluetooth_routes_controller";
-
- /**
* Whether to use IMPORTANCE_FOREGROUND (i.e. 100) or IMPORTANCE_FOREGROUND_SERVICE (i.e. 125)
* as the minimum package importance for scanning.
*/
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index e53835548e12..4892c22449cb 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -2100,34 +2100,36 @@ class MediaRouter2ServiceImpl {
if (!hasAddedOrModifiedRoutes && !hasRemovedRoutes) {
return;
}
- List<RouterRecord> routerRecordsWithModifyAudioRoutingPermission =
- getRouterRecords(true);
- List<RouterRecord> routerRecordsWithoutModifyAudioRoutingPermission =
- getRouterRecords(false);
+ List<RouterRecord> routerRecordsWithSystemRoutingPermission =
+ getRouterRecords(/* hasSystemRoutingPermission= */ true);
+ List<RouterRecord> routerRecordsWithoutSystemRoutingPermission =
+ getRouterRecords(/* hasSystemRoutingPermission= */ false);
List<IMediaRouter2Manager> managers = getManagers();
// Managers receive all provider updates with all routes.
notifyRoutesUpdatedToManagers(
managers, new ArrayList<>(mLastNotifiedRoutesToPrivilegedRouters.values()));
- // Routers with modify audio permission (usually system routers) receive all provider
- // updates with all routes.
+ // Routers with system routing access (either via {@link MODIFY_AUDIO_ROUTING} or
+ // {@link BLUETOOTH_CONNECT} + {@link BLUETOOTH_SCAN}) receive all provider updates
+ // with all routes.
notifyRoutesUpdatedToRouterRecords(
- routerRecordsWithModifyAudioRoutingPermission,
+ routerRecordsWithSystemRoutingPermission,
new ArrayList<>(mLastNotifiedRoutesToPrivilegedRouters.values()));
if (!isSystemProvider) {
// Regular routers receive updates from all non-system providers with all non-system
// routes.
notifyRoutesUpdatedToRouterRecords(
- routerRecordsWithoutModifyAudioRoutingPermission,
+ routerRecordsWithoutSystemRoutingPermission,
new ArrayList<>(mLastNotifiedRoutesToNonPrivilegedRouters.values()));
} else if (hasAddedOrModifiedRoutes) {
- // On system provider updates, regular routers receive the updated default route.
- // This is the only system route they should receive.
+ // On system provider updates, routers without system routing access
+ // receive the updated default route. This is the only system route they should
+ // receive.
mLastNotifiedRoutesToNonPrivilegedRouters.put(defaultRoute.getId(), defaultRoute);
notifyRoutesUpdatedToRouterRecords(
- routerRecordsWithoutModifyAudioRoutingPermission,
+ routerRecordsWithoutSystemRoutingPermission,
new ArrayList<>(mLastNotifiedRoutesToNonPrivilegedRouters.values()));
}
}
@@ -2533,7 +2535,7 @@ class MediaRouter2ServiceImpl {
}
}
- private List<RouterRecord> getRouterRecords(boolean hasModifyAudioRoutingPermission) {
+ private List<RouterRecord> getRouterRecords(boolean hasSystemRoutingPermission) {
MediaRouter2ServiceImpl service = mServiceRef.get();
List<RouterRecord> routerRecords = new ArrayList<>();
if (service == null) {
@@ -2541,7 +2543,7 @@ class MediaRouter2ServiceImpl {
}
synchronized (service.mLock) {
for (RouterRecord routerRecord : mUserRecord.mRouterRecords) {
- if (hasModifyAudioRoutingPermission
+ if (hasSystemRoutingPermission
== routerRecord.hasSystemRoutingPermission()) {
routerRecords.add(routerRecord);
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index f4c95185210a..803ab28f2a65 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -19,7 +19,6 @@ package com.android.server.media;
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.os.UserHandle.ALL;
import static android.os.UserHandle.CURRENT;
-
import static com.android.server.media.MediaKeyDispatcher.KEY_EVENT_LONG_PRESS;
import static com.android.server.media.MediaKeyDispatcher.isDoubleTapOverridden;
import static com.android.server.media.MediaKeyDispatcher.isLongPressOverridden;
@@ -85,6 +84,7 @@ import android.view.ViewConfiguration;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
+import com.android.media.flags.Flags;
import com.android.server.LocalManagerRegistry;
import com.android.server.LocalServices;
import com.android.server.SystemService;
@@ -2192,6 +2192,21 @@ public class MediaSessionService extends SystemService implements Monitor {
isValidLocalStreamType(suggestedStream)
&& AudioSystem.isStreamActive(suggestedStream, 0);
+ if (session != null && session.getUid() != uid
+ && mAudioPlayerStateMonitor.hasUidPlayedAudioLast(uid)) {
+ if (Flags.adjustVolumeForForegroundAppPlayingAudioWithoutMediaSession()) {
+ // The app in the foreground has been the last app to play media locally.
+ // Therefore, We ignore the chosen session so that volume events affect the
+ // local music stream instead. See b/275185436 for details.
+ Log.d(TAG, "Ignoring session=" + session + " and adjusting suggestedStream="
+ + suggestedStream + " instead");
+ session = null;
+ } else {
+ Log.d(TAG, "Session=" + session + " will not be not ignored and will receive"
+ + " the volume adjustment event");
+ }
+ }
+
if (session == null || preferSuggestedStream) {
if (DEBUG_KEY_EVENT) {
Log.d(TAG, "Adjusting suggestedStream=" + suggestedStream + " by " + direction
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index ec071a73d74f..bada8165766c 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2047,7 +2047,6 @@ public class NotificationManagerService extends SystemService {
protected class StrongAuthTracker extends LockPatternUtils.StrongAuthTracker {
SparseBooleanArray mUserInLockDownMode = new SparseBooleanArray();
- boolean mIsInLockDownMode = false;
StrongAuthTracker(Context context) {
super(context);
@@ -2827,9 +2826,6 @@ public class NotificationManagerService extends SystemService {
mAssistants.onBootPhaseAppsCanStart();
mConditionProviders.onBootPhaseAppsCanStart();
mHistoryManager.onBootPhaseAppsCanStart();
- if (expireBitmaps()) {
- NotificationBitmapJobService.scheduleJob(getContext());
- }
registerDeviceConfigChange();
migrateDefaultNAS();
maybeShowInitialReviewPermissionsNotification();
@@ -2838,6 +2834,10 @@ public class NotificationManagerService extends SystemService {
} else if (phase == SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY) {
mPreferencesHelper.updateFixedImportance(mUm.getUsers());
mPreferencesHelper.migrateNotificationPermissions(mUm.getUsers());
+ } else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
+ if (expireBitmaps()) {
+ NotificationBitmapJobService.scheduleJob(getContext());
+ }
}
}
@@ -6631,8 +6631,7 @@ public class NotificationManagerService extends SystemService {
}
};
- @VisibleForTesting
- static boolean isBigPictureWithBitmapOrIcon(Notification n) {
+ private static boolean isBigPictureWithBitmapOrIcon(Notification n) {
final boolean isBigPicture = n.isStyle(Notification.BigPictureStyle.class);
if (!isBigPicture) {
return false;
@@ -6650,15 +6649,12 @@ public class NotificationManagerService extends SystemService {
return false;
}
- @VisibleForTesting
- // TODO(b/298414239) Unit test via public API
- static boolean isBitmapExpired(long timePostedMs, long timeNowMs, long timeToLiveMs) {
+ private static boolean isBitmapExpired(long timePostedMs, long timeNowMs, long timeToLiveMs) {
final long timeDiff = timeNowMs - timePostedMs;
return timeDiff > timeToLiveMs;
}
- @VisibleForTesting
- void removeBitmapAndRepost(NotificationRecord r) {
+ private void removeBitmapAndRepost(NotificationRecord r) {
if (!isBigPictureWithBitmapOrIcon(r.getNotification())) {
return;
}
diff --git a/services/core/java/com/android/server/notification/OWNERS b/services/core/java/com/android/server/notification/OWNERS
index 6c4dd6d13d92..72c4529a73eb 100644
--- a/services/core/java/com/android/server/notification/OWNERS
+++ b/services/core/java/com/android/server/notification/OWNERS
@@ -1,4 +1,4 @@
-# Bug component: 34005
+# Bug component: 1305560
juliacr@google.com
yurilin@google.com
diff --git a/services/core/java/com/android/server/pm/Android.bp b/services/core/java/com/android/server/pm/Android.bp
deleted file mode 100644
index 89c0124d2cd4..000000000000
--- a/services/core/java/com/android/server/pm/Android.bp
+++ /dev/null
@@ -1,12 +0,0 @@
-aconfig_declarations {
- name: "pm_flags",
- package: "com.android.server.pm",
- srcs: [
- "*.aconfig",
- ],
-}
-
-java_aconfig_library {
- name: "pm_flags_lib",
- aconfig_declarations: "pm_flags",
-}
diff --git a/services/core/java/com/android/server/pm/IPackageManagerBase.java b/services/core/java/com/android/server/pm/IPackageManagerBase.java
index 8f7b7217d005..76203ac7650d 100644
--- a/services/core/java/com/android/server/pm/IPackageManagerBase.java
+++ b/services/core/java/com/android/server/pm/IPackageManagerBase.java
@@ -30,7 +30,6 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageArchiverService;
import android.content.pm.IPackageDeleteObserver;
import android.content.pm.IPackageDeleteObserver2;
import android.content.pm.IPackageInstaller;
@@ -100,9 +99,6 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
private final PackageInstallerService mInstallerService;
@NonNull
- private final PackageArchiverService mPackageArchiverService;
-
- @NonNull
private final PackageProperty mPackageProperty;
@NonNull
@@ -131,8 +127,7 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
@Nullable ComponentName instantAppResolverSettingsComponent,
@NonNull String requiredSupplementalProcessPackage,
@Nullable String servicesExtensionPackageName,
- @Nullable String sharedSystemSharedLibraryPackageName,
- @NonNull PackageArchiverService packageArchiverService) {
+ @Nullable String sharedSystemSharedLibraryPackageName) {
mService = service;
mContext = context;
mDexOptHelper = dexOptHelper;
@@ -148,7 +143,6 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
mRequiredSupplementalProcessPackage = requiredSupplementalProcessPackage;
mServicesExtensionPackageName = servicesExtensionPackageName;
mSharedSystemSharedLibraryPackageName = sharedSystemSharedLibraryPackageName;
- mPackageArchiverService = packageArchiverService;
}
protected Computer snapshot() {
@@ -622,12 +616,6 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
@Override
@Deprecated
- public final IPackageArchiverService getPackageArchiverService() {
- return mPackageArchiverService;
- }
-
- @Override
- @Deprecated
public final void getPackageSizeInfo(final String packageName, int userId,
final IPackageStatsObserver observer) {
throw new UnsupportedOperationException(
diff --git a/services/core/java/com/android/server/pm/PackageArchiverService.java b/services/core/java/com/android/server/pm/PackageArchiver.java
index e0524077e9c1..64cdca3b5784 100644
--- a/services/core/java/com/android/server/pm/PackageArchiverService.java
+++ b/services/core/java/com/android/server/pm/PackageArchiver.java
@@ -31,10 +31,8 @@ import android.app.BroadcastOptions;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
-import android.content.pm.IPackageArchiverService;
import android.content.pm.LauncherActivityInfo;
import android.content.pm.LauncherApps;
-import android.content.pm.PackageArchiver;
import android.content.pm.PackageInstaller;
import android.content.pm.PackageManager;
import android.content.pm.VersionedPackage;
@@ -74,7 +72,7 @@ import java.util.concurrent.CompletableFuture;
* while the data directory is kept. Archived apps are included in the list of launcher apps where
* tapping them re-installs the full app.
*/
-public class PackageArchiverService extends IPackageArchiverService.Stub {
+public class PackageArchiver {
private static final String TAG = "PackageArchiverService";
@@ -93,13 +91,12 @@ public class PackageArchiverService extends IPackageArchiverService.Stub {
@Nullable
private LauncherApps mLauncherApps;
- public PackageArchiverService(Context context, PackageManagerService mPm) {
+ PackageArchiver(Context context, PackageManagerService mPm) {
this.mContext = context;
this.mPm = mPm;
}
- @Override
- public void requestArchive(
+ void requestArchive(
@NonNull String packageName,
@NonNull String callerPackageName,
@NonNull IntentSender intentSender,
@@ -112,10 +109,11 @@ public class PackageArchiverService extends IPackageArchiverService.Stub {
Computer snapshot = mPm.snapshotComputer();
int userId = userHandle.getIdentifier();
int binderUid = Binder.getCallingUid();
- int providedUid = snapshot.getPackageUid(callerPackageName, 0, userId);
+ if (!PackageManagerServiceUtils.isRootOrShell(binderUid)) {
+ verifyCaller(snapshot.getPackageUid(callerPackageName, 0, userId), binderUid);
+ }
snapshot.enforceCrossUserPermission(binderUid, userId, true, true,
"archiveApp");
- verifyCaller(providedUid, binderUid);
CompletableFuture<ArchiveState> archiveStateFuture;
try {
archiveStateFuture = createArchiveState(packageName, userId);
@@ -233,8 +231,7 @@ public class PackageArchiverService extends IPackageArchiverService.Stub {
return true;
}
- @Override
- public void requestUnarchive(
+ void requestUnarchive(
@NonNull String packageName,
@NonNull String callerPackageName,
@NonNull UserHandle userHandle) {
@@ -245,10 +242,11 @@ public class PackageArchiverService extends IPackageArchiverService.Stub {
Computer snapshot = mPm.snapshotComputer();
int userId = userHandle.getIdentifier();
int binderUid = Binder.getCallingUid();
- int providedUid = snapshot.getPackageUid(callerPackageName, 0, userId);
+ if (!PackageManagerServiceUtils.isRootOrShell(binderUid)) {
+ verifyCaller(snapshot.getPackageUid(callerPackageName, 0, userId), binderUid);
+ }
snapshot.enforceCrossUserPermission(binderUid, userId, true, true,
"unarchiveApp");
- verifyCaller(providedUid, binderUid);
PackageStateInternal ps;
try {
ps = getPackageState(packageName, snapshot, binderUid, userId);
@@ -290,8 +288,8 @@ public class PackageArchiverService extends IPackageArchiverService.Stub {
int userId = userHandle.getIdentifier();
Intent unarchiveIntent = new Intent(Intent.ACTION_UNARCHIVE_PACKAGE);
unarchiveIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
- unarchiveIntent.putExtra(PackageArchiver.EXTRA_UNARCHIVE_PACKAGE_NAME, packageName);
- unarchiveIntent.putExtra(PackageArchiver.EXTRA_UNARCHIVE_ALL_USERS,
+ unarchiveIntent.putExtra(PackageInstaller.EXTRA_UNARCHIVE_PACKAGE_NAME, packageName);
+ unarchiveIntent.putExtra(PackageInstaller.EXTRA_UNARCHIVE_ALL_USERS,
userId == UserHandle.USER_ALL);
unarchiveIntent.setPackage(installerPackage);
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index fabef7609546..95b565d235cb 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -18,9 +18,7 @@ package com.android.server.pm;
import static android.app.admin.DevicePolicyResources.Strings.Core.PACKAGE_DELETED_BY_DO;
import static android.os.Process.INVALID_UID;
-
import static com.android.server.pm.PackageManagerService.SHELL_PACKAGE_NAME;
-
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.START_TAG;
@@ -182,6 +180,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
Manifest.permission.USE_FULL_SCREEN_INTENT
);
+ final PackageArchiver mPackageArchiver;
+
private final Context mContext;
private final PackageManagerService mPm;
private final ApexManager mApexManager;
@@ -301,6 +301,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
apexParserSupplier, mInstallThread.getLooper());
mGentleUpdateHelper = new GentleUpdateHelper(
context, mInstallThread.getLooper(), new AppStateHelper(context));
+ mPackageArchiver = new PackageArchiver(mContext, mPm);
LocalServices.getService(SystemServiceManager.class).startService(
new Lifecycle(context, this));
@@ -1504,6 +1505,24 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
mSilentUpdatePolicy.setSilentUpdatesThrottleTime(throttleTimeInSeconds);
}
+ @Override
+ public void requestArchive(
+ @NonNull String packageName,
+ @NonNull String callerPackageName,
+ @NonNull IntentSender intentSender,
+ @NonNull UserHandle userHandle) {
+ mPackageArchiver.requestArchive(packageName, callerPackageName, intentSender,
+ userHandle);
+ }
+
+ @Override
+ public void requestUnarchive(
+ @NonNull String packageName,
+ @NonNull String callerPackageName,
+ @NonNull UserHandle userHandle) {
+ mPackageArchiver.requestUnarchive(packageName, callerPackageName, userHandle);
+ }
+
private static int getSessionCount(SparseArray<PackageInstallerSession> sessions,
int installerUid) {
int count = 0;
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 0dd4111adbfa..2e9da099b86c 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -3396,7 +3396,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
}
if (!isInstalledByAdb(getInstallSource().mInitiatingPackageName)
- && !mPm.mArchiverService.verifySupportsUnarchival(
+ && !mPm.mInstallerService.mPackageArchiver.verifySupportsUnarchival(
getInstallSource().mInstallerPackageName)) {
throw new PackageManagerException(
PackageManager.INSTALL_FAILED_SESSION_INVALID,
@@ -3641,6 +3641,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
@GuardedBy("mLock")
private void maybeStageFsveritySignatureLocked(File origFile, File targetFile,
boolean fsVerityRequired) throws PackageManagerException {
+ if (android.security.Flags.deprecateFsvSig()) {
+ return;
+ }
final File originalSignature = new File(
VerityUtils.getFsveritySignatureFilePath(origFile.getPath()));
if (originalSignature.exists()) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index d3b41485f3cf..d23dcbc5f18e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -84,6 +84,7 @@ import android.content.pm.ComponentInfo;
import android.content.pm.DataLoaderType;
import android.content.pm.FallbackCategoryProvider;
import android.content.pm.FeatureInfo;
+import android.content.pm.Flags;
import android.content.pm.IDexModuleRegisterCallback;
import android.content.pm.IOnChecksumsReadyListener;
import android.content.pm.IPackageDataObserver;
@@ -799,9 +800,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
final SparseArray<VerifyingSession> mPendingEnableRollback = new SparseArray<>();
final PackageInstallerService mInstallerService;
-
- final PackageArchiverService mArchiverService;
-
final ArtManagerService mArtManagerService;
// TODO(b/260124949): Remove these.
@@ -1630,8 +1628,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService
(i, pm) -> new CrossProfileIntentFilterHelper(i.getSettings(),
i.getUserManagerService(), i.getLock(), i.getUserManagerInternal(),
context),
- (i, pm) -> new UpdateOwnershipHelper(),
- (i, pm) -> new PackageArchiverService(i.getContext(), pm));
+ (i, pm) -> new UpdateOwnershipHelper());
if (Build.VERSION.SDK_INT <= 0) {
Slog.w(TAG, "**** ro.build.version.sdk not set!");
@@ -1776,7 +1773,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
mFactoryTest = testParams.factoryTest;
mIncrementalManager = testParams.incrementalManager;
mInstallerService = testParams.installerService;
- mArchiverService = testParams.archiverService;
mInstantAppRegistry = testParams.instantAppRegistry;
mChangedPackagesTracker = testParams.changedPackagesTracker;
mInstantAppResolverConnection = testParams.instantAppResolverConnection;
@@ -2356,7 +2352,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
});
mInstallerService = mInjector.getPackageInstallerService();
- mArchiverService = mInjector.getPackageArchiverService();
final ComponentName instantAppResolverComponent = getInstantAppResolver(computer);
if (instantAppResolverComponent != null) {
if (DEBUG_INSTANT) {
@@ -4621,7 +4616,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService
mDomainVerificationConnection, mInstallerService, mPackageProperty,
mResolveComponentName, mInstantAppResolverSettingsComponent,
mRequiredSdkSandboxPackage, mServicesExtensionPackageName,
- mSharedSystemSharedLibraryPackageName, mArchiverService);
+ mSharedSystemSharedLibraryPackageName);
}
@Override
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java b/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
index 9495279c65b8..0c2e082e0a86 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
@@ -127,8 +127,7 @@ public class PackageManagerServiceInjector {
mPreparingPackageParserProducer;
private final Singleton<PackageInstallerService>
mPackageInstallerServiceProducer;
- private final Singleton<PackageArchiverService>
- mPackageArchiverServiceProducer;
+
private final ProducerWithArgument<InstantAppResolverConnection, ComponentName>
mInstantAppResolverConnectionProducer;
private final Singleton<LegacyPermissionManagerInternal>
@@ -187,8 +186,7 @@ public class PackageManagerServiceInjector {
Producer<IBackupManager> iBackupManager,
Producer<SharedLibrariesImpl> sharedLibrariesProducer,
Producer<CrossProfileIntentFilterHelper> crossProfileIntentFilterHelperProducer,
- Producer<UpdateOwnershipHelper> updateOwnershipHelperProducer,
- Producer<PackageArchiverService> packageArchiverServiceProducer) {
+ Producer<UpdateOwnershipHelper> updateOwnershipHelperProducer) {
mContext = context;
mLock = lock;
mInstaller = installer;
@@ -244,7 +242,6 @@ public class PackageManagerServiceInjector {
mCrossProfileIntentFilterHelperProducer = new Singleton<>(
crossProfileIntentFilterHelperProducer);
mUpdateOwnershipHelperProducer = new Singleton<>(updateOwnershipHelperProducer);
- mPackageArchiverServiceProducer = new Singleton<>(packageArchiverServiceProducer);
}
/**
@@ -391,10 +388,6 @@ public class PackageManagerServiceInjector {
return mPackageInstallerServiceProducer.get(this, mPackageManager);
}
- public PackageArchiverService getPackageArchiverService() {
- return mPackageArchiverServiceProducer.get(this, mPackageManager);
- }
-
public InstantAppResolverConnection getInstantAppResolverConnection(
ComponentName instantAppResolverComponent) {
return mInstantAppResolverConnectionProducer.produce(
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
index b91ce4be8ca1..ca572091486e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
@@ -60,7 +60,6 @@ public final class PackageManagerServiceTestParams {
public @Nullable String incidentReportApproverPackage;
public IncrementalManager incrementalManager;
public PackageInstallerService installerService;
- public PackageArchiverService archiverService;
public InstantAppRegistry instantAppRegistry;
public ChangedPackagesTracker changedPackagesTracker = new ChangedPackagesTracker();
public InstantAppResolverConnection instantAppResolverConnection;
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
index 1679987211a8..38f241d40d98 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
@@ -547,6 +547,9 @@ public class PackageManagerServiceUtils {
/** Returns true if standard APK Verity is enabled. */
static boolean isApkVerityEnabled() {
+ if (android.security.Flags.deprecateFsvSig()) {
+ return false;
+ }
return Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.R
|| SystemProperties.getInt("ro.apk_verity.mode", FSVERITY_DISABLED)
== FSVERITY_ENABLED;
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index a0c9cd1757c3..8d8208599998 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -26,7 +26,6 @@ import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET;
import static android.content.pm.PackageManager.RESTRICTION_HIDE_FROM_SUGGESTIONS;
import static android.content.pm.PackageManager.RESTRICTION_HIDE_NOTIFICATIONS;
import static android.content.pm.PackageManager.RESTRICTION_NONE;
-
import static com.android.server.LocalManagerRegistry.ManagerNotFoundException;
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
@@ -334,6 +333,8 @@ class PackageManagerShellCommand extends ShellCommand {
return runRenameUser();
case "set-user-restriction":
return runSetUserRestriction();
+ case "get-user-restriction":
+ return runGetUserRestriction();
case "supports-multiple-users":
return runSupportsMultipleUsers();
case "get-max-users":
@@ -379,6 +380,10 @@ class PackageManagerShellCommand extends ShellCommand {
return runWaitForHandler(/* forBackgroundHandler= */ false);
case "wait-for-background-handler":
return runWaitForHandler(/* forBackgroundHandler= */ true);
+ case "archive":
+ return runArchive();
+ case "request-unarchive":
+ return runUnarchive();
default: {
if (ART_SERVICE_COMMANDS.contains(cmd)) {
if (DexOptHelper.useArtService()) {
@@ -3405,6 +3410,51 @@ class PackageManagerShellCommand extends ShellCommand {
return 0;
}
+ private int runGetUserRestriction() throws RemoteException {
+ final PrintWriter pw = getOutPrintWriter();
+ int userId = UserHandle.USER_SYSTEM;
+ boolean getAllRestrictions = false;
+
+ String opt;
+ while ((opt = getNextOption()) != null) {
+ switch (opt) {
+ case "--user":
+ userId = UserHandle.parseUserArg(getNextArgRequired());
+ break;
+ case "--all":
+ getAllRestrictions = true;
+ if (getNextArg() != null) {
+ throw new IllegalArgumentException("Argument unexpected after \"--all\"");
+ }
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown option " + opt);
+ }
+ }
+
+ final int translatedUserId =
+ translateUserId(userId, UserHandle.USER_NULL, "runGetUserRestriction");
+ final IUserManager um = IUserManager.Stub.asInterface(
+ ServiceManager.getService(Context.USER_SERVICE));
+
+ if (getAllRestrictions) {
+ final Bundle restrictions = um.getUserRestrictions(translatedUserId);
+ pw.println("All restrictions:");
+ pw.println(restrictions.toString());
+ } else {
+ String restriction = getNextArg();
+ if (restriction == null) {
+ throw new IllegalArgumentException("No restriction key specified");
+ }
+ String unexpectedArgument = getNextArg();
+ if (unexpectedArgument != null) {
+ throw new IllegalArgumentException("Argument unexpected after restriction key");
+ }
+ pw.println(um.hasUserRestriction(restriction, translatedUserId));
+ }
+ return 0;
+ }
+
public int runSupportsMultipleUsers() {
getOutPrintWriter().println("Is multiuser supported: "
+ UserManager.supportsMultipleUsers());
@@ -4485,6 +4535,105 @@ class PackageManagerShellCommand extends ShellCommand {
}
}
+ private int runArchive() throws RemoteException {
+ final PrintWriter pw = getOutPrintWriter();
+ int userId = UserHandle.USER_ALL;
+
+ String opt;
+ while ((opt = getNextOption()) != null) {
+ if (opt.equals("--user")) {
+ userId = UserHandle.parseUserArg(getNextArgRequired());
+ if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT) {
+ UserManagerInternal umi =
+ LocalServices.getService(UserManagerInternal.class);
+ UserInfo userInfo = umi.getUserInfo(userId);
+ if (userInfo == null) {
+ pw.println("Failure [user " + userId + " doesn't exist]");
+ return 1;
+ }
+ }
+ } else {
+ pw.println("Error: Unknown option: " + opt);
+ return 1;
+ }
+ }
+
+ final String packageName = getNextArg();
+ if (packageName == null) {
+ pw.println("Error: package name not specified");
+ return 1;
+ }
+
+ final int translatedUserId =
+ translateUserId(userId, UserHandle.USER_SYSTEM, "runArchive");
+ final LocalIntentReceiver receiver = new LocalIntentReceiver();
+
+ try {
+ mInterface.getPackageInstaller().requestArchive(packageName,
+ /* callerPackageName= */ "", receiver.getIntentSender(),
+ new UserHandle(translatedUserId));
+ } catch (Exception e) {
+ pw.println("Failure [" + e.getMessage() + "]");
+ return 1;
+ }
+
+ final Intent result = receiver.getResult();
+ final int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS,
+ PackageInstaller.STATUS_FAILURE);
+ if (status == PackageInstaller.STATUS_SUCCESS) {
+ pw.println("Success");
+ return 0;
+ } else {
+ pw.println("Failure ["
+ + result.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) + "]");
+ return 1;
+ }
+ }
+
+ private int runUnarchive() throws RemoteException {
+ final PrintWriter pw = getOutPrintWriter();
+ int userId = UserHandle.USER_ALL;
+
+ String opt;
+ while ((opt = getNextOption()) != null) {
+ if (opt.equals("--user")) {
+ userId = UserHandle.parseUserArg(getNextArgRequired());
+ if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT) {
+ UserManagerInternal umi =
+ LocalServices.getService(UserManagerInternal.class);
+ UserInfo userInfo = umi.getUserInfo(userId);
+ if (userInfo == null) {
+ pw.println("Failure [user " + userId + " doesn't exist]");
+ return 1;
+ }
+ }
+ } else {
+ pw.println("Error: Unknown option: " + opt);
+ return 1;
+ }
+ }
+
+ final String packageName = getNextArg();
+ if (packageName == null) {
+ pw.println("Error: package name not specified");
+ return 1;
+ }
+
+ final int translatedUserId =
+ translateUserId(userId, UserHandle.USER_SYSTEM, "runArchive");
+
+ try {
+ mInterface.getPackageInstaller().requestUnarchive(packageName,
+ /* callerPackageName= */ "", new UserHandle(translatedUserId));
+ } catch (Exception e) {
+ pw.println("Failure [" + e.getMessage() + "]");
+ return 1;
+ }
+
+ pw.println("Success");
+ return 0;
+ }
+
@Override
public void onHelp() {
final PrintWriter pw = getOutPrintWriter();
@@ -4788,6 +4937,12 @@ class PackageManagerShellCommand extends ShellCommand {
pw.println("");
pw.println(" set-user-restriction [--user USER_ID] RESTRICTION VALUE");
pw.println("");
+ pw.println(" get-user-restriction [--user USER_ID] [--all] RESTRICTION_KEY");
+ pw.println(" Display the value of restriction for the given restriction key if the");
+ pw.println(" given user is valid.");
+ pw.println(" --all: display all restrictions for the given user");
+ pw.println(" This option is used without restriction key");
+ pw.println("");
pw.println(" get-max-users");
pw.println("");
pw.println(" get-max-running-users");
@@ -4851,6 +5006,16 @@ class PackageManagerShellCommand extends ShellCommand {
pw.println(" --timeout: wait for a given number of milliseconds. If the handler(s)");
pw.println(" fail to finish before the timeout, the command returns error.");
pw.println("");
+ pw.println(" archive [--user USER_ID] PACKAGE ");
+ pw.println(" During the archival process, the apps APKs and cache are removed from the");
+ pw.println(" device while the user data is kept. Options are:");
+ pw.println(" --user: archive the app from the given user.");
+ pw.println("");
+ pw.println(" request-unarchive [--user USER_ID] PACKAGE ");
+ pw.println(" Requests to unarchive a currently archived package by sending a request");
+ pw.println(" to unarchive an app to the responsible installer. Options are:");
+ pw.println(" --user: request unarchival of the app from the given user.");
+ pw.println("");
if (DexOptHelper.useArtService()) {
printArtServiceHelp();
} else {
diff --git a/services/core/java/com/android/server/pm/flags.aconfig b/services/core/java/com/android/server/pm/flags.aconfig
deleted file mode 100644
index e584801f5b37..000000000000
--- a/services/core/java/com/android/server/pm/flags.aconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-package: "com.android.server.pm"
-
-flag {
- name: "quarantined_enabled"
- namespace: "package_manager_service"
- description: "Feature flag for Quarantined state"
- bug: "269127435"
-}
-
diff --git a/services/core/java/com/android/server/pm/pkg/SuspendParams.java b/services/core/java/com/android/server/pm/pkg/SuspendParams.java
index 4e08106ed49a..86391c91bea5 100644
--- a/services/core/java/com/android/server/pm/pkg/SuspendParams.java
+++ b/services/core/java/com/android/server/pm/pkg/SuspendParams.java
@@ -17,6 +17,7 @@
package com.android.server.pm.pkg;
import android.annotation.Nullable;
+import android.content.pm.Flags;
import android.content.pm.SuspendDialogInfo;
import android.os.BaseBundle;
import android.os.PersistableBundle;
@@ -24,7 +25,6 @@ import android.util.Slog;
import com.android.modules.utils.TypedXmlPullParser;
import com.android.modules.utils.TypedXmlSerializer;
-import com.android.server.pm.Flags;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/services/core/java/com/android/server/security/Android.bp b/services/core/java/com/android/server/security/Android.bp
deleted file mode 100644
index 3f644c44111a..000000000000
--- a/services/core/java/com/android/server/security/Android.bp
+++ /dev/null
@@ -1,17 +0,0 @@
-aconfig_declarations {
- name: "com.android.server.security.flags-aconfig",
- package: "com.android.server.security",
- srcs: ["*.aconfig"],
-}
-
-java_aconfig_library {
- name: "com.android.server.security.flags-aconfig-java",
- aconfig_declarations: "com.android.server.security.flags-aconfig",
-}
-
-java_aconfig_library {
- name: "com.android.server.security.flags-aconfig-java-host",
- aconfig_declarations: "com.android.server.security.flags-aconfig",
- host_supported: true,
- test: true,
-}
diff --git a/services/core/java/com/android/server/security/FileIntegrityService.java b/services/core/java/com/android/server/security/FileIntegrityService.java
index 3aed6e30cf87..a49df50c1b92 100644
--- a/services/core/java/com/android/server/security/FileIntegrityService.java
+++ b/services/core/java/com/android/server/security/FileIntegrityService.java
@@ -90,6 +90,13 @@ public class FileIntegrityService extends SystemService {
@NonNull String packageName) {
checkCallerPermission(packageName);
+ if (android.security.Flags.deprecateFsvSig()) {
+ // When deprecated, stop telling the caller that any app source certificate is
+ // trusted on the current device. This behavior is also consistent with devices
+ // without this feature support.
+ return false;
+ }
+
try {
if (!VerityUtils.isFsVeritySupported()) {
return false;
diff --git a/services/core/java/com/android/server/security/TEST_MAPPING b/services/core/java/com/android/server/security/TEST_MAPPING
new file mode 100644
index 000000000000..673456f889e2
--- /dev/null
+++ b/services/core/java/com/android/server/security/TEST_MAPPING
@@ -0,0 +1,13 @@
+{
+ "postsubmit": [
+ {
+ "name": "CtsSecurityTestCases",
+ "options": [
+ {
+ "include-filter": "android.security.cts.FileIntegrityManagerTest"
+ }
+ ],
+ "file_patterns": ["FileIntegrity[^/]*\\.java"]
+ }
+ ]
+}
diff --git a/services/core/java/com/android/server/security/flags.aconfig b/services/core/java/com/android/server/security/flags.aconfig
deleted file mode 100644
index 0440989f3981..000000000000
--- a/services/core/java/com/android/server/security/flags.aconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-package: "com.android.server.security"
-
-flag {
- name: "deprecate_fsv_sig"
- namespace: "hardware_backed_security"
- description: "Feature flag for deprecating .fsv_sig"
- bug: "277916185"
-}
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index ddc05194c300..00992a03634d 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -256,6 +256,15 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
|| event != CLOSE_WRITE // includes the MOVED_TO case
|| wallpaper.imageWallpaperPending;
+ if (isMigration) {
+ // When separate lock screen engine is supported, migration will be handled by
+ // WallpaperDestinationChangeHandler.
+ return;
+ }
+ if (!(sysWallpaperChanged || lockWallpaperChanged)) {
+ return;
+ }
+
if (DEBUG) {
Slog.v(TAG, "Wallpaper file change: evt=" + event
+ " path=" + path
@@ -270,15 +279,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
+ " needsUpdate=" + needsUpdate);
}
- if (isMigration) {
- // When separate lock screen engine is supported, migration will be handled by
- // WallpaperDestinationChangeHandler.
- return;
- }
- if (!(sysWallpaperChanged || lockWallpaperChanged)) {
- return;
- }
-
int notifyColorsWhich = 0;
synchronized (mLock) {
notifyCallbacksLocked(wallpaper);
@@ -326,9 +326,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (DEBUG) {
Slog.d(TAG, "publish system wallpaper changed!");
}
- if (localSync != null) {
- localSync.complete();
- }
notifyWallpaperChanged(wallpaper);
}
};
@@ -336,7 +333,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
// If this was the system wallpaper, rebind...
bindWallpaperComponentLocked(mImageWallpaper, true, false, wallpaper,
callback);
- notifyColorsWhich |= FLAG_SYSTEM;
+ notifyColorsWhich |= wallpaper.mWhich;
}
if (lockWallpaperChanged) {
@@ -350,9 +347,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (DEBUG) {
Slog.d(TAG, "publish lock wallpaper changed!");
}
- if (localSync != null) {
- localSync.complete();
- }
notifyWallpaperChanged(wallpaper);
}
};
@@ -377,9 +371,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
saveSettingsLocked(wallpaper.userId);
- // Notify the client immediately if only lockscreen wallpaper changed.
- if (lockWallpaperChanged && !sysWallpaperChanged) {
- notifyWallpaperChanged(wallpaper);
+ if ((sysWallpaperChanged || lockWallpaperChanged) && localSync != null) {
+ localSync.complete();
}
}
@@ -1012,11 +1005,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
return;
}
- if (!mWallpaper.wallpaperUpdating
- && mWallpaper.userId == mCurrentUserId) {
+ if (!mWallpaper.wallpaperUpdating && mWallpaper.userId == mCurrentUserId) {
Slog.w(TAG, "Wallpaper reconnect timed out for " + mWallpaper.wallpaperComponent
+ ", reverting to built-in wallpaper!");
- clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+ int which = mIsLockscreenLiveWallpaperEnabled ? mWallpaper.mWhich : FLAG_SYSTEM;
+ clearWallpaperLocked(which, mWallpaper.userId, null);
}
}
};
@@ -1196,7 +1189,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
} else {
// Timeout
Slog.w(TAG, "Reverting to built-in wallpaper!");
- clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+ clearWallpaperLocked(mWallpaper.mWhich, mWallpaper.userId, null);
final String flattened = wpService.flattenToString();
EventLog.writeEvent(EventLogTags.WP_WALLPAPER_CRASHED,
flattened.substring(0, Math.min(flattened.length(),
@@ -1235,7 +1228,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
} else {
if (mLmkLimitRebindRetries <= 0) {
Slog.w(TAG, "Reverting to built-in wallpaper due to lmk!");
- clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+ clearWallpaperLocked(
+ mWallpaper.mWhich, mWallpaper.userId, null);
mLmkLimitRebindRetries = LMK_RECONNECT_REBIND_RETRIES;
return;
}
@@ -1426,7 +1420,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
lockWp.connection.mWallpaper = lockWp;
mOriginalSystem.mWhich = FLAG_LOCK;
updateEngineFlags(mOriginalSystem);
- notifyWallpaperColorsChanged(lockWp, FLAG_LOCK);
} else {
// Failed rename, use current system wp for both
if (DEBUG) {
@@ -1446,7 +1439,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
updateEngineFlags(mOriginalSystem);
mLockWallpaperMap.put(mNewWallpaper.userId, mOriginalSystem);
mLastLockWallpaper = mOriginalSystem;
- notifyWallpaperColorsChanged(mOriginalSystem, FLAG_LOCK);
}
} else if (mNewWallpaper.mWhich == FLAG_LOCK) {
// New wp is lock only, so old system+lock is now system only
@@ -1460,10 +1452,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
}
}
-
- synchronized (mLock) {
- saveSettingsLocked(mNewWallpaper.userId);
- }
+ saveSettingsLocked(mNewWallpaper.userId);
if (DEBUG) {
Slog.v(TAG, "--- wallpaper changed --");
@@ -1482,8 +1471,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mCurrentUserId != getChangingUserId()) {
return;
}
- WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
- if (wallpaper != null) {
+ for (WallpaperData wallpaper: getWallpapers()) {
final ComponentName wpService = wallpaper.wallpaperComponent;
if (wpService != null && wpService.getPackageName().equals(packageName)) {
if (DEBUG_LIVE) {
@@ -1495,7 +1483,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
wallpaper, null)) {
Slog.w(TAG, "Wallpaper " + wpService
+ " no longer available; reverting to default");
- clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+ int which = mIsLockscreenLiveWallpaperEnabled
+ ? wallpaper.mWhich : FLAG_SYSTEM;
+ clearWallpaperLocked(which, wallpaper.userId, null);
}
}
}
@@ -1508,13 +1498,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mCurrentUserId != getChangingUserId()) {
return;
}
- WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
- if (wallpaper != null) {
- if (wallpaper.wallpaperComponent == null
- || !wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
- return;
+ for (WallpaperData wallpaper: getWallpapers()) {
+ if (wallpaper.wallpaperComponent != null
+ && wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
+ doPackagesChangedLocked(true, wallpaper);
}
- doPackagesChangedLocked(true, wallpaper);
}
}
}
@@ -1525,8 +1513,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mCurrentUserId != getChangingUserId()) {
return;
}
- WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
- if (wallpaper != null) {
+ for (WallpaperData wallpaper: getWallpapers()) {
if (wallpaper.wallpaperComponent != null
&& wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
if (DEBUG_LIVE) {
@@ -1550,8 +1537,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mCurrentUserId != getChangingUserId()) {
return false;
}
- WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
- if (wallpaper != null) {
+ for (WallpaperData wallpaper: getWallpapers()) {
boolean res = doPackagesChangedLocked(doit, wallpaper);
changed |= res;
}
@@ -1565,8 +1551,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mCurrentUserId != getChangingUserId()) {
return;
}
- WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
- if (wallpaper != null) {
+ for (WallpaperData wallpaper: getWallpapers()) {
doPackagesChangedLocked(true, wallpaper);
}
}
@@ -1574,6 +1559,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
boolean doPackagesChangedLocked(boolean doit, WallpaperData wallpaper) {
boolean changed = false;
+ int which = mIsLockscreenLiveWallpaperEnabled ? wallpaper.mWhich : FLAG_SYSTEM;
if (wallpaper.wallpaperComponent != null) {
int change = isPackageDisappearing(wallpaper.wallpaperComponent
.getPackageName());
@@ -1583,7 +1569,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (doit) {
Slog.w(TAG, "Wallpaper uninstalled, removing: "
+ wallpaper.wallpaperComponent);
- clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+ clearWallpaperLocked(which, wallpaper.userId, null);
}
}
}
@@ -1604,7 +1590,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
} catch (NameNotFoundException e) {
Slog.w(TAG, "Wallpaper component gone, removing: "
+ wallpaper.wallpaperComponent);
- clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+ clearWallpaperLocked(which, wallpaper.userId, null);
}
}
if (wallpaper.nextWallpaperComponent != null
@@ -1720,7 +1706,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (DEBUG) {
Slog.i(TAG, "Unable to regenerate crop; resetting");
}
- clearWallpaperLocked(FLAG_SYSTEM, UserHandle.USER_SYSTEM, null);
+ int which = isLockscreenLiveWallpaperEnabled() ? wallpaper.mWhich : FLAG_SYSTEM;
+ clearWallpaperLocked(which, UserHandle.USER_SYSTEM, null);
}
} else {
if (DEBUG) {
@@ -2000,12 +1987,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
WallpaperData wallpaper, IRemoteCallback reply, ServiceInfo serviceInfo) {
if (serviceInfo == null) {
- if (wallpaper.mWhich == (FLAG_LOCK | FLAG_SYSTEM)) {
- clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
- clearWallpaperLocked(FLAG_LOCK, wallpaper.userId, reply);
- } else {
- clearWallpaperLocked(wallpaper.mWhich, wallpaper.userId, reply);
- }
+ clearWallpaperLocked(wallpaper.mWhich, wallpaper.userId, reply);
return;
}
Slog.w(TAG, "Wallpaper isn't direct boot aware; using fallback until unlocked");
@@ -2026,7 +2008,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
@Override
public void clearWallpaper(String callingPackage, int which, int userId) {
- if (DEBUG) Slog.v(TAG, "clearWallpaper");
+ if (DEBUG) Slog.v(TAG, "clearWallpaper: " + which);
checkPermission(android.Manifest.permission.SET_WALLPAPER);
if (!isWallpaperSupported(callingPackage) || !isSetWallpaperAllowed(callingPackage)) {
return;
@@ -2037,7 +2019,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
WallpaperData data = null;
synchronized (mLock) {
if (mIsLockscreenLiveWallpaperEnabled) {
- clearWallpaperLocked(callingPackage, which, userId);
+ boolean fromForeground = isFromForegroundApp(callingPackage);
+ clearWallpaperLocked(which, userId, fromForeground, null);
} else {
clearWallpaperLocked(which, userId, null);
}
@@ -2057,7 +2040,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
}
- private void clearWallpaperLocked(String callingPackage, int which, int userId) {
+ private void clearWallpaperLocked(int which, int userId, boolean fromForeground,
+ IRemoteCallback reply) {
// Might need to bring it in the first time to establish our rewrite
if (!mWallpaperMap.contains(userId)) {
@@ -2096,8 +2080,10 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
finalWhich = which;
}
- boolean success = withCleanCallingIdentity(() -> setWallpaperComponent(
- component, callingPackage, finalWhich, userId));
+ // except for the lock case (for which we keep the system wallpaper as-is), force rebind
+ boolean force = which != FLAG_LOCK;
+ boolean success = withCleanCallingIdentity(() -> setWallpaperComponentInternal(
+ component, finalWhich, userId, force, fromForeground, reply));
if (success) return;
} catch (IllegalArgumentException e1) {
e = e1;
@@ -2109,10 +2095,23 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
// wallpaper.
Slog.e(TAG, "Default wallpaper component not found!", e);
withCleanCallingIdentity(() -> clearWallpaperComponentLocked(wallpaper));
+ if (reply != null) {
+ try {
+ reply.sendResult(null);
+ } catch (RemoteException e1) {
+ Slog.w(TAG, "Failed to notify callback after wallpaper clear", e1);
+ }
+ }
}
- // TODO(b/266818039) remove this version of the method
+ // TODO(b/266818039) remove
private void clearWallpaperLocked(int which, int userId, IRemoteCallback reply) {
+
+ if (mIsLockscreenLiveWallpaperEnabled) {
+ clearWallpaperLocked(which, userId, false, reply);
+ return;
+ }
+
if (which != FLAG_SYSTEM && which != FLAG_LOCK) {
throw new IllegalArgumentException("Must specify exactly one kind of wallpaper to clear");
}
@@ -2827,6 +2826,18 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
: new WallpaperData[0];
}
+ // TODO(b/266818039) remove
+ private WallpaperData[] getWallpapers() {
+ WallpaperData systemWallpaper = mWallpaperMap.get(mCurrentUserId);
+ WallpaperData lockWallpaper = mLockWallpaperMap.get(mCurrentUserId);
+ boolean systemValid = systemWallpaper != null;
+ boolean lockValid = lockWallpaper != null && !isLockscreenLiveWallpaperEnabled();
+ return systemValid && lockValid ? new WallpaperData[]{systemWallpaper, lockWallpaper}
+ : systemValid ? new WallpaperData[]{systemWallpaper}
+ : lockValid ? new WallpaperData[]{lockWallpaper}
+ : new WallpaperData[0];
+ }
+
private IWallpaperEngine getEngine(int which, int userId, int displayId) {
WallpaperData wallpaperData = findWallpaperAtDisplay(userId, displayId);
if (wallpaperData == null) return null;
@@ -3284,15 +3295,16 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
boolean setWallpaperComponent(ComponentName name, String callingPackage,
@SetWallpaperFlags int which, int userId) {
if (mIsLockscreenLiveWallpaperEnabled) {
- return setWallpaperComponentInternal(name, callingPackage, which, userId);
+ boolean fromForeground = isFromForegroundApp(callingPackage);
+ return setWallpaperComponentInternal(name, which, userId, false, fromForeground, null);
} else {
setWallpaperComponentInternalLegacy(name, callingPackage, which, userId);
return true;
}
}
- private boolean setWallpaperComponentInternal(ComponentName name, String callingPackage,
- @SetWallpaperFlags int which, int userIdIn) {
+ private boolean setWallpaperComponentInternal(ComponentName name, @SetWallpaperFlags int which,
+ int userIdIn, boolean force, boolean fromForeground, IRemoteCallback reply) {
if (DEBUG) {
Slog.v(TAG, "Setting new live wallpaper: which=" + which + ", component: " + name);
}
@@ -3306,7 +3318,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
final WallpaperData newWallpaper;
synchronized (mLock) {
- Slog.v(TAG, "setWallpaperComponent name=" + name);
+ Slog.v(TAG, "setWallpaperComponent name=" + name + ", which = " + which);
final WallpaperData originalSystemWallpaper = mWallpaperMap.get(userId);
if (originalSystemWallpaper == null) {
throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3329,30 +3341,21 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
newWallpaper.imageWallpaperPending = false;
newWallpaper.mWhich = which;
newWallpaper.mSystemWasBoth = systemIsBoth;
- newWallpaper.fromForegroundApp = isFromForegroundApp(callingPackage);
+ newWallpaper.fromForegroundApp = fromForeground;
final WallpaperDestinationChangeHandler
liveSync = new WallpaperDestinationChangeHandler(
newWallpaper);
boolean same = changingToSame(name, newWallpaper);
- IRemoteCallback.Stub callback = new IRemoteCallback.Stub() {
- @Override
- public void sendResult(Bundle data) throws RemoteException {
- if (DEBUG) {
- Slog.d(TAG, "publish system wallpaper changed!");
- }
- liveSync.complete();
- }
- };
/*
* If we have a shared system+lock wallpaper, and we reapply the same wallpaper
* to system only, force rebind: the current wallpaper will be migrated to lock
* and a new engine with the same wallpaper will be applied to system.
*/
- boolean forceRebind = same && systemIsBoth && which == FLAG_SYSTEM;
+ boolean forceRebind = force || (same && systemIsBoth && which == FLAG_SYSTEM);
bindSuccess = bindWallpaperComponentLocked(name, /* force */
- forceRebind, /* fromUser */ true, newWallpaper, callback);
+ forceRebind, /* fromUser */ true, newWallpaper, reply);
if (bindSuccess) {
if (!same) {
newWallpaper.primaryColors = null;
@@ -3396,6 +3399,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
mLockWallpaperMap.remove(newWallpaper.userId);
}
+ if (liveSync != null) liveSync.complete();
}
} finally {
Binder.restoreCallingIdentity(ident);
@@ -3421,7 +3425,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
WallpaperData wallpaper;
synchronized (mLock) {
- Slog.v(TAG, "setWallpaperComponent name=" + name + ", which=" + which);
+ Slog.v(TAG, "setWallpaperComponentLegacy name=" + name + ", which=" + which);
wallpaper = mWallpaperMap.get(userId);
if (wallpaper == null) {
throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3490,15 +3494,24 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
}
+ /**
+ * Determines if the given component name is the default component. Note: a null name can be
+ * used to represent the default component.
+ * @param name The component name to check.
+ * @return True if the component name matches the default wallpaper component.
+ */
+ private boolean isDefaultComponent(ComponentName name) {
+ return name == null || name.equals(mDefaultWallpaperComponent);
+ }
+
private boolean changingToSame(ComponentName componentName, WallpaperData wallpaper) {
if (wallpaper.connection != null) {
- if (wallpaper.wallpaperComponent == null) {
- if (componentName == null) {
- if (DEBUG) Slog.v(TAG, "changingToSame: still using default");
- // Still using default wallpaper.
- return true;
- }
- } else if (wallpaper.wallpaperComponent.equals(componentName)) {
+ final ComponentName wallpaperName = wallpaper.wallpaperComponent;
+ if (isDefaultComponent(componentName) && isDefaultComponent(wallpaperName)) {
+ if (DEBUG) Slog.v(TAG, "changingToSame: still using default");
+ // Still using default wallpaper.
+ return true;
+ } else if (wallpaperName != null && wallpaperName.equals(componentName)) {
// Changing to same wallpaper.
if (DEBUG) Slog.v(TAG, "same wallpaper");
return true;
@@ -3514,6 +3527,14 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
// Has the component changed?
if (!force && changingToSame(componentName, wallpaper)) {
+ try {
+ if (DEBUG_LIVE) {
+ Slog.v(TAG, "Changing to the same component, ignoring");
+ }
+ if (reply != null) reply.sendResult(null);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to send callback", e);
+ }
return true;
}
diff --git a/services/core/java/com/android/server/wm/ActivityClientController.java b/services/core/java/com/android/server/wm/ActivityClientController.java
index b823e7353a84..4c9ec9d863bb 100644
--- a/services/core/java/com/android/server/wm/ActivityClientController.java
+++ b/services/core/java/com/android/server/wm/ActivityClientController.java
@@ -492,6 +492,8 @@ class ActivityClientController extends IActivityClientController.Stub {
final boolean res;
final boolean finishWithRootActivity =
finishTask == Activity.FINISH_TASK_WITH_ROOT_ACTIVITY;
+ mTaskSupervisor.getBackgroundActivityLaunchController()
+ .onActivityRequestedFinishing(r);
if (finishTask == Activity.FINISH_TASK_WITH_ACTIVITY
|| (finishWithRootActivity && r == rootR)) {
// If requested, remove the task that is associated to this activity only if it
@@ -1018,7 +1020,7 @@ class ActivityClientController extends IActivityClientController.Stub {
try {
final ClientTransaction transaction = ClientTransaction.obtain(
r.app.getThread(), r.token);
- transaction.addCallback(EnterPipRequestedItem.obtain());
+ transaction.addCallback(EnterPipRequestedItem.obtain(r.token));
mService.getLifecycleManager().scheduleTransaction(transaction);
return true;
} catch (Exception e) {
@@ -1040,7 +1042,7 @@ class ActivityClientController extends IActivityClientController.Stub {
try {
final ClientTransaction transaction = ClientTransaction.obtain(
r.app.getThread(), r.token);
- transaction.addCallback(PipStateTransactionItem.obtain(pipState));
+ transaction.addCallback(PipStateTransactionItem.obtain(r.token, pipState));
mService.getLifecycleManager().scheduleTransaction(transaction);
} catch (Exception e) {
Slog.w(TAG, "Failed to send pip state transaction item: "
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 582536b662ce..dca2b6f8f2af 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -324,7 +324,6 @@ import android.util.ArraySet;
import android.util.EventLog;
import android.util.Log;
import android.util.MergedConfiguration;
-import android.util.Pair;
import android.util.Slog;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
@@ -725,9 +724,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
private final boolean mIsUserAlwaysVisible;
/** Allow activity launches which would otherwise be blocked by
- * {@link ActivityTransitionSecurityController#checkActivityAllowedToStart}
+ * {@link BackgroundActivityStartController#checkActivityAllowedToStart}
*/
- private boolean mAllowCrossUidActivitySwitchFromBelow;
+ boolean mAllowCrossUidActivitySwitchFromBelow;
/** Have we been asked to have this token keep the screen frozen? */
private boolean mFreezingScreen;
@@ -1444,7 +1443,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
config);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- MoveToDisplayItem.obtain(displayId, config));
+ MoveToDisplayItem.obtain(token, displayId, config));
} catch (RemoteException e) {
// If process died, whatever.
}
@@ -1461,7 +1460,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
+ "config: %s", this, config);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- ActivityConfigurationChangeItem.obtain(config));
+ ActivityConfigurationChangeItem.obtain(token, config));
} catch (RemoteException e) {
// If process died, whatever.
}
@@ -1482,7 +1481,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
this, onTop);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- TopResumedActivityChangeItem.obtain(onTop));
+ TopResumedActivityChangeItem.obtain(token, onTop));
} catch (RemoteException e) {
// If process died, whatever.
Slog.w(TAG, "Failed to send top-resumed=" + onTop + " to " + this, e);
@@ -2729,7 +2728,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
try {
mTransferringSplashScreenState = TRANSFER_SPLASH_SCREEN_ATTACH_TO_CLIENT;
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- TransferSplashScreenViewStateItem.obtain(parcelable,
+ TransferSplashScreenViewStateItem.obtain(token, parcelable,
windowAnimationLeash));
scheduleTransferSplashScreenTimeout();
} catch (Exception e) {
@@ -3896,7 +3895,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
try {
if (DEBUG_SWITCH) Slog.i(TAG_SWITCH, "Destroying: " + this);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- DestroyActivityItem.obtain(finishing, configChangeFlags));
+ DestroyActivityItem.obtain(token, finishing, configChangeFlags));
} catch (Exception e) {
// We can just ignore exceptions here... if the process has crashed, our death
// notification will clean things up.
@@ -4804,7 +4803,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
final ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
list.add(new ResultInfo(resultWho, requestCode, resultCode, data));
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- ActivityResultItem.obtain(list));
+ ActivityResultItem.obtain(token, list));
return;
} catch (Exception e) {
Slog.w(TAG, "Exception thrown sending result to " + this, e);
@@ -4817,7 +4816,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
final ClientTransaction transaction = ClientTransaction.obtain(app.getThread(), token);
// Build result to be returned immediately.
transaction.addCallback(ActivityResultItem.obtain(
- List.of(new ResultInfo(resultWho, requestCode, resultCode, data))));
+ token, List.of(new ResultInfo(resultWho, requestCode, resultCode, data))));
// When the activity result is delivered, the activity will transition to RESUMED.
// Since the activity is only resumed so the result can be immediately delivered,
// return it to its original lifecycle state.
@@ -4858,13 +4857,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
private ActivityLifecycleItem getLifecycleItemForCurrentStateForResult() {
switch (mState) {
case STARTED:
- return StartActivityItem.obtain(null);
+ return StartActivityItem.obtain(token, null);
case PAUSING:
case PAUSED:
- return PauseActivityItem.obtain();
+ return PauseActivityItem.obtain(token);
case STOPPING:
case STOPPED:
- return StopActivityItem.obtain(configChangeFlags);
+ return StopActivityItem.obtain(token, configChangeFlags);
default:
// Do not send a result immediately if the activity is in state INITIALIZING,
// RESTARTING_PROCESS, FINISHING, DESTROYING, or DESTROYED.
@@ -4910,7 +4909,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// so only if activity is currently RESUMED. Otherwise, client may have extra
// life-cycle calls to RESUMED (and PAUSED later).
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- NewIntentItem.obtain(ar, mState == RESUMED));
+ NewIntentItem.obtain(token, ar, mState == RESUMED));
unsent = false;
} catch (RemoteException e) {
Slog.w(TAG, "Exception thrown sending new intent to " + this, e);
@@ -6145,7 +6144,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
shortComponentName, "userLeaving=false", "make-active");
try {
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- PauseActivityItem.obtain(finishing, false /* userLeaving */,
+ PauseActivityItem.obtain(token, finishing, false /* userLeaving */,
configChangeFlags, false /* dontReport */, mAutoEnteringPip));
} catch (Exception e) {
Slog.w(TAG, "Exception thrown sending pause: " + intent.getComponent(), e);
@@ -6158,7 +6157,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
try {
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- StartActivityItem.obtain(takeOptions()));
+ StartActivityItem.obtain(token, takeOptions()));
} catch (Exception e) {
Slog.w(TAG, "Exception thrown sending start: " + intent.getComponent(), e);
}
@@ -6456,7 +6455,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
EventLogTags.writeWmStopActivity(
mUserId, System.identityHashCode(this), shortComponentName);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- StopActivityItem.obtain(configChangeFlags));
+ StopActivityItem.obtain(token, configChangeFlags));
mAtmService.mH.postDelayed(mStopTimeoutRunnable, STOP_TIMEOUT);
} catch (Exception e) {
@@ -9871,17 +9870,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
(andResume ? "RESUMED" : "PAUSED"), this, Debug.getCallers(6));
forceNewConfig = false;
startRelaunching();
- final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(pendingResults,
- pendingNewIntents, configChangeFlags,
+ final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(token,
+ pendingResults, pendingNewIntents, configChangeFlags,
new MergedConfiguration(getProcessGlobalConfiguration(),
getMergedOverrideConfiguration()),
preserveWindow);
final ActivityLifecycleItem lifecycleItem;
if (andResume) {
- lifecycleItem = ResumeActivityItem.obtain(isTransitionForward(),
+ lifecycleItem = ResumeActivityItem.obtain(token, isTransitionForward(),
shouldSendCompatFakeFocus());
} else {
- lifecycleItem = PauseActivityItem.obtain();
+ lifecycleItem = PauseActivityItem.obtain(token);
}
final ClientTransaction transaction = ClientTransaction.obtain(app.getThread(), token);
transaction.addCallback(callbackItem);
@@ -9978,7 +9977,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// {@link ActivityTaskManagerService.activityStopped}).
try {
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
- StopActivityItem.obtain(0 /* configChanges */));
+ StopActivityItem.obtain(token, 0 /* configChanges */));
} catch (RemoteException e) {
Slog.w(TAG, "Exception thrown during restart " + this, e);
}
@@ -10191,50 +10190,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
mAllowCrossUidActivitySwitchFromBelow = allowed;
}
- /**
- * Determines if a source is allowed to add or remove activities from the task,
- * if the current ActivityRecord is above it in the stack
- *
- * A transition is blocked ({@code false} returned) if all of the following are met:
- * <pre>
- * 1. The source activity and the current activity record belong to different apps
- * (i.e, have different UIDs).
- * 2. Both the source activity and the current activity target U+
- * 3. The current activity has not set
- * {@link ActivityRecord#setAllowCrossUidActivitySwitchFromBelow(boolean)} to {@code true}
- * </pre>
- *
- * Returns a pair where the elements mean:
- * <pre>
- * First: {@code false} if we should actually block the transition (takes into consideration
- * feature flag and targetSdk).
- * Second: {@code false} if we should warn about the transition via toasts. This happens if
- * the transition would be blocked in case both the app was targeting U+ and the feature was
- * enabled.
- * </pre>
- *
- * @param sourceUid The source (s) activity performing the state change
- */
- Pair<Boolean, Boolean> allowCrossUidActivitySwitchFromBelow(int sourceUid) {
- int myUid = info.applicationInfo.uid;
- if (sourceUid == myUid) {
- return new Pair<>(true, true);
- }
-
- // If mAllowCrossUidActivitySwitchFromBelow is set, honor it.
- if (mAllowCrossUidActivitySwitchFromBelow) {
- return new Pair<>(true, true);
- }
-
- // If it is not set, default to true if both records target ≥ U, false otherwise
- // TODO(b/258792202) Replace with CompatChanges and replace Pair with boolean once feature
- // flag is removed
- boolean restrictActivitySwitch =
- ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(myUid)
- && ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(sourceUid);
- return new Pair<>(!restrictActivitySwitch, false);
- }
-
boolean getTurnScreenOnFlag() {
return mTurnScreenOn || containsTurnScreenOnWindow();
}
diff --git a/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java b/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
index 19d8129bb606..f1a2159d6dbe 100644
--- a/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
+++ b/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
@@ -43,7 +43,7 @@ class ActivitySecurityModelFeatureFlags {
static final String DOC_LINK = "go/android-asm";
/** Used to determine which version of the ASM logic was used in logs while we iterate */
- static final int ASM_VERSION = 7;
+ static final int ASM_VERSION = 8;
private static final String NAMESPACE = NAMESPACE_WINDOW_MANAGER;
private static final String KEY_ASM_PREFIX = "ActivitySecurity__";
@@ -53,7 +53,7 @@ class ActivitySecurityModelFeatureFlags {
private static final String KEY_ASM_EXEMPTED_PACKAGES = KEY_ASM_PREFIX
+ "asm_exempted_packages";
private static final int VALUE_DISABLE = 0;
- private static final int VALUE_ENABLE_FOR_U = 1;
+ private static final int VALUE_ENABLE_FOR_V = 1;
private static final int VALUE_ENABLE_FOR_ALL = 2;
private static final int DEFAULT_VALUE = VALUE_DISABLE;
@@ -84,7 +84,7 @@ class ActivitySecurityModelFeatureFlags {
private static boolean flagEnabledForUid(int flag, int uid) {
boolean flagEnabled = flag == VALUE_ENABLE_FOR_ALL
- || (flag == VALUE_ENABLE_FOR_U
+ || (flag == VALUE_ENABLE_FOR_V
&& CompatChanges.isChangeEnabled(ASM_RESTRICTIONS, uid));
if (flagEnabled) {
diff --git a/services/core/java/com/android/server/wm/ActivityStartController.java b/services/core/java/com/android/server/wm/ActivityStartController.java
index a6e50405e7d9..c39b266a7701 100644
--- a/services/core/java/com/android/server/wm/ActivityStartController.java
+++ b/services/core/java/com/android/server/wm/ActivityStartController.java
@@ -98,8 +98,6 @@ public class ActivityStartController {
/** Whether an {@link ActivityStarter} is currently executing (starting an Activity). */
private boolean mInExecution = false;
- private final BackgroundActivityStartController mBalController;
-
/**
* TODO(b/64750076): Capture information necessary for dump and
* {@link #postStartActivityProcessingForLastStarter} rather than keeping the entire object
@@ -122,7 +120,6 @@ public class ActivityStartController {
mFactory.setController(this);
mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service.mGlobalLock,
service.mH);
- mBalController = new BackgroundActivityStartController(mService, mSupervisor);
}
/**
@@ -666,8 +663,4 @@ public class ActivityStartController {
pw.println("(nothing)");
}
}
-
- BackgroundActivityStartController getBackgroundActivityLaunchController() {
- return mBalController;
- }
}
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index 458d1e8fa04b..27315bb23ae5 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -74,16 +74,8 @@ import static com.android.server.wm.ActivityTaskManagerService.ANIMATE;
import static com.android.server.wm.ActivityTaskSupervisor.DEFER_RESUME;
import static com.android.server.wm.ActivityTaskSupervisor.ON_TOP;
import static com.android.server.wm.ActivityTaskSupervisor.PRESERVE_WINDOWS;
-import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_ALLOWLISTED_COMPONENT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_ALLOWLISTED_UID;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_DEFAULT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PENDING_INTENT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PERMISSION;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_SAW_PERMISSION;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_VISIBLE_WINDOW;
import static com.android.server.wm.BackgroundActivityStartController.BAL_BLOCK;
-import static com.android.server.wm.BackgroundActivityStartController.balCodeToString;
import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_BOUNDS;
import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_DISPLAY;
import static com.android.server.wm.Task.REPARENT_MOVE_ROOT_TASK_TO_FRONT;
@@ -126,18 +118,14 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.service.voice.IVoiceInteractionSession;
import android.text.TextUtils;
-import android.util.Pair;
import android.util.Pools.SynchronizedPool;
import android.util.Slog;
-import android.widget.Toast;
import android.window.RemoteTransition;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.HeavyWeightSwitcherActivity;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.protolog.common.ProtoLog;
-import com.android.internal.util.FrameworkStatsLog;
-import com.android.server.UiThread;
import com.android.server.am.PendingIntentRecord;
import com.android.server.pm.InstantAppResolver;
import com.android.server.power.ShutdownCheckPoints;
@@ -151,10 +139,6 @@ import com.android.server.wm.TaskFragment.EmbeddingCheckResult;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.util.Date;
-import java.util.StringJoiner;
-import java.util.function.Consumer;
-import java.util.function.Function;
-import java.util.function.Predicate;
/**
* Controller for interpreting how and then launching an activity.
@@ -188,7 +172,7 @@ class ActivityStarter {
* Feature flag for go/activity-security rules
*/
@ChangeId
- @EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+ @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM)
static final long ASM_RESTRICTIONS = 230590090L;
private final ActivityTaskManagerService mService;
@@ -1114,7 +1098,7 @@ class ActivityStarter {
Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER,
"shouldAbortBackgroundActivityStart");
BackgroundActivityStartController balController =
- mController.getBackgroundActivityLaunchController();
+ mSupervisor.getBackgroundActivityLaunchController();
balCode =
balController.checkBackgroundActivityStart(
callingUid,
@@ -1841,6 +1825,9 @@ class ActivityStarter {
sourceRecord, "launch-into-pip");
}
+ mSupervisor.getBackgroundActivityLaunchController()
+ .onNewActivityLaunched(mStartActivity);
+
return START_SUCCESS;
}
@@ -1973,7 +1960,9 @@ class ActivityStarter {
}
}
- if (!checkActivitySecurityModel(r, newTask, targetTask)) {
+ if (!mSupervisor.getBackgroundActivityLaunchController().checkActivityAllowedToStart(
+ mSourceRecord, r, newTask, targetTask, mLaunchFlags, mBalCode, mCallingUid,
+ mRealCallingUid)) {
return START_ABORTED;
}
@@ -1981,226 +1970,6 @@ class ActivityStarter {
}
/**
- * TODO(b/263368846): Shift to BackgroundActivityStartController once class is ready
- * Log activity starts which violate one of the following rules of the
- * activity security model (ASM):
- * See go/activity-security for rationale behind the rules.
- * 1. Within a task, only an activity matching a top UID of the task can start activities
- * 2. Only activities within a foreground task, which match a top UID of the task, can
- * create a new task or bring an existing one into the foreground
- */
- private boolean checkActivitySecurityModel(ActivityRecord r, boolean newTask, Task targetTask) {
- // BAL Exception allowed in all cases
- if (mBalCode == BAL_ALLOW_ALLOWLISTED_UID) {
- return true;
- }
-
- // Intents with FLAG_ACTIVITY_NEW_TASK will always be considered as creating a new task
- // even if the intent is delivered to an existing task.
- boolean taskToFront = newTask
- || (mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) == FLAG_ACTIVITY_NEW_TASK;
-
- // BAL exception only allowed for new tasks
- if (taskToFront) {
- if (mBalCode == BAL_ALLOW_ALLOWLISTED_COMPONENT
- || mBalCode == BAL_ALLOW_PERMISSION
- || mBalCode == BAL_ALLOW_PENDING_INTENT
- || mBalCode == BAL_ALLOW_SAW_PERMISSION
- || mBalCode == BAL_ALLOW_VISIBLE_WINDOW) {
- return true;
- }
- }
-
- Pair<Boolean, Boolean> pair = null;
- if (mSourceRecord != null) {
- boolean passesAsmChecks = true;
- Task sourceTask = mSourceRecord.getTask();
-
- // Allow launching into a new task (or a task matching the launched activity's
- // affinity) only if the current task is foreground or mutating its own task.
- // The latter can happen eg. if caller uses NEW_TASK flag and the activity being
- // launched matches affinity of source task.
- if (taskToFront) {
- passesAsmChecks = sourceTask != null
- && (sourceTask.isVisible() || sourceTask == targetTask);
- }
-
- if (passesAsmChecks) {
- Task taskToCheck = taskToFront ? sourceTask : targetTask;
- pair = ActivityTaskSupervisor
- .doesTopActivityMatchingUidExistForAsm(taskToCheck, mSourceRecord.getUid(),
- mSourceRecord);
- }
- } else if (!taskToFront) {
- // We don't have a sourceRecord, and we're launching into an existing task.
- // Allow if callingUid is top of stack.
- pair = ActivityTaskSupervisor
- .doesTopActivityMatchingUidExistForAsm(targetTask, mCallingUid,
- /*sourceRecord*/null);
- }
-
- boolean shouldBlockActivityStart = true;
- if (pair != null) {
- // We block if feature flag is enabled
- shouldBlockActivityStart = !pair.first;
- // Used for logging/toasts. Would we block if target sdk was U and feature was
- // enabled? If so, we can't return here but we also might not block at the end
- boolean wouldBlockActivityStartIgnoringFlags = !pair.second;
-
- if (!wouldBlockActivityStartIgnoringFlags) {
- return true;
- }
- }
-
- // ASM rules have failed. Log why
- return logAsmFailureAndCheckFeatureEnabled(r, newTask, targetTask, shouldBlockActivityStart,
- taskToFront);
- }
-
- private boolean logAsmFailureAndCheckFeatureEnabled(ActivityRecord r, boolean newTask,
- Task targetTask, boolean shouldBlockActivityStart, boolean taskToFront) {
- // ASM rules have failed. Log why
- ActivityRecord targetTopActivity = targetTask == null ? null
- : targetTask.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
-
- int action = newTask || mSourceRecord == null
- ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_NEW_TASK
- : (mSourceRecord.getTask().equals(targetTask)
- ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_SAME_TASK
- : FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_DIFFERENT_TASK);
-
- boolean blockActivityStartAndFeatureEnabled = ActivitySecurityModelFeatureFlags
- .shouldRestrictActivitySwitch(mCallingUid)
- && shouldBlockActivityStart;
-
- String asmDebugInfo = getDebugInfoForActivitySecurity("Launch", r, targetTask,
- targetTopActivity, blockActivityStartAndFeatureEnabled, /*taskToFront*/taskToFront);
-
- FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
- /* caller_uid */
- mSourceRecord != null ? mSourceRecord.getUid() : mCallingUid,
- /* caller_activity_class_name */
- mSourceRecord != null ? mSourceRecord.info.name : null,
- /* target_task_top_activity_uid */
- targetTopActivity != null ? targetTopActivity.getUid() : -1,
- /* target_task_top_activity_class_name */
- targetTopActivity != null ? targetTopActivity.info.name : null,
- /* target_task_is_different */
- newTask || mSourceRecord == null || targetTask == null
- || !targetTask.equals(mSourceRecord.getTask()),
- /* target_activity_uid */
- r.getUid(),
- /* target_activity_class_name */
- r.info.name,
- /* target_intent_action */
- r.intent.getAction(),
- /* target_intent_flags */
- mLaunchFlags,
- /* action */
- action,
- /* version */
- ActivitySecurityModelFeatureFlags.ASM_VERSION,
- /* multi_window - we have our source not in the target task, but both are visible */
- targetTask != null && mSourceRecord != null
- && !targetTask.equals(mSourceRecord.getTask()) && targetTask.isVisible(),
- /* bal_code */
- mBalCode,
- /* task_stack */
- asmDebugInfo
- );
-
- String launchedFromPackageName = r.launchedFromPackage;
- if (ActivitySecurityModelFeatureFlags.shouldShowToast(mCallingUid)) {
- String toastText = ActivitySecurityModelFeatureFlags.DOC_LINK
- + (blockActivityStartAndFeatureEnabled ? " blocked " : " would block ")
- + getApplicationLabel(mService.mContext.getPackageManager(),
- launchedFromPackageName);
- UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
- toastText, Toast.LENGTH_LONG).show());
-
- Slog.i(TAG, asmDebugInfo);
- }
-
- if (blockActivityStartAndFeatureEnabled) {
- Slog.e(TAG, "[ASM] Abort Launching r: " + r
- + " as source: "
- + (mSourceRecord != null ? mSourceRecord : launchedFromPackageName)
- + " is in background. New task: " + newTask
- + ". Top activity: " + targetTopActivity
- + ". BAL Code: " + balCodeToString(mBalCode));
-
- return false;
- }
-
- return true;
- }
-
- /** Only called when an activity launch may be blocked, which should happen very rarely */
- private String getDebugInfoForActivitySecurity(String action, ActivityRecord r, Task targetTask,
- ActivityRecord targetTopActivity, boolean blockActivityStartAndFeatureEnabled,
- boolean taskToFront) {
- final String prefix = "[ASM] ";
- Function<ActivityRecord, String> recordToString = (ar) -> {
- if (ar == null) {
- return null;
- }
- return (ar == mSourceRecord ? " [source]=> "
- : ar == targetTopActivity ? " [ top ]=> "
- : ar == r ? " [target]=> "
- : " => ")
- + ar
- + " :: visible=" + ar.isVisible()
- + ", finishing=" + ar.isFinishing()
- + ", alwaysOnTop=" + ar.isAlwaysOnTop()
- + ", taskFragment=" + ar.getTaskFragment();
- };
-
- StringJoiner joiner = new StringJoiner("\n");
- joiner.add(prefix + "------ Activity Security " + action + " Debug Logging Start ------");
- joiner.add(prefix + "Block Enabled: " + blockActivityStartAndFeatureEnabled);
- joiner.add(prefix + "ASM Version: " + ActivitySecurityModelFeatureFlags.ASM_VERSION);
-
- boolean targetTaskMatchesSourceTask = targetTask != null
- && mSourceRecord != null && mSourceRecord.getTask() == targetTask;
-
- if (mSourceRecord == null) {
- joiner.add(prefix + "Source Package: " + r.launchedFromPackage);
- String realCallingPackage = mService.mContext.getPackageManager().getNameForUid(
- mRealCallingUid);
- joiner.add(prefix + "Real Calling Uid Package: " + realCallingPackage);
- } else {
- joiner.add(prefix + "Source Record: " + recordToString.apply(mSourceRecord));
- if (targetTaskMatchesSourceTask) {
- joiner.add(prefix + "Source/Target Task: " + mSourceRecord.getTask());
- joiner.add(prefix + "Source/Target Task Stack: ");
- } else {
- joiner.add(prefix + "Source Task: " + mSourceRecord.getTask());
- joiner.add(prefix + "Source Task Stack: ");
- }
- mSourceRecord.getTask().forAllActivities((Consumer<ActivityRecord>)
- ar -> joiner.add(prefix + recordToString.apply(ar)));
- }
-
- joiner.add(prefix + "Target Task Top: " + recordToString.apply(targetTopActivity));
- if (!targetTaskMatchesSourceTask) {
- joiner.add(prefix + "Target Task: " + targetTask);
- if (targetTask != null) {
- joiner.add(prefix + "Target Task Stack: ");
- targetTask.forAllActivities((Consumer<ActivityRecord>)
- ar -> joiner.add(prefix + recordToString.apply(ar)));
- }
- }
-
- joiner.add(prefix + "Target Record: " + recordToString.apply(r));
- joiner.add(prefix + "Intent: " + mIntent);
- joiner.add(prefix + "TaskToFront: " + taskToFront);
- joiner.add(prefix + "BalCode: " + balCodeToString(mBalCode));
-
- joiner.add(prefix + "------ Activity Security " + action + " Debug Logging End ------");
- return joiner.toString();
- }
-
- /**
* Returns whether embedding of {@code starting} is allowed.
*
* @param taskFragment the TaskFragment for embedding.
@@ -2284,8 +2053,9 @@ class ActivityStarter {
reusedTask != null ? reusedTask.getTopNonFinishingActivity() : null, intentGrants);
if (mAddingToTask) {
- clearTopIfNeeded(targetTask, mCallingUid, mRealCallingUid, mStartActivity.getUid(),
- mLaunchFlags);
+ mSupervisor.getBackgroundActivityLaunchController().clearTopIfNeeded(targetTask,
+ mSourceRecord, mStartActivity, mCallingUid, mRealCallingUid, mLaunchFlags,
+ mBalCode);
return START_SUCCESS;
}
@@ -2318,65 +2088,6 @@ class ActivityStarter {
}
/**
- * If the top activity uid does not match the launching or launched activity, and the launch was
- * not requested from the top uid, we want to clear out all non matching activities to prevent
- * the top activity being sandwiched.
- *
- * Both creator and sender UID are considered for the launching activity.
- */
- private void clearTopIfNeeded(@NonNull Task targetTask, int callingUid, int realCallingUid,
- int startingUid, int launchFlags) {
- if ((launchFlags & FLAG_ACTIVITY_NEW_TASK) != FLAG_ACTIVITY_NEW_TASK
- || mBalCode == BAL_ALLOW_ALLOWLISTED_UID) {
- // Launch is from the same task, (a top or privileged UID), or is directly privileged.
- return;
- }
-
- Predicate<ActivityRecord> isLaunchingOrLaunched = ar ->
- ar.isUid(startingUid) || ar.isUid(callingUid) || ar.isUid(realCallingUid);
-
- // Return early if we know for sure we won't need to clear any activities by just checking
- // the top activity.
- ActivityRecord targetTaskTop = targetTask.getTopMostActivity();
- if (targetTaskTop == null || isLaunchingOrLaunched.test(targetTaskTop)) {
- return;
- }
-
- // Find the first activity which matches a safe UID and is not finishing. Clear everything
- // above it
- boolean shouldBlockActivityStart = ActivitySecurityModelFeatureFlags
- .shouldRestrictActivitySwitch(callingUid);
- int[] finishCount = new int[0];
- if (shouldBlockActivityStart) {
- ActivityRecord activity = targetTask.getActivity(isLaunchingOrLaunched);
- if (activity == null) {
- // mStartActivity is not in task, so clear everything
- activity = mStartActivity;
- }
-
- finishCount = new int[1];
- targetTask.performClearTop(activity, launchFlags, finishCount);
- if (finishCount[0] > 0) {
- Slog.w(TAG, "Cleared top n: " + finishCount[0] + " activities from task t: "
- + targetTask + " not matching top uid: " + callingUid);
- }
- }
-
- if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)
- && (!shouldBlockActivityStart || finishCount[0] > 0)) {
- UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
- (shouldBlockActivityStart
- ? "Top activities cleared by "
- : "Top activities would be cleared by ")
- + ActivitySecurityModelFeatureFlags.DOC_LINK,
- Toast.LENGTH_LONG).show());
-
- getDebugInfoForActivitySecurity("Clear Top", mStartActivity, targetTask, targetTaskTop,
- shouldBlockActivityStart, /* taskToFront */ true);
- }
- }
-
- /**
* Check if the activity being launched is the same as the one currently at the top and it
* should only be launched once.
*/
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 4aea70c6dd64..6999c6a2a5d8 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -2220,7 +2220,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
callerApp = getProcessController(appThread);
}
final BackgroundActivityStartController balController =
- getActivityStartController().getBackgroundActivityLaunchController();
+ mTaskSupervisor.getBackgroundActivityLaunchController();
if (balController.shouldAbortBackgroundActivityStart(
callingUid,
callingPid,
diff --git a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
index 6eb9ed695133..e523119ee9a0 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
@@ -134,12 +134,10 @@ import android.os.WorkSource;
import android.provider.MediaStore;
import android.util.ArrayMap;
import android.util.MergedConfiguration;
-import android.util.Pair;
import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.Display;
-import android.widget.Toast;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
@@ -147,10 +145,8 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.ReferrerIntent;
import com.android.internal.protolog.common.ProtoLog;
import com.android.internal.util.ArrayUtils;
-import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.util.function.pooled.PooledLambda;
import com.android.server.LocalServices;
-import com.android.server.UiThread;
import com.android.server.am.ActivityManagerService;
import com.android.server.am.HostingRecord;
import com.android.server.am.UserState;
@@ -256,6 +252,9 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
final ActivityTaskManagerService mService;
RootWindowContainer mRootWindowContainer;
+ /** Helper class for checking if an activity transition meets security rules */
+ BackgroundActivityStartController mBalController;
+
/** The historial list of recent tasks including inactive tasks */
RecentTasks mRecentTasks;
@@ -466,6 +465,8 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
mLaunchParamsPersister = new LaunchParamsPersister(mPersisterQueue, this);
mLaunchParamsController = new LaunchParamsController(mService, mLaunchParamsPersister);
mLaunchParamsController.registerDefaultModifiers(this);
+
+ mBalController = new BackgroundActivityStartController(mService, this);
}
void onSystemReady() {
@@ -928,8 +929,8 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
final IBinder fragmentToken = r.getTaskFragment().getFragmentToken();
final int deviceId = getDeviceIdForDisplayId(r.getDisplayId());
- clientTransaction.addCallback(LaunchActivityItem.obtain(new Intent(r.intent),
- System.identityHashCode(r), r.info,
+ clientTransaction.addCallback(LaunchActivityItem.obtain(r.token,
+ new Intent(r.intent), System.identityHashCode(r), r.info,
// TODO: Have this take the merged configuration instead of separate global
// and override configs.
mergedConfiguration.getGlobalConfiguration(),
@@ -943,10 +944,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
// Set desired final state.
final ActivityLifecycleItem lifecycleItem;
if (andResume) {
- lifecycleItem = ResumeActivityItem.obtain(isTransitionForward,
+ lifecycleItem = ResumeActivityItem.obtain(r.token, isTransitionForward,
r.shouldSendCompatFakeFocus());
} else {
- lifecycleItem = PauseActivityItem.obtain();
+ lifecycleItem = PauseActivityItem.obtain(r.token);
}
clientTransaction.setLifecycleStateRequest(lifecycleItem);
@@ -1284,6 +1285,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
return mAppOpsManager;
}
+ BackgroundActivityStartController getBackgroundActivityLaunchController() {
+ return mBalController;
+ }
+
private int getComponentRestrictionForCallingPackage(ActivityInfo activityInfo,
String callingPackage, @Nullable String callingFeatureId, int callingPid,
int callingUid, boolean ignoreTargetSecurity) {
@@ -1700,172 +1705,12 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
if (task.isPersistable) {
mService.notifyTaskPersisterLocked(null, true);
}
- checkActivitySecurityForTaskClear(callingUid, task, callerActivityClassName);
+ mBalController
+ .checkActivityAllowedToClearTask(task, callingUid, callerActivityClassName);
} finally {
task.mInRemoveTask = false;
}
}
-
- // TODO(b/263368846) Move to live with the rest of the ASM logic.
- /**
- * Returns home if the passed in callingUid is not top of the stack, rather than returning to
- * previous task.
- */
- private void checkActivitySecurityForTaskClear(int callingUid, Task task,
- String callerActivityClassName) {
- // We may have already checked that the callingUid has additional clearTask privileges, and
- // cleared the calling identify. If so, we infer we do not need further restrictions here.
- if (callingUid == SYSTEM_UID || !task.isVisible() || task.inMultiWindowMode()) {
- return;
- }
-
- TaskDisplayArea displayArea = task.getTaskDisplayArea();
- if (displayArea == null) {
- // If there is no associated display area, we can not return home.
- return;
- }
-
- Pair<Boolean, Boolean> pair = doesTopActivityMatchingUidExistForAsm(task, callingUid, null);
- boolean shouldBlockActivitySwitchIfFeatureEnabled = !pair.first;
- boolean wouldBlockActivitySwitchIgnoringFlags = !pair.second;
-
- if (!wouldBlockActivitySwitchIgnoringFlags) {
- return;
- }
-
- ActivityRecord topActivity = task.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
- FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
- /* caller_uid */
- callingUid,
- /* caller_activity_class_name */
- callerActivityClassName,
- /* target_task_top_activity_uid */
- topActivity == null ? -1 : topActivity.getUid(),
- /* target_task_top_activity_class_name */
- topActivity == null ? null : topActivity.info.name,
- /* target_task_is_different */
- false,
- /* target_activity_uid */
- -1,
- /* target_activity_class_name */
- null,
- /* target_intent_action */
- null,
- /* target_intent_flags */
- 0,
- /* action */
- FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__FINISH_TASK,
- /* version */
- ActivitySecurityModelFeatureFlags.ASM_VERSION,
- /* multi_window */
- false,
- /* bal_code */
- -1,
- /* task_stack */
- null
- );
-
- boolean restrictActivitySwitch = ActivitySecurityModelFeatureFlags
- .shouldRestrictActivitySwitch(callingUid)
- && shouldBlockActivitySwitchIfFeatureEnabled;
-
- PackageManager pm = mService.mContext.getPackageManager();
- String callingPackage = pm.getNameForUid(callingUid);
- final CharSequence callingLabel;
- if (callingPackage == null) {
- callingPackage = String.valueOf(callingUid);
- callingLabel = callingPackage;
- } else {
- callingLabel = getApplicationLabel(pm, callingPackage);
- }
-
- if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
- UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
- (ActivitySecurityModelFeatureFlags.DOC_LINK
- + (restrictActivitySwitch ? " returned home due to "
- : " would return home due to ")
- + callingLabel), Toast.LENGTH_LONG).show());
- }
-
- // If the activity switch should be restricted, return home rather than the
- // previously top task, to prevent users from being confused which app they're
- // viewing
- if (restrictActivitySwitch) {
- Slog.w(TAG, "[ASM] Return to home as source: " + callingPackage
- + " is not on top of task t: " + task);
- displayArea.moveHomeActivityToTop("taskRemoved");
- } else {
- Slog.i(TAG, "[ASM] Would return to home as source: " + callingPackage
- + " is not on top of task t: " + task);
- }
- }
-
- /**
- * For the purpose of ASM, ‘Top UID” for a task is defined as an activity UID
- * 1. Which is top of the stack in z-order
- * a. Excluding any activities with the flag ‘isAlwaysOnTop’ and
- * b. Excluding any activities which are `finishing`
- * 2. Or top of an adjacent task fragment to (1)
- *
- * The 'sourceRecord' can be considered top even if it is 'finishing'
- *
- * @return A pair where the first value is the return value matching the checks above, and the
- * second value is the return value disregarding the feature flag or target api levels. Use the
- * first value for blocking launches - the second value is only used to determine if a toast
- * should be displayed, and will be used alongside a feature flag in {@link ActivityStarter}.
- */
- // TODO(b/263368846) Shift to BackgroundActivityStartController once class is ready
- @Nullable
- static Pair<Boolean, Boolean> doesTopActivityMatchingUidExistForAsm(@Nullable Task task,
- int uid, @Nullable ActivityRecord sourceRecord) {
- // If the source is visible, consider it 'top'.
- if (sourceRecord != null && sourceRecord.isVisible()) {
- return new Pair<>(true, true);
- }
-
- // Always allow actual top activity to clear task
- ActivityRecord topActivity = task.getTopMostActivity();
- if (topActivity != null && topActivity.isUid(uid)) {
- return new Pair<>(true, true);
- }
-
- // Consider the source activity, whether or not it is finishing. Do not consider any other
- // finishing activity.
- Predicate<ActivityRecord> topOfStackPredicate = (ar) -> ar.equals(sourceRecord)
- || (!ar.finishing && !ar.isAlwaysOnTop());
-
- // Check top of stack (or the first task fragment for embedding).
- topActivity = task.getActivity(topOfStackPredicate);
- if (topActivity == null) {
- return new Pair<>(false, false);
- }
-
- Pair<Boolean, Boolean> pair = topActivity.allowCrossUidActivitySwitchFromBelow(uid);
- if (pair.first) {
- return new Pair<>(true, pair.second);
- }
-
- // Even if the top activity is not a match, we may be in an embedded activity scenario with
- // an adjacent task fragment. Get the second fragment.
- TaskFragment taskFragment = topActivity.getTaskFragment();
- if (taskFragment == null) {
- return new Pair<>(false, false);
- }
-
- TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
- if (adjacentTaskFragment == null) {
- return new Pair<>(false, false);
- }
-
- // Check the second fragment.
- topActivity = adjacentTaskFragment.getActivity(topOfStackPredicate);
- if (topActivity == null) {
- return new Pair<>(false, false);
- }
-
- return topActivity.allowCrossUidActivitySwitchFromBelow(uid);
- }
-
static CharSequence getApplicationLabel(PackageManager pm, String packageName) {
try {
ApplicationInfo launchedFromPackageInfo = pm.getApplicationInfo(
diff --git a/services/core/java/com/android/server/wm/AppTaskImpl.java b/services/core/java/com/android/server/wm/AppTaskImpl.java
index de38a20d9b53..761b0a8f0b39 100644
--- a/services/core/java/com/android/server/wm/AppTaskImpl.java
+++ b/services/core/java/com/android/server/wm/AppTaskImpl.java
@@ -122,8 +122,7 @@ class AppTaskImpl extends IAppTask.Stub {
callerApp = mService.getProcessController(appThread);
}
final BackgroundActivityStartController balController =
- mService.getActivityStartController()
- .getBackgroundActivityLaunchController();
+ mService.mTaskSupervisor.getBackgroundActivityLaunchController();
if (balController.shouldAbortBackgroundActivityStart(
callingUid,
callingPid,
diff --git a/services/core/java/com/android/server/wm/AsyncRotationController.java b/services/core/java/com/android/server/wm/AsyncRotationController.java
index 0a2bbd467ab3..4b463c7e1756 100644
--- a/services/core/java/com/android/server/wm/AsyncRotationController.java
+++ b/services/core/java/com/android/server/wm/AsyncRotationController.java
@@ -459,7 +459,7 @@ class AsyncRotationController extends FadeAnimationController implements Consume
// insets should keep original position before the start transaction is applied.
return mTransitionOp != OP_LEGACY && (mTransitionOp == OP_APP_SWITCH
|| TransitionController.SYNC_METHOD == BLASTSyncEngine.METHOD_BLAST)
- && !mIsStartTransactionCommitted && isTargetToken(w.mToken);
+ && !mIsStartTransactionCommitted && canBeAsync(w.mToken) && isTargetToken(w.mToken);
}
/**
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
index 188f4d0b8ced..4bafccdaaec6 100644
--- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
@@ -17,7 +17,9 @@
package com.android.server.wm;
import static android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.os.Process.SYSTEM_UID;
import static android.provider.DeviceConfig.NAMESPACE_WINDOW_MANAGER;
import static com.android.internal.util.Preconditions.checkState;
@@ -26,10 +28,13 @@ 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.ActivityTaskManagerService.APP_SWITCH_ALLOW;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_FG_ONLY;
+import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel;
+import static com.android.server.wm.PendingRemoteAnimationRegistry.TIMEOUT_MS;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityOptions;
@@ -45,12 +50,19 @@ import android.provider.DeviceConfig;
import android.util.ArraySet;
import android.util.DebugUtils;
import android.util.Slog;
+import android.widget.Toast;
-
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.UiThread;
import com.android.server.am.PendingIntentRecord;
import java.lang.annotation.Retention;
+import java.util.HashMap;
+import java.util.StringJoiner;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
/**
* Helper class to check permissions for starting Activities.
@@ -65,6 +77,9 @@ public class BackgroundActivityStartController {
public static final String VERDICT_WOULD_BE_ALLOWED_IF_SENDER_GRANTS_BAL =
"Activity start would be allowed if the sender granted BAL privileges";
+ private static final long ASM_GRACEPERIOD_TIMEOUT_MS = TIMEOUT_MS;
+ private static final int ASM_GRACEPERIOD_MAX_REPEATS = 5;
+
private final ActivityTaskManagerService mService;
private final ActivityTaskSupervisor mSupervisor;
@@ -148,6 +163,11 @@ public class BackgroundActivityStartController {
}
}
+ @GuardedBy("mService.mGlobalLock")
+ private HashMap<Integer, FinishedActivityEntry> mTaskIdToFinishedActivity = new HashMap<>();
+ @GuardedBy("mService.mGlobalLock")
+ private FinishedActivityEntry mTopFinishedActivity = null;
+
BackgroundActivityStartController(
final ActivityTaskManagerService service, final ActivityTaskSupervisor supervisor) {
mService = service;
@@ -575,6 +595,501 @@ public class BackgroundActivityStartController {
return BAL_BLOCK;
}
+ /**
+ * Log activity starts which violate one of the following rules of the
+ * activity security model (ASM):
+ * See go/activity-security for rationale behind the rules.
+ * 1. Within a task, only an activity matching a top UID of the task can start activities
+ * 2. Only activities within a foreground task, which match a top UID of the task, can
+ * create a new task or bring an existing one into the foreground
+ */
+ boolean checkActivityAllowedToStart(@Nullable ActivityRecord sourceRecord,
+ @NonNull ActivityRecord targetRecord, boolean newTask, @NonNull Task targetTask,
+ int launchFlags, int balCode, int callingUid, int realCallingUid) {
+ // BAL Exception allowed in all cases
+ if (balCode == BAL_ALLOW_ALLOWLISTED_UID) {
+ return true;
+ }
+
+ // Intents with FLAG_ACTIVITY_NEW_TASK will always be considered as creating a new task
+ // even if the intent is delivered to an existing task.
+ boolean taskToFront = newTask
+ || (launchFlags & FLAG_ACTIVITY_NEW_TASK) == FLAG_ACTIVITY_NEW_TASK;
+
+ // BAL exception only allowed for new tasks
+ if (taskToFront) {
+ if (balCode == BAL_ALLOW_ALLOWLISTED_COMPONENT
+ || balCode == BAL_ALLOW_PERMISSION
+ || balCode == BAL_ALLOW_PENDING_INTENT
+ || balCode == BAL_ALLOW_SAW_PERMISSION
+ || balCode == BAL_ALLOW_VISIBLE_WINDOW) {
+ return true;
+ }
+ }
+
+ if (balCode == BAL_ALLOW_GRACE_PERIOD) {
+ if (taskToFront && mTopFinishedActivity != null
+ && mTopFinishedActivity.mUid == callingUid) {
+ return true;
+ } else if (!taskToFront) {
+ FinishedActivityEntry finishedEntry =
+ mTaskIdToFinishedActivity.get(targetTask.mTaskId);
+ if (finishedEntry != null && finishedEntry.mUid == callingUid) {
+ return true;
+ }
+ }
+ }
+
+ BlockActivityStart bas = null;
+ if (sourceRecord != null) {
+ boolean passesAsmChecks = true;
+ Task sourceTask = sourceRecord.getTask();
+
+ // Allow launching into a new task (or a task matching the launched activity's
+ // affinity) only if the current task is foreground or mutating its own task.
+ // The latter can happen eg. if caller uses NEW_TASK flag and the activity being
+ // launched matches affinity of source task.
+ if (taskToFront) {
+ passesAsmChecks = sourceTask != null
+ && (sourceTask.isVisible() || sourceTask == targetTask);
+ }
+
+ if (passesAsmChecks) {
+ Task taskToCheck = taskToFront ? sourceTask : targetTask;
+ bas = isTopActivityMatchingUidAbsentForAsm(taskToCheck, sourceRecord.getUid(),
+ sourceRecord);
+ }
+ } else if (!taskToFront) {
+ // We don't have a sourceRecord, and we're launching into an existing task.
+ // Allow if callingUid is top of stack.
+ bas = isTopActivityMatchingUidAbsentForAsm(targetTask, callingUid,
+ /*sourceRecord*/null);
+ }
+
+ if (bas != null && !bas.mWouldBlockActivityStartIgnoringFlag) {
+ return true;
+ }
+
+ // ASM rules have failed. Log why
+ return logAsmFailureAndCheckFeatureEnabled(sourceRecord, callingUid, realCallingUid,
+ newTask, targetTask, targetRecord, balCode, launchFlags, bas, taskToFront);
+ }
+
+ private boolean logAsmFailureAndCheckFeatureEnabled(ActivityRecord sourceRecord, int callingUid,
+ int realCallingUid, boolean newTask, Task targetTask, ActivityRecord targetRecord,
+ @BalCode int balCode, int launchFlags, BlockActivityStart bas, boolean taskToFront) {
+
+ ActivityRecord targetTopActivity = targetTask == null ? null
+ : targetTask.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
+
+ int action = newTask || sourceRecord == null
+ ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_NEW_TASK
+ : (sourceRecord.getTask().equals(targetTask)
+ ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_SAME_TASK
+ : FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_DIFFERENT_TASK);
+
+ boolean blockActivityStartAndFeatureEnabled = ActivitySecurityModelFeatureFlags
+ .shouldRestrictActivitySwitch(callingUid)
+ && (bas == null || bas.mBlockActivityStartIfFlagEnabled);
+
+ String asmDebugInfo = getDebugInfoForActivitySecurity("Launch", sourceRecord,
+ targetRecord, targetTask, targetTopActivity, realCallingUid, balCode,
+ blockActivityStartAndFeatureEnabled, taskToFront);
+
+ FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
+ /* caller_uid */
+ sourceRecord != null ? sourceRecord.getUid() : callingUid,
+ /* caller_activity_class_name */
+ sourceRecord != null ? sourceRecord.info.name : null,
+ /* target_task_top_activity_uid */
+ targetTopActivity != null ? targetTopActivity.getUid() : -1,
+ /* target_task_top_activity_class_name */
+ targetTopActivity != null ? targetTopActivity.info.name : null,
+ /* target_task_is_different */
+ newTask || sourceRecord == null || targetTask == null
+ || !targetTask.equals(sourceRecord.getTask()),
+ /* target_activity_uid */
+ targetRecord.getUid(),
+ /* target_activity_class_name */
+ targetRecord.info.name,
+ /* target_intent_action */
+ targetRecord.intent.getAction(),
+ /* target_intent_flags */
+ launchFlags,
+ /* action */
+ action,
+ /* version */
+ ActivitySecurityModelFeatureFlags.ASM_VERSION,
+ /* multi_window - we have our source not in the target task, but both are visible */
+ targetTask != null && sourceRecord != null
+ && !targetTask.equals(sourceRecord.getTask()) && targetTask.isVisible(),
+ /* bal_code */
+ balCode,
+ /* debug_info */
+ asmDebugInfo
+ );
+
+ String launchedFromPackageName = targetRecord.launchedFromPackage;
+ if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
+ String toastText = ActivitySecurityModelFeatureFlags.DOC_LINK
+ + (blockActivityStartAndFeatureEnabled ? " blocked " : " would block ")
+ + getApplicationLabel(mService.mContext.getPackageManager(),
+ launchedFromPackageName);
+ UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+ toastText, Toast.LENGTH_LONG).show());
+
+ Slog.i(TAG, asmDebugInfo);
+ }
+
+ if (blockActivityStartAndFeatureEnabled) {
+ Slog.e(TAG, "[ASM] Abort Launching r: " + targetRecord
+ + " as source: "
+ + (sourceRecord != null ? sourceRecord : launchedFromPackageName)
+ + " is in background. New task: " + newTask
+ + ". Top activity: " + targetTopActivity
+ + ". BAL Code: " + balCodeToString(balCode));
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * If the top activity uid does not match the launching or launched activity, and the launch was
+ * not requested from the top uid, we want to clear out all non matching activities to prevent
+ * the top activity being sandwiched.
+ * Both creator and sender UID are considered for the launching activity.
+ */
+ void clearTopIfNeeded(@NonNull Task targetTask, @Nullable ActivityRecord sourceRecord,
+ @NonNull ActivityRecord targetRecord, int callingUid, int realCallingUid,
+ int launchFlags, @BalCode int balCode) {
+ if ((launchFlags & FLAG_ACTIVITY_NEW_TASK) != FLAG_ACTIVITY_NEW_TASK
+ || balCode == BAL_ALLOW_ALLOWLISTED_UID) {
+ // Launch is from the same task, (a top or privileged UID), or is directly privileged.
+ return;
+ }
+
+ int startingUid = targetRecord.getUid();
+ Predicate<ActivityRecord> isLaunchingOrLaunched = ar ->
+ ar.isUid(startingUid) || ar.isUid(callingUid) || ar.isUid(realCallingUid);
+
+ // Return early if we know for sure we won't need to clear any activities by just checking
+ // the top activity.
+ ActivityRecord targetTaskTop = targetTask.getTopMostActivity();
+ if (targetTaskTop == null || isLaunchingOrLaunched.test(targetTaskTop)) {
+ return;
+ }
+
+ // Find the first activity which matches a safe UID and is not finishing. Clear everything
+ // above it
+ boolean shouldBlockActivityStart = ActivitySecurityModelFeatureFlags
+ .shouldRestrictActivitySwitch(callingUid);
+ int[] finishCount = new int[0];
+ if (shouldBlockActivityStart) {
+ ActivityRecord activity = targetTask.getActivity(isLaunchingOrLaunched);
+ if (activity == null) {
+ // mStartActivity is not in task, so clear everything
+ activity = targetRecord;
+ }
+
+ finishCount = new int[1];
+ targetTask.performClearTop(activity, launchFlags, finishCount);
+ if (finishCount[0] > 0) {
+ Slog.w(TAG, "Cleared top n: " + finishCount[0] + " activities from task t: "
+ + targetTask + " not matching top uid: " + callingUid);
+ }
+ }
+
+ if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)
+ && (!shouldBlockActivityStart || finishCount[0] > 0)) {
+ UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+ (shouldBlockActivityStart
+ ? "Top activities cleared by "
+ : "Top activities would be cleared by ")
+ + ActivitySecurityModelFeatureFlags.DOC_LINK,
+ Toast.LENGTH_LONG).show());
+
+ Slog.i(TAG, getDebugInfoForActivitySecurity("Clear Top", sourceRecord, targetRecord,
+ targetTask, targetTaskTop, realCallingUid, balCode, shouldBlockActivityStart,
+ /* taskToFront */ true));
+ }
+ }
+
+ /**
+ * Returns home if the passed in callingUid is not top of the stack, rather than returning to
+ * previous task.
+ */
+ void checkActivityAllowedToClearTask(@NonNull Task task, int callingUid,
+ @NonNull String callerActivityClassName) {
+ // We may have already checked that the callingUid has additional clearTask privileges, and
+ // cleared the calling identify. If so, we infer we do not need further restrictions here.
+ if (callingUid == SYSTEM_UID || !task.isVisible() || task.inMultiWindowMode()) {
+ return;
+ }
+
+ TaskDisplayArea displayArea = task.getTaskDisplayArea();
+ if (displayArea == null) {
+ // If there is no associated display area, we can not return home.
+ return;
+ }
+
+ BlockActivityStart bas = isTopActivityMatchingUidAbsentForAsm(task, callingUid, null);
+ if (!bas.mWouldBlockActivityStartIgnoringFlag) {
+ return;
+ }
+
+ ActivityRecord topActivity = task.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
+ FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
+ /* caller_uid */
+ callingUid,
+ /* caller_activity_class_name */
+ callerActivityClassName,
+ /* target_task_top_activity_uid */
+ topActivity == null ? -1 : topActivity.getUid(),
+ /* target_task_top_activity_class_name */
+ topActivity == null ? null : topActivity.info.name,
+ /* target_task_is_different */
+ false,
+ /* target_activity_uid */
+ -1,
+ /* target_activity_class_name */
+ null,
+ /* target_intent_action */
+ null,
+ /* target_intent_flags */
+ 0,
+ /* action */
+ FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__FINISH_TASK,
+ /* version */
+ ActivitySecurityModelFeatureFlags.ASM_VERSION,
+ /* multi_window */
+ false,
+ /* bal_code */
+ -1,
+ /* debug_info */
+ null
+ );
+
+ boolean restrictActivitySwitch = ActivitySecurityModelFeatureFlags
+ .shouldRestrictActivitySwitch(callingUid)
+ && bas.mBlockActivityStartIfFlagEnabled;
+
+ PackageManager pm = mService.mContext.getPackageManager();
+ String callingPackage = pm.getNameForUid(callingUid);
+ final CharSequence callingLabel;
+ if (callingPackage == null) {
+ callingPackage = String.valueOf(callingUid);
+ callingLabel = callingPackage;
+ } else {
+ callingLabel = getApplicationLabel(pm, callingPackage);
+ }
+
+ if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
+ UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+ (ActivitySecurityModelFeatureFlags.DOC_LINK
+ + (restrictActivitySwitch ? " returned home due to "
+ : " would return home due to ")
+ + callingLabel), Toast.LENGTH_LONG).show());
+ }
+
+ // If the activity switch should be restricted, return home rather than the
+ // previously top task, to prevent users from being confused which app they're
+ // viewing
+ if (restrictActivitySwitch) {
+ Slog.w(TAG, "[ASM] Return to home as source: " + callingPackage
+ + " is not on top of task t: " + task);
+ displayArea.moveHomeActivityToTop("taskRemoved");
+ } else {
+ Slog.i(TAG, "[ASM] Would return to home as source: " + callingPackage
+ + " is not on top of task t: " + task);
+ }
+ }
+
+ /**
+ * For the purpose of ASM, ‘Top UID” for a task is defined as an activity UID
+ * 1. Which is top of the stack in z-order
+ * a. Excluding any activities with the flag ‘isAlwaysOnTop’ and
+ * b. Excluding any activities which are `finishing`
+ * 2. Or top of an adjacent task fragment to (1)
+ * <p>
+ * The 'sourceRecord' can be considered top even if it is 'finishing'
+ *
+ * Returns a class where the elements are:
+ * <pre>
+ * shouldBlockActivityStart: {@code true} if we should actually block the transition (takes into
+ * consideration feature flag and targetSdk).
+ * wouldBlockActivityStartIgnoringFlags: {@code true} if we should warn about the transition via
+ * toasts. This happens if the transition would be blocked in case both the app was targeting V+
+ * and the feature was enabled.
+ * </pre>
+ */
+ private BlockActivityStart isTopActivityMatchingUidAbsentForAsm(@NonNull Task task,
+ int uid, @Nullable ActivityRecord sourceRecord) {
+ // If the source is visible, consider it 'top'.
+ if (sourceRecord != null && sourceRecord.isVisible()) {
+ return new BlockActivityStart(false, false);
+ }
+
+ // Always allow actual top activity to clear task
+ ActivityRecord topActivity = task.getTopMostActivity();
+ if (topActivity != null && topActivity.isUid(uid)) {
+ return new BlockActivityStart(false, false);
+ }
+
+ // Consider the source activity, whether or not it is finishing. Do not consider any other
+ // finishing activity.
+ Predicate<ActivityRecord> topOfStackPredicate = (ar) -> ar.equals(sourceRecord)
+ || (!ar.finishing && !ar.isAlwaysOnTop());
+
+ // Check top of stack (or the first task fragment for embedding).
+ topActivity = task.getActivity(topOfStackPredicate);
+ if (topActivity == null) {
+ return new BlockActivityStart(true, true);
+ }
+
+ BlockActivityStart pair = blockCrossUidActivitySwitchFromBelow(topActivity, uid);
+ if (!pair.mBlockActivityStartIfFlagEnabled) {
+ return pair;
+ }
+
+ // Even if the top activity is not a match, we may be in an embedded activity scenario with
+ // an adjacent task fragment. Get the second fragment.
+ TaskFragment taskFragment = topActivity.getTaskFragment();
+ if (taskFragment == null) {
+ return pair;
+ }
+
+ TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
+ if (adjacentTaskFragment == null) {
+ return pair;
+ }
+
+ // Check the second fragment.
+ topActivity = adjacentTaskFragment.getActivity(topOfStackPredicate);
+ if (topActivity == null) {
+ return new BlockActivityStart(true, true);
+ }
+
+ return blockCrossUidActivitySwitchFromBelow(topActivity, uid);
+ }
+
+ /**
+ * Determines if a source is allowed to add or remove activities from the task,
+ * if the current ActivityRecord is above it in the stack
+ *
+ * A transition is blocked ({@code false} returned) if all of the following are met:
+ * <pre>
+ * 1. The source activity and the current activity record belong to different apps
+ * (i.e, have different UIDs).
+ * 2. Both the source activity and the current activity target U+
+ * 3. The current activity has not set
+ * {@link ActivityRecord#setAllowCrossUidActivitySwitchFromBelow(boolean)} to {@code true}
+ * </pre>
+ *
+ * Returns a class where the elements are:
+ * <pre>
+ * shouldBlockActivityStart: {@code true} if we should actually block the transition (takes into
+ * consideration feature flag and targetSdk).
+ * wouldBlockActivityStartIgnoringFlags: {@code true} if we should warn about the transition via
+ * toasts. This happens if the transition would be blocked in case both the app was targeting V+
+ * and the feature was enabled.
+ * </pre>
+ *
+ * @param sourceUid The source (s) activity performing the state change
+ */
+ private BlockActivityStart blockCrossUidActivitySwitchFromBelow(ActivityRecord ar,
+ int sourceUid) {
+ if (ar.isUid(sourceUid)) {
+ return new BlockActivityStart(false, false);
+ }
+
+ // If mAllowCrossUidActivitySwitchFromBelow is set, honor it.
+ if (ar.mAllowCrossUidActivitySwitchFromBelow) {
+ return new BlockActivityStart(false, false);
+ }
+
+ // At this point, we would block if the feature is launched and both apps were V+
+ // Since we have a feature flag, we need to check that too
+ // TODO(b/258792202) Replace with CompatChanges and replace Pair with boolean once feature
+ // flag is removed
+ boolean restrictActivitySwitch =
+ ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(ar.getUid())
+ && ActivitySecurityModelFeatureFlags
+ .shouldRestrictActivitySwitch(sourceUid);
+ return new BackgroundActivityStartController
+ .BlockActivityStart(restrictActivitySwitch, true);
+ }
+
+ /**
+ * Only called when an activity launch may be blocked, which should happen very rarely
+ */
+ private String getDebugInfoForActivitySecurity(@NonNull String action,
+ @Nullable ActivityRecord sourceRecord, @NonNull ActivityRecord targetRecord,
+ @Nullable Task targetTask, @Nullable ActivityRecord targetTopActivity,
+ int realCallingUid, @BalCode int balCode,
+ boolean blockActivityStartAndFeatureEnabled, boolean taskToFront) {
+ final String prefix = "[ASM] ";
+ Function<ActivityRecord, String> recordToString = (ar) -> {
+ if (ar == null) {
+ return null;
+ }
+ return (ar == sourceRecord ? " [source]=> "
+ : ar == targetTopActivity ? " [ top ]=> "
+ : ar == targetRecord ? " [target]=> "
+ : " => ")
+ + ar
+ + " :: visible=" + ar.isVisible()
+ + ", finishing=" + ar.isFinishing()
+ + ", alwaysOnTop=" + ar.isAlwaysOnTop()
+ + ", taskFragment=" + ar.getTaskFragment();
+ };
+
+ StringJoiner joiner = new StringJoiner("\n");
+ joiner.add(prefix + "------ Activity Security " + action + " Debug Logging Start ------");
+ joiner.add(prefix + "Block Enabled: " + blockActivityStartAndFeatureEnabled);
+ joiner.add(prefix + "ASM Version: " + ActivitySecurityModelFeatureFlags.ASM_VERSION);
+
+ boolean targetTaskMatchesSourceTask = targetTask != null
+ && sourceRecord != null && sourceRecord.getTask() == targetTask;
+
+ if (sourceRecord == null) {
+ joiner.add(prefix + "Source Package: " + targetRecord.launchedFromPackage);
+ String realCallingPackage = mService.mContext.getPackageManager().getNameForUid(
+ realCallingUid);
+ joiner.add(prefix + "Real Calling Uid Package: " + realCallingPackage);
+ } else {
+ joiner.add(prefix + "Source Record: " + recordToString.apply(sourceRecord));
+ if (targetTaskMatchesSourceTask) {
+ joiner.add(prefix + "Source/Target Task: " + sourceRecord.getTask());
+ joiner.add(prefix + "Source/Target Task Stack: ");
+ } else {
+ joiner.add(prefix + "Source Task: " + sourceRecord.getTask());
+ joiner.add(prefix + "Source Task Stack: ");
+ }
+ sourceRecord.getTask().forAllActivities((Consumer<ActivityRecord>)
+ ar -> joiner.add(prefix + recordToString.apply(ar)));
+ }
+
+ joiner.add(prefix + "Target Task Top: " + recordToString.apply(targetTopActivity));
+ if (!targetTaskMatchesSourceTask) {
+ joiner.add(prefix + "Target Task: " + targetTask);
+ if (targetTask != null) {
+ joiner.add(prefix + "Target Task Stack: ");
+ targetTask.forAllActivities((Consumer<ActivityRecord>)
+ ar -> joiner.add(prefix + recordToString.apply(ar)));
+ }
+ }
+
+ joiner.add(prefix + "Target Record: " + recordToString.apply(targetRecord));
+ joiner.add(prefix + "Intent: " + targetRecord.intent);
+ joiner.add(prefix + "TaskToFront: " + taskToFront);
+ joiner.add(prefix + "BalCode: " + balCodeToString(balCode));
+
+ joiner.add(prefix + "------ Activity Security " + action + " Debug Logging End ------");
+ return joiner.toString();
+ }
+
static @BalCode int logStartAllowedAndReturnCode(@BalCode int code, boolean background,
int callingUid, int realCallingUid, Intent intent, int pid, String msg) {
return logStartAllowedAndReturnCode(code, background, callingUid, realCallingUid, intent,
@@ -653,4 +1168,91 @@ public class BackgroundActivityStartController {
realCallingUid);
}
}
+
+ /**
+ * Called whenever an activity finishes. Stores the record, so it can be used by ASM grace
+ * period checks.
+ */
+ void onActivityRequestedFinishing(@NonNull ActivityRecord finishActivity) {
+ // We only update the entry if the passed in activity
+ // 1. Has been chained less than a set max AND
+ // 2. Is visible or top
+ FinishedActivityEntry entry =
+ mTaskIdToFinishedActivity.get(finishActivity.getTask().mTaskId);
+ if (entry != null && finishActivity.isUid(entry.mUid)
+ && entry.mLaunchCount > ASM_GRACEPERIOD_MAX_REPEATS) {
+ return;
+ }
+
+ if (!finishActivity.mVisibleRequested
+ && finishActivity != finishActivity.getTask().getTopMostActivity()) {
+ return;
+ }
+
+ FinishedActivityEntry newEntry = new FinishedActivityEntry(finishActivity);
+ mTaskIdToFinishedActivity.put(finishActivity.getTask().mTaskId, newEntry);
+ if (finishActivity.getTask().mVisibleRequested) {
+ mTopFinishedActivity = newEntry;
+ }
+ }
+
+ /**
+ * Called whenever an activity starts. Updates the record so the activity is no longer
+ * considered for ASM grace period checks
+ */
+ void onNewActivityLaunched(ActivityRecord activityStarted) {
+ if (activityStarted.getTask() == null) {
+ return;
+ }
+
+ if (activityStarted.getTask().mVisibleRequested) {
+ mTopFinishedActivity = null;
+ }
+
+ FinishedActivityEntry entry =
+ mTaskIdToFinishedActivity.get(activityStarted.getTask().mTaskId);
+ if (entry != null && activityStarted.getTask().isTaskId(entry.mTaskId)) {
+ mTaskIdToFinishedActivity.remove(entry.mTaskId);
+ }
+ }
+
+ static class BlockActivityStart {
+ // We should block if feature flag is enabled
+ private final boolean mBlockActivityStartIfFlagEnabled;
+ // Used for logging/toasts. Would we block if target sdk was V and feature was
+ // enabled?
+ private final boolean mWouldBlockActivityStartIgnoringFlag;
+
+ BlockActivityStart(boolean shouldBlockActivityStart,
+ boolean wouldBlockActivityStartIgnoringFlags) {
+ this.mBlockActivityStartIfFlagEnabled = shouldBlockActivityStart;
+ this.mWouldBlockActivityStartIgnoringFlag = wouldBlockActivityStartIgnoringFlags;
+ }
+ }
+
+ private class FinishedActivityEntry {
+ int mUid;
+ int mTaskId;
+ int mLaunchCount;
+
+ FinishedActivityEntry(ActivityRecord ar) {
+ FinishedActivityEntry entry = mTaskIdToFinishedActivity.get(ar.getTask().mTaskId);
+ int taskId = ar.getTask().mTaskId;
+ this.mUid = ar.getUid();
+ this.mTaskId = taskId;
+ this.mLaunchCount = entry == null || !ar.isUid(entry.mUid) ? 1 : entry.mLaunchCount + 1;
+
+ mService.mH.postDelayed(() -> {
+ synchronized (mService.mGlobalLock) {
+ if (mTaskIdToFinishedActivity.get(taskId) == this) {
+ mTaskIdToFinishedActivity.remove(taskId);
+ }
+
+ if (mTopFinishedActivity == this) {
+ mTopFinishedActivity = null;
+ }
+ }
+ }, ASM_GRACEPERIOD_TIMEOUT_MS);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/wm/CompatModePackages.java b/services/core/java/com/android/server/wm/CompatModePackages.java
index e906b185bae7..2439159164fd 100644
--- a/services/core/java/com/android/server/wm/CompatModePackages.java
+++ b/services/core/java/com/android/server/wm/CompatModePackages.java
@@ -451,7 +451,7 @@ public final class CompatModePackages {
final float appScale = compatScale != null
? compatScale.mScaleFactor
: getCompatScale(ai.packageName, ai.uid, /* checkProvider= */ false);
- final float densityScale = compatScale != null ? compatScale.mDensityScaleFactor : 1f;
+ final float densityScale = compatScale != null ? compatScale.mDensityScaleFactor : appScale;
final Configuration config = mService.getGlobalConfiguration();
return new CompatibilityInfo(ai, config.screenLayout, config.smallestScreenWidthDp,
forceCompat, appScale, densityScale);
diff --git a/services/core/java/com/android/server/wm/ContentRecorder.java b/services/core/java/com/android/server/wm/ContentRecorder.java
index f0e4149a9159..7cd07d6f3a5f 100644
--- a/services/core/java/com/android/server/wm/ContentRecorder.java
+++ b/services/core/java/com/android/server/wm/ContentRecorder.java
@@ -151,6 +151,20 @@ final class ContentRecorder implements WindowContainerListener {
return;
}
+ // TODO(b/297514518) Do not start capture if the app is in PIP, the bounds are
+ // inaccurate.
+ if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
+ final Task capturedTask = mRecordedWindowContainer.asTask();
+ if (capturedTask.inPinnedWindowingMode()) {
+ ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
+ "Content Recording: Display %d was already recording, but "
+ + "pause capture since the task is in PIP",
+ mDisplayContent.getDisplayId());
+ pauseRecording();
+ return;
+ }
+ }
+
ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
"Content Recording: Display %d was already recording, so apply "
+ "transformations if necessary",
@@ -292,6 +306,17 @@ final class ContentRecorder implements WindowContainerListener {
return;
}
+ // TODO(b/297514518) Do not start capture if the app is in PIP, the bounds are inaccurate.
+ if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
+ if (mRecordedWindowContainer.asTask().inPinnedWindowingMode()) {
+ ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
+ "Content Recording: Display %d should start recording, but "
+ + "don't yet since the task is in PIP",
+ mDisplayContent.getDisplayId());
+ return;
+ }
+ }
+
final Point surfaceSize = fetchSurfaceSizeIfPresent();
if (surfaceSize == null) {
ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
@@ -305,9 +330,6 @@ final class ContentRecorder implements WindowContainerListener {
+ "state %d",
mDisplayContent.getDisplayId(), mDisplayContent.getDisplayInfo().state);
- // TODO(b/274790702): Do not start recording if waiting for consent - for now,
- // go ahead.
-
// Create a mirrored hierarchy for the SurfaceControl of the DisplayArea to capture.
mRecordedSurface = SurfaceControl.mirrorSurface(
mRecordedWindowContainer.getSurfaceControl());
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index daa73db4684d..996d66681d05 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -6505,14 +6505,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
}
/**
- * @return whether AOD is showing on this display
- */
- boolean isAodShowing() {
- return mRootWindowContainer.mTaskSupervisor
- .getKeyguardController().isAodShowing(mDisplayId);
- }
-
- /**
* @return whether this display maintains its own focus and touch mode.
*/
boolean hasOwnFocus() {
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 395ab3a641b4..17bfeb453304 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1677,18 +1677,6 @@ public class DisplayPolicy {
}
private boolean shouldBeHiddenByKeyguard(WindowState win, WindowState imeTarget) {
- // If AOD is showing, the IME should be hidden. However, sometimes the AOD is considered
- // hidden because it's in the process of hiding, but it's still being shown on screen.
- // In that case, we want to continue hiding the IME until the windows have completed
- // drawing. This way, we know that the IME can be safely shown since the other windows are
- // now shown.
- final boolean hideIme = win.mIsImWindow
- && (mDisplayContent.isAodShowing()
- || (mDisplayContent.isDefaultDisplay && !mWindowManagerDrawComplete));
- if (hideIme) {
- return true;
- }
-
if (!mDisplayContent.isDefaultDisplay || !isKeyguardShowing()) {
return false;
}
diff --git a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
index f96f99d50053..c4ed0dd9d606 100644
--- a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
@@ -228,9 +228,9 @@ final class DisplayRotationCompatPolicy {
+ "activityRecord=%s", activity);
final ClientTransaction transaction = ClientTransaction.obtain(
activity.app.getThread(), activity.token);
- transaction.addCallback(
- RefreshCallbackItem.obtain(cycleThroughStop ? ON_STOP : ON_PAUSE));
- transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(
+ transaction.addCallback(RefreshCallbackItem.obtain(activity.token,
+ cycleThroughStop ? ON_STOP : ON_PAUSE));
+ transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(activity.token,
/* isForward */ false, /* shouldSendCompatFakeFocus */ false));
activity.mAtmService.getLifecycleManager().scheduleTransaction(transaction);
mHandler.postDelayed(
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java
index 0f1a1053716e..8519e4d3e53a 100644
--- a/services/core/java/com/android/server/wm/DragState.java
+++ b/services/core/java/com/android/server/wm/DragState.java
@@ -21,7 +21,6 @@ import static android.content.ClipDescription.MIMETYPE_APPLICATION_SHORTCUT;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_TASK;
import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP;
-
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ORIENTATION;
import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
import static com.android.server.wm.DragDropController.MSG_ANIMATION_END;
@@ -33,7 +32,6 @@ import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACT
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerService.MY_PID;
import static com.android.server.wm.WindowManagerService.MY_UID;
-
import static java.util.concurrent.CompletableFuture.completedFuture;
import android.animation.Animator;
@@ -48,7 +46,6 @@ import android.hardware.input.InputManagerGlobal;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
-import android.os.InputConfig;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
@@ -186,8 +183,13 @@ class DragState {
// Crop the input surface to the display size.
mTmpClipRect.set(0, 0, mDisplaySize.x, mDisplaySize.y);
+ // Make trusted overlay to not block any touches while D&D ongoing and allowing
+ // touches to pass through to windows underneath. This allows user to interact with the
+ // UI to navigate while dragging.
+ h.setTrustedOverlay(mTransaction, mInputSurface, true);
mTransaction.show(mInputSurface)
.setInputWindowInfo(mInputSurface, h)
+ .setTrustedOverlay(mInputSurface, true)
.setLayer(mInputSurface, Integer.MAX_VALUE)
.setCrop(mInputSurface, mTmpClipRect);
@@ -377,11 +379,6 @@ class DragState {
mDragWindowHandle.ownerUid = MY_UID;
mDragWindowHandle.scaleFactor = 1.0f;
- // InputConfig.TRUSTED_OVERLAY: To not block any touches while D&D ongoing and allowing
- // touches to pass through to windows underneath. This allows user to interact with the
- // UI to navigate while dragging.
- mDragWindowHandle.inputConfig = InputConfig.TRUSTED_OVERLAY;
-
// The drag window cannot receive new touches.
mDragWindowHandle.touchableRegion.setEmpty();
diff --git a/services/core/java/com/android/server/wm/InputConsumerImpl.java b/services/core/java/com/android/server/wm/InputConsumerImpl.java
index 39622c1c5aaf..c21930dab5eb 100644
--- a/services/core/java/com/android/server/wm/InputConsumerImpl.java
+++ b/services/core/java/com/android/server/wm/InputConsumerImpl.java
@@ -74,7 +74,7 @@ class InputConsumerImpl implements IBinder.DeathRecipient {
mWindowHandle.ownerPid = WindowManagerService.MY_PID;
mWindowHandle.ownerUid = WindowManagerService.MY_UID;
mWindowHandle.scaleFactor = 1.0f;
- mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.TRUSTED_OVERLAY;
+ mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE;
mInputSurface = mService.makeSurfaceBuilder(
mService.mRoot.getDisplayContent(displayId).getSession())
@@ -129,12 +129,14 @@ class InputConsumerImpl implements IBinder.DeathRecipient {
void show(SurfaceControl.Transaction t, WindowContainer w) {
t.show(mInputSurface);
+ mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
t.setInputWindowInfo(mInputSurface, mWindowHandle);
t.setRelativeLayer(mInputSurface, w.getSurfaceControl(), 1);
}
void show(SurfaceControl.Transaction t, int layer) {
t.show(mInputSurface);
+ mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
t.setInputWindowInfo(mInputSurface, mWindowHandle);
t.setLayer(mInputSurface, layer);
}
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 825d38b3eed7..f77da6287176 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -40,12 +40,10 @@ import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
-
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_FOCUS_LIGHT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerService.LOGTAG_INPUT_FOCUS;
-
import static java.lang.Integer.MAX_VALUE;
import android.annotation.Nullable;
@@ -732,7 +730,7 @@ final class InputMonitor {
new InputWindowHandle(null /* inputApplicationHandle */, displayId));
inputWindowHandle.setName(name);
inputWindowHandle.setLayoutParamsType(TYPE_SECURE_SYSTEM_OVERLAY);
- inputWindowHandle.setTrustedOverlay(true);
+ inputWindowHandle.setTrustedOverlay(t, sc, true);
populateOverlayInputInfo(inputWindowHandle);
setInputWindowInfoIfNeeded(t, sc, inputWindowHandle);
}
diff --git a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
index 64b7a6064e45..90d81bd82087 100644
--- a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
+++ b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
@@ -195,6 +195,11 @@ class InputWindowHandleWrapper {
mChanged = true;
}
+ void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc,
+ boolean trustedOverlay) {
+ mHandle.setTrustedOverlay(t, sc, trustedOverlay);
+ }
+
void setOwnerPid(int pid) {
if (mHandle.ownerPid == pid) {
return;
diff --git a/services/core/java/com/android/server/wm/OWNERS b/services/core/java/com/android/server/wm/OWNERS
index 26abe51c8c34..458786ffdbc0 100644
--- a/services/core/java/com/android/server/wm/OWNERS
+++ b/services/core/java/com/android/server/wm/OWNERS
@@ -18,4 +18,4 @@ rgl@google.com
yunfanc@google.com
per-file BackgroundActivityStartController.java = set noparent
-per-file BackgroundActivityStartController.java = brufino@google.com, ogunwale@google.com, louischang@google.com, lus@google.com
+per-file BackgroundActivityStartController.java = brufino@google.com, ogunwale@google.com, louischang@google.com, lus@google.com \ No newline at end of file
diff --git a/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java b/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
index 073bbbb8edf8..aa04aec1ba89 100644
--- a/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
+++ b/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
@@ -30,7 +30,7 @@ import android.view.RemoteAnimationAdapter;
*/
class PendingRemoteAnimationRegistry {
- private static final long TIMEOUT_MS = 3000;
+ static final long TIMEOUT_MS = 3000;
private final ArrayMap<String, Entry> mEntries = new ArrayMap<>();
private final Handler mHandler;
diff --git a/services/core/java/com/android/server/wm/SafeActivityOptions.java b/services/core/java/com/android/server/wm/SafeActivityOptions.java
index fe3094e2edf0..6418148ba104 100644
--- a/services/core/java/com/android/server/wm/SafeActivityOptions.java
+++ b/services/core/java/com/android/server/wm/SafeActivityOptions.java
@@ -148,7 +148,8 @@ public class SafeActivityOptions {
.setPendingIntentBackgroundActivityStartMode(
options.getPendingIntentBackgroundActivityStartMode())
.setPendingIntentCreatorBackgroundActivityStartMode(
- options.getPendingIntentCreatorBackgroundActivityStartMode());
+ options.getPendingIntentCreatorBackgroundActivityStartMode())
+ .setRemoteTransition(options.getRemoteTransition());
}
/**
diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java
index 6dc896a92e52..57f44cb599fe 100644
--- a/services/core/java/com/android/server/wm/TaskFragment.java
+++ b/services/core/java/com/android/server/wm/TaskFragment.java
@@ -1466,13 +1466,13 @@ class TaskFragment extends WindowContainer<WindowContainer> {
if (DEBUG_RESULTS) {
Slog.v(TAG_RESULTS, "Delivering results to " + next + ": " + a);
}
- transaction.addCallback(ActivityResultItem.obtain(a));
+ transaction.addCallback(ActivityResultItem.obtain(next.token, a));
}
}
if (next.newIntents != null) {
transaction.addCallback(
- NewIntentItem.obtain(next.newIntents, true /* resume */));
+ NewIntentItem.obtain(next.token, next.newIntents, true /* resume */));
}
// Well the app will no longer be stopped.
@@ -1486,7 +1486,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
next.app.setPendingUiCleanAndForceProcessStateUpTo(mAtmService.mTopProcessState);
next.abortAndClearOptionsAnimation();
transaction.setLifecycleStateRequest(
- ResumeActivityItem.obtain(next.app.getReportedProcState(),
+ ResumeActivityItem.obtain(next.token, next.app.getReportedProcState(),
dc.isNextTransitionForward(), next.shouldSendCompatFakeFocus()));
mAtmService.getLifecycleManager().scheduleTransaction(transaction);
@@ -1726,7 +1726,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
prev.shortComponentName, "userLeaving=" + userLeaving, reason);
mAtmService.getLifecycleManager().scheduleTransaction(prev.app.getThread(),
- prev.token, PauseActivityItem.obtain(prev.finishing, userLeaving,
+ prev.token, PauseActivityItem.obtain(prev.token, prev.finishing, userLeaving,
prev.configChangeFlags, pauseImmediately, autoEnteringPip));
} catch (Exception e) {
// Ignore exception, if process died other code will cleanup.
diff --git a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
index a27cc3ad9973..ea722b61be6f 100644
--- a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
+++ b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
@@ -184,14 +184,31 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
}
void dispose() {
+ boolean wasVisible = false;
for (int i = mOrganizedTaskFragments.size() - 1; i >= 0; i--) {
+ final TaskFragment taskFragment = mOrganizedTaskFragments.get(i);
+ if (taskFragment.isVisibleRequested()) {
+ wasVisible = true;
+ }
// Cleanup the TaskFragmentOrganizer from all TaskFragments it organized before
// removing the windows to prevent it from adding any additional TaskFragment
// pending event.
- final TaskFragment taskFragment = mOrganizedTaskFragments.get(i);
taskFragment.onTaskFragmentOrganizerRemoved();
}
+ final TransitionController transitionController = mAtmService.getTransitionController();
+ if (wasVisible && transitionController.isShellTransitionsEnabled()
+ && !transitionController.isCollecting()) {
+ final Task task = mOrganizedTaskFragments.get(0).getTask();
+ final boolean containsNonEmbeddedActivity =
+ task != null && task.getActivity(a -> !a.isEmbedded()) != null;
+ transitionController.requestStartTransition(
+ transitionController.createTransition(WindowManager.TRANSIT_CLOSE),
+ // The task will be removed if all its activities are embedded, then the
+ // task is the trigger.
+ containsNonEmbeddedActivity ? null : task,
+ null /* remoteTransition */, null /* displayChange */);
+ }
// Defer to avoid unnecessary layout when there are multiple TaskFragments removal.
mAtmService.deferWindowLayout();
try {
diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java
index e4b9571d0028..0d7870131133 100644
--- a/services/core/java/com/android/server/wm/TransitionController.java
+++ b/services/core/java/com/android/server/wm/TransitionController.java
@@ -1147,7 +1147,7 @@ class TransitionController {
Transition.asyncTraceBegin("animating", 0x41bfaf1 /* hashcode of TAG */);
} else if (!animatingState && mAnimatingState) {
t.setEarlyWakeupEnd();
- mAtm.mWindowManager.requestTraversal();
+ mAtm.mWindowManager.scheduleAnimationLocked();
mSnapshotController.setPause(false);
mAnimatingState = false;
Transition.asyncTraceEnd(0x41bfaf1 /* hashcode of TAG */);
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 439b7193dd4b..77e1f5bdb171 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -8868,11 +8868,6 @@ public class WindowManagerService extends IWindowManager.Stub
h.inputConfig |= InputConfig.NOT_FOCUSABLE;
}
- // Check private trusted overlay flag to set trustedOverlay field of input window handle.
- if ((privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0) {
- h.inputConfig |= InputConfig.TRUSTED_OVERLAY;
- }
-
h.dispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
h.ownerUid = callingUid;
h.ownerPid = callingPid;
@@ -8892,6 +8887,8 @@ public class WindowManagerService extends IWindowManager.Stub
}
final SurfaceControl.Transaction t = mTransactionFactory.get();
+ // Check private trusted overlay flag to set trustedOverlay field of input window handle.
+ h.setTrustedOverlay(t, surface, (privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0);
t.setInputWindowInfo(surface, h);
t.apply();
t.close();
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index b12cc0b30f53..822082ba4c70 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -28,6 +28,7 @@ import static android.graphics.GraphicsProtos.dumpPointProto;
import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
import static android.os.PowerManager.DRAW_WAKE_LOCK;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
+import static android.view.InputWindowHandle.USE_SURFACE_TRUSTED_OVERLAY;
import static android.view.SurfaceControl.Transaction;
import static android.view.SurfaceControl.getGlobalTransaction;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT;
@@ -98,7 +99,6 @@ import static android.view.WindowManager.LayoutParams.isSystemAlertWindowType;
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.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;
@@ -1112,7 +1112,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mInputWindowHandle.setName(getName());
mInputWindowHandle.setPackageName(mAttrs.packageName);
mInputWindowHandle.setLayoutParamsType(mAttrs.type);
- mInputWindowHandle.setTrustedOverlay(shouldWindowHandleBeTrusted(s));
+ if (!USE_SURFACE_TRUSTED_OVERLAY) {
+ mInputWindowHandle.setTrustedOverlay(isWindowTrustedOverlay());
+ }
if (DEBUG) {
Slog.v(TAG, "Window " + this + " client=" + c.asBinder()
+ " token=" + token + " (" + mAttrs.token + ")" + " params=" + a);
@@ -1193,12 +1195,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
: service.mAtmService.getProcessController(s.mPid, s.mUid);
}
- boolean shouldWindowHandleBeTrusted(Session s) {
+ private boolean isWindowTrustedOverlay() {
return InputMonitor.isTrustedOverlay(mAttrs.type)
|| ((mAttrs.privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0
- && s.mCanAddInternalSystemWindow)
+ && mSession.mCanAddInternalSystemWindow)
|| ((mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY) != 0
- && s.mCanCreateSystemApplicationOverlay);
+ && mSession.mCanCreateSystemApplicationOverlay);
}
int getTouchOcclusionMode() {
@@ -5192,6 +5194,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
updateFrameRateSelectionPriorityIfNeeded();
updateScaleIfNeeded();
mWinAnimator.prepareSurfaceLocked(getSyncTransaction());
+ if (USE_SURFACE_TRUSTED_OVERLAY) {
+ getSyncTransaction().setTrustedOverlay(mSurfaceControl, isWindowTrustedOverlay());
+ }
}
super.prepareSurfaces();
}
@@ -5944,7 +5949,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
boolean isTrustedOverlay() {
- return mInputWindowHandle.isTrustedOverlay();
+ if (USE_SURFACE_TRUSTED_OVERLAY) {
+ WindowState parentWindow = getParentWindow();
+ return isWindowTrustedOverlay() || (parentWindow != null
+ && parentWindow.isWindowTrustedOverlay());
+ } else {
+ return mInputWindowHandle.isTrustedOverlay();
+ }
}
public boolean receiveFocusFromTapOutside() {
diff --git a/services/credentials/java/com/android/server/credentials/CredentialManagerService.java b/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
index d8c684fb8c1e..49792746fbc3 100644
--- a/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
+++ b/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
@@ -96,6 +96,9 @@ public final class CredentialManagerService
private static final String DEVICE_CONFIG_ENABLE_CREDENTIAL_MANAGER =
"enable_credential_manager";
+ private static final String DEVICE_CONFIG_ENABLE_CREDENTIAL_DESC_API =
+ "enable_credential_description_api";
+
private final Context mContext;
/** Cache of system service list per user id. */
@@ -321,7 +324,14 @@ public final class CredentialManagerService
}
public static boolean isCredentialDescriptionApiEnabled() {
- return true;
+ final long origId = Binder.clearCallingIdentity();
+ try {
+ return DeviceConfig.getBoolean(
+ DeviceConfig.NAMESPACE_CREDENTIAL, DEVICE_CONFIG_ENABLE_CREDENTIAL_DESC_API,
+ false);
+ } finally {
+ Binder.restoreCallingIdentity(origId);
+ }
}
@SuppressWarnings("GuardedBy") // ErrorProne requires initiateProviderSessionForRequestLocked
@@ -954,7 +964,7 @@ public final class CredentialManagerService
Slog.i(TAG, "registerCredentialDescription with callingPackage: " + callingPackage);
if (!isCredentialDescriptionApiEnabled()) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("Feature not supported");
}
enforceCallingPackage(callingPackage, Binder.getCallingUid());
@@ -974,7 +984,7 @@ public final class CredentialManagerService
if (!isCredentialDescriptionApiEnabled()) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("Feature not supported");
}
enforceCallingPackage(callingPackage, Binder.getCallingUid());
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
index 9c1d765fe0f9..21b12914bc4c 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
@@ -624,6 +624,27 @@ final class DevicePolicyEngine {
}
/**
+ * Retrieves the global policy set by the admin for the provided {@code policyDefinition}
+ * if one was set, otherwise returns {@code null}.
+ */
+ @Nullable
+ <V> V getGlobalPolicySetByAdmin(
+ @NonNull PolicyDefinition<V> policyDefinition,
+ @NonNull EnforcingAdmin enforcingAdmin) {
+ Objects.requireNonNull(policyDefinition);
+ Objects.requireNonNull(enforcingAdmin);
+
+ synchronized (mLock) {
+ if (!hasGlobalPolicyLocked(policyDefinition)) {
+ return null;
+ }
+ PolicyValue<V> value = getGlobalPolicyStateLocked(policyDefinition)
+ .getPoliciesSetByAdmins().get(enforcingAdmin);
+ return value == null ? null : value.getValue();
+ }
+ }
+
+ /**
* Retrieves the values set for the provided {@code policyDefinition} by each admin.
*/
@NonNull
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index ce133df7519f..50dc061c1ab2 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -9125,9 +9125,15 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
UserManager.DISALLOW_CAMERA);
if (who != null) {
EnforcingAdmin admin = getEnforcingAdminForCaller(who, callerPackageName);
- return Boolean.TRUE.equals(
- mDevicePolicyEngine.getLocalPolicySetByAdmin(
- policy, admin, affectedUserId));
+ Boolean value = null;
+ if (isDeviceOwner(caller)) {
+ value = mDevicePolicyEngine.getGlobalPolicySetByAdmin(policy, admin);
+ } else {
+ value = mDevicePolicyEngine.getLocalPolicySetByAdmin(
+ policy, admin, affectedUserId);
+ }
+ return Boolean.TRUE.equals(value);
+
} else {
return Boolean.TRUE.equals(
mDevicePolicyEngine.getResolvedPolicy(policy, affectedUserId));
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig b/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig
index aff1876246a8..00702a9c26fa 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig
@@ -2,7 +2,7 @@ package: "com.android.server.devicepolicy.flags"
flag {
name: "policy_engine_migration_v2_enabled"
- namespace: "device_policy"
+ namespace: "enterprise"
description: "V2 of the policy engine migrations for Android V"
bug: "289520697"
} \ No newline at end of file
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
index e87a34ea17d7..798e1aedc5a1 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
@@ -158,7 +158,7 @@ public class InputMethodBindingControllerTest extends InputMethodManagerServiceT
assertThat(result.result).isEqualTo(InputBindResult.ResultCode.SUCCESS_WAITING_IME_BINDING);
assertThat(result.id).isEqualTo(info.getId());
synchronized (ImfLock.class) {
- assertThat(mBindingController.hasConnection()).isTrue();
+ assertThat(mBindingController.hasMainConnection()).isTrue();
assertThat(mBindingController.getCurId()).isEqualTo(info.getId());
assertThat(mBindingController.getCurToken()).isNotNull();
}
@@ -202,7 +202,7 @@ public class InputMethodBindingControllerTest extends InputMethodManagerServiceT
synchronized (ImfLock.class) {
// Unbind both main connection and visible connection
- assertThat(mBindingController.hasConnection()).isFalse();
+ assertThat(mBindingController.hasMainConnection()).isFalse();
assertThat(mBindingController.isVisibleBound()).isFalse();
verify(mContext, times(2)).unbindService(any(ServiceConnection.class));
assertThat(mBindingController.getCurToken()).isNull();
diff --git a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
index 3ef3a89da94d..3ab25479686d 100644
--- a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
+++ b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
@@ -16,12 +16,14 @@
package com.android.server.permission.test
+import android.Manifest
import android.content.pm.PackageManager
import android.content.pm.PermissionGroupInfo
import android.content.pm.PermissionInfo
+import android.content.pm.SigningDetails
+import android.os.Build
import android.os.Bundle
import android.util.ArrayMap
-import android.util.ArraySet
import android.util.SparseArray
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.modules.utils.testing.ExtendedMockitoRule
@@ -33,12 +35,15 @@ import com.android.server.permission.access.immutable.* // ktlint-disable no-wil
import com.android.server.permission.access.permission.AppIdPermissionPolicy
import com.android.server.permission.access.permission.Permission
import com.android.server.permission.access.permission.PermissionFlags
+import com.android.server.permission.access.util.hasBits
import com.android.server.pm.parsing.PackageInfoUtils
+import com.android.server.pm.permission.PermissionAllowlist
import com.android.server.pm.pkg.AndroidPackage
import com.android.server.pm.pkg.PackageState
import com.android.server.pm.pkg.PackageUserState
import com.android.server.pm.pkg.component.ParsedPermission
import com.android.server.pm.pkg.component.ParsedPermissionGroup
+import com.android.server.testutils.any
import com.android.server.testutils.mock
import com.android.server.testutils.whenever
import com.google.common.truth.Truth.assertWithMessage
@@ -46,6 +51,7 @@ import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.anyLong
/**
* Mocking unit test for AppIdPermissionPolicy.
@@ -55,11 +61,16 @@ class AppIdPermissionPolicyTest {
private lateinit var oldState: MutableAccessState
private lateinit var newState: MutableAccessState
- private lateinit var androidPackage0: AndroidPackage
- private lateinit var androidPackage1: AndroidPackage
-
- private lateinit var packageState0: PackageState
- private lateinit var packageState1: PackageState
+ private val defaultPermissionGroup = mockParsedPermissionGroup(
+ PERMISSION_GROUP_NAME_0,
+ PACKAGE_NAME_0
+ )
+ private val defaultPermissionTree = mockParsedPermission(
+ PERMISSION_TREE_NAME,
+ PACKAGE_NAME_0,
+ isTree = true
+ )
+ private val defaultPermission = mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_0)
private val appIdPermissionPolicy = AppIdPermissionPolicy()
@@ -70,160 +81,124 @@ class AppIdPermissionPolicyTest {
.build()
@Before
- fun init() {
+ fun setUp() {
oldState = MutableAccessState()
createUserState(USER_ID_0)
- createUserState(USER_ID_1)
oldState.mutateExternalState().setPackageStates(ArrayMap())
-
- androidPackage0 = mockAndroidPackage(
- PACKAGE_NAME_0,
- PERMISSION_GROUP_NAME_0,
- PERMISSION_NAME_0
- )
- androidPackage1 = mockAndroidPackage(
- PACKAGE_NAME_1,
- PERMISSION_GROUP_NAME_1,
- PERMISSION_NAME_1
- )
-
- packageState0 = mockPackageState(APP_ID_0, androidPackage0)
- packageState1 = mockPackageState(APP_ID_1, androidPackage1)
+ oldState.mutateExternalState().setDisabledSystemPackageStates(ArrayMap())
+ mockPackageInfoUtilsGeneratePermissionInfo()
+ mockPackageInfoUtilsGeneratePermissionGroupInfo()
}
- private fun mockAndroidPackage(
- packageName: String,
- permissionGroupName: String,
- permissionName: String,
- ): AndroidPackage {
- val parsedPermissionGroup = mock<ParsedPermissionGroup> {
- whenever(name).thenReturn(permissionGroupName)
- whenever(metaData).thenReturn(Bundle())
- }
+ private fun createUserState(userId: Int) {
+ oldState.mutateExternalState().mutateUserIds().add(userId)
+ oldState.mutateUserStatesNoWrite().put(userId, MutableUserState())
+ }
- @Suppress("DEPRECATION")
- val permissionGroupInfo = PermissionGroupInfo().apply {
- name = permissionGroupName
- this.packageName = packageName
- }
+ private fun mockPackageInfoUtilsGeneratePermissionInfo() {
wheneverStatic {
- PackageInfoUtils.generatePermissionGroupInfo(
- parsedPermissionGroup,
- PackageManager.GET_META_DATA.toLong()
- )
- }.thenReturn(permissionGroupInfo)
-
- val parsedPermission = mock<ParsedPermission> {
- whenever(name).thenReturn(permissionName)
- whenever(isTree).thenReturn(false)
- whenever(metaData).thenReturn(Bundle())
+ PackageInfoUtils.generatePermissionInfo(any(ParsedPermission::class.java), anyLong())
+ }.thenAnswer { invocation ->
+ val parsedPermission = invocation.getArgument<ParsedPermission>(0)
+ val generateFlags = invocation.getArgument<Long>(1)
+ PermissionInfo(parsedPermission.backgroundPermission).apply {
+ name = parsedPermission.name
+ packageName = parsedPermission.packageName
+ metaData = if (generateFlags.toInt().hasBits(PackageManager.GET_META_DATA)) {
+ parsedPermission.metaData
+ } else {
+ null
+ }
+ @Suppress("DEPRECATION")
+ protectionLevel = parsedPermission.protectionLevel
+ group = parsedPermission.group
+ flags = parsedPermission.flags
+ }
}
+ }
- @Suppress("DEPRECATION")
- val permissionInfo = PermissionInfo().apply {
- name = permissionName
- this.packageName = packageName
- }
+ private fun mockPackageInfoUtilsGeneratePermissionGroupInfo() {
wheneverStatic {
- PackageInfoUtils.generatePermissionInfo(
- parsedPermission,
- PackageManager.GET_META_DATA.toLong()
+ PackageInfoUtils.generatePermissionGroupInfo(
+ any(ParsedPermissionGroup::class.java),
+ anyLong()
)
- }.thenReturn(permissionInfo)
-
- val requestedPermissions = ArraySet<String>()
- return mock {
- whenever(this.packageName).thenReturn(packageName)
- whenever(this.requestedPermissions).thenReturn(requestedPermissions)
- whenever(permissionGroups).thenReturn(listOf(parsedPermissionGroup))
- whenever(permissions).thenReturn(listOf(parsedPermission))
- whenever(signingDetails).thenReturn(mock {})
- }
- }
-
- private fun mockPackageState(
- appId: Int,
- androidPackage: AndroidPackage,
- ): PackageState {
- val packageName = androidPackage.packageName
- oldState.mutateExternalState().mutateAppIdPackageNames().mutateOrPut(appId) {
- MutableIndexedListSet()
- }.add(packageName)
-
- val userStates = SparseArray<PackageUserState>().apply {
- put(USER_ID_0, mock { whenever(isInstantApp).thenReturn(false) })
- }
- val mockPackageState: PackageState = mock {
- whenever(this.packageName).thenReturn(packageName)
- whenever(this.appId).thenReturn(appId)
- whenever(this.androidPackage).thenReturn(androidPackage)
- whenever(isSystem).thenReturn(false)
- whenever(this.userStates).thenReturn(userStates)
- }
- oldState.mutateExternalState().setPackageStates(
- oldState.mutateExternalState().packageStates.toMutableMap().apply {
- put(packageName, mockPackageState)
+ }.thenAnswer { invocation ->
+ val parsedPermissionGroup = invocation.getArgument<ParsedPermissionGroup>(0)
+ val generateFlags = invocation.getArgument<Long>(1)
+ @Suppress("DEPRECATION")
+ PermissionGroupInfo().apply {
+ name = parsedPermissionGroup.name
+ packageName = parsedPermissionGroup.packageName
+ metaData = if (generateFlags.toInt().hasBits(PackageManager.GET_META_DATA)) {
+ parsedPermissionGroup.metaData
+ } else {
+ null
+ }
+ flags = parsedPermissionGroup.flags
}
- )
- return mockPackageState
- }
-
- private fun createUserState(userId: Int) {
- oldState.mutateUserStatesNoWrite().put(userId, MutableUserState())
+ }
}
@Test
fun testResetRuntimePermissions_runtimeGranted_getsRevoked() {
val oldFlags = PermissionFlags.RUNTIME_GRANTED
val expectedNewFlags = 0
- testResetRuntimePermissions(oldFlags, expectedNewFlags) {}
+ testResetRuntimePermissions(oldFlags, expectedNewFlags)
}
@Test
fun testResetRuntimePermissions_roleGranted_getsGranted() {
val oldFlags = PermissionFlags.ROLE
val expectedNewFlags = PermissionFlags.ROLE or PermissionFlags.RUNTIME_GRANTED
- testResetRuntimePermissions(oldFlags, expectedNewFlags) {}
+ testResetRuntimePermissions(oldFlags, expectedNewFlags)
}
@Test
fun testResetRuntimePermissions_nullAndroidPackage_remainsUnchanged() {
val oldFlags = PermissionFlags.RUNTIME_GRANTED
val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
- testResetRuntimePermissions(oldFlags, expectedNewFlags) {
- whenever(packageState0.androidPackage).thenReturn(null)
- }
+ testResetRuntimePermissions(oldFlags, expectedNewFlags, isAndroidPackageMissing = true)
}
- private inline fun testResetRuntimePermissions(
+ private fun testResetRuntimePermissions(
oldFlags: Int,
expectedNewFlags: Int,
- additionalSetup: () -> Unit
+ isAndroidPackageMissing: Boolean = false
) {
- createSystemStatePermission(
- APP_ID_0,
- PACKAGE_NAME_0,
+ val parsedPermission = mockParsedPermission(
PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_DANGEROUS
+ PACKAGE_NAME_0,
+ protectionLevel = PermissionInfo.PROTECTION_DANGEROUS,
)
- androidPackage0.requestedPermissions.add(PERMISSION_NAME_0)
- oldState.mutateUserState(USER_ID_0)!!.mutateAppIdPermissionFlags().mutateOrPut(APP_ID_0) {
- MutableIndexedMap()
- }.put(PERMISSION_NAME_0, oldFlags)
-
- additionalSetup()
+ val permissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(parsedPermission))
+ )
+ val requestingPackageState = if (isAndroidPackageMissing) {
+ mockPackageState(APP_ID_1, PACKAGE_NAME_1)
+ } else {
+ mockPackageState(
+ APP_ID_1,
+ mockAndroidPackage(PACKAGE_NAME_1, requestedPermissions = setOf(PERMISSION_NAME_0))
+ )
+ }
+ setPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0, oldFlags)
+ addPackageState(permissionOwnerPackageState)
+ addPackageState(requestingPackageState)
+ addPermission(parsedPermission)
mutateState {
with(appIdPermissionPolicy) {
- resetRuntimePermissions(PACKAGE_NAME_0, USER_ID_0)
+ resetRuntimePermissions(PACKAGE_NAME_1, USER_ID_0)
}
}
- val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
assertWithMessage(
"After resetting runtime permissions, permission flags did not match" +
- " expected values: expectedNewFlags is $expectedNewFlags," +
- " actualFlags is $actualFlags, while the oldFlags is $oldFlags"
+ " expected values: expectedNewFlags is $expectedNewFlags," +
+ " actualFlags is $actualFlags, while the oldFlags is $oldFlags"
)
.that(actualFlags)
.isEqualTo(expectedNewFlags)
@@ -231,285 +206,1499 @@ class AppIdPermissionPolicyTest {
@Test
fun testOnPackageAdded_permissionsOfMissingSystemApp_getsAdopted() {
- testOnPackageAdded {
- adoptPermissionTestSetup()
- whenever(packageState1.androidPackage).thenReturn(null)
- }
+ testAdoptPermissions(hasMissingPackage = true, isSystem = true)
- val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
assertWithMessage(
"After onPackageAdded() is called for a null adopt permission package," +
- " the permission package name: ${permission0!!.packageName} did not match" +
- " the expected package name: $PACKAGE_NAME_0"
+ " the permission package name: ${getPermission(PERMISSION_NAME_0)?.packageName}" +
+ " did not match the expected package name: $PACKAGE_NAME_0"
)
- .that(permission0.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_0)
}
@Test
fun testOnPackageAdded_permissionsOfExistingSystemApp_notAdopted() {
- testOnPackageAdded {
- adoptPermissionTestSetup()
- }
+ testAdoptPermissions(isSystem = true)
- val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
assertWithMessage(
"After onPackageAdded() is called for a non-null adopt permission" +
- " package, the permission package name: ${permission0!!.packageName} should" +
- " not match the package name: $PACKAGE_NAME_0"
+ " package, the permission package name:" +
+ " ${getPermission(PERMISSION_NAME_0)?.packageName} should not match the" +
+ " package name: $PACKAGE_NAME_0"
)
- .that(permission0.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isNotEqualTo(PACKAGE_NAME_0)
}
@Test
fun testOnPackageAdded_permissionsOfNonSystemApp_notAdopted() {
- testOnPackageAdded {
- adoptPermissionTestSetup()
- whenever(packageState1.isSystem).thenReturn(false)
- }
+ testAdoptPermissions(hasMissingPackage = true)
- val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
assertWithMessage(
"After onPackageAdded() is called for a non-system adopt permission" +
- " package, the permission package name: ${permission0!!.packageName} should" +
- " not match the package name: $PACKAGE_NAME_0"
+ " package, the permission package name:" +
+ " ${getPermission(PERMISSION_NAME_0)?.packageName} should not match the" +
+ " package name: $PACKAGE_NAME_0"
)
- .that(permission0.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isNotEqualTo(PACKAGE_NAME_0)
}
- private fun adoptPermissionTestSetup() {
- createSystemStatePermission(
- APP_ID_1,
- PACKAGE_NAME_1,
- PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_SIGNATURE
- )
- whenever(androidPackage0.adoptPermissions).thenReturn(listOf(PACKAGE_NAME_1))
- whenever(packageState1.isSystem).thenReturn(true)
+ private fun testAdoptPermissions(
+ hasMissingPackage: Boolean = false,
+ isSystem: Boolean = false
+ ) {
+ val parsedPermission = mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_1)
+ val packageToAdoptPermission = if (hasMissingPackage) {
+ mockPackageState(APP_ID_1, PACKAGE_NAME_1, isSystem = isSystem)
+ } else {
+ mockPackageState(
+ APP_ID_1,
+ mockAndroidPackage(
+ PACKAGE_NAME_1,
+ permissions = listOf(parsedPermission)
+ ),
+ isSystem = isSystem
+ )
+ }
+ addPackageState(packageToAdoptPermission)
+ addPermission(parsedPermission)
+
+ mutateState {
+ val installedPackage = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ permissions = listOf(defaultPermission),
+ adoptPermissions = listOf(PACKAGE_NAME_1)
+ )
+ )
+ addPackageState(installedPackage, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(installedPackage)
+ }
+ }
}
@Test
fun testOnPackageAdded_newPermissionGroup_getsDeclared() {
- testOnPackageAdded {}
+ mutateState {
+ val packageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addPackageState(packageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(packageState)
+ }
+ }
assertWithMessage(
"After onPackageAdded() is called when there is no existing" +
- " permission groups, the new permission group $PERMISSION_GROUP_NAME_0 is not added"
+ " permission groups, the new permission group $PERMISSION_GROUP_NAME_0 is not added"
)
- .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.name)
+ .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.name)
.isEqualTo(PERMISSION_GROUP_NAME_0)
}
@Test
fun testOnPackageAdded_systemAppTakingOverPermissionGroupDefinition_getsTakenOver() {
- testOnPackageAdded {
- whenever(packageState0.isSystem).thenReturn(true)
- createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions(newPermissionOwnerIsSystem = true)
assertWithMessage(
"After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
- " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the ownership" +
- " of this permission group"
+ " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the" +
+ " ownership of this permission group"
)
- .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+ .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_0)
}
@Test
fun testOnPackageAdded_instantApps_remainsUnchanged() {
- testOnPackageAdded {
- (packageState0.userStates as SparseArray<PackageUserState>).apply {
- put(0, mock { whenever(isInstantApp).thenReturn(true) })
- }
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions(
+ newPermissionOwnerIsInstant = true,
+ permissionGroupAlreadyExists = false
+ )
assertWithMessage(
"After onPackageAdded() is called for an instant app," +
- " the new permission group $PERMISSION_GROUP_NAME_0 should not be added"
+ " the new permission group $PERMISSION_GROUP_NAME_0 should not be added"
)
- .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0])
+ .that(getPermissionGroup(PERMISSION_GROUP_NAME_0))
.isNull()
}
@Test
fun testOnPackageAdded_nonSystemAppTakingOverPermissionGroupDefinition_remainsUnchanged() {
- testOnPackageAdded {
- createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions()
assertWithMessage(
"After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
- " exists in the system, non-system app $PACKAGE_NAME_0 shouldn't takeover ownership" +
- " of this permission group"
+ " exists in the system, non-system app $PACKAGE_NAME_0 shouldn't takeover" +
+ " ownership of this permission group"
)
- .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+ .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_1)
}
@Test
fun testOnPackageAdded_takingOverPermissionGroupDeclaredBySystemApp_remainsUnchanged() {
- testOnPackageAdded {
- whenever(packageState1.isSystem).thenReturn(true)
- createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions(oldPermissionOwnerIsSystem = true)
assertWithMessage(
"After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
- " exists in the system and is owned by a system app, app $PACKAGE_NAME_0 shouldn't" +
- " takeover ownership of this permission group"
+ " exists in the system and is owned by a system app, app $PACKAGE_NAME_0" +
+ " shouldn't takeover ownership of this permission group"
)
- .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+ .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_1)
}
@Test
fun testOnPackageAdded_newPermission_getsDeclared() {
- testOnPackageAdded {}
+ mutateState {
+ val packageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addPackageState(packageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(packageState)
+ }
+ }
assertWithMessage(
"After onPackageAdded() is called when there is no existing" +
- " permissions, the new permission $PERMISSION_NAME_0 is not added"
+ " permissions, the new permission $PERMISSION_NAME_0 is not added"
)
- .that(newState.systemState.permissions[PERMISSION_NAME_0]?.name)
+ .that(getPermission(PERMISSION_NAME_0)?.name)
.isEqualTo(PERMISSION_NAME_0)
}
@Test
fun testOnPackageAdded_configPermission_getsTakenOver() {
- testOnPackageAdded {
- whenever(packageState0.isSystem).thenReturn(true)
- createSystemStatePermission(
- APP_ID_0,
- PACKAGE_NAME_1,
- PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_DANGEROUS,
- Permission.TYPE_CONFIG,
- false
- )
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions(
+ oldPermissionOwnerIsSystem = true,
+ newPermissionOwnerIsSystem = true,
+ type = Permission.TYPE_CONFIG,
+ isReconciled = false
+ )
assertWithMessage(
"After onPackageAdded() is called for a config permission with" +
- " no owner, the ownership is not taken over by a system app $PACKAGE_NAME_0"
+ " no owner, the ownership is not taken over by a system app $PACKAGE_NAME_0"
)
- .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_0)
}
@Test
fun testOnPackageAdded_systemAppTakingOverPermissionDefinition_getsTakenOver() {
- testOnPackageAdded {
- whenever(packageState0.isSystem).thenReturn(true)
- createSystemStatePermission(
- APP_ID_1,
- PACKAGE_NAME_1,
- PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_DANGEROUS
- )
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions(newPermissionOwnerIsSystem = true)
assertWithMessage(
"After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
- " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the ownership" +
- " of this permission"
+ " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover ownership" +
+ " of this permission"
)
- .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_0)
}
@Test
fun testOnPackageAdded_nonSystemAppTakingOverPermissionDefinition_remainsUnchanged() {
- testOnPackageAdded {
- createSystemStatePermission(
- APP_ID_1,
- PACKAGE_NAME_1,
- PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_DANGEROUS
- )
- }
+ testTakingOverPermissionAndPermissionGroupDefinitions()
assertWithMessage(
"After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
- " exists in the system, the non-system app $PACKAGE_NAME_0 shouldn't takeover" +
- " ownership of this permission"
+ " exists in the system, the non-system app $PACKAGE_NAME_0 shouldn't takeover" +
+ " ownership of this permission"
)
- .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
.isEqualTo(PACKAGE_NAME_1)
}
@Test
fun testOnPackageAdded_takingOverPermissionDeclaredBySystemApp_remainsUnchanged() {
- testOnPackageAdded {
- whenever(packageState1.isSystem).thenReturn(true)
- createSystemStatePermission(
- APP_ID_1,
- PACKAGE_NAME_1,
+ testTakingOverPermissionAndPermissionGroupDefinitions(oldPermissionOwnerIsSystem = true)
+
+ assertWithMessage(
+ "After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
+ " exists in system and is owned by a system app, the $PACKAGE_NAME_0 shouldn't" +
+ " takeover ownership of this permission"
+ )
+ .that(getPermission(PERMISSION_NAME_0)?.packageName)
+ .isEqualTo(PACKAGE_NAME_1)
+ }
+
+ private fun testTakingOverPermissionAndPermissionGroupDefinitions(
+ oldPermissionOwnerIsSystem: Boolean = false,
+ newPermissionOwnerIsSystem: Boolean = false,
+ newPermissionOwnerIsInstant: Boolean = false,
+ permissionGroupAlreadyExists: Boolean = true,
+ permissionAlreadyExists: Boolean = true,
+ type: Int = Permission.TYPE_MANIFEST,
+ isReconciled: Boolean = true,
+ ) {
+ val oldPermissionOwnerPackageState = mockPackageState(
+ APP_ID_1,
+ PACKAGE_NAME_1,
+ isSystem = oldPermissionOwnerIsSystem
+ )
+ addPackageState(oldPermissionOwnerPackageState)
+ if (permissionGroupAlreadyExists) {
+ addPermissionGroup(mockParsedPermissionGroup(PERMISSION_GROUP_NAME_0, PACKAGE_NAME_1))
+ }
+ if (permissionAlreadyExists) {
+ addPermission(
+ mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_1),
+ type = type,
+ isReconciled = isReconciled
+ )
+ }
+
+ mutateState {
+ val newPermissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockSimpleAndroidPackage(),
+ isSystem = newPermissionOwnerIsSystem,
+ isInstantApp = newPermissionOwnerIsInstant
+ )
+ addPackageState(newPermissionOwnerPackageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(newPermissionOwnerPackageState)
+ }
+ }
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionGroupChanged_getsRevoked() {
+ testPermissionChanged(
+ oldPermissionGroup = PERMISSION_GROUP_NAME_1,
+ newPermissionGroup = PERMISSION_GROUP_NAME_0
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that has a permission group change" +
+ " for a permission it defines, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_protectionLevelChanged_getsRevoked() {
+ testPermissionChanged(newProtectionLevel = PermissionInfo.PROTECTION_INTERNAL)
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that has a protection level change" +
+ " for a permission it defines, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ private fun testPermissionChanged(
+ oldPermissionGroup: String? = null,
+ newPermissionGroup: String? = null,
+ newProtectionLevel: Int = PermissionInfo.PROTECTION_DANGEROUS
+ ) {
+ val oldPermission = mockParsedPermission(
+ PERMISSION_NAME_0,
+ PACKAGE_NAME_0,
+ group = oldPermissionGroup,
+ protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+ )
+ val oldPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(oldPermission))
+ )
+ addPackageState(oldPackageState)
+ addPermission(oldPermission)
+ setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0, PermissionFlags.RUNTIME_GRANTED)
+
+ mutateState {
+ val newPermission = mockParsedPermission(
PERMISSION_NAME_0,
- PermissionInfo.PROTECTION_DANGEROUS
+ PACKAGE_NAME_0,
+ group = newPermissionGroup,
+ protectionLevel = newProtectionLevel
+ )
+ val newPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(newPermission))
)
+ addPackageState(newPackageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(newPackageState)
+ }
}
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionTreeNoLongerDeclared_getsDefinitionRemoved() {
+ testPermissionDeclaration {}
assertWithMessage(
- "After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
- " exists in system and is owned by a system app, the app $PACKAGE_NAME_0 shouldn't" +
- " takeover ownership of this permission"
+ "After onPackageAdded() is called for a package that no longer defines a permission" +
+ " tree, the permission tree: $PERMISSION_NAME_0 in system state should be removed"
)
- .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
- .isEqualTo(PACKAGE_NAME_1)
+ .that(getPermissionTree(PERMISSION_NAME_0))
+ .isNull()
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionTreeByDisabledSystemPackage_remainsUnchanged() {
+ testPermissionDeclaration {
+ val disabledSystemPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addDisabledSystemPackageState(disabledSystemPackageState)
+ }
+
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that no longer defines" +
+ " a permission tree while this permission tree is still defined by" +
+ " a disabled system package, the permission tree: $PERMISSION_NAME_0 in" +
+ " system state should not be removed"
+ )
+ .that(getPermissionTree(PERMISSION_TREE_NAME))
+ .isNotNull()
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionNoLongerDeclared_getsDefinitionRemoved() {
+ testPermissionDeclaration {}
+
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that no longer defines a permission," +
+ " the permission: $PERMISSION_NAME_0 in system state should be removed"
+ )
+ .that(getPermission(PERMISSION_NAME_0))
+ .isNull()
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionByDisabledSystemPackage_remainsUnchanged() {
+ testPermissionDeclaration {
+ val disabledSystemPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addDisabledSystemPackageState(disabledSystemPackageState)
+ }
+
+ assertWithMessage(
+ "After onPackageAdded() is called for a disabled system package and it's updated apk" +
+ " no longer defines a permission, the permission: $PERMISSION_NAME_0 in" +
+ " system state should not be removed"
+ )
+ .that(getPermission(PERMISSION_NAME_0))
+ .isNotNull()
+ }
+
+ private fun testPermissionDeclaration(additionalSetup: () -> Unit) {
+ val oldPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addPackageState(oldPackageState)
+ addPermission(defaultPermissionTree)
+ addPermission(defaultPermission)
+
+ additionalSetup()
+
+ mutateState {
+ val newPackageState = mockPackageState(APP_ID_0, mockAndroidPackage(PACKAGE_NAME_0))
+ addPackageState(newPackageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(newPackageState)
+ }
+ }
+ }
+
+ @Test
+ fun testOnPackageAdded_permissionsNoLongerRequested_getsFlagsRevoked() {
+ val parsedPermission = mockParsedPermission(
+ PERMISSION_NAME_0,
+ PACKAGE_NAME_0,
+ protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+ )
+ val oldPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ permissions = listOf(parsedPermission),
+ requestedPermissions = setOf(PERMISSION_NAME_0)
+ )
+ )
+ addPackageState(oldPackageState)
+ addPermission(parsedPermission)
+ setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0, PermissionFlags.RUNTIME_GRANTED)
+
+ mutateState {
+ val newPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+ addPackageState(newPackageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(newPackageState)
+ }
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that no longer requests a permission" +
+ " the actual permission flags $actualFlags should match the" +
+ " expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_storageAndMediaPermissionsDowngradingPastQ_getsRuntimeRevoked() {
+ testRevokePermissionsOnPackageUpdate(
+ PermissionFlags.RUNTIME_GRANTED,
+ newTargetSdkVersion = Build.VERSION_CODES.P
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that's downgrading past Q" +
+ " the actual permission flags $actualFlags should match the" +
+ " expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_storageAndMediaPermissionsNotDowngradingPastQ_remainsUnchanged() {
+ val oldFlags = PermissionFlags.RUNTIME_GRANTED
+ testRevokePermissionsOnPackageUpdate(
+ oldFlags,
+ oldTargetSdkVersion = Build.VERSION_CODES.P,
+ newTargetSdkVersion = Build.VERSION_CODES.P
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that's not downgrading past Q" +
+ " the actual permission flags $actualFlags should match the" +
+ " expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
}
- private inline fun testOnPackageAdded(mockBehaviorOverride: () -> Unit) {
- mockBehaviorOverride()
+ @Test
+ fun testOnPackageAdded_policyFixedDowngradingPastQ_remainsUnchanged() {
+ val oldFlags = PermissionFlags.RUNTIME_GRANTED and PermissionFlags.POLICY_FIXED
+ testRevokePermissionsOnPackageUpdate(oldFlags, newTargetSdkVersion = Build.VERSION_CODES.P)
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that's downgrading past Q" +
+ " the actual permission flags with PermissionFlags.POLICY_FIXED $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_newlyRequestingLegacyExternalStorage_getsRuntimeRevoked() {
+ testRevokePermissionsOnPackageUpdate(
+ PermissionFlags.RUNTIME_GRANTED,
+ oldTargetSdkVersion = Build.VERSION_CODES.P,
+ newTargetSdkVersion = Build.VERSION_CODES.P,
+ oldIsRequestLegacyExternalStorage = false
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package with" +
+ " newlyRequestingLegacyExternalStorage, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_missingOldPackage_remainsUnchanged() {
+ val oldFlags = PermissionFlags.RUNTIME_GRANTED
+ testRevokePermissionsOnPackageUpdate(
+ oldFlags,
+ newTargetSdkVersion = Build.VERSION_CODES.P,
+ isOldPackageMissing = true
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that's downgrading past Q" +
+ " and doesn't have the oldPackage, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ private fun testRevokePermissionsOnPackageUpdate(
+ oldFlags: Int,
+ oldTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ newTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ oldIsRequestLegacyExternalStorage: Boolean = true,
+ newIsRequestLegacyExternalStorage: Boolean = true,
+ isOldPackageMissing: Boolean = false
+ ) {
+ val parsedPermission = mockParsedPermission(
+ PERMISSION_READ_EXTERNAL_STORAGE,
+ PACKAGE_NAME_0,
+ protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+ )
+ val oldPackageState = if (isOldPackageMissing) {
+ mockPackageState(APP_ID_0, PACKAGE_NAME_0)
+ } else {
+ mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ targetSdkVersion = oldTargetSdkVersion,
+ isRequestLegacyExternalStorage = oldIsRequestLegacyExternalStorage,
+ requestedPermissions = setOf(PERMISSION_READ_EXTERNAL_STORAGE),
+ permissions = listOf(parsedPermission)
+ )
+ )
+ }
+ addPackageState(oldPackageState)
+ addPermission(parsedPermission)
+ setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE, oldFlags)
mutateState {
+ val newPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ targetSdkVersion = newTargetSdkVersion,
+ isRequestLegacyExternalStorage = newIsRequestLegacyExternalStorage,
+ requestedPermissions = setOf(PERMISSION_READ_EXTERNAL_STORAGE),
+ permissions = listOf(parsedPermission)
+ )
+ )
+ addPackageState(newPackageState, newState)
with(appIdPermissionPolicy) {
- onPackageAdded(packageState0)
+ onPackageAdded(newPackageState)
}
}
}
+ @Test
+ fun testOnPackageAdded_normalPermissionAlreadyGranted_remainsUnchanged() {
+ val oldFlags = PermissionFlags.INSTALL_GRANTED or PermissionFlags.INSTALL_REVOKED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_NORMAL) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal permission" +
+ " with an existing INSTALL_GRANTED flag, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_normalPermissionNotInstallRevoked_getsGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_NORMAL,
+ isNewInstall = true
+ ) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal permission" +
+ " with no existing flags, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_normalPermissionRequestedByInstalledPackage_getsGranted() {
+ val oldFlags = PermissionFlags.INSTALL_REVOKED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_NORMAL) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal permission" +
+ " with the INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags since it's a new install"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ /**
+ * We setup a permission protection level change from SIGNATURE to NORMAL in order to make
+ * the permission a "changed permission" in order to test evaluatePermissionState() called by
+ * evaluatePermissionStateForAllPackages(). This makes the requestingPackageState not the
+ * installedPackageState so that we can test whether requesting by system package will give us
+ * the expected permission flags.
+ *
+ * Besides, this also helps us test evaluatePermissionStateForAllPackages(). Since both
+ * evaluatePermissionStateForAllPackages() and evaluateAllPermissionStatesForPackage() call
+ * evaluatePermissionState() in their implementations, we use these tests as the only tests
+ * that test evaluatePermissionStateForAllPackages()
+ */
+ @Test
+ fun testOnPackageAdded_normalPermissionRequestedBySystemPackage_getsGranted() {
+ testEvaluateNormalPermissionStateWithPermissionChanges(requestingPackageIsSystem = true)
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a system package that requests a normal" +
+ " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_normalCompatibilityPermission_getsGranted() {
+ testEvaluateNormalPermissionStateWithPermissionChanges(
+ permissionName = PERMISSION_POST_NOTIFICATIONS,
+ requestingPackageTargetSdkVersion = Build.VERSION_CODES.S
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_POST_NOTIFICATIONS)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal compatibility" +
+ " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_normalPermissionPreviouslyRevoked_getsInstallRevoked() {
+ testEvaluateNormalPermissionStateWithPermissionChanges()
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_REVOKED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal" +
+ " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+ " should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ private fun testEvaluateNormalPermissionStateWithPermissionChanges(
+ permissionName: String = PERMISSION_NAME_0,
+ requestingPackageTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ requestingPackageIsSystem: Boolean = false
+ ) {
+ val oldParsedPermission = mockParsedPermission(
+ permissionName,
+ PACKAGE_NAME_0,
+ protectionLevel = PermissionInfo.PROTECTION_SIGNATURE
+ )
+ val oldPermissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(oldParsedPermission))
+ )
+ val requestingPackageState = mockPackageState(
+ APP_ID_1,
+ mockAndroidPackage(
+ PACKAGE_NAME_1,
+ requestedPermissions = setOf(permissionName),
+ targetSdkVersion = requestingPackageTargetSdkVersion
+ ),
+ isSystem = requestingPackageIsSystem,
+ )
+ addPackageState(oldPermissionOwnerPackageState)
+ addPackageState(requestingPackageState)
+ addPermission(oldParsedPermission)
+ val oldFlags = PermissionFlags.INSTALL_REVOKED
+ setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags)
+
+ mutateState {
+ val newPermissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ permissions = listOf(mockParsedPermission(permissionName, PACKAGE_NAME_0))
+ )
+ )
+ addPackageState(newPermissionOwnerPackageState, newState)
+ with(appIdPermissionPolicy) {
+ onPackageAdded(newPermissionOwnerPackageState)
+ }
+ }
+ }
+
+ @Test
+ fun testOnPackageAdded_normalAppOpPermission_getsRoleAndUserSetFlagsPreserved() {
+ val oldFlags = PermissionFlags.ROLE or PermissionFlags.USER_SET
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_NORMAL or PermissionInfo.PROTECTION_FLAG_APPOP
+ ) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED or oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a normal app op" +
+ " permission with existing ROLE and USER_SET flags, the actual permission flags" +
+ " $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_internalPermissionWasGrantedWithMissingPackage_getsProtectionGranted() {
+ val oldFlags = PermissionFlags.PROTECTION_GRANTED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_INTERNAL) {
+ val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+ addPackageState(packageStateWithMissingPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests an internal permission" +
+ " with missing android package and $oldFlags flag, the actual permission flags" +
+ " $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_internalAppOpPermission_getsRoleAndUserSetFlagsPreserved() {
+ val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.ROLE or
+ PermissionFlags.USER_SET
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_APPOP
+ ) {
+ val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+ addPackageState(packageStateWithMissingPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests an internal permission" +
+ " with missing android package and $oldFlags flag and the permission isAppOp," +
+ " the actual permission flags $actualFlags should match the expected" +
+ " flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_internalDevelopmentPermission_getsRuntimeGrantedPreserved() {
+ val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.RUNTIME_GRANTED
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_DEVELOPMENT
+ ) {
+ val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+ addPackageState(packageStateWithMissingPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests an internal permission" +
+ " with missing android package and $oldFlags flag and permission isDevelopment," +
+ " the actual permission flags $actualFlags should match the expected" +
+ " flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_internalRolePermission_getsRoleAndRuntimeGrantedPreserved() {
+ val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.ROLE or
+ PermissionFlags.RUNTIME_GRANTED
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_ROLE
+ ) {
+ val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+ addPackageState(packageStateWithMissingPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests an internal permission" +
+ " with missing android package and $oldFlags flag and the permission isRole," +
+ " the actual permission flags $actualFlags should match the expected" +
+ " flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_signaturePrivilegedPermissionNotAllowlisted_isNotGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_SIGNATURE or PermissionInfo.PROTECTION_FLAG_PRIVILEGED,
+ isInstalledPackageSystem = true,
+ isInstalledPackagePrivileged = true,
+ isInstalledPackageProduct = true,
+ // To mock the return value of shouldGrantPrivilegedOrOemPermission()
+ isInstalledPackageVendor = true,
+ isNewInstall = true
+ ) {
+ val platformPackage = mockPackageState(
+ PLATFORM_APP_ID,
+ mockAndroidPackage(PLATFORM_PACKAGE_NAME)
+ )
+ setupAllowlist(PACKAGE_NAME_1, false)
+ addPackageState(platformPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a signature privileged" +
+ " permission that's not allowlisted, the actual permission" +
+ " flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_nonPrivilegedPermissionShouldGrantBySignature_getsProtectionGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_SIGNATURE,
+ isInstalledPackageSystem = true,
+ isInstalledPackagePrivileged = true,
+ isInstalledPackageProduct = true,
+ isInstalledPackageSignatureMatching = true,
+ isInstalledPackageVendor = true,
+ isNewInstall = true
+ ) {
+ val platformPackage = mockPackageState(
+ PLATFORM_APP_ID,
+ mockAndroidPackage(PLATFORM_PACKAGE_NAME, isSignatureMatching = true)
+ )
+ setupAllowlist(PACKAGE_NAME_1, false)
+ addPackageState(platformPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.PROTECTION_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a signature" +
+ " non-privileged permission, the actual permission" +
+ " flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_privilegedAllowlistPermissionShouldGrantByProtectionFlags_getsGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_SIGNATURE or PermissionInfo.PROTECTION_FLAG_PRIVILEGED,
+ isInstalledPackageSystem = true,
+ isInstalledPackagePrivileged = true,
+ isInstalledPackageProduct = true,
+ isNewInstall = true
+ ) {
+ val platformPackage = mockPackageState(
+ PLATFORM_APP_ID,
+ mockAndroidPackage(PLATFORM_PACKAGE_NAME)
+ )
+ setupAllowlist(PACKAGE_NAME_1, true)
+ addPackageState(platformPackage)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.PROTECTION_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a signature privileged" +
+ " permission that's allowlisted and should grant by protection flags, the actual" +
+ " permission flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ private fun setupAllowlist(
+ packageName: String,
+ allowlistState: Boolean,
+ state: MutableAccessState = oldState
+ ) {
+ state.mutateExternalState().setPrivilegedPermissionAllowlistPackages(
+ MutableIndexedListSet<String>().apply { add(packageName) }
+ )
+ val mockAllowlist = mock<PermissionAllowlist> {
+ whenever(
+ getProductPrivilegedAppAllowlistState(packageName, PERMISSION_NAME_0)
+ ).thenReturn(allowlistState)
+ }
+ state.mutateExternalState().setPermissionAllowlist(mockAllowlist)
+ }
+
+ @Test
+ fun testOnPackageAdded_nonRuntimeFlagsOnRuntimePermissions_getsCleared() {
+ val oldFlags = PermissionFlags.INSTALL_GRANTED or PermissionFlags.PREGRANT or
+ PermissionFlags.RUNTIME_GRANTED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.PREGRANT or PermissionFlags.RUNTIME_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " with existing $oldFlags flags, the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_newPermissionsForPreM_requiresUserReview() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ installedPackageTargetSdkVersion = Build.VERSION_CODES.LOLLIPOP,
+ isNewInstall = true
+ ) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.IMPLICIT
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " with no existing flags in pre M, actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_legacyOrImplicitGrantedPermissionPreviouslyRevoked_getsAppOpRevoked() {
+ val oldFlags = PermissionFlags.USER_FIXED
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ installedPackageTargetSdkVersion = Build.VERSION_CODES.LOLLIPOP
+ ) {
+ setPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0, oldFlags)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.USER_FIXED or
+ PermissionFlags.APP_OP_REVOKED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that should be LEGACY_GRANTED or IMPLICIT_GRANTED that was previously revoked," +
+ " the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_legacyGrantedPermissionsForPostM_userReviewRequirementRemoved() {
+ val oldFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.IMPLICIT
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that used to require user review, the user review requirement should be removed" +
+ " if it's upgraded to post M. The actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_legacyGrantedPermissionsAlreadyReviewedForPostM_getsGranted() {
+ val oldFlags = PermissionFlags.LEGACY_GRANTED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that was already reviewed by the user, the permission should be RUNTIME_GRANTED" +
+ " if it's upgraded to post M. The actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_leanbackNotificationPermissionsForPostM_getsImplicitGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ permissionName = PERMISSION_POST_NOTIFICATIONS,
+ isNewInstall = true
+ ) {
+ oldState.mutateExternalState().setLeanback(true)
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_POST_NOTIFICATIONS)
+ val expectedNewFlags = PermissionFlags.IMPLICIT_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime notification" +
+ " permission when isLeanback, the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_implicitSourceFromNonRuntime_getsImplicitGranted() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ implicitPermissions = setOf(PERMISSION_NAME_0),
+ isNewInstall = true
+ ) {
+ oldState.mutateExternalState().setImplicitToSourcePermissions(
+ MutableIndexedMap<String, IndexedListSet<String>>().apply {
+ put(PERMISSION_NAME_0, MutableIndexedListSet<String>().apply {
+ add(PERMISSION_NAME_1)
+ })
+ }
+ )
+ addPermission(mockParsedPermission(PERMISSION_NAME_1, PACKAGE_NAME_0))
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime implicit" +
+ " permission that's source from a non-runtime permission, the actual permission" +
+ " flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ /**
+ * For a legacy granted or implicit permission during the app upgrade, when the permission
+ * should no longer be legacy or implicit granted, we want to remove the APP_OP_REVOKED flag
+ * so that the app can request the permission.
+ */
+ @Test
+ fun testOnPackageAdded_noLongerLegacyOrImplicitGranted_canBeRequested() {
+ val oldFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.APP_OP_REVOKED or
+ PermissionFlags.RUNTIME_GRANTED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that is no longer LEGACY_GRANTED or IMPLICIT_GRANTED, the actual permission" +
+ " flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_noLongerImplicitPermissions_getsRuntimeAndImplicitFlagsRemoved() {
+ val oldFlags = PermissionFlags.IMPLICIT or PermissionFlags.RUNTIME_GRANTED or
+ PermissionFlags.USER_SET or PermissionFlags.USER_FIXED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = 0
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that is no longer implicit and we shouldn't retain as nearby device" +
+ " permissions, the actual permission flags $actualFlags should match the expected" +
+ " flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_noLongerImplicitNearbyPermissionsWasGranted_getsRuntimeGranted() {
+ val oldFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ permissionName = PERMISSION_BLUETOOTH_CONNECT,
+ requestedPermissions = setOf(
+ PERMISSION_BLUETOOTH_CONNECT,
+ PERMISSION_ACCESS_BACKGROUND_LOCATION
+ )
+ ) {
+ setPermissionFlags(
+ APP_ID_1,
+ USER_ID_0,
+ PERMISSION_ACCESS_BACKGROUND_LOCATION,
+ PermissionFlags.RUNTIME_GRANTED
+ )
+ }
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_BLUETOOTH_CONNECT)
+ val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime nearby device" +
+ " permission that was granted by implicit, the actual permission flags" +
+ " $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_noLongerImplicitSystemOrPolicyFixedWasGranted_getsRuntimeGranted() {
+ val oldFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT or
+ PermissionFlags.SYSTEM_FIXED
+ testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.SYSTEM_FIXED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime permission" +
+ " that was granted and is no longer implicit and is SYSTEM_FIXED or POLICY_FIXED," +
+ " the actual permission flags $actualFlags should match the expected" +
+ " flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_restrictedPermissionsNotExempt_getsRestrictionFlags() {
+ val oldFlags = PermissionFlags.RESTRICTION_REVOKED
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ permissionInfoFlags = PermissionInfo.FLAG_HARD_RESTRICTED
+ ) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldFlags
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime hard" +
+ " restricted permission that is not exempted, the actual permission flags" +
+ " $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_restrictedPermissionsIsExempted_clearsRestrictionFlags() {
+ val oldFlags = 0
+ testEvaluatePermissionState(
+ oldFlags,
+ PermissionInfo.PROTECTION_DANGEROUS,
+ permissionInfoFlags = PermissionInfo.FLAG_SOFT_RESTRICTED
+ ) {}
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.UPGRADE_EXEMPT
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a runtime soft" +
+ " restricted permission that is exempted, the actual permission flags" +
+ " $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ /**
+ * Setup simple package states for testing evaluatePermissionState().
+ * permissionOwnerPackageState is definer of permissionName with APP_ID_0.
+ * installedPackageState is the installed package that requests permissionName with APP_ID_1.
+ *
+ * @param oldFlags the existing permission flags for APP_ID_1, USER_ID_0, permissionName
+ * @param protectionLevel the protectionLevel for the permission
+ * @param permissionName the name of the permission (1) being defined (2) of the oldFlags, and
+ * (3) requested by installedPackageState
+ * @param requestedPermissions the permissions requested by installedPackageState
+ * @param implicitPermissions the implicit permissions of installedPackageState
+ * @param permissionInfoFlags the flags for the permission itself
+ * @param isInstalledPackageSystem whether installedPackageState is a system package
+ *
+ * @return installedPackageState
+ */
+ fun testEvaluatePermissionState(
+ oldFlags: Int,
+ protectionLevel: Int,
+ permissionName: String = PERMISSION_NAME_0,
+ requestedPermissions: Set<String> = setOf(permissionName),
+ implicitPermissions: Set<String> = emptySet(),
+ permissionInfoFlags: Int = 0,
+ isInstalledPackageSystem: Boolean = false,
+ isInstalledPackagePrivileged: Boolean = false,
+ isInstalledPackageProduct: Boolean = false,
+ isInstalledPackageSignatureMatching: Boolean = false,
+ isInstalledPackageVendor: Boolean = false,
+ installedPackageTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ isNewInstall: Boolean = false,
+ additionalSetup: () -> Unit
+ ) {
+ val parsedPermission = mockParsedPermission(
+ permissionName,
+ PACKAGE_NAME_0,
+ protectionLevel = protectionLevel,
+ flags = permissionInfoFlags
+ )
+ val permissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(parsedPermission))
+ )
+ val installedPackageState = mockPackageState(
+ APP_ID_1,
+ mockAndroidPackage(
+ PACKAGE_NAME_1,
+ requestedPermissions = requestedPermissions,
+ implicitPermissions = implicitPermissions,
+ targetSdkVersion = installedPackageTargetSdkVersion,
+ isSignatureMatching = isInstalledPackageSignatureMatching
+ ),
+ isSystem = isInstalledPackageSystem,
+ isPrivileged = isInstalledPackagePrivileged,
+ isProduct = isInstalledPackageProduct,
+ isVendor = isInstalledPackageVendor
+ )
+ addPackageState(permissionOwnerPackageState)
+ if (!isNewInstall) {
+ addPackageState(installedPackageState)
+ setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags)
+ }
+ addPermission(parsedPermission)
+
+ additionalSetup()
+
+ mutateState {
+ if (isNewInstall) {
+ addPackageState(installedPackageState, newState)
+ setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags, newState)
+ }
+ with(appIdPermissionPolicy) {
+ onPackageAdded(installedPackageState)
+ }
+ }
+ }
+
+ /**
+ * Mock an AndroidPackage with PACKAGE_NAME_0, PERMISSION_NAME_0 and PERMISSION_GROUP_NAME_0
+ */
+ private fun mockSimpleAndroidPackage(): AndroidPackage =
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ permissionGroups = listOf(defaultPermissionGroup),
+ permissions = listOf(defaultPermissionTree, defaultPermission)
+ )
+
private inline fun mutateState(action: MutateStateScope.() -> Unit) {
newState = oldState.toMutable()
MutateStateScope(oldState, newState).action()
}
- private fun createSystemStatePermission(
+ private fun mockPackageState(
appId: Int,
packageName: String,
+ isSystem: Boolean = false,
+ ): PackageState =
+ mock {
+ whenever(this.appId).thenReturn(appId)
+ whenever(this.packageName).thenReturn(packageName)
+ whenever(androidPackage).thenReturn(null)
+ whenever(this.isSystem).thenReturn(isSystem)
+ }
+
+ private fun mockPackageState(
+ appId: Int,
+ androidPackage: AndroidPackage,
+ isSystem: Boolean = false,
+ isPrivileged: Boolean = false,
+ isProduct: Boolean = false,
+ isInstantApp: Boolean = false,
+ isVendor: Boolean = false
+ ): PackageState =
+ mock {
+ whenever(this.appId).thenReturn(appId)
+ whenever(this.androidPackage).thenReturn(androidPackage)
+ val packageName = androidPackage.packageName
+ whenever(this.packageName).thenReturn(packageName)
+ whenever(this.isSystem).thenReturn(isSystem)
+ whenever(this.isPrivileged).thenReturn(isPrivileged)
+ whenever(this.isProduct).thenReturn(isProduct)
+ whenever(this.isVendor).thenReturn(isVendor)
+ val userStates = SparseArray<PackageUserState>().apply {
+ put(USER_ID_0, mock { whenever(this.isInstantApp).thenReturn(isInstantApp) })
+ }
+ whenever(this.userStates).thenReturn(userStates)
+ }
+
+ private fun mockAndroidPackage(
+ packageName: String,
+ targetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ isRequestLegacyExternalStorage: Boolean = false,
+ adoptPermissions: List<String> = emptyList(),
+ implicitPermissions: Set<String> = emptySet(),
+ requestedPermissions: Set<String> = emptySet(),
+ permissionGroups: List<ParsedPermissionGroup> = emptyList(),
+ permissions: List<ParsedPermission> = emptyList(),
+ isSignatureMatching: Boolean = false
+ ): AndroidPackage =
+ mock {
+ whenever(this.packageName).thenReturn(packageName)
+ whenever(this.targetSdkVersion).thenReturn(targetSdkVersion)
+ whenever(this.isRequestLegacyExternalStorage).thenReturn(isRequestLegacyExternalStorage)
+ whenever(this.adoptPermissions).thenReturn(adoptPermissions)
+ whenever(this.implicitPermissions).thenReturn(implicitPermissions)
+ whenever(this.requestedPermissions).thenReturn(requestedPermissions)
+ whenever(this.permissionGroups).thenReturn(permissionGroups)
+ whenever(this.permissions).thenReturn(permissions)
+ val signingDetails = mock<SigningDetails> {
+ whenever(
+ hasCommonSignerWithCapability(any(), any())
+ ).thenReturn(isSignatureMatching)
+ whenever(hasAncestorOrSelf(any())).thenReturn(isSignatureMatching)
+ whenever(
+ checkCapability(any<SigningDetails>(), any())
+ ).thenReturn(isSignatureMatching)
+ }
+ whenever(this.signingDetails).thenReturn(signingDetails)
+ }
+
+ private fun mockParsedPermission(
permissionName: String,
- protectionLevel: Int,
+ packageName: String,
+ backgroundPermission: String? = null,
+ group: String? = null,
+ protectionLevel: Int = PermissionInfo.PROTECTION_NORMAL,
+ flags: Int = 0,
+ isTree: Boolean = false
+ ): ParsedPermission =
+ mock {
+ whenever(name).thenReturn(permissionName)
+ whenever(this.packageName).thenReturn(packageName)
+ whenever(metaData).thenReturn(Bundle())
+ whenever(this.backgroundPermission).thenReturn(backgroundPermission)
+ whenever(this.group).thenReturn(group)
+ whenever(this.protectionLevel).thenReturn(protectionLevel)
+ whenever(this.flags).thenReturn(flags)
+ whenever(this.isTree).thenReturn(isTree)
+ }
+
+ private fun mockParsedPermissionGroup(
+ permissionGroupName: String,
+ packageName: String,
+ ): ParsedPermissionGroup =
+ mock {
+ whenever(name).thenReturn(permissionGroupName)
+ whenever(this.packageName).thenReturn(packageName)
+ whenever(metaData).thenReturn(Bundle())
+ }
+
+ private fun addPackageState(packageState: PackageState, state: MutableAccessState = oldState) {
+ state.mutateExternalState().apply {
+ setPackageStates(
+ packageStates.toMutableMap().apply {
+ put(packageState.packageName, packageState)
+ }
+ )
+ mutateAppIdPackageNames().mutateOrPut(packageState.appId) { MutableIndexedListSet() }
+ .add(packageState.packageName)
+ }
+ }
+
+ private fun addDisabledSystemPackageState(
+ packageState: PackageState,
+ state: MutableAccessState = oldState
+ ) = state.mutateExternalState().apply {
+ (disabledSystemPackageStates as ArrayMap)[packageState.packageName] = packageState
+ }
+
+ private fun addPermission(
+ parsedPermission: ParsedPermission,
type: Int = Permission.TYPE_MANIFEST,
isReconciled: Boolean = true,
- isTree: Boolean = false
+ state: MutableAccessState = oldState
) {
- @Suppress("DEPRECATION")
- val permissionInfo = PermissionInfo().apply {
- name = permissionName
- this.packageName = packageName
- this.protectionLevel = protectionLevel
- }
+ val permissionInfo = PackageInfoUtils.generatePermissionInfo(
+ parsedPermission,
+ PackageManager.GET_META_DATA.toLong()
+ )!!
+ val appId = state.externalState.packageStates[permissionInfo.packageName]!!.appId
val permission = Permission(permissionInfo, isReconciled, type, appId)
- if (isTree) {
- oldState.mutateSystemState().mutatePermissionTrees().put(permissionName, permission)
+ if (parsedPermission.isTree) {
+ state.mutateSystemState().mutatePermissionTrees()[permission.name] = permission
} else {
- oldState.mutateSystemState().mutatePermissions().put(permissionName, permission)
+ state.mutateSystemState().mutatePermissions()[permission.name] = permission
}
}
- private fun createSystemStatePermissionGroup(packageName: String, permissionGroupName: String) {
- @Suppress("DEPRECATION")
- val permissionGroupInfo = PermissionGroupInfo().apply {
- name = permissionGroupName
- this.packageName = packageName
- }
- oldState.mutateSystemState().mutatePermissionGroups()[permissionGroupName] =
- permissionGroupInfo
+ private fun addPermissionGroup(
+ parsedPermissionGroup: ParsedPermissionGroup,
+ state: MutableAccessState = oldState
+ ) {
+ state.mutateSystemState().mutatePermissionGroups()[parsedPermissionGroup.name] =
+ PackageInfoUtils.generatePermissionGroupInfo(
+ parsedPermissionGroup,
+ PackageManager.GET_META_DATA.toLong()
+ )!!
}
- fun getPermissionFlags(
+ private fun getPermission(
+ permissionName: String,
+ state: MutableAccessState = newState
+ ): Permission? = state.systemState.permissions[permissionName]
+
+ private fun getPermissionTree(
+ permissionTreeName: String,
+ state: MutableAccessState = newState
+ ): Permission? = state.systemState.permissionTrees[permissionTreeName]
+
+ private fun getPermissionGroup(
+ permissionGroupName: String,
+ state: MutableAccessState = newState
+ ): PermissionGroupInfo? = state.systemState.permissionGroups[permissionGroupName]
+
+ private fun getPermissionFlags(
appId: Int,
userId: Int,
permissionName: String,
@@ -517,20 +1706,43 @@ class AppIdPermissionPolicyTest {
): Int =
state.userStates[userId]?.appIdPermissionFlags?.get(appId).getWithDefault(permissionName, 0)
+ private fun setPermissionFlags(
+ appId: Int,
+ userId: Int,
+ permissionName: String,
+ flags: Int,
+ state: MutableAccessState = oldState
+ ) =
+ state.mutateUserState(userId)!!.mutateAppIdPermissionFlags().mutateOrPut(appId) {
+ MutableIndexedMap()
+ }.put(permissionName, flags)
+
companion object {
private const val PACKAGE_NAME_0 = "packageName0"
private const val PACKAGE_NAME_1 = "packageName1"
+ private const val MISSING_ANDROID_PACKAGE = "missingAndroidPackage"
+ private const val PLATFORM_PACKAGE_NAME = "android"
private const val APP_ID_0 = 0
private const val APP_ID_1 = 1
-
- private const val PERMISSION_NAME_0 = "permissionName0"
- private const val PERMISSION_NAME_1 = "permissionName1"
+ private const val PLATFORM_APP_ID = 2
private const val PERMISSION_GROUP_NAME_0 = "permissionGroupName0"
private const val PERMISSION_GROUP_NAME_1 = "permissionGroupName1"
+ private const val PERMISSION_TREE_NAME = "permissionTree"
+
+ private const val PERMISSION_NAME_0 = "permissionName0"
+ private const val PERMISSION_NAME_1 = "permissionName1"
+ private const val PERMISSION_READ_EXTERNAL_STORAGE =
+ Manifest.permission.READ_EXTERNAL_STORAGE
+ private const val PERMISSION_POST_NOTIFICATIONS =
+ Manifest.permission.POST_NOTIFICATIONS
+ private const val PERMISSION_BLUETOOTH_CONNECT =
+ Manifest.permission.BLUETOOTH_CONNECT
+ private const val PERMISSION_ACCESS_BACKGROUND_LOCATION =
+ Manifest.permission.ACCESS_BACKGROUND_LOCATION
+
private const val USER_ID_0 = 0
- private const val USER_ID_1 = 1
}
}
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 2640390ceecf..e0c0ae2349f9 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
@@ -758,14 +758,16 @@ public final class DisplayPowerControllerTest {
@Test
public void testSetScreenOffBrightnessSensorEnabled_DisplayIsInDoze() {
+ mContext.getOrCreateTestableResources().addOverride(
+ com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, false);
+ mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
+
Settings.System.putInt(mContext.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
DisplayPowerRequest dpr = new DisplayPowerRequest();
dpr.policy = DisplayPowerRequest.POLICY_DOZE;
- mContext.getOrCreateTestableResources().addOverride(
- com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, true);
mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
advanceTime(1); // Run updatePowerState
diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java
index 60b28d3a2ff0..d988063bdfb0 100644
--- a/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java
@@ -38,7 +38,6 @@ import android.content.IntentSender;
import android.content.pm.ActivityInfo;
import android.content.pm.LauncherActivityInfo;
import android.content.pm.LauncherApps;
-import android.content.pm.PackageArchiver;
import android.content.pm.PackageInstaller;
import android.content.pm.PackageManager;
import android.content.pm.VersionedPackage;
@@ -75,7 +74,7 @@ import java.util.List;
@SmallTest
@Presubmit
@RunWith(AndroidJUnit4.class)
-public class PackageArchiverServiceTest {
+public class PackageArchiverTest {
private static final String PACKAGE = "com.example";
private static final String CALLER_PACKAGE = "com.caller";
@@ -119,7 +118,7 @@ public class PackageArchiverServiceTest {
private PackageSetting mPackageSetting;
- private PackageArchiverService mArchiveService;
+ private PackageArchiver mArchiveManager;
@Before
public void setUp() throws Exception {
@@ -160,8 +159,8 @@ public class PackageArchiverServiceTest {
mock(Resources.class));
when(mIcon.compress(eq(Bitmap.CompressFormat.PNG), eq(100), any())).thenReturn(true);
- mArchiveService = spy(new PackageArchiverService(mContext, pm));
- doReturn(ICON_PATH).when(mArchiveService).storeIcon(eq(PACKAGE),
+ mArchiveManager = spy(new PackageArchiver(mContext, pm));
+ doReturn(ICON_PATH).when(mArchiveManager).storeIcon(eq(PACKAGE),
any(LauncherActivityInfo.class), eq(mUserId));
}
@@ -169,7 +168,7 @@ public class PackageArchiverServiceTest {
public void archiveApp_callerPackageNameIncorrect() {
Exception e = assertThrows(
SecurityException.class,
- () -> mArchiveService.requestArchive(PACKAGE, "different", mIntentSender,
+ () -> mArchiveManager.requestArchive(PACKAGE, "different", mIntentSender,
UserHandle.CURRENT));
assertThat(e).hasMessageThat().isEqualTo(
String.format(
@@ -186,7 +185,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+ () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -197,7 +196,7 @@ public class PackageArchiverServiceTest {
public void archiveApp_packageNotInstalledForUser() throws IntentSender.SendIntentException {
mPackageSetting.modifyUserState(UserHandle.CURRENT.getIdentifier()).setInstalled(false);
- mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+ mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
rule.mocks().getHandler().flush();
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
@@ -226,7 +225,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+ () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo("No installer found");
@@ -239,7 +238,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+ () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -249,10 +248,10 @@ public class PackageArchiverServiceTest {
@Test
public void archiveApp_storeIconFails() throws IntentSender.SendIntentException, IOException {
IOException e = new IOException("IO");
- doThrow(e).when(mArchiveService).storeIcon(eq(PACKAGE),
+ doThrow(e).when(mArchiveManager).storeIcon(eq(PACKAGE),
any(LauncherActivityInfo.class), eq(mUserId));
- mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+ mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
rule.mocks().getHandler().flush();
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
@@ -268,7 +267,7 @@ public class PackageArchiverServiceTest {
@Test
public void archiveApp_success() {
- mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+ mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
rule.mocks().getHandler().flush();
verify(mInstallerService).uninstall(
@@ -286,7 +285,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
SecurityException.class,
- () -> mArchiveService.requestUnarchive(PACKAGE, "different",
+ () -> mArchiveManager.requestUnarchive(PACKAGE, "different",
UserHandle.CURRENT));
assertThat(e).hasMessageThat().isEqualTo(
String.format(
@@ -304,7 +303,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+ () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -315,7 +314,7 @@ public class PackageArchiverServiceTest {
public void unarchiveApp_notArchived() {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+ () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -338,7 +337,7 @@ public class PackageArchiverServiceTest {
Exception e = assertThrows(
ParcelableException.class,
- () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+ () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
UserHandle.CURRENT));
assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -349,7 +348,7 @@ public class PackageArchiverServiceTest {
public void unarchiveApp_success() {
mUserState.setArchiveState(createArchiveState()).setInstalled(false);
- mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE, UserHandle.CURRENT);
+ mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE, UserHandle.CURRENT);
rule.mocks().getHandler().flush();
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
@@ -366,10 +365,10 @@ public class PackageArchiverServiceTest {
/* initialExtras= */ isNull());
Intent intent = intentCaptor.getValue();
assertThat(intent.getFlags() & FLAG_RECEIVER_FOREGROUND).isNotEqualTo(0);
- assertThat(intent.getStringExtra(PackageArchiver.EXTRA_UNARCHIVE_PACKAGE_NAME)).isEqualTo(
+ assertThat(intent.getStringExtra(PackageInstaller.EXTRA_UNARCHIVE_PACKAGE_NAME)).isEqualTo(
PACKAGE);
assertThat(
- intent.getBooleanExtra(PackageArchiver.EXTRA_UNARCHIVE_ALL_USERS, true)).isFalse();
+ intent.getBooleanExtra(PackageInstaller.EXTRA_UNARCHIVE_ALL_USERS, true)).isFalse();
assertThat(intent.getPackage()).isEqualTo(INSTALLER_PACKAGE);
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS b/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS
new file mode 100644
index 000000000000..e2c6ce15b51e
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/trust/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
index 7e638a869682..49f22eca5643 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
@@ -27,6 +27,7 @@ import static com.android.internal.accessibility.AccessibilityShortcutController
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
+import static org.junit.Assume.assumeTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -428,6 +429,10 @@ public class AccessibilityManagerServiceTest {
@SmallTest
@Test
public void testChangeMagnificationModeOnTestDisplay_capabilitiesIsAll_transitMode() {
+ // This test only makes sense for devices that support Window magnification
+ assumeTrue(mTestableContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_WINDOW_MAGNIFICATION));
+
final AccessibilityUserState userState = mA11yms.mUserStates.get(
mA11yms.getCurrentUserIdLocked());
userState.setMagnificationCapabilitiesLocked(
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
index 035bef6b8feb..3808f30515fb 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
@@ -47,7 +47,9 @@ import android.graphics.Region;
import android.os.IBinder;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
-import android.platform.test.flag.junit.SetFlagsRule;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.util.ArraySet;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -90,8 +92,7 @@ public class ProxyManagerTest {
private static final int STREAMED_CALLING_UID = 9876;
@Rule
- public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
-
+ public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
@Mock private Context mMockContext;
@Mock private AccessibilitySecurityPolicy mMockSecurityPolicy;
@@ -116,8 +117,6 @@ public class ProxyManagerTest {
MockitoAnnotations.initMocks(this);
final Resources resources = InstrumentationRegistry.getContext().getResources();
- mSetFlagsRule.enableFlags(Flags.FLAG_PROXY_USE_APPS_ON_VIRTUAL_DEVICE_LISTENER);
-
mFocusStrokeWidthDefaultValue =
resources.getDimensionPixelSize(R.dimen.accessibility_focus_highlight_stroke_width);
mFocusColorDefaultValue = resources.getColor(R.color.accessibility_focus_highlight_color);
@@ -230,6 +229,7 @@ public class ProxyManagerTest {
* app changes to the proxy device.
*/
@Test
+ @RequiresFlagsEnabled(Flags.FLAG_PROXY_USE_APPS_ON_VIRTUAL_DEVICE_LISTENER)
public void testUpdateProxyOfRunningAppsChange_changedUidIsStreamedApp_propagatesChange() {
final VirtualDeviceManagerInternal localVdm =
Mockito.mock(VirtualDeviceManagerInternal.class);
diff --git a/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java b/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java
new file mode 100644
index 000000000000..9fdbdda38c75
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java
@@ -0,0 +1,378 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.am;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.platform.test.annotations.Presubmit;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.SystemClock;
+
+import android.util.Log;
+
+import androidx.test.filters.SmallTest;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Build/Install/Run:
+ * atest FrameworksServicesTests:AnrTimerTest
+ */
+@SmallTest
+@Presubmit
+public class AnrTimerTest {
+
+ /**
+ * A handler that allows control over when to dispatch messages and callbacks. Because most
+ * Handler methods are final, the only thing this handler can intercept is sending messages.
+ * This handler allows unit tests to be written without a need to sleep (which leads to flaky
+ * tests).
+ *
+ * This code was cloned from {@link com.android.systemui.utils.os.FakeHandler}.
+ */
+ static class TestHandler extends Handler {
+
+ private boolean mImmediate = true;
+ private ArrayList<Message> mQueuedMessages = new ArrayList<>();
+
+ ArrayList<Long> mDelays = new ArrayList<>();
+
+ TestHandler(Looper looper, Callback callback, boolean immediate) {
+ super(looper, callback);
+ mImmediate = immediate;
+ }
+
+ TestHandler(Looper looper, Callback callback) {
+ this(looper, callback, true);
+ }
+
+ /**
+ * Override sendMessageAtTime. In immediate mode, the message is immediately dispatched.
+ * In non-immediate mode, the message is enqueued to the real handler. In both cases, the
+ * original delay is computed by comparing the target dispatch time with 'now'. This
+ * computation is prone to errors if the code experiences delays. The computed time is
+ * captured in the mDelays list.
+ */
+ @Override
+ public boolean sendMessageAtTime(Message msg, long uptimeMillis) {
+ long delay = uptimeMillis - SystemClock.uptimeMillis();
+ mDelays.add(delay);
+ if (mImmediate) {
+ mQueuedMessages.add(msg);
+ dispatchQueuedMessages();
+ } else {
+ super.sendMessageAtTime(msg, uptimeMillis);
+ }
+ return true;
+ }
+
+ void setImmediate(boolean immediate) {
+ mImmediate = immediate;
+ }
+
+ /** Dispatch any messages that have been queued on the calling thread. */
+ void dispatchQueuedMessages() {
+ ArrayList<Message> messages = new ArrayList<>(mQueuedMessages);
+ mQueuedMessages.clear();
+ for (Message msg : messages) {
+ dispatchMessage(msg);
+ }
+ }
+
+ /**
+ * Compare the captured delays with the input array. The comparison is fuzzy because the
+ * captured delay (see sendMessageAtTime) is affected by process delays.
+ */
+ void verifyDelays(long[] r) {
+ final long FUZZ = 10;
+ assertEquals(r.length, mDelays.size());
+ for (int i = 0; i < mDelays.size(); i++) {
+ long t = r[i];
+ long v = mDelays.get(i);
+ assertTrue(v >= t - FUZZ && v <= t + FUZZ);
+ }
+ }
+ }
+
+ private Handler mHandler;
+ private CountDownLatch mLatch = null;
+ private ArrayList<Message> mMessages;
+
+ // The commonly used message timeout key.
+ private static final int MSG_TIMEOUT = 1;
+
+ @Before
+ public void setUp() {
+ mHandler = new Handler(Looper.getMainLooper(), this::expirationHandler);
+ mMessages = new ArrayList<>();
+ mLatch = new CountDownLatch(1);
+ AnrTimer.resetTimerListForHermeticTest();
+ }
+
+ @After
+ public void tearDown() {
+ mHandler = null;
+ mMessages = null;
+ }
+
+ // When a timer expires, set the expiration time in the message and add it to the queue.
+ private boolean expirationHandler(Message msg) {
+ mMessages.add(Message.obtain(msg));
+ mLatch.countDown();
+ return false;
+ }
+
+ // The test argument includes a pid and uid, and a tag. The tag is used to distinguish
+ // different message instances.
+ private static class TestArg {
+ final int pid;
+ final int uid;
+ final int tag;
+
+ TestArg(int pid, int uid, int tag) {
+ this.pid = pid;
+ this.uid = uid;
+ this.tag = tag;
+ }
+ @Override
+ public String toString() {
+ return String.format("pid=%d uid=%d tag=%d", pid, uid, tag);
+ }
+ }
+
+ /**
+ * An instrumented AnrTimer.
+ */
+ private class TestAnrTimer extends AnrTimer {
+ // A local copy of 'what'. The field in AnrTimer is private.
+ final int mWhat;
+
+ TestAnrTimer(Handler h, int key, String tag) {
+ super(h, key, tag);
+ mWhat = key;
+ }
+
+ TestAnrTimer() {
+ this(mHandler, MSG_TIMEOUT, caller());
+ }
+
+ TestAnrTimer(Handler h, int key, String tag, boolean extend, TestInjector injector) {
+ super(h, key, tag, extend, injector);
+ mWhat = key;
+ }
+
+ TestAnrTimer(boolean extend, TestInjector injector) {
+ this(mHandler, MSG_TIMEOUT, caller(), extend, injector);
+ }
+
+ // Return the name of method that called the constructor, assuming that this function is
+ // called from inside the constructor. The calling method is used to name the AnrTimer
+ // instance so that logs are easier to understand.
+ private static String caller() {
+ final int n = 4;
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ if (stack.length < n+1) return "test";
+ return stack[n].getMethodName();
+ }
+
+ boolean start(TestArg arg, long millis) {
+ return start(arg, arg.pid, arg.uid, millis);
+ }
+
+ int what() {
+ return mWhat;
+ }
+ }
+
+ private static class TestTracker extends AnrTimer.CpuTracker {
+ long index = 0;
+ final int skip;
+ TestTracker(int skip) {
+ this.skip = skip;
+ }
+ long delay(int pid) {
+ return index++ * skip;
+ }
+ }
+
+ private class TestInjector extends AnrTimer.Injector {
+ final boolean mImmediate;
+ final AnrTimer.CpuTracker mTracker;
+ TestHandler mTestHandler;
+
+ TestInjector(int skip, boolean immediate) {
+ mTracker = new TestTracker(skip);
+ mImmediate = immediate;
+ }
+
+ TestInjector(int skip) {
+ this(skip, true);
+ }
+
+ @Override
+ Handler getHandler(Handler.Callback callback) {
+ if (mTestHandler == null) {
+ mTestHandler = new TestHandler(mHandler.getLooper(), callback, mImmediate);
+ }
+ return mTestHandler;
+ }
+
+ /** Fetch the allocated handle. This does not check for nulls. */
+ TestHandler getHandler() {
+ return mTestHandler;
+ }
+
+ AnrTimer.CpuTracker getTracker() {
+ return mTracker;
+ }
+ }
+
+ // Tests
+ // 1. Start a timer and wait for expiration.
+ // 2. Start a timer and cancel it. Verify no expiration.
+ // 3. Start a timer. Shortly thereafter, restart it. Verify only one expiration.
+ // 4. Start a couple of timers. Verify max active timers. Discard one and verify the active
+ // count drops by 1. Accept one and verify the active count drops by 1.
+
+
+ @Test
+ public void testSimpleTimeout() throws Exception {
+ // Create an immediate TestHandler.
+ TestInjector injector = new TestInjector(0);
+ TestAnrTimer timer = new TestAnrTimer(false, injector);
+ TestArg t = new TestArg(1, 1, 3);
+ assertTrue(timer.start(t, 10));
+ // Delivery is immediate but occurs on a different thread.
+ assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
+ assertEquals(1, mMessages.size());
+ Message m = mMessages.get(0);
+ assertEquals(timer.what(), m.what);
+ assertEquals(t, m.obj);
+
+ // Verify that the timer is still present.
+ assertEquals(1, AnrTimer.sizeOfTimerList());
+ assertTrue(timer.accept(t));
+ assertEquals(0, AnrTimer.sizeOfTimerList());
+
+ // Verify that the timer no longer exists.
+ assertFalse(timer.accept(t));
+ }
+
+ @Test
+ public void testCancel() throws Exception {
+ // Create an non-immediate TestHandler.
+ TestInjector injector = new TestInjector(0, false);
+ TestAnrTimer timer = new TestAnrTimer(false, injector);
+
+ Handler handler = injector.getHandler();
+ assertNotNull(handler);
+ assertTrue(handler instanceof TestHandler);
+
+ // The tests that follow check for a 'what' of 0 (zero), which is the message key used
+ // by AnrTimer internally.
+ TestArg t = new TestArg(1, 1, 3);
+ assertFalse(handler.hasMessages(0));
+ assertTrue(timer.start(t, 100));
+ assertTrue(handler.hasMessages(0));
+ assertTrue(timer.cancel(t));
+ assertFalse(handler.hasMessages(0));
+
+ // Verify that no expiration messages were delivered.
+ assertEquals(0, mMessages.size());
+ assertEquals(0, AnrTimer.sizeOfTimerList());
+ }
+
+ @Test
+ public void testRestart() throws Exception {
+ // Create an non-immediate TestHandler.
+ TestInjector injector = new TestInjector(0, false);
+ TestAnrTimer timer = new TestAnrTimer(false, injector);
+
+ TestArg t = new TestArg(1, 1, 3);
+ assertTrue(timer.start(t, 2500));
+ assertTrue(timer.start(t, 1000));
+
+ // Verify that the test handler saw two timeouts.
+ injector.getHandler().verifyDelays(new long[] { 2500, 1000 });
+
+ // Verify that there is a single timer. Then cancel it.
+ assertEquals(1, AnrTimer.sizeOfTimerList());
+ assertTrue(timer.cancel(t));
+ assertEquals(0, AnrTimer.sizeOfTimerList());
+ }
+
+ @Test
+ public void testExtendNormal() throws Exception {
+ // Create an immediate TestHandler.
+ TestInjector injector = new TestInjector(5);
+ TestAnrTimer timer = new TestAnrTimer(true, injector);
+ TestArg t = new TestArg(1, 1, 3);
+ assertTrue(timer.start(t, 10));
+
+ assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
+ assertEquals(1, mMessages.size());
+ Message m = mMessages.get(0);
+ assertEquals(timer.what(), m.what);
+ assertEquals(t, m.obj);
+
+ // Verify that the test handler saw two timeouts: one of 10ms and one of 5ms.
+ injector.getHandler().verifyDelays(new long[] { 10, 5 });
+
+ // Verify that the timer is still present. Then remove it and verify that the list is
+ // empty.
+ assertEquals(1, AnrTimer.sizeOfTimerList());
+ assertTrue(timer.accept(t));
+ assertEquals(0, AnrTimer.sizeOfTimerList());
+ }
+
+ @Test
+ public void testExtendOversize() throws Exception {
+ // Create an immediate TestHandler.
+ TestInjector injector = new TestInjector(25);
+ TestAnrTimer timer = new TestAnrTimer(true, injector);
+ TestArg t = new TestArg(1, 1, 3);
+ assertTrue(timer.start(t, 10));
+
+ assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
+ assertEquals(1, mMessages.size());
+ Message m = mMessages.get(0);
+ assertEquals(timer.what(), m.what);
+ assertEquals(t, m.obj);
+
+ // Verify that the test handler saw two timeouts: one of 10ms and one of 10ms.
+ injector.getHandler().verifyDelays(new long[] { 10, 10 });
+
+ // Verify that the timer is still present. Then remove it and verify that the list is
+ // empty.
+ assertEquals(1, AnrTimer.sizeOfTimerList());
+ assertTrue(timer.accept(t));
+ assertEquals(0, AnrTimer.sizeOfTimerList());
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
index 769be177ce03..0f3daec263e0 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
@@ -182,7 +182,8 @@ public class AuthSessionTest {
eq(TEST_PACKAGE),
eq(TEST_REQUEST_ID),
eq(sensor.getCookie()),
- anyBoolean() /* allowBackgroundAuthentication */);
+ anyBoolean() /* allowBackgroundAuthentication */,
+ anyBoolean() /* isForLegacyFingerprintManager */);
}
final int cookie1 = session.mPreAuthInfo.eligibleSensors.get(0).getCookie();
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java
new file mode 100644
index 000000000000..f4e5faaf2103
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.biometrics;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyFloat;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anySet;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static java.util.Collections.emptySet;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.res.Resources;
+import android.hardware.biometrics.BiometricsProtoEnums;
+import android.os.UserHandle;
+
+import com.android.internal.R;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+import java.io.File;
+import java.util.function.Consumer;
+
+public class AuthenticationStatsBroadcastReceiverTest {
+
+ @Rule
+ public MockitoRule mockitoRule = MockitoJUnit.rule();
+
+ private AuthenticationStatsBroadcastReceiver mBroadcastReceiver;
+ private static final float FRR_THRESHOLD = 0.2f;
+ private static final int USER_ID_1 = 1;
+
+ @Mock
+ Context mContext;
+ @Mock
+ private Resources mResources;
+ @Mock
+ private SharedPreferences mSharedPreferences;
+ @Mock
+ private SharedPreferences.Editor mEditor;
+ @Mock
+ Intent mIntent;
+ @Mock
+ Consumer<AuthenticationStatsCollector> mCallback;
+
+ @Captor
+ private ArgumentCaptor<AuthenticationStatsCollector> mArgumentCaptor;
+
+ @Before
+ public void setUp() {
+
+ when(mContext.getResources()).thenReturn(mResources);
+ when(mResources.getFraction(eq(R.fraction.config_biometricNotificationFrrThreshold),
+ anyInt(), anyInt())).thenReturn(FRR_THRESHOLD);
+ when(mContext.getSharedPreferences(any(File.class), anyInt()))
+ .thenReturn(mSharedPreferences);
+ when(mSharedPreferences.getStringSet(anyString(), anySet())).thenReturn(emptySet());
+ when(mSharedPreferences.edit()).thenReturn(mEditor);
+ when(mEditor.putFloat(anyString(), anyFloat())).thenReturn(mEditor);
+ when(mEditor.putStringSet(anyString(), anySet())).thenReturn(mEditor);
+
+ when(mIntent.getAction()).thenReturn(Intent.ACTION_USER_UNLOCKED);
+ when(mIntent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL))
+ .thenReturn(USER_ID_1);
+
+ mBroadcastReceiver = new AuthenticationStatsBroadcastReceiver(mContext,
+ BiometricsProtoEnums.MODALITY_FINGERPRINT, mCallback);
+ }
+
+ @Test
+ public void testRegisterReceiver() {
+ verify(mContext).registerReceiver(eq(mBroadcastReceiver), any());
+ }
+
+ @Test
+ public void testOnReceive_shouldInitializeAuthenticationStatsCollector() {
+ mBroadcastReceiver.onReceive(mContext, mIntent);
+
+ // Verify AuthenticationStatsCollector is initialized
+ verify(mCallback).accept(mArgumentCaptor.capture());
+ assertThat(mArgumentCaptor.getValue()).isNotNull();
+
+ // Verify receiver is unregistered after receiving the broadcast
+ verify(mContext).unregisterReceiver(mBroadcastReceiver);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
index fa6e7f60c1b0..a11a8f53c2cb 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
@@ -104,6 +104,7 @@ public class AuthenticationStatsCollectorTest {
when(mSharedPreferences.getStringSet(anyString(), anySet())).thenReturn(emptySet());
when(mSharedPreferences.edit()).thenReturn(mEditor);
when(mEditor.putFloat(anyString(), anyFloat())).thenReturn(mEditor);
+ when(mEditor.putStringSet(anyString(), anySet())).thenReturn(mEditor);
mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
0 /* modality */, mBiometricNotification);
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 e79ac0986dc8..0230d77e8e14 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
@@ -598,7 +598,8 @@ public class BiometricServiceTest {
anyString() /* opPackageName */,
eq(TEST_REQUEST_ID),
cookieCaptor.capture() /* cookie */,
- anyBoolean() /* allowBackgroundAuthentication */);
+ anyBoolean() /* allowBackgroundAuthentication */,
+ anyBoolean() /* isForLegacyFingerprintManager */);
// onReadyForAuthentication, mAuthSession state OK
mBiometricService.mImpl.onReadyForAuthentication(TEST_REQUEST_ID, cookieCaptor.getValue());
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
index 046b01c831b5..9e5a0479ea70 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
@@ -36,6 +36,7 @@ import static org.mockito.Mockito.when;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.content.ComponentName;
+import android.hardware.biometrics.BiometricManager;
import android.hardware.biometrics.common.AuthenticateReason;
import android.hardware.biometrics.common.ICancellationSignal;
import android.hardware.biometrics.common.OperationContext;
@@ -109,6 +110,8 @@ public class FaceAuthenticationClientTest {
private ICancellationSignal mCancellationSignal;
@Mock
private AuthSessionCoordinator mAuthSessionCoordinator;
+ @Mock
+ private BiometricManager mBiometricManager;
@Captor
private ArgumentCaptor<OperationContextExt> mOperationContextCaptor;
@Captor
@@ -119,6 +122,7 @@ public class FaceAuthenticationClientTest {
@Before
public void setup() {
+ mContext.addMockSystemService(BiometricManager.class, mBiometricManager);
when(mBiometricContext.updateContext(any(), anyBoolean())).thenAnswer(
i -> i.getArgument(0));
when(mBiometricContext.getAuthSessionCoordinator()).thenReturn(mAuthSessionCoordinator);
@@ -212,11 +216,44 @@ public class FaceAuthenticationClientTest {
.onError(anyInt(), anyInt(), eq(BIOMETRIC_ERROR_CANCELED), anyInt());
}
+ @Test
+ public void testOnAuthenticatedFalseWhenListenerIsNull() throws RemoteException {
+ final FaceAuthenticationClient client = createClientWithNullListener();
+ client.start(mCallback);
+ client.onAuthenticated(new Face("friendly", 1 /* faceId */, 2 /* deviceId */),
+ false /* authenticated */, new ArrayList<>());
+
+ verify(mCallback).onClientFinished(client, true);
+ }
+
+ @Test
+ public void testOnAuthenticatedTrueWhenListenerIsNull() throws RemoteException {
+ final FaceAuthenticationClient client = createClientWithNullListener();
+ client.start(mCallback);
+ client.onAuthenticated(new Face("friendly", 1 /* faceId */, 2 /* deviceId */),
+ true /* authenticated */, new ArrayList<>());
+
+ verify(mCallback).onClientFinished(client, true);
+ }
+
private FaceAuthenticationClient createClient() throws RemoteException {
- return createClient(2 /* version */);
+ return createClient(2 /* version */, mClientMonitorCallbackConverter,
+ false /* allowBackgroundAuthentication */);
+ }
+
+ private FaceAuthenticationClient createClientWithNullListener() throws RemoteException {
+ return createClient(2 /* version */, null /* listener */,
+ true /* allowBackgroundAuthentication */);
}
private FaceAuthenticationClient createClient(int version) throws RemoteException {
+ return createClient(version, mClientMonitorCallbackConverter,
+ false /* allowBackgroundAuthentication */);
+ }
+
+ private FaceAuthenticationClient createClient(int version,
+ ClientMonitorCallbackConverter listener,
+ boolean allowBackgroundAuthentication) throws RemoteException {
when(mHal.getInterfaceVersion()).thenReturn(version);
final AidlSession aidl = new AidlSession(version, mHal, USER_ID, mHalSessionCallback);
@@ -229,11 +266,11 @@ public class FaceAuthenticationClientTest {
FaceAuthenticateOptions.AUTHENTICATE_REASON_ASSISTANT_VISIBLE)
.build();
return new FaceAuthenticationClient(mContext, () -> aidl, mToken,
- 2 /* requestId */, mClientMonitorCallbackConverter, OP_ID,
+ 2 /* requestId */, listener, OP_ID,
false /* restricted */, options, 4 /* cookie */,
false /* requireConfirmation */,
mBiometricLogger, mBiometricContext, true /* isStrongBiometric */,
- mUsageStats, null /* mLockoutCache */, false /* allowBackgroundAuthentication */,
+ mUsageStats, null /* mLockoutCache */, allowBackgroundAuthentication,
null /* sensorPrivacyManager */, 0 /* biometricStrength */) {
@Override
protected ActivityTaskManager getActivityTaskManager() {
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
index 46af90537c03..8a11e31014d5 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
@@ -392,7 +392,6 @@ public class FingerprintAuthenticationClientTest {
final ActivityManager.RunningTaskInfo topTask = new ActivityManager.RunningTaskInfo();
topTask.topActivity = new ComponentName("other", "thing");
when(mActivityTaskManager.getTasks(anyInt())).thenReturn(List.of(topTask));
- when(mHal.authenticateWithContext(anyLong(), any())).thenReturn(mCancellationSignal);
final FingerprintAuthenticationClient client = createClientWithoutBackgroundAuth();
client.start(mCallback);
@@ -406,21 +405,50 @@ public class FingerprintAuthenticationClientTest {
.onError(anyInt(), anyInt(), eq(BIOMETRIC_ERROR_CANCELED), anyInt());
}
+ @Test
+ public void testOnAuthenticatedFalseWhenListenerIsNull() throws RemoteException {
+ final FingerprintAuthenticationClient client = createClientWithNullListener();
+ client.start(mCallback);
+ client.onAuthenticated(new Fingerprint("friendly", 1 /* fingerId */,
+ 2 /* deviceId */), false /* authenticated */, new ArrayList<>());
+
+ verify(mCallback, never()).onClientFinished(eq(client), anyBoolean());
+ }
+
+ @Test
+ public void testOnAuthenticatedTrueWhenListenerIsNull() throws RemoteException {
+ final FingerprintAuthenticationClient client = createClientWithNullListener();
+ client.start(mCallback);
+ client.onAuthenticated(new Fingerprint("friendly", 1 /* fingerId */,
+ 2 /* deviceId */), true /* authenticated */, new ArrayList<>());
+
+ verify(mCallback).onClientFinished(client, true);
+ }
+
private FingerprintAuthenticationClient createClient() throws RemoteException {
- return createClient(100 /* version */, true /* allowBackgroundAuthentication */);
+ return createClient(100 /* version */, true /* allowBackgroundAuthentication */,
+ mClientMonitorCallbackConverter);
}
private FingerprintAuthenticationClient createClientWithoutBackgroundAuth()
throws RemoteException {
- return createClient(100 /* version */, false /* allowBackgroundAuthentication */);
+ return createClient(100 /* version */, false /* allowBackgroundAuthentication */,
+ mClientMonitorCallbackConverter);
}
private FingerprintAuthenticationClient createClient(int version) throws RemoteException {
- return createClient(version, true /* allowBackgroundAuthentication */);
+ return createClient(version, true /* allowBackgroundAuthentication */,
+ mClientMonitorCallbackConverter);
+ }
+
+ private FingerprintAuthenticationClient createClientWithNullListener() throws RemoteException {
+ return createClient(100 /* version */, true /* allowBackgroundAuthentication */,
+ null /* listener */);
}
private FingerprintAuthenticationClient createClient(int version,
- boolean allowBackgroundAuthentication) throws RemoteException {
+ boolean allowBackgroundAuthentication, ClientMonitorCallbackConverter listener)
+ throws RemoteException {
when(mHal.getInterfaceVersion()).thenReturn(version);
final AidlSession aidl = new AidlSession(version, mHal, USER_ID, mHalSessionCallback);
@@ -430,7 +458,7 @@ public class FingerprintAuthenticationClientTest {
.setSensorId(9)
.build();
return new FingerprintAuthenticationClient(mContext, () -> aidl, mToken,
- REQUEST_ID, mClientMonitorCallbackConverter, OP_ID,
+ REQUEST_ID, listener, OP_ID,
false /* restricted */, options, 4 /* cookie */,
false /* requireConfirmation */,
mBiometricLogger, mBiometricContext,
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
index 20d5f93a2c07..78d3a9dd9f9e 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
@@ -19,6 +19,7 @@ package com.android.server.biometrics.sensors.fingerprint.aidl;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.never;
@@ -147,6 +148,24 @@ public class FingerprintDetectClientTest {
verify(mBiometricContext).unsubscribe(same(mOperationContextCaptor.getValue()));
}
+ @Test
+ public void testWhenListenerIsNull() {
+ final AidlSession aidl = new AidlSession(0, mHal, USER_ID, mHalSessionCallback);
+ final FingerprintDetectClient client = new FingerprintDetectClient(mContext, () -> aidl,
+ mToken, 6 /* requestId */, null /* listener */,
+ new FingerprintAuthenticateOptions.Builder()
+ .setUserId(2)
+ .setSensorId(1)
+ .setOpPackageName("a-test")
+ .build(),
+ mBiometricLogger, mBiometricContext,
+ mUdfpsOverlayController, true /* isStrongBiometric */);
+ client.start(mCallback);
+ client.onInteractionDetected();
+
+ verify(mCallback).onClientFinished(eq(client), anyBoolean());
+ }
+
private FingerprintDetectClient createClient() throws RemoteException {
return createClient(200 /* version */);
}
diff --git a/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java b/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java
new file mode 100644
index 000000000000..75d71daa208d
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.media;
+
+import static com.android.media.flags.Flags.FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER;
+
+import android.content.Context;
+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 androidx.test.platform.app.InstrumentationRegistry;
+
+import com.google.common.truth.Truth;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class BluetoothRouteControllerTest {
+
+ private final BluetoothRouteController.BluetoothRoutesUpdatedListener
+ mBluetoothRoutesUpdatedListener = routes -> {
+ // Empty on purpose.
+ };
+
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
+ private Context mContext;
+
+ @Before
+ public void setUp() {
+ mContext = InstrumentationRegistry.getInstrumentation().getContext();
+ }
+
+ @Test
+ @RequiresFlagsDisabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+ public void createInstance_audioPoliciesFlagIsDisabled_createsLegacyController() {
+ BluetoothRouteController deviceRouteController =
+ BluetoothRouteController.createInstance(mContext, mBluetoothRoutesUpdatedListener);
+
+ Truth.assertThat(deviceRouteController).isInstanceOf(LegacyBluetoothRouteController.class);
+ }
+
+ @Test
+ @RequiresFlagsEnabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+ public void createInstance_audioPoliciesFlagIsEnabled_createsAudioPoliciesController() {
+ BluetoothRouteController deviceRouteController =
+ BluetoothRouteController.createInstance(mContext, mBluetoothRoutesUpdatedListener);
+
+ Truth.assertThat(deviceRouteController)
+ .isInstanceOf(AudioPoliciesBluetoothRouteController.class);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java b/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java
new file mode 100644
index 000000000000..ec4b8a804533
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.media;
+
+import static com.android.media.flags.Flags.FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER;
+
+import android.content.Context;
+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 androidx.test.platform.app.InstrumentationRegistry;
+
+import com.google.common.truth.Truth;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class DeviceRouteControllerTest {
+
+ private final DeviceRouteController.OnDeviceRouteChangedListener mOnDeviceRouteChangedListener =
+ deviceRoute -> {
+ // Empty on purpose.
+ };
+
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
+ private Context mContext;
+
+ @Before
+ public void setUp() {
+ mContext = InstrumentationRegistry.getInstrumentation().getContext();
+ }
+
+ @Test
+ @RequiresFlagsDisabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+ public void createInstance_audioPoliciesFlagIsDisabled_createsLegacyController() {
+ DeviceRouteController deviceRouteController =
+ DeviceRouteController.createInstance(mContext, mOnDeviceRouteChangedListener);
+
+ Truth.assertThat(deviceRouteController).isInstanceOf(LegacyDeviceRouteController.class);
+ }
+
+ @Test
+ @RequiresFlagsEnabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+ public void createInstance_audioPoliciesFlagIsEnabled_createsAudioPoliciesController() {
+ DeviceRouteController deviceRouteController =
+ DeviceRouteController.createInstance(mContext, mOnDeviceRouteChangedListener);
+
+ Truth.assertThat(deviceRouteController)
+ .isInstanceOf(AudioPoliciesDeviceRouteController.class);
+ }
+}
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 cb0a61533dd5..4576e9be07ad 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -22,6 +22,8 @@ import static android.app.ActivityManagerInternal.ServiceNotificationPolicy.NOT_
import static android.app.ActivityManagerInternal.ServiceNotificationPolicy.SHOW_IMMEDIATELY;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.Notification.EXTRA_ALLOW_DURING_SETUP;
+import static android.app.Notification.EXTRA_PICTURE;
+import static android.app.Notification.EXTRA_PICTURE_ICON;
import static android.app.Notification.FLAG_AUTO_CANCEL;
import static android.app.Notification.FLAG_BUBBLE;
import static android.app.Notification.FLAG_CAN_COLORIZE;
@@ -30,7 +32,6 @@ import static android.app.Notification.FLAG_NO_CLEAR;
import static android.app.Notification.FLAG_ONGOING_EVENT;
import static android.app.Notification.FLAG_ONLY_ALERT_ONCE;
import static android.app.Notification.FLAG_USER_INITIATED_JOB;
-import static android.app.Notification.GROUP_KEY_SILENT;
import static android.app.NotificationChannel.USER_LOCKED_ALLOW_BUBBLE;
import static android.app.NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED;
import static android.app.NotificationManager.BUBBLE_PREFERENCE_ALL;
@@ -89,6 +90,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STR
import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER;
import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER;
import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER;
+import static com.android.server.notification.NotificationManagerService.BITMAP_EXPIRATION_TIME_MS;
import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE;
import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_ADJUSTED;
import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_POSTED;
@@ -11285,114 +11287,142 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue();
}
- @Test
- public void testIsBigPictureWithBitmapOrIcon_notBigPicture_false() {
- Notification n = new Notification.Builder(mContext).build();
+ private NotificationRecord createBigPictureRecord(boolean isBigPictureStyle, boolean hasImage,
+ boolean isImageBitmap, boolean isExpired) {
+ Notification.Builder builder = new Notification.Builder(mContext);
+ Notification.BigPictureStyle style = new Notification.BigPictureStyle();
- assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isFalse();
- }
+ if (isBigPictureStyle && hasImage) {
+ if (isImageBitmap) {
+ style = style.bigPicture(Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888));
+ } else {
+ style = style.bigPicture(Icon.createWithResource(mContext, R.drawable.btn_plus));
+ }
+ }
+ if (isBigPictureStyle) {
+ builder.setStyle(style);
+ }
- @Test
- public void testIsBigPictureWithBitmapOrIcon_bigPictureWithBitmap_true() {
- Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
+ Notification notification = builder.setChannelId(TEST_CHANNEL_ID).build();
- Notification n = new Notification.Builder(mContext)
- .setStyle(new Notification.BigPictureStyle().bigPicture(bitmap))
- .build();
+ long timePostedMs = System.currentTimeMillis();
+ if (isExpired) {
+ timePostedMs -= BITMAP_EXPIRATION_TIME_MS;
+ }
+ StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
+ notification, UserHandle.getUserHandleForUid(mUid), null, timePostedMs);
- assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isTrue();
+ return new NotificationRecord(mContext, sbn, mTestNotificationChannel);
}
- @Test
- public void testIsBigPictureWithBitmapOrIcon_bigPictureWithIcon_true() {
- Icon icon = Icon.createWithResource(mContext, R.drawable.btn_plus);
-
- Notification n = new Notification.Builder(mContext)
- .setStyle(new Notification.BigPictureStyle().bigPicture(icon))
- .build();
-
- assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isTrue();
+ private void addRecordAndRemoveBitmaps(NotificationRecord record) {
+ mService.addNotification(record);
+ mInternalService.removeBitmaps();
+ waitForIdle();
}
@Test
- public void testIsBitmapExpired_notExpired_false() {
- final boolean result = mService.isBitmapExpired(
- /* timePosted= */ 0,
- /* timeNow= */ 1,
- /* timeToLive= */ 2);
- assertThat(result).isFalse();
+ public void testRemoveBitmaps_notBigPicture_noRepost() {
+ addRecordAndRemoveBitmaps(
+ createBigPictureRecord(
+ /* isBigPictureStyle= */ false,
+ /* hasImage= */ false,
+ /* isImageBitmap= */ false,
+ /* isExpired= */ false));
+ verify(mWorkerHandler, never())
+ .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
}
@Test
- public void testIsBitmapExpired_expired_true() {
- final boolean result = mService.isBitmapExpired(
- /* timePosted= */ 0,
- /* timeNow= */ 2,
- /* timeToLive= */ 1);
- assertThat(result).isTrue();
+ public void testRemoveBitmaps_bigPictureNoImage_noRepost() {
+ addRecordAndRemoveBitmaps(
+ createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ false,
+ /* isImageBitmap= */ false,
+ /* isExpired= */ false));
+ verify(mWorkerHandler, never())
+ .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
}
@Test
- public void testRemoveBitmapAndRepost_removeBitmapFromExtras() {
- // Create big picture NotificationRecord with bitmap
- Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
-
- Notification n = new Notification.Builder(mContext, "test")
- .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(bitmap))
- .build();
-
- StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
- n, UserHandle.getUserHandleForUid(mUid), null, 0);
-
- NotificationRecord bigPictureRecord =
- new NotificationRecord(mContext, sbn, mTestNotificationChannel);
-
- mService.removeBitmapAndRepost(bigPictureRecord);
-
- Bitmap bitmapExtra = bigPictureRecord.getNotification().extras.getParcelable(
- Notification.EXTRA_PICTURE, Bitmap.class);
- assertThat(bitmapExtra).isNull();
+ public void testRemoveBitmaps_notExpired_noRepost() {
+ addRecordAndRemoveBitmaps(
+ createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ true,
+ /* isExpired= */ false));
+ verify(mWorkerHandler, never())
+ .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
}
@Test
- public void testRemoveBitmapAndRepost_removeIconFromExtras() {
- // Create big picture NotificationRecord with Icon
- Icon icon = Icon.createWithResource(mContext, R.drawable.btn_plus);
-
- Notification n = new Notification.Builder(mContext, "test")
- .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(icon))
- .build();
-
- StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
- n, UserHandle.getUserHandleForUid(mUid), null, 0);
-
- NotificationRecord bigPictureRecord =
- new NotificationRecord(mContext, sbn, mTestNotificationChannel);
-
- mService.removeBitmapAndRepost(bigPictureRecord);
-
- Icon iconExtra = bigPictureRecord.getNotification().extras.getParcelable(
- Notification.EXTRA_PICTURE_ICON, Icon.class);
- assertThat(iconExtra).isNull();
+ public void testRemoveBitmaps_bitmapExpired_repost() {
+ addRecordAndRemoveBitmaps(
+ createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ true,
+ /* isExpired= */ true));
+ verify(mWorkerHandler, times(1))
+ .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
}
@Test
- public void testRemoveBitmapAndRepost_flagOnlyAlertOnce() {
- Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
-
- Notification n = new Notification.Builder(mContext, "test")
- .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(bitmap))
- .build();
+ public void testRemoveBitmaps_bitmapExpired_bitmapGone() {
+ NotificationRecord record = createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ true,
+ /* isExpired= */ true);
+ addRecordAndRemoveBitmaps(record);
+ assertThat(record.getNotification().extras.containsKey(EXTRA_PICTURE)).isFalse();
+ }
- StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
- n, UserHandle.getUserHandleForUid(mUid), null, 0);
+ @Test
+ public void testRemoveBitmaps_bitmapExpired_silent() {
+ NotificationRecord record = createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ true,
+ /* isExpired= */ true);
+ addRecordAndRemoveBitmaps(record);
+ assertThat(record.getNotification().flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
+ }
- NotificationRecord bigPictureRecord =
- new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+ @Test
+ public void testRemoveBitmaps_iconExpired_repost() {
+ addRecordAndRemoveBitmaps(
+ createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ false,
+ /* isExpired= */ true));
+ verify(mWorkerHandler, times(1))
+ .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
+ }
- mService.removeBitmapAndRepost(bigPictureRecord);
+ @Test
+ public void testRemoveBitmaps_iconExpired_iconGone() {
+ NotificationRecord record = createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ false,
+ /* isExpired= */ true);
+ addRecordAndRemoveBitmaps(record);
+ assertThat(record.getNotification().extras.containsKey(EXTRA_PICTURE_ICON)).isFalse();
+ }
- assertThat(n.flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
+ @Test
+ public void testRemoveBitmaps_iconExpired_silent() {
+ NotificationRecord record = createBigPictureRecord(
+ /* isBigPictureStyle= */ true,
+ /* hasImage= */ true,
+ /* isImageBitmap= */ false,
+ /* isExpired= */ true);
+ addRecordAndRemoveBitmaps(record);
+ assertThat(record.getNotification().flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
}
@Test
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 42e3383987d6..d6a38773bf6b 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -47,6 +47,8 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_MEDIA_PROJECTION"/>
+ <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"/>
+
<!-- TODO: Remove largeHeap hack when memory leak is fixed (b/123984854) -->
<application android:debuggable="true"
@@ -104,6 +106,11 @@
android:showWhenLocked="true"
android:turnScreenOn="true" />
+ <activity android:name="android.app.Activity"
+ android:exported="true"
+ android:showWhenLocked="true"
+ android:turnScreenOn="true" />
+
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="true">
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 31682bc9e879..ae587003c1c2 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
@@ -517,7 +517,7 @@ public class ActivityRecordTests extends WindowTestsBase {
// The configuration change is still sent to the activity, even if it doesn't relaunch.
final ActivityConfigurationChangeItem expected =
- ActivityConfigurationChangeItem.obtain(newConfig);
+ ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
verify(mAtm.getLifecycleManager()).scheduleTransaction(
eq(activity.app.getThread()), eq(activity.token), eq(expected));
}
@@ -597,7 +597,7 @@ public class ActivityRecordTests extends WindowTestsBase {
activity.setRequestedOrientation(requestedOrientation);
final ActivityConfigurationChangeItem expected =
- ActivityConfigurationChangeItem.obtain(newConfig);
+ ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
verify(mAtm.getLifecycleManager()).scheduleTransaction(eq(activity.app.getThread()),
eq(activity.token), eq(expected));
@@ -815,7 +815,7 @@ public class ActivityRecordTests extends WindowTestsBase {
false /* preserveWindow */, true /* ignoreStopState */);
final ActivityConfigurationChangeItem expected =
- ActivityConfigurationChangeItem.obtain(newConfig);
+ ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
verify(mAtm.getLifecycleManager()).scheduleTransaction(
eq(activity.app.getThread()), eq(activity.token), eq(expected));
} finally {
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
index ae87e38d8faf..e2bb115d5fbd 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
@@ -174,7 +174,7 @@ public class ActivityStarterTests extends WindowTestsBase {
mController = mock(ActivityStartController.class);
BackgroundActivityStartController balController =
new BackgroundActivityStartController(mAtm, mSupervisor);
- doReturn(balController).when(mController).getBackgroundActivityLaunchController();
+ doReturn(balController).when(mAtm.mTaskSupervisor).getBackgroundActivityLaunchController();
mActivityMetricsLogger = mock(ActivityMetricsLogger.class);
clearInvocations(mActivityMetricsLogger);
mAppOpsManager = mAtm.getAppOpsManager();
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
index 5341588c3992..72c3ebece242 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
@@ -237,26 +237,27 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase {
displayInfo.copyFrom(mDisplayInfo);
displayInfo.type = Display.TYPE_VIRTUAL;
DisplayContent virtualDisplay = createNewDisplay(displayInfo);
+ final KeyguardController keyguardController = mSupervisor.getKeyguardController();
// Make sure we're starting out with 2 unlocked displays
assertEquals(2, mRootWindowContainer.getChildCount());
mRootWindowContainer.forAllDisplays(displayContent -> {
assertFalse(displayContent.isKeyguardLocked());
- assertFalse(displayContent.isAodShowing());
+ assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
});
// Check that setLockScreenShown locks both displays
mAtm.setLockScreenShown(true, true);
mRootWindowContainer.forAllDisplays(displayContent -> {
assertTrue(displayContent.isKeyguardLocked());
- assertTrue(displayContent.isAodShowing());
+ assertTrue(keyguardController.isAodShowing(displayContent.mDisplayId));
});
// Check setLockScreenShown unlocking both displays
mAtm.setLockScreenShown(false, false);
mRootWindowContainer.forAllDisplays(displayContent -> {
assertFalse(displayContent.isKeyguardLocked());
- assertFalse(displayContent.isAodShowing());
+ assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
});
}
@@ -270,25 +271,26 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase {
displayInfo.displayGroupId = Display.DEFAULT_DISPLAY_GROUP + 1;
displayInfo.flags = Display.FLAG_OWN_DISPLAY_GROUP | Display.FLAG_ALWAYS_UNLOCKED;
DisplayContent newDisplay = createNewDisplay(displayInfo);
+ final KeyguardController keyguardController = mSupervisor.getKeyguardController();
// Make sure we're starting out with 2 unlocked displays
assertEquals(2, mRootWindowContainer.getChildCount());
mRootWindowContainer.forAllDisplays(displayContent -> {
assertFalse(displayContent.isKeyguardLocked());
- assertFalse(displayContent.isAodShowing());
+ assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
});
// setLockScreenShown should only lock the default display, not the virtual one
mAtm.setLockScreenShown(true, true);
assertTrue(mDefaultDisplay.isKeyguardLocked());
- assertTrue(mDefaultDisplay.isAodShowing());
+ assertTrue(keyguardController.isAodShowing(mDefaultDisplay.mDisplayId));
DisplayContent virtualDisplay = mRootWindowContainer.getDisplayContent(
newDisplay.getDisplayId());
assertNotEquals(Display.DEFAULT_DISPLAY, virtualDisplay.getDisplayId());
assertFalse(virtualDisplay.isKeyguardLocked());
- assertFalse(virtualDisplay.isAodShowing());
+ assertFalse(keyguardController.isAodShowing(virtualDisplay.mDisplayId));
}
/*
diff --git a/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java b/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
index 622e81eab611..ecd84e174615 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
@@ -16,6 +16,9 @@
package com.android.server.wm;
+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.pm.ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
@@ -361,6 +364,39 @@ public class ContentRecorderTests extends WindowTestsBase {
}
@Test
+ public void testTaskWindowingModeChanged_pip_stopsRecording() {
+ // WHEN a recording is ongoing.
+ mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+ mContentRecorder.setContentRecordingSession(mTaskSession);
+ mContentRecorder.updateRecording();
+ assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+
+ // WHEN a configuration change arrives, and the task is now pinned.
+ mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+ Configuration configuration = mTask.getConfiguration();
+ mTask.onConfigurationChanged(configuration);
+
+ // THEN recording is paused.
+ assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+ }
+
+ @Test
+ public void testTaskWindowingModeChanged_fullscreen_startsRecording() {
+ // WHEN a recording is ongoing.
+ mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+ mContentRecorder.setContentRecordingSession(mTaskSession);
+ mContentRecorder.updateRecording();
+ assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+
+ // WHEN the task is now fullscreen.
+ mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+ mContentRecorder.updateRecording();
+
+ // THEN recording is started.
+ assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+ }
+
+ @Test
public void testStartRecording_notifiesCallback_taskSession() {
// WHEN a recording is ongoing.
mContentRecorder.setContentRecordingSession(mTaskSession);
@@ -385,6 +421,45 @@ public class ContentRecorderTests extends WindowTestsBase {
}
@Test
+ public void testStartRecording_taskInPIP_recordingNotStarted() {
+ // GIVEN a task is in PIP.
+ mContentRecorder.setContentRecordingSession(mTaskSession);
+ mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+
+ // WHEN a recording tries to start.
+ mContentRecorder.updateRecording();
+
+ // THEN recording does not start.
+ assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+ }
+
+ @Test
+ public void testStartRecording_taskInSplit_recordingStarted() {
+ // GIVEN a task is in PIP.
+ mContentRecorder.setContentRecordingSession(mTaskSession);
+ mTask.setWindowingMode(WINDOWING_MODE_MULTI_WINDOW);
+
+ // WHEN a recording tries to start.
+ mContentRecorder.updateRecording();
+
+ // THEN recording does not start.
+ assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+ }
+
+ @Test
+ public void testStartRecording_taskInFullscreen_recordingStarted() {
+ // GIVEN a task is in PIP.
+ mContentRecorder.setContentRecordingSession(mTaskSession);
+ mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+
+ // WHEN a recording tries to start.
+ mContentRecorder.updateRecording();
+
+ // THEN recording does not start.
+ assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+ }
+
+ @Test
public void testOnVisibleRequestedChanged_notifiesCallback() {
// WHEN a recording is ongoing.
mContentRecorder.setContentRecordingSession(mTaskSession);
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 769a309cf5a7..1b44c01bfab5 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
@@ -573,8 +573,9 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
final ClientTransaction transaction = ClientTransaction.obtain(
mActivity.app.getThread(), mActivity.token);
- transaction.addCallback(RefreshCallbackItem.obtain(cycleThroughStop ? ON_STOP : ON_PAUSE));
- transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(
+ transaction.addCallback(RefreshCallbackItem.obtain(mActivity.token,
+ cycleThroughStop ? ON_STOP : ON_PAUSE));
+ transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(mActivity.token,
/* isForward */ false, /* shouldSendCompatFakeFocus */ false));
verify(mActivity.mAtmService.getLifecycleManager(), times(refreshRequested ? 1 : 0))
diff --git a/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java b/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java
new file mode 100644
index 000000000000..e8a847c5d8a4
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.wm;
+
+import static android.view.InputWindowHandle.USE_SURFACE_TRUSTED_OVERLAY;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
+import static org.junit.Assume.assumeTrue;
+
+import android.app.Activity;
+import android.app.Instrumentation;
+import android.os.IBinder;
+import android.platform.test.annotations.Presubmit;
+import android.server.wm.BuildUtils;
+import android.server.wm.CtsWindowInfoUtils;
+import android.view.View;
+import android.view.ViewTreeObserver;
+import android.view.WindowManager;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+@Presubmit
+public class TrustedOverlayTests {
+ private static final String TAG = "TrustedOverlayTests";
+ private static final long TIMEOUT_S = 5L * BuildUtils.HW_TIMEOUT_MULTIPLIER;
+
+ @Rule
+ public TestName mName = new TestName();
+
+ private final ActivityTestRule<Activity> mActivityRule = new ActivityTestRule<>(
+ Activity.class);
+
+ private Instrumentation mInstrumentation;
+ private Activity mActivity;
+
+ @Before
+ public void setup() {
+ mInstrumentation = InstrumentationRegistry.getInstrumentation();
+ mActivity = mActivityRule.launchActivity(null);
+ }
+
+ @Test
+ public void setTrustedOverlayInputWindow() throws InterruptedException {
+ assumeFalse(USE_SURFACE_TRUSTED_OVERLAY);
+ testTrustedOverlayChildHelper(false);
+ }
+
+ @Test
+ public void setTrustedOverlayChildLayer() throws InterruptedException {
+ assumeTrue(USE_SURFACE_TRUSTED_OVERLAY);
+ testTrustedOverlayChildHelper(true);
+ }
+
+ private void testTrustedOverlayChildHelper(boolean expectTrusted) throws InterruptedException {
+ IBinder[] tokens = new IBinder[2];
+ CountDownLatch hostTokenReady = new CountDownLatch(1);
+ mInstrumentation.runOnMainSync(() -> {
+ mActivity.getWindow().addPrivateFlags(PRIVATE_FLAG_TRUSTED_OVERLAY);
+ View rootView = mActivity.getWindow().getDecorView();
+ if (rootView.isAttachedToWindow()) {
+ tokens[0] = rootView.getWindowToken();
+ hostTokenReady.countDown();
+ } else {
+ rootView.getViewTreeObserver().addOnWindowAttachListener(
+ new ViewTreeObserver.OnWindowAttachListener() {
+ @Override
+ public void onWindowAttached() {
+ tokens[0] = rootView.getWindowToken();
+ hostTokenReady.countDown();
+ }
+
+ @Override
+ public void onWindowDetached() {
+ }
+ });
+ }
+ });
+
+ assertTrue("Failed to wait for host to get added",
+ hostTokenReady.await(TIMEOUT_S, TimeUnit.SECONDS));
+
+ mInstrumentation.runOnMainSync(() -> {
+ WindowManager wm = mActivity.getSystemService(WindowManager.class);
+
+ View childView = new View(mActivity) {
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ tokens[1] = getWindowToken();
+ }
+ };
+ WindowManager.LayoutParams params = new WindowManager.LayoutParams();
+ params.token = tokens[0];
+ params.type = TYPE_APPLICATION_PANEL;
+ wm.addView(childView, params);
+ });
+
+ boolean[] foundTrusted = new boolean[2];
+
+ CtsWindowInfoUtils.waitForWindowInfos(
+ windowInfos -> {
+ for (var windowInfo : windowInfos) {
+ if (windowInfo.windowToken == tokens[0]
+ && windowInfo.isTrustedOverlay) {
+ foundTrusted[0] = true;
+ } else if (windowInfo.windowToken == tokens[1]
+ && windowInfo.isTrustedOverlay) {
+ foundTrusted[1] = true;
+ }
+ }
+ return foundTrusted[0] && foundTrusted[1];
+ }, TIMEOUT_S, TimeUnit.SECONDS);
+
+ if (!foundTrusted[0] || !foundTrusted[1]) {
+ CtsWindowInfoUtils.dumpWindowsOnScreen(TAG, mName.getMethodName());
+ }
+
+ assertEquals("Failed to find parent window or was not marked trusted", expectTrusted,
+ foundTrusted[0]);
+ assertEquals("Failed to find child window or was not marked trusted", expectTrusted,
+ foundTrusted[1]);
+ }
+}
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java
index 3d78a1dd8943..0a70a5f9b947 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java
@@ -27,9 +27,9 @@ import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPH
import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__KEYPHRASE_TRIGGER;
import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__SERVICE_CRASH;
-import android.app.AppOpsManager;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.AppOpsManager;
import android.compat.annotation.ChangeId;
import android.compat.annotation.Disabled;
import android.content.ComponentName;
@@ -50,6 +50,7 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SharedMemory;
+import android.os.SystemProperties;
import android.provider.DeviceConfig;
import android.service.voice.HotwordDetectionService;
import android.service.voice.HotwordDetectionServiceFailure;
@@ -114,6 +115,9 @@ final class HotwordDetectionConnection {
private static final long RESET_DEBUG_HOTWORD_LOGGING_TIMEOUT_MILLIS = 60 * 60 * 1000; // 1 hour
private static final int MAX_ISOLATED_PROCESS_NUMBER = 10;
+ private static final boolean SYSPROP_VISUAL_QUERY_SERVICE_ENABLED =
+ SystemProperties.getBoolean("ro.hotword.visual_query_service_enabled", false);
+
/**
* Indicates the {@link HotwordDetectionService} is created.
*/
@@ -680,7 +684,8 @@ final class HotwordDetectionConnection {
mIntent = intent;
mDetectionServiceType = detectionServiceType;
int flags = bindInstantServiceAllowed ? Context.BIND_ALLOW_INSTANT : 0;
- if (mVisualQueryDetectionComponentName != null
+ if (SYSPROP_VISUAL_QUERY_SERVICE_ENABLED
+ && mVisualQueryDetectionComponentName != null
&& mHotwordDetectionComponentName != null) {
flags |= Context.BIND_SHARED_ISOLATED_PROCESS;
}
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index 471acc118572..6ba77da1d972 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -57,6 +57,7 @@ import android.os.RemoteCallback;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SharedMemory;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.service.voice.HotwordDetector;
import android.service.voice.IMicrophoneHotwordDetectionVoiceInteractionCallback;
@@ -96,6 +97,8 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
/** The delay time for retrying to request DirectActions. */
private static final long REQUEST_DIRECT_ACTIONS_RETRY_TIME_MS = 200;
+ private static final boolean SYSPROP_VISUAL_QUERY_SERVICE_ENABLED =
+ SystemProperties.getBoolean("ro.hotword.visual_query_service_enabled", false);
final boolean mValid;
@@ -715,7 +718,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
} else {
verifyDetectorForVisualQueryDetectionLocked(sharedMemory);
}
- if (!verifyProcessSharingLocked()) {
+ if (SYSPROP_VISUAL_QUERY_SERVICE_ENABLED && !verifyProcessSharingLocked()) {
Slog.w(TAG, "Sandboxed detection service not in shared isolated process");
throw new IllegalStateException("VisualQueryDetectionService or HotworDetectionService "
+ "not in a shared isolated process. Please make sure to set "
@@ -914,6 +917,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
if (hotwordInfo == null || visualQueryInfo == null) {
return true;
}
+ // Enforce shared isolated option is used when VisualQueryDetectionservice is enabled
return (hotwordInfo.flags & ServiceInfo.FLAG_ALLOW_SHARED_ISOLATED_PROCESS) != 0
&& (visualQueryInfo.flags & ServiceInfo.FLAG_ALLOW_SHARED_ISOLATED_PROCESS) != 0;
}
diff --git a/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java b/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
index 3870dfd17d50..4f99f14e4dc1 100644
--- a/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
+++ b/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
@@ -95,21 +95,29 @@ public class WallpaperEffectsGenerationPerUserService extends
String newTaskId = cinematicEffectRequest.getTaskId();
// Previous request is still being processed.
if (mCinematicEffectListenerWrapper != null) {
+ CinematicEffectResponse cinematicEffectResponse;
if (mCinematicEffectListenerWrapper.mTaskId.equals(newTaskId)) {
- invokeCinematicListenerAndCleanup(
- new CinematicEffectResponse.Builder(
- CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_PENDING, newTaskId)
- .build()
- );
+ cinematicEffectResponse = new CinematicEffectResponse.Builder(
+ CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_PENDING, newTaskId)
+ .build();
} else {
- invokeCinematicListenerAndCleanup(
- new CinematicEffectResponse.Builder(
- CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS,
- newTaskId).build()
- );
+ cinematicEffectResponse = new CinematicEffectResponse.Builder(
+ CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS,
+ newTaskId)
+ .build();
+ }
+ try {
+ cinematicEffectListener.onCinematicEffectGenerated(cinematicEffectResponse);
+ return;
+ } catch (RemoteException e) {
+ if (isDebug()) {
+ Slog.w(TAG, "RemoteException invoking cinematic effect listener for task["
+ + mCinematicEffectListenerWrapper.mTaskId + "]");
+ }
+ return;
}
- return;
}
+
RemoteWallpaperEffectsGenerationService remoteService = ensureRemoteServiceLocked();
if (remoteService != null) {
remoteService.executeOnResolvedService(
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index a72f7806d3ea..1f32c978fad1 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -412,6 +412,15 @@ public class TelecomManager {
"android.telecom.extra.CALL_CREATED_TIME_MILLIS";
/**
+ * Optional extra for incoming containing a long which specifies the time the
+ * call was answered by user. This value is in milliseconds.
+ * @hide
+ */
+ public static final String EXTRA_CALL_ANSWERED_TIME_MILLIS =
+ "android.telecom.extra.CALL_ANSWERED_TIME_MILLIS";
+
+
+ /**
* Optional extra for incoming and outgoing calls containing a long which specifies the Epoch
* time the call was created.
* @hide
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index 5f6c14a36d46..6130af5abdfa 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -18,6 +18,7 @@ package android.telephony.satellite;
import android.Manifest;
import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -39,6 +40,7 @@ import android.telephony.TelephonyFrameworkInitializer;
import com.android.internal.telephony.IIntegerConsumer;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.IVoidConsumer;
+import com.android.internal.telephony.flags.Flags;
import com.android.telephony.Rlog;
import java.lang.annotation.Retention;
@@ -769,6 +771,16 @@ public final class SatelliteManager {
*/
public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5;
/**
+ * The satellite modem is powered on but the device is not registered to a satellite cell.
+ */
+ @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
+ public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6;
+ /**
+ * The satellite modem is powered on and the device is registered to a satellite cell.
+ */
+ @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
+ public static final int SATELLITE_MODEM_STATE_CONNECTED = 7;
+ /**
* Satellite modem state is unknown. This generic modem state should be used only when the
* modem state cannot be mapped to other specific modem states.
*/
@@ -782,6 +794,8 @@ public final class SatelliteManager {
SATELLITE_MODEM_STATE_DATAGRAM_RETRYING,
SATELLITE_MODEM_STATE_OFF,
SATELLITE_MODEM_STATE_UNAVAILABLE,
+ SATELLITE_MODEM_STATE_NOT_CONNECTED,
+ SATELLITE_MODEM_STATE_CONNECTED,
SATELLITE_MODEM_STATE_UNKNOWN
})
@Retention(RetentionPolicy.SOURCE)
diff --git a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
index e4f94134caa1..162fe2b40104 100644
--- a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
+++ b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
@@ -46,6 +46,14 @@ enum SatelliteModemState {
*/
SATELLITE_MODEM_STATE_UNAVAILABLE = 5,
/**
+ * The satellite modem is powered on but the device is not registered to a satellite cell.
+ */
+ SATELLITE_MODEM_STATE_NOT_CONNECTED = 6,
+ /**
+ * The satellite modem is powered on and the device is registered to a satellite cell.
+ */
+ SATELLITE_MODEM_STATE_CONNECTED = 7,
+ /**
* Satellite modem state is unknown. This generic modem state should be used only when the
* modem state cannot be mapped to other specific modem states.
*/
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
index 1a65611757c0..e106f656ec64 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
@@ -18,8 +18,6 @@ package com.android.server.wm.flicker.helpers
import android.app.Instrumentation
import android.tools.common.Rotation
-import android.tools.common.traces.Condition
-import android.tools.common.traces.DeviceStateDump
import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.common.traces.component.IComponentMatcher
import android.tools.device.helpers.FIND_TIMEOUT
@@ -54,14 +52,14 @@ constructor(
launchedAppComponentMatcherOverride: IComponentMatcher?,
action: String?,
stringExtras: Map<String, String>,
- waitConditions: Array<Condition<DeviceStateDump>>
+ waitConditionsBuilder: WindowManagerStateHelper.StateSyncBuilder
) {
super.launchViaIntent(
wmHelper,
launchedAppComponentMatcherOverride,
action,
stringExtras,
- waitConditions
+ waitConditionsBuilder
)
waitIMEShown(wmHelper)
}
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
index 82d2ae098870..c30786f4e1c4 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
@@ -244,12 +244,16 @@ open class PipAppHelper(instrumentation: Instrumentation) :
action: String? = null,
stringExtras: Map<String, String>
) {
- launchViaIntentAndWaitShown(
+ launchViaIntent(
wmHelper,
launchedAppComponentMatcherOverride,
action,
stringExtras,
- waitConditions = arrayOf(ConditionsFactory.hasPipWindow())
+ waitConditionsBuilder = wmHelper
+ .StateSyncBuilder()
+ .add(ConditionsFactory.isWMStateComplete())
+ .withAppTransitionIdle()
+ .add(ConditionsFactory.hasPipWindow())
)
wmHelper
@@ -261,7 +265,7 @@ open class PipAppHelper(instrumentation: Instrumentation) :
/** Expand the PIP window back to full screen via intent and wait until the app is visible */
fun exitPipToFullScreenViaIntent(wmHelper: WindowManagerStateHelper) =
- launchViaIntentAndWaitShown(wmHelper)
+ launchViaIntent(wmHelper)
fun clickEnterPipButton(wmHelper: WindowManagerStateHelper) {
clickObject(ENTER_PIP_BUTTON_ID)
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
index c09041518296..ee22d0732eac 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
@@ -16,7 +16,6 @@
package com.android.server.wm.flicker.quickswitch
-import android.platform.test.annotations.Presubmit
import android.tools.common.NavBar
import android.tools.common.datatypes.Rect
import android.tools.common.traces.component.ComponentNameMatcher
@@ -51,6 +50,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@FlakyTest(bugId = 298544839)
class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTest(flicker) {
private val testApp1 = SimpleAppHelper(instrumentation)
private val testApp2 = NonResizeableAppHelper(instrumentation)
@@ -92,7 +92,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that the transition starts with [testApp1]'s windows filling/covering exactly the
* entirety of the display.
*/
- @Presubmit
@Test
open fun startsWithApp1WindowsCoverFullScreen() {
flicker.assertWmStart {
@@ -112,7 +111,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
}
/** Checks that the transition starts with [testApp1] being the top window. */
- @Presubmit
@Test
open fun startsWithApp1WindowBeingOnTop() {
flicker.assertWmStart { this.isAppWindowOnTop(testApp1) }
@@ -122,7 +120,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp2] windows fill the entire screen (i.e. is "fullscreen") at the end of
* the transition once we have fully quick switched from [testApp1] back to the [testApp2].
*/
- @Presubmit
@Test
open fun endsWithApp2WindowsCoveringFullScreen() {
flicker.assertWmEnd { this.visibleRegion(testApp2).coversExactly(startDisplayBounds) }
@@ -132,7 +129,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp2] layers fill the entire screen (i.e. is "fullscreen") at the end of the
* transition once we have fully quick switched from [testApp1] back to the [testApp2].
*/
- @Presubmit
@Test
open fun endsWithApp2LayersCoveringFullScreen() {
flicker.assertLayersEnd {
@@ -145,7 +141,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp2] is the top window at the end of the transition once we have fully
* quick switched from [testApp1] back to the [testApp2].
*/
- @Presubmit
@Test
open fun endsWithApp2BeingOnTop() {
flicker.assertWmEnd { this.isAppWindowOnTop(testApp2) }
@@ -155,7 +150,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp2]'s window starts off invisible and becomes visible at some point before
* the end of the transition and then stays visible until the end of the transition.
*/
- @Presubmit
@Test
open fun app2WindowBecomesAndStaysVisible() {
flicker.assertWm {
@@ -171,7 +165,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp2]'s layer starts off invisible and becomes visible at some point before
* the end of the transition and then stays visible until the end of the transition.
*/
- @Presubmit
@Test
open fun app2LayerBecomesAndStaysVisible() {
flicker.assertLayers { this.isInvisible(testApp2).then().isVisible(testApp2) }
@@ -181,7 +174,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp1]'s window starts off visible and becomes invisible at some point before
* the end of the transition and then stays invisible until the end of the transition.
*/
- @Presubmit
@Test
open fun app1WindowBecomesAndStaysInvisible() {
flicker.assertWm { this.isAppWindowVisible(testApp1).then().isAppWindowInvisible(testApp1) }
@@ -191,7 +183,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Checks that [testApp1]'s layer starts off visible and becomes invisible at some point before
* the end of the transition and then stays invisible until the end of the transition.
*/
- @Presubmit
@Test
open fun app1LayerBecomesAndStaysInvisible() {
flicker.assertLayers { this.isVisible(testApp1).then().isInvisible(testApp1) }
@@ -202,7 +193,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
* visible.
*/
- @Presubmit
@Test
open fun app2WindowIsVisibleOnceApp1WindowIsInvisible() {
flicker.assertWm {
@@ -221,7 +211,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
* Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
* visible.
*/
- @Presubmit
@Test
open fun app2LayerIsVisibleOnceApp1LayerIsInvisible() {
flicker.assertLayers {
@@ -236,7 +225,6 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
}
/** {@inheritDoc} */
- @Presubmit
@Test
override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
@@ -245,14 +233,34 @@ class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTes
@Test
override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
- @FlakyTest(bugId = 246284708)
@Test
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
super.visibleLayersShownMoreThanOneConsecutiveEntry()
- @FlakyTest(bugId = 250518877)
+ @Test override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
+
+ @Test override fun entireScreenCovered() = super.entireScreenCovered()
+
+ @Test
+ override fun navBarLayerIsVisibleAtStartAndEnd() = super.navBarLayerIsVisibleAtStartAndEnd()
+
+ @Test
+ override fun navBarWindowIsVisibleAtStartAndEnd() = super.navBarWindowIsVisibleAtStartAndEnd()
+
+ @Test
+ override fun statusBarLayerIsVisibleAtStartAndEnd() =
+ super.statusBarLayerIsVisibleAtStartAndEnd()
+
+ @Test
+ override fun statusBarLayerPositionAtStartAndEnd() = super.statusBarLayerPositionAtStartAndEnd()
+
+ @Test override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible()
+
+ @Test override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible()
+
@Test
- override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
+ override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
+ super.visibleWindowsShownMoreThanOneConsecutiveEntry()
companion object {
private var startDisplayBounds = Rect.EMPTY
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 0aaf3e8fd6c7..82bcfc2c1a8b 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -99,7 +99,7 @@ static bool isHidden(const char *root, const char *path)
String8 fullPath(root);
appendPath(fullPath, String8(path));
- FileType type = getFileType(fullPath);
+ FileType type = getFileType(fullPath.c_str());
int plen = strlen(path);
@@ -287,19 +287,19 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
Vector<String8> subtags = AaptUtil::splitAndLowerCase(part, '+');
subtags.removeItemsAt(0);
if (subtags.size() == 1) {
- setLanguage(subtags[0]);
+ setLanguage(subtags[0].c_str());
} else if (subtags.size() == 2) {
- setLanguage(subtags[0]);
+ setLanguage(subtags[0].c_str());
// The second tag can either be a region, a variant or a script.
switch (subtags[1].size()) {
case 2:
case 3:
- setRegion(subtags[1]);
+ setRegion(subtags[1].c_str());
break;
case 4:
if (isAlpha(subtags[1])) {
- setScript(subtags[1]);
+ setScript(subtags[1].c_str());
break;
}
// This is not alphabetical, so we fall through to variant
@@ -308,7 +308,7 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
case 6:
case 7:
case 8:
- setVariant(subtags[1]);
+ setVariant(subtags[1].c_str());
break;
default:
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n",
@@ -317,14 +317,14 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
}
} else if (subtags.size() == 3) {
// The language is always the first subtag.
- setLanguage(subtags[0]);
+ setLanguage(subtags[0].c_str());
// The second subtag can either be a script or a region code.
// If its size is 4, it's a script code, else it's a region code.
if (subtags[1].size() == 4) {
- setScript(subtags[1]);
+ setScript(subtags[1].c_str());
} else if (subtags[1].size() == 2 || subtags[1].size() == 3) {
- setRegion(subtags[1]);
+ setRegion(subtags[1].c_str());
} else {
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n", part.c_str());
return -1;
@@ -333,15 +333,15 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
// The third tag can either be a region code (if the second tag was
// a script), else a variant code.
if (subtags[2].size() >= 4) {
- setVariant(subtags[2]);
+ setVariant(subtags[2].c_str());
} else {
- setRegion(subtags[2]);
+ setRegion(subtags[2].c_str());
}
} else if (subtags.size() == 4) {
- setLanguage(subtags[0]);
- setScript(subtags[1]);
- setRegion(subtags[2]);
- setVariant(subtags[3]);
+ setLanguage(subtags[0].c_str());
+ setScript(subtags[1].c_str());
+ setRegion(subtags[2].c_str());
+ setVariant(subtags[3].c_str());
} else {
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name: %s\n", part.c_str());
return -1;
@@ -351,7 +351,7 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
} else {
if ((part.length() == 2 || part.length() == 3)
&& isAlpha(part) && strcmp("car", part.c_str())) {
- setLanguage(part);
+ setLanguage(part.c_str());
if (++currentIndex == size) {
return size;
}
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 800466aa587f..43a8b52f2766 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -401,7 +401,7 @@ static void printUsesImpliedPermission(const String8& name, const String8& reaso
Vector<String8> getNfcAidCategories(AssetManager& assets, const String8& xmlPath, bool offHost,
String8 *outError = NULL)
{
- Asset* aidAsset = assets.openNonAsset(xmlPath, Asset::ACCESS_BUFFER);
+ Asset* aidAsset = assets.openNonAsset(xmlPath.c_str(), Asset::ACCESS_BUFFER);
if (aidAsset == NULL) {
if (outError != NULL) *outError = "xml resource does not exist";
return Vector<String8>();
@@ -2760,7 +2760,7 @@ int doPackage(Bundle* bundle)
appendPath(dependencyFile, "R.java.d");
}
// Make sure we have a clean dependency file to start with
- fp = fopen(dependencyFile, "w");
+ fp = fopen(dependencyFile.c_str(), "w");
fclose(fp);
}
@@ -2849,7 +2849,7 @@ int doPackage(Bundle* bundle)
if (bundle->getGenDependencies()) {
// Now that writeResourceSymbols or writeAPK has taken care of writing
// the targets to our dependency file, we'll write the prereqs
- fp = fopen(dependencyFile, "a+");
+ fp = fopen(dependencyFile.c_str(), "a+");
fprintf(fp, " : ");
bool includeRaw = (outputAPKFile != NULL);
err = writeDependencyPreReqs(bundle, assets, fp, includeRaw);
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 3a198fd43d48..7e4e186ec320 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -924,7 +924,7 @@ status_t massageManifest(Bundle* bundle, ResourceTable* table, sp<XMLNode> root)
if (bundle->getCompileSdkVersion() != 0) {
if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersion",
- String8::format("%d", bundle->getCompileSdkVersion()),
+ String8::format("%d", bundle->getCompileSdkVersion()).c_str(),
errorOnFailedInsert, true)) {
return UNKNOWN_ERROR;
}
@@ -932,21 +932,21 @@ status_t massageManifest(Bundle* bundle, ResourceTable* table, sp<XMLNode> root)
if (bundle->getCompileSdkVersionCodename() != "") {
if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersionCodename",
- bundle->getCompileSdkVersionCodename(), errorOnFailedInsert, true)) {
+ bundle->getCompileSdkVersionCodename().c_str(), errorOnFailedInsert, true)) {
return UNKNOWN_ERROR;
}
}
if (bundle->getPlatformBuildVersionCode() != "") {
if (!addTagAttribute(root, "", "platformBuildVersionCode",
- bundle->getPlatformBuildVersionCode(), errorOnFailedInsert, true)) {
+ bundle->getPlatformBuildVersionCode().c_str(), errorOnFailedInsert, true)) {
return UNKNOWN_ERROR;
}
}
if (bundle->getPlatformBuildVersionName() != "") {
if (!addTagAttribute(root, "", "platformBuildVersionName",
- bundle->getPlatformBuildVersionName(), errorOnFailedInsert, true)) {
+ bundle->getPlatformBuildVersionName().c_str(), errorOnFailedInsert, true)) {
return UNKNOWN_ERROR;
}
}
@@ -1210,7 +1210,7 @@ status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& a
sp<XMLNode> manifest = XMLNode::newElement(filename, String16(), String16("manifest"));
// Add the 'package' attribute which is set to the package name.
- const char* packageName = assets->getPackage();
+ const char* packageName = assets->getPackage().c_str();
const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride();
if (manifestPackageNameOverride != NULL) {
packageName = manifestPackageNameOverride;
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 8d0268393433..1af8d6f67bd3 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -472,13 +472,13 @@ status_t StringPool::writeStringBlock(const sp<AaptFile>& pool)
ENCODE_LENGTH(strings, sizeof(uint8_t), encSize)
- strncpy((char*)strings, encStr, encSize+1);
+ strncpy((char*)strings, encStr.c_str(), encSize + 1);
} else {
char16_t* strings = (char16_t*)dat;
ENCODE_LENGTH(strings, sizeof(char16_t), strSize)
- strcpy16_htod(strings, ent.value);
+ strcpy16_htod(strings, ent.value.c_str());
}
strPos += totalSize;
@@ -592,7 +592,7 @@ ssize_t StringPool::offsetForString(const String16& val) const
ssize_t res = indices != NULL && indices->size() > 0 ? indices->itemAt(0) : -1;
if (kIsDebug) {
printf("Offset for string %s: %zd (%s)\n", String8(val).c_str(), res,
- res >= 0 ? String8(mEntries[mEntryArray[res]].value).c_str() : String8());
+ res >= 0 ? String8(mEntries[mEntryArray[res]].value).c_str() : "");
}
return res;
}
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index a887ac947835..1a648c01f631 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -559,7 +559,7 @@ status_t parseXMLResource(const sp<AaptFile>& file, ResXMLTree* outTree,
root->removeWhitespace(stripAll, cDataTags);
if (kIsDebug) {
- printf("Input XML from %s:\n", (const char*)file->getPrintableSource());
+ printf("Input XML from %s:\n", file->getPrintableSource().c_str());
root->print();
}
sp<AaptFile> rsc = new AaptFile(String8(), AaptGroupEntry(), String8());
diff --git a/tools/aapt/tests/AaptGroupEntry_test.cpp b/tools/aapt/tests/AaptGroupEntry_test.cpp
index bf5ca59a81c8..8621e9be7010 100644
--- a/tools/aapt/tests/AaptGroupEntry_test.cpp
+++ b/tools/aapt/tests/AaptGroupEntry_test.cpp
@@ -24,7 +24,7 @@ using android::String8;
static ::testing::AssertionResult TestParse(AaptGroupEntry& entry, const String8& dirName,
String8* outType) {
- if (entry.initFromDirName(dirName, outType)) {
+ if (entry.initFromDirName(dirName.c_str(), outType)) {
return ::testing::AssertionSuccess() << dirName << " was successfully parsed";
}
return ::testing::AssertionFailure() << dirName << " could not be parsed";
diff --git a/tools/aapt2/DominatorTree_test.cpp b/tools/aapt2/DominatorTree_test.cpp
index a0679a65b9fd..087f456ec084 100644
--- a/tools/aapt2/DominatorTree_test.cpp
+++ b/tools/aapt2/DominatorTree_test.cpp
@@ -50,8 +50,8 @@ class PrettyPrinter : public DominatorTree::Visitor {
private:
void VisitConfig(const DominatorTree::Node* node, const int indent) {
auto config_string = node->value()->config.toString();
- buffer_ << std::string(indent, ' ') << (config_string.empty() ? "<default>" : config_string)
- << std::endl;
+ buffer_ << std::string(indent, ' ')
+ << (config_string.empty() ? "<default>" : config_string.c_str()) << std::endl;
}
void VisitNode(const DominatorTree::Node* node, const int indent) {
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp
index 0fa13b81c4ea..70d875e394ff 100644
--- a/tools/validatekeymaps/Main.cpp
+++ b/tools/validatekeymaps/Main.cpp
@@ -165,7 +165,7 @@ static bool validateFile(const char* filename) {
case FileType::INPUT_DEVICE_CONFIGURATION: {
android::base::Result<std::unique_ptr<PropertyMap>> propertyMap =
- PropertyMap::load(String8(filename));
+ PropertyMap::load(String8(filename).c_str());
if (!propertyMap.ok()) {
error("Error parsing input device configuration file: %s.\n\n",
propertyMap.error().message().c_str());
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..6bd8595bc097
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..d5d6fb6c6ea4
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..fe8dc6906108
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..ccd8a33ab4fd
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..de84c4aa9dae
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..af9d7cf74ace
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..33daab9c401d
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 000000000000..14a799c41757
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java b/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
index d41c0197addc..bc41829f16d2 100644
--- a/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
+++ b/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
@@ -23,9 +23,11 @@ import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.res.Resources;
import android.net.wifi.sharedconnectivity.service.ISharedConnectivityCallback;
@@ -35,6 +37,7 @@ import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
+import android.os.UserManager;
import android.text.TextUtils;
import android.util.Log;
@@ -67,7 +70,7 @@ import java.util.concurrent.Executor;
@SystemApi
public class SharedConnectivityManager {
private static final String TAG = SharedConnectivityManager.class.getSimpleName();
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final class SharedConnectivityCallbackProxy extends
ISharedConnectivityCallback.Stub {
@@ -172,6 +175,7 @@ public class SharedConnectivityManager {
private final String mServicePackageName;
private final String mIntentAction;
private ServiceConnection mServiceConnection;
+ private UserManager mUserManager;
/**
* Creates a new instance of {@link SharedConnectivityManager}.
@@ -217,12 +221,14 @@ public class SharedConnectivityManager {
mContext = context;
mServicePackageName = servicePackageName;
mIntentAction = serviceIntentAction;
+ mUserManager = context.getSystemService(UserManager.class);
}
private void bind() {
mServiceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
+ if (DEBUG) Log.i(TAG, "onServiceConnected");
mService = ISharedConnectivityService.Stub.asInterface(service);
synchronized (mProxyDataLock) {
if (!mCallbackProxyCache.isEmpty()) {
@@ -253,9 +259,45 @@ public class SharedConnectivityManager {
}
};
- mContext.bindService(
+ boolean result = mContext.bindService(
new Intent().setPackage(mServicePackageName).setAction(mIntentAction),
mServiceConnection, Context.BIND_AUTO_CREATE);
+ if (!result) {
+ if (DEBUG) Log.i(TAG, "bindService failed");
+ mServiceConnection = null;
+ if (mUserManager != null && !mUserManager.isUserUnlocked()) { // In direct boot mode
+ IntentFilter intentFilter = new IntentFilter();
+ intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
+ mContext.registerReceiver(mBroadcastReceiver, intentFilter);
+ } else {
+ synchronized (mProxyDataLock) {
+ if (!mCallbackProxyCache.isEmpty()) {
+ mCallbackProxyCache.keySet().forEach(
+ callback -> callback.onRegisterCallbackFailed(
+ new IllegalStateException(
+ "Failed to bind after user unlock")));
+ mCallbackProxyCache.clear();
+ }
+ }
+ }
+ }
+ }
+
+ private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ context.unregisterReceiver(mBroadcastReceiver);
+ bind();
+ }
+ };
+
+ /**
+ * @hide
+ */
+ @TestApi
+ @NonNull
+ public BroadcastReceiver getBroadcastReceiver() {
+ return mBroadcastReceiver;
}
private void registerCallbackInternal(SharedConnectivityClientCallback callback,
@@ -357,6 +399,13 @@ public class SharedConnectivityManager {
return false;
}
+ // Try to unregister the broadcast receiver to guard against memory leaks.
+ try {
+ mContext.unregisterReceiver(mBroadcastReceiver);
+ } catch (IllegalArgumentException e) {
+ // This is fine, it means the receiver was never registered or was already unregistered.
+ }
+
if (mService == null) {
boolean shouldUnbind;
synchronized (mProxyDataLock) {