summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds/idmap2/idmap2/CommandUtils.cpp2
-rw-r--r--cmds/idmap2/idmap2/CommandUtils.h3
-rw-r--r--cmds/idmap2/idmap2d/Idmap2Service.cpp16
-rw-r--r--cmds/idmap2/include/idmap2/Idmap.h4
-rw-r--r--cmds/idmap2/libidmap2/Idmap.cpp12
-rw-r--r--cmds/statsd/src/StatsLogProcessor.cpp2
-rw-r--r--cmds/statsd/src/StatsLogProcessor.h1
-rw-r--r--cmds/statsd/src/atoms.proto177
-rw-r--r--cmds/statsd/src/guardrail/StatsdStats.h4
-rw-r--r--cmds/statsd/src/metrics/MetricsManager.cpp8
-rw-r--r--cmds/statsd/src/statsd_config.proto15
-rw-r--r--cmds/statsd/tests/StatsLogProcessor_test.cpp77
-rw-r--r--core/java/android/app/Notification.java1
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java14
-rw-r--r--core/java/android/app/usage/UsageEvents.java1
-rw-r--r--core/java/android/content/pm/LauncherApps.java32
-rw-r--r--core/java/android/content/pm/PackagePartitions.java9
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java19
-rw-r--r--core/java/android/hardware/camera2/impl/CameraDeviceImpl.java194
-rw-r--r--core/java/android/hardware/camera2/impl/CameraOfflineSessionImpl.java73
-rw-r--r--core/java/android/hardware/camera2/impl/CaptureResultExtras.java28
-rw-r--r--core/java/android/hardware/camera2/impl/RequestLastFrameNumbersHolder.java37
-rw-r--r--core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java5
-rw-r--r--core/java/android/hardware/soundtrigger/ConversionUtil.java18
-rw-r--r--core/java/android/hardware/soundtrigger/SoundTriggerModule.java2
-rw-r--r--core/java/android/net/ConnectivityDiagnosticsManager.java8
-rw-r--r--core/java/android/net/ConnectivityManager.java107
-rw-r--r--core/java/android/os/UserManager.java8
-rw-r--r--core/java/android/os/VibrationEffect.java9
-rw-r--r--core/java/android/service/autofill/augmented/FillCallback.java3
-rw-r--r--core/java/android/view/InsetsController.java14
-rw-r--r--core/java/android/view/InsetsSource.java9
-rw-r--r--core/java/android/view/InsetsSourceConsumer.java7
-rw-r--r--core/java/android/view/InsetsState.java9
-rw-r--r--core/java/android/view/SurfaceView.java63
-rw-r--r--core/java/android/view/WindowlessWindowManager.java1
-rw-r--r--core/java/android/view/contentcapture/ContentCaptureSession.java8
-rw-r--r--core/java/android/widget/SelectionActionModeHelper.java3
-rw-r--r--core/java/com/android/internal/app/ChooserActivity.java18
-rw-r--r--core/java/com/android/internal/app/ChooserListAdapter.java8
-rw-r--r--core/java/com/android/internal/app/PlatLogoActivity.java492
-rw-r--r--core/java/com/android/internal/app/ResolverListAdapter.java3
-rw-r--r--core/java/com/android/internal/view/IInputMethodManager.aidl2
-rw-r--r--core/java/com/android/internal/widget/ConversationLayout.java17
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java34
-rw-r--r--core/proto/android/stats/connectivity/Android.bp6
-rw-r--r--core/proto/android/stats/connectivity/network_stack.proto154
-rw-r--r--core/res/res/drawable-nodpi/ic_number11.xml12
-rw-r--r--core/res/res/layout-car/car_alert_dialog.xml85
-rw-r--r--core/res/res/layout-car/car_alert_dialog_button_bar.xml64
-rw-r--r--core/res/res/layout-car/car_alert_dialog_title.xml62
-rw-r--r--core/res/res/layout/notification_template_material_conversation.xml4
-rw-r--r--core/res/res/values/config.xml4
-rw-r--r--core/res/res/values/dimens.xml2
-rw-r--r--core/res/res/values/styles_device_defaults.xml7
-rw-r--r--core/res/res/values/styles_material.xml4
-rw-r--r--core/res/res/values/symbols.xml2
-rw-r--r--core/tests/coretests/src/android/view/InsetsControllerTest.java3
-rw-r--r--core/tests/coretests/src/android/view/InsetsStateTest.java9
-rw-r--r--core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java12
-rw-r--r--core/tests/coretests/src/com/android/internal/app/ChooserWrapperActivity.java5
-rw-r--r--core/tests/overlaytests/remount/Android.bp3
-rw-r--r--core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/OverlayRemountedTestBase.java1
-rw-r--r--core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/SystemPreparer.java151
-rw-r--r--libs/incident/Android.bp12
-rw-r--r--libs/incident/AndroidTest.xml6
-rw-r--r--libs/incident/TEST_MAPPING3
-rw-r--r--location/java/android/location/LocationManager.java20
-rw-r--r--media/java/android/media/IMediaRouterClient.aidl1
-rw-r--r--media/java/android/media/MediaRoute2Info.java51
-rw-r--r--media/java/android/media/MediaRoute2ProviderService.java69
-rw-r--r--media/java/android/media/MediaRouter.java47
-rw-r--r--media/java/android/media/MediaRouter2.java25
-rw-r--r--media/java/android/media/MediaRouter2Manager.java6
-rw-r--r--media/java/android/media/soundtrigger_middleware/RecognitionEvent.aidl4
-rw-r--r--media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java12
-rw-r--r--packages/CarSystemUI/res/values/colors.xml1
-rw-r--r--packages/CarSystemUI/res/values/styles.xml6
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java8
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java3
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java29
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java3
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java9
-rw-r--r--packages/OsuLogin/Android.bp1
-rw-r--r--packages/SettingsLib/res/values-ar/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-de/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-el/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-en-rAU/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-en-rCA/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-en-rGB/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-en-rIN/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-in/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-it/strings.xml12
-rw-r--r--packages/SettingsLib/res/values-pl/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-vi/strings.xml2
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java4
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java22
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InfoMediaManagerTest.java4
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java19
-rw-r--r--packages/SystemUI/docs/broadcasts.md2
-rw-r--r--packages/SystemUI/res-product/values-ne/strings.xml2
-rw-r--r--packages/SystemUI/res/layout/bubbles_manage_button_education.xml68
-rw-r--r--packages/SystemUI/res/layout/global_screenshot.xml19
-rw-r--r--packages/SystemUI/res/layout/global_screenshot_static.xml18
-rw-r--r--packages/SystemUI/res/layout/hybrid_conversation_notification.xml12
-rw-r--r--packages/SystemUI/res/layout/media_view.xml4
-rw-r--r--packages/SystemUI/res/layout/notification_conversation_info.xml12
-rw-r--r--packages/SystemUI/res/layout/notification_info.xml14
-rw-r--r--packages/SystemUI/res/layout/partial_conversation_info.xml5
-rw-r--r--packages/SystemUI/res/values-af/strings.xml5
-rw-r--r--packages/SystemUI/res/values-am/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ar/strings.xml3
-rw-r--r--packages/SystemUI/res/values-as/strings.xml5
-rw-r--r--packages/SystemUI/res/values-az/strings.xml5
-rw-r--r--packages/SystemUI/res/values-b+sr+Latn/strings.xml7
-rw-r--r--packages/SystemUI/res/values-be/strings.xml7
-rw-r--r--packages/SystemUI/res/values-bg/strings.xml9
-rw-r--r--packages/SystemUI/res/values-bn/strings.xml7
-rw-r--r--packages/SystemUI/res/values-bs/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ca/strings.xml7
-rw-r--r--packages/SystemUI/res/values-cs/strings.xml7
-rw-r--r--packages/SystemUI/res/values-da/strings.xml5
-rw-r--r--packages/SystemUI/res/values-de/strings.xml6
-rw-r--r--packages/SystemUI/res/values-el/strings.xml11
-rw-r--r--packages/SystemUI/res/values-en-rAU/strings.xml7
-rw-r--r--packages/SystemUI/res/values-en-rCA/strings.xml7
-rw-r--r--packages/SystemUI/res/values-en-rGB/strings.xml7
-rw-r--r--packages/SystemUI/res/values-en-rIN/strings.xml7
-rw-r--r--packages/SystemUI/res/values-en-rXC/strings.xml2
-rw-r--r--packages/SystemUI/res/values-es-rUS/strings.xml7
-rw-r--r--packages/SystemUI/res/values-es/strings.xml19
-rw-r--r--packages/SystemUI/res/values-et/strings.xml5
-rw-r--r--packages/SystemUI/res/values-eu/strings.xml9
-rw-r--r--packages/SystemUI/res/values-fa/strings.xml7
-rw-r--r--packages/SystemUI/res/values-fi/strings.xml5
-rw-r--r--packages/SystemUI/res/values-fr-rCA/strings.xml7
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml5
-rw-r--r--packages/SystemUI/res/values-gl/strings.xml5
-rw-r--r--packages/SystemUI/res/values-gu/strings.xml16
-rw-r--r--packages/SystemUI/res/values-hi/strings.xml11
-rw-r--r--packages/SystemUI/res/values-hr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-hu/strings.xml5
-rw-r--r--packages/SystemUI/res/values-hy/strings.xml13
-rw-r--r--packages/SystemUI/res/values-in/strings.xml5
-rw-r--r--packages/SystemUI/res/values-is/strings.xml5
-rw-r--r--packages/SystemUI/res/values-it/strings.xml9
-rw-r--r--packages/SystemUI/res/values-iw/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ka/strings.xml5
-rw-r--r--packages/SystemUI/res/values-kk/strings.xml7
-rw-r--r--packages/SystemUI/res/values-km/strings.xml7
-rw-r--r--packages/SystemUI/res/values-kn/strings.xml8
-rw-r--r--packages/SystemUI/res/values-ko/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ky/strings.xml21
-rw-r--r--packages/SystemUI/res/values-lo/strings.xml5
-rw-r--r--packages/SystemUI/res/values-lt/strings.xml11
-rw-r--r--packages/SystemUI/res/values-lv/strings.xml5
-rw-r--r--packages/SystemUI/res/values-mk/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ml/strings.xml14
-rw-r--r--packages/SystemUI/res/values-mn/strings.xml5
-rw-r--r--packages/SystemUI/res/values-mr/strings.xml12
-rw-r--r--packages/SystemUI/res/values-ms/strings.xml5
-rw-r--r--packages/SystemUI/res/values-my/strings.xml7
-rw-r--r--packages/SystemUI/res/values-nb/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ne/strings.xml16
-rw-r--r--packages/SystemUI/res/values-nl/strings.xml17
-rw-r--r--packages/SystemUI/res/values-or/strings.xml25
-rw-r--r--packages/SystemUI/res/values-pa/strings.xml8
-rw-r--r--packages/SystemUI/res/values-pl/strings.xml8
-rw-r--r--packages/SystemUI/res/values-pt-rBR/strings.xml7
-rw-r--r--packages/SystemUI/res/values-pt-rPT/strings.xml5
-rw-r--r--packages/SystemUI/res/values-pt/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ro/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ru/strings.xml9
-rw-r--r--packages/SystemUI/res/values-si/strings.xml5
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml5
-rw-r--r--packages/SystemUI/res/values-sl/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sq/strings.xml5
-rw-r--r--packages/SystemUI/res/values-sr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-sv/strings.xml5
-rw-r--r--packages/SystemUI/res/values-sw/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ta/strings.xml9
-rw-r--r--packages/SystemUI/res/values-te/strings.xml7
-rw-r--r--packages/SystemUI/res/values-th/strings.xml7
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml13
-rw-r--r--packages/SystemUI/res/values-tr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-uk/strings.xml5
-rw-r--r--packages/SystemUI/res/values-ur/strings.xml6
-rw-r--r--packages/SystemUI/res/values-uz/strings.xml5
-rw-r--r--packages/SystemUI/res/values-vi/strings.xml7
-rw-r--r--packages/SystemUI/res/values-zh-rCN/strings.xml5
-rw-r--r--packages/SystemUI/res/values-zh-rHK/strings.xml5
-rw-r--r--packages/SystemUI/res/values-zh-rTW/strings.xml7
-rw-r--r--packages/SystemUI/res/values-zu/strings.xml5
-rw-r--r--packages/SystemUI/res/values/colors.xml4
-rw-r--r--packages/SystemUI/res/values/dimens.xml6
-rw-r--r--packages/SystemUI/res/values/styles.xml7
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java16
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt53
-rw-r--r--packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/broadcast/logging/BroadcastDispatcherLogger.kt117
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java45
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleManageEducationView.java24
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java74
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java19
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/BroadcastDispatcherLog.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt50
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt42
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt225
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java188
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshotLegacy.java567
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java54
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java35
-rw-r--r--packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java91
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java70
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java24
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java20
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt17
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/broadcast/UserBroadcastDispatcherTest.kt66
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt80
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt179
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt1
-rw-r--r--packages/Tethering/TEST_MAPPING7
-rw-r--r--packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java38
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java33
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java10
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/TetheringNotificationUpdater.java22
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/EntitlementManagerTest.java53
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java10
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringNotificationUpdaterTest.kt27
-rw-r--r--services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java7
-rw-r--r--services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java4
-rw-r--r--services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java5
-rw-r--r--services/core/java/android/content/pm/PackageManagerInternal.java10
-rw-r--r--services/core/java/com/android/server/AppStateTracker.java3
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java2
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java20
-rw-r--r--services/core/java/com/android/server/adb/AdbDebuggingManager.java29
-rw-r--r--services/core/java/com/android/server/adb/AdbService.java7
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java23
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java29
-rw-r--r--services/core/java/com/android/server/am/ProcessRecord.java10
-rw-r--r--services/core/java/com/android/server/am/UserController.java17
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java26
-rw-r--r--services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java6
-rw-r--r--services/core/java/com/android/server/location/LocationManagerService.java15
-rw-r--r--services/core/java/com/android/server/media/BluetoothRouteProvider.java20
-rw-r--r--services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java48
-rw-r--r--services/core/java/com/android/server/media/MediaRouterService.java16
-rw-r--r--services/core/java/com/android/server/net/NetworkStatsSubscriptionsMonitor.java8
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java14
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java26
-rw-r--r--services/core/java/com/android/server/pm/PackageSettingBase.java5
-rw-r--r--services/core/java/com/android/server/pm/TEST_MAPPING3
-rw-r--r--services/core/java/com/android/server/pm/UserSystemPackageInstaller.java3
-rw-r--r--services/core/java/com/android/server/power/Notifier.java1
-rw-r--r--services/core/java/com/android/server/slice/SliceClientPermissions.java6
-rw-r--r--services/core/java/com/android/server/slice/SlicePermissionManager.java2
-rw-r--r--services/core/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java23
-rw-r--r--services/core/java/com/android/server/stats/pull/StatsPullAtomService.java27
-rw-r--r--services/core/java/com/android/server/textclassifier/FixedSizeQueue.java103
-rw-r--r--services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java27
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java9
-rw-r--r--services/core/java/com/android/server/wm/AppTransitionController.java25
-rw-r--r--services/core/java/com/android/server/wm/Dimmer.java7
-rw-r--r--services/core/java/com/android/server/wm/InsetsSourceProvider.java2
-rw-r--r--services/core/java/com/android/server/wm/InsetsStateController.java1
-rw-r--r--services/core/java/com/android/server/wm/RecentTasks.java11
-rw-r--r--services/core/java/com/android/server/wm/ShellRoot.java2
-rw-r--r--services/core/java/com/android/server/wm/Task.java26
-rw-r--r--services/core/java/com/android/server/wm/WindowContainer.java133
-rw-r--r--services/core/java/com/android/server/wm/WindowContainerThumbnail.java5
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java14
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java55
-rw-r--r--services/net/java/android/net/ip/IpClientCallbacks.java23
-rw-r--r--services/net/java/android/net/ip/IpClientUtil.java3
-rw-r--r--services/net/java/android/net/util/DhcpResultsCompatUtil.java54
-rw-r--r--services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java8
-rw-r--r--services/tests/PackageManagerServiceTests/host/Android.bp33
-rw-r--r--services/tests/PackageManagerServiceTests/host/AndroidTest.xml26
-rw-r--r--services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/HostUtils.kt46
-rw-r--r--services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/OriginalPackageMigrationTest.kt98
-rw-r--r--services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/Partition.kt31
-rw-r--r--services/tests/PackageManagerServiceTests/host/test-apps/Android.bp33
-rw-r--r--services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestOriginalOverride.xml25
-rw-r--r--services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion1.xml21
-rw-r--r--services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion2.xml21
-rw-r--r--services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion3.xml21
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java17
-rw-r--r--services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java88
-rw-r--r--services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java53
-rw-r--r--services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java19
-rw-r--r--services/tests/servicestests/src/com/android/server/people/prediction/ShareTargetPredictorTest.java62
-rw-r--r--services/tests/servicestests/src/com/android/server/textclassifier/FixedSizeQueueTest.java109
-rwxr-xr-xservices/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java224
-rw-r--r--services/tests/wmtests/AndroidManifest.xml2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java12
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DimmerTests.java14
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskStackChangedListenerTest.java23
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java41
-rw-r--r--telephony/common/com/android/internal/telephony/CarrierAppUtils.java8
-rw-r--r--telephony/java/android/telephony/CellIdentityLte.java2
-rw-r--r--telephony/java/android/telephony/CellIdentityNr.java2
-rw-r--r--tests/net/java/com/android/server/net/NetworkStatsSubscriptionsMonitorTest.java218
-rw-r--r--tests/utils/hostutils/Android.bp28
-rw-r--r--tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java362
-rw-r--r--wifi/Android.bp12
-rw-r--r--wifi/java/android/net/wifi/SoftApCapability.java8
-rw-r--r--wifi/java/android/net/wifi/SoftApConfiguration.java38
-rw-r--r--wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java10
344 files changed, 5892 insertions, 2733 deletions
diff --git a/cmds/idmap2/idmap2/CommandUtils.cpp b/cmds/idmap2/idmap2/CommandUtils.cpp
index e058cd6e7e70..8f5845bf2e53 100644
--- a/cmds/idmap2/idmap2/CommandUtils.cpp
+++ b/cmds/idmap2/idmap2/CommandUtils.cpp
@@ -29,7 +29,7 @@ using android::idmap2::Result;
using android::idmap2::Unit;
Result<Unit> Verify(const std::string& idmap_path, const std::string& target_path,
- const std::string& overlay_path, uint32_t fulfilled_policies,
+ const std::string& overlay_path, PolicyBitmask fulfilled_policies,
bool enforce_overlayable) {
SYSTRACE << "Verify " << idmap_path;
std::ifstream fin(idmap_path);
diff --git a/cmds/idmap2/idmap2/CommandUtils.h b/cmds/idmap2/idmap2/CommandUtils.h
index 99605de30988..e717e046d15d 100644
--- a/cmds/idmap2/idmap2/CommandUtils.h
+++ b/cmds/idmap2/idmap2/CommandUtils.h
@@ -17,12 +17,13 @@
#ifndef IDMAP2_IDMAP2_COMMAND_UTILS_H_
#define IDMAP2_IDMAP2_COMMAND_UTILS_H_
+#include "idmap2/PolicyUtils.h"
#include "idmap2/Result.h"
android::idmap2::Result<android::idmap2::Unit> Verify(const std::string& idmap_path,
const std::string& target_path,
const std::string& overlay_path,
- uint32_t fulfilled_policies,
+ PolicyBitmask fulfilled_policies,
bool enforce_overlayable);
#endif // IDMAP2_IDMAP2_COMMAND_UTILS_H_
diff --git a/cmds/idmap2/idmap2d/Idmap2Service.cpp b/cmds/idmap2/idmap2d/Idmap2Service.cpp
index 908d96612269..f95b73f17222 100644
--- a/cmds/idmap2/idmap2d/Idmap2Service.cpp
+++ b/cmds/idmap2/idmap2d/Idmap2Service.cpp
@@ -70,12 +70,12 @@ PolicyBitmask ConvertAidlArgToPolicyBitmask(int32_t arg) {
}
Status GetCrc(const std::string& apk_path, uint32_t* out_crc) {
- const auto overlay_zip = ZipFile::Open(apk_path);
- if (!overlay_zip) {
+ const auto zip = ZipFile::Open(apk_path);
+ if (!zip) {
return error(StringPrintf("failed to open apk %s", apk_path.c_str()));
}
- const auto crc = GetPackageCrc(*overlay_zip);
+ const auto crc = GetPackageCrc(*zip);
if (!crc) {
return error(crc.GetErrorMessage());
}
@@ -121,6 +121,7 @@ Status Idmap2Service::verifyIdmap(const std::string& target_apk_path,
bool* _aidl_return) {
SYSTRACE << "Idmap2Service::verifyIdmap " << overlay_apk_path;
assert(_aidl_return);
+
const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path);
std::ifstream fin(idmap_path);
const std::unique_ptr<const IdmapHeader> header = IdmapHeader::FromBinaryStream(fin);
@@ -156,13 +157,10 @@ Status Idmap2Service::verifyIdmap(const std::string& target_apk_path,
auto up_to_date =
header->IsUpToDate(target_apk_path.c_str(), overlay_apk_path.c_str(), target_crc, overlay_crc,
- fulfilled_policies, enforce_overlayable);
- if (!up_to_date) {
- *_aidl_return = false;
- return error(up_to_date.GetErrorMessage());
- }
+ ConvertAidlArgToPolicyBitmask(fulfilled_policies), enforce_overlayable);
- return ok();
+ *_aidl_return = static_cast<bool>(up_to_date);
+ return *_aidl_return ? ok() : error(up_to_date.GetErrorMessage());
}
Status Idmap2Service::createIdmap(const std::string& target_apk_path,
diff --git a/cmds/idmap2/include/idmap2/Idmap.h b/cmds/idmap2/include/idmap2/Idmap.h
index 8f25b8d6a734..0f05592b70f3 100644
--- a/cmds/idmap2/include/idmap2/Idmap.h
+++ b/cmds/idmap2/include/idmap2/Idmap.h
@@ -141,9 +141,9 @@ class IdmapHeader {
// field *must* be incremented. Because of this, we know that if the idmap
// header is up-to-date the entire file is up-to-date.
Result<Unit> IsUpToDate(const char* target_path, const char* overlay_path,
- uint32_t fulfilled_policies, bool enforce_overlayable) const;
+ PolicyBitmask fulfilled_policies, bool enforce_overlayable) const;
Result<Unit> IsUpToDate(const char* target_path, const char* overlay_path, uint32_t target_crc,
- uint32_t overlay_crc, uint32_t fulfilled_policies,
+ uint32_t overlay_crc, PolicyBitmask fulfilled_policies,
bool enforce_overlayable) const;
void accept(Visitor* v) const;
diff --git a/cmds/idmap2/libidmap2/Idmap.cpp b/cmds/idmap2/libidmap2/Idmap.cpp
index 0bea21735b24..23c25a7089de 100644
--- a/cmds/idmap2/libidmap2/Idmap.cpp
+++ b/cmds/idmap2/libidmap2/Idmap.cpp
@@ -115,8 +115,7 @@ std::unique_ptr<const IdmapHeader> IdmapHeader::FromBinaryStream(std::istream& s
uint8_t enforce_overlayable;
if (!Read32(stream, &idmap_header->magic_) || !Read32(stream, &idmap_header->version_) ||
!Read32(stream, &idmap_header->target_crc_) || !Read32(stream, &idmap_header->overlay_crc_) ||
- !Read32(stream, &idmap_header->fulfilled_policies_) ||
- !Read8(stream, &enforce_overlayable) ||
+ !Read32(stream, &idmap_header->fulfilled_policies_) || !Read8(stream, &enforce_overlayable) ||
!ReadString256(stream, idmap_header->target_path_) ||
!ReadString256(stream, idmap_header->overlay_path_)) {
return nullptr;
@@ -134,7 +133,8 @@ std::unique_ptr<const IdmapHeader> IdmapHeader::FromBinaryStream(std::istream& s
}
Result<Unit> IdmapHeader::IsUpToDate(const char* target_path, const char* overlay_path,
- uint32_t fulfilled_policies, bool enforce_overlayable) const {
+ PolicyBitmask fulfilled_policies,
+ bool enforce_overlayable) const {
const std::unique_ptr<const ZipFile> target_zip = ZipFile::Open(target_path);
if (!target_zip) {
return Error("failed to open target %s", target_path);
@@ -161,7 +161,8 @@ Result<Unit> IdmapHeader::IsUpToDate(const char* target_path, const char* overla
Result<Unit> IdmapHeader::IsUpToDate(const char* target_path, const char* overlay_path,
uint32_t target_crc, uint32_t overlay_crc,
- uint32_t fulfilled_policies, bool enforce_overlayable) const {
+ PolicyBitmask fulfilled_policies,
+ bool enforce_overlayable) const {
if (magic_ != kIdmapMagic) {
return Error("bad magic: actual 0x%08x, expected 0x%08x", magic_, kIdmapMagic);
}
@@ -187,8 +188,7 @@ Result<Unit> IdmapHeader::IsUpToDate(const char* target_path, const char* overla
if (enforce_overlayable != enforce_overlayable_) {
return Error("bad enforce overlayable: idmap version %s, file system version %s",
- enforce_overlayable ? "true" : "false",
- enforce_overlayable_ ? "true" : "false");
+ enforce_overlayable ? "true" : "false", enforce_overlayable_ ? "true" : "false");
}
if (strcmp(target_path, target_path_) != 0) {
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
index 095dd1e9be59..e7b32c56551a 100644
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ b/cmds/statsd/src/StatsLogProcessor.cpp
@@ -529,7 +529,9 @@ void StatsLogProcessor::OnConfigUpdatedLocked(
VLOG("StatsdConfig valid");
} else {
// If there is any error in the config, don't use it.
+ // Remove any existing config with the same key.
ALOGE("StatsdConfig NOT valid");
+ mMetricsManagers.erase(key);
}
}
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index 7090bd46635d..23f2584655b0 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -284,6 +284,7 @@ private:
FRIEND_TEST(StatsLogProcessorTest, TestRateLimitByteSize);
FRIEND_TEST(StatsLogProcessorTest, TestRateLimitBroadcast);
FRIEND_TEST(StatsLogProcessorTest, TestDropWhenByteSizeTooLarge);
+ FRIEND_TEST(StatsLogProcessorTest, InvalidConfigRemoved);
FRIEND_TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead);
FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBoot);
FRIEND_TEST(StatsLogProcessorTest, TestActivationOnBootMultipleActivations);
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index e2fd511a222b..2bbce11da2ff 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -193,7 +193,7 @@ message Atom {
BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
- UiEventReported ui_event_reported = 90 [(module) = "framework"];
+ UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"];
BatteryHealthSnapshot battery_health_snapshot = 91;
SlowIo slow_io = 92;
BatteryCausedShutdown battery_caused_shutdown = 93;
@@ -419,7 +419,7 @@ message Atom {
DisplayJankReported display_jank_reported = 257;
AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"];
SharesheetStarted sharesheet_started = 259 [(module) = "framework"];
- RankingSelected ranking_selected = 260 [(module) = "framework"];
+ RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"];
TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"];
LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"];
PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"];
@@ -465,6 +465,11 @@ message Atom {
288 [(module) = "car"];
CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported =
289 [(module) = "car"];
+ NetworkIpProvisioningReported network_ip_provisioning_reported =
+ 290 [(module) = "network_stack"];
+ NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"];
+ NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"];
+ NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"];
// StatsdStats tracks platform atoms with ids upto 500.
// Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
@@ -6822,6 +6827,172 @@ message NetworkDnsEventReported {
}
/**
+ * logs the CapportApiData info
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
+ */
+message CapportApiData {
+ // The TTL of the network connection provided by captive portal
+ optional int32 remaining_ttl_secs = 1;
+
+ // The limit traffic data of the network connection provided by captive portal
+ optional int32 remaining_bytes = 2;
+
+ // Is portal url option included in the DHCP packet (Yes, No)
+ optional bool has_portal_url = 3;
+
+ // Is venue info (e.g. store info, maps, flight status) included (Yes, No)
+ optional bool has_venue_info = 4;
+}
+
+/**
+ * logs a network Probe Event
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
+ */
+message ProbeEvent {
+ // The probe type (http or https, or captive portal API...)
+ optional android.stats.connectivity.ProbeType probe_type = 1;
+
+ // The latency in microseconds of the probe event
+ optional int32 latency_micros = 2;
+
+ // The result of the probe event
+ optional android.stats.connectivity.ProbeResult probe_result = 3;
+
+ // The CaptivePortal API info
+ optional CapportApiData capport_api_data = 4;
+}
+
+/**
+ * log each ProbeEvent in ProbeEvents
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
+ */
+message ProbeEvents {
+ // Record probe event during the validation
+ repeated ProbeEvent probe_event = 1;
+}
+
+/**
+ * The DHCP (Dynamic Host Configuration Protocol) session info
+ * Logged from:
+ * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
+ */
+message DhcpSession {
+ // The DHCP Feature(s) enabled in this session
+ repeated android.stats.connectivity.DhcpFeature used_features = 1;
+
+ // The discover packet (re)transmit count
+ optional int32 discover_count = 2;
+
+ // The request packet (re)transmit count
+ optional int32 request_count = 3;
+
+ // The IPv4 address conflict count
+ // (only be meaningful when duplicate address detection is enabled)
+ optional int32 conflict_count = 4;
+
+ // The DHCP packet parsing error code in this session
+ // (defined in android.net.metrics.DhcpErrorEvent)
+ repeated android.stats.connectivity.DhcpErrorCode error_code = 5;
+
+ // The result of DHCP hostname transliteration
+ optional android.stats.connectivity.HostnameTransResult ht_result = 6;
+}
+
+/**
+ * Logs Network IP provisioning event
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java
+ */
+message NetworkIpProvisioningReported {
+ // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
+ optional android.stats.connectivity.TransportType transport_type = 1;
+
+ // The latency in microseconds of IP Provisioning over IPV4
+ optional int32 ipv4_latency_micros = 2;
+
+ // The latency in microseconds of IP Provisioning over IPV6
+ optional int32 ipv6_latency_micros = 3;
+
+ // The time duration between provisioning start and end (success or failure)
+ optional int64 provisioning_duration_micros = 4;
+
+ // The specific disconnect reason for this IP provisioning
+ optional android.stats.connectivity.DisconnectCode disconnect_code = 5;
+
+ // Log DHCP session info (Only valid for IPv4)
+ optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES];
+
+ // The random number between 0 ~ 999 for sampling
+ optional int32 random_number = 7;
+}
+
+/**
+ * Logs Network DHCP Renew event
+ * Logged from:
+ * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
+ */
+message NetworkDhcpRenewReported {
+ // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
+ optional android.stats.connectivity.TransportType transport_type = 1;
+
+ // The request packet (re)transmit count
+ optional int32 request_count = 2;
+
+ // The latency in microseconds of DHCP Renew
+ optional int32 latency_micros = 3;
+
+ // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent
+ optional android.stats.connectivity.DhcpErrorCode error_code = 4;
+
+ // The result of DHCP renew
+ optional android.stats.connectivity.DhcpRenewResult renew_result = 5;
+
+ // The random number between 0 ~ 999 for sampling
+ optional int32 random_number = 6;
+}
+
+/**
+ * Logs Network Validation event
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
+ */
+message NetworkValidationReported {
+ // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
+ optional android.stats.connectivity.TransportType transport_type = 1;
+
+ // Record each probe event
+ optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES];
+
+ // The result of the network validation
+ optional android.stats.connectivity.ValidationResult validation_result = 3;
+
+ // The latency in microseconds of network validation
+ optional int32 latency_micros = 4;
+
+ // The validation index (the first validation attempt or second, third...)
+ optional int32 validation_index = 5;
+
+ // The random number between 0 ~ 999 for sampling
+ optional int32 random_number = 6;
+}
+
+/**
+ * Logs NetworkStack Quirk event
+ * Logged from:
+ * packages/modules/NetworkStack/src/com/android/networkstack/
+ */
+message NetworkStackQuirkReported {
+ // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
+ optional android.stats.connectivity.TransportType transport_type = 1;
+
+ // Record each Quirk event
+ optional android.stats.connectivity.NetworkQuirkEvent event = 2;
+}
+
+/**
* Logs when a data stall event occurs.
*
* Log from:
@@ -9829,7 +10000,7 @@ message GnssStats {
optional int64 time_to_first_fix_reports = 3;
// Total pulled reported time to first fix (in milli-seconds) since boot
- optional int64 time_to_first_fix_milli_s = 4;
+ optional int64 time_to_first_fix_millis = 4;
// Number of position accuracy reports since boot
optional int64 position_accuracy_reports = 5;
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index 8587e1452543..9d46dcea1896 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -101,7 +101,7 @@ public:
// Per atom dimension key size limit
static const std::map<int, std::pair<size_t, size_t>> kAtomDimensionKeySizeLimitMap;
- const static int kMaxConfigCountPerUid = 10;
+ const static int kMaxConfigCountPerUid = 20;
const static int kMaxAlertCountPerConfig = 100;
const static int kMaxConditionCountPerConfig = 300;
const static int kMaxMetricCountPerConfig = 1000;
@@ -660,6 +660,8 @@ private:
FRIEND_TEST(StatsdStatsTest, TestAtomMetricsStats);
FRIEND_TEST(StatsdStatsTest, TestActivationBroadcastGuardrailHit);
FRIEND_TEST(StatsdStatsTest, TestAtomErrorStats);
+
+ FRIEND_TEST(StatsLogProcessorTest, InvalidConfigRemoved);
};
} // namespace statsd
diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp
index e8c575a1adea..7e825efddb75 100644
--- a/cmds/statsd/src/metrics/MetricsManager.cpp
+++ b/cmds/statsd/src/metrics/MetricsManager.cpp
@@ -361,8 +361,12 @@ void MetricsManager::onDumpReport(const int64_t dumpTimeStampNs,
protoOutput->end(token);
}
- mLastReportTimeNs = dumpTimeStampNs;
- mLastReportWallClockNs = getWallClockNs();
+ // Do not update the timestamps when data is not cleared to avoid timestamps from being
+ // misaligned.
+ if (erase_data) {
+ mLastReportTimeNs = dumpTimeStampNs;
+ mLastReportWallClockNs = getWallClockNs();
+ }
VLOG("=========================Metric Reports End==========================");
}
diff --git a/cmds/statsd/src/statsd_config.proto b/cmds/statsd/src/statsd_config.proto
index 72decf2c7bd0..acdffd3d4712 100644
--- a/cmds/statsd/src/statsd_config.proto
+++ b/cmds/statsd/src/statsd_config.proto
@@ -198,6 +198,9 @@ message EventMetric {
optional int64 condition = 3;
repeated MetricConditionLink links = 4;
+
+ reserved 100;
+ reserved 101;
}
message CountMetric {
@@ -218,6 +221,9 @@ message CountMetric {
repeated MetricStateLink state_link = 9;
optional FieldMatcher dimensions_in_condition = 7 [deprecated = true];
+
+ reserved 100;
+ reserved 101;
}
message DurationMetric {
@@ -245,6 +251,9 @@ message DurationMetric {
optional TimeUnit bucket = 7;
optional FieldMatcher dimensions_in_condition = 8 [deprecated = true];
+
+ reserved 100;
+ reserved 101;
}
message GaugeMetric {
@@ -281,6 +290,9 @@ message GaugeMetric {
optional int32 max_pull_delay_sec = 13 [default = 30];
optional bool split_bucket_for_app_upgrade = 14 [default = true];
+
+ reserved 100;
+ reserved 101;
}
message ValueMetric {
@@ -333,6 +345,9 @@ message ValueMetric {
optional bool split_bucket_for_app_upgrade = 17 [default = true];
optional FieldMatcher dimensions_in_condition = 9 [deprecated = true];
+
+ reserved 100;
+ reserved 101;
}
message Alert {
diff --git a/cmds/statsd/tests/StatsLogProcessor_test.cpp b/cmds/statsd/tests/StatsLogProcessor_test.cpp
index 076f32752223..13d977fa2563 100644
--- a/cmds/statsd/tests/StatsLogProcessor_test.cpp
+++ b/cmds/statsd/tests/StatsLogProcessor_test.cpp
@@ -324,6 +324,41 @@ TEST(StatsLogProcessorTest, TestPullUidProviderSetOnConfigUpdate) {
EXPECT_EQ(pullerManager->mPullUidProviders.find(key), pullerManager->mPullUidProviders.end());
}
+TEST(StatsLogProcessorTest, InvalidConfigRemoved) {
+ // Setup simple config key corresponding to empty config.
+ StatsdStats::getInstance().reset();
+ sp<UidMap> m = new UidMap();
+ sp<StatsPullerManager> pullerManager = new StatsPullerManager();
+ m->updateMap(1, {1, 2}, {1, 2}, {String16("v1"), String16("v2")},
+ {String16("p1"), String16("p2")}, {String16(""), String16("")});
+ sp<AlarmMonitor> anomalyAlarmMonitor;
+ sp<AlarmMonitor> subscriberAlarmMonitor;
+ StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
+ [](const ConfigKey& key) { return true; },
+ [](const int&, const vector<int64_t>&) {return true;});
+ ConfigKey key(3, 4);
+ StatsdConfig config = MakeConfig(true);
+ p.OnConfigUpdated(0, key, config);
+ EXPECT_EQ(1, p.mMetricsManagers.size());
+ EXPECT_NE(p.mMetricsManagers.find(key), p.mMetricsManagers.end());
+ // Cannot assert the size of mConfigStats since it is static and does not get cleared on reset.
+ EXPECT_NE(StatsdStats::getInstance().mConfigStats.end(),
+ StatsdStats::getInstance().mConfigStats.find(key));
+ EXPECT_EQ(0, StatsdStats::getInstance().mIceBox.size());
+
+ StatsdConfig invalidConfig = MakeConfig(true);
+ invalidConfig.clear_allowed_log_source();
+ p.OnConfigUpdated(0, key, invalidConfig);
+ EXPECT_EQ(0, p.mMetricsManagers.size());
+ // The current configs should not contain the invalid config.
+ EXPECT_EQ(StatsdStats::getInstance().mConfigStats.end(),
+ StatsdStats::getInstance().mConfigStats.find(key));
+ // Both "config" and "invalidConfig" should be in the icebox.
+ EXPECT_EQ(2, StatsdStats::getInstance().mIceBox.size());
+
+}
+
+
TEST(StatsLogProcessorTest, TestActiveConfigMetricDiskWriteRead) {
int uid = 1111;
@@ -1796,6 +1831,48 @@ TEST(StatsLogProcessorTest_mapIsolatedUidToHostUid, LogIsolatedUidAttributionCha
EXPECT_EQ(field2, actualFieldValues->at(5).mValue.int_value);
}
+TEST(StatsLogProcessorTest, TestDumpReportWithoutErasingDataDoesNotUpdateTimestamp) {
+ int hostUid = 20;
+ int isolatedUid = 30;
+ sp<MockUidMap> mockUidMap = makeMockUidMapForOneHost(hostUid, {isolatedUid});
+ ConfigKey key(3, 4);
+ StatsdConfig config = MakeConfig(false);
+ sp<StatsLogProcessor> processor =
+ CreateStatsLogProcessor(1, 1, config, key, nullptr, 0, mockUidMap);
+ vector<uint8_t> bytes;
+
+ int64_t dumpTime1Ns = 1 * NS_PER_SEC;
+ processor->onDumpReport(key, dumpTime1Ns, false /* include_current_bucket */,
+ true /* erase_data */, ADB_DUMP, FAST, &bytes);
+
+ ConfigMetricsReportList output;
+ output.ParseFromArray(bytes.data(), bytes.size());
+ EXPECT_EQ(output.reports_size(), 1);
+ EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime1Ns);
+
+ int64_t dumpTime2Ns = 5 * NS_PER_SEC;
+ processor->onDumpReport(key, dumpTime2Ns, false /* include_current_bucket */,
+ false /* erase_data */, ADB_DUMP, FAST, &bytes);
+
+ // Check that the dump report without clearing data is successful.
+ output.ParseFromArray(bytes.data(), bytes.size());
+ EXPECT_EQ(output.reports_size(), 1);
+ EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime2Ns);
+ EXPECT_EQ(output.reports(0).last_report_elapsed_nanos(), dumpTime1Ns);
+
+ int64_t dumpTime3Ns = 10 * NS_PER_SEC;
+ processor->onDumpReport(key, dumpTime3Ns, false /* include_current_bucket */,
+ true /* erase_data */, ADB_DUMP, FAST, &bytes);
+
+ // Check that the previous dump report that didn't clear data did not overwrite the first dump's
+ // timestamps.
+ output.ParseFromArray(bytes.data(), bytes.size());
+ EXPECT_EQ(output.reports_size(), 1);
+ EXPECT_EQ(output.reports(0).current_report_elapsed_nanos(), dumpTime3Ns);
+ EXPECT_EQ(output.reports(0).last_report_elapsed_nanos(), dumpTime1Ns);
+
+}
+
#else
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index f881616fd35a..0e3f35e358c0 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -7495,6 +7495,7 @@ public class Notification implements Parcelable
mHistoricMessages = Message.getMessagesFromBundleArray(histMessages);
mIsGroupConversation = extras.getBoolean(EXTRA_IS_GROUP_CONVERSATION);
mUnreadMessageCount = extras.getInt(EXTRA_CONVERSATION_UNREAD_MESSAGE_COUNT);
+ mShortcutIcon = extras.getParcelable(EXTRA_CONVERSATION_ICON);
}
/**
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index c65064324c8c..1f90e401dee5 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -5868,12 +5868,22 @@ public class DevicePolicyManager {
* returned by {@link #getParentProfileInstance(ComponentName)}, where the caller must be
* the profile owner of an organization-owned managed profile.
* <p>
- * If the caller is device owner or called on the parent instance, then the
- * restriction will be applied to all users.
+ * If the caller is device owner, then the restriction will be applied to all users. If
+ * called on the parent instance, then the restriction will be applied on the personal profile.
* <p>
* The calling device admin must have requested
* {@link DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA} to be able to call this method; if it has
* not, a security exception will be thrown.
+ * <p>
+ * <b>Note</b>, this policy type is deprecated for legacy device admins since
+ * {@link android.os.Build.VERSION_CODES#Q}. On Android
+ * {@link android.os.Build.VERSION_CODES#Q} devices, legacy device admins targeting SDK
+ * version {@link android.os.Build.VERSION_CODES#P} or below can still call this API to
+ * disable camera, while legacy device admins targeting SDK version
+ * {@link android.os.Build.VERSION_CODES#Q} will receive a SecurityException. Starting
+ * from Android {@link android.os.Build.VERSION_CODES#R}, requests to disable camera from
+ * legacy device admins targeting SDK version {@link android.os.Build.VERSION_CODES#P} or
+ * below will be silently ignored.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param disabled Whether or not the camera should be disabled.
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index 0f999ad68a62..3522b1b8aff5 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -133,6 +133,7 @@ public final class UsageEvents implements Parcelable {
/**
* An event type denoting that a component was in the foreground when the stats
* rolled-over. This is effectively treated as a {@link #ACTIVITY_PAUSED}.
+ * This event has a non-null packageName, and a null className.
* {@hide}
*/
public static final int END_OF_DAY = 3;
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index bd1ee27ece9e..1a694b34474a 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -1243,14 +1243,7 @@ public class LauncherApps {
private ParcelFileDescriptor getUriShortcutIconFd(@NonNull String packageName,
@NonNull String shortcutId, int userId) {
- String uri = null;
- try {
- uri = mService.getShortcutIconUri(mContext.getPackageName(), packageName, shortcutId,
- userId);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
-
+ String uri = getShortcutIconUri(packageName, shortcutId, userId);
if (uri == null) {
return null;
}
@@ -1262,6 +1255,18 @@ public class LauncherApps {
}
}
+ private String getShortcutIconUri(@NonNull String packageName,
+ @NonNull String shortcutId, int userId) {
+ String uri = null;
+ try {
+ uri = mService.getShortcutIconUri(mContext.getPackageName(), packageName, shortcutId,
+ userId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ return uri;
+ }
+
/**
* Returns the icon for this shortcut, without any badging for the profile.
*
@@ -1357,6 +1362,17 @@ public class LauncherApps {
} catch (IOException ignore) {
}
}
+ } else if (shortcut.hasIconUri()) {
+ String uri = getShortcutIconUri(shortcut.getPackage(), shortcut.getId(),
+ shortcut.getUserId());
+ if (uri == null) {
+ return null;
+ }
+ if (shortcut.hasAdaptiveBitmap()) {
+ return Icon.createWithAdaptiveBitmapContentUri(uri);
+ } else {
+ return Icon.createWithContentUri(uri);
+ }
} else if (shortcut.hasIconResource()) {
return Icon.createWithResource(shortcut.getPackage(), shortcut.getIconResourceId());
} else {
diff --git a/core/java/android/content/pm/PackagePartitions.java b/core/java/android/content/pm/PackagePartitions.java
index 653b9ec9e8f2..98a20f73a120 100644
--- a/core/java/android/content/pm/PackagePartitions.java
+++ b/core/java/android/content/pm/PackagePartitions.java
@@ -183,17 +183,20 @@ public class PackagePartitions {
/** Returns whether the partition contains the specified file in its priv-app folder. */
public boolean containsPrivApp(@NonNull File scanFile) {
- return FileUtils.contains(mPrivAppFolder.getFile(), canonicalize(scanFile));
+ return mPrivAppFolder != null
+ && FileUtils.contains(mPrivAppFolder.getFile(), canonicalize(scanFile));
}
/** Returns whether the partition contains the specified file in its app folder. */
public boolean containsApp(@NonNull File scanFile) {
- return FileUtils.contains(mAppFolder.getFile(), canonicalize(scanFile));
+ return mAppFolder != null
+ && FileUtils.contains(mAppFolder.getFile(), canonicalize(scanFile));
}
/** Returns whether the partition contains the specified file in its overlay folder. */
public boolean containsOverlay(@NonNull File scanFile) {
- return FileUtils.contains(mOverlayFolder.getFile(), canonicalize(scanFile));
+ return mOverlayFolder != null
+ && FileUtils.contains(mOverlayFolder.getFile(), canonicalize(scanFile));
}
}
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 6bbc37a90fae..7f834afd7b30 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -586,13 +586,27 @@ public final class CameraManager {
* priority when accessing the camera, and this method will succeed even if the camera device is
* in use by another camera API client. Any lower-priority application that loses control of the
* camera in this way will receive an
- * {@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected} callback.</p>
+ * {@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected} callback.
+ * Opening the same camera ID twice in the same application will similarly cause the
+ * {@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected} callback
+ * being fired for the {@link CameraDevice} from the first open call and all ongoing tasks
+ * being droppped.</p>
*
* <p>Once the camera is successfully opened, {@link CameraDevice.StateCallback#onOpened} will
* be invoked with the newly opened {@link CameraDevice}. The camera device can then be set up
* for operation by calling {@link CameraDevice#createCaptureSession} and
* {@link CameraDevice#createCaptureRequest}</p>
*
+ * <p>Before API level 30, when the application tries to open multiple {@link CameraDevice} of
+ * different IDs and the device does not support opening such combination, either the
+ * {@link #openCamera} will fail and throw a {@link CameraAccessException} or one or more of
+ * already opened {@link CameraDevice} will be disconnected and receive
+ * {@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected} callback. Which
+ * behavior will happen depends on the device implementation and can vary on different devices.
+ * Starting in API level 30, if the device does not support the combination of cameras being
+ * opened, it is guaranteed the {@link #openCamera} call will fail and none of existing
+ * {@link CameraDevice} will be disconnected.</p>
+ *
* <!--
* <p>Since the camera device will be opened asynchronously, any asynchronous operations done
* on the returned CameraDevice instance will be queued up until the device startup has
@@ -618,7 +632,8 @@ public final class CameraManager {
* {@code null} to use the current thread's {@link android.os.Looper looper}.
*
* @throws CameraAccessException if the camera is disabled by device policy,
- * has been disconnected, or is being used by a higher-priority camera API client.
+ * has been disconnected, is being used by a higher-priority camera API client, or the device
+ * has reached its maximal resource and cannot open this camera device.
*
* @throws IllegalArgumentException if cameraId or the callback was null,
* or the cameraId does not match any currently or previously available
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index 23c86029f3be..6d49add65c5b 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -1072,7 +1072,7 @@ public class CameraDeviceImpl extends CameraDevice
* @param lastFrameNumber last frame number returned from binder.
* @param repeatingRequestTypes the repeating requests' types.
*/
- private void checkEarlyTriggerSequenceCompleteLocked(
+ private void checkEarlyTriggerSequenceComplete(
final int requestId, final long lastFrameNumber,
final int[] repeatingRequestTypes) {
// lastFrameNumber being equal to NO_FRAMES_CAPTURED means that the request
@@ -1212,7 +1212,7 @@ public class CameraDeviceImpl extends CameraDevice
if (repeating) {
if (mRepeatingRequestId != REQUEST_ID_NONE) {
- checkEarlyTriggerSequenceCompleteLocked(mRepeatingRequestId,
+ checkEarlyTriggerSequenceComplete(mRepeatingRequestId,
requestInfo.getLastFrameNumber(),
mRepeatingRequestTypes);
}
@@ -1269,7 +1269,7 @@ public class CameraDeviceImpl extends CameraDevice
return;
}
- checkEarlyTriggerSequenceCompleteLocked(requestId, lastFrameNumber, requestTypes);
+ checkEarlyTriggerSequenceComplete(requestId, lastFrameNumber, requestTypes);
}
}
}
@@ -1302,7 +1302,7 @@ public class CameraDeviceImpl extends CameraDevice
long lastFrameNumber = mRemoteDevice.flush();
if (mRepeatingRequestId != REQUEST_ID_NONE) {
- checkEarlyTriggerSequenceCompleteLocked(mRepeatingRequestId, lastFrameNumber,
+ checkEarlyTriggerSequenceComplete(mRepeatingRequestId, lastFrameNumber,
mRepeatingRequestTypes);
mRepeatingRequestId = REQUEST_ID_NONE;
mRepeatingRequestTypes = null;
@@ -1442,135 +1442,78 @@ public class CameraDeviceImpl extends CameraDevice
long completedFrameNumber = mFrameNumberTracker.getCompletedFrameNumber();
long completedReprocessFrameNumber = mFrameNumberTracker.getCompletedReprocessFrameNumber();
long completedZslStillFrameNumber = mFrameNumberTracker.getCompletedZslStillFrameNumber();
-
+ boolean isReprocess = false;
Iterator<RequestLastFrameNumbersHolder> iter = mRequestLastFrameNumbersList.iterator();
while (iter.hasNext()) {
final RequestLastFrameNumbersHolder requestLastFrameNumbers = iter.next();
+ boolean sequenceCompleted = false;
final int requestId = requestLastFrameNumbers.getRequestId();
final CaptureCallbackHolder holder;
- if (mRemoteDevice == null) {
- Log.w(TAG, "Camera closed while checking sequences");
- return;
- }
- if (!requestLastFrameNumbers.isSequenceCompleted()) {
- long lastRegularFrameNumber =
- requestLastFrameNumbers.getLastRegularFrameNumber();
- long lastReprocessFrameNumber =
- requestLastFrameNumbers.getLastReprocessFrameNumber();
- long lastZslStillFrameNumber =
- requestLastFrameNumbers.getLastZslStillFrameNumber();
- if (lastRegularFrameNumber <= completedFrameNumber
- && lastReprocessFrameNumber <= completedReprocessFrameNumber
- && lastZslStillFrameNumber <= completedZslStillFrameNumber) {
- Log.v(TAG, String.format(
- "Mark requestId %d as completed, because lastRegularFrame %d "
- + "is <= %d, lastReprocessFrame %d is <= %d, "
- + "lastZslStillFrame %d is <= %d", requestId,
- lastRegularFrameNumber, completedFrameNumber,
- lastReprocessFrameNumber, completedReprocessFrameNumber,
- lastZslStillFrameNumber, completedZslStillFrameNumber));
- requestLastFrameNumbers.markSequenceCompleted();
+ synchronized(mInterfaceLock) {
+ if (mRemoteDevice == null) {
+ Log.w(TAG, "Camera closed while checking sequences");
+ return;
}
- // Call onCaptureSequenceCompleted
int index = mCaptureCallbackMap.indexOfKey(requestId);
holder = (index >= 0) ?
mCaptureCallbackMap.valueAt(index) : null;
- if (holder != null && requestLastFrameNumbers.isSequenceCompleted()) {
- Runnable resultDispatch = new Runnable() {
- @Override
- public void run() {
- if (!CameraDeviceImpl.this.isClosed()){
- if (DEBUG) {
- Log.d(TAG, String.format(
- "fire sequence complete for request %d",
- requestId));
- }
-
- holder.getCallback().onCaptureSequenceCompleted(
- CameraDeviceImpl.this,
- requestId,
- requestLastFrameNumbers.getLastFrameNumber());
- }
+ if (holder != null) {
+ long lastRegularFrameNumber =
+ requestLastFrameNumbers.getLastRegularFrameNumber();
+ long lastReprocessFrameNumber =
+ requestLastFrameNumbers.getLastReprocessFrameNumber();
+ long lastZslStillFrameNumber =
+ requestLastFrameNumbers.getLastZslStillFrameNumber();
+ // check if it's okay to remove request from mCaptureCallbackMap
+ if (lastRegularFrameNumber <= completedFrameNumber
+ && lastReprocessFrameNumber <= completedReprocessFrameNumber
+ && lastZslStillFrameNumber <= completedZslStillFrameNumber) {
+ sequenceCompleted = true;
+ mCaptureCallbackMap.removeAt(index);
+ if (DEBUG) {
+ Log.v(TAG, String.format(
+ "Remove holder for requestId %d, because lastRegularFrame %d "
+ + "is <= %d, lastReprocessFrame %d is <= %d, "
+ + "lastZslStillFrame %d is <= %d", requestId,
+ lastRegularFrameNumber, completedFrameNumber,
+ lastReprocessFrameNumber, completedReprocessFrameNumber,
+ lastZslStillFrameNumber, completedZslStillFrameNumber));
}
- };
- final long ident = Binder.clearCallingIdentity();
- try {
- holder.getExecutor().execute(resultDispatch);
- } finally {
- Binder.restoreCallingIdentity(ident);
}
}
}
- if (requestLastFrameNumbers.isSequenceCompleted() &&
- requestLastFrameNumbers.isInflightCompleted()) {
- int index = mCaptureCallbackMap.indexOfKey(requestId);
- if (index >= 0) {
- mCaptureCallbackMap.removeAt(index);
- }
- if (DEBUG) {
- Log.v(TAG, String.format(
- "Remove holder for requestId %d", requestId));
- }
+ // If no callback is registered for this requestId or sequence completed, remove it
+ // from the frame number->request pair because it's not needed anymore.
+ if (holder == null || sequenceCompleted) {
iter.remove();
}
- }
- }
-
- private void removeCompletedCallbackHolderLocked(long lastCompletedRegularFrameNumber,
- long lastCompletedReprocessFrameNumber, long lastCompletedZslStillFrameNumber) {
- if (DEBUG) {
- Log.v(TAG, String.format("remove completed callback holders for "
- + "lastCompletedRegularFrameNumber %d, "
- + "lastCompletedReprocessFrameNumber %d, "
- + "lastCompletedZslStillFrameNumber %d",
- lastCompletedRegularFrameNumber,
- lastCompletedReprocessFrameNumber,
- lastCompletedZslStillFrameNumber));
- }
-
- Iterator<RequestLastFrameNumbersHolder> iter = mRequestLastFrameNumbersList.iterator();
- while (iter.hasNext()) {
- final RequestLastFrameNumbersHolder requestLastFrameNumbers = iter.next();
- final int requestId = requestLastFrameNumbers.getRequestId();
- final CaptureCallbackHolder holder;
- if (mRemoteDevice == null) {
- Log.w(TAG, "Camera closed while removing completed callback holders");
- return;
- }
- long lastRegularFrameNumber =
- requestLastFrameNumbers.getLastRegularFrameNumber();
- long lastReprocessFrameNumber =
- requestLastFrameNumbers.getLastReprocessFrameNumber();
- long lastZslStillFrameNumber =
- requestLastFrameNumbers.getLastZslStillFrameNumber();
-
- if (lastRegularFrameNumber <= lastCompletedRegularFrameNumber
- && lastReprocessFrameNumber <= lastCompletedReprocessFrameNumber
- && lastZslStillFrameNumber <= lastCompletedZslStillFrameNumber) {
+ // Call onCaptureSequenceCompleted
+ if (sequenceCompleted) {
+ Runnable resultDispatch = new Runnable() {
+ @Override
+ public void run() {
+ if (!CameraDeviceImpl.this.isClosed()){
+ if (DEBUG) {
+ Log.d(TAG, String.format(
+ "fire sequence complete for request %d",
+ requestId));
+ }
- if (requestLastFrameNumbers.isSequenceCompleted()) {
- int index = mCaptureCallbackMap.indexOfKey(requestId);
- if (index >= 0) {
- mCaptureCallbackMap.removeAt(index);
- }
- if (DEBUG) {
- Log.v(TAG, String.format(
- "Remove holder for requestId %d, because lastRegularFrame %d "
- + "is <= %d, lastReprocessFrame %d is <= %d, "
- + "lastZslStillFrame %d is <= %d", requestId,
- lastRegularFrameNumber, lastCompletedRegularFrameNumber,
- lastReprocessFrameNumber, lastCompletedReprocessFrameNumber,
- lastZslStillFrameNumber, lastCompletedZslStillFrameNumber));
- }
- iter.remove();
- } else {
- if (DEBUG) {
- Log.v(TAG, "Sequence not yet completed for request id " + requestId);
+ holder.getCallback().onCaptureSequenceCompleted(
+ CameraDeviceImpl.this,
+ requestId,
+ requestLastFrameNumbers.getLastFrameNumber());
+ }
}
- requestLastFrameNumbers.markInflightCompleted();
+ };
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ holder.getExecutor().execute(resultDispatch);
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
}
}
@@ -1759,12 +1702,6 @@ public class CameraDeviceImpl extends CameraDevice
return;
}
- // Remove all capture callbacks now that device has gone to IDLE state.
- removeCompletedCallbackHolderLocked(
- Long.MAX_VALUE, /*lastCompletedRegularFrameNumber*/
- Long.MAX_VALUE, /*lastCompletedReprocessFrameNumber*/
- Long.MAX_VALUE /*lastCompletedZslStillFrameNumber*/);
-
if (!CameraDeviceImpl.this.mIdle) {
final long ident = Binder.clearCallingIdentity();
try {
@@ -1810,7 +1747,7 @@ public class CameraDeviceImpl extends CameraDevice
return;
}
- checkEarlyTriggerSequenceCompleteLocked(mRepeatingRequestId, lastFrameNumber,
+ checkEarlyTriggerSequenceComplete(mRepeatingRequestId, lastFrameNumber,
mRepeatingRequestTypes);
// Check if there is already a new repeating request
if (mRepeatingRequestId == repeatingRequestId) {
@@ -1829,18 +1766,9 @@ public class CameraDeviceImpl extends CameraDevice
public void onCaptureStarted(final CaptureResultExtras resultExtras, final long timestamp) {
int requestId = resultExtras.getRequestId();
final long frameNumber = resultExtras.getFrameNumber();
- final long lastCompletedRegularFrameNumber =
- resultExtras.getLastCompletedRegularFrameNumber();
- final long lastCompletedReprocessFrameNumber =
- resultExtras.getLastCompletedReprocessFrameNumber();
- final long lastCompletedZslFrameNumber =
- resultExtras.getLastCompletedZslFrameNumber();
if (DEBUG) {
- Log.d(TAG, "Capture started for id " + requestId + " frame number " + frameNumber
- + ": completedRegularFrameNumber " + lastCompletedRegularFrameNumber
- + ", completedReprocessFrameNUmber " + lastCompletedReprocessFrameNumber
- + ", completedZslFrameNumber " + lastCompletedZslFrameNumber);
+ Log.d(TAG, "Capture started for id " + requestId + " frame number " + frameNumber);
}
final CaptureCallbackHolder holder;
@@ -1856,12 +1784,6 @@ public class CameraDeviceImpl extends CameraDevice
return;
}
- // Check if it's okay to remove completed callbacks from mCaptureCallbackMap.
- // A callback is completed if the corresponding inflight request has been removed
- // from the inflight queue in cameraservice.
- removeCompletedCallbackHolderLocked(lastCompletedRegularFrameNumber,
- lastCompletedReprocessFrameNumber, lastCompletedZslFrameNumber);
-
// Get the callback for this frame ID, if there is one
holder = CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId);
diff --git a/core/java/android/hardware/camera2/impl/CameraOfflineSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraOfflineSessionImpl.java
index 413caf5e22e0..1d9d644c9306 100644
--- a/core/java/android/hardware/camera2/impl/CameraOfflineSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraOfflineSessionImpl.java
@@ -182,12 +182,6 @@ public class CameraOfflineSessionImpl extends CameraOfflineSession
return;
}
- // Remove all capture callbacks now that device has gone to IDLE state.
- removeCompletedCallbackHolderLocked(
- Long.MAX_VALUE, /*lastCompletedRegularFrameNumber*/
- Long.MAX_VALUE, /*lastCompletedReprocessFrameNumber*/
- Long.MAX_VALUE /*lastCompletedZslStillFrameNumber*/);
-
Runnable idleDispatch = new Runnable() {
@Override
public void run() {
@@ -210,22 +204,10 @@ public class CameraOfflineSessionImpl extends CameraOfflineSession
public void onCaptureStarted(final CaptureResultExtras resultExtras, final long timestamp) {
int requestId = resultExtras.getRequestId();
final long frameNumber = resultExtras.getFrameNumber();
- final long lastCompletedRegularFrameNumber =
- resultExtras.getLastCompletedRegularFrameNumber();
- final long lastCompletedReprocessFrameNumber =
- resultExtras.getLastCompletedReprocessFrameNumber();
- final long lastCompletedZslFrameNumber =
- resultExtras.getLastCompletedZslFrameNumber();
final CaptureCallbackHolder holder;
synchronized(mInterfaceLock) {
- // Check if it's okay to remove completed callbacks from mCaptureCallbackMap.
- // A callback is completed if the corresponding inflight request has been removed
- // from the inflight queue in cameraservice.
- removeCompletedCallbackHolderLocked(lastCompletedRegularFrameNumber,
- lastCompletedReprocessFrameNumber, lastCompletedZslFrameNumber);
-
// Get the callback for this frame ID, if there is one
holder = CameraOfflineSessionImpl.this.mCaptureCallbackMap.get(requestId);
@@ -619,61 +601,6 @@ public class CameraOfflineSessionImpl extends CameraOfflineSession
}
}
- private void removeCompletedCallbackHolderLocked(long lastCompletedRegularFrameNumber,
- long lastCompletedReprocessFrameNumber, long lastCompletedZslStillFrameNumber) {
- if (DEBUG) {
- Log.v(TAG, String.format("remove completed callback holders for "
- + "lastCompletedRegularFrameNumber %d, "
- + "lastCompletedReprocessFrameNumber %d, "
- + "lastCompletedZslStillFrameNumber %d",
- lastCompletedRegularFrameNumber,
- lastCompletedReprocessFrameNumber,
- lastCompletedZslStillFrameNumber));
- }
-
- boolean isReprocess = false;
- Iterator<RequestLastFrameNumbersHolder> iter =
- mOfflineRequestLastFrameNumbersList.iterator();
- while (iter.hasNext()) {
- final RequestLastFrameNumbersHolder requestLastFrameNumbers = iter.next();
- final int requestId = requestLastFrameNumbers.getRequestId();
- final CaptureCallbackHolder holder;
-
- int index = mCaptureCallbackMap.indexOfKey(requestId);
- holder = (index >= 0) ?
- mCaptureCallbackMap.valueAt(index) : null;
- if (holder != null) {
- long lastRegularFrameNumber =
- requestLastFrameNumbers.getLastRegularFrameNumber();
- long lastReprocessFrameNumber =
- requestLastFrameNumbers.getLastReprocessFrameNumber();
- long lastZslStillFrameNumber =
- requestLastFrameNumbers.getLastZslStillFrameNumber();
- if (lastRegularFrameNumber <= lastCompletedRegularFrameNumber
- && lastReprocessFrameNumber <= lastCompletedReprocessFrameNumber
- && lastZslStillFrameNumber <= lastCompletedZslStillFrameNumber) {
- if (requestLastFrameNumbers.isSequenceCompleted()) {
- mCaptureCallbackMap.removeAt(index);
- if (DEBUG) {
- Log.v(TAG, String.format(
- "Remove holder for requestId %d, because lastRegularFrame %d "
- + "is <= %d, lastReprocessFrame %d is <= %d, "
- + "lastZslStillFrame %d is <= %d", requestId,
- lastRegularFrameNumber, lastCompletedRegularFrameNumber,
- lastReprocessFrameNumber, lastCompletedReprocessFrameNumber,
- lastZslStillFrameNumber, lastCompletedZslStillFrameNumber));
- }
-
- iter.remove();
- } else {
- Log.e(TAG, "Sequence not yet completed for request id " + requestId);
- continue;
- }
- }
- }
- }
- }
-
public void notifyFailedSwitch() {
synchronized(mInterfaceLock) {
Runnable switchFailDispatch = new Runnable() {
diff --git a/core/java/android/hardware/camera2/impl/CaptureResultExtras.java b/core/java/android/hardware/camera2/impl/CaptureResultExtras.java
index 5d9da73fd5c0..1ff5bd562f2e 100644
--- a/core/java/android/hardware/camera2/impl/CaptureResultExtras.java
+++ b/core/java/android/hardware/camera2/impl/CaptureResultExtras.java
@@ -30,9 +30,6 @@ public class CaptureResultExtras implements Parcelable {
private int partialResultCount;
private int errorStreamId;
private String errorPhysicalCameraId;
- private long lastCompletedRegularFrameNumber;
- private long lastCompletedReprocessFrameNumber;
- private long lastCompletedZslFrameNumber;
public static final @android.annotation.NonNull Parcelable.Creator<CaptureResultExtras> CREATOR =
new Parcelable.Creator<CaptureResultExtras>() {
@@ -54,9 +51,7 @@ public class CaptureResultExtras implements Parcelable {
public CaptureResultExtras(int requestId, int subsequenceId, int afTriggerId,
int precaptureTriggerId, long frameNumber,
int partialResultCount, int errorStreamId,
- String errorPhysicalCameraId, long lastCompletedRegularFrameNumber,
- long lastCompletedReprocessFrameNumber,
- long lastCompletedZslFrameNumber) {
+ String errorPhysicalCameraId) {
this.requestId = requestId;
this.subsequenceId = subsequenceId;
this.afTriggerId = afTriggerId;
@@ -65,9 +60,6 @@ public class CaptureResultExtras implements Parcelable {
this.partialResultCount = partialResultCount;
this.errorStreamId = errorStreamId;
this.errorPhysicalCameraId = errorPhysicalCameraId;
- this.lastCompletedRegularFrameNumber = lastCompletedRegularFrameNumber;
- this.lastCompletedReprocessFrameNumber = lastCompletedReprocessFrameNumber;
- this.lastCompletedZslFrameNumber = lastCompletedZslFrameNumber;
}
@Override
@@ -90,9 +82,6 @@ public class CaptureResultExtras implements Parcelable {
} else {
dest.writeBoolean(false);
}
- dest.writeLong(lastCompletedRegularFrameNumber);
- dest.writeLong(lastCompletedReprocessFrameNumber);
- dest.writeLong(lastCompletedZslFrameNumber);
}
public void readFromParcel(Parcel in) {
@@ -107,9 +96,6 @@ public class CaptureResultExtras implements Parcelable {
if (errorPhysicalCameraIdPresent) {
errorPhysicalCameraId = in.readString();
}
- lastCompletedRegularFrameNumber = in.readLong();
- lastCompletedReprocessFrameNumber = in.readLong();
- lastCompletedZslFrameNumber = in.readLong();
}
public String getErrorPhysicalCameraId() {
@@ -143,16 +129,4 @@ public class CaptureResultExtras implements Parcelable {
public int getErrorStreamId() {
return errorStreamId;
}
-
- public long getLastCompletedRegularFrameNumber() {
- return lastCompletedRegularFrameNumber;
- }
-
- public long getLastCompletedReprocessFrameNumber() {
- return lastCompletedReprocessFrameNumber;
- }
-
- public long getLastCompletedZslFrameNumber() {
- return lastCompletedZslFrameNumber;
- }
}
diff --git a/core/java/android/hardware/camera2/impl/RequestLastFrameNumbersHolder.java b/core/java/android/hardware/camera2/impl/RequestLastFrameNumbersHolder.java
index 0ee4ebc1aa87..bd1df9e1ac7d 100644
--- a/core/java/android/hardware/camera2/impl/RequestLastFrameNumbersHolder.java
+++ b/core/java/android/hardware/camera2/impl/RequestLastFrameNumbersHolder.java
@@ -38,10 +38,6 @@ public class RequestLastFrameNumbersHolder {
// The last ZSL still capture frame number for this request ID. It's
// CaptureCallback.NO_FRAMES_CAPTURED if the request ID has no zsl request.
private final long mLastZslStillFrameNumber;
- // Whether the sequence is completed. (only consider capture result)
- private boolean mSequenceCompleted;
- // Whether the inflight request is completed. (consider result, buffers, and notifies)
- private boolean mInflightCompleted;
/**
* Create a request-last-frame-numbers holder with a list of requests, request ID, and
@@ -93,8 +89,6 @@ public class RequestLastFrameNumbersHolder {
mLastReprocessFrameNumber = lastReprocessFrameNumber;
mLastZslStillFrameNumber = lastZslStillFrameNumber;
mRequestId = requestInfo.getRequestId();
- mSequenceCompleted = false;
- mInflightCompleted = false;
}
/**
@@ -143,8 +137,6 @@ public class RequestLastFrameNumbersHolder {
mLastZslStillFrameNumber = lastZslStillFrameNumber;
mLastReprocessFrameNumber = CameraCaptureSession.CaptureCallback.NO_FRAMES_CAPTURED;
mRequestId = requestId;
- mSequenceCompleted = false;
- mInflightCompleted = false;
}
/**
@@ -185,34 +177,5 @@ public class RequestLastFrameNumbersHolder {
public int getRequestId() {
return mRequestId;
}
-
- /**
- * Return whether the capture sequence is completed.
- */
- public boolean isSequenceCompleted() {
- return mSequenceCompleted;
- }
-
- /**
- * Mark the capture sequence as completed.
- */
- public void markSequenceCompleted() {
- mSequenceCompleted = true;
- }
-
- /**
- * Return whether the inflight capture is completed.
- */
- public boolean isInflightCompleted() {
- return mInflightCompleted;
- }
-
- /**
- * Mark the inflight capture as completed.
- */
- public void markInflightCompleted() {
- mInflightCompleted = true;
- }
-
}
diff --git a/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java b/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
index fdd578c419d8..fbc9ac3229c3 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
@@ -109,12 +109,11 @@ public class LegacyCameraDevice implements AutoCloseable {
}
if (holder == null) {
return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE,
- ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, null,
- ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
+ ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, null);
}
return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(),
/*afTriggerId*/0, /*precaptureTriggerId*/0, holder.getFrameNumber(),
- /*partialResultCount*/1, errorStreamId, null, holder.getFrameNumber(), -1, -1);
+ /*partialResultCount*/1, errorStreamId, null);
}
/**
diff --git a/core/java/android/hardware/soundtrigger/ConversionUtil.java b/core/java/android/hardware/soundtrigger/ConversionUtil.java
index 425218a63cf7..c4d123ca4382 100644
--- a/core/java/android/hardware/soundtrigger/ConversionUtil.java
+++ b/core/java/android/hardware/soundtrigger/ConversionUtil.java
@@ -195,11 +195,14 @@ class ConversionUtil {
public static SoundTrigger.RecognitionEvent aidl2apiRecognitionEvent(
int modelHandle, RecognitionEvent aidlEvent) {
+ // The API recognition event doesn't allow for a null audio format, even though it doesn't
+ // always make sense. We thus replace it with a default.
+ AudioFormat audioFormat = aidl2apiAudioFormatWithDefault(aidlEvent.audioConfig);
return new SoundTrigger.GenericRecognitionEvent(
aidlEvent.status,
modelHandle, aidlEvent.captureAvailable, aidlEvent.captureSession,
aidlEvent.captureDelayMs, aidlEvent.capturePreambleMs, aidlEvent.triggerInData,
- aidl2apiAudioFormat(aidlEvent.audioConfig), aidlEvent.data);
+ audioFormat, aidlEvent.data);
}
public static SoundTrigger.RecognitionEvent aidl2apiPhraseRecognitionEvent(
@@ -210,11 +213,14 @@ class ConversionUtil {
for (int i = 0; i < aidlEvent.phraseExtras.length; ++i) {
apiExtras[i] = aidl2apiPhraseRecognitionExtra(aidlEvent.phraseExtras[i]);
}
+ // The API recognition event doesn't allow for a null audio format, even though it doesn't
+ // always make sense. We thus replace it with a default.
+ AudioFormat audioFormat = aidl2apiAudioFormatWithDefault(aidlEvent.common.audioConfig);
return new SoundTrigger.KeyphraseRecognitionEvent(aidlEvent.common.status, modelHandle,
aidlEvent.common.captureAvailable,
aidlEvent.common.captureSession, aidlEvent.common.captureDelayMs,
aidlEvent.common.capturePreambleMs, aidlEvent.common.triggerInData,
- aidl2apiAudioFormat(aidlEvent.common.audioConfig), aidlEvent.common.data,
+ audioFormat, aidlEvent.common.data,
apiExtras);
}
@@ -226,6 +232,14 @@ class ConversionUtil {
return apiBuilder.build();
}
+ // Same as above, but in case of a null input returns a non-null valid output.
+ public static AudioFormat aidl2apiAudioFormatWithDefault(@Nullable AudioConfig audioConfig) {
+ if (audioConfig != null) {
+ return aidl2apiAudioFormat(audioConfig);
+ }
+ return new AudioFormat.Builder().build();
+ }
+
public static int aidl2apiEncoding(int aidlFormat) {
switch (aidlFormat) {
case android.media.audio.common.AudioFormat.PCM
diff --git a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
index c1df5b6d2e7e..a2a15b30d578 100644
--- a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
+++ b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
@@ -303,7 +303,7 @@ public class SoundTriggerModule {
(SoundTrigger.RecognitionEvent) msg.obj);
break;
case EVENT_SERVICE_STATE_CHANGE:
- listener.onServiceStateChange(msg.arg1);
+ listener.onServiceStateChange((int) msg.obj);
break;
case EVENT_SERVICE_DIED:
listener.onServiceDied();
diff --git a/core/java/android/net/ConnectivityDiagnosticsManager.java b/core/java/android/net/ConnectivityDiagnosticsManager.java
index 275e38c74451..704f31d7f773 100644
--- a/core/java/android/net/ConnectivityDiagnosticsManager.java
+++ b/core/java/android/net/ConnectivityDiagnosticsManager.java
@@ -711,6 +711,13 @@ public class ConnectivityDiagnosticsManager {
* not currently registered. If a ConnectivityDiagnosticsCallback instance is registered with
* multiple NetworkRequests, an IllegalArgumentException will be thrown.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * callbacks in {@link ConnectivityManager}. Registering a callback with this method will count
+ * toward this limit. If this limit is exceeded, an exception will be thrown. To avoid hitting
+ * this issue and to conserve resources, make sure to unregister the callbacks with
+ * {@link #unregisterConnectivityDiagnosticsCallback}.
+ *
* @param request The NetworkRequest that will be used to match with Networks for which
* callbacks will be fired
* @param e The Executor to be used for running the callback method invocations
@@ -718,6 +725,7 @@ public class ConnectivityDiagnosticsManager {
* System
* @throws IllegalArgumentException if the same callback instance is registered with multiple
* NetworkRequests
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
public void registerConnectivityDiagnosticsCallback(
@NonNull NetworkRequest request,
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 36ffe50ef82d..a29f8782601e 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2246,26 +2246,6 @@ public class ConnectivityManager {
.getPackageNameForUid(context, uid), true /* throwException */);
}
- /** {@hide} */
- public static final void enforceTetherChangePermission(Context context, String callingPkg) {
- Preconditions.checkNotNull(context, "Context cannot be null");
- Preconditions.checkNotNull(callingPkg, "callingPkg cannot be null");
-
- if (context.getResources().getStringArray(
- com.android.internal.R.array.config_mobile_hotspot_provision_app).length == 2) {
- // Have a provisioning app - must only let system apps (which check this app)
- // turn on tethering
- context.enforceCallingOrSelfPermission(
- android.Manifest.permission.TETHER_PRIVILEGED, "ConnectivityService");
- } else {
- int uid = Binder.getCallingUid();
- // If callingPkg's uid is not same as Binder.getCallingUid(),
- // AppOpsService throws SecurityException.
- Settings.checkAndNoteWriteSettingsOperation(context, uid, callingPkg,
- true /* throwException */);
- }
- }
-
/**
* @deprecated - use getSystemService. This is a kludge to support static access in certain
* situations where a Context pointer is unavailable.
@@ -3814,13 +3794,22 @@ public class ConnectivityManager {
* or the ability to modify system settings as determined by
* {@link android.provider.Settings.System#canWrite}.</p>
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #registerNetworkCallback} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with
+ * {@link #unregisterNetworkCallback(NetworkCallback)}.
+ *
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} to be utilized for this request. Note
* the callback must not be shared - it uniquely specifies this request.
* The callback is invoked on the default internal Handler.
* @throws IllegalArgumentException if {@code request} contains invalid network capabilities.
* @throws SecurityException if missing the appropriate permissions.
- * @throws RuntimeException if request limit per UID is exceeded.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
public void requestNetwork(@NonNull NetworkRequest request,
@NonNull NetworkCallback networkCallback) {
@@ -3834,8 +3823,8 @@ public class ConnectivityManager {
* but runs all the callbacks on the passed Handler.
*
* <p>This method has the same permission requirements as
- * {@link #requestNetwork(NetworkRequest, NetworkCallback)} and throws the same exceptions in
- * the same conditions.
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)}, is subject to the same limitations,
+ * and throws the same exceptions in the same conditions.
*
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} to be utilized for this request. Note
@@ -3866,8 +3855,8 @@ public class ConnectivityManager {
* for that purpose. Calling this method will attempt to bring up the requested network.
*
* <p>This method has the same permission requirements as
- * {@link #requestNetwork(NetworkRequest, NetworkCallback)} and throws the same exceptions in
- * the same conditions.
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)}, is subject to the same limitations,
+ * and throws the same exceptions in the same conditions.
*
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} to be utilized for this request. Note
@@ -3893,8 +3882,8 @@ public class ConnectivityManager {
* on the passed Handler.
*
* <p>This method has the same permission requirements as
- * {@link #requestNetwork(NetworkRequest, NetworkCallback, int)} and throws the same exceptions
- * in the same conditions.
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)}, is subject to the same limitations,
+ * and throws the same exceptions in the same conditions.
*
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} to be utilized for this request. Note
@@ -3963,6 +3952,15 @@ public class ConnectivityManager {
* is unknown prior to bringing up the network so the framework does not
* know how to go about satisfying a request with these capabilities.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #registerNetworkCallback} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with {@link #unregisterNetworkCallback(PendingIntent)}
+ * or {@link #releaseNetworkRequest(PendingIntent)}.
+ *
* <p>This method requires the caller to hold either the
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE} permission
* or the ability to modify system settings as determined by
@@ -3974,7 +3972,7 @@ public class ConnectivityManager {
* comes from {@link PendingIntent#getBroadcast}. Cannot be null.
* @throws IllegalArgumentException if {@code request} contains invalid network capabilities.
* @throws SecurityException if missing the appropriate permissions.
- * @throws RuntimeException if request limit per UID is exceeded.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
public void requestNetwork(@NonNull NetworkRequest request,
@NonNull PendingIntent operation) {
@@ -4030,10 +4028,20 @@ public class ConnectivityManager {
* either the application exits or {@link #unregisterNetworkCallback(NetworkCallback)} is
* called.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #requestNetwork} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with
+ * {@link #unregisterNetworkCallback(NetworkCallback)}.
+ *
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} that the system will call as suitable
* networks change state.
* The callback is invoked on the default internal Handler.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public void registerNetworkCallback(@NonNull NetworkRequest request,
@@ -4047,10 +4055,21 @@ public class ConnectivityManager {
* either the application exits or {@link #unregisterNetworkCallback(NetworkCallback)} is
* called.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #requestNetwork} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with
+ * {@link #unregisterNetworkCallback(NetworkCallback)}.
+ *
+ *
* @param request {@link NetworkRequest} describing this request.
* @param networkCallback The {@link NetworkCallback} that the system will call as suitable
* networks change state.
* @param handler {@link Handler} to specify the thread upon which the callback will be invoked.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public void registerNetworkCallback(@NonNull NetworkRequest request,
@@ -4084,10 +4103,21 @@ public class ConnectivityManager {
* <p>
* The request may be released normally by calling
* {@link #unregisterNetworkCallback(android.app.PendingIntent)}.
+ *
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #requestNetwork} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with {@link #unregisterNetworkCallback(PendingIntent)}
+ * or {@link #releaseNetworkRequest(PendingIntent)}.
+ *
* @param request {@link NetworkRequest} describing this request.
* @param operation Action to perform when the network is available (corresponds
* to the {@link NetworkCallback#onAvailable} call. Typically
* comes from {@link PendingIntent#getBroadcast}. Cannot be null.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public void registerNetworkCallback(@NonNull NetworkRequest request,
@@ -4109,9 +4139,19 @@ public class ConnectivityManager {
* will continue to be called until either the application exits or
* {@link #unregisterNetworkCallback(NetworkCallback)} is called.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #requestNetwork} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with
+ * {@link #unregisterNetworkCallback(NetworkCallback)}.
+ *
* @param networkCallback The {@link NetworkCallback} that the system will call as the
* system default network changes.
* The callback is invoked on the default internal Handler.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public void registerDefaultNetworkCallback(@NonNull NetworkCallback networkCallback) {
@@ -4123,9 +4163,19 @@ public class ConnectivityManager {
* will continue to be called until either the application exits or
* {@link #unregisterNetworkCallback(NetworkCallback)} is called.
*
+ * <p>To avoid performance issues due to apps leaking callbacks, the system will limit the
+ * number of outstanding requests to 100 per app (identified by their UID), shared with
+ * all variants of this method, of {@link #requestNetwork} as well as
+ * {@link ConnectivityDiagnosticsManager#registerConnectivityDiagnosticsCallback}.
+ * Requesting a network with this method will count toward this limit. If this limit is
+ * exceeded, an exception will be thrown. To avoid hitting this issue and to conserve resources,
+ * make sure to unregister the callbacks with
+ * {@link #unregisterNetworkCallback(NetworkCallback)}.
+ *
* @param networkCallback The {@link NetworkCallback} that the system will call as the
* system default network changes.
* @param handler {@link Handler} to specify the thread upon which the callback will be invoked.
+ * @throws RuntimeException if the app already has too many callbacks registered.
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public void registerDefaultNetworkCallback(@NonNull NetworkCallback networkCallback,
@@ -4217,7 +4267,6 @@ public class ConnectivityManager {
* Cannot be null.
*/
public void unregisterNetworkCallback(@NonNull PendingIntent operation) {
- checkPendingIntentNotNull(operation);
releaseNetworkRequest(operation);
}
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index a8391c2b5461..a415dc57e160 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -4095,14 +4095,14 @@ public class UserManager {
}
/**
- * Returns true if the user switcher should be shown.
- * I.e., returns whether the user switcher is enabled and there is something actionable to show.
+ * Returns true if the user switcher is enabled (regardless of whether there is anything
+ * interesting for it to show).
*
- * @return true if user switcher should be shown.
+ * @return true if user switcher is enabled
* @hide
*/
public boolean isUserSwitcherEnabled() {
- return isUserSwitcherEnabled(false);
+ return isUserSwitcherEnabled(true);
}
/**
diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java
index fd7cdda3808a..06254574401b 100644
--- a/core/java/android/os/VibrationEffect.java
+++ b/core/java/android/os/VibrationEffect.java
@@ -221,15 +221,16 @@ public abstract class VibrationEffect implements Parcelable {
*
* Waveform vibrations are a potentially repeating series of timing and amplitude pairs. For
* each pair, the value in the amplitude array determines the strength of the vibration and the
- * value in the timing array determines how long it vibrates for. An amplitude of 0 implies no
- * vibration (i.e. off), and any pairs with a timing value of 0 will be ignored.
+ * value in the timing array determines how long it vibrates for, in milliseconds. Amplitude
+ * values must be between 0 and 255, and an amplitude of 0 implies no vibration (i.e. off). Any
+ * pairs with a timing value of 0 will be ignored.
* </p><p>
* To cause the pattern to repeat, pass the index into the timings array at which to start the
* repetition, or -1 to disable repeating.
* </p>
*
- * @param timings The timing values of the timing / amplitude pairs. Timing values of 0
- * will cause the pair to be ignored.
+ * @param timings The timing values, in milliseconds, of the timing / amplitude pairs. Timing
+ * values of 0 will cause the pair to be ignored.
* @param amplitudes The amplitude values of the timing / amplitude pairs. Amplitude values
* must be between 0 and 255, or equal to {@link #DEFAULT_AMPLITUDE}. An
* amplitude value of 0 implies the motor is off.
diff --git a/core/java/android/service/autofill/augmented/FillCallback.java b/core/java/android/service/autofill/augmented/FillCallback.java
index 21738d80f2d3..8ba5c173890c 100644
--- a/core/java/android/service/autofill/augmented/FillCallback.java
+++ b/core/java/android/service/autofill/augmented/FillCallback.java
@@ -62,9 +62,10 @@ public final class FillCallback {
List<Dataset> inlineSuggestions = response.getInlineSuggestions();
Bundle clientState = response.getClientState();
+ // We need to report result regardless of whether inline suggestions are returned or not.
+ mProxy.reportResult(inlineSuggestions, clientState);
if (inlineSuggestions != null && !inlineSuggestions.isEmpty()) {
mProxy.logEvent(AutofillProxy.REPORT_EVENT_INLINE_RESPONSE);
- mProxy.reportResult(inlineSuggestions, clientState);
return;
}
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index e4d53c64a063..9a9396c45b66 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -575,21 +575,23 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
@VisibleForTesting
public boolean onStateChanged(InsetsState state) {
- boolean localStateChanged = !mState.equals(state, true /* excludingCaptionInsets */)
+ boolean stateChanged = !mState.equals(state, true /* excludingCaptionInsets */,
+ false /* excludeInvisibleIme */)
|| !captionInsetsUnchanged();
- if (!localStateChanged && mLastDispatchedState.equals(state)) {
+ if (!stateChanged && mLastDispatchedState.equals(state)) {
return false;
}
if (DEBUG) Log.d(TAG, "onStateChanged: " + state);
updateState(state);
+
+ boolean localStateChanged = !mState.equals(mLastDispatchedState,
+ true /* excludingCaptionInsets */, true /* excludeInvisibleIme */);
mLastDispatchedState.set(state, true /* copySources */);
+
applyLocalVisibilityOverride();
if (localStateChanged) {
- if (DEBUG) Log.d(TAG, "onStateChanged, notifyInsetsChanged");
+ if (DEBUG) Log.d(TAG, "onStateChanged, notifyInsetsChanged, send state to WM: " + mState);
mHost.notifyInsetsChanged();
- }
- if (!mState.equals(mLastDispatchedState, true /* excludingCaptionInsets */)) {
- if (DEBUG) Log.d(TAG, "onStateChanged, send state to WM: " + mState);
updateRequestedState();
}
return true;
diff --git a/core/java/android/view/InsetsSource.java b/core/java/android/view/InsetsSource.java
index b0158467a17b..15b9a9330392 100644
--- a/core/java/android/view/InsetsSource.java
+++ b/core/java/android/view/InsetsSource.java
@@ -191,6 +191,14 @@ public class InsetsSource implements Parcelable {
@Override
public boolean equals(Object o) {
+ return equals(o, false);
+ }
+
+ /**
+ * @param excludeInvisibleImeFrames If {@link InsetsState#ITYPE_IME} frames should be ignored
+ * when IME is not visible.
+ */
+ public boolean equals(Object o, boolean excludeInvisibleImeFrames) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -198,6 +206,7 @@ public class InsetsSource implements Parcelable {
if (mType != that.mType) return false;
if (mVisible != that.mVisible) return false;
+ if (excludeInvisibleImeFrames && !mVisible && mType == ITYPE_IME) return true;
if (!Objects.equals(mVisibleFrame, that.mVisibleFrame)) return false;
return mFrame.equals(that.mFrame);
}
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java
index ae70a4971776..3aa246441dbc 100644
--- a/core/java/android/view/InsetsSourceConsumer.java
+++ b/core/java/android/view/InsetsSourceConsumer.java
@@ -18,8 +18,8 @@ package android.view;
import static android.view.InsetsController.ANIMATION_TYPE_NONE;
import static android.view.InsetsController.AnimationType;
-import static android.view.InsetsState.getDefaultVisibility;
import static android.view.InsetsController.DEBUG;
+import static android.view.InsetsState.getDefaultVisibility;
import static android.view.InsetsState.toPublicType;
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
@@ -221,9 +221,10 @@ public class InsetsSourceConsumer {
final boolean hasControl = mSourceControl != null;
// We still need to let the legacy app know the visibility change even if we don't have the
- // control.
+ // control. If we don't have the source, we don't change the requested visibility for making
+ // the callback behavior compatible.
mController.updateCompatSysUiVisibility(
- mType, hasControl ? mRequestedVisible : isVisible, hasControl);
+ mType, (hasControl || source == null) ? mRequestedVisible : isVisible, hasControl);
// If we don't have control, we are not able to change the visibility.
if (!hasControl) {
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
index f0bca260be38..397b04e9c023 100644
--- a/core/java/android/view/InsetsState.java
+++ b/core/java/android/view/InsetsState.java
@@ -555,7 +555,7 @@ public class InsetsState implements Parcelable {
@Override
public boolean equals(Object o) {
- return equals(o, false);
+ return equals(o, false, false);
}
/**
@@ -564,10 +564,13 @@ public class InsetsState implements Parcelable {
* excluded.
* @param excludingCaptionInsets {@code true} if we want to compare two InsetsState objects but
* ignore the caption insets source value.
+ * @param excludeInvisibleImeFrames If {@link #ITYPE_IME} frames should be ignored when IME is
+ * not visible.
* @return {@code true} if the two InsetsState objects are equal, {@code false} otherwise.
*/
@VisibleForTesting
- public boolean equals(Object o, boolean excludingCaptionInsets) {
+ public boolean equals(Object o, boolean excludingCaptionInsets,
+ boolean excludeInvisibleImeFrames) {
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
@@ -598,7 +601,7 @@ public class InsetsState implements Parcelable {
if (otherSource == null) {
return false;
}
- if (!otherSource.equals(source)) {
+ if (!otherSource.equals(source, excludeInvisibleImeFrames)) {
return false;
}
}
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 57f91ed3c0ae..c098fae11b8c 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -893,12 +893,15 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
}
return;
}
- ViewRootImpl viewRoot = getViewRootImpl();
- if (viewRoot == null || viewRoot.mSurface == null || !viewRoot.mSurface.isValid()) {
- if (DEBUG) {
- Log.d(TAG, System.identityHashCode(this)
- + " updateSurface: no valid surface");
- }
+ final ViewRootImpl viewRoot = getViewRootImpl();
+
+ if (viewRoot == null) {
+ return;
+ }
+
+ if (viewRoot.mSurface == null || !viewRoot.mSurface.isValid()) {
+ notifySurfaceDestroyed();
+ releaseSurfaces();
return;
}
@@ -1109,28 +1112,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
final boolean surfaceChanged = creating;
if (mSurfaceCreated && (surfaceChanged || (!visible && visibleChanged))) {
mSurfaceCreated = false;
- if (mSurface.isValid()) {
- if (DEBUG) Log.i(TAG, System.identityHashCode(this) + " "
- + "visibleChanged -- surfaceDestroyed");
- callbacks = getSurfaceCallbacks();
- for (SurfaceHolder.Callback c : callbacks) {
- c.surfaceDestroyed(mSurfaceHolder);
- }
- // Since Android N the same surface may be reused and given to us
- // again by the system server at a later point. However
- // as we didn't do this in previous releases, clients weren't
- // necessarily required to clean up properly in
- // surfaceDestroyed. This leads to problems for example when
- // clients don't destroy their EGL context, and try
- // and create a new one on the same surface following reuse.
- // Since there is no valid use of the surface in-between
- // surfaceDestroyed and surfaceCreated, we force a disconnect,
- // so the next connect will always work if we end up reusing
- // the surface.
- if (mSurface.isValid()) {
- mSurface.forceScopedDisconnect();
- }
- }
+ notifySurfaceDestroyed();
}
if (creating) {
@@ -1786,6 +1768,31 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
}
}
+ private void notifySurfaceDestroyed() {
+ if (mSurface.isValid()) {
+ if (DEBUG) Log.i(TAG, System.identityHashCode(this) + " "
+ + "surfaceDestroyed");
+ SurfaceHolder.Callback[] callbacks = getSurfaceCallbacks();
+ for (SurfaceHolder.Callback c : callbacks) {
+ c.surfaceDestroyed(mSurfaceHolder);
+ }
+ // Since Android N the same surface may be reused and given to us
+ // again by the system server at a later point. However
+ // as we didn't do this in previous releases, clients weren't
+ // necessarily required to clean up properly in
+ // surfaceDestroyed. This leads to problems for example when
+ // clients don't destroy their EGL context, and try
+ // and create a new one on the same surface following reuse.
+ // Since there is no valid use of the surface in-between
+ // surfaceDestroyed and surfaceCreated, we force a disconnect,
+ // so the next connect will always work if we end up reusing
+ // the surface.
+ if (mSurface.isValid()) {
+ mSurface.forceScopedDisconnect();
+ }
+ }
+ }
+
/**
* Wrapper of accessibility embedded connection for embedded view hierarchy.
*/
diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java
index a5ec4e900641..d2e506ea550c 100644
--- a/core/java/android/view/WindowlessWindowManager.java
+++ b/core/java/android/view/WindowlessWindowManager.java
@@ -41,7 +41,6 @@ public class WindowlessWindowManager implements IWindowSession {
private final static String TAG = "WindowlessWindowManager";
private class State {
- //TODO : b/150190730 we should create it when view show and release it when view invisible.
SurfaceControl mSurfaceControl;
WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
int mDisplayId;
diff --git a/core/java/android/view/contentcapture/ContentCaptureSession.java b/core/java/android/view/contentcapture/ContentCaptureSession.java
index 301ce9f013e4..3f5ef5a2651d 100644
--- a/core/java/android/view/contentcapture/ContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/ContentCaptureSession.java
@@ -39,8 +39,8 @@ import com.android.internal.util.Preconditions;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.security.SecureRandom;
import java.util.ArrayList;
-import java.util.Random;
/**
* Session used when the Android a system-provided content capture service
@@ -50,7 +50,9 @@ public abstract class ContentCaptureSession implements AutoCloseable {
private static final String TAG = ContentCaptureSession.class.getSimpleName();
- private static final Random sIdGenerator = new Random();
+ // TODO(b/158778794): to make the session ids truly globally unique across
+ // processes, we may need to explore other options.
+ private static final SecureRandom ID_GENERATOR = new SecureRandom();
/**
* Initial state, when there is no session.
@@ -622,7 +624,7 @@ public abstract class ContentCaptureSession implements AutoCloseable {
private static int getRandomSessionId() {
int id;
do {
- id = sIdGenerator.nextInt();
+ id = ID_GENERATOR.nextInt();
} while (id == NO_SESSION_ID);
return id;
}
diff --git a/core/java/android/widget/SelectionActionModeHelper.java b/core/java/android/widget/SelectionActionModeHelper.java
index e07181abe19c..843700cef55e 100644
--- a/core/java/android/widget/SelectionActionModeHelper.java
+++ b/core/java/android/widget/SelectionActionModeHelper.java
@@ -971,7 +971,8 @@ public final class SelectionActionModeHelper {
return new TextClassifierEvent.LanguageDetectionEvent.Builder(eventType)
.setEventContext(classificationContext)
.setResultId(classification.getId())
- .setEntityTypes(language)
+ // b/158481016: Disable language logging.
+ //.setEntityTypes(language)
.setScores(score)
.setActionIndices(classification.getActions().indexOf(translateAction))
.setModelName(model)
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 2d4d9575584d..0a1e3a0caeff 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -2816,8 +2816,7 @@ public class ChooserActivity extends ResolverActivity implements
}
// no need to query direct share for work profile when its turned off
- UserManager userManager = getSystemService(UserManager.class);
- if (userManager.isQuietModeEnabled(chooserListAdapter.getUserHandle())) {
+ if (isQuietModeEnabled(chooserListAdapter.getUserHandle())) {
getChooserActivityLogger().logSharesheetAppLoadComplete();
return;
}
@@ -2841,6 +2840,12 @@ public class ChooserActivity extends ResolverActivity implements
getChooserActivityLogger().logSharesheetAppLoadComplete();
}
+ @VisibleForTesting
+ protected boolean isQuietModeEnabled(UserHandle userHandle) {
+ UserManager userManager = getSystemService(UserManager.class);
+ return userManager.isQuietModeEnabled(userHandle);
+ }
+
private void setupScrollListener() {
if (mResolverDrawerLayout == null) {
return;
@@ -3095,7 +3100,7 @@ public class ChooserActivity extends ResolverActivity implements
setVerticalScrollEnabled(false);
}
} else if (state == ViewPager.SCROLL_STATE_IDLE) {
- if (mScrollStatus == SCROLL_STATUS_SCROLLING_VERTICAL) {
+ if (mScrollStatus == SCROLL_STATUS_SCROLLING_HORIZONTAL) {
mScrollStatus = SCROLL_STATUS_IDLE;
setVerticalScrollEnabled(true);
}
@@ -3592,10 +3597,9 @@ public class ChooserActivity extends ResolverActivity implements
* Only expand direct share area if there is a minimum number of targets.
*/
private boolean canExpandDirectShare() {
- int orientation = getResources().getConfiguration().orientation;
- return mChooserListAdapter.getNumServiceTargetsForExpand() > getMaxTargetsPerRow()
- && orientation == Configuration.ORIENTATION_PORTRAIT
- && !isInMultiWindowMode();
+ // Do not enable until we have confirmed more apps are using sharing shortcuts
+ // Check git history for enablement logic
+ return false;
}
public ChooserListAdapter getListAdapter() {
diff --git a/core/java/com/android/internal/app/ChooserListAdapter.java b/core/java/com/android/internal/app/ChooserListAdapter.java
index f4fb993fbb93..d6ff7b13c934 100644
--- a/core/java/com/android/internal/app/ChooserListAdapter.java
+++ b/core/java/com/android/internal/app/ChooserListAdapter.java
@@ -181,6 +181,7 @@ public class ChooserListAdapter extends ResolverListAdapter {
ri.icon = 0;
}
mCallerTargets.add(new DisplayResolveInfo(ii, ri, ii, makePresentationGetter(ri)));
+ if (mCallerTargets.size() == MAX_SUGGESTED_APP_TARGETS) break;
}
}
}
@@ -320,7 +321,7 @@ public class ChooserListAdapter extends ResolverListAdapter {
public int getCallerTargetCount() {
- return Math.min(mCallerTargets.size(), MAX_SUGGESTED_APP_TARGETS);
+ return mCallerTargets.size();
}
/**
@@ -346,8 +347,9 @@ public class ChooserListAdapter extends ResolverListAdapter {
}
int getAlphaTargetCount() {
- int standardCount = mSortedList.size();
- return standardCount > mChooserListCommunicator.getMaxRankedTargets() ? standardCount : 0;
+ int groupedCount = mSortedList.size();
+ int ungroupedCount = mCallerTargets.size() + mDisplayList.size();
+ return ungroupedCount > mChooserListCommunicator.getMaxRankedTargets() ? groupedCount : 0;
}
/**
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java
index 157e0a74712b..2a7eae626795 100644
--- a/core/java/com/android/internal/app/PlatLogoActivity.java
+++ b/core/java/com/android/internal/app/PlatLogoActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,29 +17,32 @@
package com.android.internal.app;
import android.animation.ObjectAnimator;
-import android.animation.TimeAnimator;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.ActionBar;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.ContentResolver;
+import android.content.Context;
import android.content.Intent;
-import android.content.res.ColorStateList;
-import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.ColorFilter;
-import android.graphics.Matrix;
+import android.graphics.LinearGradient;
import android.graphics.Paint;
-import android.graphics.Path;
import android.graphics.PixelFormat;
+import android.graphics.Rect;
import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.provider.Settings;
+import android.util.AttributeSet;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewGroup;
+import android.view.animation.PathInterpolator;
+import android.widget.FrameLayout;
import android.widget.ImageView;
import com.android.internal.R;
@@ -50,23 +53,12 @@ import org.json.JSONObject;
* @hide
*/
public class PlatLogoActivity extends Activity {
- ImageView mZeroView, mOneView;
- BackslashDrawable mBackslash;
- int mClicks;
-
- static final Paint sPaint = new Paint();
- static {
- sPaint.setStyle(Paint.Style.STROKE);
- sPaint.setStrokeWidth(4f);
- sPaint.setStrokeCap(Paint.Cap.SQUARE);
- }
+ private static final boolean WRITE_SETTINGS = true;
+
+ BigDialView mDialView;
@Override
protected void onPause() {
- if (mBackslash != null) {
- mBackslash.stopAnimating();
- }
- mClicks = 0;
super.onPause();
}
@@ -80,101 +72,33 @@ public class PlatLogoActivity extends Activity {
getWindow().setNavigationBarColor(0);
getWindow().setStatusBarColor(0);
- getActionBar().hide();
-
- setContentView(R.layout.platlogo_layout);
-
- mBackslash = new BackslashDrawable((int) (50 * dp));
-
- mOneView = findViewById(R.id.one);
- mOneView.setImageDrawable(new OneDrawable());
- mZeroView = findViewById(R.id.zero);
- mZeroView.setImageDrawable(new ZeroDrawable());
+ final ActionBar ab = getActionBar();
+ if (ab != null) ab.hide();
- final ViewGroup root = (ViewGroup) mOneView.getParent();
- root.setClipChildren(false);
- root.setBackground(mBackslash);
- root.getBackground().setAlpha(0x20);
-
- View.OnTouchListener tl = new View.OnTouchListener() {
- float mOffsetX, mOffsetY;
- long mClickTime;
- ObjectAnimator mRotAnim;
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- measureTouchPressure(event);
- switch (event.getActionMasked()) {
- case MotionEvent.ACTION_DOWN:
- v.animate().scaleX(1.1f).scaleY(1.1f);
- v.getParent().bringChildToFront(v);
- mOffsetX = event.getRawX() - v.getX();
- mOffsetY = event.getRawY() - v.getY();
- long now = System.currentTimeMillis();
- if (now - mClickTime < 350) {
- mRotAnim = ObjectAnimator.ofFloat(v, View.ROTATION,
- v.getRotation(), v.getRotation() + 3600);
- mRotAnim.setDuration(10000);
- mRotAnim.start();
- mClickTime = 0;
- } else {
- mClickTime = now;
- }
- break;
- case MotionEvent.ACTION_MOVE:
- v.setX(event.getRawX() - mOffsetX);
- v.setY(event.getRawY() - mOffsetY);
- v.performHapticFeedback(HapticFeedbackConstants.TEXT_HANDLE_MOVE);
- break;
- case MotionEvent.ACTION_UP:
- v.performClick();
- // fall through
- case MotionEvent.ACTION_CANCEL:
- v.animate().scaleX(1f).scaleY(1f);
- if (mRotAnim != null) mRotAnim.cancel();
- testOverlap();
- break;
- }
- return true;
- }
- };
-
- findViewById(R.id.one).setOnTouchListener(tl);
- findViewById(R.id.zero).setOnTouchListener(tl);
- findViewById(R.id.text).setOnTouchListener(tl);
- }
-
- private void testOverlap() {
- final float width = mZeroView.getWidth();
- final float targetX = mZeroView.getX() + width * .2f;
- final float targetY = mZeroView.getY() + width * .3f;
- if (Math.hypot(targetX - mOneView.getX(), targetY - mOneView.getY()) < width * .2f
- && Math.abs(mOneView.getRotation() % 360 - 315) < 15) {
- mOneView.animate().x(mZeroView.getX() + width * .2f);
- mOneView.animate().y(mZeroView.getY() + width * .3f);
- mOneView.setRotation(mOneView.getRotation() % 360);
- mOneView.animate().rotation(315);
- mOneView.performHapticFeedback(HapticFeedbackConstants.CONFIRM);
-
- mBackslash.startAnimating();
-
- mClicks++;
- if (mClicks >= 7) {
- launchNextStage();
- }
- } else {
- mBackslash.stopAnimating();
+ mDialView = new BigDialView(this, null);
+ if (Settings.System.getLong(getContentResolver(),
+ "egg_mode" /* Settings.System.EGG_MODE */, 0) == 0) {
+ mDialView.setUnlockTries(3);
}
+
+ final FrameLayout layout = new FrameLayout(this);
+ layout.setBackgroundColor(0xFFFF0000);
+ layout.addView(mDialView, FrameLayout.LayoutParams.MATCH_PARENT,
+ FrameLayout.LayoutParams.MATCH_PARENT);
+ setContentView(layout);
}
- private void launchNextStage() {
+ private void launchNextStage(boolean locked) {
final ContentResolver cr = getContentResolver();
if (Settings.System.getLong(cr, "egg_mode" /* Settings.System.EGG_MODE */, 0) == 0) {
// For posterity: the moment this user unlocked the easter egg
try {
- Settings.System.putLong(cr,
- "egg_mode", // Settings.System.EGG_MODE,
- System.currentTimeMillis());
+ if (WRITE_SETTINGS) {
+ Settings.System.putLong(cr,
+ "egg_mode", // Settings.System.EGG_MODE,
+ locked ? 0 : System.currentTimeMillis());
+ }
} catch (RuntimeException e) {
Log.e("com.android.internal.app.PlatLogoActivity", "Can't write settings", e);
}
@@ -182,12 +106,12 @@ public class PlatLogoActivity extends Activity {
try {
startActivity(new Intent(Intent.ACTION_MAIN)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_CLEAR_TASK)
+ | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.addCategory("com.android.internal.category.PLATLOGO"));
} catch (ActivityNotFoundException ex) {
Log.e("com.android.internal.app.PlatLogoActivity", "No more eggs.");
}
- finish();
+ //finish(); // no longer finish upon unlock; it's fun to frob the dial
}
static final String TOUCH_STATS = "touch.stats";
@@ -223,7 +147,10 @@ public class PlatLogoActivity extends Activity {
if (mPressureMax >= 0) {
touchData.put("min", mPressureMin);
touchData.put("max", mPressureMax);
- Settings.System.putString(getContentResolver(), TOUCH_STATS, touchData.toString());
+ if (WRITE_SETTINGS) {
+ Settings.System.putString(getContentResolver(), TOUCH_STATS,
+ touchData.toString());
+ }
}
} catch (Exception e) {
Log.e("com.android.internal.app.PlatLogoActivity", "Can't write touch settings", e);
@@ -242,149 +169,272 @@ public class PlatLogoActivity extends Activity {
super.onStop();
}
- static class ZeroDrawable extends Drawable {
- int mTintColor;
+ class BigDialView extends ImageView {
+ private static final int COLOR_GREEN = 0xff3ddc84;
+ private static final int COLOR_BLUE = 0xff4285f4;
+ private static final int COLOR_NAVY = 0xff073042;
+ private static final int COLOR_ORANGE = 0xfff86734;
+ private static final int COLOR_CHARTREUSE = 0xffeff7cf;
+ private static final int COLOR_LIGHTBLUE = 0xffd7effe;
- @Override
- public void draw(Canvas canvas) {
- sPaint.setColor(mTintColor | 0xFF000000);
+ private static final int STEPS = 11;
+ private static final float VALUE_CHANGE_MAX = 1f / STEPS;
- canvas.save();
- canvas.scale(canvas.getWidth() / 24f, canvas.getHeight() / 24f);
+ private BigDialDrawable mDialDrawable;
+ private boolean mWasLocked;
- canvas.drawCircle(12f, 12f, 10f, sPaint);
- canvas.restore();
+ BigDialView(Context context, @Nullable AttributeSet attrs) {
+ super(context, attrs);
+ init();
}
- @Override
- public void setAlpha(int alpha) { }
-
- @Override
- public void setColorFilter(ColorFilter colorFilter) { }
-
- @Override
- public void setTintList(ColorStateList tint) {
- mTintColor = tint.getDefaultColor();
+ BigDialView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init();
}
- @Override
- public int getOpacity() {
- return PixelFormat.TRANSLUCENT;
+ BigDialView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ init();
}
- }
- static class OneDrawable extends Drawable {
- int mTintColor;
+ private void init() {
+ mDialDrawable = new BigDialDrawable();
+ setImageDrawable(mDialDrawable);
+ }
@Override
- public void draw(Canvas canvas) {
- sPaint.setColor(mTintColor | 0xFF000000);
-
- canvas.save();
- canvas.scale(canvas.getWidth() / 24f, canvas.getHeight() / 24f);
-
- final Path p = new Path();
- p.moveTo(12f, 21.83f);
- p.rLineTo(0f, -19.67f);
- p.rLineTo(-5f, 0f);
- canvas.drawPath(p, sPaint);
- canvas.restore();
+ public void onDraw(Canvas c) {
+ super.onDraw(c);
}
- @Override
- public void setAlpha(int alpha) { }
+ double toPositiveDegrees(double rad) {
+ return (Math.toDegrees(rad) + 360 - 90) % 360;
+ }
@Override
- public void setColorFilter(ColorFilter colorFilter) { }
+ public boolean onTouchEvent(MotionEvent ev) {
+ switch (ev.getActionMasked()) {
+ case MotionEvent.ACTION_DOWN:
+ mWasLocked = mDialDrawable.isLocked();
+ // pass through
+ case MotionEvent.ACTION_MOVE:
+ float x = ev.getX();
+ float y = ev.getY();
+ float cx = (getLeft() + getRight()) / 2f;
+ float cy = (getTop() + getBottom()) / 2f;
+ float angle = (float) toPositiveDegrees(Math.atan2(x - cx, y - cy));
+ final int oldLevel = mDialDrawable.getUserLevel();
+ mDialDrawable.touchAngle(angle);
+ final int newLevel = mDialDrawable.getUserLevel();
+ if (oldLevel != newLevel) {
+ performHapticFeedback(newLevel == STEPS
+ ? HapticFeedbackConstants.CONFIRM
+ : HapticFeedbackConstants.CLOCK_TICK);
+ }
+ return true;
+ case MotionEvent.ACTION_UP:
+ if (mWasLocked && !mDialDrawable.isLocked()) {
+ launchNextStage(false);
+ }
+ return true;
+ }
+ return false;
+ }
@Override
- public void setTintList(ColorStateList tint) {
- mTintColor = tint.getDefaultColor();
+ public boolean performClick() {
+ if (mDialDrawable.getUserLevel() < STEPS - 1) {
+ mDialDrawable.setUserLevel(mDialDrawable.getUserLevel() + 1);
+ performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK);
+ }
+ return true;
}
- @Override
- public int getOpacity() {
- return PixelFormat.TRANSLUCENT;
+ void setUnlockTries(int tries) {
+ mDialDrawable.setUnlockTries(tries);
}
- }
- private static class BackslashDrawable extends Drawable implements TimeAnimator.TimeListener {
- Bitmap mTile;
- Paint mPaint = new Paint();
- BitmapShader mShader;
- TimeAnimator mAnimator = new TimeAnimator();
- Matrix mMatrix = new Matrix();
+ private class BigDialDrawable extends Drawable {
+ public final int STEPS = 10;
+ private int mUnlockTries = 0;
+ final Paint mPaint = new Paint();
+ final Drawable mEleven;
+ private boolean mNightMode;
+ private float mValue = 0f;
+ float mElevenAnim = 0f;
+ ObjectAnimator mElevenShowAnimator = ObjectAnimator.ofFloat(this, "elevenAnim", 0f,
+ 1f).setDuration(300);
+ ObjectAnimator mElevenHideAnimator = ObjectAnimator.ofFloat(this, "elevenAnim", 1f,
+ 0f).setDuration(500);
+
+ BigDialDrawable() {
+ mNightMode = getContext().getResources().getConfiguration().isNightModeActive();
+ mEleven = getContext().getDrawable(R.drawable.ic_number11);
+ mElevenShowAnimator.setInterpolator(new PathInterpolator(0.4f, 0f, 0.2f, 1f));
+ mElevenHideAnimator.setInterpolator(new PathInterpolator(0.8f, 0.2f, 0.6f, 1f));
+ }
- public void draw(Canvas canvas) {
- canvas.drawPaint(mPaint);
- }
+ public void setUnlockTries(int count) {
+ if (mUnlockTries != count) {
+ mUnlockTries = count;
+ setValue(getValue());
+ invalidateSelf();
+ }
+ }
- BackslashDrawable(int width) {
- mTile = Bitmap.createBitmap(width, width, Bitmap.Config.ALPHA_8);
- mAnimator.setTimeListener(this);
-
- final Canvas tileCanvas = new Canvas(mTile);
- final float w = tileCanvas.getWidth();
- final float h = tileCanvas.getHeight();
-
- final Path path = new Path();
- path.moveTo(0, 0);
- path.lineTo(w / 2, 0);
- path.lineTo(w, h / 2);
- path.lineTo(w, h);
- path.close();
-
- path.moveTo(0, h / 2);
- path.lineTo(w / 2, h);
- path.lineTo(0, h);
- path.close();
-
- final Paint slashPaint = new Paint();
- slashPaint.setAntiAlias(true);
- slashPaint.setStyle(Paint.Style.FILL);
- slashPaint.setColor(0xFF000000);
- tileCanvas.drawPath(path, slashPaint);
-
- //mPaint.setColor(0xFF0000FF);
- mShader = new BitmapShader(mTile, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
- mPaint.setShader(mShader);
- }
+ boolean isLocked() {
+ return mUnlockTries > 0;
+ }
- public void startAnimating() {
- if (!mAnimator.isStarted()) {
- mAnimator.start();
+ public void setValue(float v) {
+ // until the dial is "unlocked", you can't turn it all the way to 11
+ final float max = isLocked() ? 1f - 1f / STEPS : 1f;
+ mValue = v < 0f ? 0f : v > max ? max : v;
+ invalidateSelf();
}
- }
- public void stopAnimating() {
- if (mAnimator.isStarted()) {
- mAnimator.cancel();
+ public float getValue() {
+ return mValue;
}
- }
- @Override
- public void setAlpha(int alpha) {
- mPaint.setAlpha(alpha);
- }
+ public int getUserLevel() {
+ return Math.round(getValue() * STEPS - 0.25f);
+ }
- @Override
- public void setColorFilter(ColorFilter colorFilter) {
- mPaint.setColorFilter(colorFilter);
- }
+ public void setUserLevel(int i) {
+ setValue(getValue() + ((float) i) / STEPS);
+ }
- @Override
- public int getOpacity() {
- return PixelFormat.TRANSLUCENT;
- }
+ public float getElevenAnim() {
+ return mElevenAnim;
+ }
- @Override
- public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) {
- if (mShader != null) {
- mMatrix.postTranslate(deltaTime / 4f, 0);
- mShader.setLocalMatrix(mMatrix);
- invalidateSelf();
+ public void setElevenAnim(float f) {
+ if (mElevenAnim != f) {
+ mElevenAnim = f;
+ invalidateSelf();
+ }
+ }
+
+ @Override
+ public void draw(@NonNull Canvas canvas) {
+ final Rect bounds = getBounds();
+ final int w = bounds.width();
+ final int h = bounds.height();
+ final float w2 = w / 2f;
+ final float h2 = h / 2f;
+ final float radius = w / 4f;
+
+ canvas.drawColor(mNightMode ? COLOR_NAVY : COLOR_LIGHTBLUE);
+
+ canvas.save();
+ canvas.rotate(45, w2, h2);
+ canvas.clipRect(w2, h2 - radius, Math.min(w, h), h2 + radius);
+ final int gradientColor = mNightMode ? 0x60000020 : (0x10FFFFFF & COLOR_NAVY);
+ mPaint.setShader(
+ new LinearGradient(w2, h2, Math.min(w, h), h2, gradientColor,
+ 0x00FFFFFF & gradientColor, Shader.TileMode.CLAMP));
+ mPaint.setColor(Color.BLACK);
+ canvas.drawPaint(mPaint);
+ mPaint.setShader(null);
+ canvas.restore();
+
+ mPaint.setStyle(Paint.Style.FILL);
+ mPaint.setColor(COLOR_GREEN);
+
+ canvas.drawCircle(w2, h2, radius, mPaint);
+
+ mPaint.setColor(mNightMode ? COLOR_LIGHTBLUE : COLOR_NAVY);
+ final float cx = w * 0.85f;
+ for (int i = 0; i < STEPS; i++) {
+ final float f = (float) i / STEPS;
+ canvas.save();
+ final float angle = valueToAngle(f);
+ canvas.rotate(-angle, w2, h2);
+ canvas.drawCircle(cx, h2, (i <= getUserLevel()) ? 20 : 5, mPaint);
+ canvas.restore();
+ }
+
+ if (mElevenAnim > 0f) {
+ final int color = COLOR_ORANGE;
+ final int size2 = (int) ((0.5 + 0.5f * mElevenAnim) * w / 14);
+ final float cx11 = cx + size2 / 4f;
+ mEleven.setBounds((int) cx11 - size2, (int) h2 - size2,
+ (int) cx11 + size2, (int) h2 + size2);
+ final int alpha = 0xFFFFFF | ((int) clamp(0xFF * 2 * mElevenAnim, 0, 0xFF)
+ << 24);
+ mEleven.setTint(alpha & color);
+ mEleven.draw(canvas);
+ }
+
+ // don't want to use the rounded value here since the quantization will be visible
+ final float angle = valueToAngle(mValue);
+
+ // it's easier to draw at far-right and rotate backwards
+ canvas.rotate(-angle, w2, h2);
+ mPaint.setColor(Color.WHITE);
+ final float dimple = w2 / 12f;
+ canvas.drawCircle(w - radius - dimple * 2, h2, dimple, mPaint);
+ }
+
+ float clamp(float x, float a, float b) {
+ return x < a ? a : x > b ? b : x;
+ }
+
+ float angleToValue(float a) {
+ return 1f - clamp(a / (360 - 45), 0f, 1f);
+ }
+
+ // rotation: min is at 4:30, max is at 3:00
+ float valueToAngle(float v) {
+ return (1f - v) * (360 - 45);
+ }
+
+ public void touchAngle(float a) {
+ final int oldUserLevel = getUserLevel();
+ final float newValue = angleToValue(a);
+ // this is how we prevent the knob from snapping from max back to min, or from
+ // jumping around wherever the user presses. The new value must be pretty close
+ // to the
+ // previous one.
+ if (Math.abs(newValue - getValue()) < VALUE_CHANGE_MAX) {
+ setValue(newValue);
+
+ if (isLocked() && oldUserLevel != STEPS - 1 && getUserLevel() == STEPS - 1) {
+ mUnlockTries--;
+ }
+
+ if (!isLocked()) {
+ if (getUserLevel() == STEPS && mElevenAnim != 1f
+ && !mElevenShowAnimator.isRunning()) {
+ mElevenHideAnimator.cancel();
+ mElevenShowAnimator.start();
+ } else if (getUserLevel() != STEPS && mElevenAnim == 1f
+ && !mElevenHideAnimator.isRunning()) {
+ mElevenShowAnimator.cancel();
+ mElevenHideAnimator.start();
+ }
+ }
+ }
+ }
+
+ @Override
+ public void setAlpha(int i) {
+ }
+
+ @Override
+ public void setColorFilter(@Nullable ColorFilter colorFilter) {
+ }
+
+ @Override
+ public int getOpacity() {
+ return PixelFormat.TRANSLUCENT;
}
}
}
}
+
+
diff --git a/core/java/com/android/internal/app/ResolverListAdapter.java b/core/java/com/android/internal/app/ResolverListAdapter.java
index b1e8ed1f943e..d63ebda5117e 100644
--- a/core/java/com/android/internal/app/ResolverListAdapter.java
+++ b/core/java/com/android/internal/app/ResolverListAdapter.java
@@ -617,7 +617,8 @@ public class ResolverListAdapter extends BaseAdapter {
}
}
- UserHandle getUserHandle() {
+ @VisibleForTesting
+ public UserHandle getUserHandle() {
return mResolverListController.getUserHandle();
}
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 3f03f2a3e754..d22f94213338 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -71,4 +71,6 @@ interface IInputMethodManager {
void reportActivityView(in IInputMethodClient parentClient, int childDisplayId,
in float[] matrixValues);
+
+ void removeImeSurface();
}
diff --git a/core/java/com/android/internal/widget/ConversationLayout.java b/core/java/com/android/internal/widget/ConversationLayout.java
index 7c7d9312e2db..b64923fb5bf8 100644
--- a/core/java/com/android/internal/widget/ConversationLayout.java
+++ b/core/java/com/android/internal/widget/ConversationLayout.java
@@ -72,6 +72,7 @@ import com.android.internal.util.ContrastColorUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
+import java.util.Objects;
import java.util.function.Consumer;
import java.util.regex.Pattern;
@@ -761,9 +762,13 @@ public class ConversationLayout extends FrameLayout
// group
: mExpandedGroupMessagePadding;
+ int iconPadding = mIsOneToOne || mIsCollapsed
+ ? mConversationIconTopPadding
+ : mConversationIconTopPaddingExpandedGroup;
+
mConversationIconContainer.setPaddingRelative(
mConversationIconContainer.getPaddingStart(),
- mConversationIconTopPadding,
+ iconPadding,
mConversationIconContainer.getPaddingEnd(),
mConversationIconContainer.getPaddingBottom());
@@ -780,8 +785,8 @@ public class ConversationLayout extends FrameLayout
}
@RemotableViewMethod
- public void setShortcutIcon(Icon conversationIcon) {
- mConversationIcon = conversationIcon;
+ public void setShortcutIcon(Icon shortcutIcon) {
+ mShortcutIcon = shortcutIcon;
}
/**
@@ -791,7 +796,8 @@ public class ConversationLayout extends FrameLayout
*/
@RemotableViewMethod
public void setConversationTitle(CharSequence conversationTitle) {
- mConversationTitle = conversationTitle;
+ // Remove formatting from the title.
+ mConversationTitle = conversationTitle != null ? conversationTitle.toString() : null;
}
public CharSequence getConversationTitle() {
@@ -1048,6 +1054,9 @@ public class ConversationLayout extends FrameLayout
groups.add(currentGroup);
if (sender == null) {
sender = mUser;
+ } else {
+ // Remove all formatting from the sender name
+ sender = sender.toBuilder().setName(Objects.toString(sender.getName())).build();
}
senders.add(sender);
currentSenderKey = key;
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 03a7b3da6251..93690cdfc811 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1430,6 +1430,32 @@ public class LockPatternUtils {
== StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
}
+ private static class WrappedCallback extends ICheckCredentialProgressCallback.Stub {
+
+ private Handler mHandler;
+ private CheckCredentialProgressCallback mCallback;
+
+ WrappedCallback(Handler handler, CheckCredentialProgressCallback callback) {
+ mHandler = handler;
+ mCallback = callback;
+ }
+
+ @Override
+ public void onCredentialVerified() throws RemoteException {
+ if (mHandler == null) {
+ Log.e(TAG, "Handler is null during callback");
+ }
+ // Kill reference immediately to allow early GC at client side independent of
+ // when system_server decides to lose its reference to the
+ // ICheckCredentialProgressCallback binder object.
+ mHandler.post(() -> {
+ mCallback.onEarlyMatched();
+ mCallback = null;
+ });
+ mHandler = null;
+ }
+ }
+
private ICheckCredentialProgressCallback wrapCallback(
final CheckCredentialProgressCallback callback) {
if (callback == null) {
@@ -1439,13 +1465,7 @@ public class LockPatternUtils {
throw new IllegalStateException("Must construct LockPatternUtils on a looper thread"
+ " to use progress callbacks.");
}
- return new ICheckCredentialProgressCallback.Stub() {
-
- @Override
- public void onCredentialVerified() throws RemoteException {
- mHandler.post(callback::onEarlyMatched);
- }
- };
+ return new WrappedCallback(mHandler, callback);
}
}
diff --git a/core/proto/android/stats/connectivity/Android.bp b/core/proto/android/stats/connectivity/Android.bp
index 5d642d3845fe..9cd233e1ba85 100644
--- a/core/proto/android/stats/connectivity/Android.bp
+++ b/core/proto/android/stats/connectivity/Android.bp
@@ -13,12 +13,12 @@
// limitations under the License.
java_library_static {
- name: "networkstackprotosnano",
+ name: "networkstackprotos",
proto: {
- type: "nano",
+ type: "lite",
},
srcs: [
"network_stack.proto",
],
- sdk_version: "system_current",
+ sdk_version: "system_29",
}
diff --git a/core/proto/android/stats/connectivity/network_stack.proto b/core/proto/android/stats/connectivity/network_stack.proto
index 7d9aa1c6eb23..e9726d7ce195 100644
--- a/core/proto/android/stats/connectivity/network_stack.proto
+++ b/core/proto/android/stats/connectivity/network_stack.proto
@@ -20,6 +20,160 @@ package android.stats.connectivity;
option java_multiple_files = true;
option java_outer_classname = "NetworkStackProto";
+enum DhcpRenewResult {
+ RR_UNKNOWN = 0;
+ RR_SUCCESS = 1;
+ RR_ERROR_NAK = 2;
+ RR_ERROR_IP_MISMATCH = 3;
+ RR_ERROR_IP_EXPIRE = 4;
+}
+
+enum DisconnectCode {
+ DC_NONE = 0;
+ DC_NORMAL_TERMINATION = 1;
+ DC_PROVISIONING_FAIL = 2;
+ DC_ERROR_STARTING_IPV4 = 4;
+ DC_ERROR_STARTING_IPV6 = 5;
+ DC_ERROR_STARTING_IPREACHABILITYMONITOR = 6;
+ DC_INVALID_PROVISIONING = 7;
+ DC_INTERFACE_NOT_FOUND = 8;
+ DC_PROVISIONING_TIMEOUT = 9;
+}
+
+enum TransportType {
+ TT_UNKNOWN = 0;
+ // Indicates this network uses a Cellular transport
+ TT_CELLULAR = 1;
+ // Indicates this network uses a Wi-Fi transport
+ TT_WIFI = 2;
+ // Indicates this network uses a Bluetooth transport
+ TT_BLUETOOTH = 3;
+ // Indicates this network uses an Ethernet transport
+ TT_ETHERNET = 4;
+ // Indicates this network uses a Wi-Fi Aware transport
+ TT_WIFI_AWARE = 5;
+ // Indicates this network uses a LoWPAN transport
+ TT_LOWPAN = 6;
+ // Indicates this network uses a Cellular+VPN transport
+ TT_CELLULAR_VPN = 7;
+ // Indicates this network uses a Wi-Fi+VPN transport
+ TT_WIFI_VPN = 8;
+ // Indicates this network uses a Bluetooth+VPN transport
+ TT_BLUETOOTH_VPN = 9;
+ // Indicates this network uses an Ethernet+VPN transport
+ TT_ETHERNET_VPN = 10;
+ // Indicates this network uses a Wi-Fi+Cellular+VPN transport
+ TT_WIFI_CELLULAR_VPN = 11;
+ // Indicates this network uses for test only
+ TT_TEST = 12;
+}
+
+enum DhcpFeature {
+ DF_UNKNOWN = 0;
+ // DHCP INIT-REBOOT state
+ DF_INITREBOOT = 1;
+ // DHCP rapid commit option
+ DF_RAPIDCOMMIT = 2;
+ // Duplicate address detection
+ DF_DAD = 3;
+ // Fast initial Link setup
+ DF_FILS = 4;
+}
+
+enum HostnameTransResult {
+ HTR_UNKNOWN = 0;
+ HTR_SUCCESS = 1;
+ HTR_FAILURE = 2;
+ HTR_DISABLE = 3;
+}
+
+enum ProbeResult {
+ PR_UNKNOWN = 0;
+ PR_SUCCESS = 1;
+ PR_FAILURE = 2;
+ PR_PORTAL = 3;
+ // DNS query for the probe host returned a private IP address
+ PR_PRIVATE_IP_DNS = 4;
+}
+
+enum ValidationResult {
+ VR_UNKNOWN = 0;
+ VR_SUCCESS = 1;
+ VR_FAILURE = 2;
+ VR_PORTAL = 3;
+ VR_PARTIAL = 4;
+}
+
+enum ProbeType {
+ PT_UNKNOWN = 0;
+ PT_DNS = 1;
+ PT_HTTP = 2;
+ PT_HTTPS = 3;
+ PT_PAC = 4;
+ PT_FALLBACK = 5;
+ PT_PRIVDNS = 6;
+ PT_CAPPORT_API = 7;
+}
+
+// The Dhcp error code is defined in android.net.metrics.DhcpErrorEvent
+enum DhcpErrorCode {
+ ET_UNKNOWN = 0;
+ ET_L2_ERROR = 1;
+ ET_L3_ERROR = 2;
+ ET_L4_ERROR = 3;
+ ET_DHCP_ERROR = 4;
+ ET_MISC_ERROR = 5;
+ /* Reserve for error type
+ // ET_L2_ERROR_TYPE = ET_L2_ERROR << 8;
+ ET_L2_ERROR_TYPE = 256;
+ // ET_L3_ERROR_TYPE = ET_L3_ERROR << 8;
+ ET_L3_ERROR_TYPE = 512;
+ // ET_L4_ERROR_TYPE = ET_L4_ERROR << 8;
+ ET_L4_ERROR_TYPE = 768;
+ // ET_DHCP_ERROR_TYPE = ET_DHCP_ERROR << 8;
+ ET_DHCP_ERROR_TYPE = 1024;
+ // ET_MISC_ERROR_TYPE = ET_MISC_ERROR << 8;
+ ET_MISC_ERROR_TYPE = 1280;
+ */
+ // ET_L2_TOO_SHORT = (ET_L2_ERROR_TYPE | 0x1) << 16;
+ ET_L2_TOO_SHORT = 16842752;
+ // ET_L2_WRONG_ETH_TYPE = (ET_L2_ERROR_TYPE | 0x2) << 16;
+ ET_L2_WRONG_ETH_TYPE = 16908288;
+ // ET_L3_TOO_SHORT = (ET_L3_ERROR_TYPE | 0x1) << 16;
+ ET_L3_TOO_SHORT = 33619968;
+ // ET_L3_NOT_IPV4 = (ET_L3_ERROR_TYPE | 0x2) << 16;
+ ET_L3_NOT_IPV4 = 33685504;
+ // ET_L3_INVALID_IP = (ET_L3_ERROR_TYPE | 0x3) << 16;
+ ET_L3_INVALID_IP = 33751040;
+ // ET_L4_NOT_UDP = (ET_L4_ERROR_TYPE | 0x1) << 16;
+ ET_L4_NOT_UDP = 50397184;
+ // ET_L4_WRONG_PORT = (ET_L4_ERROR_TYPE | 0x2) << 16;
+ ET_L4_WRONG_PORT = 50462720;
+ // ET_BOOTP_TOO_SHORT = (ET_DHCP_ERROR_TYPE | 0x1) << 16;
+ ET_BOOTP_TOO_SHORT = 67174400;
+ // ET_DHCP_BAD_MAGIC_COOKIE = (ET_DHCP_ERROR_TYPE | 0x2) << 16;
+ ET_DHCP_BAD_MAGIC_COOKIE = 67239936;
+ // ET_DHCP_INVALID_OPTION_LENGTH = (ET_DHCP_ERROR_TYPE | 0x3) << 16;
+ ET_DHCP_INVALID_OPTION_LENGTH = 67305472;
+ // ET_DHCP_NO_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x4) << 16;
+ ET_DHCP_NO_MSG_TYPE = 67371008;
+ // ET_DHCP_UNKNOWN_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x5) << 16;
+ ET_DHCP_UNKNOWN_MSG_TYPE = 67436544;
+ // ET_DHCP_NO_COOKIE = (ET_DHCP_ERROR_TYPE | 0x6) << 16;
+ ET_DHCP_NO_COOKIE = 67502080;
+ // ET_BUFFER_UNDERFLOW = (ET_MISC_ERROR_TYPE | 0x1) << 16;
+ ET_BUFFER_UNDERFLOW = 83951616;
+ // ET_RECEIVE_ERROR = (ET_MISC_ERROR_TYPE | 0x2) << 16;
+ ET_RECEIVE_ERROR = 84017152;
+ // ET_PARSING_ERROR = (ET_MISC_ERROR_TYPE | 0x3) << 16;
+ ET_PARSING_ERROR = 84082688;
+}
+
+enum NetworkQuirkEvent {
+ QE_UNKNOWN = 0;
+ QE_IPV6_PROVISIONING_ROUTER_LOST = 1;
+}
+
message NetworkStackEventData {
}
diff --git a/core/res/res/drawable-nodpi/ic_number11.xml b/core/res/res/drawable-nodpi/ic_number11.xml
new file mode 100644
index 000000000000..daad61148c80
--- /dev/null
+++ b/core/res/res/drawable-nodpi/ic_number11.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M5.14,5H1.59a0.88,0.88 0,0 1,-0.88 -0.89V0.88A0.87,0.87 0,0 1,1.59 0H9.36a0.87,0.87 0,0 1,0.88 0.88V23.12a0.88,0.88 0,0 1,-0.88 0.88H6a0.88,0.88 0,0 1,-0.88 -0.88Z"
+ android:fillColor="#000000"/>
+ <path
+ android:pathData="M18.19,5H14.64a0.89,0.89 0,0 1,-0.88 -0.89V0.88A0.88,0.88 0,0 1,14.64 0h7.78a0.87,0.87 0,0 1,0.87 0.88V23.12a0.88,0.88 0,0 1,-0.87 0.88H19.08a0.89,0.89 0,0 1,-0.89 -0.88Z"
+ android:fillColor="#000000"/>
+</vector>
diff --git a/core/res/res/layout-car/car_alert_dialog.xml b/core/res/res/layout-car/car_alert_dialog.xml
new file mode 100644
index 000000000000..569e5948e2e0
--- /dev/null
+++ b/core/res/res/layout-car/car_alert_dialog.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<com.android.internal.widget.AlertDialogLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/parentPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="start|top"
+ android:orientation="vertical">
+
+ <include layout="@layout/car_alert_dialog_title" />
+
+ <FrameLayout
+ android:id="@+id/contentPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp">
+
+ <ScrollView
+ android:id="@+id/scrollView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipToPadding="false">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <Space
+ android:id="@+id/textSpacerNoTitle"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dialog_no_title_padding_top" />
+
+ <TextView
+ android:id="@+id/message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/text_view_start_margin"
+ android:layout_marginEnd="@dimen/text_view_end_margin"
+ style="@style/CarBody2"/>
+
+ <!-- we don't need this spacer, but the id needs to be here for compatibility -->
+ <Space
+ android:id="@+id/textSpacerNoButtons"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="0dp" />
+ </LinearLayout>
+ </ScrollView>
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/customPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp">
+
+ <FrameLayout
+ android:id="@+id/custom"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </FrameLayout>
+
+ <include
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ layout="@layout/car_alert_dialog_button_bar" />
+</com.android.internal.widget.AlertDialogLayout>
diff --git a/core/res/res/layout-car/car_alert_dialog_button_bar.xml b/core/res/res/layout-car/car_alert_dialog_button_bar.xml
new file mode 100644
index 000000000000..277b0dcca657
--- /dev/null
+++ b/core/res/res/layout-car/car_alert_dialog_button_bar.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/buttonPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:scrollbarAlwaysDrawVerticalTrack="true"
+ android:scrollIndicators="top|bottom"
+ android:fillViewport="true"
+ style="?attr/buttonBarStyle">
+ <com.android.internal.widget.ButtonBarLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="@dimen/button_bar_layout_start_padding"
+ android:paddingEnd="@dimen/button_bar_layout_end_padding"
+ android:paddingTop="@dimen/button_bar_layout_top_padding"
+ android:layoutDirection="locale"
+ android:orientation="horizontal"
+ android:gravity="left|center_vertical">
+
+ <Button
+ android:id="@+id/button3"
+ style="@style/CarAction1"
+ android:background="@drawable/car_dialog_button_background"
+ android:layout_marginRight="@dimen/button_end_margin"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/button_layout_height" />
+
+ <Button
+ android:id="@+id/button2"
+ style="@style/CarAction1"
+ android:background="@drawable/car_dialog_button_background"
+ android:layout_marginRight="@dimen/button_end_margin"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/button_layout_height" />
+
+ <Button
+ android:id="@+id/button1"
+ style="@style/CarAction1"
+ android:background="@drawable/car_dialog_button_background"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/button_layout_height" />
+ <Space
+ android:id="@+id/spacer"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:visibility="invisible" />
+ </com.android.internal.widget.ButtonBarLayout>
+</ScrollView>
diff --git a/core/res/res/layout-car/car_alert_dialog_title.xml b/core/res/res/layout-car/car_alert_dialog_title.xml
new file mode 100644
index 000000000000..ba735a649dc2
--- /dev/null
+++ b/core/res/res/layout-car/car_alert_dialog_title.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/topPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="vertical">
+
+ <!-- If the client uses a customTitle, it will be added here. -->
+
+ <RelativeLayout
+ android:id="@+id/title_template"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/car_card_header_height"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="@dimen/image_size"
+ android:layout_height="@dimen/image_size"
+ android:layout_marginStart="@dimen/image_margin_start"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:scaleType="fitCenter"
+ android:src="@null" />
+
+ <com.android.internal.widget.DialogTitle
+ android:id="@+id/alertTitle"
+ android:maxLines="1"
+ android:ellipsize="none"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@+id/icon"
+ android:textAlignment="viewStart"
+ android:layout_centerVertical="true"
+ android:layout_marginStart="@dimen/text_view_start_margin"
+ android:layout_marginEnd="@dimen/text_view_end_margin"
+ style="?attr/windowTitleStyle" />
+ </RelativeLayout>
+
+ <Space
+ android:id="@+id/titleDividerNoCustom"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="0dp" />
+</LinearLayout>
diff --git a/core/res/res/layout/notification_template_material_conversation.xml b/core/res/res/layout/notification_template_material_conversation.xml
index d3857941969b..139185f98b69 100644
--- a/core/res/res/layout/notification_template_material_conversation.xml
+++ b/core/res/res/layout/notification_template_material_conversation.xml
@@ -148,7 +148,6 @@
android:layout_weight="1"
/>
-
<TextView
android:id="@+id/app_name_divider"
android:layout_width="wrap_content"
@@ -174,6 +173,7 @@
android:layout_marginEnd="@dimen/notification_conversation_header_separating_margin"
android:paddingTop="1sp"
android:singleLine="true"
+ android:visibility="gone"
/>
<TextView
@@ -192,7 +192,7 @@
<DateTimeView
android:id="@+id/time"
- android:textAppearance="@style/TextAppearance.Material.Notification.Time"
+ android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index b79c9e804f89..0e11d49c93e5 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4313,10 +4313,6 @@
notifications until they target R -->
<string-array name="config_notificationMsgPkgsAllowedAsConvos" translatable="false"/>
- <!-- Contains a blacklist of apps that should not get pre-installed carrier app permission
- grants, even if the UICC claims that the app should be privileged. See b/138150105 -->
- <string-array name="config_restrictedPreinstalledCarrierApps" translatable="false"/>
-
<!-- Sharesheet: define a max number of targets per application for new shortcuts-based direct share introduced in Q -->
<integer name="config_maxShortcutTargetsPerApp">3</integer>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 4ee919289f28..ebaf85c64a14 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -734,7 +734,7 @@
<dimen name="conversation_icon_container_top_padding">12dp</dimen>
<!-- The top padding of the conversation icon container when the avatar is small-->
- <dimen name="conversation_icon_container_top_padding_small_avatar">17.5dp</dimen>
+ <dimen name="conversation_icon_container_top_padding_small_avatar">9dp</dimen>
<!-- The padding of the conversation header when expanded. This is calculated from the expand button size + notification_content_margin_end -->
<dimen name="conversation_header_expanded_padding_end">38dp</dimen>
diff --git a/core/res/res/values/styles_device_defaults.xml b/core/res/res/values/styles_device_defaults.xml
index e9ac679ec39c..ef019ba92769 100644
--- a/core/res/res/values/styles_device_defaults.xml
+++ b/core/res/res/values/styles_device_defaults.xml
@@ -296,9 +296,12 @@ easier.
<style name="TextAppearance.DeviceDefault.Notification.Info" parent="TextAppearance.Material.Notification.Info">
<item name="fontFamily">@string/config_bodyFontFamily</item>
</style>
+ <style name="TextAppearance.DeviceDefault.Notification.Time" parent="TextAppearance.Material.Notification.Time">
+ <item name="fontFamily">@string/config_bodyFontFamily</item>
+ </style>
<style name="TextAppearance.DeviceDefault.Notification.Conversation.AppName"
- parent="@*android:style/TextAppearance.DeviceDefault.Notification.Title">
- <item name="android:textSize">16sp</item>
+ parent="TextAppearance.Material.Notification.Conversation.AppName">
+ <item name="fontFamily">@string/config_headlineFontFamilyMedium</item>
</style>
<style name="TextAppearance.DeviceDefault.Widget" parent="TextAppearance.Material.Widget">
<item name="fontFamily">@string/config_bodyFontFamily</item>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index 2415837cf826..67536fde9b0b 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -491,6 +491,10 @@ please see styles_device_defaults.xml.
<item name="textColor">#66000000</item>
</style>
+ <style name="TextAppearance.Material.Notification.Conversation.AppName" parent="TextAppearance.Material.Notification.Title">
+ <item name="android:textSize">16sp</item>
+ </style>
+
<style name="TextAppearance.Material.ListItem" parent="TextAppearance.Material.Subhead" />
<style name="TextAppearance.Material.ListItemSecondary" parent="TextAppearance.Material.Body1" />
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c0cb39a56dd6..8e1dc8950155 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3827,10 +3827,10 @@
<java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" />
<java-symbol type="bool" name="config_inflateSignalStrength" />
- <java-symbol type="array" name="config_restrictedPreinstalledCarrierApps" />
<java-symbol type="drawable" name="android_logotype" />
<java-symbol type="layout" name="platlogo_layout" />
+ <java-symbol type="drawable" name="ic_number11" />
<java-symbol type="integer" name="config_notificationWarnRemoteViewSizeBytes" />
<java-symbol type="integer" name="config_notificationStripRemoteViewSizeBytes" />
diff --git a/core/tests/coretests/src/android/view/InsetsControllerTest.java b/core/tests/coretests/src/android/view/InsetsControllerTest.java
index d4c256972b28..964ae21d6086 100644
--- a/core/tests/coretests/src/android/view/InsetsControllerTest.java
+++ b/core/tests/coretests/src/android/view/InsetsControllerTest.java
@@ -678,7 +678,8 @@ public class InsetsControllerTest {
final InsetsState currentState = new InsetsState(mController.getState());
// The caption bar source should be synced with the info in mAttachInfo.
assertEquals(captionFrame, currentState.peekSource(ITYPE_CAPTION_BAR).getFrame());
- assertTrue(currentState.equals(state, true /* excludingCaptionInsets*/));
+ assertTrue(currentState.equals(state, true /* excludingCaptionInsets*/,
+ true /* excludeInvisibleIme */));
mController.setCaptionInsetsHeight(0);
mController.onStateChanged(state);
// The caption bar source should not be there at all, because we don't add empty
diff --git a/core/tests/coretests/src/android/view/InsetsStateTest.java b/core/tests/coretests/src/android/view/InsetsStateTest.java
index cd93eeb857f1..7115acfedcf6 100644
--- a/core/tests/coretests/src/android/view/InsetsStateTest.java
+++ b/core/tests/coretests/src/android/view/InsetsStateTest.java
@@ -276,6 +276,15 @@ public class InsetsStateTest {
}
@Test
+ public void testEquals_excludeInvisibleIme() {
+ mState.getSource(ITYPE_IME).setFrame(new Rect(0, 0, 100, 100));
+ mState.getSource(ITYPE_IME).setVisible(false);
+ mState2.getSource(ITYPE_IME).setFrame(new Rect(0, 0, 100, 200));
+ mState2.getSource(ITYPE_IME).setVisible(false);
+ assertTrue(mState2.equals(mState, true, true /* excludeInvisibleIme */));
+ }
+
+ @Test
public void testParcelUnparcel() {
mState.getSource(ITYPE_IME).setFrame(new Rect(0, 0, 100, 100));
mState.getSource(ITYPE_IME).setVisibleFrame(new Rect(0, 0, 50, 10));
diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
index 547176855f32..49de7c80057f 100644
--- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
@@ -21,6 +21,7 @@ import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.swipeUp;
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.hasSibling;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
@@ -299,9 +300,8 @@ public class ChooserActivityTest {
public void fourOptionsStackedIntoOneTarget() throws InterruptedException {
Intent sendIntent = createSendTextIntent();
- // create 12 unique app targets to ensure the app ranking row can be filled, otherwise
- // targets will not stack
- List<ResolvedComponentInfo> resolvedComponentInfos = createResolvedComponentsForTest(12);
+ // create just enough targets to ensure the a-z list should be shown
+ List<ResolvedComponentInfo> resolvedComponentInfos = createResolvedComponentsForTest(1);
// next create 4 targets in a single app that should be stacked into a single target
String packageName = "xxx.yyy";
@@ -328,8 +328,8 @@ public class ChooserActivityTest {
.launchActivity(Intent.createChooser(sendIntent, null));
waitForIdle();
- // expect 12 unique targets + 1 group + 4 ranked app targets
- assertThat(activity.getAdapter().getCount(), is(17));
+ // expect 1 unique targets + 1 group + 4 ranked app targets
+ assertThat(activity.getAdapter().getCount(), is(6));
ResolveInfo[] chosen = new ResolveInfo[1];
sOverrides.onSafelyStartCallback = targetInfo -> {
@@ -337,7 +337,7 @@ public class ChooserActivityTest {
return true;
};
- onView(withText(appName)).perform(click());
+ onView(allOf(withText(appName), hasSibling(withText("")))).perform(click());
waitForIdle();
// clicking will launch a dialog to choose the activity within the app
diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserWrapperActivity.java b/core/tests/coretests/src/com/android/internal/app/ChooserWrapperActivity.java
index 44a52639bd35..0f6b51f82116 100644
--- a/core/tests/coretests/src/com/android/internal/app/ChooserWrapperActivity.java
+++ b/core/tests/coretests/src/com/android/internal/app/ChooserWrapperActivity.java
@@ -222,6 +222,11 @@ public class ChooserWrapperActivity extends ChooserActivity {
super.queryTargetServices(adapter);
}
+ @Override
+ protected boolean isQuietModeEnabled(UserHandle userHandle) {
+ return sOverrides.isQuietModeEnabled;
+ }
+
/**
* We cannot directly mock the activity created since instrumentation creates it.
* <p>
diff --git a/core/tests/overlaytests/remount/Android.bp b/core/tests/overlaytests/remount/Android.bp
index 4e79a4574af4..939334c94312 100644
--- a/core/tests/overlaytests/remount/Android.bp
+++ b/core/tests/overlaytests/remount/Android.bp
@@ -19,6 +19,9 @@ java_test_host {
"tradefed",
"junit",
],
+ static_libs: [
+ "frameworks-base-hostutils",
+ ],
test_suites: ["general-tests"],
java_resources: [
":com.android.overlaytest.overlaid",
diff --git a/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/OverlayRemountedTestBase.java b/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/OverlayRemountedTestBase.java
index 14b5bf6eacba..1a39e20f9a2b 100644
--- a/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/OverlayRemountedTestBase.java
+++ b/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/OverlayRemountedTestBase.java
@@ -18,6 +18,7 @@ package com.android.overlaytest.remounted;
import static org.junit.Assert.fail;
+import com.android.internal.util.test.SystemPreparer;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
diff --git a/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/SystemPreparer.java b/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/SystemPreparer.java
deleted file mode 100644
index bb72d0ee1d03..000000000000
--- a/core/tests/overlaytests/remount/src/com/android/overlaytest/remounted/SystemPreparer.java
+++ /dev/null
@@ -1,151 +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.overlaytest.remounted;
-
-import static org.junit.Assert.assertTrue;
-
-import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.ITestDevice;
-
-import org.junit.Assert;
-import org.junit.rules.ExternalResource;
-import org.junit.rules.TemporaryFolder;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-class SystemPreparer extends ExternalResource {
- private static final long OVERLAY_ENABLE_TIMEOUT_MS = 30000;
-
- // The paths of the files pushed onto the device through this rule.
- private ArrayList<String> mPushedFiles = new ArrayList<>();
-
- // The package names of packages installed through this rule.
- private ArrayList<String> mInstalledPackages = new ArrayList<>();
-
- private final TemporaryFolder mHostTempFolder;
- private final DeviceProvider mDeviceProvider;
-
- SystemPreparer(TemporaryFolder hostTempFolder, DeviceProvider deviceProvider) {
- mHostTempFolder = hostTempFolder;
- mDeviceProvider = deviceProvider;
- }
-
- /** Copies a file within the host test jar to a path on device. */
- SystemPreparer pushResourceFile(String resourcePath,
- String outputPath) throws DeviceNotAvailableException, IOException {
- final ITestDevice device = mDeviceProvider.getDevice();
- remount();
- assertTrue(device.pushFile(copyResourceToTemp(resourcePath), outputPath));
- mPushedFiles.add(outputPath);
- return this;
- }
-
- /** Installs an APK within the host test jar onto the device. */
- SystemPreparer installResourceApk(String resourcePath, String packageName)
- throws DeviceNotAvailableException, IOException {
- final ITestDevice device = mDeviceProvider.getDevice();
- final File tmpFile = copyResourceToTemp(resourcePath);
- final String result = device.installPackage(tmpFile, true /* reinstall */);
- Assert.assertNull(result);
- mInstalledPackages.add(packageName);
- return this;
- }
-
- /** Sets the enable state of an overlay package. */
- SystemPreparer setOverlayEnabled(String packageName, boolean enabled)
- throws DeviceNotAvailableException {
- final ITestDevice device = mDeviceProvider.getDevice();
- final String enable = enabled ? "enable" : "disable";
-
- // Wait for the overlay to change its enabled state.
- final long endMillis = System.currentTimeMillis() + OVERLAY_ENABLE_TIMEOUT_MS;
- String result;
- while (System.currentTimeMillis() <= endMillis) {
- device.executeShellCommand(String.format("cmd overlay %s %s", enable, packageName));
- result = device.executeShellCommand("cmd overlay dump isenabled "
- + packageName);
- if (((enabled) ? "true\n" : "false\n").equals(result)) {
- return this;
- }
-
- try {
- Thread.sleep(200);
- } catch (InterruptedException ignore) {
- }
- }
-
- throw new IllegalStateException(String.format("Failed to %s overlay %s:\n%s", enable,
- packageName, device.executeShellCommand("cmd overlay list")));
- }
-
- /** Restarts the device and waits until after boot is completed. */
- SystemPreparer reboot() throws DeviceNotAvailableException {
- final ITestDevice device = mDeviceProvider.getDevice();
- device.reboot();
- return this;
- }
-
- SystemPreparer remount() throws DeviceNotAvailableException {
- mDeviceProvider.getDevice().executeAdbCommand("remount");
- return this;
- }
-
- /** Copies a file within the host test jar to a temporary file on the host machine. */
- private File copyResourceToTemp(String resourcePath) throws IOException {
- final File tempFile = mHostTempFolder.newFile(resourcePath);
- final ClassLoader classLoader = getClass().getClassLoader();
- try (InputStream assetIs = classLoader.getResource(resourcePath).openStream();
- FileOutputStream assetOs = new FileOutputStream(tempFile)) {
- if (assetIs == null) {
- throw new IllegalStateException("Failed to find resource " + resourcePath);
- }
-
- int b;
- while ((b = assetIs.read()) >= 0) {
- assetOs.write(b);
- }
- }
-
- return tempFile;
- }
-
- /** Removes installed packages and files that were pushed to the device. */
- @Override
- protected void after() {
- final ITestDevice device = mDeviceProvider.getDevice();
- try {
- remount();
- for (final String file : mPushedFiles) {
- device.deleteFile(file);
- }
- for (final String packageName : mInstalledPackages) {
- device.uninstallPackage(packageName);
- }
- device.reboot();
- } catch (DeviceNotAvailableException e) {
- Assert.fail(e.toString());
- }
- }
-
- interface DeviceProvider {
- ITestDevice getDevice();
- }
-}
diff --git a/libs/incident/Android.bp b/libs/incident/Android.bp
index af6411011411..d291ec001daf 100644
--- a/libs/incident/Android.bp
+++ b/libs/incident/Android.bp
@@ -95,7 +95,17 @@ cc_test {
name: "libincident_test",
test_config: "AndroidTest.xml",
defaults: ["libincidentpriv_defaults"],
- test_suites: ["device-tests"],
+ test_suites: ["device-tests", "mts"],
+ compile_multilib: "both",
+ multilib: {
+ lib64: {
+ suffix: "64",
+ },
+ lib32: {
+ suffix: "32",
+ },
+ },
+ require_root: true,
include_dirs: [
"frameworks/base/libs/incident/include",
diff --git a/libs/incident/AndroidTest.xml b/libs/incident/AndroidTest.xml
index 7c0b04471d13..b6b3f8596826 100644
--- a/libs/incident/AndroidTest.xml
+++ b/libs/incident/AndroidTest.xml
@@ -16,13 +16,17 @@
<configuration description="Config for libincident_test">
<option name="test-suite-tag" value="device-tests" />
<option name="config-descriptor:metadata" key="component" value="misc" />
- <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
<option name="cleanup" value="true" />
<option name="push" value="libincident_test->/data/local/tmp/libincident_test" />
+ <option name="append-bitness" value="true" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
<option name="module-name" value="libincident_test" />
</test>
+ <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
+ <option name="mainline-module-package-name" value="com.google.android.os.statsd" />
+ </object>
</configuration>
diff --git a/libs/incident/TEST_MAPPING b/libs/incident/TEST_MAPPING
index 59ebe7664b5f..25e000092ecf 100644
--- a/libs/incident/TEST_MAPPING
+++ b/libs/incident/TEST_MAPPING
@@ -2,9 +2,6 @@
"presubmit": [
{
"name": "libincident_test"
- },
- {
- "name": "GtsLibIncidentTests"
}
]
}
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index a112bdd0ce03..7d15bbd46697 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -2583,9 +2583,15 @@ public class LocationManager {
}
public void cancel() {
+ remove();
+ }
+
+ private Consumer<Location> remove() {
+ Consumer<Location> consumer;
ICancellationSignal cancellationSignal;
synchronized (this) {
mExecutor = null;
+ consumer = mConsumer;
mConsumer = null;
if (mAlarmManager != null) {
@@ -2605,6 +2611,8 @@ public class LocationManager {
// ignore
}
}
+
+ return consumer;
}
public void fail() {
@@ -2663,16 +2671,10 @@ public class LocationManager {
}
private void acceptResult(Location location) {
- Consumer<Location> consumer;
- synchronized (this) {
- if (mConsumer == null) {
- return;
- }
- consumer = mConsumer;
- cancel();
+ Consumer<Location> consumer = remove();
+ if (consumer != null) {
+ consumer.accept(location);
}
-
- consumer.accept(location);
}
}
diff --git a/media/java/android/media/IMediaRouterClient.aidl b/media/java/android/media/IMediaRouterClient.aidl
index 240ae796f957..53122bb990d6 100644
--- a/media/java/android/media/IMediaRouterClient.aidl
+++ b/media/java/android/media/IMediaRouterClient.aidl
@@ -23,4 +23,5 @@ oneway interface IMediaRouterClient {
void onStateChanged();
void onRestoreRoute();
void onSelectedRouteChanged(String routeId);
+ void onGlobalA2dpChanged(boolean a2dpOn);
}
diff --git a/media/java/android/media/MediaRoute2Info.java b/media/java/android/media/MediaRoute2Info.java
index e5ad569bb24f..54c0bc94c2d0 100644
--- a/media/java/android/media/MediaRoute2Info.java
+++ b/media/java/android/media/MediaRoute2Info.java
@@ -317,9 +317,10 @@ public final class MediaRoute2Info implements Parcelable {
@ConnectionState
final int mConnectionState;
final String mClientPackageName;
- final int mVolume;
- final int mVolumeMax;
final int mVolumeHandling;
+ final int mVolumeMax;
+ final int mVolume;
+ final String mAddress;
final Bundle mExtras;
final String mProviderId;
@@ -336,6 +337,7 @@ public final class MediaRoute2Info implements Parcelable {
mVolumeHandling = builder.mVolumeHandling;
mVolumeMax = builder.mVolumeMax;
mVolume = builder.mVolume;
+ mAddress = builder.mAddress;
mExtras = builder.mExtras;
mProviderId = builder.mProviderId;
}
@@ -353,6 +355,7 @@ public final class MediaRoute2Info implements Parcelable {
mVolumeHandling = in.readInt();
mVolumeMax = in.readInt();
mVolume = in.readInt();
+ mAddress = in.readString();
mExtras = in.readBundle();
mProviderId = in.readString();
}
@@ -483,6 +486,15 @@ public final class MediaRoute2Info implements Parcelable {
return mVolume;
}
+ /**
+ * Gets the hardware address of the route if available.
+ * @hide
+ */
+ @Nullable
+ public String getAddress() {
+ return mAddress;
+ }
+
@Nullable
public Bundle getExtras() {
return mExtras == null ? null : new Bundle(mExtras);
@@ -564,6 +576,7 @@ public final class MediaRoute2Info implements Parcelable {
&& (mVolumeHandling == other.mVolumeHandling)
&& (mVolumeMax == other.mVolumeMax)
&& (mVolume == other.mVolume)
+ && Objects.equals(mAddress, other.mAddress)
&& Objects.equals(mProviderId, other.mProviderId);
}
@@ -572,7 +585,7 @@ public final class MediaRoute2Info implements Parcelable {
// Note: mExtras is not included.
return Objects.hash(mId, mName, mFeatures, mType, mIsSystem, mIconUri, mDescription,
mConnectionState, mClientPackageName, mVolumeHandling, mVolumeMax, mVolume,
- mProviderId);
+ mAddress, mProviderId);
}
@Override
@@ -614,6 +627,7 @@ public final class MediaRoute2Info implements Parcelable {
dest.writeInt(mVolumeHandling);
dest.writeInt(mVolumeMax);
dest.writeInt(mVolume);
+ dest.writeString(mAddress);
dest.writeBundle(mExtras);
dest.writeString(mProviderId);
}
@@ -637,6 +651,7 @@ public final class MediaRoute2Info implements Parcelable {
int mVolumeHandling = PLAYBACK_VOLUME_FIXED;
int mVolumeMax;
int mVolume;
+ String mAddress;
Bundle mExtras;
String mProviderId;
@@ -669,24 +684,7 @@ public final class MediaRoute2Info implements Parcelable {
* @param routeInfo the existing instance to copy data from.
*/
public Builder(@NonNull MediaRoute2Info routeInfo) {
- Objects.requireNonNull(routeInfo, "routeInfo must not be null");
-
- mId = routeInfo.mId;
- mName = routeInfo.mName;
- mFeatures = new ArrayList<>(routeInfo.mFeatures);
- mType = routeInfo.mType;
- mIsSystem = routeInfo.mIsSystem;
- mIconUri = routeInfo.mIconUri;
- mDescription = routeInfo.mDescription;
- mConnectionState = routeInfo.mConnectionState;
- mClientPackageName = routeInfo.mClientPackageName;
- mVolumeHandling = routeInfo.mVolumeHandling;
- mVolumeMax = routeInfo.mVolumeMax;
- mVolume = routeInfo.mVolume;
- if (routeInfo.mExtras != null) {
- mExtras = new Bundle(routeInfo.mExtras);
- }
- mProviderId = routeInfo.mProviderId;
+ this(routeInfo.mId, routeInfo);
}
/**
@@ -715,6 +713,7 @@ public final class MediaRoute2Info implements Parcelable {
mVolumeHandling = routeInfo.mVolumeHandling;
mVolumeMax = routeInfo.mVolumeMax;
mVolume = routeInfo.mVolume;
+ mAddress = routeInfo.mAddress;
if (routeInfo.mExtras != null) {
mExtras = new Bundle(routeInfo.mExtras);
}
@@ -865,6 +864,16 @@ public final class MediaRoute2Info implements Parcelable {
}
/**
+ * Sets the hardware address of the route.
+ * @hide
+ */
+ @NonNull
+ public Builder setAddress(String address) {
+ mAddress = address;
+ return this;
+ }
+
+ /**
* Sets a bundle of extras for the route.
* <p>
* Note: The extras will not affect the result of {@link MediaRoute2Info#equals(Object)}.
diff --git a/media/java/android/media/MediaRoute2ProviderService.java b/media/java/android/media/MediaRoute2ProviderService.java
index 05c6e3ad9392..e199cf49db9a 100644
--- a/media/java/android/media/MediaRoute2ProviderService.java
+++ b/media/java/android/media/MediaRoute2ProviderService.java
@@ -40,8 +40,10 @@ import com.android.internal.annotations.GuardedBy;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Deque;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -132,15 +134,21 @@ public abstract class MediaRoute2ProviderService extends Service {
@Retention(RetentionPolicy.SOURCE)
public @interface Reason {}
+ private static final int MAX_REQUEST_IDS_SIZE = 500;
+
private final Handler mHandler;
private final Object mSessionLock = new Object();
+ private final Object mRequestIdsLock = new Object();
private final AtomicBoolean mStatePublishScheduled = new AtomicBoolean(false);
private MediaRoute2ProviderServiceStub mStub;
private IMediaRoute2ProviderServiceCallback mRemoteCallback;
private volatile MediaRoute2ProviderInfo mProviderInfo;
+ @GuardedBy("mRequestIdsLock")
+ private final Deque<Long> mRequestIds = new ArrayDeque<>(MAX_REQUEST_IDS_SIZE);
+
@GuardedBy("mSessionLock")
- private ArrayMap<String, RoutingSessionInfo> mSessionInfo = new ArrayMap<>();
+ private final ArrayMap<String, RoutingSessionInfo> mSessionInfo = new ArrayMap<>();
public MediaRoute2ProviderService() {
mHandler = new Handler(Looper.getMainLooper());
@@ -230,10 +238,15 @@ public abstract class MediaRoute2ProviderService extends Service {
@NonNull RoutingSessionInfo sessionInfo) {
Objects.requireNonNull(sessionInfo, "sessionInfo must not be null");
+ if (requestId != REQUEST_ID_NONE && !removeRequestId(requestId)) {
+ Log.w(TAG, "notifySessionCreated: The requestId doesn't exist. requestId=" + requestId);
+ return;
+ }
+
String sessionId = sessionInfo.getId();
synchronized (mSessionLock) {
if (mSessionInfo.containsKey(sessionId)) {
- Log.w(TAG, "Ignoring duplicate session id.");
+ Log.w(TAG, "notifySessionCreated: Ignoring duplicate session id.");
return;
}
mSessionInfo.put(sessionInfo.getId(), sessionInfo);
@@ -261,7 +274,7 @@ public abstract class MediaRoute2ProviderService extends Service {
if (mSessionInfo.containsKey(sessionId)) {
mSessionInfo.put(sessionId, sessionInfo);
} else {
- Log.w(TAG, "Ignoring unknown session info.");
+ Log.w(TAG, "notifySessionUpdated: Ignoring unknown session info.");
return;
}
@@ -291,7 +304,7 @@ public abstract class MediaRoute2ProviderService extends Service {
sessionInfo = mSessionInfo.remove(sessionId);
if (sessionInfo == null) {
- Log.w(TAG, "Ignoring unknown session info.");
+ Log.w(TAG, "notifySessionReleased: Ignoring unknown session info.");
return;
}
@@ -301,7 +314,7 @@ public abstract class MediaRoute2ProviderService extends Service {
try {
mRemoteCallback.notifySessionReleased(sessionInfo);
} catch (RemoteException ex) {
- Log.w(TAG, "Failed to notify session info changed.");
+ Log.w(TAG, "Failed to notify session released.", ex);
}
}
}
@@ -322,6 +335,13 @@ public abstract class MediaRoute2ProviderService extends Service {
if (mRemoteCallback == null) {
return;
}
+
+ if (!removeRequestId(requestId)) {
+ Log.w(TAG, "notifyRequestFailed: The requestId doesn't exist. requestId="
+ + requestId);
+ return;
+ }
+
try {
mRemoteCallback.notifyRequestFailed(requestId, reason);
} catch (RemoteException ex) {
@@ -465,7 +485,37 @@ public abstract class MediaRoute2ProviderService extends Service {
try {
mRemoteCallback.updateState(mProviderInfo);
} catch (RemoteException ex) {
- Log.w(TAG, "Failed to send onProviderInfoUpdated");
+ Log.w(TAG, "Failed to publish provider state.", ex);
+ }
+ }
+
+ /**
+ * Adds a requestId in the request ID list whose max size is {@link #MAX_REQUEST_IDS_SIZE}.
+ * When the max size is reached, the first element is removed (FIFO).
+ */
+ private void addRequestId(long requestId) {
+ synchronized (mRequestIdsLock) {
+ if (mRequestIds.size() >= MAX_REQUEST_IDS_SIZE) {
+ mRequestIds.removeFirst();
+ }
+ mRequestIds.addLast(requestId);
+ }
+ }
+
+ /**
+ * Removes the given {@code requestId} from received request ID list.
+ * <p>
+ * Returns whether the list contains the {@code requestId}. These are the cases when the list
+ * doesn't contain the given {@code requestId}:
+ * <ul>
+ * <li>This service has never received a request with the requestId. </li>
+ * <li>{@link #notifyRequestFailed} or {@link #notifySessionCreated} already has been called
+ * for the requestId. </li>
+ * </ul>
+ */
+ private boolean removeRequestId(long requestId) {
+ synchronized (mRequestIdsLock) {
+ return mRequestIds.removeFirstOccurrence(requestId);
}
}
@@ -529,6 +579,7 @@ public abstract class MediaRoute2ProviderService extends Service {
if (!checkRouteIdIsValid(routeId, "setRouteVolume")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onSetRouteVolume,
MediaRoute2ProviderService.this, requestId, routeId, volume));
}
@@ -542,6 +593,7 @@ public abstract class MediaRoute2ProviderService extends Service {
if (!checkRouteIdIsValid(routeId, "requestCreateSession")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onCreateSession,
MediaRoute2ProviderService.this, requestId, packageName, routeId,
requestCreateSession));
@@ -556,6 +608,7 @@ public abstract class MediaRoute2ProviderService extends Service {
|| !checkRouteIdIsValid(routeId, "selectRoute")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onSelectRoute,
MediaRoute2ProviderService.this, requestId, sessionId, routeId));
}
@@ -569,6 +622,7 @@ public abstract class MediaRoute2ProviderService extends Service {
|| !checkRouteIdIsValid(routeId, "deselectRoute")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onDeselectRoute,
MediaRoute2ProviderService.this, requestId, sessionId, routeId));
}
@@ -582,6 +636,7 @@ public abstract class MediaRoute2ProviderService extends Service {
|| !checkRouteIdIsValid(routeId, "transferToRoute")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onTransferToRoute,
MediaRoute2ProviderService.this, requestId, sessionId, routeId));
}
@@ -594,6 +649,7 @@ public abstract class MediaRoute2ProviderService extends Service {
if (!checkSessionIdIsValid(sessionId, "setSessionVolume")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onSetSessionVolume,
MediaRoute2ProviderService.this, requestId, sessionId, volume));
}
@@ -606,6 +662,7 @@ public abstract class MediaRoute2ProviderService extends Service {
if (!checkSessionIdIsValid(sessionId, "releaseSession")) {
return;
}
+ addRequestId(requestId);
mHandler.sendMessage(obtainMessage(MediaRoute2ProviderService::onReleaseSession,
MediaRoute2ProviderService.this, requestId, sessionId));
}
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index 12fc3a60cf28..7ae2949e6074 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -621,33 +621,27 @@ public class MediaRouter {
final class Client extends IMediaRouterClient.Stub {
@Override
public void onStateChanged() {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- if (Client.this == mClient) {
- updateClientState();
- }
+ mHandler.post(() -> {
+ if (Client.this == mClient) {
+ updateClientState();
}
});
}
@Override
public void onRestoreRoute() {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- // Skip restoring route if the selected route is not a system audio route,
- // MediaRouter is initializing, or mClient was changed.
- if (Client.this != mClient || mSelectedRoute == null
- || (mSelectedRoute != mDefaultAudioVideo
- && mSelectedRoute != mBluetoothA2dpRoute)) {
- return;
- }
- if (DEBUG) {
- Log.d(TAG, "onRestoreRoute() : route=" + mSelectedRoute);
- }
- mSelectedRoute.select();
+ mHandler.post(() -> {
+ // Skip restoring route if the selected route is not a system audio route,
+ // MediaRouter is initializing, or mClient was changed.
+ if (Client.this != mClient || mSelectedRoute == null
+ || (mSelectedRoute != mDefaultAudioVideo
+ && mSelectedRoute != mBluetoothA2dpRoute)) {
+ return;
+ }
+ if (DEBUG) {
+ Log.d(TAG, "onRestoreRoute() : route=" + mSelectedRoute);
}
+ mSelectedRoute.select();
});
}
@@ -659,6 +653,19 @@ public class MediaRouter {
}
});
}
+
+ // Called when the selection of a connected device (phone speaker or BT devices)
+ // is changed.
+ @Override
+ public void onGlobalA2dpChanged(boolean a2dpOn) {
+ mHandler.post(() -> {
+ if (mSelectedRoute == mDefaultAudioVideo && a2dpOn) {
+ setSelectedRoute(mBluetoothA2dpRoute, false);
+ } else if (mSelectedRoute == mBluetoothA2dpRoute && !a2dpOn) {
+ setSelectedRoute(mDefaultAudioVideo, false);
+ }
+ });
+ }
}
}
diff --git a/media/java/android/media/MediaRouter2.java b/media/java/android/media/MediaRouter2.java
index e767c68f13ac..0f538a57a5ee 100644
--- a/media/java/android/media/MediaRouter2.java
+++ b/media/java/android/media/MediaRouter2.java
@@ -196,7 +196,7 @@ public final class MediaRouter2 {
try {
mMediaRouterService.setDiscoveryRequestWithRouter2(mStub, mDiscoveryPreference);
} catch (RemoteException ex) {
- Log.e(TAG, "registerRouteCallback: Unable to set discovery request.");
+ Log.e(TAG, "registerRouteCallback: Unable to set discovery request.", ex);
}
}
}
@@ -214,7 +214,7 @@ public final class MediaRouter2 {
if (!mRouteCallbackRecords.remove(
new RouteCallbackRecord(null, routeCallback, null))) {
- Log.w(TAG, "Ignoring unknown callback");
+ Log.w(TAG, "unregisterRouteCallback: Ignoring unknown callback");
return;
}
@@ -227,7 +227,7 @@ public final class MediaRouter2 {
mMediaRouterService.setDiscoveryRequestWithRouter2(
mStub, mDiscoveryPreference);
} catch (RemoteException ex) {
- Log.e(TAG, "unregisterRouteCallback: Unable to set discovery request.");
+ Log.e(TAG, "unregisterRouteCallback: Unable to set discovery request.", ex);
}
}
if (mRouteCallbackRecords.isEmpty() && mNonSystemRoutingControllers.isEmpty()) {
@@ -500,7 +500,7 @@ public final class MediaRouter2 {
try {
mMediaRouterService.setRouteVolumeWithRouter2(stub, route, volume);
} catch (RemoteException ex) {
- Log.e(TAG, "Unable to send control request.", ex);
+ Log.e(TAG, "Unable to set route volume.", ex);
}
}
}
@@ -788,7 +788,8 @@ public final class MediaRouter2 {
mMediaRouterService.notifySessionHintsForCreatingSession(
stub, uniqueRequestId, route, controllerHints);
} catch (RemoteException ex) {
- Log.e(TAG, "getSessionHintsOnHandler: Unable to request.", ex);
+ Log.e(TAG, "onGetControllerHintsForCreatingSessionOnHandler: Unable to notify "
+ + " session hints for creating session.", ex);
}
}
}
@@ -1120,7 +1121,7 @@ public final class MediaRouter2 {
Objects.requireNonNull(route, "route must not be null");
synchronized (mControllerLock) {
if (mIsReleased) {
- Log.w(TAG, "selectRoute() called on released controller. Ignoring.");
+ Log.w(TAG, "selectRoute: Called on released controller. Ignoring.");
return;
}
}
@@ -1169,7 +1170,7 @@ public final class MediaRouter2 {
Objects.requireNonNull(route, "route must not be null");
synchronized (mControllerLock) {
if (mIsReleased) {
- Log.w(TAG, "deselectRoute() called on released controller. Ignoring.");
+ Log.w(TAG, "deselectRoute: called on released controller. Ignoring.");
return;
}
}
@@ -1216,7 +1217,7 @@ public final class MediaRouter2 {
Objects.requireNonNull(route, "route must not be null");
synchronized (mControllerLock) {
if (mIsReleased) {
- Log.w(TAG, "transferToRoute() called on released controller. Ignoring.");
+ Log.w(TAG, "transferToRoute: Called on released controller. Ignoring.");
return;
}
@@ -1254,17 +1255,17 @@ public final class MediaRouter2 {
*/
public void setVolume(int volume) {
if (getVolumeHandling() == MediaRoute2Info.PLAYBACK_VOLUME_FIXED) {
- Log.w(TAG, "setVolume: the routing session has fixed volume. Ignoring.");
+ Log.w(TAG, "setVolume: The routing session has fixed volume. Ignoring.");
return;
}
if (volume < 0 || volume > getVolumeMax()) {
- Log.w(TAG, "setVolume: the target volume is out of range. Ignoring");
+ Log.w(TAG, "setVolume: The target volume is out of range. Ignoring");
return;
}
synchronized (mControllerLock) {
if (mIsReleased) {
- Log.w(TAG, "setVolume is called on released controller. Ignoring.");
+ Log.w(TAG, "setVolume: Called on released controller. Ignoring.");
return;
}
}
@@ -1298,7 +1299,7 @@ public final class MediaRouter2 {
boolean releaseInternal(boolean shouldReleaseSession, boolean shouldNotifyStop) {
synchronized (mControllerLock) {
if (mIsReleased) {
- Log.w(TAG, "releaseInternal() called on released controller. Ignoring.");
+ Log.w(TAG, "releaseInternal: Called on released controller. Ignoring.");
return false;
}
mIsReleased = true;
diff --git a/media/java/android/media/MediaRouter2Manager.java b/media/java/android/media/MediaRouter2Manager.java
index 1c2d581b733d..a18cfccb6cb2 100644
--- a/media/java/android/media/MediaRouter2Manager.java
+++ b/media/java/android/media/MediaRouter2Manager.java
@@ -121,7 +121,7 @@ public final class MediaRouter2Manager {
CallbackRecord callbackRecord = new CallbackRecord(executor, callback);
if (!mCallbackRecords.addIfAbsent(callbackRecord)) {
- Log.w(TAG, "Ignoring to add the same callback twice.");
+ Log.w(TAG, "Ignoring to register the same callback twice.");
return;
}
}
@@ -384,7 +384,7 @@ public final class MediaRouter2Manager {
int requestId = mNextRequestId.getAndIncrement();
mMediaRouterService.setRouteVolumeWithManager(client, requestId, route, volume);
} catch (RemoteException ex) {
- Log.e(TAG, "Unable to send control request.", ex);
+ Log.e(TAG, "Unable to set route volume.", ex);
}
}
}
@@ -414,7 +414,7 @@ public final class MediaRouter2Manager {
mMediaRouterService.setSessionVolumeWithManager(
client, requestId, sessionInfo.getId(), volume);
} catch (RemoteException ex) {
- Log.e(TAG, "Unable to send control request.", ex);
+ Log.e(TAG, "Unable to set session volume.", ex);
}
}
}
diff --git a/media/java/android/media/soundtrigger_middleware/RecognitionEvent.aidl b/media/java/android/media/soundtrigger_middleware/RecognitionEvent.aidl
index de4d060ce484..a237ec1aa3b3 100644
--- a/media/java/android/media/soundtrigger_middleware/RecognitionEvent.aidl
+++ b/media/java/android/media/soundtrigger_middleware/RecognitionEvent.aidl
@@ -43,9 +43,9 @@ parcelable RecognitionEvent {
boolean triggerInData;
/**
* Audio format of either the trigger in event data or to use for capture of the rest of the
- * utterance.
+ * utterance. May be null when no audio is available for this event type.
*/
- AudioConfig audioConfig;
+ @nullable AudioConfig audioConfig;
/** Additional data. */
byte[] data;
}
diff --git a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
index 957558107de9..638a842e4e5f 100644
--- a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
+++ b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
@@ -593,11 +593,16 @@ public class MediaRouter2ManagerTest {
final int failureReason = REASON_REJECTED;
final CountDownLatch onRequestFailedLatch = new CountDownLatch(1);
+ final CountDownLatch onRequestFailedSecondCallLatch = new CountDownLatch(1);
addManagerCallback(new MediaRouter2Manager.Callback() {
@Override
public void onRequestFailed(int reason) {
if (reason == failureReason) {
- onRequestFailedLatch.countDown();
+ if (onRequestFailedLatch.getCount() > 0) {
+ onRequestFailedLatch.countDown();
+ } else {
+ onRequestFailedSecondCallLatch.countDown();
+ }
}
}
});
@@ -609,6 +614,11 @@ public class MediaRouter2ManagerTest {
final long validRequestId = requestIds.get(0);
instance.notifyRequestFailed(validRequestId, failureReason);
assertTrue(onRequestFailedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
+
+ // Test calling notifyRequestFailed() multiple times with the same valid requestId.
+ // onRequestFailed() shouldn't be called since the requestId has been already handled.
+ instance.notifyRequestFailed(validRequestId, failureReason);
+ assertFalse(onRequestFailedSecondCallLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
}
@Test
diff --git a/packages/CarSystemUI/res/values/colors.xml b/packages/CarSystemUI/res/values/colors.xml
index d20ab49a22e6..ab9426593535 100644
--- a/packages/CarSystemUI/res/values/colors.xml
+++ b/packages/CarSystemUI/res/values/colors.xml
@@ -15,7 +15,6 @@
~ limitations under the License
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <color name="nav_bar_ripple_background_color">#40ffffff</color>
<!-- colors for user switcher -->
<color name="car_user_switcher_background_color">#000000</color>
<color name="car_user_switcher_name_text_color">@*android:color/car_body1_light</color>
diff --git a/packages/CarSystemUI/res/values/styles.xml b/packages/CarSystemUI/res/values/styles.xml
index 7fc69e6d5d8f..e76373d4a4f7 100644
--- a/packages/CarSystemUI/res/values/styles.xml
+++ b/packages/CarSystemUI/res/values/styles.xml
@@ -37,13 +37,9 @@
<item name="android:textColor">@*android:color/car_grey_50</item>
</style>
- <style name="CarNavigationBarButtonTheme">
- <item name="android:colorControlHighlight">@color/nav_bar_ripple_background_color</item>
- </style>
-
<style name="NavigationBarButton">
<item name="android:layout_height">96dp</item>
<item name="android:layout_width">96dp</item>
- <item name="android:background">@*android:drawable/item_background_material</item>
+ <item name="android:background">?android:attr/selectableItemBackground</item>
</style>
</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
index 2dad5f872e73..69766cc6c0d0 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
@@ -103,6 +103,7 @@ public class CarKeyguardViewController extends OverlayViewController implements
private KeyguardBouncer mBouncer;
private OnKeyguardCancelClickedListener mKeyguardCancelClickedListener;
private boolean mShowing;
+ private boolean mIsOccluded;
@Inject
public CarKeyguardViewController(
@@ -220,6 +221,7 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override
public void setOccluded(boolean occluded, boolean animate) {
+ mIsOccluded = occluded;
getOverlayViewGlobalStateController().setOccluded(occluded);
if (!occluded) {
reset(/* hideBouncerWhenShowing= */ false);
@@ -244,6 +246,12 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override
public void dismissAndCollapse() {
+ // If dismissing and collapsing Keyguard is requested (e.g. by a Keyguard-dismissing
+ // Activity) while Keyguard is occluded, unocclude Keyguard so the user can authenticate to
+ // dismiss Keyguard.
+ if (mIsOccluded) {
+ setOccluded(/* occluded= */ false, /* animate= */ false);
+ }
if (!mBouncer.isSecure()) {
hide(/* startTime= */ 0, /* fadeoutDuration= */ 0);
}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java
index 6d140cae5442..7d353f5acd9a 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java
@@ -16,6 +16,7 @@
package com.android.systemui.car.notification;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.car.CarDeviceProvisionedController;
import com.android.systemui.car.navigationbar.CarNavigationBarController;
import com.android.systemui.car.window.OverlayPanelViewController;
@@ -37,6 +38,7 @@ public class BottomNotificationPanelViewMediator extends NotificationPanelViewMe
NotificationPanelViewController notificationPanelViewController,
PowerManagerHelper powerManagerHelper,
+ BroadcastDispatcher broadcastDispatcher,
CarDeviceProvisionedController carDeviceProvisionedController,
ConfigurationController configurationController
@@ -44,6 +46,7 @@ public class BottomNotificationPanelViewMediator extends NotificationPanelViewMe
super(carNavigationBarController,
notificationPanelViewController,
powerManagerHelper,
+ broadcastDispatcher,
carDeviceProvisionedController,
configurationController);
notificationPanelViewController.setOverlayDirection(
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java
index 41349b284147..0c185bae8199 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java
@@ -17,10 +17,17 @@
package com.android.systemui.car.notification;
import android.car.hardware.power.CarPowerManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.content.res.Configuration;
+import android.os.UserHandle;
+import android.util.Log;
import androidx.annotation.CallSuper;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.car.CarDeviceProvisionedController;
import com.android.systemui.car.navigationbar.CarNavigationBarController;
import com.android.systemui.car.window.OverlayViewMediator;
@@ -37,18 +44,36 @@ import javax.inject.Singleton;
public class NotificationPanelViewMediator implements OverlayViewMediator,
ConfigurationController.ConfigurationListener {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "NotificationPanelVM";
+
private final CarNavigationBarController mCarNavigationBarController;
private final NotificationPanelViewController mNotificationPanelViewController;
private final PowerManagerHelper mPowerManagerHelper;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final CarDeviceProvisionedController mCarDeviceProvisionedController;
private final ConfigurationController mConfigurationController;
+ private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (DEBUG) Log.v(TAG, "onReceive: " + intent);
+ String action = intent.getAction();
+ if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
+ if (mNotificationPanelViewController.isPanelExpanded()) {
+ mNotificationPanelViewController.toggle();
+ }
+ }
+ }
+ };
+
@Inject
public NotificationPanelViewMediator(
CarNavigationBarController carNavigationBarController,
NotificationPanelViewController notificationPanelViewController,
PowerManagerHelper powerManagerHelper,
+ BroadcastDispatcher broadcastDispatcher,
CarDeviceProvisionedController carDeviceProvisionedController,
ConfigurationController configurationController
@@ -56,6 +81,7 @@ public class NotificationPanelViewMediator implements OverlayViewMediator,
mCarNavigationBarController = carNavigationBarController;
mNotificationPanelViewController = notificationPanelViewController;
mPowerManagerHelper = powerManagerHelper;
+ mBroadcastDispatcher = broadcastDispatcher;
mCarDeviceProvisionedController = carDeviceProvisionedController;
mConfigurationController = configurationController;
}
@@ -84,6 +110,9 @@ public class NotificationPanelViewMediator implements OverlayViewMediator,
return mNotificationPanelViewController.isPanelExpanded();
}
});
+
+ mBroadcastDispatcher.registerReceiver(mBroadcastReceiver,
+ new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), null, UserHandle.ALL);
}
@Override
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java
index 8d3eb4c2bbee..89c9931ac76e 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java
@@ -16,6 +16,7 @@
package com.android.systemui.car.notification;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.car.CarDeviceProvisionedController;
import com.android.systemui.car.navigationbar.CarNavigationBarController;
import com.android.systemui.car.window.OverlayPanelViewController;
@@ -37,6 +38,7 @@ public class TopNotificationPanelViewMediator extends NotificationPanelViewMedia
NotificationPanelViewController notificationPanelViewController,
PowerManagerHelper powerManagerHelper,
+ BroadcastDispatcher broadcastDispatcher,
CarDeviceProvisionedController carDeviceProvisionedController,
ConfigurationController configurationController
@@ -44,6 +46,7 @@ public class TopNotificationPanelViewMediator extends NotificationPanelViewMedia
super(carNavigationBarController,
notificationPanelViewController,
powerManagerHelper,
+ broadcastDispatcher,
carDeviceProvisionedController,
configurationController);
notificationPanelViewController.setOverlayDirection(
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 8f919c3d86ca..f42bf1982b36 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -95,7 +95,8 @@ public class ExternalStorageProvider extends FileSystemProvider {
public String docId;
public File visiblePath;
public File path;
- public boolean reportAvailableBytes = true;
+ // TODO (b/157033915): Make getFreeBytes() faster
+ public boolean reportAvailableBytes = false;
}
private static final String ROOT_ID_PRIMARY_EMULATED =
@@ -520,9 +521,11 @@ public class ExternalStorageProvider extends FileSystemProvider {
final RootInfo root = resolvedDocId.first;
File child = resolvedDocId.second;
+ final File rootFile = root.visiblePath != null ? root.visiblePath
+ : root.path;
final File parent = TextUtils.isEmpty(parentDocId)
- ? root.path
- : getFileForDocId(parentDocId);
+ ? rootFile
+ : getFileForDocId(parentDocId);
return new Path(parentDocId == null ? root.rootId : null, findDocumentPath(parent, child));
}
diff --git a/packages/OsuLogin/Android.bp b/packages/OsuLogin/Android.bp
index d7e36b164811..445c81b89273 100644
--- a/packages/OsuLogin/Android.bp
+++ b/packages/OsuLogin/Android.bp
@@ -1,5 +1,6 @@
android_app {
name: "OsuLogin",
+ defaults: ["wifi-module-sdk-version-defaults"],
static_libs: ["androidx.legacy_legacy-support-v4"],
resource_dirs: ["res"],
srcs: ["src/**/*.java"],
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 2b51b54a2fe3..e17c0f015ff8 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -57,7 +57,7 @@
<string name="osu_sign_up_complete" msgid="7640183358878916847">"اكتمل الاشتراك. جارٍ الاتصال…"</string>
<string name="speed_label_very_slow" msgid="8526005255731597666">"بطيئة جدًا"</string>
<string name="speed_label_slow" msgid="6069917670665664161">"بطيئة"</string>
- <string name="speed_label_okay" msgid="1253594383880810424">"حسنًا"</string>
+ <string name="speed_label_okay" msgid="1253594383880810424">"جيدة"</string>
<string name="speed_label_medium" msgid="9078405312828606976">"متوسطة"</string>
<string name="speed_label_fast" msgid="2677719134596044051">"سريعة"</string>
<string name="speed_label_very_fast" msgid="8215718029533182439">"سريعة جدًا"</string>
@@ -557,5 +557,5 @@
<string name="cached_apps_freezer_disabled" msgid="4816382260660472042">"غير مفعّل"</string>
<string name="cached_apps_freezer_enabled" msgid="8866703500183051546">"مفعّل"</string>
<string name="cached_apps_freezer_reboot_dialog_text" msgid="695330563489230096">"يجب إعادة تشغيل جهازك ليتم تطبيق هذا التغيير. يمكنك إعادة التشغيل الآن أو إلغاء التغيير."</string>
- <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"سمّاعة رأس سلكية"</string>
+ <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"سمّاعة سلكية"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index fe2a7751bead..6b0ae2e24bb6 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -57,7 +57,7 @@
<string name="osu_sign_up_complete" msgid="7640183358878916847">"Anmeldung abgeschlossen. Verbindung wird hergestellt…"</string>
<string name="speed_label_very_slow" msgid="8526005255731597666">"Sehr langsam"</string>
<string name="speed_label_slow" msgid="6069917670665664161">"Langsam"</string>
- <string name="speed_label_okay" msgid="1253594383880810424">"Ok"</string>
+ <string name="speed_label_okay" msgid="1253594383880810424">"Mittel"</string>
<string name="speed_label_medium" msgid="9078405312828606976">"Mittel"</string>
<string name="speed_label_fast" msgid="2677719134596044051">"Schnell"</string>
<string name="speed_label_very_fast" msgid="8215718029533182439">"Sehr schnell"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 2644cb987e3a..4d7c88287f72 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -465,7 +465,7 @@
<item msgid="8894873528875953317">"50%"</item>
<item msgid="7529124349186240216">"100%"</item>
</string-array>
- <string name="charge_length_format" msgid="6941645744588690932">"Πριν από <xliff:g id="ID_1">%1$s</xliff:g>"</string>
+ <string name="charge_length_format" msgid="6941645744588690932">"Πριν <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="remaining_length_format" msgid="4310625772926171089">"Απομένουν <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="screen_zoom_summary_small" msgid="6050633151263074260">"Μικρά"</string>
<string name="screen_zoom_summary_default" msgid="1888865694033865408">"Προεπιλογή"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 0ef8e0677d6d..0def17e1c21a 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -553,5 +553,5 @@
<string name="cached_apps_freezer_disabled" msgid="4816382260660472042">"Disabled"</string>
<string name="cached_apps_freezer_enabled" msgid="8866703500183051546">"Enabled"</string>
<string name="cached_apps_freezer_reboot_dialog_text" msgid="695330563489230096">"Your device must be rebooted for this change to apply. Reboot now or cancel."</string>
- <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphone"</string>
+ <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphones"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 0ef8e0677d6d..0def17e1c21a 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -553,5 +553,5 @@
<string name="cached_apps_freezer_disabled" msgid="4816382260660472042">"Disabled"</string>
<string name="cached_apps_freezer_enabled" msgid="8866703500183051546">"Enabled"</string>
<string name="cached_apps_freezer_reboot_dialog_text" msgid="695330563489230096">"Your device must be rebooted for this change to apply. Reboot now or cancel."</string>
- <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphone"</string>
+ <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphones"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 0ef8e0677d6d..0def17e1c21a 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -553,5 +553,5 @@
<string name="cached_apps_freezer_disabled" msgid="4816382260660472042">"Disabled"</string>
<string name="cached_apps_freezer_enabled" msgid="8866703500183051546">"Enabled"</string>
<string name="cached_apps_freezer_reboot_dialog_text" msgid="695330563489230096">"Your device must be rebooted for this change to apply. Reboot now or cancel."</string>
- <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphone"</string>
+ <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphones"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 0ef8e0677d6d..0def17e1c21a 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -553,5 +553,5 @@
<string name="cached_apps_freezer_disabled" msgid="4816382260660472042">"Disabled"</string>
<string name="cached_apps_freezer_enabled" msgid="8866703500183051546">"Enabled"</string>
<string name="cached_apps_freezer_reboot_dialog_text" msgid="695330563489230096">"Your device must be rebooted for this change to apply. Reboot now or cancel."</string>
- <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphone"</string>
+ <string name="media_transfer_wired_usb_device_name" msgid="7699141088423210903">"Wired headphones"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 9735c163857d..42ccd5310913 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -347,8 +347,8 @@
<string name="disable_overlays_summary" msgid="1954852414363338166">"Selalu gunakan GPU untuk pengomposisian layar"</string>
<string name="simulate_color_space" msgid="1206503300335835151">"Simulasikan ruang warna"</string>
<string name="enable_opengl_traces_title" msgid="4638773318659125196">"Aktifkan jejak OpenGL"</string>
- <string name="usb_audio_disable_routing" msgid="3367656923544254975">"Perutean audio USB nonaktif"</string>
- <string name="usb_audio_disable_routing_summary" msgid="8768242894849534699">"Perutean otomatis ke periferal audio USB nonaktif"</string>
+ <string name="usb_audio_disable_routing" msgid="3367656923544254975">"Pemilihan rute audio USB nonaktif"</string>
+ <string name="usb_audio_disable_routing_summary" msgid="8768242894849534699">"Pemilihan rute otomatis ke periferal audio USB nonaktif"</string>
<string name="debug_layout" msgid="1659216803043339741">"Tampilkan batas tata letak"</string>
<string name="debug_layout_summary" msgid="8825829038287321978">"Tampilkan batas klip, margin, dll."</string>
<string name="force_rtl_layout_all_locales" msgid="8690762598501599796">"Paksa arah tata letak RTL"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index efc186aa24bb..24711ff92d05 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -64,10 +64,10 @@
<string name="wifi_passpoint_expired" msgid="6540867261754427561">"Scaduta"</string>
<string name="preference_summary_default_combination" msgid="2644094566845577901">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="7739366554710388701">"Disconnesso"</string>
- <string name="bluetooth_disconnecting" msgid="7638892134401574338">"Disconnessione..."</string>
- <string name="bluetooth_connecting" msgid="5871702668260192755">"Connessione..."</string>
+ <string name="bluetooth_disconnecting" msgid="7638892134401574338">"Disconnessione…"</string>
+ <string name="bluetooth_connecting" msgid="5871702668260192755">"Connessione…"</string>
<string name="bluetooth_connected" msgid="8065345572198502293">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso"</string>
- <string name="bluetooth_pairing" msgid="4269046942588193600">"Accoppiamento..."</string>
+ <string name="bluetooth_pairing" msgid="4269046942588193600">"Accoppiamento…"</string>
<string name="bluetooth_connected_no_headset" msgid="2224101138659967604">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso (telefono escluso)"</string>
<string name="bluetooth_connected_no_a2dp" msgid="8566874395813947092">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso (contenuti multimediali esclusi)"</string>
<string name="bluetooth_connected_no_map" msgid="3381860077002724689">"<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g> connesso (nessun accesso ai messaggi)"</string>
@@ -406,11 +406,11 @@
<string name="select_webview_provider_dialog_title" msgid="2444261109877277714">"Imposta l\'implementazione di WebView"</string>
<string name="select_webview_provider_toast_text" msgid="8512254949169359848">"La selezione non è più valida. Riprova."</string>
<string name="convert_to_file_encryption" msgid="2828976934129751818">"Converti in crittografia basata su file"</string>
- <string name="convert_to_file_encryption_enabled" msgid="840757431284311754">"Converti..."</string>
+ <string name="convert_to_file_encryption_enabled" msgid="840757431284311754">"Converti…"</string>
<string name="convert_to_file_encryption_done" msgid="8965831011811180627">"Crittografia su base file già eseguita"</string>
<string name="title_convert_fbe" msgid="5780013350366495149">"Conversione in crittografia basata su file"</string>
- <string name="convert_to_fbe_warning" msgid="34294381569282109">"Converti la partizione di dati in crittografia basata su file.\n Attenzione. Questa operazione eliminerà tutti i tuoi dati.\n Questa funzione è in versione alpha, pertanto potrebbe non funzionare correttamente.\n Premi \"Cancella e converti...\" per continuare."</string>
- <string name="button_convert_fbe" msgid="1159861795137727671">"Cancella e converti..."</string>
+ <string name="convert_to_fbe_warning" msgid="34294381569282109">"Converti la partizione di dati in crittografia basata su file.\n Attenzione. Questa operazione eliminerà tutti i tuoi dati.\n Questa funzione è in versione alpha, pertanto potrebbe non funzionare correttamente.\n Premi \"Cancella e converti…\" per continuare."</string>
+ <string name="button_convert_fbe" msgid="1159861795137727671">"Cancella e converti…"</string>
<string name="picture_color_mode" msgid="1013807330552931903">"Modalità colori immagini"</string>
<string name="picture_color_mode_desc" msgid="151780973768136200">"Use sRGB"</string>
<string name="daltonizer_mode_disabled" msgid="403424372812399228">"Disattivato"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index fd5dfa5c9e8b..1120c504717f 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -514,7 +514,7 @@
<string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"Problem z połączeniem. Wyłącz i ponownie włącz urządzenie"</string>
<string name="media_transfer_wired_device_name" msgid="4447880899964056007">"Przewodowe urządzenie audio"</string>
<string name="help_label" msgid="3528360748637781274">"Pomoc i opinie"</string>
- <string name="storage_category" msgid="2287342585424631813">"Pamięć"</string>
+ <string name="storage_category" msgid="2287342585424631813">"Pamięć wewnętrzna"</string>
<string name="shared_data_title" msgid="1017034836800864953">"Udostępniane dane"</string>
<string name="shared_data_summary" msgid="5516326713822885652">"Wyświetl i zmień udostępniane dane"</string>
<string name="shared_data_no_blobs_text" msgid="3108114670341737434">"Brak udostępnionych danych w przypadku tego użytkownika."</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index b501c656a680..7e1b476b7a0c 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -195,7 +195,7 @@
</string-array>
<string name="choose_profile" msgid="343803890897657450">"Chọn hồ sơ"</string>
<string name="category_personal" msgid="6236798763159385225">"Cá nhân"</string>
- <string name="category_work" msgid="4014193632325996115">"Cơ quan"</string>
+ <string name="category_work" msgid="4014193632325996115">"Công việc"</string>
<string name="development_settings_title" msgid="140296922921597393">"Tùy chọn cho nhà phát triển"</string>
<string name="development_settings_enable" msgid="4285094651288242183">"Bật tùy chọn nhà phát triển"</string>
<string name="development_settings_summary" msgid="8718917813868735095">"Đặt tùy chọn cho phát triển ứng dụng"</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java b/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java
index b83a9c4835e0..6c7e03f104dd 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java
@@ -56,7 +56,7 @@ import java.util.concurrent.Executors;
public class InfoMediaManager extends MediaManager {
private static final String TAG = "InfoMediaManager";
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);;
+ private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
@VisibleForTesting
final RouterManagerCallback mMediaRouterCallback = new RouterManagerCallback();
@VisibleForTesting
@@ -430,7 +430,7 @@ public class InfoMediaManager extends MediaManager {
case TYPE_HEARING_AID:
case TYPE_BLUETOOTH_A2DP:
final BluetoothDevice device =
- BluetoothAdapter.getDefaultAdapter().getRemoteDevice(route.getOriginalId());
+ BluetoothAdapter.getDefaultAdapter().getRemoteDevice(route.getAddress());
final CachedBluetoothDevice cachedDevice =
mBluetoothManager.getCachedDeviceManager().findDevice(device);
if (cachedDevice != null) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java b/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
index f381cde31f83..9d06c8467e41 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/LocalMediaManager.java
@@ -20,7 +20,6 @@ import static android.media.MediaRoute2ProviderService.REASON_UNKNOWN_ERROR;
import android.app.Notification;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothProfile;
import android.content.Context;
import android.media.RoutingSessionInfo;
import android.text.TextUtils;
@@ -409,7 +408,8 @@ public class LocalMediaManager implements BluetoothCallback {
synchronized (mMediaDevicesLock) {
for (MediaDevice device : mMediaDevices) {
if (device instanceof BluetoothMediaDevice) {
- if (isActiveDevice(((BluetoothMediaDevice) device).getCachedDevice())) {
+ if (isActiveDevice(((BluetoothMediaDevice) device).getCachedDevice())
+ && device.isConnected()) {
return device;
}
} else if (device instanceof PhoneMediaDevice) {
@@ -422,8 +422,22 @@ public class LocalMediaManager implements BluetoothCallback {
}
private boolean isActiveDevice(CachedBluetoothDevice device) {
- return device.isActiveDevice(BluetoothProfile.A2DP)
- || device.isActiveDevice(BluetoothProfile.HEARING_AID);
+ boolean isActiveDeviceA2dp = false;
+ boolean isActiveDeviceHearingAid = false;
+ final A2dpProfile a2dpProfile = mLocalBluetoothManager.getProfileManager().getA2dpProfile();
+ if (a2dpProfile != null) {
+ isActiveDeviceA2dp = device.getDevice().equals(a2dpProfile.getActiveDevice());
+ }
+ if (!isActiveDeviceA2dp) {
+ final HearingAidProfile hearingAidProfile = mLocalBluetoothManager.getProfileManager()
+ .getHearingAidProfile();
+ if (hearingAidProfile != null) {
+ isActiveDeviceHearingAid =
+ hearingAidProfile.getActiveDevices().contains(device.getDevice());
+ }
+ }
+
+ return isActiveDeviceA2dp || isActiveDeviceHearingAid;
}
private Collection<DeviceCallback> getCallbacks() {
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InfoMediaManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InfoMediaManagerTest.java
index 248eb5b96b92..94d95f06050d 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InfoMediaManagerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InfoMediaManagerTest.java
@@ -681,7 +681,7 @@ public class InfoMediaManagerTest {
assertThat(mInfoMediaManager.mMediaDevices.get(0) instanceof PhoneMediaDevice).isTrue();
when(route2Info.getType()).thenReturn(TYPE_BLUETOOTH_A2DP);
- when(route2Info.getOriginalId()).thenReturn("00:00:00:00:00:00");
+ when(route2Info.getAddress()).thenReturn("00:00:00:00:00:00");
when(mLocalBluetoothManager.getCachedDeviceManager())
.thenReturn(cachedBluetoothDeviceManager);
when(cachedBluetoothDeviceManager.findDevice(any(BluetoothDevice.class)))
@@ -703,7 +703,7 @@ public class InfoMediaManagerTest {
mock(CachedBluetoothDeviceManager.class);
when(route2Info.getType()).thenReturn(TYPE_BLUETOOTH_A2DP);
- when(route2Info.getOriginalId()).thenReturn("00:00:00:00:00:00");
+ when(route2Info.getAddress()).thenReturn("00:00:00:00:00:00");
when(mLocalBluetoothManager.getCachedDeviceManager())
.thenReturn(cachedBluetoothDeviceManager);
when(cachedBluetoothDeviceManager.findDevice(any(BluetoothDevice.class)))
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
index 368245f2002d..a654fd47ea12 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/LocalMediaManagerTest.java
@@ -578,6 +578,9 @@ public class LocalMediaManagerTest {
when(cachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
when(cachedDevice.isConnected()).thenReturn(false);
when(cachedDevice.getConnectableProfiles()).thenReturn(profiles);
+ when(cachedDevice.getDevice()).thenReturn(bluetoothDevice);
+ when(mA2dpProfile.getActiveDevice()).thenReturn(bluetoothDevice);
+ when(mHapProfile.getActiveDevices()).thenReturn(new ArrayList<>());
when(device1.getId()).thenReturn(TEST_DEVICE_ID_1);
when(device2.getId()).thenReturn(TEST_DEVICE_ID_2);
@@ -734,11 +737,19 @@ public class LocalMediaManagerTest {
final PhoneMediaDevice phoneDevice = mock(PhoneMediaDevice.class);
final CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
final CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class);
+ final BluetoothDevice bluetoothDevice1 = mock(BluetoothDevice.class);
+ final BluetoothDevice bluetoothDevice2 = mock(BluetoothDevice.class);
+ when(mA2dpProfile.getActiveDevice()).thenReturn(bluetoothDevice2);
+ when(mHapProfile.getActiveDevices()).thenReturn(new ArrayList<>());
when(device1.getCachedDevice()).thenReturn(cachedDevice1);
when(device2.getCachedDevice()).thenReturn(cachedDevice2);
+ when(cachedDevice1.getDevice()).thenReturn(bluetoothDevice1);
+ when(cachedDevice2.getDevice()).thenReturn(bluetoothDevice2);
when(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).thenReturn(false);
when(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).thenReturn(true);
+ when(device1.isConnected()).thenReturn(true);
+ when(device2.isConnected()).thenReturn(true);
mLocalMediaManager.mMediaDevices.add(device1);
mLocalMediaManager.mMediaDevices.add(phoneDevice);
@@ -754,11 +765,19 @@ public class LocalMediaManagerTest {
final PhoneMediaDevice phoneDevice = mock(PhoneMediaDevice.class);
final CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class);
final CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class);
+ final BluetoothDevice bluetoothDevice1 = mock(BluetoothDevice.class);
+ final BluetoothDevice bluetoothDevice2 = mock(BluetoothDevice.class);
+ when(mA2dpProfile.getActiveDevice()).thenReturn(null);
+ when(mHapProfile.getActiveDevices()).thenReturn(new ArrayList<>());
when(device1.getCachedDevice()).thenReturn(cachedDevice1);
when(device2.getCachedDevice()).thenReturn(cachedDevice2);
+ when(cachedDevice1.getDevice()).thenReturn(bluetoothDevice1);
+ when(cachedDevice2.getDevice()).thenReturn(bluetoothDevice2);
when(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).thenReturn(false);
when(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).thenReturn(false);
+ when(device1.isConnected()).thenReturn(true);
+ when(device2.isConnected()).thenReturn(true);
mLocalMediaManager.mMediaDevices.add(device1);
mLocalMediaManager.mMediaDevices.add(phoneDevice);
diff --git a/packages/SystemUI/docs/broadcasts.md b/packages/SystemUI/docs/broadcasts.md
index 6c8488b332c2..8ec20f5689ff 100644
--- a/packages/SystemUI/docs/broadcasts.md
+++ b/packages/SystemUI/docs/broadcasts.md
@@ -62,7 +62,7 @@ Acquire the dispatcher by using `@Inject` to obtain a `BroadcastDispatcher`. The
* @param executor An executor to dispatch [BroadcastReceiver.onReceive]. Pass null to use an
* executor in the main thread (default).
* @param user A user handle to determine which broadcast should be dispatched to this receiver.
- * By default, it is the current user.
+ * By default, it is the user of the context (system user in SystemUI).
* @throws IllegalArgumentException if the filter has other constraints that are not actions or
* categories or the filter has no actions.
*/
diff --git a/packages/SystemUI/res-product/values-ne/strings.xml b/packages/SystemUI/res-product/values-ne/strings.xml
index 81a063c721cf..148cb51fd902 100644
--- a/packages/SystemUI/res-product/values-ne/strings.xml
+++ b/packages/SystemUI/res-product/values-ne/strings.xml
@@ -21,7 +21,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="dock_alignment_slow_charging" product="default" msgid="6997633396534416792">"अझ छिटो चार्ज गर्न फोनलाई फेरि मिलाउनुहोस्"</string>
<string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"तारविनै चार्ज गर्न फोनलाई फेरि मिलाउनुहोस्"</string>
- <string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Android TV यन्त्र चाँडै निष्क्रिय हुने छ; सक्रिय राख्न कुनै बटन थिच्नुहोस्।"</string>
+ <string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Android टिभी यन्त्र चाँडै निष्क्रिय हुने छ; सक्रिय राख्न कुनै बटन थिच्नुहोस्।"</string>
<string name="inattentive_sleep_warning_message" product="default" msgid="5693904520452332224">"यो यन्त्र चाँडै निष्क्रिय हुने छ; सक्रिय राख्न थिच्नुहोस्।"</string>
<string name="keyguard_missing_sim_message" product="tablet" msgid="5018086454277963787">"ट्याब्लेटमा SIM कार्ड छैन।"</string>
<string name="keyguard_missing_sim_message" product="default" msgid="7053347843877341391">"फोनमा SIM कार्ड छैन।"</string>
diff --git a/packages/SystemUI/res/layout/bubbles_manage_button_education.xml b/packages/SystemUI/res/layout/bubbles_manage_button_education.xml
index 0cabc3245152..7313d54c599a 100644
--- a/packages/SystemUI/res/layout/bubbles_manage_button_education.xml
+++ b/packages/SystemUI/res/layout/bubbles_manage_button_education.xml
@@ -17,30 +17,72 @@
<com.android.systemui.bubbles.BubbleManageEducationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
+ android:layout_height="match_parent"
+ >
<LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:id="@+id/manage_education_view"
+ android:clickable="true"
+ android:paddingTop="28dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="@dimen/bubble_expanded_view_padding"
+ android:paddingEnd="48dp"
+ android:layout_marginEnd="24dp"
android:orientation="vertical"
- android:layout_height="wrap_content"
- android:layout_width="@dimen/bubbles_manage_education_width">
+ android:background="@drawable/bubble_stack_user_education_bg"
+ android:alpha="0.9"
+ >
+
+ <TextView
+ android:id="@+id/user_education_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingBottom="16dp"
+ android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
+ android:maxLines="1"
+ android:text="@string/bubbles_user_education_manage_title"
+ android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/>
<TextView
android:id="@+id/user_education_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="8dp"
+ android:paddingStart="16dp"
+ android:paddingBottom="24dp"
android:text="@string/bubbles_user_education_manage"
android:fontFamily="@*android:string/config_bodyFontFamily"
- android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"
- android:background="@drawable/bubble_manage_user_education_bg"
- />
+ android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"/>
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:orientation="horizontal" >
- <View
- android:id="@+id/user_education_pointer"
- android:layout_width="@dimen/bubble_pointer_width"
- android:layout_height="@dimen/bubble_pointer_height"
- />
+ <com.android.systemui.statusbar.AlphaOptimizedButton
+ style="@android:style/Widget.Material.Button.Borderless"
+ android:id="@+id/manage"
+ android:layout_gravity="start"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="true"
+ android:clickable="false"
+ android:text="@string/manage_bubbles_text"
+ android:textColor="?attr/wallpaperTextColor"
+ android:alpha="0.89"
+ />
+ <com.android.systemui.statusbar.AlphaOptimizedButton
+ style="@android:style/Widget.Material.Button.Borderless"
+ android:id="@+id/got_it"
+ android:layout_gravity="start"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="true"
+ android:text="@string/bubbles_user_education_got_it"
+ android:textColor="?attr/wallpaperTextColor"
+ />
+ </LinearLayout>
</LinearLayout>
</com.android.systemui.bubbles.BubbleManageEducationView> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/global_screenshot.xml b/packages/SystemUI/res/layout/global_screenshot.xml
index fce4610b934b..ef7325ea8f38 100644
--- a/packages/SystemUI/res/layout/global_screenshot.xml
+++ b/packages/SystemUI/res/layout/global_screenshot.xml
@@ -30,11 +30,10 @@
android:id="@+id/global_screenshot_animated_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_gravity="top|start"
android:visibility="gone"
android:elevation="@dimen/screenshot_preview_elevation"
- android:background="@drawable/screenshot_rounded_corners"
- android:adjustViewBounds="true"/>
+ android:background="@drawable/screenshot_rounded_corners" />
<ImageView
android:id="@+id/global_screenshot_flash"
android:layout_width="match_parent"
@@ -49,4 +48,18 @@
android:visibility="gone"
android:pointerIcon="crosshair"/>
<include layout="@layout/global_screenshot_static"/>
+ <FrameLayout
+ android:id="@+id/global_screenshot_dismiss_button"
+ android:layout_width="@dimen/screenshot_dismiss_button_tappable_size"
+ android:layout_height="@dimen/screenshot_dismiss_button_tappable_size"
+ android:elevation="7dp"
+ android:visibility="gone"
+ android:contentDescription="@string/screenshot_dismiss_ui_description">
+ <ImageView
+ android:id="@+id/global_screenshot_dismiss_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="@dimen/screenshot_dismiss_button_margin"
+ android:src="@drawable/screenshot_cancel"/>
+ </FrameLayout>
</FrameLayout>
diff --git a/packages/SystemUI/res/layout/global_screenshot_static.xml b/packages/SystemUI/res/layout/global_screenshot_static.xml
index da5277ce3876..9ec2f20597e7 100644
--- a/packages/SystemUI/res/layout/global_screenshot_static.xml
+++ b/packages/SystemUI/res/layout/global_screenshot_static.xml
@@ -54,22 +54,4 @@
android:layout_height="wrap_content"/>
</HorizontalScrollView>
<include layout="@layout/global_screenshot_preview"/>
- <FrameLayout
- android:id="@+id/global_screenshot_dismiss_button"
- android:layout_width="@dimen/screenshot_dismiss_button_tappable_size"
- android:layout_height="@dimen/screenshot_dismiss_button_tappable_size"
- android:elevation="7dp"
- android:visibility="gone"
- android:contentDescription="@string/screenshot_dismiss_ui_description"
- app:layout_constraintStart_toEndOf="@+id/global_screenshot_preview"
- app:layout_constraintEnd_toEndOf="@+id/global_screenshot_preview"
- app:layout_constraintTop_toTopOf="@+id/global_screenshot_preview"
- app:layout_constraintBottom_toTopOf="@+id/global_screenshot_preview">
- <ImageView
- android:id="@+id/global_screenshot_dismiss_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="@dimen/screenshot_dismiss_button_margin"
- android:src="@drawable/screenshot_cancel"/>
- </FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
index 21a671cf9d5a..214c44a41c5c 100644
--- a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
+++ b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
@@ -20,24 +20,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
+ android:paddingTop="1dp"
+ android:paddingBottom="1dp"
android:paddingEnd="12dp">
<FrameLayout
android:layout_width="@*android:dimen/conversation_content_start"
- android:layout_height="36dp"
+ android:layout_height="25dp"
>
<ImageView
android:id="@*android:id/conversation_icon"
- android:layout_width="24dp"
- android:layout_height="24dp"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
android:layout_gravity="center"
/>
<ViewStub
android:id="@*android:id/conversation_face_pile"
android:layout="@*android:layout/conversation_face_pile_layout"
- android:layout_width="36dp"
- android:layout_height="36dp"
+ android:layout_width="25dp"
+ android:layout_height="25dp"
android:layout_gravity="center"
/>
</FrameLayout>
diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml
index d721818d6e54..a722fbfce19a 100644
--- a/packages/SystemUI/res/layout/media_view.xml
+++ b/packages/SystemUI/res/layout/media_view.xml
@@ -39,7 +39,7 @@
android:layout_alignParentLeft="true"
android:fontFamily="@*android:string/config_bodyFontFamily"
android:textColor="@color/media_primary_text"
- android:gravity="left"
+ android:gravity="start"
android:textSize="14sp" />
<TextView
@@ -49,7 +49,7 @@
android:layout_alignParentRight="true"
android:fontFamily="@*android:string/config_bodyFontFamily"
android:textColor="@color/media_primary_text"
- android:gravity="right"
+ android:gravity="end"
android:textSize="14sp" />
</FrameLayout>
diff --git a/packages/SystemUI/res/layout/notification_conversation_info.xml b/packages/SystemUI/res/layout/notification_conversation_info.xml
index 49d525fc189a..2c4b937ce95b 100644
--- a/packages/SystemUI/res/layout/notification_conversation_info.xml
+++ b/packages/SystemUI/res/layout/notification_conversation_info.xml
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:clipChildren="false"
- android:paddingTop="8dp"
+ android:paddingTop="11dp"
android:clipToPadding="true">
<ImageView
android:id="@+id/conversation_icon"
@@ -85,20 +85,20 @@
style="@style/TextAppearance.NotificationImportanceChannel"/>
</LinearLayout>
<TextView
- android:id="@+id/pkg_name"
+ android:id="@+id/group_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/TextAppearance.NotificationImportanceChannelGroup"
android:ellipsize="end"
android:textDirection="locale"
- android:maxLines="1"/>
+ style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
<TextView
- android:id="@+id/group_name"
+ android:id="@+id/pkg_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="@style/TextAppearance.NotificationImportanceApp"
android:ellipsize="end"
android:textDirection="locale"
- style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
+ android:maxLines="1"/>
<TextView
android:id="@+id/delegate_name"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/notification_info.xml b/packages/SystemUI/res/layout/notification_info.xml
index 870deacd87ae..1c7c22653f9f 100644
--- a/packages/SystemUI/res/layout/notification_info.xml
+++ b/packages/SystemUI/res/layout/notification_info.xml
@@ -59,20 +59,20 @@
android:textDirection="locale"
style="@style/TextAppearance.NotificationImportanceChannel"/>
<TextView
- android:id="@+id/pkg_name"
+ android:id="@+id/group_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/TextAppearance.NotificationImportanceChannelGroup"
- android:ellipsize="end"
android:textDirection="locale"
- android:maxLines="1"/>
+ android:ellipsize="end"
+ style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
<TextView
- android:id="@+id/group_name"
+ android:id="@+id/pkg_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textDirection="locale"
+ style="@style/TextAppearance.NotificationImportanceApp"
android:ellipsize="end"
- style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
+ android:textDirection="locale"
+ android:maxLines="1"/>
<TextView
android:id="@+id/delegate_name"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/partial_conversation_info.xml b/packages/SystemUI/res/layout/partial_conversation_info.xml
index ecc311893497..07951705664a 100644
--- a/packages/SystemUI/res/layout/partial_conversation_info.xml
+++ b/packages/SystemUI/res/layout/partial_conversation_info.xml
@@ -113,18 +113,21 @@
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
+ android:layout_centerVertical="true"
android:orientation="horizontal">
<ImageView
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_width="wrap_content"
android:contentDescription="@null"
android:src="@drawable/ic_info"
+ android:layout_centerVertical="true"
android:tint="?android:attr/textColorPrimary"
android:layout_marginEnd="8dp"/>
<TextView
android:id="@+id/non_configurable_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
style="@style/TextAppearance.NotificationImportanceChannelGroup" />
</LinearLayout>
</com.android.systemui.statusbar.notification.row.ButtonLinearLayout>
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 88102b2adc94..48b25b0773e4 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Vee alles uit"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Bestuur"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Geskiedenis"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Inkomend"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nuut"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Stil"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Kennisgewings"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Gesprekke"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Beweeg na regs bo"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Beweeg na links onder"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Beweeg na regs onder"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Maak borrel toe"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Moenie dat gesprek \'n borrel word nie"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Klets met borrels"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nuwe gesprekke verskyn as swerwende ikone, of borrels Tik op borrel om dit oop te maak. Sleep om dit te skuif."</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 66c0131d6671..9a75c1c0879c 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ሁሉንም አጽዳ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ያቀናብሩ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ታሪክ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ገቢ"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"አዲስ"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ጸጥ ያለ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ማሳወቂያዎች"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ውይይቶች"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ወደ ላይኛው ቀኝ አንቀሳቅስ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"የግርጌውን ግራ አንቀሳቅስ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ታችኛውን ቀኝ ያንቀሳቅሱ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"አረፋን አሰናብት"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ውይይቶችን በአረፋ አታሳይ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"አረፋዎችን በመጠቀም ይወያዩ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"አዲስ ውይይቶች እንደ ተንሳፋፊ አዶዎች ወይም አረፋዎች ሆነው ይታያሉ። አረፋን ለመክፈት መታ ያድርጉ። ለመውሰድ ይጎትቱት።"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index ebf4bc80b689..fd475b9ee4de 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -522,7 +522,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"محو الكل"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"إدارة"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"السجلّ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"الإشعارات الواردة"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"صامت"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"الإشعارات"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"المحادثات"</string>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index c3d1e78f74e5..ca21ff674595 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"সকলো মচক"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"পৰিচালনা"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ইতিহাস"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"অন্তৰ্গামী"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"নতুন"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"নীৰৱ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"জাননীসমূহ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"বাৰ্তালাপ"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"শীৰ্ষৰ সোঁফালে নিয়ক"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"বুটামটো বাওঁফালে নিয়ক"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"তলৰ সোঁফালে নিয়ক"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"বাবল অগ্ৰাহ্য কৰক"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"বাৰ্তালাপ বাবল নকৰিব"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Bubbles ব্যৱহাৰ কৰি চাট কৰক"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"নতুন বাৰ্তালাপ উপঙি থকা চিহ্নসমূহ অথবা bubbles হিচাপে প্ৰদর্শিত হয়। Bubbles খুলিবলৈ টিপক। এইটো স্থানান্তৰ কৰিবলৈ টানি নিয়ক।"</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 3919fe314361..3a7c98ca34cf 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Hamısını silin"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"İdarə edin"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Tarixçə"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Gələn"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Yeni"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Səssiz"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Bildirişlər"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Söhbətlər"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Yuxarıya sağa köçürün"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Aşağıya sola köçürün"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Aşağıya sağa köçürün"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Qabarcığı ləğv edin"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Söhbətdən gələn bildirişi göstərməyin"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Yumrucuqlardan istifadə edərək söhbət edin"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Yeni söhbətlər üzən nişanlar və ya yumrucuqlar kimi görünür. Yumrucuğu açmaq üçün toxunun. Hərəkət etdirmək üçün sürüşdürü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 f2a6d65bd051..cdface92a34c 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Obriši sve"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Upravljajte"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Istorija"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Dolazno"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novo"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Nečujno"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Obaveštenja"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Konverzacije"</string>
@@ -598,7 +598,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"Aplikacija je zakačena"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Na ovaj način se ovo stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Nazad i Pregled da biste ga otkačili."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Na ovaj način se ovo stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Nazad i Početna da biste ga otkačili."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Na ovaj način se stalno prikazuje dok ga ne otkačite. Prevucite nagore i zadržite da biste ga otkačili."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Stalno će se prikazivati dok je ne otkačite. Prevucite nagore i zadržite da biste je otkačili."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Na ovaj način se ovo stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Pregled da biste ga otkačili."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Na ovaj način se ovo stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Početna da biste ga otkačili."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Mogu da budu dostupni lični podaci (kao što su kontakti i sadržaj imejlova)."</string>
@@ -1007,8 +1007,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Premesti gore desno"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Premesti dole levo"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Premesti dole desno"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Odbacivanje oblačića"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ne koristi oblačiće za konverzaciju"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Ćaskajte u oblačićima"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nove konverzacije se prikazuju kao plutajuće ikone ili oblačići. Dodirnite da biste otvorili oblačić. Prevucite da biste ga premestili."</string>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index d34f089ec9aa..32ec1841ea3e 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Ачысціць усё"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Кіраваць"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Гісторыя"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Уваходныя"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Новае"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Без гуку"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Апавяшчэнні"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Размовы"</string>
@@ -601,7 +601,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"Праграма замацавана"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Будзе паказвацца, пакуль не адмацуеце. Каб адмацаваць, краніце і ўтрымлівайце кнопкі \"Назад\" і \"Агляд\"."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Будзе паказвацца, пакуль не адмацуеце. Каб адмацаваць, націсніце і ўтрымлівайце кнопкі \"Назад\" і \"Галоўны экран\"."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Будзе паказвацца, пакуль не адмацуеце Каб адмацаваць, прагартайце ўверх, утрымліваючы палец на экране"</string>
+ <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>
@@ -1012,8 +1012,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Перамясціце правей і вышэй"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Перамясціць лявей і ніжэй"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Перамясціць правей і ніжэй"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Адхіліць апавяшчэнне"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Не паказваць размову ў выглядзе ўсплывальных апавяшчэнняў"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Усплывальныя апавяшчэнні"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Новыя размовы будуць паказвацца як рухомыя значкі ці ўсплывальныя апавяшчэнні. Націсніце, каб адкрыць усплывальнае апавяшчэнне. Перацягніце яго, каб перамясціць."</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 2388cf6167c0..a2a2671b3f70 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Записът на екрана се обработва"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Текущо известие за сесия за записване на екрана"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Да се стартира ли записът?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"По време на записване системата Android може да прихване поверителна информация, която е показана на екрана или възпроизвеждана на устройството ви. Това включва пароли, данни за плащане, снимки, съобщения и аудио."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"По време на записване системата Android може да запише и поверителна информация, която е показана на екрана или възпроизвеждана на устройството ви. Това включва пароли, данни за плащане, снимки, съобщения и аудио."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Записване на звук"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Аудио от устройството"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Звук от устройството ви, като например музика, обаждания и мелодии"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Изчистване на всички"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Управление"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"История"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Входящи"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Нови"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Беззвучни"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Известия"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Разговори"</string>
@@ -1002,10 +1002,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Преместване горе вдясно"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Преместване долу вляво"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Преместване долу вдясно"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Балонче: Отхвърляне"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Без балончета за разговора"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Разговаряне чрез балончета"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Чат с балончета"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Новите разговори се показват като плаващи икони, или балончета. Докоснете балонче, за да го отворите, или го плъзнете, за да го преместите."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Управление на балончетата по всяко време"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Докоснете „Управление“, за да изключите балончетата от това приложение"</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index d5e827f6b618..aad8eec3e35e 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"সবকিছু সাফ করুন"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"পরিচালনা করুন"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ইতিহাস"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ইনকামিং"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"নতুন"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"আওয়াজ করবে না"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"বিজ্ঞপ্তি"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"কথোপকথন"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"উপরে ডানদিকে সরান"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"নিচে বাঁদিকে সরান"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"নিচে ডান দিকে সরান"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"বাবল খারিজ করুন"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"কথোপকথন বাবল হিসেবে দেখাবে না"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"বাবল ব্যবহার করে চ্যাট করুন"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"নতুন কথোপকথন ভেসে থাকা আইকন বা বাবল হিসেবে দেখানো হয়। বাবল খুলতে ট্যাপ করুন। সেটি সরাতে ধরে টেনে আনুন।"</string>
@@ -1068,7 +1067,7 @@
<string name="controls_error_retryable" msgid="864025882878378470">"সমস্যা, আবার চেষ্টা করা হচ্ছে…"</string>
<string name="controls_error_removed" msgid="6675638069846014366">"খুঁজে পাওয়া যায়নি"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"কন্ট্রোল উপলভ্য নেই"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ডিভাইস অ্যাক্সেস করা যায়নি। <xliff:g id="APPLICATION">%2$s</xliff:g> অ্যাপ চেক করে দেখুন যাতে এটি নিশ্চিত করে নিতে পারেন যে কন্ট্রোল এখনও উপলভ্য আছে এবং অ্যাপ সেটিংসে কোনও পরিবর্তন করা হয়নি।"</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ডিভাইস অ্যাক্সেস করা যায়নি। কন্ট্রোল এখনও উপলভ্য আছে কিনা ও অ্যাপ সেটিংসে কোনও পরিবর্তন করা হয়েছে কিনা তা ভাল করে দেখে নিতে <xliff:g id="APPLICATION">%2$s</xliff:g> অ্যাপ চেক করুন।"</string>
<string name="controls_open_app" msgid="483650971094300141">"অ্যাপ খুলুন"</string>
<string name="controls_error_generic" msgid="352500456918362905">"স্ট্যাটাস লোড করা যাচ্ছে না"</string>
<string name="controls_error_failed" msgid="960228639198558525">"সমস্যা হয়েছে, আবার চেষ্টা করুন"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 37397f959aea..6cdc1d79b00d 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Očisti sve"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Upravljajte"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historija"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Dolazno"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novo"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Nečujno"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Obavještenja"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Razgovori"</string>
@@ -1009,8 +1009,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Pomjerite gore desno"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Pomjeri dolje lijevo"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Pomjerite dolje desno"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Odbaci oblačić"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nemoj prikazivati razgovor u oblačićima"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatajte koristeći oblačiće"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Novi razgovori se prikazuju kao plutajuće ikone ili oblačići. Dodirnite da otvorite oblačić. Prevucite da ga premjestite."</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 2fdddf710e13..5cc0853a6e18 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Esborra-ho tot"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gestiona"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historial"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Entrants"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novetats"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenci"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificacions"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Converses"</string>
@@ -1002,10 +1002,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mou a dalt a la dreta"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mou a baix a l\'esquerra"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mou a baix a la dreta"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ignora la bombolla"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"No mostris la conversa com a bombolla"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Xateja utilitzant les bombolles"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Xateja amb bombolles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Les converses noves es mostren com a icones flotants o bombolles. Toca per obrir una bombolla. Arrossega-la per moure-la."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Controla les bombolles en qualsevol moment"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Toca Gestiona per desactivar les bombolles d\'aquesta aplicació"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 18012b5e4280..a071793af881 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Smazat vše"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Spravovat"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historie"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Příchozí"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nové"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Tiché"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Oznámení"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Konverzace"</string>
@@ -601,7 +601,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"Aplikace je připnuta"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Obsah bude připnut v zobrazení, dokud jej neuvolníte. Uvolníte jej stisknutím a podržením tlačítek Zpět a Přehled."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Obsah bude připnut v zobrazení, dokud ho neuvolníte. Uvolníte ho podržením tlačítek Zpět a Plocha."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Obsah bude připnut v zobrazení, dokud ho neuvolníte. Uvolnit ho můžete přejetím nahoru a podržením."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Díky připnutí bude vidět, dokud ji neodepnete. Odepnout ji můžete přejetím nahoru a podržením."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Obsah bude připnut v zobrazení, dokud jej neuvolníte. Uvolníte jej stisknutím a podržením tlačítka Přehled."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Obsah bude připnut v zobrazení, dokud ho neuvolníte. Uvolníte ho podržením tlačítka Plocha."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Může mít přístup k soukromým datům (například kontaktům a obsahu e-mailů)"</string>
@@ -1012,8 +1012,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Přesunout vpravo nahoru"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Přesunout vlevo dolů"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Přesunout vpravo dolů"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Zavřít bublinu"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nezobrazovat konverzaci v bublinách"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatujte pomocí bublin"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nové konverzace se zobrazují jako plovoucí ikony, neboli bubliny. Klepnutím bublinu otevřete. Přetažením ji posunete."</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 3f71e3d49137..22a0e05e2ea5 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Ryd alle"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Administrer"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historik"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Indgående"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nye"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Lydløs"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifikationer"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Samtaler"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Flyt op til højre"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Flyt ned til venstre"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Flyt ned til højre"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Afvis bobbel"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Vis ikke samtaler i bobler"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat ved hjælp af bobler"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nye samtaler vises som svævende ikoner eller bobler. Tryk for at åbne boblen. Træk for at flytte den."</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 075a496c244b..3397cd615138 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Alle löschen"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Verwalten"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Verlauf"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Neue Benachrichtigungen"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Lautlos"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Benachrichtigungen"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Unterhaltungen"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Nach rechts oben verschieben"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Nach unten links verschieben"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Nach unten rechts verschieben"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Bubble schließen"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Unterhaltung nicht als Bubble anzeigen"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Bubbles zum Chatten verwenden"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Neue Unterhaltungen erscheinen als unverankerte Symbole, \"Bubbles\" genannt. Wenn du die Bubble öffnen möchtest, tippe sie an. Wenn du sie verschieben möchtest, zieh an ihr."</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index c8db318dfb65..f24f7457b0c6 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -256,7 +256,7 @@
<!-- no translation found for accessibility_work_mode (1280025758672376313) -->
<skip />
<string name="accessibility_notification_dismissed" msgid="4411652015138892952">"Η ειδοποίηση έχει απορριφθεί."</string>
- <string name="accessibility_bubble_dismissed" msgid="270358867566720729">"Η φούσκα παραβλέφθηκε."</string>
+ <string name="accessibility_bubble_dismissed" msgid="270358867566720729">"Το συννεφάκι παραβλέφθηκε."</string>
<string name="accessibility_desc_notification_shade" msgid="5355229129428759989">"Πλαίσιο σκίασης ειδοποιήσεων."</string>
<string name="accessibility_desc_quick_settings" msgid="4374766941484719179">"Γρήγορες ρυθμίσεις."</string>
<string name="accessibility_desc_lock_screen" msgid="5983125095181194887">"Οθόνη κλειδώματος"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Διαγραφή όλων"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Διαχείριση"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Ιστορικό"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Εισερχόμενες"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Νέα"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Σίγαση"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Ειδοποιήσεις"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Συζητήσεις"</string>
@@ -710,7 +710,7 @@
<string name="inline_keep_showing_app" msgid="4393429060390649757">"Να συνεχίσουν να εμφανίζονται ειδοποιήσεις από αυτήν την εφαρμογή;"</string>
<string name="notification_silence_title" msgid="8608090968400832335">"Σίγαση"</string>
<string name="notification_alert_title" msgid="3656229781017543655">"Προεπιλογή"</string>
- <string name="notification_bubble_title" msgid="8330481035191903164">"Φούσκα"</string>
+ <string name="notification_bubble_title" msgid="8330481035191903164">"Συννεφάκι"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Χωρίς ήχο ή δόνηση"</string>
<string name="notification_conversation_summary_low" msgid="1734433426085468009">"Χωρίς ήχο ή δόνηση και εμφανίζεται χαμηλά στην ενότητα συζητήσεων"</string>
<string name="notification_channel_summary_default" msgid="3282930979307248890">"Ενδέχεται να κουδουνίζει ή να δονείται βάσει των ρυθμίσεων του τηλεφώνου"</string>
@@ -1002,11 +1002,10 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Μετακίνηση επάνω δεξιά"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Μετακίνηση κάτω αριστερά"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Μετακίνηση κάτω δεξιά"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Παράβλ. για συννεφ."</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Να μην γίνει προβολή της συζήτησης σε συννεφάκια."</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Συζητήστε χρησιμοποιώντας συννεφάκια."</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"Οι νέες συζητήσεις εμφανίζονται ως κινούμενα εικονίδια ή φούσκες. Πατήστε για να ανοίξετε τη φούσκα. Σύρετε για να το μετακινήσετε."</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"Οι νέες συζητήσεις εμφανίζονται ως κινούμενα εικονίδια ή συννεφάκια. Πατήστε για να ανοίξετε το συννεφάκι. Σύρετε για να το μετακινήσετε."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Ελέγξτε τα συννεφάκια ανά πάσα στιγμή."</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Πατήστε Διαχείριση για να απενεργοποιήσετε τα συννεφάκια από αυτήν την εφαρμογή."</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"Το κατάλαβα."</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 708f2f4f017a..171b6f61cff4 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Start recording?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android system can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android System can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Record audio"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Device audio"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sound from your device, like music, calls and ringtones"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Clear all"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Manage"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"History"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Incoming"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"New"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silent"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Move top right"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Move bottom left"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Move bottom right"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dismiss bubble"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Don’t bubble conversation"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat using bubbles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"New conversations appear as floating icons, or bubbles. Tap to open bubble. Drag to move it."</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 313c604953ea..5fb6236d6dcd 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Start recording?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android system can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android System can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Record audio"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Device audio"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sound from your device, like music, calls and ringtones"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Clear all"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Manage"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"History"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Incoming"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"New"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silent"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Move top right"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Move bottom left"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Move bottom right"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dismiss bubble"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Don’t bubble conversation"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat using bubbles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"New conversations appear as floating icons, or bubbles. Tap to open bubble. Drag to move it."</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 708f2f4f017a..171b6f61cff4 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Start recording?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android system can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android System can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Record audio"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Device audio"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sound from your device, like music, calls and ringtones"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Clear all"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Manage"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"History"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Incoming"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"New"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silent"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Move top right"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Move bottom left"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Move bottom right"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dismiss bubble"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Don’t bubble conversation"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat using bubbles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"New conversations appear as floating icons, or bubbles. Tap to open bubble. Drag to move it."</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 708f2f4f017a..171b6f61cff4 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Start recording?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android system can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"While recording, Android System can capture any sensitive information that’s visible on your screen or played on your device. This includes passwords, payment info, photos, messages and audio."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Record audio"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Device audio"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sound from your device, like music, calls and ringtones"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Clear all"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Manage"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"History"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Incoming"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"New"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silent"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Move top right"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Move bottom left"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Move bottom right"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dismiss bubble"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Don’t bubble conversation"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat using bubbles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"New conversations appear as floating icons, or bubbles. Tap to open bubble. Drag to move it."</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index 5d2e3eb16780..f37742d62062 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‎‎‏‏‎‏‎‏‎‏‎‏‏‏‎‏‎‎‎‏‎‎‎‎‎‏‎‏‎‏‏‏‏‎‏‏‎‎‏‎‎‏‏‎‎‏‎‎‎‏‏‏‏‏‎‎‏‎‎Clear all‎‏‎‎‏‎"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‏‎‎‎‏‏‏‎‏‎‏‏‏‎‎‏‏‏‏‏‎‏‎‏‏‎‎‏‎‎‎‏‎‎‎‎‏‏‎‎‏‏‎‏‏‏‏‏‎‏‏‏‏‏‎‎‎Manage‎‏‎‎‏‎"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‎‏‏‎‎‏‎‏‎‏‎‏‏‎‏‎‎‎‎‎‏‏‏‎‏‏‏‎‎‏‏‎‏‏‏‎‏‏‏‏‏‎‏‏‎‏‏‏‏‏‏‏‎‎‏‏‎‎History‎‏‎‎‏‎"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‏‎‏‏‏‏‏‎‎‏‎‏‏‏‎‏‎‏‏‏‏‎‎‎‏‏‎‏‏‏‏‏‏‎‏‏‎‎‎‏‏‎‏‏‏‎‏‎‎‎‎‎‎‎‏‏‏‎Incoming‎‏‎‎‏‎"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‏‏‎‎‏‏‏‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‏‎‏‏‏‏‎‎‎‏‏‎‏‏‏‎‏‎New‎‏‎‎‏‎"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‏‎‏‏‎‏‎‎‎‎‎‏‎‎‎‏‏‏‏‎‎‎‎‏‏‎‏‏‏‏‎‏‎‎‏‎‎‏‎‎‎‏‏‏‏‏‎‎‏‎‏‏‎‏‎Silent‎‏‎‎‏‎"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‎‏‎‏‏‏‎‏‎‎‎‏‎‏‎‎‎‏‎‎‎‏‏‏‏‏‎‏‏‎‏‏‏‏‏‏‎‎‏‏‎‏‏‎‏‏‏‏‎‏‏‏‎‏‎‎‏‏‎Notifications‎‏‎‎‏‎"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‎‏‏‎‎‏‏‏‏‎‏‏‏‏‏‎‎‏‎‏‏‎‎‎‏‎‎‎‏‏‎‎‎‏‎‎‏‎‎‎‎‎‏‏‎‎‎‎‏‎‏‏‏‏‎‏‎Conversations‎‏‎‎‏‎"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index db5b68c0dd15..b4bba8f3145b 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -146,7 +146,7 @@
<string name="biometric_dialog_face_icon_description_authenticating" msgid="3401633342366146535">"Buscando tu rostro"</string>
<string name="biometric_dialog_face_icon_description_authenticated" msgid="2242167416140740920">"Se autenticó el rostro"</string>
<string name="biometric_dialog_face_icon_description_confirmed" msgid="7918067993953940778">"Confirmado"</string>
- <string name="biometric_dialog_tap_confirm" msgid="9166350738859143358">"Presiona Confirmar para completarla"</string>
+ <string name="biometric_dialog_tap_confirm" msgid="9166350738859143358">"Presiona Confirmar para completar"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autenticado"</string>
<string name="biometric_dialog_use_pin" msgid="8385294115283000709">"Usar PIN"</string>
<string name="biometric_dialog_use_pattern" msgid="2315593393167211194">"Usar patrón"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Borrar todo"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Administrar"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historial"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Entrante"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nuevo"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenciadas"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificaciones"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversaciones"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Ubicar arriba a la derecha"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Ubicar abajo a la izquierda"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Ubicar abajo a la derecha"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Descartar burbuja"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"No mostrar la conversación en burbujas"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat con burbujas"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Las conversaciones nuevas aparecen como elementos flotantes o burbujas. Presiona para abrir la burbuja. Arrástrala para moverla."</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 1d8549a78efa..6ffed58c3df8 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Borrar todo"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gestionar"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historial"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Entrantes"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nuevas"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenciadas"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificaciones"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversaciones"</string>
@@ -593,16 +593,16 @@
<string name="volume_odi_captions_hint_disable" msgid="2518846326748183407">"desactivar"</string>
<string name="accessibility_output_chooser" msgid="7807898688967194183">"Cambiar dispositivo de salida"</string>
<string name="screen_pinning_title" msgid="9058007390337841305">"La aplicación está fijada"</string>
- <string name="screen_pinning_description" msgid="8699395373875667743">"La pantalla se mantiene visible hasta que dejas de fijarla. Para ello, mantén pulsados los botones Atrás y Aplicaciones recientes."</string>
- <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"La pantalla se mantiene visible hasta que dejas de fijarla. Para ello, mantén pulsados los botones Atrás e Inicio."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Se mantiene visible hasta que dejas de fijarla. Para ello, desliza el dedo hacia arriba y mantén pulsado."</string>
- <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"La pantalla se mantiene visible hasta que dejas de fijarla. Para ello, mantén pulsado el botón Aplicaciones recientes."</string>
- <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"La pantalla se mantiene visible hasta que dejas de fijarla. Para ello, mantén pulsado el botón Inicio."</string>
- <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Es posible que se revelen datos personales, como contactos o el contenido de correos."</string>
+ <string name="screen_pinning_description" msgid="8699395373875667743">"La pantalla se mantendrá visible hasta que dejes de fijarla. Para dejar de fijarla, mantén pulsados los botones Atrás y Aplicaciones recientes."</string>
+ <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"La pantalla se mantendrá visible hasta que dejes de fijarla. Para dejar de fijarla, mantén pulsados los botones Atrás e Inicio."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"La pantalla se mantendrá visible hasta que dejes de fijarla. Para dejar de fijarla, desliza el dedo hacia arriba y mantenlo pulsado."</string>
+ <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"La pantalla se mantendrá visible hasta que dejes de fijarla. Para dejar de fijarla, mantén pulsado el botón Aplicaciones recientes."</string>
+ <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"La pantalla se mantendrá visible hasta que dejes de fijarla. Para dejar de fijarla, mantén pulsado el botón Inicio."</string>
+ <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Es posible que se pueda acceder a datos personales, como contactos o el contenido de correos."</string>
<string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"Se pueden abrir otras aplicaciones desde aplicaciones fijadas."</string>
<string name="screen_pinning_toast" msgid="8177286912533744328">"Para dejar de fijar esta aplicación, mantén pulsados los botones Atrás y Aplicaciones recientes"</string>
<string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"Para dejar de fijar esta aplicación, mantén pulsados los botones Atrás e Inicio"</string>
- <string name="screen_pinning_toast_gesture_nav" msgid="170699893395336705">"Para dejar de fijar esta aplicación, desliza el dedo hacia arriba y mantenlo pulsado"</string>
+ <string name="screen_pinning_toast_gesture_nav" msgid="170699893395336705">"Para dejar de fijar esta aplicación, desliza el dedo hacia arriba y no lo separes de la pantalla."</string>
<string name="screen_pinning_positive" msgid="3285785989665266984">"Entendido"</string>
<string name="screen_pinning_negative" msgid="6882816864569211666">"No, gracias"</string>
<string name="screen_pinning_start" msgid="7483998671383371313">"Aplicación fijada"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mover arriba a la derecha"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mover abajo a la izquierda."</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mover abajo a la derecha"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Cerrar burbuja"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"No mostrar conversación en burbujas"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatea con burbujas"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Las conversaciones nuevas aparecen como iconos flotantes llamadas \"burbujas\". Toca para abrir la burbuja. Arrastra para moverla."</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index ede01b7f191c..258bf5a581d0 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Tühjenda kõik"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Haldamine"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Ajalugu"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Sissetulevad"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Uued"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Hääletu"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Märguanded"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Vestlused"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Teisalda üles paremale"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Teisalda alla vasakule"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Teisalda alla paremale"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Sule mull"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ära kuva vestlust mullina"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Vestelge mullide abil"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Uued vestlused kuvatakse hõljuvate ikoonidena ehk mullidena. Puudutage mulli avamiseks. Lohistage mulli, et seda liigutada."</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 641d031ef4aa..8e244a2a37ae 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Pantaila-grabaketa prozesatzen"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Pantailaren grabaketa-saioaren jakinarazpen jarraitua"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Grabatzen hasi nahi duzu?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"Pantaila grabatzen duzun bitartean, Android sistemak detektatu egin dezake pantailan agertzen den edo gailuak erreproduzitzen duen kontuzko informazioa; besteak beste, pasahitzak, ordainketen informazioa, argazkiak, mezuak eta audioak."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"Pantaila grabatzen duzun bitartean, Android sistemak detektatu egin dezake pantailan agertzen den edo gailuak erreproduzitzen duen kontuzko informazioa; besteak beste, pasahitzak, ordainketa-informazioa, argazkiak, mezuak eta audioa."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Grabatu audioa"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Gailuaren audioa"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Gailuko soinuak; adibidez, musika, deiak eta tonuak"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Garbitu guztiak"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Kudeatu"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historia"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Jasotako azkenak"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Berria"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Isila"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Jakinarazpenak"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Elkarrizketak"</string>
@@ -624,7 +624,7 @@
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Dardara"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Ez jo tonua"</string>
<string name="qs_status_phone_vibrate" msgid="7055409506885541979">"Telefonoaren dardara aktibatuta dago"</string>
- <string name="qs_status_phone_muted" msgid="3763664791309544103">"Telefonoaren tonu-jotzailea desaktibatuta dago"</string>
+ <string name="qs_status_phone_muted" msgid="3763664791309544103">"Tonu-jotzailea desaktibatuta"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Sakatu audioa aktibatzeko."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Sakatu dardara ezartzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Sakatu audioa desaktibatzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Eraman goialdera, eskuinetara"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Eraman behealdera, ezkerretara"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Eraman behealdera, eskuinetara"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Baztertu burbuila"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ez erakutsi elkarrizketak burbuila gisa"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Txateatu burbuilen bidez"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Elkarrizketa berriak ikono gainerakor edo burbuila gisa agertzen dira. Sakatu burbuila irekitzeko. Arrasta ezazu mugitzeko."</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index eec54deb2b8e..4ebfa797edf4 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"پاک کردن همه موارد"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"مدیریت"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"سابقه"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ورودی"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"جدید"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"بی‌صدا"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"اعلان‌ها"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"مکالمه‌ها"</string>
@@ -598,7 +598,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">"برای برداشتن پین این برنامه، دکمه‌های «برگشت» و «نمای کلی» را لمس کنید و نگه‌دارید"</string>
<string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"برای برداشتن پین این برنامه، دکمه‌های «برگشت» و «صفحه اصلی» را لمس کنید و نگه دارید"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"انتقال به بالا سمت چپ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"انتقال به پایین سمت راست"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"انتقال به پایین سمت چپ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"رد کردن حبابک"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"مکالمه در حباب نشان داده نشود"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"گپ بااستفاده از ابزارک اعلان"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"مکالمه‌های جدید به‌صورت نمادهای شناور یا ابزارک اعلان نشان داده شوند. برای باز کردن ابزارک اعلان ضربه بزنید. برای جابه‌جایی، آن را بکشید."</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index ee7ed70718a1..05a88f4cc6ee 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Poista kaikki"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Muuta asetuksia"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historia"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Saapuvat"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Uudet"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Äänetön"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Ilmoitukset"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Keskustelut"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Siirrä oikeaan yläreunaan"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Siirrä vasempaan alareunaan"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Siirrä oikeaan alareunaan"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ohita kupla"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Älä näytä kuplia keskusteluista"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chattaile kuplien avulla"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Uudet keskustelut näkyvät kelluvina kuvakkeina tai kuplina. Avaa kupla napauttamalla. Siirrä sitä vetämällä."</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index c71ab7ee4894..e7ef0824539f 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Tout effacer"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gérer"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historique"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Entrantes"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nouvelles"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Mode silencieux"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Déplacer dans coin sup. droit"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Déplacer dans coin inf. gauche"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Déplacer dans coin inf. droit"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ignorer la bulle"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ne pas afficher les conversations dans des bulles"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Clavarder en utilisant des bulles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Les nouvelles conversations s\'affichent sous forme d\'icônes flottantes (de bulles). Touchez une bulle pour l\'ouvrir. Faites-la glisser pour la déplacer."</string>
@@ -1069,7 +1068,7 @@
<string name="controls_error_removed" msgid="6675638069846014366">"Introuvable"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"La commande n\'est pas accessible"</string>
<string name="controls_error_removed_message" msgid="2885911717034750542">"Impossible d\'accéder à <xliff:g id="DEVICE">%1$s</xliff:g>. Vérifiez l\'application <xliff:g id="APPLICATION">%2$s</xliff:g> pour vous assurer que la commande est toujours offerte et que les paramètres de l\'application n\'ont pas changé."</string>
- <string name="controls_open_app" msgid="483650971094300141">"Ouvrir"</string>
+ <string name="controls_open_app" msgid="483650971094300141">"Ouvrir l\'application"</string>
<string name="controls_error_generic" msgid="352500456918362905">"Impossible de charger l\'état"</string>
<string name="controls_error_failed" msgid="960228639198558525">"Erreur. Veuillez réessayer."</string>
<string name="controls_in_progress" msgid="4421080500238215939">"En cours"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 4c69c865d1b5..c7d88720a9df 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Tout effacer"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gérer"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historique"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Notifications entrantes"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nouvelles notifications"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silencieuses"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifications"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversations"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Déplacer en haut à droite"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Déplacer en bas à gauche"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Déplacer en bas à droite"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Fermer la bulle"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ne pas afficher la conversations dans des bulles"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatter en utilisant des bulles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Les nouvelles conversations s\'affichent sous forme d\'icônes flottantes ou bulles. Appuyez sur la bulle pour l\'ouvrir. Faites-la glisser pour la déplacer."</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index d80bd95abf65..93524f8492d8 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Eliminar todas"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Xestionar"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historial"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Entrantes"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Notificacións novas"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silencio"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificacións"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversas"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mover á parte superior dereita"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mover á parte infer. esquerda"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mover á parte inferior dereita"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ignorar burbulla"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Non mostrar a conversa como burbulla"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatear usando burbullas"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"As conversas novas aparecen como iconas flotantes ou burbullas. Toca para abrir a burbulla e arrastra para movela."</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index c641208055c1..c4b8ae2ea421 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"બધુ સાફ કરો"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"મેનેજ કરો"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ઇતિહાસ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ઇનકમિંગ"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"સાઇલન્ટ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"નોટિફિકેશન"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"વાતચીત"</string>
@@ -593,11 +594,11 @@
<string name="volume_odi_captions_hint_disable" msgid="2518846326748183407">"બંધ કરો"</string>
<string name="accessibility_output_chooser" msgid="7807898688967194183">"આઉટપુટ ઉપકરણ સ્વિચ કરો"</string>
<string name="screen_pinning_title" msgid="9058007390337841305">"ઍપને પિન કરેલી છે"</string>
- <string name="screen_pinning_description" msgid="8699395373875667743">"તમે જ્યાં સુધી અનપિન કરશો નહીં ત્યાં સુધી આ તેને દૃશ્યક્ષમ રાખે છે. અનપિન કરવા માટે પાછળ અને ઝલકને સ્પર્શ કરી રાખો."</string>
- <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"તમે જ્યાં સુધી અનપિન કરશો નહીં ત્યાં સુધી આ તેને દૃશ્યક્ષમ રાખે છે. અનપિન કરવા માટે પાછળ અને હોમને સ્પર્શ કરી રાખો."</string>
- <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_description" msgid="8699395373875667743">"તમે જ્યાં સુધી અનપિન કરશો નહીં ત્યાં સુધી આ તેને વ્યૂમાં રાખે છે. અનપિન કરવા માટે પાછળ અને ઓવરવ્યૂને સ્પર્શ કરી રાખો."</string>
+ <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"તમે જ્યાં સુધી અનપિન કરશો નહીં ત્યાં સુધી આ તેને વ્યૂમાં રાખે છે. અનપિન કરવા માટે પાછળ અને હોમને સ્પર્શ કરી રાખો."</string>
+ <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_can_open_other_apps" msgid="7529756813231421455">"પિન કરેલી ઍપ અન્ય ઍપને ખોલી શકે છે."</string>
<string name="screen_pinning_toast" msgid="8177286912533744328">"આ ઍપને અનપિન કરવા માટે, પાછળ અને ઓવરવ્યૂ બટનને સ્પર્શ કરી રાખો"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ઉપર જમણે ખસેડો"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"નીચે ડાબે ખસેડો"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"નીચે જમણે ખસેડો"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"બબલને છોડી દો"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"વાતચીતને બબલ કરશો નહીં"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"બબલનો ઉપયોગ કરીને ચેટ કરો"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"નવી વાતચીત ફ્લોટિંગ આઇકન અથવા બબલ જેવી દેખાશે. બબલને ખોલવા માટે ટૅપ કરો. તેને ખસેડવા માટે ખેંચો."</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 428840742b45..22f908011455 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -512,7 +512,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"सभी को हटाएं"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"प्रबंधित करें"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"इतिहास"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"हाल ही में मिली सूचनाएं"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"नई सूचनाएं"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"बिना आवाज़ किए मिलने वाली सूचनाएं"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"वाइब्रेशन या आवाज़ के साथ मिलने वाली सूचनाएं"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"बातचीत"</string>
@@ -1004,8 +1004,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"सबसे ऊपर दाईं ओर ले जाएं"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"बाईं ओर सबसे नीचे ले जाएं"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"सबसे नीचे दाईं ओर ले जाएं"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"बबल खारिज करें"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"बातचीत को बबल न करें"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"बबल्स का इस्तेमाल करके चैट करें"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"नई बातचीत फ़्लोटिंग आइकॉन या बबल्स की तरह दिखेंगी. बबल को खोलने के लिए टैप करें. इसे एक जगह से दूसरी जगह ले जाने के लिए खींचें और छोड़ें."</string>
@@ -1017,7 +1016,7 @@
<string name="notification_content_gesture_nav_available" msgid="4431460803004659888">"सिस्टम नेविगेशन अपडेट करने के लिए \'सेटिंग\' में जाएं"</string>
<string name="inattentive_sleep_warning_title" msgid="3891371591713990373">"स्टैंडबाई"</string>
<string name="priority_onboarding_title" msgid="2893070698479227616">"बातचीत को अहम बातचीत के तौर पर सेट किया गया है"</string>
- <string name="priority_onboarding_behavior" msgid="5342816047020432929">"अहम बातचीत:"</string>
+ <string name="priority_onboarding_behavior" msgid="5342816047020432929">"अहम बातचीत यहां दिखेगी:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"बातचीत सेक्शन में सबसे ऊपर दिखाएं"</string>
<string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"लॉक स्क्रीन पर प्रोफ़ाइल फ़ोटो दिखाएं"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"खास बातचीत फ़्लोटिंग बबल की तरह ऐप्लिकेशन के ऊपर दिखेंगी"</string>
@@ -1068,9 +1067,9 @@
<string name="controls_media_resume" msgid="1933520684481586053">"फिर से शुरू करें"</string>
<string name="controls_error_timeout" msgid="794197289772728958">"काम नहीं कर रहा, ऐप जांचें"</string>
<string name="controls_error_retryable" msgid="864025882878378470">"कोई गड़बड़ी हुई, फिर से कोशिश की जा रही है…"</string>
- <string name="controls_error_removed" msgid="6675638069846014366">"कंट्रोल नहीं मिला"</string>
+ <string name="controls_error_removed" msgid="6675638069846014366">"कंट्रोल मौजूद नहीं है"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"कंट्रोल मौजूद नहीं है"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ऐक्सेस नहीं किया जा सका. <xliff:g id="APPLICATION">%2$s</xliff:g> ऐप्लिकेशन देखें, ताकि यह पक्का किया जा सके कि कंट्रोल अब भी मौजूद है और सेटिंग में कोई बदलाव नहीं हुआ है."</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> को ऐक्सेस नहीं किया जा सका. <xliff:g id="APPLICATION">%2$s</xliff:g> ऐप्लिकेशन देखें, ताकि यह पक्का किया जा सके कि कंट्रोल अब भी मौजूद है और सेटिंग में कोई बदलाव नहीं हुआ है."</string>
<string name="controls_open_app" msgid="483650971094300141">"ऐप्लिकेशन खोलें"</string>
<string name="controls_error_generic" msgid="352500456918362905">"स्थिति लोड नहीं की जा सकती"</string>
<string name="controls_error_failed" msgid="960228639198558525">"गड़बड़ी हुई, फिर से कोशिश करें"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index b8b784c36735..b0e6b51e8f6a 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Izbriši sve"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Upravljajte"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Povijest"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Dolazno"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novo"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Bešumno"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Obavijesti"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Razgovori"</string>
@@ -1007,10 +1007,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Premjesti u gornji desni kut"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Premjesti u donji lijevi kut"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Premjestite u donji desni kut"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Odbaci oblačić"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Zaustavi razgovor u oblačićima"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatanje pomoću oblačića"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Oblačići u chatu"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Novi razgovori pojavljuju se kao pomične ikone ili oblačići. Dodirnite za otvaranje oblačića. Povucite da biste ga premjestili."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Upravljanje oblačićima u svakom trenutku"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Dodirnite Upravljanje da biste isključili oblačiće iz ove aplikacije"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 551fcd8b2975..0dc7256f985d 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Az összes törlése"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Kezelés"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Előzmények"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Bejövő"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Új"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Néma"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Értesítések"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Beszélgetések"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Áthelyezés fel és jobbra"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Áthelyezés le és balra"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Áthelyezés le és jobbra"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Buborék elvetése"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ne jelenjen meg a beszélgetés buborékban"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Buborékokat használó csevegés"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Az új beszélgetések lebegő ikonként, vagyis buborékként jelennek meg. A buborék megnyitásához koppintson rá. Áthelyezéshez húzza a kívánt helyre."</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 730f1155502b..a337cc22390b 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Էկրանի տեսագրության մշակում"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Էկրանի տեսագրման աշխատաշրջանի ընթացիկ ծանուցում"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Սկսե՞լ տեսագրումը"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"Տեսագրման ընթացքում Android-ի համակարգը կարող է գրանցել անձնական տեղեկություններ, որոնք տեսանելի են էկրանին կամ նվագարկվում են ձեր սարքում։ Սա ներառում է այնպիսի տեղեկություններ, ինչպիսիք են, օրինակ, գաղտնաբառերը, վճարային տվյալները, լուսանկարները, հաղորդագրությունները և նվագարկվող աուդիո ֆայլերը։"</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"Տեսագրման ընթացքում Android համակարգը կարող է գրանցել անձնական տեղեկություններ, որոնք տեսանելի են էկրանին կամ նվագարկվում են ձեր սարքում։ Սա ներառում է այնպիսի տեղեկություններ, ինչպիսիք են, օրինակ, գաղտնաբառերը, վճարային տվյալները, լուսանկարները, հաղորդագրությունները և նվագարկվող աուդիո ֆայլերը։"</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Ձայնագրել"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Սարքի ձայները"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Ձեր սարքի ձայները, օրինակ՝ երաժշտությունը, զանգերն ու զանգերանգները"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Մաքրել բոլորը"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Կառավարել"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Պատմություն"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Մուտքային"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Նոր"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Անձայն"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Ծանուցումներ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Խոսակցություններ"</string>
@@ -720,7 +720,7 @@
<string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Կարգավորումներ"</string>
<string name="notification_priority_title" msgid="2079708866333537093">"Կարևոր"</string>
<string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> հավելվածը զրույցի գործառույթներ չի աջակցում"</string>
- <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Վերջին ամպիկներ չկան"</string>
+ <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Ամպիկներ չկան"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Այստեղ կցուցադրվեն վերջերս օգտագործված և փակված ամպիկները, որոնք կկարողանաք հեշտությամբ վերաբացել"</string>
<string name="notification_unblockable_desc" msgid="2073030886006190804">"Այս ծանուցումները չեն կարող փոփոխվել:"</string>
<string name="notification_multichannel_desc" msgid="7414593090056236179">"Ծանուցումների տվյալ խումբը հնարավոր չէ կարգավորել այստեղ"</string>
@@ -1002,11 +1002,10 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Տեղափոխել վերև՝ աջ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Տեղափոխել ներքև՝ ձախ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Տեղափոխել ներքև՝ աջ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Փակել ամպիկը"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Զրույցը չցուցադրել ամպիկի տեսքով"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Զրուցել ամպիկների միջոցով"</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"Նոր խոսակցությունները կհայտնվեն լողացող պատկերակների կամ ամպիկների տեսքով։ Հպեք՝ ամպիկը բացելու համար։ Քաշեք՝ այն տեղափոխելու համար։"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Զրույցի ամպիկներ"</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"Նոր զրույցները կհայտնվեն լողացող պատկերակների կամ ամպիկների տեսքով։ Հպեք՝ ամպիկը բացելու համար։ Քաշեք՝ այն տեղափոխելու համար։"</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Ամպիկների կարգավորումներ"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Հպեք «Կառավարել» կոճակին՝ այս հավելվածի ամպիկներն անջատելու համար։"</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"Եղավ"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 3614cb4d88c0..dd6c363abb4c 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Hapus semua"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Kelola"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Histori"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Masuk"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Baru"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Senyap"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifikasi"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Percakapan"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Pindahkan ke kanan atas"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Pindahkan ke kiri bawah"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Pindahkan ke kanan bawah"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Tutup balon"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Jangan gunakan percakapan balon"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat dalam tampilan balon"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Percakapan baru muncul sebagai ikon mengambang, atau balon. Ketuk untuk membuka balon. Tarik untuk memindahkannya."</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index 224164c012e5..a3119ce21498 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Hreinsa allt"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Stjórna"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Ferill"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Mótteknar"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nýtt"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Hljóðlaust"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Tilkynningar"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Samtöl"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Færa efst til hægri"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Færa neðst til vinstri"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Færðu neðst til hægri"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Loka blöðru"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ekki setja samtal í blöðru"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Spjalla með blöðrum"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Ný samtöl birtast sem fljótandi tákn eða blöðrur. Ýttu til að opna blöðru. Dragðu hana til að færa."</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index f9fcda4b3eca..21434bac9807 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -78,8 +78,8 @@
<string name="compat_mode_off" msgid="7682459748279487945">"Estendi per riemp. schermo"</string>
<string name="global_action_screenshot" msgid="2760267567509131654">"Screenshot"</string>
<string name="remote_input_image_insertion_text" msgid="4850791636452521123">"è stata inviata un\'immagine"</string>
- <string name="screenshot_saving_ticker" msgid="6519186952674544916">"Salvataggio screenshot..."</string>
- <string name="screenshot_saving_title" msgid="2298349784913287333">"Salvataggio screenshot..."</string>
+ <string name="screenshot_saving_ticker" msgid="6519186952674544916">"Salvataggio screenshot…"</string>
+ <string name="screenshot_saving_title" msgid="2298349784913287333">"Salvataggio screenshot…"</string>
<string name="screenshot_saved_title" msgid="8893267638659083153">"Screenshot salvato"</string>
<string name="screenshot_saved_text" msgid="7778833104901642442">"Tocca per visualizzare lo screenshot"</string>
<string name="screenshot_failed_title" msgid="3259148215671936891">"Impossibile salvare lo screenshot"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Cancella tutto"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gestisci"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Cronologia"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"In arrivo"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nuove"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenziose"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notifiche"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversazioni"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Sposta in alto a destra"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Sposta in basso a sinistra"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Sposta in basso a destra"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ignora bolle"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Non utilizzare bolle per la conversazione"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatta utilizzando le bolle"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Le nuove conversazioni vengono visualizzate come icone mobili o bolle. Tocca per aprire la bolla. Trascinala per spostarla."</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 172919c497e3..24dae2745b8c 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ניקוי הכל"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ניהול"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"היסטוריה"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"התקבלו"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"התראות חדשות"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"שקט"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"התראות"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"שיחות"</string>
@@ -1012,10 +1012,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"העברה לפינה הימנית העליונה"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"העברה לפינה השמאלית התחתונה"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"העברה לפינה הימנית התחתונה"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"סגירת בועה"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"אין להציג בועות לשיחה"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"לדבר בצ\'אט באמצעות בועות"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"לדבר בבועות"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"שיחות חדשות מופיעות כסמלים צפים, או בועות. יש להקיש כדי לפתוח בועה. יש לגרור כדי להזיז אותה."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"שליטה בבועות, בכל זמן"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"יש להקיש על \'ניהול\' כדי להשבית את הבועות מהאפליקציה הזו"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index a2bb39cd9e6b..0f248a1332b2 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"すべて消去"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"管理"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"履歴"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"新着"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"新着"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"サイレント"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"通知"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"会話"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"右上に移動"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"左下に移動"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"右下に移動"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ふきだしを閉じる"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"会話をバブルで表示しない"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"チャットでバブルを使う"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"新しい会話はフローティング アイコン(バブル)として表示されます。タップするとバブルが開きます。ドラッグしてバブルを移動できます。"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index 37b5ec98797e..aeee416750ed 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ყველას გასუფთავება"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"მართვა"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ისტორია"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"შემომავალი"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"ახალი"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ჩუმი"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"შეტყობინებები"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"საუბრები"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"გადაანაცვლეთ ზევით და მარჯვნივ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ქვევით და მარცხნივ გადატანა"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"გადაანაცვ. ქვემოთ და მარჯვნივ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ბუშტის დახურვა"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"აიკრძალოს საუბრის ბუშტები"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ჩეთი ბუშტების გამოყენებით"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ახალი საუბრები გამოჩნდება როგორც მოტივტივე ხატულები ან ბუშტები. შეეხეთ ბუშტის გასახსნელად. გადაიტანეთ ჩავლებით."</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 73f0e6c7af7d..356526ce9a1d 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -101,7 +101,7 @@
<string name="screenrecord_start" msgid="330991441575775004">"Бастау"</string>
<string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Экрандағы бейне жазылуда."</string>
<string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Экрандағы бейне және аудио жазылуда."</string>
- <string name="screenrecord_taps_label" msgid="1595690528298857649">"Экранды түртуді көрсету"</string>
+ <string name="screenrecord_taps_label" msgid="1595690528298857649">"Экранды түрткенде көрсету"</string>
<string name="screenrecord_stop_text" msgid="6549288689506057686">"Тоқтату үшін түртіңіз"</string>
<string name="screenrecord_stop_label" msgid="72699670052087989">"Тоқтату"</string>
<string name="screenrecord_pause_label" msgid="6004054907104549857">"Тоқтата тұру"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Барлығын тазалау"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Басқару"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Тарих"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Кіріс"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Жаңа"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Үнсіз"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Хабарландырулар"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Әңгімелер"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Жоғары оң жаққа жылжыту"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Төменгі сол жаққа жылжыту"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Төменгі оң жаққа жылжыту"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Қалқымалы анықтаманы жабу"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Әңгіменің қалқыма хабары көрсетілмесін"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Қалқыма хабарлар арқылы сөйлесу"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Жаңа әңгімелер қалқыма белгішелер немесе хабарлар түрінде көрсетіледі. Қалқыма хабарды ашу үшін түртіңіз. Жылжыту үшін сүйреңіз."</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 47fd544912ea..b0f90e2b2869 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"សម្អាត​ទាំងអស់"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"គ្រប់គ្រង"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ប្រវត្តិ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"មក​ដល់"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"ថ្មី"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ស្ងាត់"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ការជូនដំណឹង"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ការសន្ទនា"</string>
@@ -595,7 +595,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"កម្មវិធី​ត្រូវបានខ្ទាស់"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"វា​នឹង​នៅតែ​បង្ហាញ រហូត​ទាល់​តែ​អ្នក​ដក​ការដៅ។ សូម​សង្កត់​ប៊ូតុង​ថយ​ក្រោយ និង​ប៊ូតុង​ទិដ្ឋភាពរួម​ឲ្យ​ជាប់ ដើម្បី​ដក​ការ​ដៅ។"</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"វា​នឹង​នៅតែ​បង្ហាញ រហូត​ទាល់​តែ​អ្នក​ដក​ការដៅ។ សូម​ចុចប៊ូតុង​ថយក្រោយ និងប៊ូតុង​ទំព័រដើម​ឱ្យ​ជាប់ ដើម្បី​ដក​ការ​ដៅ។"</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"វា​នឹង​នៅតែ​បង្ហាញ រហូតទាល់​តែអ្នក​ដកការដៅ។ អូសឡើងលើ​ឱ្យជាប់ ដើម្បី​ដក​ការដៅ។"</string>
+ <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>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ផ្លាស់ទីទៅផ្នែកខាងលើខាងស្ដាំ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ផ្លាស់ទីទៅផ្នែកខាងក្រោមខាងឆ្វេង​"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ផ្លាស់ទីទៅផ្នែកខាងក្រោម​ខាងស្ដាំ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ច្រានចោល​ពពុះ"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"កុំបង្ហាញ​ការសន្ទនា​ជាពពុះ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ជជែក​ដោយប្រើ​ពពុះ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ការសន្ទនាថ្មីៗ​បង្ហាញជា​​ពពុះ ឬរូបអណ្ដែត។ ចុច ដើម្បីបើក​ពពុះ។ អូស ដើម្បី​ផ្លាស់ទី​ពពុះនេះ។"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index afa60524fca6..ed5342554913 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ನಿರ್ವಹಿಸಿ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ಇತಿಹಾಸ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ಒಳಬರುವ"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ನಿಶ್ಶಬ್ದ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ಅಧಿಸೂಚನೆಗಳು"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ಸಂಭಾಷಣೆಗಳು"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ಬಲ ಮೇಲ್ಭಾಗಕ್ಕೆ ಸರಿಸಿ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ಸ್ಕ್ರೀನ್‌ನ ಎಡ ಕೆಳಭಾಗಕ್ಕೆ ಸರಿಸಿ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ಕೆಳಗಿನ ಬಲಭಾಗಕ್ಕೆ ಸರಿಸಿ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ಬಬಲ್ ವಜಾಗೊಳಿಸಿ"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ಸಂಭಾಷಣೆಯನ್ನು ಬಬಲ್ ಮಾಡಬೇಡಿ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ಬಬಲ್ಸ್ ಬಳಸಿ ಚಾಟ್ ಮಾಡಿ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ಹೊಸ ಸಂಭಾಷಣೆಗಳು ತೇಲುವ ಐಕಾನ್‌ಗಳು ಅಥವಾ ಬಬಲ್ಸ್ ಆಗಿ ಗೋಚರಿಸುತ್ತವೆ. ಬಬಲ್ ತೆರೆಯಲು ಟ್ಯಾಪ್ ಮಾಡಿ. ಅದನ್ನು ಡ್ರ್ಯಾಗ್ ಮಾಡಲು ಎಳೆಯಿರಿ."</string>
@@ -1068,7 +1068,7 @@
<string name="controls_error_retryable" msgid="864025882878378470">"ದೋಷ, ಮರುಪ್ರಯತ್ನಿಸಲಾಗುತ್ತಿದೆ…"</string>
<string name="controls_error_removed" msgid="6675638069846014366">"ಕಂಡುಬಂದಿಲ್ಲ"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"ನಿಯಂತ್ರಣ ಲಭ್ಯವಿಲ್ಲ"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ. ನಿಯಂತ್ರಣ ಈಗಲೂ ಲಭ್ಯವಿದೆಯೇ ಮತ್ತು <xliff:g id="APPLICATION">%2$s</xliff:g> ಆ್ಯಪ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಲಾಗಿಲ್ಲ ಎಂಬುದನ್ನು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಆ್ಯಪ್ ಅನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ನಿಯಂತ್ರಣ ಈಗಲೂ ಲಭ್ಯವಿದೆ ಮತ್ತು ಆ್ಯಪ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಲಾಗಿಲ್ಲ ಎಂಬುದನ್ನು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು <xliff:g id="APPLICATION">%2$s</xliff:g> ಆ್ಯಪ್ ಅನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
<string name="controls_open_app" msgid="483650971094300141">"ಆ್ಯಪ್ ತೆರೆಯಿರಿ"</string>
<string name="controls_error_generic" msgid="352500456918362905">"ಸ್ಥಿತಿ ಲೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
<string name="controls_error_failed" msgid="960228639198558525">"ದೋಷ, ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index a75c230cd681..a27f4f723a0c 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"모두 지우기"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"관리"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"기록"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"최근 알림"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"새 알림"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"무음"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"알림"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"대화"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"오른쪽 상단으로 이동"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"왼쪽 하단으로 이동"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"오른쪽 하단으로 이동"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"대화창 닫기"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"대화를 대화창으로 표시하지 않음"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"대화창으로 채팅하기"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"새로운 대화가 플로팅 아이콘인 대화창으로 표시됩니다. 대화창을 열려면 탭하세요. 드래그하여 이동할 수 있습니다."</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index a0f532acf9da..9b8fa78213bc 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -95,7 +95,7 @@
<string name="screenrecord_description" msgid="1123231719680353736">"Жаздыруу учурунда Android тутуму экраныңызда көрүнүп турган жана түзмөктө ойноп жаткан бардык купуя маалыматты жаздырып алат. Буга сырсөздөр, төлөм маалыматы, сүрөттөр, билдирүүлөр жана аудио файлдар кирет."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Аудио жаздыруу"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Түзмөктүн аудиосу"</string>
- <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Музыка, чалуулар жана рингтондор сыяктуу түзмөгүңүздөгү добуштар"</string>
+ <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Музыка, чалуулар жана шыңгырлар сыяктуу түзмөгүңүздөгү добуштар"</string>
<string name="screenrecord_mic_label" msgid="2111264835791332350">"Микрофон"</string>
<string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Түзмөктүн аудиосу жана микрофон"</string>
<string name="screenrecord_start" msgid="330991441575775004">"Баштадык"</string>
@@ -506,11 +506,11 @@
<string name="media_projection_dialog_service_text" msgid="958000992162214611">"Бул функцияны аткарган кызматка экраныңыздагы бардык маалымат же түзмөктө ойнотулуп жаткан нерсе, сырсөздөр, төлөмдөрдүн чоо-жайы, сүрөттөр, билдирүүлөр жана аудио файлдар жеткиликтүү болот."</string>
<string name="media_projection_dialog_service_title" msgid="2888507074107884040">"Жаздырып же тышкы экранга чыгарып баштайсызбы?"</string>
<string name="media_projection_dialog_title" msgid="3316063622495360646">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> менен жаздырылып же тышкы экранга чыгарылып башталсынбы?"</string>
- <string name="media_projection_remember_text" msgid="6896767327140422951">"Экинчи көрсөтүлбөсүн"</string>
+ <string name="media_projection_remember_text" msgid="6896767327140422951">"Экинчи көрүнбөсүн"</string>
<string name="clear_all_notifications_text" msgid="348312370303046130">"Баарын тазалап салуу"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Башкаруу"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Таржымал"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Кирүүчү"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Жаңы"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Үнсүз"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Билдирмелер"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Жазышуулар"</string>
@@ -714,14 +714,14 @@
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Үнү чыкпайт жана дирилдебейт"</string>
<string name="notification_conversation_summary_low" msgid="1734433426085468009">"Үнү чыгып же дирилдебейт жана жазышуу бөлүмүнүн ылдый жагында көрүнөт"</string>
<string name="notification_channel_summary_default" msgid="3282930979307248890">"Телефондун жөндөөлөрүнө жараша шыңгырап же дирилдеши мүмкүн"</string>
- <string name="notification_channel_summary_default_with_bubbles" msgid="1782419896613644568">"Телефондун жөндөөлөрүнө жараша шыңгырап же дирилдеши мүмкүн. <xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосундагы жазышуулар демейки жөндөө боюнча калкып чыкма билдирмелер болуп көрүнөт."</string>
+ <string name="notification_channel_summary_default_with_bubbles" msgid="1782419896613644568">"Телефондун жөндөөлөрүнө жараша шыңгырап же дирилдеши мүмкүн. <xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосундагы жазышуулар демейки жөндөө боюнча калкып чыкма билдирмелер түрүндө көрүнөт."</string>
<string name="notification_channel_summary_bubble" msgid="7235935211580860537">"Калкыма ыкчам баскыч менен көңүлүңүздү бул мазмунга буруп турат."</string>
<string name="notification_channel_summary_priority" msgid="7952654515769021553">"Жазышуу бөлүмүнүн жогорку жагында калкып чыкма билдирме түрүндө көрүнүп, профиль сүрөтү кулпуланган экрандан чагылдырылат"</string>
<string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Жөндөөлөр"</string>
<string name="notification_priority_title" msgid="2079708866333537093">"Маанилүүлүгү"</string>
<string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> жазышуу функцияларын колдоого албайт"</string>
- <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Акыркы калкып чыкма билдирмелер жок"</string>
- <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Кайра жөнөтүлгөн жана жабылган калкып чыкма билдирмелер ушул жерде көрүнөт"</string>
+ <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Азырынча эч нерсе жок"</string>
+ <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Акыркы жана жабылган калкып чыкма билдирмелер ушул жерде көрүнөт"</string>
<string name="notification_unblockable_desc" msgid="2073030886006190804">"Бул билдирмелерди өзгөртүүгө болбойт."</string>
<string name="notification_multichannel_desc" msgid="7414593090056236179">"Бул билдирмелердин тобун бул жерде конфигурациялоого болбойт"</string>
<string name="notification_delegate_header" msgid="1264510071031479920">"Прокси билдирмеси"</string>
@@ -864,12 +864,12 @@
<string-array name="clock_options">
<item msgid="3986445361435142273">"Сааттар, мүнөттөр жана секунддар"</item>
<item msgid="1271006222031257266">"Сааттар жана мүнөттөр (демейки шартта)"</item>
- <item msgid="6135970080453877218">"Бул сүрөтчө көрсөтүлбөсүн"</item>
+ <item msgid="6135970080453877218">"Бул сүрөтчө көрүнбөсүн"</item>
</string-array>
<string-array name="battery_options">
<item msgid="7714004721411852551">"Ар дайым пайызы көрсөтүлсүн"</item>
<item msgid="3805744470661798712">"Кубаттоо учурунда пайызы көрсөтүлсүн (демейки)"</item>
- <item msgid="8619482474544321778">"Бул сүрөтчө көрсөтүлбөсүн"</item>
+ <item msgid="8619482474544321778">"Бул сүрөтчө көрүнбөсүн"</item>
</string-array>
<string name="tuner_low_priority" msgid="8412666814123009820">"Анча маанилүү эмес билдирменин сүрөтчөлөрүн көрсөтүү"</string>
<string name="other" msgid="429768510980739978">"Башка"</string>
@@ -1002,11 +1002,10 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Жогорку оң жакка жылдырыңыз"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Төмөнкү сол жакка жылдыруу"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Төмөнкү оң жакка жылдырыңыз"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Калкып чыкма билдирмени жабуу"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Жазышуу калкып чыкма билдирмеде көрүнбөсүн"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Калкып чыкма билдирмелер аркылуу маектешүү"</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"Жаңы жазышуулар калкыма сүрөтчөлөр же калкып чыкма билдирмелер болуп көрүнөт. Калкып чыкма билдирмелерди ачуу үчүн таптап коюңуз. Жылдыруу үчүн сүйрөңүз."</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"Жаңы жазышуулар калкыма сүрөтчөлөр же калкып чыкма билдирмелер түрүндө көрүнөт. Калкып чыкма билдирмелерди ачуу үчүн таптап коюңуз. Жылдыруу үчүн сүйрөңүз."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Калкып чыкма билдирмелерди каалаган убакта көзөмөлдөңүз"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Бул колдонмодогу калкып чыкма билдирмелерди өчүрүү үчүн \"Башкарууну\" басыңыз"</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"Түшүндүм"</string>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 829d39aac864..47353fd85e03 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ລຶບລ້າງທັງໝົດ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ຈັດການ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ປະຫວັດ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ຂາເຂົ້າ"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"ໃໝ່"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ປິດສຽງ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ການແຈ້ງເຕືອນ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ການສົນທະນາ"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ຍ້າຍຂວາເທິງ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ຍ້າຍຊ້າຍລຸ່ມ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ຍ້າຍຂວາລຸ່ມ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ປິດ bubble ໄວ້"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ຢ່າໃຊ້ຟອງໃນການສົນທະນາ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ສົນທະນາໂດຍໃຊ້ຟອງ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ການສົນທະນາໃໝ່ຈະປາກົດເປັນໄອຄອນ ຫຼື ຟອງແບບລອຍ. ແຕະເພື່ອເປີດຟອງ. ລາກເພື່ອຍ້າຍມັນ."</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index de793947a037..59cab5795f13 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Viską išvalyti"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Tvarkyti"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Istorija"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Gaunami"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nauja"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Tylūs"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Pranešimai"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Pokalbiai"</string>
@@ -724,10 +724,10 @@
<string name="notification_channel_summary_bubble" msgid="7235935211580860537">"Naudojant slankųjį spartųjį klavišą lengviau sutelkti dėmesį į šį turinį."</string>
<string name="notification_channel_summary_priority" msgid="7952654515769021553">"Rodoma pokalbių skilties viršuje, rodoma kaip slankusis burbulas, pateikiama profilio nuotrauka užrakinimo ekrane"</string>
<string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Nustatymai"</string>
- <string name="notification_priority_title" msgid="2079708866333537093">"Prioritetas"</string>
+ <string name="notification_priority_title" msgid="2079708866333537093">"Prioritetiniai"</string>
<string name="no_shortcut" msgid="8257177117568230126">"Programa „<xliff:g id="APP_NAME">%1$s</xliff:g>“ nepalaiko pokalbių funkcijų"</string>
<string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Nėra naujausių burbulų"</string>
- <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Naujausi ir atsisakyti burbulus bus rodomi čia"</string>
+ <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Naujausi ir atsisakyti burbulai bus rodomi čia"</string>
<string name="notification_unblockable_desc" msgid="2073030886006190804">"Šių pranešimų keisti negalima."</string>
<string name="notification_multichannel_desc" msgid="7414593090056236179">"Šios grupės pranešimai čia nekonfigūruojami"</string>
<string name="notification_delegate_header" msgid="1264510071031479920">"Per tarpinį serverį gautas pranešimas"</string>
@@ -1012,11 +1012,10 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Perkelti į viršų dešinėje"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Perkelti į apačią kairėje"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Perkelti į apačią dešinėje"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Atsisakyti burbulo"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nerodyti pokalbio burbule"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Pokalbis naudojant burbulus"</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"Nauji pokalbiai rodomi kaip slankiosios piktogramos arba burbulus. Palieskite, kad atidarytumėte burbulą. Vilkite, kad perkeltumėte."</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"Nauji pokalbiai rodomi kaip slankiosios piktogramos arba burbulai. Palieskite, kad atidarytumėte burbulą. Vilkite, kad perkeltumėte."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Bet kada valdyti burbulus"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Palieskite „Tvarkyti“, kad išjungtumėte burbulus šioje programoje"</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"Supratau"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index ba6b8954f655..bc157026e745 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Dzēst visu"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Pārvaldīt"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Vēsture"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Ienākošie"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Jauni"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Klusums"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Paziņojumi"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Sarunas"</string>
@@ -1007,8 +1007,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Pārvietot augšpusē pa labi"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Pārvietot apakšpusē pa kreisi"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Pārvietot apakšpusē pa labi"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Nerādīt burbuli"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nerādīt sarunu burbuļos"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Tērzēšana, izmantojot burbuļus"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Jaunas sarunas tiek rādītas kā peldošas ikonas vai burbuļi. Pieskarieties, lai atvērtu burbuli. Velciet, lai to pārvietotu."</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 522cebd8ea6c..0b629a329336 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -479,7 +479,7 @@
<string name="guest_exit_guest_dialog_title" msgid="5015697561580641422">"Да се отстрани гостинот?"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Сите апликации и податоци во сесијата ќе се избришат."</string>
<string name="guest_exit_guest_dialog_remove" msgid="7505817591242703757">"Отстрани"</string>
- <string name="guest_wipe_session_title" msgid="7147965814683990944">"Добредојде назад, гостине!"</string>
+ <string name="guest_wipe_session_title" msgid="7147965814683990944">"Добре дојде пак, гостине!"</string>
<string name="guest_wipe_session_message" msgid="3393823610257065457">"Дали сакате да продолжите со сесијата?"</string>
<string name="guest_wipe_session_wipe" msgid="8056836584445473309">"Почни одново"</string>
<string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"Да, продолжи"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Избриши сѐ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Управувајте"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Историја"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Дојдовни"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Нов"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Безгласно"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Известувања"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Разговори"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Премести горе десно"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Премести долу лево"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Премести долу десно"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Отфрли балонче"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Не прикажувај го разговорот во балончиња"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Разговор во балончиња"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Новите разговори ќе се појавуваат како лебдечки икони или балончиња. Допрете за отворање на балончето. Повлечете за да го преместите."</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 03e826f54e45..b24518daa31b 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"എല്ലാം മായ്‌ക്കുക"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"മാനേജ് ചെയ്യുക"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ചരിത്രം"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ഇൻകമിംഗ്"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"നിശബ്‌ദം"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"അറിയിപ്പുകൾ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"സംഭാഷണങ്ങൾ"</string>
@@ -1006,7 +1007,7 @@
<skip />
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"സംഭാഷണം ബബിൾ ചെയ്യരുത്"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ബബിളുകൾ ഉപയോഗിച്ച് ചാറ്റ് ചെയ്യുക"</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"പുതിയ സംഭാഷണങ്ങൾ ഫ്ലോട്ടിംഗ് ഐക്കണുകളോ ബബിളുകളോ ആയി ദൃശ്യമാവുന്നു. ബബിൾ തുറക്കാൻ ടാപ്പ് ചെയ്യു. ഇത് നീക്കാൻ വലിച്ചിടുക."</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"പുതിയ സംഭാഷണങ്ങൾ ഫ്ലോട്ടിംഗ് ഐക്കണുകളോ ബബിളുകളോ ആയി ദൃശ്യമാവുന്നു. ബബിൾ തുറക്കാൻ ടാപ്പ് ചെയ്യൂ. ഇത് നീക്കാൻ വലിച്ചിടുക."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"ബബിളുകൾ ഏതുസമയത്തും നിയന്ത്രിക്കുക"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"ഈ ആപ്പിൽ നിന്നുള്ള ബബിളുകൾ ഓഫാക്കാൻ മാനേജ് ചെയ്യുക ടാപ്പ് ചെയ്യുക"</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"ലഭിച്ചു"</string>
@@ -1014,17 +1015,14 @@
<string name="notification_content_system_nav_changed" msgid="5077913144844684544">"സിസ്‌റ്റം നാവിഗേഷൻ അപ്‌ഡേറ്റ് ചെയ്‌തു. മാറ്റങ്ങൾ വരുത്താൻ ക്രമീകരണത്തിലേക്ക് പോവുക."</string>
<string name="notification_content_gesture_nav_available" msgid="4431460803004659888">"സിസ്‌റ്റം നാവിഗേഷൻ അപ്‌ഡേറ്റ് ചെയ്യാൻ ക്രമീകരണത്തിലേക്ക് പോവുക"</string>
<string name="inattentive_sleep_warning_title" msgid="3891371591713990373">"സ്‌റ്റാൻഡ്‌ബൈ"</string>
- <!-- no translation found for priority_onboarding_title (2893070698479227616) -->
- <skip />
- <!-- no translation found for priority_onboarding_behavior (5342816047020432929) -->
- <skip />
+ <string name="priority_onboarding_title" msgid="2893070698479227616">"സംഭാഷണം മുൻഗണനയുള്ളതായി സജ്ജീകരിച്ചു"</string>
+ <string name="priority_onboarding_behavior" msgid="5342816047020432929">"മുൻഗണനാ സംഭാഷണങ്ങൾ ഇനിപ്പറയുന്നവ ചെയ്യും:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"സംഭാഷണ വിഭാഗത്തിന്റെ മുകളിൽ കാണിക്കുക"</string>
<string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"ലോക്ക് സ്ക്രീനിൽ പ്രൊഫൈൽ ചിത്രം കാണിക്കുക"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"ആപ്പുകളുടെ മുകളിൽ ഫ്ലോട്ടിംഗ് ബബിൾ ആയി ദൃശ്യമാകും"</string>
<string name="priority_onboarding_ignores_dnd_text" msgid="2918952762719600529">"\'ശല്യപ്പെടുത്തരുത്\' തടസ്സപ്പെടുത്തുക"</string>
<string name="priority_onboarding_done_button_title" msgid="4569550984286506007">"മനസ്സിലായി"</string>
- <!-- no translation found for priority_onboarding_settings_button_title (6663601574303585927) -->
- <skip />
+ <string name="priority_onboarding_settings_button_title" msgid="6663601574303585927">"ക്രമീകരണം"</string>
<string name="magnification_overlay_title" msgid="6584179429612427958">"മാഗ്നിഫിക്കേഷൻ ഓവർലേ വിൻഡോ"</string>
<string name="magnification_window_title" msgid="4863914360847258333">"മാഗ്നിഫിക്കേഷൻ വിൻഡോ"</string>
<string name="magnification_controls_title" msgid="8421106606708891519">"മാഗ്നിഫിക്കേഷൻ വിൻഡോ നിയന്ത്രണങ്ങൾ"</string>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 9a15e98fa763..4ab58f089e24 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Бүгдийг арилгах"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Удирдах"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Түүх"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Ирж буй"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Шинэ"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Чимээгүй"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Мэдэгдлүүд"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Харилцан яриа"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Баруун дээш зөөх"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Зүүн доош зөөх"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Баруун доош зөөх"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Бөмбөлгийг хаах"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Харилцан яриаг бүү бөмбөлөг болго"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Бөмбөлөг ашиглан чатлаарай"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Шинэ харилцан яриа нь хөвөгч дүрс тэмдэг эсвэл бөмбөлөг хэлбэрээр харагддаг. Бөмбөлгийг нээхийн тулд товшино уу. Түүнийг зөөхийн тулд чирнэ үү."</string>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index cbc50b90e300..9587e71e6136 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"सर्व साफ करा"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"व्यवस्थापित करा"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"इतिहास"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"आलेल्या"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"सायलंट"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"सूचना"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"संभाषणे"</string>
@@ -1014,17 +1015,14 @@
<string name="notification_content_system_nav_changed" msgid="5077913144844684544">"सिस्टम नेव्हिगेशन अपडेट केले. बदल करण्यासाठी, सेटिंग्जवर जा."</string>
<string name="notification_content_gesture_nav_available" msgid="4431460803004659888">"सिस्टम नेव्हिगेशन अपडेट करण्यासाठी सेटिंग्जवर जा"</string>
<string name="inattentive_sleep_warning_title" msgid="3891371591713990373">"स्टँडबाय"</string>
- <!-- no translation found for priority_onboarding_title (2893070698479227616) -->
- <skip />
- <!-- no translation found for priority_onboarding_behavior (5342816047020432929) -->
- <skip />
+ <string name="priority_onboarding_title" msgid="2893070698479227616">"संभाषणाला प्राधान्य म्हणून सेट केले आहे"</string>
+ <string name="priority_onboarding_behavior" msgid="5342816047020432929">"प्राधान्य दिलेली संभाषणे:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"संभाषण विभागाच्या सर्वात वरती दाखवा"</string>
<string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"लॉक स्‍क्रीनवर प्रोफाइल फोटो दाखवा"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"ॲप्सच्या सर्वात वरती फ्लोटिंग बबल म्हणून दिसतील"</string>
<string name="priority_onboarding_ignores_dnd_text" msgid="2918952762719600529">"व्यत्यय आणू नका मध्ये अडथळा आणतील"</string>
<string name="priority_onboarding_done_button_title" msgid="4569550984286506007">"समजले"</string>
- <!-- no translation found for priority_onboarding_settings_button_title (6663601574303585927) -->
- <skip />
+ <string name="priority_onboarding_settings_button_title" msgid="6663601574303585927">"सेटिंग्ज"</string>
<string name="magnification_overlay_title" msgid="6584179429612427958">"मॅग्निफिकेशन ओव्हरले विंडो"</string>
<string name="magnification_window_title" msgid="4863914360847258333">"मॅग्निफिकेशन विंडो"</string>
<string name="magnification_controls_title" msgid="8421106606708891519">"मॅग्निफिकेशन विंडो नियंत्रणे"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index f89d5a0a4d4a..be17eade57a1 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Kosongkan semua"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Urus"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Sejarah"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Masuk"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Baharu"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Senyap"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Pemberitahuan"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Perbualan"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Alihkan ke atas sebelah kanan"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Alihkan ke bawah sebelah kiri"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Alihkan ke bawah sebelah kanan"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ketepikan gelembung"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Jangan jadikan perbualan dalam bentuk gelembung"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Bersembang menggunakan gelembung"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Perbualan baharu muncul sebagai ikon terapung atau gelembung. Ketik untuk membuka gelembung. Seret untuk mengalihkan gelembung tersebut."</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index dc70e80a7125..8c06f6768590 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -101,7 +101,7 @@
<string name="screenrecord_start" msgid="330991441575775004">"စတင်ရန်"</string>
<string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"ဖန်သားပြင်ကို ရိုက်ကူးနေသည်"</string>
<string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"အသံနှင့် ဖန်သားပြင်ကို ရိုက်ကူးနေသည်"</string>
- <string name="screenrecord_taps_label" msgid="1595690528298857649">"မျက်နှာပြင်ပေါ်တွင် ထိချက်များ ပြသည်"</string>
+ <string name="screenrecord_taps_label" msgid="1595690528298857649">"မျက်နှာပြင်ပေါ်တွင် ထိချက်များ ပြရန်"</string>
<string name="screenrecord_stop_text" msgid="6549288689506057686">"ရပ်ရန် တို့ပါ"</string>
<string name="screenrecord_stop_label" msgid="72699670052087989">"ရပ်ရန်"</string>
<string name="screenrecord_pause_label" msgid="6004054907104549857">"ခဏရပ်ရန်"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"အားလုံး ဖယ်ရှားရန်"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"စီမံရန်"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"မှတ်တမ်း"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"အဝင်"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"အသစ်"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"အသံတိတ်ခြင်း"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"အကြောင်းကြားချက်များ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"စကားဝိုင်းများ"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ညာဘက်ထိပ်သို့ ရွှေ့ပါ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ဘယ်အောက်ခြေသို့ ရွှေ့ရန်"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ညာအောက်ခြေသို့ ရွှေ့ပါ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ပူဖောင်းကွက် ပယ်ရန်"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"စကားဝိုင်းကို ပူဖောင်းကွက် မပြုလုပ်ပါနှင့်"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ပူဖောင်းကွက် သုံး၍ ချတ်လုပ်ခြင်း"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"စကားဝိုင်းအသစ်များကို မျောနေသည့် သင်္ကေတများ သို့မဟုတ် ပူဖောင်းကွက်များအဖြစ် မြင်ရပါမည်။ ပူဖောင်းကွက်ကိုဖွင့်ရန် တို့ပါ။ ရွှေ့ရန် ၎င်းကို ဖိဆွဲပါ။"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 53806a7e4daa..aee2dd288262 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Fjern alt"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Administrer"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Logg"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Innkommende"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Ny"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Lydløs"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Varsler"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Samtaler"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Flytt til øverst til høyre"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Flytt til nederst til venstre"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Flytt til nederst til høyre"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Lukk boblen"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ikke vis samtaler i bobler"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat med bobler"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nye samtaler vises som flytende ikoner eller bobler. Trykk for å åpne bobler. Dra for å flytte dem."</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 19cf233fa092..812477ad33d2 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"सबै हटाउनुहोस्"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"व्यवस्थित गर्नुहोस्"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"इतिहास"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"हालसालै प्राप्त भएका सूचनाहरू"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"मौन"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"सूचनाहरू"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"वार्तालापहरू"</string>
@@ -1014,17 +1015,14 @@
<string name="notification_content_system_nav_changed" msgid="5077913144844684544">"प्रणालीको नेभिगेसन अद्यावधिक गरियो। परिवर्तन गर्न सेटिङमा जानुहोस्।"</string>
<string name="notification_content_gesture_nav_available" msgid="4431460803004659888">"प्रणालीको नेभिगेसन अद्यावधिक गर्न सेटिङमा जानुहोस्"</string>
<string name="inattentive_sleep_warning_title" msgid="3891371591713990373">"स्ट्यान्डबाई"</string>
- <!-- no translation found for priority_onboarding_title (2893070698479227616) -->
- <skip />
- <!-- no translation found for priority_onboarding_behavior (5342816047020432929) -->
- <skip />
+ <string name="priority_onboarding_title" msgid="2893070698479227616">"वार्तालापको प्राथमिकता निर्धारण गरी महत्त्वपूर्ण बनाइयो"</string>
+ <string name="priority_onboarding_behavior" msgid="5342816047020432929">"महत्वपूर्ण वार्तालापहरू यहाँ देखिने छन्:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"वार्तालाप खण्डको सिरानमा देखाइयोस्"</string>
<string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"लक स्क्रिनमा प्रोफाइल तस्बिर देखाइयोस्"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"एपहरूमाथि तैरिने बबलका रूपमा देखाइयोस्"</string>
<string name="priority_onboarding_ignores_dnd_text" msgid="2918952762719600529">"बाधा नपुऱ्याउनुहोस् मोडलाई बेवास्ता गरियोस्"</string>
<string name="priority_onboarding_done_button_title" msgid="4569550984286506007">"बुझेँ"</string>
- <!-- no translation found for priority_onboarding_settings_button_title (6663601574303585927) -->
- <skip />
+ <string name="priority_onboarding_settings_button_title" msgid="6663601574303585927">"सेटिङ"</string>
<string name="magnification_overlay_title" msgid="6584179429612427958">"म्याग्निफिकेसन ओभरले विन्डो"</string>
<string name="magnification_window_title" msgid="4863914360847258333">"म्याग्निफिकेसन विन्डो"</string>
<string name="magnification_controls_title" msgid="8421106606708891519">"म्याग्निफिकेसन विन्डोका नियन्त्रणहरू"</string>
@@ -1070,8 +1068,8 @@
<string name="controls_error_timeout" msgid="794197289772728958">"निष्क्रिय छ, एप जाँच गर्नु…"</string>
<string name="controls_error_retryable" msgid="864025882878378470">"त्रुटि भयो, फेरि प्रयास गर्दै…"</string>
<string name="controls_error_removed" msgid="6675638069846014366">"फेला परेन"</string>
- <string name="controls_error_removed_title" msgid="1207794911208047818">"नियन्त्रण सुविधा उपलब्ध छैन"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> माथि पहुँच राख्न सकिएन। यो नियन्त्रण सुविधा अझै पनि उपलब्ध छ र <xliff:g id="APPLICATION">%2$s</xliff:g> एपका सेटिङ परिवर्तन गरिएका छैनन् भन्ने कुरा सुनिश्चित गर्न यो एप जाँच्नुहोस्।"</string>
+ <string name="controls_error_removed_title" msgid="1207794911208047818">"नियन्त्रण उपलब्ध छैन"</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> प्रयोग गर्न सकिएन। यो नियन्त्रण सुविधा अझै पनि उपलब्ध छ र <xliff:g id="APPLICATION">%2$s</xliff:g> एपका सेटिङ परिवर्तन गरिएका छैनन् भन्ने कुरा सुनिश्चित गर्न यो एप जाँच्नुहोस्।"</string>
<string name="controls_open_app" msgid="483650971094300141">"एप खोल्नुहोस्"</string>
<string name="controls_error_generic" msgid="352500456918362905">"वस्तुस्थिति लोड गर्न सकिएन"</string>
<string name="controls_error_failed" msgid="960228639198558525">"त्रुटि भयो, फेरि प्रयास गर्नु…"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 21e66ab67cd8..4e4cc773d69f 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -259,10 +259,10 @@
<string name="accessibility_bubble_dismissed" msgid="270358867566720729">"Bubbel gesloten."</string>
<string name="accessibility_desc_notification_shade" msgid="5355229129428759989">"Meldingenpaneel."</string>
<string name="accessibility_desc_quick_settings" msgid="4374766941484719179">"Snelle instellingen."</string>
- <string name="accessibility_desc_lock_screen" msgid="5983125095181194887">"Vergrendelingsscherm."</string>
+ <string name="accessibility_desc_lock_screen" msgid="5983125095181194887">"Vergrendelscherm."</string>
<string name="accessibility_desc_settings" msgid="6728577365389151969">"Instellingen"</string>
<string name="accessibility_desc_recent_apps" msgid="1748675199348914194">"Overzicht."</string>
- <string name="accessibility_desc_work_lock" msgid="4355620395354680575">"Vergrendelingsscherm voor werk"</string>
+ <string name="accessibility_desc_work_lock" msgid="4355620395354680575">"Vergrendelscherm voor werk"</string>
<string name="accessibility_desc_close" msgid="8293708213442107755">"Sluiten"</string>
<string name="accessibility_quick_settings_wifi" msgid="167707325133803052">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
<string name="accessibility_quick_settings_wifi_changed_off" msgid="2230487165558877262">"Wifi uitgeschakeld."</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Alles wissen"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Beheren"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Geschiedenis"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Inkomend"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nieuw"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Stil"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Meldingen"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Gesprekken"</string>
@@ -687,7 +687,7 @@
<string name="tuner_full_importance_settings" msgid="1388025816553459059">"Beheeropties voor meldingen met betrekking tot stroomverbruik"</string>
<string name="tuner_full_importance_settings_on" msgid="917981436602311547">"Aan"</string>
<string name="tuner_full_importance_settings_off" msgid="5580102038749680829">"Uit"</string>
- <string name="power_notification_controls_description" msgid="1334963837572708952">"Met beheeropties voor meldingen met betrekking tot stroomverbruik kun je een belangrijkheidsniveau van 0 tot 5 instellen voor de meldingen van een app. \n\n"<b>"Niveau 5"</b>" \n- Boven aan de lijst met meldingen weergeven \n- Onderbreking op volledig scherm toestaan \n- Altijd korte weergave \n\n"<b>"Niveau 4"</b>" \n- Geen onderbreking op volledig scherm \n- Altijd korte weergave \n\n"<b>"Niveau 3"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n\n"<b>"Niveau 2"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n\n"<b>"Niveau 1"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n- Verbergen op vergrendelingsscherm en statusbalk \n- Onder aan de lijst met meldingen weergeven \n\n"<b>"Niveau 0"</b>" \n- Alle meldingen van de app blokkeren"</string>
+ <string name="power_notification_controls_description" msgid="1334963837572708952">"Met beheeropties voor meldingen met betrekking tot stroomverbruik kun je een belangrijkheidsniveau van 0 tot 5 instellen voor de meldingen van een app. \n\n"<b>"Niveau 5"</b>" \n- Boven aan de lijst met meldingen weergeven \n- Onderbreking op volledig scherm toestaan \n- Altijd korte weergave \n\n"<b>"Niveau 4"</b>" \n- Geen onderbreking op volledig scherm \n- Altijd korte weergave \n\n"<b>"Niveau 3"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n\n"<b>"Niveau 2"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n\n"<b>"Niveau 1"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n- Verbergen op vergrendelscherm en statusbalk \n- Onder aan de lijst met meldingen weergeven \n\n"<b>"Niveau 0"</b>" \n- Alle meldingen van de app blokkeren"</string>
<string name="notification_header_default_channel" msgid="225454696914642444">"Meldingen"</string>
<string name="notification_channel_disabled" msgid="928065923928416337">"Meldingen worden niet meer weergegeven"</string>
<string name="notification_channel_minimized" msgid="6892672757877552959">"Deze meldingen worden geminimaliseerd"</string>
@@ -716,7 +716,7 @@
<string name="notification_channel_summary_default" msgid="3282930979307248890">"Kan overgaan of trillen op basis van de telefooninstellingen"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="1782419896613644568">"Kan overgaan of trillen op basis van de telefooninstellingen. Gesprekken uit <xliff:g id="APP_NAME">%1$s</xliff:g> worden standaard als bubbels weergegeven."</string>
<string name="notification_channel_summary_bubble" msgid="7235935211580860537">"Trekt de aandacht met een zwevende snelkoppeling naar deze content."</string>
- <string name="notification_channel_summary_priority" msgid="7952654515769021553">"Wordt bovenaan het gedeelte met gesprekken weergegeven, verschijnt als zwevende bubbel, geeft de profielfoto weer op het vergrendelingsscherm"</string>
+ <string name="notification_channel_summary_priority" msgid="7952654515769021553">"Wordt bovenaan het gedeelte met gesprekken weergegeven, verschijnt als zwevende bubbel, geeft de profielfoto weer op het vergrendelscherm"</string>
<string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Instellingen"</string>
<string name="notification_priority_title" msgid="2079708866333537093">"Prioriteit"</string>
<string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> ondersteunt geen gespreksfuncties"</string>
@@ -907,7 +907,7 @@
<string name="accessibility_quick_settings_open_settings" msgid="536838345505030893">"<xliff:g id="ID_1">%s</xliff:g>-instellingen openen."</string>
<string name="accessibility_quick_settings_edit" msgid="1523745183383815910">"Volgorde van instellingen bewerken."</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Pagina <xliff:g id="ID_1">%1$d</xliff:g> van <xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="tuner_lock_screen" msgid="2267383813241144544">"Vergrendelingsscherm"</string>
+ <string name="tuner_lock_screen" msgid="2267383813241144544">"Vergrendelscherm"</string>
<string name="pip_phone_expand" msgid="1424988917240616212">"Uitvouwen"</string>
<string name="pip_phone_minimize" msgid="9057117033655996059">"Minimaliseren"</string>
<string name="pip_phone_close" msgid="8801864042095341824">"Sluiten"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Naar rechtsboven verplaatsen"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Naar linksonder verplaatsen"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Naar rechtsonder verplaatsen"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Bubbel sluiten"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Gesprekken niet in bubbels weergeven"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatten met bubbels"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nieuwe gesprekken worden weergegeven als zwevende iconen of \'bubbels\'. Tik om een bubbel te openen. Sleep om de bubbel te verplaatsen."</string>
@@ -1017,7 +1016,7 @@
<string name="priority_onboarding_title" msgid="2893070698479227616">"Gesprek ingesteld als prioriteit"</string>
<string name="priority_onboarding_behavior" msgid="5342816047020432929">"Bij prioriteitsgesprekken gebeurt het volgende:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"Worden bovenaan het gespreksgedeelte weergegeven"</string>
- <string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"Tonen profielafbeelding op vergrendelingsscherm"</string>
+ <string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"Tonen profielafbeelding op vergrendelscherm"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"Worden als zwevende ballon weergegeven vóór apps"</string>
<string name="priority_onboarding_ignores_dnd_text" msgid="2918952762719600529">"Onderbreken \'Niet storen\'"</string>
<string name="priority_onboarding_done_button_title" msgid="4569550984286506007">"OK"</string>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index f575f9868427..13bc85ae689d 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -273,7 +273,7 @@
<string name="accessibility_quick_settings_airplane_on" msgid="8106176561295294255">"ଏୟାର୍‌ପ୍ଲେନ୍‌ ମୋଡ୍‌ ଅନ୍ ଅଛି।"</string>
<string name="accessibility_quick_settings_airplane_changed_off" msgid="8880183481476943754">"ଏୟାର୍‌ପ୍ଲେନ୍‌ ମୋଡ୍‌କୁ ବନ୍ଦ କରାଯାଇଛି।"</string>
<string name="accessibility_quick_settings_airplane_changed_on" msgid="6327378061894076288">"ଏୟାର୍‌ପ୍ଲେନ୍‌ ମୋଡ୍‌କୁ ଚାଲୁ କରାଯାଇଛି।"</string>
- <string name="accessibility_quick_settings_dnd_none_on" msgid="3235552940146035383">"ସମ୍ପୂର୍ଣ୍ଣ ନିରବ"</string>
+ <string name="accessibility_quick_settings_dnd_none_on" msgid="3235552940146035383">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବତା"</string>
<string name="accessibility_quick_settings_dnd_alarms_on" msgid="3375848309132140014">"କେବଳ ଆଲାର୍ମ"</string>
<string name="accessibility_quick_settings_dnd" msgid="2415967452264206047">"ବିରକ୍ତ କରନ୍ତୁ ନାହିଁ।"</string>
<string name="accessibility_quick_settings_dnd_changed_off" msgid="1457150026842505799">"\"ବିରକ୍ତ କରନ୍ତୁ ନାହିଁ\"କୁ ବନ୍ଦ କରାଯାଇଛି।"</string>
@@ -345,7 +345,7 @@
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ବିରକ୍ତ କରନ୍ତୁ ନାହିଁ"</string>
<string name="quick_settings_dnd_priority_label" msgid="6251076422352664571">"କେବଳ ପ୍ରାଥମିକତା"</string>
<string name="quick_settings_dnd_alarms_label" msgid="1241780970469630835">"କେବଳ ଆଲାର୍ମ"</string>
- <string name="quick_settings_dnd_none_label" msgid="8420869988472836354">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବ"</string>
+ <string name="quick_settings_dnd_none_label" msgid="8420869988472836354">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବତା"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ବ୍ଲୁଟୁଥ"</string>
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="6595808498429809855">"ବ୍ଲୁଟୂଥ୍‍‌ (<xliff:g id="NUMBER">%d</xliff:g>ଟି ଡିଭାଇସ୍‌)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="6375098046500790870">"ବ୍ଲୁଟୂଥ୍‍‌ ଅଫ୍"</string>
@@ -460,7 +460,7 @@
<string name="voice_hint" msgid="7476017460191291417">"ଭଏସ୍‍ ସହାୟକ ପାଇଁ ଆଇକନରୁ ସ୍ୱାଇପ୍‍ କରନ୍ତୁ"</string>
<string name="camera_hint" msgid="4519495795000658637">"କ୍ୟାମେରା ପାଇଁ ଆଇକନରୁ ସ୍ୱାଇପ୍‍ କରନ୍ତୁ"</string>
<string name="interruption_level_none_with_warning" msgid="8394434073508145437">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବ। ଏହାଦ୍ୱାରା ସ୍କ୍ରୀନ୍‍ ରିଡର୍‍ ମଧ୍ୟ ନୀରବ ହୋଇଯିବ।"</string>
- <string name="interruption_level_none" msgid="219484038314193379">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବ"</string>
+ <string name="interruption_level_none" msgid="219484038314193379">"ସମ୍ପୂର୍ଣ୍ଣ ନୀରବତା"</string>
<string name="interruption_level_priority" msgid="661294280016622209">"କେବଳ ପ୍ରାଥମିକତା"</string>
<string name="interruption_level_alarms" msgid="2457850481335846959">"କେବଳ ଆଲାର୍ମ"</string>
<string name="interruption_level_none_twoline" msgid="8579382742855486372">"ସମ୍ପୂର୍ଣ୍ଣ\nନୀରବ"</string>
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ସମସ୍ତ ଖାଲି କରନ୍ତୁ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ପରିଚାଳନା କରନ୍ତୁ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ଇତିହାସ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ଇନକମିଂ"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ନୀରବ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ବିଜ୍ଞପ୍ତିଗୁଡ଼ିକ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ଉପର-ଡାହାଣକୁ ନିଅନ୍ତୁ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ତଳ ବାମକୁ ନିଅନ୍ତୁ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ତଳ ଡାହାଣକୁ ନିଅନ୍ତୁ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ବବଲ୍ ଖାରଜ କରନ୍ତୁ"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ବାର୍ତ୍ତାଳାପକୁ ବବଲ୍ କରନ୍ତୁ ନାହିଁ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ବବଲଗୁଡ଼ିକୁ ବ୍ୟବହାର କରି ଚାଟ୍ କରନ୍ତୁ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ନୂଆ ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ ଫ୍ଲୋଟିଂ ଆଇକନ୍ କିମ୍ବା ବବଲ୍ ଭାବେ ଦେଖାଯିବ। ବବଲ୍ ଖୋଲିବାକୁ ଟାପ୍ କରନ୍ତୁ। ଏହାକୁ ମୁଭ୍ କରିବାକୁ ଟାଣନ୍ତୁ।"</string>
@@ -1014,17 +1014,14 @@
<string name="notification_content_system_nav_changed" msgid="5077913144844684544">"ସିଷ୍ଟମ୍ ନାଭିଗେସନ୍ ଅପ୍‌ଡେଟ୍ ହୋଇଛି। ପରିବର୍ତ୍ତନ କରିବା ପାଇଁ, ସେଟିଂସ୍‌କୁ ଯାଆନ୍ତୁ।"</string>
<string name="notification_content_gesture_nav_available" msgid="4431460803004659888">"ସିଷ୍ଟମ୍ ନାଭିଗେସନ୍ ଅପ୍‌ଡେଟ୍ କରିବା ପାଇଁ ସେଟିଂସ୍‍କୁ ଯାଆନ୍ତୁ"</string>
<string name="inattentive_sleep_warning_title" msgid="3891371591713990373">"ଷ୍ଟାଣ୍ଡବାଏ"</string>
- <!-- no translation found for priority_onboarding_title (2893070698479227616) -->
- <skip />
- <!-- no translation found for priority_onboarding_behavior (5342816047020432929) -->
- <skip />
+ <string name="priority_onboarding_title" msgid="2893070698479227616">"ବାର୍ତ୍ତାଳାପ ପ୍ରାଥମିକରେ ସେଟ୍ କରାଯାଇଛି"</string>
+ <string name="priority_onboarding_behavior" msgid="5342816047020432929">"ପ୍ରାଥମିକ ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ ଏଠାରେ ଦେଖାଯିବ:"</string>
<string name="priority_onboarding_show_at_top_text" msgid="1678400241025513541">"ବାର୍ତ୍ତାଳାପ ବିଭାଗର ଶୀର୍ଷରେ ଦେଖାନ୍ତୁ"</string>
<string name="priority_onboarding_show_avatar_text" msgid="5756291381124091508">"ଲକ୍ ସ୍କ୍ରିନରେ ପ୍ରୋଫାଇଲ୍ ଛବି ଦେଖାନ୍ତୁ"</string>
<string name="priority_onboarding_appear_as_bubble_text" msgid="4227039772250263122">"ଆପଗୁଡ଼ିକ ଉପରେ ଫ୍ଲୋଟିଂ ବବଲ୍ ପରି ଦେଖାଯିବ"</string>
<string name="priority_onboarding_ignores_dnd_text" msgid="2918952762719600529">"\'ବିରକ୍ତ କରନ୍ତୁ ନାହିଁ\' ମୋଡରେ ବାଧା"</string>
<string name="priority_onboarding_done_button_title" msgid="4569550984286506007">"ବୁଝିଗଲି"</string>
- <!-- no translation found for priority_onboarding_settings_button_title (6663601574303585927) -->
- <skip />
+ <string name="priority_onboarding_settings_button_title" msgid="6663601574303585927">"ସେଟିଂସ୍"</string>
<string name="magnification_overlay_title" msgid="6584179429612427958">"ମ୍ୟାଗ୍ନିଫିକେସନ୍ ଓଭର୍‌ଲେ ୱିଣ୍ଡୋ"</string>
<string name="magnification_window_title" msgid="4863914360847258333">"ମ୍ୟାଗ୍ନିଫିକେସନ୍ ୱିଣ୍ଡୋ"</string>
<string name="magnification_controls_title" msgid="8421106606708891519">"ମ୍ୟାଗ୍ନିଫିକେସନ୍ ୱିଣ୍ଡୋ ନିୟନ୍ତ୍ରଣଗୁଡ଼ିକ"</string>
@@ -1069,9 +1066,9 @@
<string name="controls_media_resume" msgid="1933520684481586053">"ପୁଣି ଆରମ୍ଭ କରନ୍ତୁ"</string>
<string name="controls_error_timeout" msgid="794197289772728958">"ନିଷ୍କ୍ରିୟ ଅଛି, ଆପ ଯାଞ୍ଚ କରନ୍ତୁ"</string>
<string name="controls_error_retryable" msgid="864025882878378470">"ତ୍ରୁଟି, ପୁଣି ଚେଷ୍ଟା କରୁଛି…"</string>
- <string name="controls_error_removed" msgid="6675638069846014366">"ମିଳୁ ନାହିଁ"</string>
+ <string name="controls_error_removed" msgid="6675638069846014366">"ମିଳିଲା ନାହିଁ"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"ନିୟନ୍ତ୍ରଣ ଉପଲବ୍ଧ ନାହିଁ"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g>କୁ ଆକ୍ସେସ୍ କରିହେଲା ନାହିଁ। ନିୟନ୍ତ୍ରଣ ଏବେ ବି ଉପଲବ୍ଧ ଅଛି ଏବଂ ଆପ୍ ସେଟିଂସ୍ ବଦଳାଯାଇ ନାହିଁ ବୋଲି ସୁନିଶ୍ଚିତ କରିବାକୁ <xliff:g id="APPLICATION">%2$s</xliff:g> ଆପ୍ ଯାଞ୍ଚ କରନ୍ତୁ।"</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g>କୁ ଆକ୍ସେସ୍ କରିହେଲା ନାହିଁ। ନିୟନ୍ତ୍ରଣ ଏବେ ବି ଉପଲବ୍ଧ ଅଛି ଏବଂ ଆପ୍ ସେଟିଂସ୍ ବଦଳାଯାଇ ନାହିଁ ବୋଲି ସୁନିଶ୍ଚିତ କରିବାକୁ <xliff:g id="APPLICATION">%2$s</xliff:g> ଆପକୁ ଯାଞ୍ଚ କରନ୍ତୁ।"</string>
<string name="controls_open_app" msgid="483650971094300141">"ଆପ୍ ଖୋଲନ୍ତୁ"</string>
<string name="controls_error_generic" msgid="352500456918362905">"ସ୍ଥିତି ଲୋଡ୍ କରାଯାଇପାରିବ ନାହିଁ"</string>
<string name="controls_error_failed" msgid="960228639198558525">"ତ୍ରୁଟି ହୋଇଛି, ପୁଣି ଚେଷ୍ଟା କର"</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 3389a18c8f9c..fe4dfb2fba54 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ਸਭ ਕਲੀਅਰ ਕਰੋ"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"ਪ੍ਰਬੰਧਨ ਕਰੋ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ਇਤਿਹਾਸ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ਇਨਕਮਿੰਗ"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"ਸ਼ਾਂਤ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"ਸੂਚਨਾਵਾਂ"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"ਗੱਲਾਂਬਾਤਾਂ"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ਉੱਪਰ ਵੱਲ ਸੱਜੇ ਲਿਜਾਓ"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ਹੇਠਾਂ ਵੱਲ ਖੱਬੇ ਲਿਜਾਓ"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ਹੇਠਾਂ ਵੱਲ ਸੱਜੇ ਲਿਜਾਓ"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ਬਬਲ ਨੂੰ ਖਾਰਜ ਕਰੋ"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ਗੱਲਬਾਤ \'ਤੇ ਬਬਲ ਨਾ ਲਾਓ"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"ਬਬਲ ਵਰਤਦੇ ਹੋਏ ਚੈਟ ਕਰੋ"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"ਨਵੀਆਂ ਗੱਲਾਂਬਾਤਾਂ ਫਲੋਟਿੰਗ ਪ੍ਰਤੀਕਾਂ ਜਾਂ ਬਬਲ ਦੇ ਰੂਪ ਵਿੱਚ ਦਿਸਦੀਆਂ ਹਨ। ਬਬਲ ਨੂੰ ਖੋਲ੍ਹਣ ਲਈ ਟੈਪ ਕਰੋ। ਇਸਨੂੰ ਲਿਜਾਣ ਲਈ ਘਸੀਟੋ।"</string>
@@ -1068,7 +1068,7 @@
<string name="controls_error_retryable" msgid="864025882878378470">"ਗੜਬੜ, ਮੁੜ ਕੋਸ਼ਿਸ਼ ਹੋ ਰਹੀ ਹੈ…"</string>
<string name="controls_error_removed" msgid="6675638069846014366">"ਨਹੀਂ ਮਿਲਿਆ"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"ਕੰਟਰੋਲ ਉਪਲਬਧ ਨਹੀਂ ਹੈ"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ਤੱਕ ਪਹੁੰਚ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ। ਇਹ ਪੱਕਾ ਕਰਨ ਲਈ <xliff:g id="APPLICATION">%2$s</xliff:g> ਐਪ ਦੀ ਜਾਂਚ ਕਰੋ ਕਿ ਕੰਟਰੋਲ ਹਾਲੇ ਵੀ ਉਪਲਬਧ ਹੈ ਅਤੇ ਐਪ ਸੈਟਿੰਗ ਬਦਲੀ ਨਹੀਂ ਹੈ।"</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"<xliff:g id="DEVICE">%1$s</xliff:g> ਤੱਕ ਪਹੁੰਚ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ। ਇਹ ਪੱਕਾ ਕਰਨ ਲਈ <xliff:g id="APPLICATION">%2$s</xliff:g> ਐਪ ਦੀ ਜਾਂਚ ਕਰੋ ਕਿ ਕੰਟਰੋਲ ਹਾਲੇ ਉਪਲਬਧ ਹੈ ਅਤੇ ਐਪ ਸੈਟਿੰਗਾਂ ਨਹੀਂ ਬਦਲੀਆਂ ਹਨ।"</string>
<string name="controls_open_app" msgid="483650971094300141">"ਐਪ ਖੋਲ੍ਹੋ"</string>
<string name="controls_error_generic" msgid="352500456918362905">"ਸਥਿਤੀ ਲੋਡ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ"</string>
<string name="controls_error_failed" msgid="960228639198558525">"ਗੜਬੜ, ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index e85b76f228ac..b2aaa05724e1 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -168,7 +168,7 @@
<string name="biometric_dialog_last_password_attempt_before_wipe_profile" msgid="8538032972389729253">"Jeśli następnym razem podasz nieprawidłowe hasło, profil służbowy oraz powiązane z nim dane zostaną usunięte."</string>
<string name="biometric_dialog_failed_attempts_now_wiping_device" msgid="6585503524026243042">"Zbyt wiele nieudanych prób. Dane na urządzeniu zostaną usunięte."</string>
<string name="biometric_dialog_failed_attempts_now_wiping_user" msgid="7015008539146949115">"Zbyt wiele nieudanych prób. Użytkownik zostanie usunięty."</string>
- <string name="biometric_dialog_failed_attempts_now_wiping_profile" msgid="5239378521440749682">"Zbyt wiele nieudanych prób. Profil do pracy i powiązane z nim dane zostaną usunięte."</string>
+ <string name="biometric_dialog_failed_attempts_now_wiping_profile" msgid="5239378521440749682">"Zbyt wiele nieudanych prób. Profil służbowy i powiązane z nim dane zostaną usunięte."</string>
<string name="biometric_dialog_now_wiping_dialog_dismiss" msgid="7189432882125106154">"Zamknij"</string>
<string name="fingerprint_dialog_touch_sensor" msgid="2817887108047658975">"Dotknij czytnika linii papilarnych"</string>
<string name="accessibility_fingerprint_dialog_fingerprint_icon" msgid="4465698996175640549">"Ikona odcisku palca"</string>
@@ -516,7 +516,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Usuń wszystkie"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Zarządzaj"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historia"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Przychodzące"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Ciche"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Powiadomienia"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Rozmowy"</string>
@@ -1012,8 +1013,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Przenieś w prawy górny róg"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Przenieś w lewy dolny róg"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Przenieś w prawy dolny róg"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Zamknij dymek"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nie wyświetlaj rozmowy jako dymku"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Czatuj, korzystając z dymków"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nowe rozmowy będą wyświetlane jako pływające ikony lub dymki. Kliknij, by otworzyć dymek. Przeciągnij, by go przenieść."</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 2259c305022e..9b3976eaffb8 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Limpar tudo"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gerenciar"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Histórico"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Recebidas"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novas"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenciosas"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificações"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversas"</string>
@@ -595,7 +595,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"O app está fixado"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Ela é mantida à vista até que seja liberada. Toque em Voltar e em Visão geral e mantenha essas opções pressionadas para liberar."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Ela é mantida à vista até que seja liberada. Toque em Voltar e em Início e mantenha essas opções pressionadas para liberar."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Ela é mantida à vista até que seja liberada. Deslize para cima e a mantenha pressionada para liberar."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Ele é mantido à vista até que seja liberado. Deslize para cima e mantenha pressionado para liberar."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Ela é mantida à vista até que seja liberada. Toque em Visão geral e mantenha essa opção pressionada para liberar."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Ela é mantida à vista até que seja liberada. Toque em Início e mantenha essa opção pressionada para liberar."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Dados pessoais podem ficar acessíveis (como contatos e conteúdo de e-mail)."</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mover para canto superior direito"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mover para canto inferior esquerdo"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mover para canto inferior direito"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dispensar balão"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Não criar balões de conversa"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Converse usando balões"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Novas conversas aparecerão como ícones flutuantes, ou balões. Toque para abrir o balão. Arraste para movê-lo."</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index d90b8b2eeb13..24e7912be621 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Limpar tudo"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gerir"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Histórico"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"A receber"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nova"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silencioso"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificações"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversas"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mover parte superior direita"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mover p/ parte infer. esquerda"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mover parte inferior direita"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ignorar balão"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Não apresentar a conversa em balões"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Converse no chat através de balões"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"As novas conversas aparecem como ícones flutuantes ou balões. Toque para abrir o balão. Arraste para o mover."</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 2259c305022e..9b3976eaffb8 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Limpar tudo"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gerenciar"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Histórico"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Recebidas"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novas"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silenciosas"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificações"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversas"</string>
@@ -595,7 +595,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"O app está fixado"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Ela é mantida à vista até que seja liberada. Toque em Voltar e em Visão geral e mantenha essas opções pressionadas para liberar."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Ela é mantida à vista até que seja liberada. Toque em Voltar e em Início e mantenha essas opções pressionadas para liberar."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Ela é mantida à vista até que seja liberada. Deslize para cima e a mantenha pressionada para liberar."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Ele é mantido à vista até que seja liberado. Deslize para cima e mantenha pressionado para liberar."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Ela é mantida à vista até que seja liberada. Toque em Visão geral e mantenha essa opção pressionada para liberar."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Ela é mantida à vista até que seja liberada. Toque em Início e mantenha essa opção pressionada para liberar."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Dados pessoais podem ficar acessíveis (como contatos e conteúdo de e-mail)."</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mover para canto superior direito"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mover para canto inferior esquerdo"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mover para canto inferior direito"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Dispensar balão"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Não criar balões de conversa"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Converse usando balões"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Novas conversas aparecerão como ícones flutuantes, ou balões. Toque para abrir o balão. Arraste para movê-lo."</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index c90c04c666b1..6b18dc41932f 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Ștergeți toate notificările"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gestionați"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Istoric"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Primite"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Noi"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Silențioase"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Notificări"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Conversații"</string>
@@ -1007,10 +1007,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Mutați în dreapta sus"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Mutați în stânga jos"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Mutați în dreapta jos"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Închideți balonul"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nu afișați conversația în balon"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Discutați pe chat folosind baloanele"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Chat cu baloane"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Conversațiile noi apar ca pictograme flotante sau baloane. Atingeți pentru a deschide balonul. Trageți pentru a-l muta."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Controlați oricând baloanele"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Atingeți Gestionați pentru a dezactiva baloanele din această aplicație"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 35f4b745830a..916b2c7923e7 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Очистить все"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Настроить"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"История"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Входящие"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Новое"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Без звука"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Уведомления"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Разговоры"</string>
@@ -727,7 +727,7 @@
<string name="notification_priority_title" msgid="2079708866333537093">"Приоритет"</string>
<string name="no_shortcut" msgid="8257177117568230126">"Приложение \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" не поддерживает функции разговоров."</string>
<string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Нет недавних всплывающих чатов"</string>
- <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Здесь будут появляться недавние и закрытые всплывающие чаты."</string>
+ <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Здесь будут появляться недавние и скрытые всплывающие чаты."</string>
<string name="notification_unblockable_desc" msgid="2073030886006190804">"Эти уведомления нельзя изменить."</string>
<string name="notification_multichannel_desc" msgid="7414593090056236179">"Эту группу уведомлений нельзя настроить здесь."</string>
<string name="notification_delegate_header" msgid="1264510071031479920">"Уведомление отправлено через прокси-сервер."</string>
@@ -1012,10 +1012,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Перенести в правый верхний угол"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Перенести в левый нижний угол"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Перенести в правый нижний угол"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Закрыть всплывающий чат"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Не показывать всплывающие чаты для разговоров"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Всплывающие чаты для разговоров"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Всплывающие чаты"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Новые разговоры будут появляться в виде плавающих значков, или всплывающих чатов. Чтобы открыть чат, нажмите на него, а чтобы переместить – перетащите."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Настройки всплывающих чатов"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Чтобы отключить всплывающие чаты от приложения, нажмите \"Настроить\"."</string>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index be88cbafe59b..b9b95ac45f81 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"සියල්ල හිස් කරන්න"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"කළමනාකරණය කරන්න"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ඉතිහාසය"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"එන"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"නව"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"නිහඬ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"දැනුම් දීම්"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"සංවාද"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ඉහළ දකුණට ගෙන යන්න"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"පහළ වමට ගෙන යන්න"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"පහළ දකුණට ගෙන යන්න"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"බුබුලු ඉවත ලන්න"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"සංවාදය බුබුලු නොදමන්න"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"බුබුලු භාවිතයෙන් කතාබහ කරන්න"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"නව සංවාද පාවෙන අයිකන හෝ බුබුලු ලෙස දිස් වේ. බුබුල විවෘත කිරීමට තට්ටු කරන්න. එය ගෙන යාමට අදින්න."</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index e0ba13dbfd98..684e29645978 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Vymazať všetko"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Spravovať"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"História"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Prichádzajúce"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Nové"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Ticho"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Upozornenia"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Konverzácie"</string>
@@ -1012,8 +1012,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Presunúť doprava nahor"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Presunúť doľava nadol"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Presunúť doprava nadol"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Zavrieť bublinu"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nezobrazovať konverzáciu ako bublinu"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Čet pomocou bublín"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nové konverzácie sa zobrazujú ako plávajúce ikony či bubliny. Bublinu otvoríte klepnutím. Premiestnite ju presunutím."</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 7066e8dc1612..326ae97cdec3 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Izbriši vse"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Upravljanje"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Zgodovina"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Dohodno"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Novo"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Tiho"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Obvestila"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Pogovori"</string>
@@ -599,11 +599,11 @@
<string name="volume_odi_captions_hint_disable" msgid="2518846326748183407">"onemogoči"</string>
<string name="accessibility_output_chooser" msgid="7807898688967194183">"Izbira druge izhodne naprave"</string>
<string name="screen_pinning_title" msgid="9058007390337841305">"Aplikacija je pripeta"</string>
- <string name="screen_pinning_description" msgid="8699395373875667743">"S tem ostane zaslon viden, dokler ga ne odpnete. Če ga želite odpeti, hkrati pridržite gumba za nazaj in pregled."</string>
- <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"S tem ostane zaslon viden, dokler ga ne odpnete. Če ga želite odpeti, hkrati pridržite gumba za nazaj in za začetni zaslon."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"S tem ostane zaslon viden, dokler ga ne odpnete. Če ga želite odpeti, povlecite navzgor in pridržite."</string>
- <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"S tem ostane zaslon viden, dokler ga ne odpnete. Če ga želite odpeti, pridržite gumb za pregled."</string>
- <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"S tem ostane zaslon viden, dokler ga ne odpnete. Če ga želite odpeti, pridržite gumb za začetni zaslon."</string>
+ <string name="screen_pinning_description" msgid="8699395373875667743">"S tem ostane vidna, dokler je ne odpnete. Če jo želite odpeti, hkrati pridržite gumba za nazaj in pregled."</string>
+ <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"S tem ostane vidna, dokler je ne odpnete. Če jo želite odpeti, hkrati pridržite gumba za nazaj in za začetni zaslon."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"S tem ostane vidna, dokler je ne odpnete. Če jo želite odpeti, povlecite navzgor in pridržite."</string>
+ <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"S tem ostane vidna, dokler je ne odpnete. Če jo želite odpeti, pridržite gumb za pregled."</string>
+ <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"S tem ostane vidna, dokler je ne odpnete. Če jo želite odpeti, pridržite gumb za začetni zaslon."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Dostopni so lahko osebni podatki (na primer stiki in vsebina e-poštnih sporočil)."</string>
<string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"Pripeta aplikacija lahko odpre druge aplikacije."</string>
<string name="screen_pinning_toast" msgid="8177286912533744328">"Če želite odpeti to aplikacijo, hkrati pridržite gumba za nazaj in za pregled."</string>
@@ -1012,8 +1012,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Premakni zgoraj desno"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Premakni spodaj levo"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Premakni spodaj desno"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Opusti oblaček"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Pogovora ne prikaži v oblačku"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Klepet z oblački"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Novi pogovori so prikazani kot lebdeče ikone ali oblački. Če želite odpreti oblaček, se ga dotaknite. Če ga želite premakniti, ga povlecite."</string>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index a23a85bf97fa..ab6c93e94fc9 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Pastroji të gjitha"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Menaxho"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historiku"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Hyrëse"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Të reja"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Në heshtje"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Njoftimet"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Bisedat"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Lëviz lart djathtas"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Zhvendos poshtë majtas"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Lëvize poshtë djathtas"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Hiqe flluskën"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Mos e vendos bisedën në flluskë"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Bisedo duke përdorur flluskat"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Bisedat e reja shfaqen si ikona pluskuese ose flluska. Trokit për të hapur flluskën. Zvarrit për ta zhvendosur."</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index fde6413e4b97..f692e1cc20d9 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -513,7 +513,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Обриши све"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Управљајте"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Историја"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Долазно"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Ново"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Нечујно"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Обавештења"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Конверзације"</string>
@@ -598,7 +598,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"Апликација је закачена"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"На овај начин се ово стално приказује док га не откачите. Додирните и задржите Назад и Преглед да бисте га откачили."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"На овај начин се ово стално приказује док га не откачите. Додирните и задржите Назад и Почетна да бисте га откачили."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"На овај начин се стално приказује док га не откачите. Превуците нагоре и задржите да бисте га откачили."</string>
+ <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>
@@ -1007,8 +1007,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Премести горе десно"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Премести доле лево"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Премести доле десно"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Одбацивање облачића"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Не користи облачиће за конверзацију"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Ћаскајте у облачићима"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Нове конверзације се приказују као плутајуће иконе или облачићи. Додирните да бисте отворили облачић. Превуците да бисте га преместили."</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index af3839bc8e8b..73eb647303ba 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Rensa alla"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Hantera"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historik"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Inkommande"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Ny"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Ljudlöst"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Aviseringar"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Konversationer"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Flytta högst upp till höger"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Flytta längst ned till vänster"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Flytta längst ned till höger"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Stäng bubbla"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Visa inte konversationen i bubblor"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Chatta med bubblor"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Nya konversationer visas som flytande ikoner, så kallade bubblor. Tryck på bubblan om du vill öppna den. Dra den om du vill flytta den."</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index f5ec81bf8fec..1a0b9ec653ae 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Inachakata rekodi ya skrini"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Arifa inayoendelea ya kipindi cha kurekodi skrini"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"Ungependa kuanza kurekodi?"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"Wakati wa kurekodi, Mfumo wa Android unaweza kusana maelezo yoyote nyeti yanayoonekana kwenye skrini au yanayochezwa kwenye kifaa chako. Hii ni pamoja na manenosiri, maelezo ya malipo, picha, ujumbe na sauti."</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"Wakati wa kurekodi, Mfumo wa Android unaweza kunasa maelezo yoyote nyeti yanayoonekana kwenye skrini au yanayochezwa kwenye kifaa chako. Hii ni pamoja na manenosiri, maelezo ya malipo, picha, ujumbe na sauti."</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Rekodi sauti"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Sauti ya kifaa"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sauti kutoka kwenye kifaa chako, kama vile muziki, simu na milio ya simu"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Futa zote"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Dhibiti"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historia"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Simu inayoingia"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Mpya"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Kimya"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Arifa"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Mazungumzo"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Sogeza juu kulia"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Sogeza chini kushoto"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Sogeza chini kulia"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Ondoa kiputo"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Usiweke viputo kwenye mazungumzo"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Piga gumzo ukitumia viputo"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Mazungumzo mapya huonekena kama aikoni au viputo vinavyoelea. Gusa ili ufungue kiputo. Buruta ili ukisogeze."</string>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 4a32ecf8d229..29a186f481cc 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -146,7 +146,7 @@
<string name="biometric_dialog_face_icon_description_authenticating" msgid="3401633342366146535">"உங்கள் முகத்தை அங்கீகரிக்கிறது"</string>
<string name="biometric_dialog_face_icon_description_authenticated" msgid="2242167416140740920">"முகம் அங்கீகரிக்கப்பட்டது"</string>
<string name="biometric_dialog_face_icon_description_confirmed" msgid="7918067993953940778">"உறுதிப்படுத்தப்பட்டது"</string>
- <string name="biometric_dialog_tap_confirm" msgid="9166350738859143358">"முடிக்க \'உறுதிப்படுத்து\' என்பதை தட்டவும்"</string>
+ <string name="biometric_dialog_tap_confirm" msgid="9166350738859143358">"முடிக்க \'உறுதிப்படுத்துக\' என்பதை தட்டவும்"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"அங்கீகரிக்கப்பட்டது"</string>
<string name="biometric_dialog_use_pin" msgid="8385294115283000709">"பின்னைப் பயன்படுத்து"</string>
<string name="biometric_dialog_use_pattern" msgid="2315593393167211194">"பேட்டர்னைப் பயன்படுத்து"</string>
@@ -168,7 +168,7 @@
<string name="biometric_dialog_last_password_attempt_before_wipe_profile" msgid="8538032972389729253">"அடுத்த முறை தவறான கடவுச்சொல்லை உள்ளிட்டால் உங்கள் பணிக் கணக்கும் அதன் தரவும் நீக்கப்படும்."</string>
<string name="biometric_dialog_failed_attempts_now_wiping_device" msgid="6585503524026243042">"பலமுறை தவறாக முயன்ற காரணத்தால் இந்தச் சாதனத்தின் தரவு நீக்கப்படும்."</string>
<string name="biometric_dialog_failed_attempts_now_wiping_user" msgid="7015008539146949115">"பலமுறை தவறாக முயன்ற காரணத்தால் இந்தப் பயனர் நீக்கப்படுவார்."</string>
- <string name="biometric_dialog_failed_attempts_now_wiping_profile" msgid="5239378521440749682">"பலமுறை தவறாக முயன்ற காரணத்தால் இந்தப் பணிக் கணக்கும் அதன் தரவும் நீக்கப்படும்."</string>
+ <string name="biometric_dialog_failed_attempts_now_wiping_profile" msgid="5239378521440749682">"பலமுறை தவறாக முயன்றதால், இந்தப் பணிக் கணக்கும் அதன் தரவும் நீக்கப்படும்"</string>
<string name="biometric_dialog_now_wiping_dialog_dismiss" msgid="7189432882125106154">"நிராகரி"</string>
<string name="fingerprint_dialog_touch_sensor" msgid="2817887108047658975">"கைரேகை சென்சாரைத் தொடவும்"</string>
<string name="accessibility_fingerprint_dialog_fingerprint_icon" msgid="4465698996175640549">"கைரேகை ஐகான்"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"எல்லாவற்றையும் அழி"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"அறிவிப்புகளை நிர்வகி"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"வரலாறு"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"உள்வருவது"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"புதிது"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"நிசப்தம்"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"அறிவிப்புகள்"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"உரையாடல்கள்"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"மேலே வலப்புறமாக நகர்த்து"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"கீழே இடப்புறமாக நகர்த்து"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"கீழே வலதுபுறமாக நகர்த்து"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"குமிழை அகற்று"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"உரையாடலைக் குமிழாக்காதே"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"குமிழ்களைப் பயன்படுத்தி அரட்டையடியுங்கள்"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"புதிய உரையாடல்கள் மிதக்கும் ஐகான்களாகவோ குமிழ்களாகவோ தோன்றும். குமிழைத் திறக்க தட்டவும். நகர்த்த இழுக்கவும்."</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 73754a20cccc..4b56e157b34f 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"అన్నీ క్లియర్ చేయండి"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"నిర్వహించండి"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"చరిత్ర"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"ఇన్‌కమింగ్"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"కొత్తవి"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"నిశ్శబ్దం"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"నోటిఫికేషన్‌లు"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"సంభాషణలు"</string>
@@ -721,7 +721,7 @@
<string name="notification_priority_title" msgid="2079708866333537093">"ప్రాధాన్యత"</string>
<string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> సంభాషణ ఫీచర్‌లను సపోర్ట్ చేయదు"</string>
<string name="bubble_overflow_empty_title" msgid="3120029421991510842">"ఇటీవలి బబుల్స్ ఏవీ లేవు"</string>
- <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"ఇటీవలి బబుల్స్, తీసివేసిన బబుల్స్ ఇక్కడ కనిపిస్తాయి"</string>
+ <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"ఇటీవలి బబుల్స్ మరియు తీసివేసిన బబుల్స్ ఇక్కడ కనిపిస్తాయి"</string>
<string name="notification_unblockable_desc" msgid="2073030886006190804">"ఈ నోటిఫికేషన్‌లను సవరించడం వీలుపడదు."</string>
<string name="notification_multichannel_desc" msgid="7414593090056236179">"ఈ నోటిఫికేషన్‌ల సమూహాన్ని ఇక్కడ కాన్ఫిగర్ చేయలేము"</string>
<string name="notification_delegate_header" msgid="1264510071031479920">"ప్రాక్సీ చేయబడిన నోటిఫికేషన్"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ఎగువ కుడివైపునకు జరుపు"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"దిగువ ఎడమవైపునకు తరలించు"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"దిగవు కుడివైపునకు జరుపు"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"బబుల్‌ను విస్మరించు"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"సంభాషణను బబుల్ చేయవద్దు"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"బబుల్స్‌ను ఉపయోగించి చాట్ చేయండి"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"కొత్త సంభాషణలు తేలియాడే చిహ్నాలుగా లేదా బబుల్స్ లాగా కనిపిస్తాయి. బబుల్‌ని తెరవడానికి నొక్కండి. తరలించడానికి లాగండి."</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index d61533d0be01..585228d6411e 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -92,7 +92,7 @@
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"กำลังประมวลผลการอัดหน้าจอ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"การแจ้งเตือนต่อเนื่องสำหรับเซสชันการบันทึกหน้าจอ"</string>
<string name="screenrecord_start_label" msgid="1750350278888217473">"เริ่มบันทึกเลยไหม"</string>
- <string name="screenrecord_description" msgid="1123231719680353736">"ขณะบันทึก ระบบ Android จะบันทึกข้อมูลที่ละเอียดอ่อนที่ปรากฏบนหน้าจอหรือเล่นในอุปกรณ์ได้ ซึ่งรวมถึงรหัสผ่าน ข้อมูลการชำระเงิน รูปภาพ ข้อความ และเสียง"</string>
+ <string name="screenrecord_description" msgid="1123231719680353736">"ขณะบันทึก ระบบ Android อาจบันทึกข้อมูลที่ละเอียดอ่อนที่ปรากฏบนหน้าจอหรือเล่นในอุปกรณ์ได้ ซึ่งรวมถึงรหัสผ่าน ข้อมูลการชำระเงิน รูปภาพ ข้อความ และเสียง"</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"บันทึกเสียง"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"เสียงจากอุปกรณ์"</string>
<string name="screenrecord_device_audio_description" msgid="4922694220572186193">"เสียงจากอุปกรณ์ เช่น เพลง การโทร และเสียงเรียกเข้า"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"ล้างทั้งหมด"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"จัดการ"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"ประวัติ"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"เข้ามาใหม่"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"ใหม่"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"เงียบ"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"การแจ้งเตือน"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"การสนทนา"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"ย้ายไปด้านขวาบน"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"ย้ายไปด้านซ้ายล่าง"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"ย้ายไปด้านขาวล่าง"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"ปิดบับเบิล"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"ไม่ต้องแสดงการสนทนาเป็นบับเบิล"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"แชทโดยใช้บับเบิล"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"การสนทนาใหม่ๆ จะปรากฏเป็นไอคอนแบบลอยหรือบับเบิล แตะเพื่อเปิดบับเบิล ลากเพื่อย้ายที่"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 041214f2111e..e25e52bdf4ab 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -122,7 +122,7 @@
<string name="accessibility_back" msgid="6530104400086152611">"Bumalik"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
<string name="accessibility_menu" msgid="2701163794470513040">"Menu"</string>
- <string name="accessibility_accessibility_button" msgid="4089042473497107709">"Pagiging Accessible"</string>
+ <string name="accessibility_accessibility_button" msgid="4089042473497107709">"Accessibility"</string>
<string name="accessibility_rotate_button" msgid="1238584767612362586">"I-rotate ang screen"</string>
<string name="accessibility_recent" msgid="901641734769533575">"Overview"</string>
<string name="accessibility_search_light" msgid="524741790416076988">"Hanapin"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"I-clear lahat"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Pamahalaan"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"History"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Papasok"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Bago"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Naka-silent"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Mga Notification"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Mga Pag-uusap"</string>
@@ -595,7 +595,7 @@
<string name="screen_pinning_title" msgid="9058007390337841305">"Naka-pin ang app"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Pinapanatili nitong nakikita ito hanggang sa mag-unpin ka. Pindutin nang matagal ang Bumalik at Overview upang mag-unpin."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Pinapanatili nitong nakikita ito hanggang sa mag-unpin ka. Pindutin nang matagal ang Bumalik at Home upang mag-unpin."</string>
- <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Pinapanatili nitong nakikita ito hanggang sa mag-unpin ka. Mag-swipe pataas at i-hold para i-unpin."</string>
+ <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Mananatiling nakikita ang app hanggang sa mag-unpin ka. Mag-swipe pataas at i-hold para i-unpin."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Pinapanatili nitong nakikita ito hanggang sa mag-unpin ka. Pindutin nang matagal ang Overview upang mag-unpin."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Pinapanatili nitong nakikita ito hanggang sa mag-unpin ka. Pindutin nang matagal ang Home upang mag-unpin."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Puwedeng ma-access ang personal na data (tulad ng mga contact at content ng email)."</string>
@@ -618,7 +618,7 @@
<string name="stream_notification" msgid="7930294049046243939">"Notification"</string>
<string name="stream_bluetooth_sco" msgid="6234562365528664331">"Bluetooth"</string>
<string name="stream_dtmf" msgid="7322536356554673067">"Dual multi tone frequency"</string>
- <string name="stream_accessibility" msgid="3873610336741987152">"Pagiging Accessible"</string>
+ <string name="stream_accessibility" msgid="3873610336741987152">"Accessibility"</string>
<string name="ring_toggle_title" msgid="5973120187287633224">"Mga Tawag"</string>
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ipa-ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"I-vibrate"</string>
@@ -1002,10 +1002,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Ilipat sa kanan sa itaas"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Ilipat sa kaliwa sa ibaba"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Ilipat sa kanan sa ibaba"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"I-dismiss ang bubble"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Huwag ipakita sa bubble ang mga pag-uusap"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"Makipag-chat gamit ang mga bubble"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"Mag-chat gamit ang bubbles"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Lumalabas bilang mga nakalutang na icon o bubble ang mga bagong pag-uusap. I-tap para buksan ang bubble. I-drag para ilipat ito."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Kontrolin ang mga bubble anumang oras"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"I-tap ang Pamahalaan para i-off ang mga bubble mula sa app na ito"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index e4892cf934a3..6c6b5bf47b3b 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -139,7 +139,7 @@
<string name="voice_assist_label" msgid="3725967093735929020">"sesli yardımı aç"</string>
<string name="camera_label" msgid="8253821920931143699">"kamerayı aç"</string>
<string name="cancel" msgid="1089011503403416730">"İptal"</string>
- <string name="biometric_dialog_confirm" msgid="2005978443007344895">"Onaylayın"</string>
+ <string name="biometric_dialog_confirm" msgid="2005978443007344895">"Onayla"</string>
<string name="biometric_dialog_try_again" msgid="8575345628117768844">"Tekrar dene"</string>
<string name="biometric_dialog_empty_space_description" msgid="3330555462071453396">"Kimlik doğrulama işlemini iptal etmek için dokunun"</string>
<string name="biometric_dialog_face_icon_description_idle" msgid="4351777022315116816">"Lütfen tekrar deneyin"</string>
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Tümünü temizle"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Yönet"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Geçmiş"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Gelen"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Yeni"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Sessiz"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Bildirimler"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Görüşmeler"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Sağ üste taşı"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Sol alta taşı"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Sağ alta taşı"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Baloncuğu kapat"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Görüşmeyi baloncuk olarak görüntüleme"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Baloncukları kullanarak sohbet edin"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Yeni görüşmeler kayan simgeler veya baloncuk olarak görünür. Açmak için baloncuğa dokunun. Baloncuğu taşımak için sürükleyin."</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 4c39f43a8845..b163c0c49dfe 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -516,7 +516,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Очистити все"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Керувати"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Історія"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Нові"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Нові"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Без звуку"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Сповіщення"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Розмови"</string>
@@ -1012,8 +1012,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Перемістити праворуч угору"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Перемістити ліворуч униз"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Перемістити праворуч униз"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Закрити підказку"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Не показувати спливаючі чати для розмов"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Спливаючий чат"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Нові повідомлення чату з\'являються у вигляді спливаючих значків. Щоб відкрити чат, натисніть його, а щоб перемістити – перетягніть."</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index feb894a56eb0..8246048c51fa 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -510,7 +510,8 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"سبھی کو صاف کریں"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"نظم کریں"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"سرگزشت"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"اِن کمنگ"</string>
+ <!-- no translation found for notification_section_header_incoming (850925217908095197) -->
+ <skip />
<string name="notification_section_header_gentle" msgid="6804099527336337197">"خاموش"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"اطلاعات"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"گفتگوئیں"</string>
@@ -1002,8 +1003,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"اوپر دائیں جانب لے جائيں"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"نیچے بائیں جانب لے جائیں"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"نیچے دائیں جانب لے جائیں"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"بلبلہ برخاست کریں"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"بلبلہ گفتگو نہ کریں"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"بلبلے کے ذریعے چیٹ کریں"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"نئی گفتگوئیں فلوٹنگ آئیکن یا بلبلے کے طور پر ظاہر ہوں گی۔ بلبلہ کھولنے کے لیے تھپتھپائیں۔ اسے منتقل کرنے کے لیے گھسیٹیں۔"</string>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 1145fa7b92df..3099270c0d80 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Hammasini tozalash"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Boshqarish"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Tarix"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Kiruvchi"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Yangi"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Sokin"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Bildirishnomalar"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Suhbatlar"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Yuqori oʻngga surish"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Quyi chapga surish"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Quyi oʻngga surish"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Pufakni yopish"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Suhbatlar bulutchalar shaklida chiqmasin"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Bulutchalar yordamida subhatlashish"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Yangi xabarlar qalqib chiquvchi belgilar yoki bulutchalar kabi chiqadi. Xabarni ochish uchun bildirishnoma ustiga bosing. Xabarni qayta joylash uchun bildirishnomani suring."</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 8cd238c8529a..ab564864c737 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Xóa tất cả"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Quản lý"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Lịch sử"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Hiển thị gần đây"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Mới"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Im lặng"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Thông báo"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Cuộc trò chuyện"</string>
@@ -1002,11 +1002,10 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Chuyển lên trên cùng bên phải"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Chuyển tới dưới cùng bên trái"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Chuyển tới dưới cùng bên phải"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Đóng bong bóng"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Dừng trò chuyện bằng bong bóng"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Trò chuyện bằng bong bóng trò chuyện"</string>
- <string name="bubbles_user_education_description" msgid="1160281719576715211">"Các cuộc trò chuyện mới hiển thị dưới dạng biểu tượng nổi hoặc bong bóng trò chuyện. Nhấn để mở bong bóng trò chuyện. Kéo để di chuyển bong bóng trò chuyện."</string>
+ <string name="bubbles_user_education_description" msgid="1160281719576715211">"Các cuộc trò chuyện mới sẽ xuất hiện dưới dạng biểu tượng nổi hoặc bong bóng trò chuyện. Nhấn để mở bong bóng trò chuyện. Kéo để di chuyển bong bóng trò chuyện."</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Kiểm soát tùy chọn cài đặt bong bóng trò chuyện bất mọi lúc"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"Nhấn vào nút Quản lý để tắt bong bóng trò chuyện từ ứng dụng này"</string>
<string name="bubbles_user_education_got_it" msgid="8282812431953161143">"OK"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 86f43c9d55f0..73fac041f446 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"全部清除"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"管理"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"历史记录"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"收到的通知"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"新"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"静音"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"通知"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"对话"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"移至右上角"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"移至左下角"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"移至右下角"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"关闭对话泡"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"不以对话泡形式显示对话"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"使用对话泡聊天"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"新对话会以浮动图标或对话泡形式显示。点按即可打开对话泡。拖动即可移动对话泡。"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 6d9ee9913981..5f5c85fcc8ef 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"全部清除"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"管理"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"記錄"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"收到的通知"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"新"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"靜音"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"通知"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"對話"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"移去右上角"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"移去左下角"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"移去右下角"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"關閉對話氣泡"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"不要透過小視窗顯示對話"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"使用小視窗進行即時通訊"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"新對話會以浮動圖示 (小視窗) 顯示。輕按即可開啟小視窗。拖曳即可移動小視窗。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 11e2be069a2f..84611483e883 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"全部清除"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"管理"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"記錄"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"收到的通知"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"最新"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"靜音"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"通知"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"對話"</string>
@@ -1002,10 +1002,9 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"移至右上方"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"移至左下方"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"移至右下方"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"關閉對話框"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"不要以對話框形式顯示對話"</string>
- <string name="bubbles_user_education_title" msgid="5547017089271445797">"使用對話框進行即時通訊"</string>
+ <string name="bubbles_user_education_title" msgid="5547017089271445797">"透過對話框來聊天"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"新的對話會以浮動圖示或對話框形式顯示。輕觸即可開啟對話框,拖曳則可移動對話框。"</string>
<string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"你隨時可以控管對話框的各項設定"</string>
<string name="bubbles_user_education_manage" msgid="1391639189507036423">"輕觸 [管理] 即可關閉來自這個應用程式的對話框"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 358792161575..9b76660e6cd3 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -510,7 +510,7 @@
<string name="clear_all_notifications_text" msgid="348312370303046130">"Sula konke"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Phatha"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Umlando"</string>
- <string name="notification_section_header_incoming" msgid="5295312809341711367">"Okungenayo"</string>
+ <string name="notification_section_header_incoming" msgid="850925217908095197">"Okusha"</string>
<string name="notification_section_header_gentle" msgid="6804099527336337197">"Kuthulile"</string>
<string name="notification_section_header_alerting" msgid="5581175033680477651">"Izaziso"</string>
<string name="notification_section_header_conversations" msgid="821834744538345661">"Izingxoxo"</string>
@@ -1002,8 +1002,7 @@
<string name="bubble_accessibility_action_move_top_right" msgid="6916868852433483569">"Hambisa phezulu ngakwesokudla"</string>
<string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Hambisa inkinobho ngakwesokunxele"</string>
<string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Hambisa inkinobho ngakwesokudla"</string>
- <!-- no translation found for bubble_dismiss_text (1314082410868930066) -->
- <skip />
+ <string name="bubble_dismiss_text" msgid="1314082410868930066">"Cashisa ibhamuza"</string>
<string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Ungayibhamuzi ingxoxo"</string>
<string name="bubbles_user_education_title" msgid="5547017089271445797">"Xoxa usebenzisa amabhamuza"</string>
<string name="bubbles_user_education_description" msgid="1160281719576715211">"Izingxoxo ezintsha zivela njengezithonjana ezintantayo, noma amabhamuza. Thepha ukuze uvule ibhamuza. Hudula ukuze ulihambise."</string>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 837627c02638..4fc904b21741 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -202,6 +202,10 @@
<color name="global_screenshot_dismiss_foreground">@color/GM2_grey_500</color>
<color name="global_screenshot_background_protection_start">#40000000</color> <!-- 25% black -->
+ <!-- Bubbles -->
+ <color name="bubbles_pointer_light">#FFFFFF</color>
+ <color name="bubbles_pointer_dark">@color/GM2_grey_800</color>
+
<!-- GM2 colors -->
<color name="GM2_grey_50">#F8F9FA</color>
<color name="GM2_grey_100">#F1F3F4</color>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 399099702a6a..44d3b02f0db7 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -631,10 +631,10 @@
<dimen name="notification_section_divider_height">@dimen/notification_side_paddings</dimen>
<!-- Size of the face pile shown on one-line (children of a group) conversation notifications -->
- <dimen name="conversation_single_line_face_pile_size">36dp</dimen>
+ <dimen name="conversation_single_line_face_pile_size">25dp</dimen>
<!-- Size of an avatar shown on one-line (children of a group) conversation notifications -->
- <dimen name="conversation_single_line_avatar_size">24dp</dimen>
+ <dimen name="conversation_single_line_avatar_size">20dp</dimen>
<!-- Border width for avatars in the face pile shown on one-line (children of a group) conversation notifications -->
<dimen name="conversation_single_line_face_pile_protection_width">1dp</dimen>
@@ -1248,7 +1248,7 @@
<!-- Bubbles user education views -->
<dimen name="bubbles_manage_education_width">160dp</dimen>
<!-- The inset from the top bound of the manage button to place the user education. -->
- <dimen name="bubbles_manage_education_top_inset">10dp</dimen>
+ <dimen name="bubbles_manage_education_top_inset">65dp</dimen>
<!-- Size of padding for the user education cling, this should at minimum be larger than
individual_bubble_size + some padding. -->
<dimen name="bubble_stack_user_education_side_inset">72dp</dimen>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 39f78bf46028..8097c01cb042 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -549,6 +549,13 @@
<style name="TextAppearance.NotificationImportanceChannelGroup">
<item name="android:textSize">@dimen/notification_importance_channel_group_text</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:textColor">@color/notification_guts_header_text_color</item>
+ <item name="android:textSize">@dimen/notification_importance_channel_group_text</item>
+ </style>
+
+ <style name="TextAppearance.NotificationImportanceApp">
+ <item name="android:textSize">@dimen/notification_importance_channel_group_text</item>
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
<item name="android:textColor">@color/notification_guts_sub_text_color</item>
<item name="android:textSize">@dimen/notification_importance_channel_group_text</item>
</style>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
index ebed1fcdb48b..27e4c85e1e02 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
@@ -63,8 +63,9 @@ public class InputConsumerController {
*/
private final class InputEventReceiver extends BatchedInputEventReceiver {
- public InputEventReceiver(InputChannel inputChannel, Looper looper) {
- super(inputChannel, looper, Choreographer.getInstance());
+ InputEventReceiver(InputChannel inputChannel, Looper looper,
+ Choreographer choreographer) {
+ super(inputChannel, looper, choreographer);
}
@Override
@@ -143,6 +144,14 @@ public class InputConsumerController {
* Registers the input consumer.
*/
public void registerInputConsumer() {
+ registerInputConsumer(false);
+ }
+
+ /**
+ * Registers the input consumer.
+ * @param withSfVsync the flag set using sf vsync signal or no
+ */
+ public void registerInputConsumer(boolean withSfVsync) {
if (mInputEventReceiver == null) {
final InputChannel inputChannel = new InputChannel();
try {
@@ -152,7 +161,8 @@ public class InputConsumerController {
} catch (RemoteException e) {
Log.e(TAG, "Failed to create input consumer", e);
}
- mInputEventReceiver = new InputEventReceiver(inputChannel, Looper.myLooper());
+ mInputEventReceiver = new InputEventReceiver(inputChannel, Looper.myLooper(),
+ withSfVsync ? Choreographer.getSfInstance() : Choreographer.getInstance());
if (mRegistrationListener != null) {
mRegistrationListener.onRegistrationChanged(true /* isRegistered */);
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index ee31706c0b94..34c85877577b 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -1903,6 +1903,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
private boolean shouldListenForFingerprint() {
final boolean allowedOnBouncer =
!(mFingerprintLockedOut && mBouncer && mCredentialAttempted);
+ final int user = getCurrentUser();
+ final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user);
+ final boolean isLockDown =
+ containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW)
+ || containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+ final boolean isEncrypted = containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT);
// Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an
// instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware.
@@ -1911,7 +1917,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
shouldListenForFingerprintAssistant() || (mKeyguardOccluded && mIsDreaming))
&& !mSwitchingUser && !isFingerprintDisabled(getCurrentUser())
&& (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser
- && allowedOnBouncer;
+ && allowedOnBouncer && !isLockDown && !isEncrypted;
return shouldListen;
}
@@ -1928,9 +1934,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
final boolean isLockDown =
containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW)
|| containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
- final boolean isEncryptedOrTimedOut =
- containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT)
- || containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_TIMEOUT);
+ final boolean isEncrypted =
+ containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT);
+ final boolean isTimedOut =
+ containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_TIMEOUT);
boolean canBypass = mKeyguardBypassController != null
&& mKeyguardBypassController.canBypass();
@@ -1939,10 +1946,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
// TrustAgents or biometrics are keeping the device unlocked.
boolean becauseCannotSkipBouncer = !getUserCanSkipBouncer(user) || canBypass;
- // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing.
+ // Scan even when timeout to show a preemptive bouncer when bypassing.
// Lock-down mode shouldn't scan, since it is more explicit.
- boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass && !mBouncer)
- && !isLockDown;
+ boolean strongAuthAllowsScanning = (!isTimedOut || canBypass && !mBouncer);
// Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an
// instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware.
@@ -1952,7 +1958,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
&& !mSwitchingUser && !isFaceDisabled(user) && becauseCannotSkipBouncer
&& !mKeyguardGoingAway && mFaceSettingEnabledForUser.get(user) && !mLockIconPressed
&& strongAuthAllowsScanning && mIsPrimaryUser
- && !mSecureCameraLaunched;
+ && !mSecureCameraLaunched && !isLockDown && !isEncrypted;
// Aggregate relevant fields for debug logging.
if (DEBUG_FACE || DEBUG_SPEW) {
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
index 4269605cef12..67c0c620f136 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
@@ -16,8 +16,10 @@
package com.android.systemui.broadcast
+import android.app.ActivityManager
import android.content.BroadcastReceiver
import android.content.Context
+import android.content.Intent
import android.content.IntentFilter
import android.os.Handler
import android.os.HandlerExecutor
@@ -28,15 +30,11 @@ import android.text.TextUtils
import android.util.SparseArray
import com.android.internal.annotations.VisibleForTesting
import com.android.systemui.Dumpable
-import com.android.systemui.dagger.qualifiers.Background
-import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger
import com.android.systemui.dump.DumpManager
import java.io.FileDescriptor
import java.io.PrintWriter
-import java.lang.IllegalStateException
import java.util.concurrent.Executor
-import javax.inject.Inject
-import javax.inject.Singleton
data class ReceiverData(
val receiver: BroadcastReceiver,
@@ -48,6 +46,8 @@ data class ReceiverData(
private const val MSG_ADD_RECEIVER = 0
private const val MSG_REMOVE_RECEIVER = 1
private const val MSG_REMOVE_RECEIVER_FOR_USER = 2
+private const val MSG_USER_SWITCH = 3
+private const val MSG_SET_STARTING_USER = 99
private const val TAG = "BroadcastDispatcher"
private const val DEBUG = true
@@ -62,20 +62,27 @@ private const val DEBUG = true
* permissions, schemes, data types, data authorities or priority different than 0.
* Cannot be used for getting sticky broadcasts (either as return of registering or as re-delivery).
*/
-@Singleton
-open class BroadcastDispatcher @Inject constructor (
+open class BroadcastDispatcher constructor (
private val context: Context,
- @Main private val mainHandler: Handler,
- @Background private val bgLooper: Looper,
- dumpManager: DumpManager
-) : Dumpable {
+ private val bgLooper: Looper,
+ private val dumpManager: DumpManager,
+ private val logger: BroadcastDispatcherLogger
+) : Dumpable, BroadcastReceiver() {
// Only modify in BG thread
private val receiversByUser = SparseArray<UserBroadcastDispatcher>(20)
- init {
- // TODO: Don't do this in the constructor
+ fun initialize() {
dumpManager.registerDumpable(javaClass.name, this)
+ handler.sendEmptyMessage(MSG_SET_STARTING_USER)
+ registerReceiver(this, IntentFilter(Intent.ACTION_USER_SWITCHED), null, UserHandle.ALL)
+ }
+
+ override fun onReceive(context: Context, intent: Intent) {
+ if (intent.action == Intent.ACTION_USER_SWITCHED) {
+ val user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL)
+ handler.obtainMessage(MSG_USER_SWITCH, user, 0).sendToTarget()
+ }
}
/**
@@ -87,7 +94,7 @@ open class BroadcastDispatcher @Inject constructor (
* have at least one action.
* @param handler A handler to dispatch [BroadcastReceiver.onReceive].
* @param user A user handle to determine which broadcast should be dispatched to this receiver.
- * By default, it is the current user.
+ * By default, it is the user of the context (system user in SystemUI).
* @throws IllegalArgumentException if the filter has other constraints that are not actions or
* categories or the filter has no actions.
*/
@@ -113,7 +120,7 @@ open class BroadcastDispatcher @Inject constructor (
* @param executor An executor to dispatch [BroadcastReceiver.onReceive]. Pass null to use an
* executor in the main thread (default).
* @param user A user handle to determine which broadcast should be dispatched to this receiver.
- * By default, it is the current user.
+ * By default, it is the user of the context (system user in SystemUI).
* @throws IllegalArgumentException if the filter has other constraints that are not actions or
* categories or the filter has no actions.
*/
@@ -156,7 +163,7 @@ open class BroadcastDispatcher @Inject constructor (
/**
* Unregister receiver for a particular user.
*
- * @param receiver The receiver to unregister. It will be unregistered for all users.
+ * @param receiver The receiver to unregister.
* @param user The user associated to the registered [receiver]. It can be [UserHandle.ALL].
*/
open fun unregisterReceiverForUser(receiver: BroadcastReceiver, user: UserHandle) {
@@ -166,10 +173,11 @@ open class BroadcastDispatcher @Inject constructor (
@VisibleForTesting
protected open fun createUBRForUser(userId: Int) =
- UserBroadcastDispatcher(context, userId, bgLooper)
+ UserBroadcastDispatcher(context, userId, bgLooper, logger)
override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
pw.println("Broadcast dispatcher:")
+ pw.println(" Current user: ${handler.currentUser}")
for (index in 0 until receiversByUser.size()) {
pw.println(" User ${receiversByUser.keyAt(index)}")
receiversByUser.valueAt(index).dump(fd, pw, args)
@@ -177,6 +185,8 @@ open class BroadcastDispatcher @Inject constructor (
}
private val handler = object : Handler(bgLooper) {
+ var currentUser = UserHandle.USER_SYSTEM
+
override fun handleMessage(msg: Message) {
when (msg.what) {
MSG_ADD_RECEIVER -> {
@@ -184,7 +194,7 @@ open class BroadcastDispatcher @Inject constructor (
// If the receiver asked to be registered under the current user, we register
// under the actual current user.
val userId = if (data.user.identifier == UserHandle.USER_CURRENT) {
- context.userId
+ currentUser
} else {
data.user.identifier
}
@@ -207,6 +217,13 @@ open class BroadcastDispatcher @Inject constructor (
receiversByUser.get(msg.arg1)?.unregisterReceiver(msg.obj as BroadcastReceiver)
}
+ MSG_USER_SWITCH -> {
+ currentUser = msg.arg1
+ }
+ MSG_SET_STARTING_USER -> {
+ currentUser = ActivityManager.getCurrentUser()
+ }
+
else -> super.handleMessage(msg)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
index 3272fb7545e2..96f5a1f6fbe8 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
@@ -30,6 +30,7 @@ import android.util.Log
import androidx.annotation.VisibleForTesting
import com.android.internal.util.Preconditions
import com.android.systemui.Dumpable
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger
import java.io.FileDescriptor
import java.io.PrintWriter
import java.lang.IllegalArgumentException
@@ -54,7 +55,8 @@ private const val DEBUG = false
class UserBroadcastDispatcher(
private val context: Context,
private val userId: Int,
- private val bgLooper: Looper
+ private val bgLooper: Looper,
+ private val logger: BroadcastDispatcherLogger
) : BroadcastReceiver(), Dumpable {
companion object {
@@ -109,10 +111,12 @@ class UserBroadcastDispatcher(
}
override fun onReceive(context: Context, intent: Intent) {
- val id = if (DEBUG) index.getAndIncrement() else 0
+ val id = index.getAndIncrement()
if (DEBUG) Log.w(TAG, "[$id] Received $intent")
+ logger.logBroadcastReceived(id, userId, intent)
bgHandler.post(
- HandleBroadcastRunnable(actionsToReceivers, context, intent, pendingResult, id))
+ HandleBroadcastRunnable(
+ actionsToReceivers, context, intent, pendingResult, id, logger))
}
/**
@@ -143,6 +147,7 @@ class UserBroadcastDispatcher(
ArraySet()
}.add(receiverData)
}
+ logger.logReceiverRegistered(userId, receiverData.receiver)
if (changed) {
createFilterAndRegisterReceiverBG()
}
@@ -163,6 +168,7 @@ class UserBroadcastDispatcher(
actionsToReceivers.remove(action)
}
}
+ logger.logReceiverUnregistered(userId, receiver)
if (changed) {
createFilterAndRegisterReceiverBG()
}
@@ -187,7 +193,8 @@ class UserBroadcastDispatcher(
val context: Context,
val intent: Intent,
val pendingResult: PendingResult,
- val index: Int
+ val index: Int,
+ val logger: BroadcastDispatcherLogger
) : Runnable {
override fun run() {
if (DEBUG) Log.w(TAG, "[$index] Dispatching $intent")
@@ -199,6 +206,7 @@ class UserBroadcastDispatcher(
it.executor.execute {
if (DEBUG) Log.w(TAG,
"[$index] Dispatching ${intent.action} to ${it.receiver}")
+ logger.logBroadcastDispatched(index, intent.action, it.receiver)
it.receiver.pendingResult = pendingResult
it.receiver.onReceive(context, intent)
}
@@ -215,6 +223,7 @@ class UserBroadcastDispatcher(
if (registered.get()) {
try {
context.unregisterReceiver(this@UserBroadcastDispatcher)
+ logger.logContextReceiverUnregistered(userId)
} catch (e: IllegalArgumentException) {
Log.e(TAG, "Trying to unregister unregistered receiver for user $userId",
IllegalStateException(e))
@@ -230,6 +239,7 @@ class UserBroadcastDispatcher(
null,
bgHandler)
registered.set(true)
+ logger.logContextReceiverRegistered(userId, intentFilter)
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/logging/BroadcastDispatcherLogger.kt b/packages/SystemUI/src/com/android/systemui/broadcast/logging/BroadcastDispatcherLogger.kt
new file mode 100644
index 000000000000..123a8ae6307d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/logging/BroadcastDispatcherLogger.kt
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.broadcast.logging
+
+import android.content.BroadcastReceiver
+import android.content.Intent
+import android.content.IntentFilter
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogLevel
+import com.android.systemui.log.LogLevel.DEBUG
+import com.android.systemui.log.LogLevel.INFO
+import com.android.systemui.log.LogMessage
+import com.android.systemui.log.dagger.BroadcastDispatcherLog
+import javax.inject.Inject
+
+private const val TAG = "BroadcastDispatcherLog"
+
+class BroadcastDispatcherLogger @Inject constructor(
+ @BroadcastDispatcherLog private val buffer: LogBuffer
+) {
+
+ fun logBroadcastReceived(broadcastId: Int, user: Int, intent: Intent) {
+ val intentString = intent.toString()
+ log(INFO, {
+ int1 = broadcastId
+ int2 = user
+ str1 = intentString
+ }, {
+ "[$int1] Broadcast received for user $int2: $str1"
+ })
+ }
+
+ fun logBroadcastDispatched(broadcastId: Int, action: String?, receiver: BroadcastReceiver) {
+ val receiverString = receiver.toString()
+ log(DEBUG, {
+ int1 = broadcastId
+ str1 = action
+ str2 = receiverString
+ }, {
+ "Broadcast $int1 ($str1) dispatched to $str2"
+ })
+ }
+
+ fun logReceiverRegistered(user: Int, receiver: BroadcastReceiver) {
+ val receiverString = receiver.toString()
+ log(INFO, {
+ int1 = user
+ str1 = receiverString
+ }, {
+ "Receiver $str1 registered for user $int1"
+ })
+ }
+
+ fun logReceiverUnregistered(user: Int, receiver: BroadcastReceiver) {
+ val receiverString = receiver.toString()
+ log(INFO, {
+ int1 = user
+ str1 = receiverString
+ }, {
+ "Receiver $str1 unregistered for user $int1"
+ })
+ }
+
+ fun logContextReceiverRegistered(user: Int, filter: IntentFilter) {
+ val actions = filter.actionsIterator().asSequence()
+ .joinToString(separator = ",", prefix = "Actions(", postfix = ")")
+ val categories = if (filter.countCategories() != 0) {
+ filter.categoriesIterator().asSequence()
+ .joinToString(separator = ",", prefix = "Categories(", postfix = ")")
+ } else {
+ ""
+ }
+ log(INFO, {
+ int1 = user
+ str1 = if (categories != "") {
+ "${actions}\n$categories"
+ } else {
+ actions
+ }
+ }, {
+ """
+ Receiver registered with Context for user $int1.
+ $str1
+ """.trimIndent()
+ })
+ }
+
+ fun logContextReceiverUnregistered(user: Int) {
+ log(INFO, {
+ int1 = user
+ }, {
+ "Receiver unregistered with Context for user $int1."
+ })
+ }
+
+ private inline fun log(
+ logLevel: LogLevel,
+ initializer: LogMessage.() -> Unit,
+ noinline printer: LogMessage.() -> String
+ ) {
+ buffer.log(TAG, logLevel, initializer, printer)
+ }
+} \ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 35cac4d9d63d..c4c5da42ec06 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -55,7 +55,6 @@ import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.PixelFormat;
-import android.graphics.Rect;
import android.os.Binder;
import android.os.Handler;
import android.os.RemoteException;
@@ -180,6 +179,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
// Callback that updates BubbleOverflowActivity on data change.
@Nullable private Runnable mOverflowCallback = null;
+ // Only load overflow data from disk once
+ private boolean mOverflowDataLoaded = false;
+
private final NotificationInterruptStateProvider mNotificationInterruptStateProvider;
private IStatusBarService mBarService;
private WindowManager mWindowManager;
@@ -193,9 +195,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
/** Whether or not the BubbleStackView has been added to the WindowManager. */
private boolean mAddedToWindowManager = false;
- // Used for determining view rect for touch interaction
- private Rect mTempRect = new Rect();
-
// Listens to user switch so bubbles can be saved and restored.
private final NotificationLockscreenUserManager mNotifUserManager;
@@ -419,6 +418,16 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
mCallbacks.add(callback);
}
+ /**
+ * Dispatches a back press into the expanded Bubble's ActivityView if its IME is visible,
+ * causing it to hide.
+ */
+ public void hideImeFromExpandedBubble() {
+ if (mStackView != null) {
+ mStackView.hideImeFromExpandedBubble();
+ }
+ }
+
private void setupNEM() {
mNotificationEntryManager.addNotificationEntryListener(
new NotificationEntryListener() {
@@ -705,6 +714,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
* the new params if the stack has been added.
*/
private void updateWmFlags() {
+ if (mStackView == null) {
+ return;
+ }
if (isStackExpanded() && !mImeVisible) {
// If we're expanded, and the IME isn't visible, we want to be focusable. This ensures
// that any taps within Bubbles (including on the ActivityView) results in Bubbles
@@ -716,7 +728,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
mWmLayoutParams.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
}
- if (mStackView != null && mAddedToWindowManager) {
+ if (mAddedToWindowManager) {
try {
mWindowManager.updateViewLayout(mStackView, mWmLayoutParams);
} catch (IllegalArgumentException e) {
@@ -901,7 +913,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
mLogger.log(bubble, BubbleLogger.Event.BUBBLE_OVERFLOW_REMOVE_BACK_TO_STACK);
bubble.setInflateSynchronously(mInflateSynchronously);
bubble.setShouldAutoExpand(true);
- bubble.markUpdatedAt(System.currentTimeMillis());
+ bubble.markAsAccessedAt(System.currentTimeMillis());
setIsBubble(bubble, true /* isBubble */);
}
@@ -952,13 +964,14 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
* Fills the overflow bubbles by loading them from disk.
*/
void loadOverflowBubblesFromDisk() {
- if (!mBubbleData.getOverflowBubbles().isEmpty()) {
+ if (!mBubbleData.getOverflowBubbles().isEmpty() || mOverflowDataLoaded) {
// we don't need to load overflow bubbles from disk if it is already in memory
return;
}
+ mOverflowDataLoaded = true;
mDataRepository.loadBubbles((bubbles) -> {
bubbles.forEach(bubble -> {
- if (mBubbleData.getBubbles().contains(bubble)) {
+ if (mBubbleData.hasAnyBubbleWithKey(bubble.getKey())) {
// if the bubble is already active, there's no need to push it to overflow
return;
}
@@ -1156,7 +1169,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
if (b.getEntry() != null) {
// Updating the entry to be a bubble will trigger our normal update flow
setIsBubble(b.getEntry(), isBubble, b.shouldAutoExpand());
- } else {
+ } else if (isBubble) {
// If we have no entry to update, it's a persisted bubble so
// we need to add it to the stack ourselves
Bubble bubble = mBubbleData.getOrCreateBubble(null, b /* persistedBubble */);
@@ -1235,24 +1248,23 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
}
mDataRepository.removeBubbles(mCurrentUserId, bubblesToBeRemovedFromRepository);
- if (update.addedBubble != null) {
+ if (update.addedBubble != null && mStackView != null) {
mDataRepository.addBubble(mCurrentUserId, update.addedBubble);
mStackView.addBubble(update.addedBubble);
-
}
- if (update.updatedBubble != null) {
+ if (update.updatedBubble != null && mStackView != null) {
mStackView.updateBubble(update.updatedBubble);
}
// At this point, the correct bubbles are inflated in the stack.
// Make sure the order in bubble data is reflected in bubble row.
- if (update.orderChanged) {
+ if (update.orderChanged && mStackView != null) {
mDataRepository.addBubbles(mCurrentUserId, update.bubbles);
mStackView.updateBubbleOrder(update.bubbles);
}
- if (update.selectionChanged) {
+ if (update.selectionChanged && mStackView != null) {
mStackView.setSelectedBubble(update.selectedBubble);
if (update.selectedBubble != null && update.selectedBubble.getEntry() != null) {
mNotificationGroupManager.updateSuppression(
@@ -1262,7 +1274,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
// Expanding? Apply this last.
if (update.expandedChanged && update.expanded) {
- mStackView.setExpanded(true);
+ if (mStackView != null) {
+ mStackView.setExpanded(true);
+ }
}
for (NotifCallback cb : mCallbacks) {
@@ -1368,7 +1382,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
}
/**
- * Lets any listeners know if bubble state has changed.
* Updates the visibility of the bubbles based on current state.
* Does not un-bubble, just hides or un-hides.
* Updates stack description for TalkBack focus.
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
index 24d44d5cb291..20a9a8cf324c 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java
@@ -417,7 +417,8 @@ public class BubbleData {
if (mBubbles.size() == 1) {
// Going to become empty, handle specially.
setExpandedInternal(false);
- setSelectedBubbleInternal(null);
+ // Don't use setSelectedBubbleInternal because we don't want to trigger an applyUpdate
+ mSelectedBubble = null;
}
if (indexToRemove < mBubbles.size() - 1) {
// Removing anything but the last bubble means positions will change.
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
index 2fd4d2aaf1d7..47e6645d347f 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
@@ -42,6 +42,7 @@ import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Color;
@@ -274,8 +275,6 @@ public class BubbleExpandedView extends LinearLayout {
mPointerDrawable = new ShapeDrawable(TriangleShape.create(
mPointerWidth, mPointerHeight, true /* pointUp */));
- mPointerDrawable.setTint(Color.WHITE);
- mPointerView.setBackground(mPointerDrawable);
mPointerView.setVisibility(INVISIBLE);
mSettingsIconHeight = getContext().getResources().getDimensionPixelSize(
@@ -351,7 +350,10 @@ public class BubbleExpandedView extends LinearLayout {
// ActivityView's vertical bounds. These events are part of a back gesture, and so they
// should not collapse the stack (which all other touches on areas around the AV would
// do).
- if (motionEvent.getRawY() >= avBounds.top && motionEvent.getRawY() <= avBounds.bottom) {
+ if (motionEvent.getRawY() >= avBounds.top
+ && motionEvent.getRawY() <= avBounds.bottom
+ && (motionEvent.getRawX() < avBounds.left
+ || motionEvent.getRawX() > avBounds.right)) {
return true;
}
@@ -425,6 +427,18 @@ public class BubbleExpandedView extends LinearLayout {
mContext.getResources())) {
mActivityView.setCornerRadius(mCornerRadius);
}
+
+ final int mode =
+ getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+ switch (mode) {
+ case Configuration.UI_MODE_NIGHT_NO:
+ mPointerDrawable.setTint(getResources().getColor(R.color.bubbles_pointer_light));
+ break;
+ case Configuration.UI_MODE_NIGHT_YES:
+ mPointerDrawable.setTint(getResources().getColor(R.color.bubbles_pointer_dark));
+ break;
+ }
+ mPointerView.setBackground(mPointerDrawable);
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleManageEducationView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleManageEducationView.java
index f4d64322c7ff..47120124a55f 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleManageEducationView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleManageEducationView.java
@@ -17,10 +17,8 @@
package com.android.systemui.bubbles;
import android.content.Context;
-import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Color;
-import android.graphics.drawable.ShapeDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
@@ -28,7 +26,6 @@ import android.widget.TextView;
import com.android.internal.util.ContrastColorUtil;
import com.android.systemui.R;
-import com.android.systemui.recents.TriangleShape;
/**
* Educational view to highlight the manage button that allows a user to configure the settings
@@ -36,7 +33,6 @@ import com.android.systemui.recents.TriangleShape;
*/
public class BubbleManageEducationView extends LinearLayout {
- private View mPointerView;
private View mManageView;
public BubbleManageEducationView(Context context) {
@@ -70,26 +66,8 @@ public class BubbleManageEducationView extends LinearLayout {
ta.recycle();
textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true);
+ ((TextView) findViewById(R.id.user_education_title)).setTextColor(textColor);
((TextView) findViewById(R.id.user_education_description)).setTextColor(textColor);
-
- final Resources res = getResources();
- final int pointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width);
- final int pointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height);
-
- ShapeDrawable triangleShape =
- new ShapeDrawable(TriangleShape.create(
- pointerWidth, pointerHeight, false /* isPointingUp */));
- triangleShape.setTint(bgColor);
-
- mPointerView = findViewById(R.id.user_education_pointer);
- mPointerView.setBackground(triangleShape);
- }
-
- /**
- * Specifies the x value this pointer should point to.
- */
- public void setPointerPosition(int x) {
- mPointerView.setTranslationX(x - (mPointerView.getWidth() / 2));
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java
index b77e2261e39b..0c62e9f9f548 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java
@@ -62,13 +62,12 @@ public class BubbleOverflow implements BubbleViewProvider {
void setUpOverflow(ViewGroup parentViewGroup, BubbleStackView stackView) {
updateDimensions();
-
mExpandedView = (BubbleExpandedView) mInflater.inflate(
R.layout.bubble_expanded_view, parentViewGroup /* root */,
false /* attachToRoot */);
mExpandedView.setOverflow(true);
mExpandedView.setStackView(stackView);
-
+ mExpandedView.applyThemeAttrs();
updateIcon(mContext, parentViewGroup);
}
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index 84f3ba5df917..015079ff900a 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -93,7 +93,6 @@ import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.util.DismissCircleView;
import com.android.systemui.util.FloatingContentCoordinator;
import com.android.systemui.util.RelativeTouchListener;
@@ -1100,13 +1099,11 @@ public class BubbleStackView extends FrameLayout
mBubbleOverflow.setUpOverflow(mBubbleContainer, this);
} else {
mBubbleContainer.removeView(mBubbleOverflow.getBtn());
- mBubbleOverflow.updateDimensions();
- mBubbleOverflow.updateIcon(mContext,this);
+ mBubbleOverflow.setUpOverflow(mBubbleContainer, this);
overflowBtnIndex = mBubbleContainer.getChildCount();
}
mBubbleContainer.addView(mBubbleOverflow.getBtn(), overflowBtnIndex,
new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
-
mBubbleOverflow.getBtn().setOnClickListener(v -> setSelectedBubble(mBubbleOverflow));
}
/**
@@ -1117,6 +1114,7 @@ public class BubbleStackView extends FrameLayout
setUpOverflow();
setUpUserEducation();
setUpManageMenu();
+ updateExpandedViewTheme();
}
/** Respond to the phone being rotated by repositioning the stack and hiding any flyouts. */
@@ -1218,6 +1216,18 @@ public class BubbleStackView extends FrameLayout
setupLocalMenu(info);
}
+ void updateExpandedViewTheme() {
+ final List<Bubble> bubbles = mBubbleData.getBubbles();
+ if (bubbles.isEmpty()) {
+ return;
+ }
+ bubbles.forEach(bubble -> {
+ if (bubble.getExpandedView() != null) {
+ bubble.getExpandedView().applyThemeAttrs();
+ }
+ });
+ }
+
void setupLocalMenu(AccessibilityNodeInfo info) {
Resources res = mContext.getResources();
@@ -1504,7 +1514,15 @@ public class BubbleStackView extends FrameLayout
// expanded view becomes visible on the screen. See b/126856255
mExpandedViewContainer.setAlpha(0.0f);
mSurfaceSynchronizer.syncSurfaceAndRun(() -> {
- previouslySelected.setContentVisibility(false);
+ if (previouslySelected != null) {
+ previouslySelected.setContentVisibility(false);
+ }
+ if (previouslySelected != null && previouslySelected.getExpandedView() != null) {
+ // Hide the currently expanded bubble's IME if it's visible before switching
+ // to a new bubble.
+ previouslySelected.getExpandedView().hideImeIfVisible();
+ }
+
updateExpandedBubble();
requestUpdate();
@@ -1621,12 +1639,19 @@ public class BubbleStackView extends FrameLayout
final int inset = getResources().getDimensionPixelSize(
R.dimen.bubbles_manage_education_top_inset);
mManageEducationView.bringToFront();
- mManageEducationView.setManageViewPosition(mTempRect.left,
- mTempRect.top - viewHeight + inset);
- mManageEducationView.setPointerPosition(mTempRect.centerX() - mTempRect.left);
+ mManageEducationView.setManageViewPosition(0, mTempRect.top - viewHeight + inset);
mManageEducationView.animate()
.setDuration(ANIMATE_STACK_USER_EDUCATION_DURATION)
.setInterpolator(FAST_OUT_SLOW_IN).alpha(1);
+ mManageEducationView.findViewById(R.id.manage).setOnClickListener(view -> {
+ mExpandedBubble.getExpandedView().findViewById(R.id.settings_button)
+ .performClick();
+ maybeShowManageEducation(false);
+ });
+ mManageEducationView.findViewById(R.id.got_it).setOnClickListener(view ->
+ maybeShowManageEducation(false));
+ mManageEducationView.setOnClickListener(view ->
+ maybeShowManageEducation(false));
});
Prefs.putBoolean(getContext(), HAS_SEEN_BUBBLES_MANAGE_EDUCATION, true);
} else if (!show
@@ -1683,6 +1708,14 @@ public class BubbleStackView extends FrameLayout
}
}
+ void hideImeFromExpandedBubble() {
+ if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
+ // Hide the currently expanded bubble's IME if it's visible before switching to a new
+ // bubble.
+ mExpandedBubble.getExpandedView().hideImeIfVisible();
+ }
+ }
+
private void beforeExpandedViewAnimation() {
mIsExpansionAnimating = true;
hideFlyoutImmediate();
@@ -1753,6 +1786,9 @@ public class BubbleStackView extends FrameLayout
AnimatableScaleMatrix.getAnimatableValueForScaleFactor(1f),
mScaleInSpringConfig)
.addUpdateListener((target, values) -> {
+ if (mExpandedBubble.getIconView() == null) {
+ return;
+ }
mExpandedViewContainerMatrix.postTranslate(
mExpandedBubble.getIconView().getTranslationX()
- bubbleWillBeAtX,
@@ -1860,9 +1896,11 @@ public class BubbleStackView extends FrameLayout
.withEndActions(this::releaseAnimatingOutBubbleBuffer)
.start();
+ boolean isOverflow = mExpandedBubble != null
+ && mExpandedBubble.getKey().equals(BubbleOverflow.KEY);
float expandingFromBubbleDestinationX =
- mExpandedAnimationController.getBubbleLeft(
- mBubbleData.getBubbles().indexOf(mExpandedBubble));
+ mExpandedAnimationController.getBubbleLeft(isOverflow ? getBubbleCount()
+ : mBubbleData.getBubbles().indexOf(mExpandedBubble));
mExpandedViewContainer.setAlpha(1f);
mExpandedViewContainer.setVisibility(View.VISIBLE);
@@ -1959,9 +1997,13 @@ public class BubbleStackView extends FrameLayout
*/
@Override
public void subtractObscuredTouchableRegion(Region touchableRegion, View view) {
- // If the notification shade is expanded, or the manage menu is open, we shouldn't let the
- // ActivityView steal any touch events from any location.
- if (!mIsExpanded || mShowingManage) {
+ // If the notification shade is expanded, or the manage menu is open, or we are showing
+ // manage bubbles user education, we shouldn't let the ActivityView steal any touch events
+ // from any location.
+ if (!mIsExpanded
+ || mShowingManage
+ || (mManageEducationView != null
+ && mManageEducationView.getVisibility() == VISIBLE)) {
touchableRegion.setEmpty();
}
}
@@ -2397,12 +2439,6 @@ public class BubbleStackView extends FrameLayout
Log.d(TAG, "updateExpandedBubble()");
}
- if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
- // Hide the currently expanded bubble's IME if it's visible before switching to a new
- // bubble.
- mExpandedBubble.getExpandedView().hideImeIfVisible();
- }
-
mExpandedViewContainer.removeAllViews();
if (mIsExpanded && mExpandedBubble != null
&& mExpandedBubble.getExpandedView() != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
index 91f032d86a94..28bcf3a35117 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
@@ -24,6 +24,8 @@ import com.android.systemui.keyguard.WorkLockActivity;
import com.android.systemui.screenrecord.ScreenRecordDialog;
import com.android.systemui.settings.BrightnessDialog;
import com.android.systemui.tuner.TunerActivity;
+import com.android.systemui.usb.UsbDebuggingActivity;
+import com.android.systemui.usb.UsbDebuggingSecondaryUserActivity;
import dagger.Binds;
import dagger.Module;
@@ -70,4 +72,17 @@ public abstract class DefaultActivityBinder {
@IntoMap
@ClassKey(BubbleOverflowActivity.class)
public abstract Activity bindBubbleOverflowActivity(BubbleOverflowActivity activity);
+
+ /** Inject into UsbDebuggingActivity. */
+ @Binds
+ @IntoMap
+ @ClassKey(UsbDebuggingActivity.class)
+ public abstract Activity bindUsbDebuggingActivity(UsbDebuggingActivity activity);
+
+ /** Inject into UsbDebuggingSecondaryUserActivity. */
+ @Binds
+ @IntoMap
+ @ClassKey(UsbDebuggingSecondaryUserActivity.class)
+ public abstract Activity bindUsbDebuggingSecondaryUserActivity(
+ UsbDebuggingSecondaryUserActivity activity);
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
index 8368b2c1ae86..1f30305ab169 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
@@ -25,6 +25,7 @@ import android.hardware.display.AmbientDisplayConfiguration;
import android.hardware.display.NightDisplayListener;
import android.os.Handler;
import android.os.HandlerThread;
+import android.os.Looper;
import android.os.ServiceManager;
import android.util.DisplayMetrics;
import android.view.Choreographer;
@@ -39,9 +40,12 @@ import com.android.internal.util.NotificationMessagingUtil;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.Prefs;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.doze.AlwaysOnDisplayPolicy;
+import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.plugins.PluginInitializerImpl;
import com.android.systemui.shared.plugins.PluginManager;
@@ -178,6 +182,21 @@ public class DependencyProvider {
return ActivityManagerWrapper.getInstance();
}
+ /** Provides and initializes the {#link BroadcastDispatcher} for SystemUI */
+ @Singleton
+ @Provides
+ public BroadcastDispatcher providesBroadcastDispatcher(
+ Context context,
+ @Background Looper backgroundLooper,
+ DumpManager dumpManager,
+ BroadcastDispatcherLogger logger
+ ) {
+ BroadcastDispatcher bD =
+ new BroadcastDispatcher(context, backgroundLooper, dumpManager, logger);
+ bD.initialize();
+ return bD;
+ }
+
@Singleton
@Provides
public DevicePolicyManagerWrapper provideDevicePolicyManagerWrapper() {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index b26dc5f91245..53251ed4362d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -654,7 +654,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
@Override
public void onBouncerVisiblityChanged(boolean shown) {
synchronized (KeyguardViewMediator.this) {
- adjustStatusBarLocked(shown);
+ adjustStatusBarLocked(shown, false);
}
}
@@ -2003,10 +2003,12 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
}
private void adjustStatusBarLocked() {
- adjustStatusBarLocked(false /* forceHideHomeRecentsButtons */);
+ adjustStatusBarLocked(false /* forceHideHomeRecentsButtons */,
+ false /* forceClearFlags */);
}
- private void adjustStatusBarLocked(boolean forceHideHomeRecentsButtons) {
+ private void adjustStatusBarLocked(boolean forceHideHomeRecentsButtons,
+ boolean forceClearFlags) {
if (mStatusBarManager == null) {
mStatusBarManager = (StatusBarManager)
mContext.getSystemService(Context.STATUS_BAR_SERVICE);
@@ -2018,6 +2020,13 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
// Disable aspects of the system/status/navigation bars that must not be re-enabled by
// windows that appear on top, ever
int flags = StatusBarManager.DISABLE_NONE;
+
+ // TODO (b/155663717) After restart, status bar will not properly hide home button
+ // unless disable is called to show un-hide it once first
+ if (forceClearFlags) {
+ mStatusBarManager.disable(flags);
+ }
+
if (forceHideHomeRecentsButtons || isShowingAndNotOccluded()) {
if (!mShowHomeOverLockscreen || !mInGestureNavigationMode) {
flags |= StatusBarManager.DISABLE_HOME;
@@ -2141,6 +2150,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
public void onBootCompleted() {
synchronized (this) {
mBootCompleted = true;
+ adjustStatusBarLocked(false, true);
if (mBootSendUserPresent) {
sendUserPresentBroadcast();
}
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/BroadcastDispatcherLog.java b/packages/SystemUI/src/com/android/systemui/log/dagger/BroadcastDispatcherLog.java
new file mode 100644
index 000000000000..7d1f1c2709fa
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/BroadcastDispatcherLog.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.log.dagger;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import com.android.systemui.log.LogBuffer;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import javax.inject.Qualifier;
+
+/** A {@link LogBuffer} for BroadcastDispatcher-related messages. */
+@Qualifier
+@Documented
+@Retention(RUNTIME)
+public @interface BroadcastDispatcherLog {
+}
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
index 9c89fee5cba1..a2086e8d3ac6 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
@@ -97,6 +97,18 @@ public class LogModule {
return buffer;
}
+ /** Provides a logging buffer for {@link com.android.systemui.broadcast.BroadcastDispatcher} */
+ @Provides
+ @Singleton
+ @BroadcastDispatcherLog
+ public static LogBuffer provideBroadcastDispatcherLogBuffer(
+ LogcatEchoTracker bufferFilter,
+ DumpManager dumpManager) {
+ LogBuffer buffer = new LogBuffer("BroadcastDispatcherLog", 500, 10, bufferFilter);
+ buffer.attach(dumpManager);
+ return buffer;
+ }
+
/** Allows logging buffers to be tweaked via adb on debug builds but not on prod builds. */
@Provides
@Singleton
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
index f039fc2d84ae..50081001e65a 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java
@@ -35,7 +35,6 @@ import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
-import android.widget.SeekBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
@@ -165,9 +164,7 @@ public class MediaControlPanel {
TransitionLayout player = vh.getPlayer();
mSeekBarObserver = new SeekBarObserver(vh);
mSeekBarViewModel.getProgress().observeForever(mSeekBarObserver);
- SeekBar bar = vh.getSeekBar();
- bar.setOnSeekBarChangeListener(mSeekBarViewModel.getSeekBarListener());
- bar.setOnTouchListener(mSeekBarViewModel.getSeekBarTouchListener());
+ mSeekBarViewModel.attachTouchHandlers(vh.getSeekBar());
mMediaViewController.attach(player);
}
@@ -302,11 +299,14 @@ public class MediaControlPanel {
button.setContentDescription(mediaAction.getContentDescription());
Runnable action = mediaAction.getAction();
- button.setOnClickListener(v -> {
- if (action != null) {
+ if (action == null) {
+ button.setEnabled(false);
+ } else {
+ button.setEnabled(true);
+ button.setOnClickListener(v -> {
action.run();
- }
- });
+ });
+ }
boolean visibleInCompat = actionsWhenCollapsed.contains(i);
setVisibleAndAlpha(collapsedSet, actionId, visibleInCompat);
setVisibleAndAlpha(expandedSet, actionId, true /*visible */);
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
index 094c5bef3c18..6ea36ab3af2f 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt
@@ -18,8 +18,11 @@ package com.android.systemui.media
import android.app.Notification
import android.app.PendingIntent
+import android.content.BroadcastReceiver
import android.content.ContentResolver
import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Color
@@ -30,11 +33,13 @@ import android.media.MediaDescription
import android.media.MediaMetadata
import android.media.session.MediaSession
import android.net.Uri
+import android.os.UserHandle
import android.service.notification.StatusBarNotification
import android.text.TextUtils
import android.util.Log
import com.android.internal.graphics.ColorUtils
import com.android.systemui.R
+import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.statusbar.NotificationMediaManager
@@ -87,13 +92,23 @@ class MediaDataManager @Inject constructor(
private val notificationEntryManager: NotificationEntryManager,
private val mediaResumeListener: MediaResumeListener,
@Background private val backgroundExecutor: Executor,
- @Main private val foregroundExecutor: Executor
+ @Main private val foregroundExecutor: Executor,
+ private val broadcastDispatcher: BroadcastDispatcher
) {
private val listeners: MutableSet<Listener> = mutableSetOf()
private val mediaEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
private val useMediaResumption: Boolean = Utils.useMediaResumption(context)
+ private val userChangeReceiver = object : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ if (Intent.ACTION_USER_SWITCHED == intent.action) {
+ // Remove all controls, regardless of state
+ clearData()
+ }
+ }
+ }
+
init {
mediaTimeoutListener.timeoutCallback = { token: String, timedOut: Boolean ->
setTimedOut(token, timedOut) }
@@ -111,6 +126,9 @@ class MediaDataManager @Inject constructor(
}
addListener(mediaResumeListener)
}
+
+ val userFilter = IntentFilter(Intent.ACTION_USER_SWITCHED)
+ broadcastDispatcher.registerReceiver(userChangeReceiver, userFilter, null, UserHandle.ALL)
}
fun onNotificationAdded(key: String, sbn: StatusBarNotification) {
@@ -131,6 +149,17 @@ class MediaDataManager @Inject constructor(
}
}
+ private fun clearData() {
+ // Called on user change. Remove all current MediaData objects and inform listeners
+ val listenersCopy = listeners.toSet()
+ mediaEntries.forEach {
+ listenersCopy.forEach { listener ->
+ listener.onMediaDataRemoved(it.key)
+ }
+ }
+ mediaEntries.clear()
+ }
+
private fun addResumptionControls(
desc: MediaDescription,
action: Runnable,
@@ -337,15 +366,20 @@ class MediaDataManager @Inject constructor(
actionsToShowCollapsed.remove(index)
continue
}
+ val runnable = if (action.actionIntent != null) {
+ Runnable {
+ try {
+ action.actionIntent.send()
+ } catch (e: PendingIntent.CanceledException) {
+ Log.d(TAG, "Intent canceled", e)
+ }
+ }
+ } else {
+ null
+ }
val mediaAction = MediaAction(
action.getIcon().loadDrawable(packageContext),
- Runnable {
- try {
- action.actionIntent.send()
- } catch (e: PendingIntent.CanceledException) {
- Log.d(TAG, "Intent canceled", e)
- }
- },
+ runnable,
action.title)
actionIcons.add(mediaAction)
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
index 2f521ea39242..de0af16bc2fa 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaDeviceManager.kt
@@ -34,7 +34,6 @@ class MediaDeviceManager @Inject constructor(
private val context: Context,
private val localMediaManagerFactory: LocalMediaManagerFactory,
private val mr2manager: MediaRouter2Manager,
- private val featureFlag: MediaFeatureFlag,
@Main private val fgExecutor: Executor,
private val mediaDataManager: MediaDataManager
) : MediaDataManager.Listener {
@@ -56,20 +55,19 @@ class MediaDeviceManager @Inject constructor(
fun removeListener(listener: Listener) = listeners.remove(listener)
override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
- if (featureFlag.enabled) {
- if (oldKey != null && oldKey != key) {
- val oldToken = entries.remove(oldKey)
- oldToken?.stop()
- }
- var tok = entries[key]
- if (tok == null && data.token != null) {
- val controller = MediaController(context, data.token!!)
- tok = Token(key, controller, localMediaManagerFactory.create(data.packageName))
- entries[key] = tok
- tok.start()
+ if (oldKey != null && oldKey != key) {
+ val oldEntry = entries.remove(oldKey)
+ oldEntry?.stop()
+ }
+ var entry = entries[key]
+ if (entry == null || entry?.token != data.token) {
+ entry?.stop()
+ val controller = data.token?.let {
+ MediaController(context, it)
}
- } else {
- onMediaDataRemoved(key)
+ entry = Token(key, controller, localMediaManagerFactory.create(data.packageName))
+ entries[key] = entry
+ entry.start()
}
}
@@ -100,9 +98,11 @@ class MediaDeviceManager @Inject constructor(
private inner class Token(
val key: String,
- val controller: MediaController,
+ val controller: MediaController?,
val localMediaManager: LocalMediaManager
) : LocalMediaManager.DeviceCallback {
+ val token
+ get() = controller?.sessionToken
private var started = false
private var current: MediaDevice? = null
set(value) {
@@ -132,10 +132,14 @@ class MediaDeviceManager @Inject constructor(
}
private fun updateCurrent() {
val device = localMediaManager.getCurrentConnectedDevice()
- val route = mr2manager.getRoutingSessionForMediaController(controller)
- // If we get a null route, then don't trust the device. Just set to null to disable the
- // output switcher chip.
- current = if (route != null) device else null
+ controller?.let {
+ val route = mr2manager.getRoutingSessionForMediaController(it)
+ // If we get a null route, then don't trust the device. Just set to null to disable the
+ // output switcher chip.
+ current = if (route != null) device else null
+ } ?: run {
+ current = device
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt b/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
index 6bbe0d1651dd..e8a4b1e46fec 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaResumeListener.kt
@@ -40,7 +40,7 @@ import javax.inject.Singleton
private const val TAG = "MediaResumeListener"
private const val MEDIA_PREFERENCES = "media_control_prefs"
-private const val MEDIA_PREFERENCE_KEY = "browser_components"
+private const val MEDIA_PREFERENCE_KEY = "browser_components_"
@Singleton
class MediaResumeListener @Inject constructor(
@@ -63,11 +63,16 @@ class MediaResumeListener @Inject constructor(
lateinit var resumeComponentFoundCallback: (String, Runnable?) -> Unit
private var mediaBrowser: ResumeMediaBrowser? = null
+ private var currentUserId: Int
- private val unlockReceiver = object : BroadcastReceiver() {
+ private val userChangeReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (Intent.ACTION_USER_UNLOCKED == intent.action) {
loadMediaResumptionControls()
+ } else if (Intent.ACTION_USER_SWITCHED == intent.action) {
+ currentUserId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1)
+ loadSavedComponents()
+ loadMediaResumptionControls()
}
}
}
@@ -97,18 +102,22 @@ class MediaResumeListener @Inject constructor(
}
init {
+ currentUserId = context.userId
if (useMediaResumption) {
val unlockFilter = IntentFilter()
unlockFilter.addAction(Intent.ACTION_USER_UNLOCKED)
- broadcastDispatcher.registerReceiver(unlockReceiver, unlockFilter, null, UserHandle.ALL)
+ unlockFilter.addAction(Intent.ACTION_USER_SWITCHED)
+ broadcastDispatcher.registerReceiver(userChangeReceiver, unlockFilter, null,
+ UserHandle.ALL)
loadSavedComponents()
}
}
private fun loadSavedComponents() {
- val userContext = context.createContextAsUser(context.getUser(), 0)
- val prefs = userContext.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE)
- val listString = prefs.getString(MEDIA_PREFERENCE_KEY, null)
+ // Make sure list is empty (if we switched users)
+ resumeComponents.clear()
+ val prefs = context.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE)
+ val listString = prefs.getString(MEDIA_PREFERENCE_KEY + currentUserId, null)
val components = listString?.split(ResumeMediaBrowser.DELIMITER.toRegex())
?.dropLastWhile { it.isEmpty() }
components?.forEach {
@@ -133,7 +142,6 @@ class MediaResumeListener @Inject constructor(
val browser = ResumeMediaBrowser(context, mediaBrowserCallback, it)
browser.findRecentMedia()
}
- broadcastDispatcher.unregisterReceiver(unlockReceiver) // only need to load once
}
override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
@@ -212,9 +220,8 @@ class MediaResumeListener @Inject constructor(
sb.append(it.flattenToString())
sb.append(ResumeMediaBrowser.DELIMITER)
}
- val userContext = context.createContextAsUser(context.getUser(), 0)
- val prefs = userContext.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE)
- prefs.edit().putString(MEDIA_PREFERENCE_KEY, sb.toString()).apply()
+ val prefs = context.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE)
+ prefs.edit().putString(MEDIA_PREFERENCE_KEY + currentUserId, sb.toString()).apply()
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
index efc476d0c86f..1dca3f1297b1 100644
--- a/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/SeekBarViewModel.kt
@@ -20,19 +20,22 @@ import android.media.MediaMetadata
import android.media.session.MediaController
import android.media.session.PlaybackState
import android.os.SystemClock
+import android.view.GestureDetector
import android.view.MotionEvent
import android.view.View
+import android.view.ViewConfiguration
import android.widget.SeekBar
import androidx.annotation.AnyThread
import androidx.annotation.WorkerThread
+import androidx.core.view.GestureDetectorCompat
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.LiveData
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.util.concurrency.RepeatableExecutor
-import java.util.concurrent.Executor
import javax.inject.Inject
private const val POSITION_UPDATE_INTERVAL_MILLIS = 100L
+private const val MIN_FLING_VELOCITY_SCALE_FACTOR = 10
private fun PlaybackState.isInMotion(): Boolean {
return this.state == PlaybackState.STATE_PLAYING ||
@@ -68,7 +71,6 @@ private fun PlaybackState.computePosition(duration: Long): Long {
/** ViewModel for seek bar in QS media player. */
class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: RepeatableExecutor) {
-
private var _data = Progress(false, false, null, null)
set(value) {
field = value
@@ -104,6 +106,9 @@ class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: R
}
private var cancel: Runnable? = null
+ /** Indicates if the seek interaction is considered a false guesture. */
+ private var isFalseSeek = false
+
/** Listening state (QS open or closed) is used to control polling of progress. */
var listening = true
set(value) = bgExecutor.execute {
@@ -113,16 +118,61 @@ class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: R
}
}
+ /** Set to true when the user is touching the seek bar to change the position. */
+ private var scrubbing = false
+ set(value) {
+ if (field != value) {
+ field = value
+ checkIfPollingNeeded()
+ }
+ }
+
+ /**
+ * Event indicating that the user has started interacting with the seek bar.
+ */
+ @AnyThread
+ fun onSeekStarting() = bgExecutor.execute {
+ scrubbing = true
+ isFalseSeek = false
+ }
+
+ /**
+ * Event indicating that the user has moved the seek bar but hasn't yet finished the gesture.
+ * @param position Current location in the track.
+ */
+ @AnyThread
+ fun onSeekProgress(position: Long) = bgExecutor.execute {
+ if (scrubbing) {
+ _data = _data.copy(elapsedTime = position.toInt())
+ }
+ }
+
+ /**
+ * Event indicating that the seek interaction is a false gesture and it should be ignored.
+ */
+ @AnyThread
+ fun onSeekFalse() = bgExecutor.execute {
+ if (scrubbing) {
+ isFalseSeek = true
+ }
+ }
+
/**
* Handle request to change the current position in the media track.
* @param position Place to seek to in the track.
*/
- @WorkerThread
- fun onSeek(position: Long) {
- controller?.transportControls?.seekTo(position)
- // Invalidate the cached playbackState to avoid the thumb jumping back to the previous
- // position.
- playbackState = null
+ @AnyThread
+ fun onSeek(position: Long) = bgExecutor.execute {
+ if (isFalseSeek) {
+ scrubbing = false
+ checkPlaybackPosition()
+ } else {
+ controller?.transportControls?.seekTo(position)
+ // Invalidate the cached playbackState to avoid the thumb jumping back to the previous
+ // position.
+ playbackState = null
+ scrubbing = false
+ }
}
/**
@@ -180,7 +230,7 @@ class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: R
@WorkerThread
private fun checkIfPollingNeeded() {
- val needed = listening && playbackState?.isInMotion() ?: false
+ val needed = listening && !scrubbing && playbackState?.isInMotion() ?: false
if (needed) {
if (cancel == null) {
cancel = bgExecutor.executeRepeatedly(this::checkPlaybackPosition, 0L,
@@ -195,41 +245,162 @@ class SeekBarViewModel @Inject constructor(@Background private val bgExecutor: R
/** Gets a listener to attach to the seek bar to handle seeking. */
val seekBarListener: SeekBar.OnSeekBarChangeListener
get() {
- return SeekBarChangeListener(this, bgExecutor)
+ return SeekBarChangeListener(this)
}
- /** Gets a listener to attach to the seek bar to disable touch intercepting. */
- val seekBarTouchListener: View.OnTouchListener
- get() {
- return SeekBarTouchListener()
- }
+ /** Attach touch handlers to the seek bar view. */
+ fun attachTouchHandlers(bar: SeekBar) {
+ bar.setOnSeekBarChangeListener(seekBarListener)
+ bar.setOnTouchListener(SeekBarTouchListener(this, bar))
+ }
private class SeekBarChangeListener(
- val viewModel: SeekBarViewModel,
- val bgExecutor: Executor
+ val viewModel: SeekBarViewModel
) : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(bar: SeekBar, progress: Int, fromUser: Boolean) {
if (fromUser) {
- bgExecutor.execute {
- viewModel.onSeek(progress.toLong())
- }
+ viewModel.onSeekProgress(progress.toLong())
}
}
+
override fun onStartTrackingTouch(bar: SeekBar) {
+ viewModel.onSeekStarting()
}
+
override fun onStopTrackingTouch(bar: SeekBar) {
- val pos = bar.progress.toLong()
- bgExecutor.execute {
- viewModel.onSeek(pos)
- }
+ viewModel.onSeek(bar.progress.toLong())
}
}
- private class SeekBarTouchListener : View.OnTouchListener {
+ /**
+ * Responsible for intercepting touch events before they reach the seek bar.
+ *
+ * This reduces the gestures seen by the seek bar so that users don't accidentially seek when
+ * they intend to scroll the carousel.
+ */
+ private class SeekBarTouchListener(
+ private val viewModel: SeekBarViewModel,
+ private val bar: SeekBar
+ ) : View.OnTouchListener, GestureDetector.OnGestureListener {
+
+ // Gesture detector helps decide which touch events to intercept.
+ private val detector = GestureDetectorCompat(bar.context, this)
+ // Velocity threshold used to decide when a fling is considered a false gesture.
+ private val flingVelocity: Int = ViewConfiguration.get(bar.context).run {
+ getScaledMinimumFlingVelocity() * MIN_FLING_VELOCITY_SCALE_FACTOR
+ }
+ // Indicates if the gesture should go to the seek bar or if it should be intercepted.
+ private var shouldGoToSeekBar = false
+
+ /**
+ * Decide which touch events to intercept before they reach the seek bar.
+ *
+ * Based on the gesture detected, we decide whether we want the event to reach the seek bar.
+ * If we want the seek bar to see the event, then we return false so that the event isn't
+ * handled here and it will be passed along. If, however, we don't want the seek bar to see
+ * the event, then return true so that the event is handled here.
+ *
+ * When the seek bar is contained in the carousel, the carousel still has the ability to
+ * intercept the touch event. So, even though we may handle the event here, the carousel can
+ * still intercept the event. This way, gestures that we consider falses on the seek bar can
+ * still be used by the carousel for paging.
+ *
+ * Returns true for events that we don't want dispatched to the seek bar.
+ */
override fun onTouch(view: View, event: MotionEvent): Boolean {
- view.parent.requestDisallowInterceptTouchEvent(true)
- return view.onTouchEvent(event)
+ if (view != bar) {
+ return false
+ }
+ detector.onTouchEvent(event)
+ return !shouldGoToSeekBar
+ }
+
+ /**
+ * Handle down events that press down on the thumb.
+ *
+ * On the down action, determine a target box around the thumb to know when a scroll
+ * gesture starts by clicking on the thumb. The target box will be used by subsequent
+ * onScroll events.
+ *
+ * Returns true when the down event hits within the target box of the thumb.
+ */
+ override fun onDown(event: MotionEvent): Boolean {
+ val padL = bar.paddingLeft
+ val padR = bar.paddingRight
+ // Compute the X location of the thumb as a function of the seek bar progress.
+ // TODO: account for thumb offset
+ val progress = bar.getProgress()
+ val range = bar.max - bar.min
+ val widthFraction = if (range > 0) {
+ (progress - bar.min).toDouble() / range
+ } else {
+ 0.0
+ }
+ val availableWidth = bar.width - padL - padR
+ val thumbX = if (bar.isLayoutRtl()) {
+ padL + availableWidth * (1 - widthFraction)
+ } else {
+ padL + availableWidth * widthFraction
+ }
+ // Set the min, max boundaries of the thumb box.
+ // I'm cheating by using the height of the seek bar as the width of the box.
+ val halfHeight: Int = bar.height / 2
+ val targetBoxMinX = (Math.round(thumbX) - halfHeight).toInt()
+ val targetBoxMaxX = (Math.round(thumbX) + halfHeight).toInt()
+ // If the x position of the down event is within the box, then request that the parent
+ // not intercept the event.
+ val x = Math.round(event.x)
+ shouldGoToSeekBar = x >= targetBoxMinX && x <= targetBoxMaxX
+ if (shouldGoToSeekBar) {
+ bar.parent?.requestDisallowInterceptTouchEvent(true)
+ }
+ return shouldGoToSeekBar
+ }
+
+ /**
+ * Always handle single tap up.
+ *
+ * This enables the user to single tap anywhere on the seek bar to seek to that position.
+ */
+ override fun onSingleTapUp(event: MotionEvent): Boolean {
+ shouldGoToSeekBar = true
+ return true
}
+
+ /**
+ * Handle scroll events when the down event is on the thumb.
+ *
+ * Returns true when the down event of the scroll hits within the target box of the thumb.
+ */
+ override fun onScroll(
+ eventStart: MotionEvent,
+ event: MotionEvent,
+ distanceX: Float,
+ distanceY: Float
+ ): Boolean {
+ return shouldGoToSeekBar
+ }
+
+ /**
+ * Handle fling events when the down event is on the thumb.
+ *
+ * Gestures that include a fling are considered a false gesture on the seek bar.
+ */
+ override fun onFling(
+ eventStart: MotionEvent,
+ event: MotionEvent,
+ velocityX: Float,
+ velocityY: Float
+ ): Boolean {
+ if (Math.abs(velocityX) > flingVelocity || Math.abs(velocityY) > flingVelocity) {
+ viewModel.onSeekFalse()
+ }
+ return shouldGoToSeekBar
+ }
+
+ override fun onShowPress(event: MotionEvent) {}
+
+ override fun onLongPress(event: MotionEvent) {}
}
/** State seen by seek bar UI. */
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
index 7f7e1085d497..2980f11b3cbc 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java
@@ -16,6 +16,7 @@
package com.android.systemui.pip;
+import android.animation.AnimationHandler;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.IntDef;
@@ -26,6 +27,7 @@ import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -79,6 +81,13 @@ public class PipAnimationController {
private PipTransitionAnimator mCurrentAnimator;
+ private ThreadLocal<AnimationHandler> mSfAnimationHandlerThreadLocal =
+ ThreadLocal.withInitial(() -> {
+ AnimationHandler handler = new AnimationHandler();
+ handler.setProvider(new SfVsyncFrameCallbackProvider());
+ return handler;
+ });
+
@Inject
PipAnimationController(Context context, PipSurfaceTransactionHelper helper) {
mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
@@ -135,6 +144,7 @@ public class PipAnimationController {
animator.setSurfaceTransactionHelper(mSurfaceTransactionHelper);
animator.setInterpolator(mFastOutSlowInInterpolator);
animator.setFloatValues(FRACTION_START, FRACTION_END);
+ animator.setAnimationHandler(mSfAnimationHandlerThreadLocal.get());
return animator;
}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
index c6f144aa57a1..b93e07e65c73 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java
@@ -504,8 +504,18 @@ public class PipTaskOrganizer extends TaskOrganizer implements
// this could happen if rotation finishes before the animation
mLastReportedBounds.set(destinationBoundsOut);
scheduleFinishResizePip(mLastReportedBounds);
- } else if (!mLastReportedBounds.isEmpty()) {
- destinationBoundsOut.set(mLastReportedBounds);
+ } else {
+ // There could be an animation on-going. If there is one on-going, last-reported
+ // bounds isn't yet updated. We'll use the animator's bounds instead.
+ if (animator != null && animator.isRunning()) {
+ if (!animator.getDestinationBounds().isEmpty()) {
+ destinationBoundsOut.set(animator.getDestinationBounds());
+ }
+ } else {
+ if (!mLastReportedBounds.isEmpty()) {
+ destinationBoundsOut.set(mLastReportedBounds);
+ }
+ }
}
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index b714bff15d8a..e38bfb441a0b 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -269,7 +269,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
if (stackInfo != null) {
// If SystemUI restart, and it already existed a pinned stack,
// register the pip input consumer to ensure touch can send to it.
- mInputConsumerController.registerInputConsumer();
+ mInputConsumerController.registerInputConsumer(true /* withSfVsync */);
}
} catch (RemoteException | UnsupportedOperationException e) {
e.printStackTrace();
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
index a3185a2ad796..6ab73fcce399 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
@@ -295,6 +295,14 @@ public class PipMenuActivity extends Activity {
}
@Override
+ public void onTopResumedActivityChanged(boolean isTopResumedActivity) {
+ super.onTopResumedActivityChanged(isTopResumedActivity);
+ if (!isTopResumedActivity && mMenuState != MENU_STATE_NONE) {
+ hideMenu();
+ }
+ }
+
+ @Override
protected void onStop() {
super.onStop();
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
index 8b4d932619a9..31d292fa3fd7 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
@@ -197,7 +197,7 @@ public class PipMenuActivityController {
}
public void onActivityPinned() {
- mInputConsumerController.registerInputConsumer();
+ mInputConsumerController.registerInputConsumer(true /* withSfVsync */);
}
public void onActivityUnpinned() {
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
index 2e75bab7ae32..d077666f8184 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
@@ -23,9 +23,11 @@ import android.content.Context;
import android.graphics.Rect;
import android.os.Debug;
import android.util.Log;
+import android.view.Choreographer;
import androidx.dynamicanimation.animation.SpringForce;
+import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import com.android.systemui.pip.PipSnapAlgorithm;
import com.android.systemui.pip.PipTaskOrganizer;
import com.android.systemui.util.FloatingContentCoordinator;
@@ -68,6 +70,9 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
/** The region that all of PIP must stay within. */
private final Rect mFloatingAllowedArea = new Rect();
+ private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider =
+ new SfVsyncFrameCallbackProvider();
+
/**
* Bounds that are animated using the physics animator.
*/
@@ -79,6 +84,10 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
/** Coordinator instance for resolving conflicts with other floating content. */
private FloatingContentCoordinator mFloatingContentCoordinator;
+ /** Callback that re-sizes PIP to the animated bounds. */
+ private final Choreographer.FrameCallback mResizePipVsyncCallback =
+ l -> resizePipUnchecked(mAnimatedBounds);
+
/**
* PhysicsAnimator instance for animating {@link #mAnimatedBounds} using physics animations.
*/
@@ -89,7 +98,7 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
* Update listener that resizes the PIP to {@link #mAnimatedBounds}.
*/
final PhysicsAnimator.UpdateListener<Rect> mResizePipUpdateListener =
- (target, values) -> resizePipUnchecked(mAnimatedBounds);
+ (target, values) -> mSfVsyncFrameProvider.postFrameCallback(mResizePipVsyncCallback);
/** FlingConfig instances provided to PhysicsAnimator for fling gestures. */
private PhysicsAnimator.FlingConfig mFlingConfigX;
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
index bafbd216b1a2..f6b212c6f19f 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java
@@ -32,6 +32,8 @@ import android.hardware.input.InputManager;
import android.os.Handler;
import android.os.Looper;
import android.provider.DeviceConfig;
+import android.view.BatchedInputEventReceiver;
+import android.view.Choreographer;
import android.view.InputChannel;
import android.view.InputEvent;
import android.view.InputEventReceiver;
@@ -323,9 +325,9 @@ public class PipResizeGestureHandler {
mMinSize.set(minX, minY);
}
- class SysUiInputEventReceiver extends InputEventReceiver {
+ class SysUiInputEventReceiver extends BatchedInputEventReceiver {
SysUiInputEventReceiver(InputChannel channel, Looper looper) {
- super(channel, looper);
+ super(channel, looper, Choreographer.getSfInstance());
}
public void onInputEvent(InputEvent event) {
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index a624479fa63c..7babe2f4f2db 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -41,13 +41,19 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.graphics.Color;
import android.graphics.Insets;
import android.graphics.Outline;
import android.graphics.PixelFormat;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.Region;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
+import android.graphics.drawable.InsetDrawable;
+import android.graphics.drawable.LayerDrawable;
import android.media.MediaActionSound;
import android.net.Uri;
import android.os.Handler;
@@ -114,7 +120,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
public Consumer<Uri> finisher;
public GlobalScreenshot.ActionsReadyListener mActionsReadyListener;
public int errorMsgResId;
- public boolean createDeleteAction;
void clearImage() {
image = null;
@@ -168,6 +173,8 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
private static final long SCREENSHOT_FLASH_IN_DURATION_MS = 133;
private static final long SCREENSHOT_FLASH_OUT_DURATION_MS = 217;
+ // delay before starting to fade in dismiss button
+ private static final long SCREENSHOT_TO_CORNER_DISMISS_DELAY_MS = 200;
private static final long SCREENSHOT_TO_CORNER_X_DURATION_MS = 234;
private static final long SCREENSHOT_TO_CORNER_Y_DURATION_MS = 500;
private static final long SCREENSHOT_TO_CORNER_SCALE_DURATION_MS = 234;
@@ -208,6 +215,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
private Animator mScreenshotAnimation;
private Runnable mOnCompleteRunnable;
private Animator mDismissAnimation;
+ private SavedImageData mImageData;
private boolean mInDarkMode = false;
private boolean mDirectionLTR = true;
private boolean mOrientationPortrait = true;
@@ -226,6 +234,9 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
switch (msg.what) {
case MESSAGE_CORNER_TIMEOUT:
mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_INTERACTION_TIMEOUT);
+ if (mImageData != null) {
+ mNotificationsController.showSilentScreenshotNotification(mImageData);
+ }
GlobalScreenshot.this.dismissScreenshot("timeout", false);
mOnCompleteRunnable.run();
break;
@@ -261,7 +272,8 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
- | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
+ | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
+ | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
PixelFormat.TRANSLUCENT);
mWindowLayoutParams.setTitle("ScreenshotAnimation");
mWindowLayoutParams.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
@@ -396,6 +408,9 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
mDismissButton = mScreenshotLayout.findViewById(R.id.global_screenshot_dismiss_button);
mDismissButton.setOnClickListener(view -> {
mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_EXPLICIT_DISMISSAL);
+ if (mImageData != null) {
+ mNotificationsController.showSilentScreenshotNotification(mImageData);
+ }
dismissScreenshot("dismiss_button", false);
mOnCompleteRunnable.run();
});
@@ -424,7 +439,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
data.image = mScreenBitmap;
data.finisher = finisher;
data.mActionsReadyListener = actionsReadyListener;
- data.createDeleteAction = false;
if (mSaveInBgTask != null) {
// just log success/failure for the pre-existing screenshot
@@ -436,6 +450,10 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
});
}
+ mImageData = null; // make sure we clear the current stored data
+ mNotificationsController.reset();
+ mNotificationsController.setImage(mScreenBitmap);
+
mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data);
mSaveInBgTask.execute();
}
@@ -449,10 +467,12 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
int rot = mDisplay.getRotation();
int width = crop.width();
int height = crop.height();
- takeScreenshot(SurfaceControl.screenshot(crop, width, height, rot), finisher, screenRect);
+ takeScreenshot(SurfaceControl.screenshot(crop, width, height, rot), finisher, screenRect,
+ Insets.NONE, true);
}
- private void takeScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect) {
+ private void takeScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
+ Insets screenInsets, boolean showFlash) {
dismissScreenshot("new screenshot requested", true);
mScreenBitmap = screenshot;
@@ -482,7 +502,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
mDismissAnimation.cancel();
}
// Start the post-screenshot animation
- startAnimation(finisher, mScreenBitmap.getWidth(), mScreenBitmap.getHeight(), screenRect);
+ startAnimation(finisher, screenRect, screenInsets, showFlash);
}
void takeScreenshot(Consumer<Uri> finisher, Runnable onComplete) {
@@ -498,9 +518,15 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
Insets visibleInsets, int taskId, int userId, ComponentName topComponent,
Consumer<Uri> finisher, Runnable onComplete) {
// TODO: use task Id, userId, topComponent for smart handler
- // TODO: use visibleInsets for animation
+
mOnCompleteRunnable = onComplete;
- takeScreenshot(screenshot, finisher, screenshotScreenBounds);
+ if (aspectRatiosMatch(screenshot, visibleInsets, screenshotScreenBounds)) {
+ takeScreenshot(screenshot, finisher, screenshotScreenBounds, visibleInsets, false);
+ } else {
+ takeScreenshot(screenshot, finisher,
+ new Rect(0, 0, screenshot.getWidth(), screenshot.getHeight()), Insets.NONE,
+ true);
+ }
}
/**
@@ -621,8 +647,9 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
}
// Clear any references to the bitmap
- mScreenshotPreview.setImageBitmap(null);
- mScreenshotAnimatedView.setImageBitmap(null);
+ mScreenshotPreview.setImageDrawable(null);
+ mScreenshotAnimatedView.setImageDrawable(null);
+ mScreenshotAnimatedView.setVisibility(View.GONE);
mActionsContainerBackground.setVisibility(View.GONE);
mActionsContainer.setVisibility(View.GONE);
mBackgroundProtection.setAlpha(0f);
@@ -643,6 +670,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
*/
private void showUiOnActionsReady(SavedImageData imageData) {
logSuccessOnActionsReady(imageData);
+ mImageData = imageData;
AccessibilityManager accessibilityManager = (AccessibilityManager)
mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
@@ -688,8 +716,9 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
/**
* Starts the animation after taking the screenshot
*/
- private void startAnimation(
- final Consumer<Uri> finisher, int bitmapWidth, int bitmapHeight, Rect screenRect) {
+ private void startAnimation(final Consumer<Uri> finisher, Rect screenRect, Insets screenInsets,
+ boolean showFlash) {
+
// If power save is on, show a toast so there is some visual indication that a
// screenshot has been taken.
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
@@ -701,9 +730,13 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
if (!mScreenshotLayout.isAttachedToWindow()) {
mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
}
- mScreenshotAnimatedView.setImageBitmap(mScreenBitmap);
- mScreenshotPreview.setImageBitmap(mScreenBitmap);
+ mScreenshotAnimatedView.setImageDrawable(
+ createScreenDrawable(mScreenBitmap, screenInsets));
+ setAnimatedViewSize(screenRect.width(), screenRect.height());
+ // Show when the animation starts
+ mScreenshotAnimatedView.setVisibility(View.GONE);
+ mScreenshotPreview.setImageDrawable(createScreenDrawable(mScreenBitmap, screenInsets));
// make static preview invisible (from gone) so we can query its location on screen
mScreenshotPreview.setVisibility(View.INVISIBLE);
@@ -711,14 +744,14 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
mScreenshotLayout.getViewTreeObserver().addOnComputeInternalInsetsListener(this);
mScreenshotAnimation =
- createScreenshotDropInAnimation(bitmapWidth, bitmapHeight, screenRect);
+ createScreenshotDropInAnimation(screenRect, showFlash);
saveScreenshotInWorkerThread(finisher, new ActionsReadyListener() {
- @Override
- void onActionsReady(SavedImageData imageData) {
- showUiOnActionsReady(imageData);
- }
- });
+ @Override
+ void onActionsReady(SavedImageData imageData) {
+ showUiOnActionsReady(imageData);
+ }
+ });
// Play the shutter sound to notify that we've taken a screenshot
mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
@@ -730,19 +763,19 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
});
}
- private AnimatorSet createScreenshotDropInAnimation(
- int bitmapWidth, int bitmapHeight, Rect bounds) {
+ private AnimatorSet createScreenshotDropInAnimation(Rect bounds, boolean showFlash) {
Rect previewBounds = new Rect();
mScreenshotPreview.getBoundsOnScreen(previewBounds);
- float cornerScale = mCornerSizeX / (mOrientationPortrait ? bitmapWidth : bitmapHeight);
- float currentScale = bounds.height() / (float) bitmapHeight;
+ float cornerScale =
+ mCornerSizeX / (mOrientationPortrait ? bounds.width() : bounds.height());
+ final float currentScale = 1f;
mScreenshotAnimatedView.setScaleX(currentScale);
mScreenshotAnimatedView.setScaleY(currentScale);
- mScreenshotAnimatedView.setPivotX(0);
- mScreenshotAnimatedView.setPivotY(0);
+ mDismissButton.setAlpha(0);
+ mDismissButton.setVisibility(View.VISIBLE);
AnimatorSet dropInAnimation = new AnimatorSet();
ValueAnimator flashInAnimator = ValueAnimator.ofFloat(0, 1);
@@ -765,6 +798,8 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
toCorner.setDuration(SCREENSHOT_TO_CORNER_Y_DURATION_MS);
float xPositionPct =
SCREENSHOT_TO_CORNER_X_DURATION_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
+ float dismissPct =
+ SCREENSHOT_TO_CORNER_DISMISS_DELAY_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
float scalePct =
SCREENSHOT_TO_CORNER_SCALE_DURATION_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
toCorner.addUpdateListener(animation -> {
@@ -785,13 +820,26 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
if (t < xPositionPct) {
float xCenter = MathUtils.lerp(startPos.x, finalPos.x,
mFastOutSlowIn.getInterpolation(t / xPositionPct));
- mScreenshotAnimatedView.setX(xCenter - bitmapWidth * currentScaleX / 2f);
+ mScreenshotAnimatedView.setX(xCenter - bounds.width() * currentScaleX / 2f);
} else {
- mScreenshotAnimatedView.setX(finalPos.x - bitmapWidth * currentScaleX / 2f);
+ mScreenshotAnimatedView.setX(finalPos.x - bounds.width() * currentScaleX / 2f);
}
float yCenter = MathUtils.lerp(
startPos.y, finalPos.y, mFastOutSlowIn.getInterpolation(t));
- mScreenshotAnimatedView.setY(yCenter - bitmapHeight * currentScaleY / 2f);
+ mScreenshotAnimatedView.setY(yCenter - bounds.height() * currentScaleY / 2f);
+
+ if (t >= dismissPct) {
+ mDismissButton.setAlpha((t - dismissPct) / (1 - dismissPct));
+ float currentX = mScreenshotAnimatedView.getX();
+ float currentY = mScreenshotAnimatedView.getY();
+ mDismissButton.setY(currentY - mDismissButton.getHeight() / 2f);
+ if (mDirectionLTR) {
+ mDismissButton.setX(currentX
+ + bounds.width() * currentScaleX - mDismissButton.getWidth() / 2f);
+ } else {
+ mDismissButton.setX(currentX - mDismissButton.getWidth() / 2f);
+ }
+ }
});
toCorner.addListener(new AnimatorListenerAdapter() {
@@ -805,20 +853,31 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
mScreenshotFlash.setAlpha(0f);
mScreenshotFlash.setVisibility(View.VISIBLE);
- dropInAnimation.play(flashOutAnimator).after(flashInAnimator);
- dropInAnimation.play(flashOutAnimator).with(toCorner);
+ if (showFlash) {
+ dropInAnimation.play(flashOutAnimator).after(flashInAnimator);
+ dropInAnimation.play(flashOutAnimator).with(toCorner);
+ } else {
+ dropInAnimation.play(toCorner);
+ }
dropInAnimation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
+ mDismissButton.setAlpha(1);
+ float dismissOffset = mDismissButton.getWidth() / 2f;
+ float finalDismissX = mDirectionLTR
+ ? finalPos.x - dismissOffset + bounds.width() * cornerScale / 2f
+ : finalPos.x - dismissOffset - bounds.width() * cornerScale / 2f;
+ mDismissButton.setX(finalDismissX);
+ mDismissButton.setY(
+ finalPos.y - dismissOffset - bounds.height() * cornerScale / 2f);
mScreenshotAnimatedView.setScaleX(1);
mScreenshotAnimatedView.setScaleY(1);
mScreenshotAnimatedView.setX(finalPos.x - bounds.width() * cornerScale / 2f);
mScreenshotAnimatedView.setY(finalPos.y - bounds.height() * cornerScale / 2f);
mScreenshotAnimatedView.setVisibility(View.GONE);
mScreenshotPreview.setVisibility(View.VISIBLE);
- mDismissButton.setVisibility(View.VISIBLE);
mScreenshotLayout.forceLayout();
}
});
@@ -972,6 +1031,71 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
return animSet;
}
+ private void setAnimatedViewSize(int width, int height) {
+ ViewGroup.LayoutParams layoutParams = mScreenshotAnimatedView.getLayoutParams();
+ layoutParams.width = width;
+ layoutParams.height = height;
+ mScreenshotAnimatedView.setLayoutParams(layoutParams);
+ }
+
+ /** Does the aspect ratio of the bitmap with insets removed match the bounds. */
+ private boolean aspectRatiosMatch(Bitmap bitmap, Insets bitmapInsets, Rect screenBounds) {
+ int insettedWidth = bitmap.getWidth() - bitmapInsets.left - bitmapInsets.right;
+ int insettedHeight = bitmap.getHeight() - bitmapInsets.top - bitmapInsets.bottom;
+
+ if (insettedHeight == 0 || insettedWidth == 0 || bitmap.getWidth() == 0
+ || bitmap.getHeight() == 0) {
+ Log.e(TAG, String.format(
+ "Provided bitmap and insets create degenerate region: %dx%d %s",
+ bitmap.getWidth(), bitmap.getHeight(), bitmapInsets));
+ return false;
+ }
+
+ float insettedBitmapAspect = ((float) insettedWidth) / insettedHeight;
+ float boundsAspect = ((float) screenBounds.width()) / screenBounds.height();
+
+ boolean matchWithinTolerance = Math.abs(insettedBitmapAspect - boundsAspect) < 0.1f;
+ if (!matchWithinTolerance) {
+ Log.d(TAG, String.format("aspectRatiosMatch: don't match bitmap: %f, bounds: %f",
+ insettedBitmapAspect, boundsAspect));
+ }
+
+ return matchWithinTolerance;
+ }
+
+ /**
+ * Create a drawable using the size of the bitmap and insets as the fractional inset parameters.
+ */
+ private Drawable createScreenDrawable(Bitmap bitmap, Insets insets) {
+ int insettedWidth = bitmap.getWidth() - insets.left - insets.right;
+ int insettedHeight = bitmap.getHeight() - insets.top - insets.bottom;
+
+ BitmapDrawable bitmapDrawable = new BitmapDrawable(mContext.getResources(), bitmap);
+ if (insettedHeight == 0 || insettedWidth == 0 || bitmap.getWidth() == 0
+ || bitmap.getHeight() == 0) {
+ Log.e(TAG, String.format(
+ "Can't create insetted drawable, using 0 insets "
+ + "bitmap and insets create degenerate region: %dx%d %s",
+ bitmap.getWidth(), bitmap.getHeight(), insets));
+ return bitmapDrawable;
+ }
+
+ InsetDrawable insetDrawable = new InsetDrawable(bitmapDrawable,
+ -1f * insets.left / insettedWidth,
+ -1f * insets.top / insettedHeight,
+ -1f * insets.right / insettedWidth,
+ -1f * insets.bottom / insettedHeight);
+
+ if (insets.left < 0 || insets.top < 0 || insets.right < 0 || insets.bottom < 0) {
+ // Are any of the insets negative, meaning the bitmap is smaller than the bounds so need
+ // to fill in the background of the drawable.
+ return new LayerDrawable(new Drawable[] {
+ new ColorDrawable(Color.BLACK), insetDrawable});
+ } else {
+ return insetDrawable;
+ }
+ }
+
/**
* Receiver to proxy the share or edit intent, used to clean up the notification and send
* appropriate signals to the system (ie. to dismiss the keyguard if necessary).
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshotLegacy.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshotLegacy.java
deleted file mode 100644
index 0017b1f79b74..000000000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshotLegacy.java
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.screenshot;
-
-import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ValueAnimator;
-import android.animation.ValueAnimator.AnimatorUpdateListener;
-import android.annotation.Nullable;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.graphics.Insets;
-import android.graphics.PixelFormat;
-import android.graphics.PointF;
-import android.graphics.Rect;
-import android.media.MediaActionSound;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.os.PowerManager;
-import android.util.DisplayMetrics;
-import android.view.Display;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.SurfaceControl;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-import android.view.animation.Interpolator;
-import android.widget.ImageView;
-import android.widget.Toast;
-
-import com.android.systemui.R;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import java.util.function.Consumer;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-/**
- * Class for handling device screen shots
- *
- * @deprecated will be removed when corner flow is complete and tested
- */
-@Singleton
-@Deprecated
-public class GlobalScreenshotLegacy {
-
- // These strings are used for communicating the action invoked to
- // ScreenshotNotificationSmartActionsProvider.
- static final String EXTRA_ACTION_TYPE = "android:screenshot_action_type";
- static final String EXTRA_ID = "android:screenshot_id";
- static final String ACTION_TYPE_DELETE = "Delete";
- static final String ACTION_TYPE_SHARE = "Share";
- static final String ACTION_TYPE_EDIT = "Edit";
- static final String EXTRA_SMART_ACTIONS_ENABLED = "android:smart_actions_enabled";
- static final String EXTRA_ACTION_INTENT = "android:screenshot_action_intent";
-
- static final String SCREENSHOT_URI_ID = "android:screenshot_uri_id";
- static final String EXTRA_CANCEL_NOTIFICATION = "android:screenshot_cancel_notification";
- static final String EXTRA_DISALLOW_ENTER_PIP = "android:screenshot_disallow_enter_pip";
-
- private static final String TAG = "GlobalScreenshot";
-
- private static final int SCREENSHOT_FLASH_TO_PEAK_DURATION = 130;
- private static final int SCREENSHOT_DROP_IN_DURATION = 430;
- private static final int SCREENSHOT_DROP_OUT_DELAY = 500;
- private static final int SCREENSHOT_DROP_OUT_DURATION = 430;
- private static final int SCREENSHOT_DROP_OUT_SCALE_DURATION = 370;
- private static final int SCREENSHOT_FAST_DROP_OUT_DURATION = 320;
- private static final float BACKGROUND_ALPHA = 0.5f;
- private static final float SCREENSHOT_SCALE = 1f;
- private static final float SCREENSHOT_DROP_IN_MIN_SCALE = SCREENSHOT_SCALE * 0.725f;
- private static final float SCREENSHOT_DROP_OUT_MIN_SCALE = SCREENSHOT_SCALE * 0.45f;
- private static final float SCREENSHOT_FAST_DROP_OUT_MIN_SCALE = SCREENSHOT_SCALE * 0.6f;
- private static final float SCREENSHOT_DROP_OUT_MIN_SCALE_OFFSET = 0f;
-
- private final ScreenshotNotificationsController mNotificationsController;
-
- private Context mContext;
- private WindowManager mWindowManager;
- private WindowManager.LayoutParams mWindowLayoutParams;
- private Display mDisplay;
- private DisplayMetrics mDisplayMetrics;
-
- private Bitmap mScreenBitmap;
- private View mScreenshotLayout;
- private ScreenshotSelectorView mScreenshotSelectorView;
- private ImageView mBackgroundView;
- private ImageView mScreenshotView;
- private ImageView mScreenshotFlash;
-
- private AnimatorSet mScreenshotAnimation;
-
- private float mBgPadding;
- private float mBgPaddingScale;
-
- private AsyncTask<Void, Void, Void> mSaveInBgTask;
-
- private MediaActionSound mCameraSound;
-
- /**
- * @param context everything needs a context :(
- */
- @Inject
- public GlobalScreenshotLegacy(
- Context context, @Main Resources resources, LayoutInflater layoutInflater,
- ScreenshotNotificationsController screenshotNotificationsController) {
- mContext = context;
- mNotificationsController = screenshotNotificationsController;
-
- // Inflate the screenshot layout
- mScreenshotLayout = layoutInflater.inflate(R.layout.global_screenshot_legacy, null);
- mBackgroundView = mScreenshotLayout.findViewById(R.id.global_screenshot_legacy_background);
- mScreenshotView = mScreenshotLayout.findViewById(R.id.global_screenshot_legacy);
-
- mScreenshotFlash = mScreenshotLayout.findViewById(R.id.global_screenshot_legacy_flash);
- mScreenshotSelectorView = mScreenshotLayout.findViewById(
- R.id.global_screenshot_legacy_selector);
- mScreenshotLayout.setFocusable(true);
- mScreenshotSelectorView.setFocusable(true);
- mScreenshotSelectorView.setFocusableInTouchMode(true);
- mScreenshotLayout.setOnTouchListener((v, event) -> {
- // Intercept and ignore all touch events
- return true;
- });
-
- // Setup the window that we are going to use
- mWindowLayoutParams = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 0, 0,
- WindowManager.LayoutParams.TYPE_SCREENSHOT,
- WindowManager.LayoutParams.FLAG_FULLSCREEN
- | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
- | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
- PixelFormat.TRANSLUCENT);
- mWindowLayoutParams.setTitle("ScreenshotAnimation");
- mWindowLayoutParams.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
- mWindowLayoutParams.setFitInsetsTypes(0 /* types */);
- mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
- mDisplay = mWindowManager.getDefaultDisplay();
- mDisplayMetrics = new DisplayMetrics();
- mDisplay.getRealMetrics(mDisplayMetrics);
-
- // Scale has to account for both sides of the bg
- mBgPadding = (float) resources.getDimensionPixelSize(
- R.dimen.global_screenshot_legacy_bg_padding);
- mBgPaddingScale = mBgPadding / mDisplayMetrics.widthPixels;
-
-
- // Setup the Camera shutter sound
- mCameraSound = new MediaActionSound();
- mCameraSound.load(MediaActionSound.SHUTTER_CLICK);
- }
-
- /**
- * Creates a new worker thread and saves the screenshot to the media store.
- */
- private void saveScreenshotInWorkerThread(
- Consumer<Uri> finisher,
- @Nullable GlobalScreenshot.ActionsReadyListener actionsReadyListener) {
- GlobalScreenshot.SaveImageInBackgroundData data =
- new GlobalScreenshot.SaveImageInBackgroundData();
- data.image = mScreenBitmap;
- data.finisher = finisher;
- data.mActionsReadyListener = actionsReadyListener;
- data.createDeleteAction = true;
- if (mSaveInBgTask != null) {
- mSaveInBgTask.cancel(false);
- }
-
- mNotificationsController.reset();
- mNotificationsController.setImage(mScreenBitmap);
- mNotificationsController.showSavingScreenshotNotification();
-
- mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data).execute();
- }
-
- /**
- * Takes a screenshot of the current display and shows an animation.
- */
- private void takeScreenshot(Consumer<Uri> finisher, boolean statusBarVisible,
- boolean navBarVisible, Rect crop) {
- int rot = mDisplay.getRotation();
- int width = crop.width();
- int height = crop.height();
-
- takeScreenshot(SurfaceControl.screenshot(crop, width, height, rot), finisher,
- statusBarVisible, navBarVisible, null);
- }
-
- private void takeScreenshot(Bitmap screenshot, Consumer<Uri> finisher, boolean statusBarVisible,
- boolean navBarVisible, Rect screenboundsOfBitmap) {
- mScreenBitmap = screenshot;
- if (mScreenBitmap == null) {
- mNotificationsController.notifyScreenshotError(
- R.string.screenshot_failed_to_capture_text);
- finisher.accept(null);
- return;
- }
-
- // Optimizations
- mScreenBitmap.setHasAlpha(false);
- mScreenBitmap.prepareToDraw();
-
- // Start the post-screenshot animation
- startAnimation(finisher, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels,
- statusBarVisible, navBarVisible, screenboundsOfBitmap);
- }
-
- void takeScreenshot(Consumer<Uri> finisher, boolean statusBarVisible, boolean navBarVisible) {
- mDisplay.getRealMetrics(mDisplayMetrics);
- takeScreenshot(finisher, statusBarVisible, navBarVisible,
- new Rect(0, 0, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
- }
-
- void handleImageAsScreenshot(Bitmap screenshot, Rect screenshotScreenBounds,
- Insets visibleInsets, int taskId, int userId, ComponentName topComponent,
- Consumer<Uri> finisher) {
- // TODO: use task Id, userId, topComponent for smart handler
- // TODO: use visibleInsets for animation
- takeScreenshot(screenshot, finisher, false, false, screenshotScreenBounds);
- }
-
- /**
- * Displays a screenshot selector
- */
- void takeScreenshotPartial(final Consumer<Uri> finisher, final boolean statusBarVisible,
- final boolean navBarVisible) {
- mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
- mScreenshotSelectorView.setOnTouchListener(new View.OnTouchListener() {
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- ScreenshotSelectorView view = (ScreenshotSelectorView) v;
- switch (event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- view.startSelection((int) event.getX(), (int) event.getY());
- return true;
- case MotionEvent.ACTION_MOVE:
- view.updateSelection((int) event.getX(), (int) event.getY());
- return true;
- case MotionEvent.ACTION_UP:
- view.setVisibility(View.GONE);
- mWindowManager.removeView(mScreenshotLayout);
- final Rect rect = view.getSelectionRect();
- if (rect != null) {
- if (rect.width() != 0 && rect.height() != 0) {
- // Need mScreenshotLayout to handle it after the view disappears
- mScreenshotLayout.post(() -> takeScreenshot(
- finisher, statusBarVisible, navBarVisible, rect));
- }
- }
-
- view.stopSelection();
- return true;
- }
-
- return false;
- }
- });
- mScreenshotLayout.post(() -> {
- mScreenshotSelectorView.setVisibility(View.VISIBLE);
- mScreenshotSelectorView.requestFocus();
- });
- }
-
- /**
- * Cancels screenshot request
- */
- void stopScreenshot() {
- // If the selector layer still presents on screen, we remove it and resets its state.
- if (mScreenshotSelectorView.getSelectionRect() != null) {
- mWindowManager.removeView(mScreenshotLayout);
- mScreenshotSelectorView.stopSelection();
- }
- }
-
- /**
- * Clears current screenshot
- */
- private void clearScreenshot() {
- if (mScreenshotLayout.isAttachedToWindow()) {
- mWindowManager.removeView(mScreenshotLayout);
- }
-
- // Clear any references to the bitmap
- mScreenBitmap = null;
- mScreenshotView.setImageBitmap(null);
- mBackgroundView.setVisibility(View.GONE);
- mScreenshotView.setVisibility(View.GONE);
- mScreenshotView.setLayerType(View.LAYER_TYPE_NONE, null);
- }
-
- /**
- * Starts the animation after taking the screenshot
- */
- private void startAnimation(final Consumer<Uri> finisher, int w, int h,
- boolean statusBarVisible, boolean navBarVisible, @Nullable Rect screenBoundsOfBitmap) {
- // If power save is on, show a toast so there is some visual indication that a screenshot
- // has been taken.
- PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
- if (powerManager.isPowerSaveMode()) {
- Toast.makeText(mContext, R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show();
- }
-
- // Add the view for the animation
- mScreenshotView.setImageBitmap(mScreenBitmap);
- mScreenshotLayout.requestFocus();
-
- // Setup the animation with the screenshot just taken
- if (mScreenshotAnimation != null) {
- if (mScreenshotAnimation.isStarted()) {
- mScreenshotAnimation.end();
- }
- mScreenshotAnimation.removeAllListeners();
- }
-
- mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
- ValueAnimator screenshotDropInAnim = screenBoundsOfBitmap != null
- ? createRectAnimation(screenBoundsOfBitmap) : createScreenshotDropInAnimation();
- ValueAnimator screenshotFadeOutAnim =
- createScreenshotDropOutAnimation(w, h, statusBarVisible, navBarVisible);
- mScreenshotAnimation = new AnimatorSet();
- mScreenshotAnimation.playSequentially(screenshotDropInAnim, screenshotFadeOutAnim);
- mScreenshotAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- // Save the screenshot once we have a bit of time now
- saveScreenshotInWorkerThread(finisher, new GlobalScreenshot.ActionsReadyListener() {
- @Override
- void onActionsReady(GlobalScreenshot.SavedImageData actionData) {
- if (actionData.uri == null) {
- mNotificationsController.notifyScreenshotError(
- R.string.screenshot_failed_to_capture_text);
- } else {
- mNotificationsController
- .showScreenshotActionsNotification(actionData);
- }
- }
- });
- clearScreenshot();
- }
- });
- mScreenshotLayout.post(() -> {
- // Play the shutter sound to notify that we've taken a screenshot
- mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
-
- mScreenshotView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
- mScreenshotView.buildLayer();
- mScreenshotAnimation.start();
- });
- }
-
- private ValueAnimator createScreenshotDropInAnimation() {
- final float flashPeakDurationPct = ((float) (SCREENSHOT_FLASH_TO_PEAK_DURATION)
- / SCREENSHOT_DROP_IN_DURATION);
- final float flashDurationPct = 2f * flashPeakDurationPct;
- final Interpolator flashAlphaInterpolator = new Interpolator() {
- @Override
- public float getInterpolation(float x) {
- // Flash the flash view in and out quickly
- if (x <= flashDurationPct) {
- return (float) Math.sin(Math.PI * (x / flashDurationPct));
- }
- return 0;
- }
- };
- final Interpolator scaleInterpolator = new Interpolator() {
- @Override
- public float getInterpolation(float x) {
- // We start scaling when the flash is at it's peak
- if (x < flashPeakDurationPct) {
- return 0;
- }
- return (x - flashDurationPct) / (1f - flashDurationPct);
- }
- };
-
- Resources r = mContext.getResources();
- if ((r.getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK)
- == Configuration.UI_MODE_NIGHT_YES) {
- mScreenshotView.getBackground().setTint(Color.BLACK);
- } else {
- mScreenshotView.getBackground().setTintList(null);
- }
-
- ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
- anim.setDuration(SCREENSHOT_DROP_IN_DURATION);
- anim.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mBackgroundView.setAlpha(0f);
- mBackgroundView.setVisibility(View.VISIBLE);
- mScreenshotView.setAlpha(0f);
- mScreenshotView.setTranslationX(0f);
- mScreenshotView.setTranslationY(0f);
- mScreenshotView.setScaleX(SCREENSHOT_SCALE + mBgPaddingScale);
- mScreenshotView.setScaleY(SCREENSHOT_SCALE + mBgPaddingScale);
- mScreenshotView.setVisibility(View.VISIBLE);
- mScreenshotFlash.setAlpha(0f);
- mScreenshotFlash.setVisibility(View.VISIBLE);
- }
-
- @Override
- public void onAnimationEnd(android.animation.Animator animation) {
- mScreenshotFlash.setVisibility(View.GONE);
- }
- });
- anim.addUpdateListener(new AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- float t = (Float) animation.getAnimatedValue();
- float scaleT = (SCREENSHOT_SCALE + mBgPaddingScale)
- - scaleInterpolator.getInterpolation(t)
- * (SCREENSHOT_SCALE - SCREENSHOT_DROP_IN_MIN_SCALE);
- mBackgroundView.setAlpha(scaleInterpolator.getInterpolation(t) * BACKGROUND_ALPHA);
- mScreenshotView.setAlpha(t);
- mScreenshotView.setScaleX(scaleT);
- mScreenshotView.setScaleY(scaleT);
- mScreenshotFlash.setAlpha(flashAlphaInterpolator.getInterpolation(t));
- }
- });
- return anim;
- }
-
- /**
- * If a bitmap was supplied to be used as the screenshot, animated from where that bitmap was
- * on screen, rather than using the whole screen.
- */
- private ValueAnimator createRectAnimation(Rect rect) {
- mScreenshotView.setAdjustViewBounds(true);
- mScreenshotView.setMaxHeight(rect.height());
- mScreenshotView.setMaxWidth(rect.width());
-
- final float flashPeakDurationPct = ((float) (SCREENSHOT_FLASH_TO_PEAK_DURATION)
- / SCREENSHOT_DROP_IN_DURATION);
- final float flashDurationPct = 2f * flashPeakDurationPct;
- final Interpolator scaleInterpolator = x -> {
- // We start scaling when the flash is at it's peak
- if (x < flashPeakDurationPct) {
- return 0;
- }
- return (x - flashDurationPct) / (1f - flashDurationPct);
- };
-
- ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
- anim.setDuration(SCREENSHOT_DROP_IN_DURATION);
- anim.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mBackgroundView.setAlpha(0f);
- mBackgroundView.setVisibility(View.VISIBLE);
- mScreenshotView.setAlpha(0f);
- mScreenshotView.setElevation(0f);
- mScreenshotView.setTranslationX(0f);
- mScreenshotView.setTranslationY(0f);
- mScreenshotView.setScaleX(SCREENSHOT_SCALE + mBgPaddingScale);
- mScreenshotView.setScaleY(SCREENSHOT_SCALE + mBgPaddingScale);
- mScreenshotView.setVisibility(View.VISIBLE);
- }
- });
- anim.addUpdateListener(animation -> {
- float t = (Float) animation.getAnimatedValue();
- float scaleT = (SCREENSHOT_SCALE + mBgPaddingScale)
- - scaleInterpolator.getInterpolation(t)
- * (SCREENSHOT_SCALE - SCREENSHOT_DROP_IN_MIN_SCALE);
- mBackgroundView.setAlpha(scaleInterpolator.getInterpolation(t) * BACKGROUND_ALPHA);
- mScreenshotView.setAlpha(t);
- });
- return anim;
- }
-
- private ValueAnimator createScreenshotDropOutAnimation(int w, int h, boolean statusBarVisible,
- boolean navBarVisible) {
- ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
- anim.setStartDelay(SCREENSHOT_DROP_OUT_DELAY);
- anim.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mBackgroundView.setVisibility(View.GONE);
- mScreenshotView.setVisibility(View.GONE);
- mScreenshotView.setLayerType(View.LAYER_TYPE_NONE, null);
- }
- });
-
- if (!statusBarVisible || !navBarVisible) {
- // There is no status bar/nav bar, so just fade the screenshot away in place
- anim.setDuration(SCREENSHOT_FAST_DROP_OUT_DURATION);
- anim.addUpdateListener(new AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- float t = (Float) animation.getAnimatedValue();
- float scaleT = (SCREENSHOT_DROP_IN_MIN_SCALE + mBgPaddingScale)
- - t * (SCREENSHOT_DROP_IN_MIN_SCALE
- - SCREENSHOT_FAST_DROP_OUT_MIN_SCALE);
- mBackgroundView.setAlpha((1f - t) * BACKGROUND_ALPHA);
- mScreenshotView.setAlpha(1f - t);
- mScreenshotView.setScaleX(scaleT);
- mScreenshotView.setScaleY(scaleT);
- }
- });
- } else {
- // In the case where there is a status bar, animate to the origin of the bar (top-left)
- final float scaleDurationPct = (float) SCREENSHOT_DROP_OUT_SCALE_DURATION
- / SCREENSHOT_DROP_OUT_DURATION;
- final Interpolator scaleInterpolator = new Interpolator() {
- @Override
- public float getInterpolation(float x) {
- if (x < scaleDurationPct) {
- // Decelerate, and scale the input accordingly
- return (float) (1f - Math.pow(1f - (x / scaleDurationPct), 2f));
- }
- return 1f;
- }
- };
-
- // Determine the bounds of how to scale
- float halfScreenWidth = (w - 2f * mBgPadding) / 2f;
- float halfScreenHeight = (h - 2f * mBgPadding) / 2f;
- final float offsetPct = SCREENSHOT_DROP_OUT_MIN_SCALE_OFFSET;
- final PointF finalPos = new PointF(
- -halfScreenWidth
- + (SCREENSHOT_DROP_OUT_MIN_SCALE + offsetPct) * halfScreenWidth,
- -halfScreenHeight
- + (SCREENSHOT_DROP_OUT_MIN_SCALE + offsetPct) * halfScreenHeight);
-
- // Animate the screenshot to the status bar
- anim.setDuration(SCREENSHOT_DROP_OUT_DURATION);
- anim.addUpdateListener(new AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- float t = (Float) animation.getAnimatedValue();
- float scaleT = (SCREENSHOT_DROP_IN_MIN_SCALE + mBgPaddingScale)
- - scaleInterpolator.getInterpolation(t)
- * (SCREENSHOT_DROP_IN_MIN_SCALE - SCREENSHOT_DROP_OUT_MIN_SCALE);
- mBackgroundView.setAlpha((1f - t) * BACKGROUND_ALPHA);
- mScreenshotView.setAlpha(1f - scaleInterpolator.getInterpolation(t));
- mScreenshotView.setScaleX(scaleT);
- mScreenshotView.setScaleY(scaleT);
- mScreenshotView.setTranslationX(t * finalPos.x);
- mScreenshotView.setTranslationY(t * finalPos.y);
- }
- });
- }
- return anim;
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
index 221174f70d66..10e6902f139e 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
@@ -88,7 +88,6 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
private final ScreenshotNotificationSmartActionsProvider mSmartActionsProvider;
private final String mScreenshotId;
private final boolean mSmartActionsEnabled;
- private final boolean mCreateDeleteAction;
private final Random mRandom = new Random();
SaveImageInBackgroundTask(Context context, GlobalScreenshot.SaveImageInBackgroundData data) {
@@ -102,8 +101,6 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
mImageFileName = String.format(SCREENSHOT_FILE_NAME_TEMPLATE, imageDate);
mScreenshotId = String.format(SCREENSHOT_ID_TEMPLATE, UUID.randomUUID());
- mCreateDeleteAction = data.createDeleteAction;
-
// Initialize screenshot notification smart actions provider.
mSmartActionsEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI,
SystemUiDeviceConfigFlags.ENABLE_SCREENSHOT_NOTIFICATION_SMART_ACTIONS, true);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
index fbcd6ba0ff47..e4e253e71fb3 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
@@ -148,43 +148,11 @@ public class ScreenshotNotificationsController {
}
/**
- * Shows a notification to inform the user that a screenshot is currently being saved.
- */
- public void showSavingScreenshotNotification() {
- final long now = System.currentTimeMillis();
-
- mPublicNotificationBuilder
- .setContentTitle(mResources.getString(R.string.screenshot_saving_title))
- .setSmallIcon(R.drawable.stat_notify_image)
- .setCategory(Notification.CATEGORY_PROGRESS)
- .setWhen(now)
- .setShowWhen(true)
- .setColor(mResources.getColor(
- com.android.internal.R.color.system_notification_accent_color));
- SystemUI.overrideNotificationAppName(mContext, mPublicNotificationBuilder, true);
-
- mNotificationBuilder
- .setContentTitle(mResources.getString(R.string.screenshot_saving_title))
- .setSmallIcon(R.drawable.stat_notify_image)
- .setWhen(now)
- .setShowWhen(true)
- .setColor(mResources.getColor(
- com.android.internal.R.color.system_notification_accent_color))
- .setStyle(mNotificationStyle)
- .setPublicVersion(mPublicNotificationBuilder.build());
- mNotificationBuilder.setFlag(Notification.FLAG_NO_CLEAR, true);
- SystemUI.overrideNotificationAppName(mContext, mNotificationBuilder, true);
-
- mNotificationManager.notify(SystemMessageProto.SystemMessage.NOTE_GLOBAL_SCREENSHOT,
- mNotificationBuilder.build());
- }
-
- /**
- * Shows a notification with the saved screenshot and actions that can be taken with it.
+ * Shows a silent notification with the saved screenshot and actions that can be taken with it.
*
* @param actionData SavedImageData struct with image URI and actions
*/
- public void showScreenshotActionsNotification(
+ public void showSilentScreenshotNotification(
GlobalScreenshot.SavedImageData actionData) {
mNotificationBuilder.addAction(actionData.shareAction);
mNotificationBuilder.addAction(actionData.editAction);
@@ -206,20 +174,34 @@ public class ScreenshotNotificationsController {
.setContentTitle(mResources.getString(R.string.screenshot_saved_title))
.setContentText(mResources.getString(R.string.screenshot_saved_text))
.setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0))
+ .setSmallIcon(R.drawable.stat_notify_image)
+ .setCategory(Notification.CATEGORY_PROGRESS)
.setWhen(now)
+ .setShowWhen(true)
.setAutoCancel(true)
.setColor(mContext.getColor(
- com.android.internal.R.color.system_notification_accent_color));
+ com.android.internal.R.color.system_notification_accent_color))
+ .setGroup("silent")
+ .setGroupAlertBehavior(Notification.GROUP_ALERT_SUMMARY);
mNotificationBuilder
.setContentTitle(mResources.getString(R.string.screenshot_saved_title))
.setContentText(mResources.getString(R.string.screenshot_saved_text))
.setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0))
+ .setSmallIcon(R.drawable.stat_notify_image)
+ .setCategory(Notification.CATEGORY_PROGRESS)
.setWhen(now)
+ .setShowWhen(true)
.setAutoCancel(true)
.setColor(mContext.getColor(
com.android.internal.R.color.system_notification_accent_color))
.setPublicVersion(mPublicNotificationBuilder.build())
- .setFlag(Notification.FLAG_NO_CLEAR, false);
+ .setStyle(mNotificationStyle)
+ .setFlag(Notification.FLAG_NO_CLEAR, false)
+ .setGroup("silent")
+ .setGroupAlertBehavior(Notification.GROUP_ALERT_SUMMARY);
+
+ SystemUI.overrideNotificationAppName(mContext, mPublicNotificationBuilder, true);
+ SystemUI.overrideNotificationAppName(mContext, mNotificationBuilder, true);
mNotificationManager.notify(SystemMessageProto.SystemMessage.NOTE_GLOBAL_SCREENSHOT,
mNotificationBuilder.build());
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
index 8322fe08d3c2..c05c8236def0 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
@@ -48,7 +48,6 @@ public class TakeScreenshotService extends Service {
private static final String TAG = "TakeScreenshotService";
private final GlobalScreenshot mScreenshot;
- private final GlobalScreenshotLegacy mScreenshotLegacy;
private final UserManager mUserManager;
private final UiEventLogger mUiEventLogger;
@@ -81,9 +80,6 @@ public class TakeScreenshotService extends Service {
return;
}
- // TODO: clean up once notifications flow is fully deprecated
- boolean useCornerFlow = true;
-
ScreenshotHelper.ScreenshotRequest screenshotRequest =
(ScreenshotHelper.ScreenshotRequest) msg.obj;
@@ -91,22 +87,10 @@ public class TakeScreenshotService extends Service {
switch (msg.what) {
case WindowManager.TAKE_SCREENSHOT_FULLSCREEN:
- if (useCornerFlow) {
- mScreenshot.takeScreenshot(uriConsumer, onComplete);
- } else {
- mScreenshotLegacy.takeScreenshot(
- uriConsumer, screenshotRequest.getHasStatusBar(),
- screenshotRequest.getHasNavBar());
- }
+ mScreenshot.takeScreenshot(uriConsumer, onComplete);
break;
case WindowManager.TAKE_SCREENSHOT_SELECTED_REGION:
- if (useCornerFlow) {
- mScreenshot.takeScreenshotPartial(uriConsumer, onComplete);
- } else {
- mScreenshotLegacy.takeScreenshotPartial(
- uriConsumer, screenshotRequest.getHasStatusBar(),
- screenshotRequest.getHasNavBar());
- }
+ mScreenshot.takeScreenshotPartial(uriConsumer, onComplete);
break;
case WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE:
Bitmap screenshot = BitmapUtil.bundleToHardwareBitmap(
@@ -116,13 +100,8 @@ public class TakeScreenshotService extends Service {
int taskId = screenshotRequest.getTaskId();
int userId = screenshotRequest.getUserId();
ComponentName topComponent = screenshotRequest.getTopComponent();
- if (useCornerFlow) {
- mScreenshot.handleImageAsScreenshot(screenshot, screenBounds, insets,
- taskId, userId, topComponent, uriConsumer, onComplete);
- } else {
- mScreenshotLegacy.handleImageAsScreenshot(screenshot, screenBounds, insets,
- taskId, userId, topComponent, uriConsumer);
- }
+ mScreenshot.handleImageAsScreenshot(screenshot, screenBounds, insets,
+ taskId, userId, topComponent, uriConsumer, onComplete);
break;
default:
Log.d(TAG, "Invalid screenshot option: " + msg.what);
@@ -131,11 +110,9 @@ public class TakeScreenshotService extends Service {
};
@Inject
- public TakeScreenshotService(GlobalScreenshot globalScreenshot,
- GlobalScreenshotLegacy globalScreenshotLegacy, UserManager userManager,
+ public TakeScreenshotService(GlobalScreenshot globalScreenshot, UserManager userManager,
UiEventLogger uiEventLogger) {
mScreenshot = globalScreenshot;
- mScreenshotLegacy = globalScreenshotLegacy;
mUserManager = userManager;
mUiEventLogger = uiEventLogger;
}
@@ -148,8 +125,6 @@ public class TakeScreenshotService extends Service {
@Override
public boolean onUnbind(Intent intent) {
if (mScreenshot != null) mScreenshot.stopScreenshot();
- // TODO remove once notifications flow is fully deprecated
- if (mScreenshotLegacy != null) mScreenshotLegacy.stopScreenshot();
return true;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java b/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
index 21810c0e7cf5..166934599aeb 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
@@ -253,7 +253,9 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
mSplitLayout.mSecondary = new Rect(mRotateSplitLayout.mSecondary);
mRotateSplitLayout = null;
}
- update(newConfig);
+ if (isSplitActive()) {
+ update(newConfig);
+ }
}
Handler getHandler() {
@@ -328,11 +330,6 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
mHandler.post(this::removeDivider);
}
- void onTasksReady() {
- mHandler.post(() -> update(mDisplayController.getDisplayContext(
- mContext.getDisplayId()).getResources().getConfiguration()));
- }
-
private void updateVisibility(final boolean visible) {
if (DEBUG) Slog.d(TAG, "Updating visibility " + mVisible + "->" + visible);
if (mVisible != visible) {
@@ -524,7 +521,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
void ensureMinimizedSplit() {
setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizable());
- if (!isDividerVisible()) {
+ if (mView != null && !isDividerVisible()) {
// Wasn't in split-mode yet, so enter now.
if (DEBUG) {
Slog.d(TAG, " entering split mode with minimized=true");
@@ -535,7 +532,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
void ensureNormalSplit() {
setHomeMinimized(false /* minimized */, mHomeStackResizable);
- if (!isDividerVisible()) {
+ if (mView != null && !isDividerVisible()) {
// Wasn't in split-mode, so enter now.
if (DEBUG) {
Slog.d(TAG, " enter split mode unminimized ");
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java b/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java
index db324822994b..44674df3b865 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java
@@ -113,8 +113,6 @@ class SplitScreenTaskOrganizer extends TaskOrganizer {
t.setColor(mSecondaryDim, new float[]{0f, 0f, 0f});
t.apply();
releaseTransaction(t);
-
- mDivider.onTasksReady();
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java b/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
index c8361c63e960..853a22505542 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
@@ -229,7 +229,11 @@ public class WindowManagerProxy {
// as a result, the above will not capture any tasks; yet, we need to clean-up the
// home task bounds.
List<ActivityManager.RunningTaskInfo> freeHomeAndRecents =
- TaskOrganizer.getRootTasks(Display.DEFAULT_DISPLAY, HOME_AND_RECENTS);
+ TaskOrganizer.getRootTasks(DEFAULT_DISPLAY, HOME_AND_RECENTS);
+ // Filter out the root split tasks
+ freeHomeAndRecents.removeIf(p -> p.token.equals(tiles.mSecondary.token)
+ || p.token.equals(tiles.mPrimary.token));
+
if (primaryChildren.isEmpty() && secondaryChildren.isEmpty()
&& freeHomeAndRecents.isEmpty()) {
return;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
index 6aef6b407f37..6a3302473e63 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
@@ -41,6 +41,8 @@ import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController;
+import java.util.concurrent.Executor;
+
/**
* A class that allows activities to be launched in a seamless way where the notification
* transforms nicely into the starting window.
@@ -59,6 +61,7 @@ public class ActivityLaunchAnimator {
private final float mWindowCornerRadius;
private final NotificationShadeWindowViewController mNotificationShadeWindowViewController;
private final NotificationShadeDepthController mDepthController;
+ private final Executor mMainExecutor;
private Callback mCallback;
private final Runnable mTimeoutRunnable = () -> {
setAnimationPending(false);
@@ -73,12 +76,14 @@ public class ActivityLaunchAnimator {
Callback callback,
NotificationPanelViewController notificationPanel,
NotificationShadeDepthController depthController,
- NotificationListContainer container) {
+ NotificationListContainer container,
+ Executor mainExecutor) {
mNotificationPanel = notificationPanel;
mNotificationContainer = container;
mDepthController = depthController;
mNotificationShadeWindowViewController = notificationShadeWindowViewController;
mCallback = callback;
+ mMainExecutor = mainExecutor;
mWindowCornerRadius = ScreenDecorationsUtils
.getWindowCornerRadius(mNotificationShadeWindowViewController.getView()
.getResources());
@@ -155,7 +160,7 @@ public class ActivityLaunchAnimator {
RemoteAnimationTarget[] remoteAnimationWallpaperTargets,
IRemoteAnimationFinishedCallback iRemoteAnimationFinishedCallback)
throws RemoteException {
- mSourceNotification.post(() -> {
+ mMainExecutor.execute(() -> {
RemoteAnimationTarget primary = getPrimaryRemoteAnimationTarget(
remoteAnimationTargets);
if (primary == null) {
@@ -191,8 +196,9 @@ public class ActivityLaunchAnimator {
}
}
int targetWidth = primary.sourceContainerBounds.width();
- int notificationHeight = mSourceNotification.getActualHeight()
- - mSourceNotification.getClipBottomAmount();
+ // If the notification panel is collapsed, the clip may be larger than the height.
+ int notificationHeight = Math.max(mSourceNotification.getActualHeight()
+ - mSourceNotification.getClipBottomAmount(), 0);
int notificationWidth = mSourceNotification.getWidth();
anim.setDuration(ANIMATION_DURATION);
anim.setInterpolator(Interpolators.LINEAR);
@@ -292,7 +298,7 @@ public class ActivityLaunchAnimator {
@Override
public void onAnimationCancelled() throws RemoteException {
- mSourceNotification.post(() -> {
+ mMainExecutor.execute(() -> {
setAnimationPending(false);
mCallback.onLaunchAnimationCancelled();
});
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 b11ed23c3aeb..684bf1958154 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
@@ -6539,7 +6539,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
return row.canViewBeDismissed();
}
if (v instanceof PeopleHubView) {
- return true;
+ return ((PeopleHubView) v).getCanSwipe();
}
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
index a1d898fb84b0..8f77a1d776e4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/PeopleHubView.kt
@@ -72,7 +72,7 @@ class PeopleHubView(context: Context, attrs: AttributeSet) :
}
}
- var canSwipe: Boolean = true
+ var canSwipe: Boolean = false
set(value) {
if (field != value) {
if (field) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 8954d98d0201..11022bbcb7ea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -628,6 +628,12 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
resetSecondaryHandle();
} else {
int deltaRotation = deltaRotation(mCurrentRotation, mStartingQuickSwitchRotation);
+ if (mStartingQuickSwitchRotation == -1 || deltaRotation == -1) {
+ // Curious if starting quickswitch can change between the if check and our delta
+ Log.d(TAG, "secondary nav delta rotation: " + deltaRotation
+ + " current: " + mCurrentRotation
+ + " starting: " + mStartingQuickSwitchRotation);
+ }
int height = 0;
int width = 0;
Rect dispSize = mWindowManager.getCurrentWindowMetrics().getBounds();
@@ -691,6 +697,8 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
dumpBarTransitions(pw, "mNavigationBarView", mNavigationBarView.getBarTransitions());
}
+ pw.print(" mStartingQuickSwitchRotation=" + mStartingQuickSwitchRotation);
+ pw.print(" mCurrentRotation=" + mCurrentRotation);
pw.print(" mNavigationBarView=");
if (mNavigationBarView == null) {
pw.println("null");
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 1bc42d1a169d..e2714af33247 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -1275,7 +1275,7 @@ public class StatusBar extends SystemUI implements DemoMode,
mActivityLaunchAnimator = new ActivityLaunchAnimator(
mNotificationShadeWindowViewController, this, mNotificationPanelViewController,
mNotificationShadeDepthControllerLazy.get(),
- (NotificationListContainer) mStackScroller);
+ (NotificationListContainer) mStackScroller, mContext.getMainExecutor());
// TODO: inject this.
mPresenter = new StatusBarNotificationPresenter(mContext, mNotificationPanelViewController,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
index 0db76ecf67fb..c929243085d6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
@@ -28,6 +28,7 @@ import android.graphics.PixelFormat;
import android.graphics.RecordingCanvas;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.util.Log;
import android.view.RenderNodeAnimator;
import android.view.View;
import android.view.ViewConfiguration;
@@ -220,7 +221,7 @@ public class KeyButtonRipple extends Drawable {
@Override
public void jumpToCurrentState() {
- cancelAnimations();
+ cancelAnimations("jumpToCurrentState");
}
@Override
@@ -234,6 +235,7 @@ public class KeyButtonRipple extends Drawable {
}
public void setPressed(boolean pressed) {
+ Log.d("b/63783866", "KeyButtonRipple.setPressed: pressed=" + pressed);
if (mDark != mLastDark && pressed) {
mRipplePaint = null;
mLastDark = mDark;
@@ -253,7 +255,8 @@ public class KeyButtonRipple extends Drawable {
mHandler.removeCallbacksAndMessages(null);
}
- private void cancelAnimations() {
+ private void cancelAnimations(String reason) {
+ Log.d("b/63783866", "KeyButtonRipple.cancelAnimations: reason=" + reason);
mVisible = false;
mTmpArray.addAll(mRunningAnimations);
int size = mTmpArray.size();
@@ -284,7 +287,7 @@ public class KeyButtonRipple extends Drawable {
}
private void enterSoftware() {
- cancelAnimations();
+ cancelAnimations("enterSoftware");
mVisible = true;
mGlowAlpha = getMaxGlowAlpha();
ObjectAnimator scaleAnimator = ObjectAnimator.ofFloat(this, "glowScale",
@@ -370,7 +373,8 @@ public class KeyButtonRipple extends Drawable {
}
private void enterHardware() {
- cancelAnimations();
+ Log.d("b/63783866", "enterHardware");
+ cancelAnimations("enterHardware");
mVisible = true;
mDrawingHardwareGlow = true;
setExtendStart(CanvasProperty.createFloat(getExtendSize() / 2));
@@ -422,6 +426,7 @@ public class KeyButtonRipple extends Drawable {
}
private void exitHardware() {
+ Log.d("b/63783866", "exitHardware");
mPaintProp = CanvasProperty.createPaint(getRipplePaint());
final RenderNodeAnimator opacityAnim = new RenderNodeAnimator(mPaintProp,
RenderNodeAnimator.PAINT_ALPHA, 0);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 0ca8ef009173..8d7ecd09e760 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -441,6 +441,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
@Override
public void abortCurrentGesture() {
+ Log.d("b/63783866", "KeyButtonView.abortCurrentGesture");
setPressed(false);
mRipple.abortDelayedRipple();
mGestureAborted = true;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 270f248e1a34..ce5bb0508c0a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -367,8 +367,14 @@ public class UserSwitcherController implements Dumpable {
int id;
if (record.isGuest && record.info == null) {
// No guest user. Create one.
- UserInfo guest = mUserManager.createGuest(
- mContext, mContext.getString(com.android.settingslib.R.string.guest_nickname));
+ UserInfo guest;
+ try {
+ guest = mUserManager.createGuest(mContext,
+ mContext.getString(com.android.settingslib.R.string.guest_nickname));
+ } catch (UserManager.UserOperationException e) {
+ Log.e(TAG, "Couldn't create guest user", e);
+ return;
+ }
if (guest == null) {
// Couldn't create guest, most likely because there already exists one, we just
// haven't reloaded the user list yet.
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
index 2973e0aedd43..bc2a55c8d5c4 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
@@ -16,13 +16,19 @@
package com.android.systemui.usb;
+import android.app.Activity;
import android.app.AlertDialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.IntentFilter;
import android.debug.IAdbManager;
+import android.hardware.usb.UsbManager;
import android.os.Bundle;
import android.os.IBinder;
import android.os.ServiceManager;
+import android.os.SystemProperties;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -33,13 +39,25 @@ import android.widget.CheckBox;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
public class UsbDebuggingActivity extends AlertActivity
implements DialogInterface.OnClickListener {
private static final String TAG = "UsbDebuggingActivity";
private CheckBox mAlwaysAllow;
+ private UsbDisconnectedReceiver mDisconnectedReceiver;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private String mKey;
+ private boolean mServiceNotified;
+
+ @Inject
+ public UsbDebuggingActivity(BroadcastDispatcher broadcastDispatcher) {
+ super();
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
@Override
public void onCreate(Bundle icicle) {
@@ -50,6 +68,10 @@ public class UsbDebuggingActivity extends AlertActivity
super.onCreate(icicle);
+ if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0) {
+ mDisconnectedReceiver = new UsbDisconnectedReceiver(this);
+ }
+
Intent intent = getIntent();
String fingerprints = intent.getStringExtra("fingerprints");
mKey = intent.getStringExtra("key");
@@ -83,10 +105,77 @@ public class UsbDebuggingActivity extends AlertActivity
super.onWindowAttributesChanged(params);
}
+ private class UsbDisconnectedReceiver extends BroadcastReceiver {
+ private final Activity mActivity;
+ UsbDisconnectedReceiver(Activity activity) {
+ mActivity = activity;
+ }
+
+ @Override
+ public void onReceive(Context content, Intent intent) {
+ String action = intent.getAction();
+ if (!UsbManager.ACTION_USB_STATE.equals(action)) {
+ return;
+ }
+ boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);
+ if (!connected) {
+ notifyService(false);
+ mActivity.finish();
+ }
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ if (mDisconnectedReceiver != null) {
+ IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
+ mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ if (mDisconnectedReceiver != null) {
+ mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
+ }
+ // If the ADB service has not yet been notified due to this dialog being closed in some
+ // other way then notify the service to deny the connection to ensure system_server sends
+ // a response to adbd.
+ if (!mServiceNotified) {
+ notifyService(false);
+ }
+ super.onStop();
+ }
+
@Override
public void onClick(DialogInterface dialog, int which) {
boolean allow = (which == AlertDialog.BUTTON_POSITIVE);
boolean alwaysAllow = allow && mAlwaysAllow.isChecked();
+ notifyService(allow, alwaysAllow);
+ finish();
+ }
+
+ /**
+ * Notifies the ADB service as to whether the current ADB request should be allowed; if the
+ * request is allowed it is only allowed for this session, and the user should be prompted again
+ * on subsequent requests from this key.
+ *
+ * @param allow whether the connection should be allowed for this session
+ */
+ private void notifyService(boolean allow) {
+ notifyService(allow, false);
+ }
+
+ /**
+ * Notifies the ADB service as to whether the current ADB request should be allowed, and if
+ * subsequent requests from this key should be allowed without user consent.
+ *
+ * @param allow whether the connection should be allowed
+ * @param alwaysAllow whether subsequent requests from this key should be allowed without user
+ * consent
+ */
+ private void notifyService(boolean allow, boolean alwaysAllow) {
try {
IBinder b = ServiceManager.getService(ADB_SERVICE);
IAdbManager service = IAdbManager.Stub.asInterface(b);
@@ -95,9 +184,9 @@ public class UsbDebuggingActivity extends AlertActivity
} else {
service.denyDebugging();
}
+ mServiceNotified = true;
} catch (Exception e) {
Log.e(TAG, "Unable to notify Usb service", e);
}
- finish();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
index 421424206370..4850a025b684 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
@@ -16,19 +16,47 @@
package com.android.systemui.usb;
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.debug.IAdbManager;
+import android.hardware.usb.UsbManager;
import android.os.Bundle;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemProperties;
+import android.util.Log;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
public class UsbDebuggingSecondaryUserActivity extends AlertActivity
implements DialogInterface.OnClickListener {
+ private static final String TAG = "UsbDebuggingSecondaryUserActivity";
+ private UsbDisconnectedReceiver mDisconnectedReceiver;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+
+ @Inject
+ public UsbDebuggingSecondaryUserActivity(BroadcastDispatcher broadcastDispatcher) {
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+ if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0) {
+ mDisconnectedReceiver = new UsbDisconnectedReceiver(this);
+ }
+
final AlertController.AlertParams ap = mAlertParams;
ap.mTitle = getString(R.string.usb_debugging_secondary_user_title);
ap.mMessage = getString(R.string.usb_debugging_secondary_user_message);
@@ -38,6 +66,48 @@ public class UsbDebuggingSecondaryUserActivity extends AlertActivity
setupAlert();
}
+ private class UsbDisconnectedReceiver extends BroadcastReceiver {
+ private final Activity mActivity;
+ UsbDisconnectedReceiver(Activity activity) {
+ mActivity = activity;
+ }
+
+ @Override
+ public void onReceive(Context content, Intent intent) {
+ String action = intent.getAction();
+ if (UsbManager.ACTION_USB_STATE.equals(action)) {
+ boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);
+ if (!connected) {
+ mActivity.finish();
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ if (mDisconnectedReceiver != null) {
+ IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
+ mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ if (mDisconnectedReceiver != null) {
+ mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
+ }
+ try {
+ IBinder b = ServiceManager.getService(ADB_SERVICE);
+ IAdbManager service = IAdbManager.Stub.asInterface(b);
+ service.denyDebugging();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to notify Usb service", e);
+ }
+ super.onStop();
+ }
+
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
diff --git a/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt b/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
index 318a6d727e5c..016f4de724b6 100644
--- a/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/animation/PhysicsAnimator.kt
@@ -644,6 +644,12 @@ class PhysicsAnimator<T> private constructor (target: T) {
it.onInternalAnimationEnd(
property, canceled, value, velocity, anim is FlingAnimation)
}
+ if (springAnimations[property] == anim) {
+ springAnimations.remove(property)
+ }
+ if (flingAnimations[property] == anim) {
+ flingAnimations.remove(property)
+ }
}
return anim
}
diff --git a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
index 32e3a7fc032e..7b114525adcd 100644
--- a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
+++ b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
@@ -19,11 +19,13 @@ package com.android.systemui.wm;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.util.Slog;
import android.util.SparseArray;
import android.view.IDisplayWindowInsetsController;
@@ -36,6 +38,7 @@ import android.view.WindowInsets;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
+import com.android.internal.view.IInputMethodManager;
import com.android.systemui.TransactionPool;
import com.android.systemui.dagger.qualifiers.Main;
@@ -352,6 +355,16 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
dispatchEndPositioning(mDisplayId, mCancelled, t);
if (mAnimationDirection == DIRECTION_HIDE && !mCancelled) {
t.hide(mImeSourceControl.getLeash());
+ final IInputMethodManager imms = getImms();
+ if (imms != null) {
+ try {
+ // Remove the IME surface to make the insets invisible for
+ // non-client controlled insets.
+ imms.removeImeSurface();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to remove IME surface.", e);
+ }
+ }
}
t.apply();
mTransactionPool.release(t);
@@ -382,9 +395,9 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
* Called when the IME position is starting to animate.
*
* @param hiddenTop The y position of the top of the IME surface when it is hidden.
- * @param shownTop The y position of the top of the IME surface when it is shown.
- * @param showing {@code true} when we are animating from hidden to shown, {@code false}
- * when animating from shown to hidden.
+ * @param shownTop The y position of the top of the IME surface when it is shown.
+ * @param showing {@code true} when we are animating from hidden to shown, {@code false}
+ * when animating from shown to hidden.
*/
default void onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
boolean showing, SurfaceControl.Transaction t) {}
@@ -406,4 +419,9 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
default void onImeEndPositioning(int displayId, boolean cancel,
SurfaceControl.Transaction t) {}
}
+
+ public IInputMethodManager getImms() {
+ return IInputMethodManager.Stub.asInterface(
+ ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 7bc453ac9aa1..023879926563 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -452,12 +452,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
}
@Test
- public void requiresAuthentication_whenEncryptedKeyguard_andBypass() {
- testStrongAuthExceptOnBouncer(
- KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT);
- }
-
- @Test
public void requiresAuthentication_whenTimeoutKeyguard_andBypass() {
testStrongAuthExceptOnBouncer(
KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT);
@@ -513,10 +507,20 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
@Test
public void testIgnoresAuth_whenLockdown() {
+ testIgnoresAuth(
+ KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+ }
+
+ @Test
+ public void testIgnoresAuth_whenEncrypted() {
+ testIgnoresAuth(
+ KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT);
+ }
+
+ private void testIgnoresAuth(int strongAuth) {
mKeyguardUpdateMonitor.dispatchStartedWakingUp();
mTestableLooper.processAllMessages();
- when(mStrongAuthTracker.getStrongAuthForUser(anyInt())).thenReturn(
- KeyguardUpdateMonitor.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN);
+ when(mStrongAuthTracker.getStrongAuthForUser(anyInt())).thenReturn(strongAuth);
mKeyguardUpdateMonitor.onKeyguardVisibilityChanged(true);
verify(mFaceManager, never()).authenticate(any(), any(), anyInt(), any(), any(), anyInt());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
index b2c35867e789..713aef9e8a91 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
@@ -35,6 +35,7 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.broadcast.FakeBroadcastDispatcher;
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.plugins.FalsingManager;
@@ -72,8 +73,8 @@ public abstract class SysuiTestCase {
public void SysuiSetup() throws Exception {
SystemUIFactory.createFromConfig(mContext);
mDependency = new TestableDependency(mContext);
- mFakeBroadcastDispatcher = new FakeBroadcastDispatcher(mContext, mock(Handler.class),
- mock(Looper.class), mock(DumpManager.class));
+ mFakeBroadcastDispatcher = new FakeBroadcastDispatcher(mContext, mock(Looper.class),
+ mock(DumpManager.class), mock(BroadcastDispatcherLogger.class));
mRealInstrumentation = InstrumentationRegistry.getInstrumentation();
Instrumentation inst = spy(mRealInstrumentation);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt b/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt
index 3357c5863d46..4ed284ede634 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt
@@ -18,6 +18,7 @@ package com.android.systemui.broadcast
import android.content.BroadcastReceiver
import android.content.Context
+import android.content.Intent
import android.content.IntentFilter
import android.os.Handler
import android.os.Looper
@@ -27,6 +28,7 @@ import android.test.suitebuilder.annotation.SmallTest
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import com.android.systemui.SysuiTestCase
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger
import com.android.systemui.dump.DumpManager
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.time.FakeSystemClock
@@ -76,6 +78,8 @@ class BroadcastDispatcherTest : SysuiTestCase() {
private lateinit var intentFilterOther: IntentFilter
@Mock
private lateinit var mockHandler: Handler
+ @Mock
+ private lateinit var logger: BroadcastDispatcherLogger
private lateinit var executor: Executor
@@ -93,9 +97,9 @@ class BroadcastDispatcherTest : SysuiTestCase() {
broadcastDispatcher = TestBroadcastDispatcher(
mockContext,
- Handler(testableLooper.looper),
testableLooper.looper,
mock(DumpManager::class.java),
+ logger,
mapOf(0 to mockUBRUser0, 1 to mockUBRUser1))
// These should be valid filters
@@ -173,7 +177,12 @@ class BroadcastDispatcherTest : SysuiTestCase() {
@Test
fun testRegisterCurrentAsActualUser() {
- setUserMock(mockContext, user1)
+ val intent = Intent(Intent.ACTION_USER_SWITCHED).apply {
+ putExtra(Intent.EXTRA_USER_HANDLE, user1.identifier)
+ }
+ broadcastDispatcher.onReceive(mockContext, intent)
+ testableLooper.processAllMessages()
+
broadcastDispatcher.registerReceiverWithHandler(broadcastReceiver, intentFilter,
mockHandler, UserHandle.CURRENT)
@@ -236,11 +245,11 @@ class BroadcastDispatcherTest : SysuiTestCase() {
private class TestBroadcastDispatcher(
context: Context,
- mainHandler: Handler,
bgLooper: Looper,
dumpManager: DumpManager,
+ logger: BroadcastDispatcherLogger,
var mockUBRMap: Map<Int, UserBroadcastDispatcher>
- ) : BroadcastDispatcher(context, mainHandler, bgLooper, dumpManager) {
+ ) : BroadcastDispatcher(context, bgLooper, dumpManager, logger) {
override fun createUBRForUser(userId: Int): UserBroadcastDispatcher {
return mockUBRMap.getOrDefault(userId, mock(UserBroadcastDispatcher::class.java))
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt b/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt
index 9a5773a7a3b4..09a091689a23 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt
@@ -24,15 +24,16 @@ import android.os.UserHandle
import android.util.ArraySet
import android.util.Log
import com.android.systemui.SysuiTestableContext
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger
import com.android.systemui.dump.DumpManager
import java.util.concurrent.Executor
class FakeBroadcastDispatcher(
context: SysuiTestableContext,
- handler: Handler,
looper: Looper,
- dumpManager: DumpManager
-) : BroadcastDispatcher(context, handler, looper, dumpManager) {
+ dumpManager: DumpManager,
+ logger: BroadcastDispatcherLogger
+) : BroadcastDispatcher(context, looper, dumpManager, logger) {
private val registeredReceivers = ArraySet<BroadcastReceiver>()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/broadcast/UserBroadcastDispatcherTest.kt b/packages/SystemUI/tests/src/com/android/systemui/broadcast/UserBroadcastDispatcherTest.kt
index 847e442f1a49..443357694f4d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/broadcast/UserBroadcastDispatcherTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/broadcast/UserBroadcastDispatcherTest.kt
@@ -26,6 +26,7 @@ import android.test.suitebuilder.annotation.SmallTest
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import com.android.systemui.SysuiTestCase
+import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.time.FakeSystemClock
import junit.framework.Assert.assertEquals
@@ -40,6 +41,7 @@ import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.eq
import org.mockito.Captor
import org.mockito.Mock
+import org.mockito.Mockito
import org.mockito.Mockito.anyString
import org.mockito.Mockito.atLeastOnce
import org.mockito.Mockito.never
@@ -62,6 +64,8 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
private val USER_HANDLE = UserHandle.of(USER_ID)
fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
+ fun <T> any(): T = Mockito.any()
+ fun <T> eq(v: T) = Mockito.eq(v) ?: v
}
@Mock
@@ -72,6 +76,8 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
private lateinit var mockContext: Context
@Mock
private lateinit var mPendingResult: BroadcastReceiver.PendingResult
+ @Mock
+ private lateinit var logger: BroadcastDispatcherLogger
@Captor
private lateinit var argumentCaptor: ArgumentCaptor<IntentFilter>
@@ -91,7 +97,7 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
fakeExecutor = FakeExecutor(FakeSystemClock())
userBroadcastDispatcher = UserBroadcastDispatcher(
- mockContext, USER_ID, testableLooper.looper)
+ mockContext, USER_ID, testableLooper.looper, logger)
userBroadcastDispatcher.pendingResult = mPendingResult
}
@@ -106,6 +112,13 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
}
@Test
+ fun testNotRegisteredOnStart_logging() {
+ testableLooper.processAllMessages()
+
+ verify(logger, never()).logContextReceiverRegistered(anyInt(), any())
+ }
+
+ @Test
fun testSingleReceiverRegistered() {
intentFilter = IntentFilter(ACTION_1)
@@ -126,6 +139,18 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
}
@Test
+ fun testSingleReceiverRegistered_logging() {
+ intentFilter = IntentFilter(ACTION_1)
+
+ userBroadcastDispatcher.registerReceiver(
+ ReceiverData(broadcastReceiver, intentFilter, fakeExecutor, USER_HANDLE))
+ testableLooper.processAllMessages()
+
+ verify(logger).logReceiverRegistered(USER_HANDLE.identifier, broadcastReceiver)
+ verify(logger).logContextReceiverRegistered(eq(USER_HANDLE.identifier), any())
+ }
+
+ @Test
fun testSingleReceiverUnregistered() {
intentFilter = IntentFilter(ACTION_1)
@@ -145,6 +170,21 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
}
@Test
+ fun testSingleReceiverUnregistered_logger() {
+ intentFilter = IntentFilter(ACTION_1)
+
+ userBroadcastDispatcher.registerReceiver(
+ ReceiverData(broadcastReceiver, intentFilter, fakeExecutor, USER_HANDLE))
+ testableLooper.processAllMessages()
+
+ userBroadcastDispatcher.unregisterReceiver(broadcastReceiver)
+ testableLooper.processAllMessages()
+
+ verify(logger).logReceiverUnregistered(USER_HANDLE.identifier, broadcastReceiver)
+ verify(logger).logContextReceiverUnregistered(USER_HANDLE.identifier)
+ }
+
+ @Test
fun testFilterHasAllActionsAndCategories_twoReceivers() {
intentFilter = IntentFilter(ACTION_1)
intentFilterOther = IntentFilter(ACTION_2).apply {
@@ -196,6 +236,30 @@ class UserBroadcastDispatcherTest : SysuiTestCase() {
}
@Test
+ fun testDispatch_logger() {
+ intentFilter = IntentFilter(ACTION_1)
+ intentFilterOther = IntentFilter(ACTION_2)
+
+ userBroadcastDispatcher.registerReceiver(
+ ReceiverData(broadcastReceiver, intentFilter, fakeExecutor, USER_HANDLE))
+ userBroadcastDispatcher.registerReceiver(
+ ReceiverData(broadcastReceiverOther, intentFilterOther, fakeExecutor, USER_HANDLE))
+
+ val intent = Intent(ACTION_2)
+
+ userBroadcastDispatcher.onReceive(mockContext, intent)
+ testableLooper.processAllMessages()
+ fakeExecutor.runAllReady()
+
+ val captor = ArgumentCaptor.forClass(Int::class.java)
+ verify(logger)
+ .logBroadcastReceived(captor.capture(), eq(USER_HANDLE.identifier), eq(intent))
+ verify(logger).logBroadcastDispatched(captor.value, ACTION_2, broadcastReceiverOther)
+ verify(logger, never())
+ .logBroadcastDispatched(eq(captor.value), any(), eq(broadcastReceiver))
+ }
+
+ @Test
fun testDispatchToCorrectReceiver_differentFiltersSameReceiver() {
intentFilter = IntentFilter(ACTION_1)
intentFilterOther = IntentFilter(ACTION_2)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
index 17022da3ecde..1ca2f02db1bd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java
@@ -537,7 +537,7 @@ public class BubbleDataTest extends SysuiTestCase {
// Verify the selection was cleared.
verifyUpdateReceived();
assertThat(mBubbleData.isExpanded()).isFalse();
- assertSelectionCleared();
+ assertThat(mBubbleData.getSelectedBubble()).isNull();
}
// EXPANDED / ADD / UPDATE
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
index 3a3140f2ff53..6fcf6e37572b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
@@ -51,6 +51,7 @@ import org.mockito.Mockito.`when` as whenever
import org.mockito.junit.MockitoJUnit
private const val KEY = "TEST_KEY"
+private const val KEY_OLD = "TEST_KEY_OLD"
private const val PACKAGE = "PKG"
private const val SESSION_KEY = "SESSION_KEY"
private const val SESSION_ARTIST = "SESSION_ARTIST"
@@ -69,7 +70,6 @@ public class MediaDeviceManagerTest : SysuiTestCase() {
@Mock private lateinit var lmmFactory: LocalMediaManagerFactory
@Mock private lateinit var lmm: LocalMediaManager
@Mock private lateinit var mr2: MediaRouter2Manager
- @Mock private lateinit var featureFlag: MediaFeatureFlag
private lateinit var fakeExecutor: FakeExecutor
@Mock private lateinit var listener: MediaDeviceManager.Listener
@Mock private lateinit var device: MediaDevice
@@ -85,8 +85,7 @@ public class MediaDeviceManagerTest : SysuiTestCase() {
@Before
fun setUp() {
fakeExecutor = FakeExecutor(FakeSystemClock())
- manager = MediaDeviceManager(context, lmmFactory, mr2, featureFlag, fakeExecutor,
- mediaDataManager)
+ manager = MediaDeviceManager(context, lmmFactory, mr2, fakeExecutor, mediaDataManager)
manager.addListener(listener)
// Configure mocks.
@@ -95,7 +94,6 @@ public class MediaDeviceManagerTest : SysuiTestCase() {
whenever(lmmFactory.create(PACKAGE)).thenReturn(lmm)
whenever(lmm.getCurrentConnectedDevice()).thenReturn(device)
whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(route)
- whenever(featureFlag.enabled).thenReturn(true)
// Create a media sesssion and notification for testing.
metadataBuilder = MediaMetadata.Builder().apply {
@@ -132,23 +130,74 @@ public class MediaDeviceManagerTest : SysuiTestCase() {
}
@Test
- fun addNotification() {
+ fun loadMediaData() {
manager.onMediaDataLoaded(KEY, null, mediaData)
verify(lmmFactory).create(PACKAGE)
}
@Test
- fun featureDisabled() {
- whenever(featureFlag.enabled).thenReturn(false)
+ fun loadAndRemoveMediaData() {
manager.onMediaDataLoaded(KEY, null, mediaData)
- verify(lmmFactory, never()).create(PACKAGE)
+ manager.onMediaDataRemoved(KEY)
+ verify(lmm).unregisterCallback(any())
}
@Test
- fun addAndRemoveNotification() {
- manager.onMediaDataLoaded(KEY, null, mediaData)
- manager.onMediaDataRemoved(KEY)
+ fun loadMediaDataWithNullToken() {
+ manager.onMediaDataLoaded(KEY, null, mediaData.copy(token = null))
+ fakeExecutor.runAllReady()
+ val data = captureDeviceData(KEY)
+ assertThat(data.enabled).isTrue()
+ assertThat(data.name).isEqualTo(DEVICE_NAME)
+ }
+
+ @Test
+ fun loadWithNewKey() {
+ // GIVEN that media data has been loaded with an old key
+ manager.onMediaDataLoaded(KEY_OLD, null, mediaData)
+ reset(listener)
+ // WHEN data is loaded with a new key
+ manager.onMediaDataLoaded(KEY, KEY_OLD, mediaData)
+ // THEN the listener for the old key should removed.
verify(lmm).unregisterCallback(any())
+ // AND a new device event emitted
+ val data = captureDeviceData(KEY)
+ assertThat(data.enabled).isTrue()
+ assertThat(data.name).isEqualTo(DEVICE_NAME)
+ }
+
+ @Test
+ fun newKeySameAsOldKey() {
+ // GIVEN that media data has been loaded
+ manager.onMediaDataLoaded(KEY, null, mediaData)
+ reset(listener)
+ // WHEN the new key is the same as the old key
+ manager.onMediaDataLoaded(KEY, KEY, mediaData)
+ // THEN no event should be emitted
+ verify(listener, never()).onMediaDeviceChanged(eq(KEY), any())
+ }
+
+ @Test
+ fun unknownOldKey() {
+ manager.onMediaDataLoaded(KEY, "unknown", mediaData)
+ verify(listener).onMediaDeviceChanged(eq(KEY), any())
+ }
+
+ @Test
+ fun updateToSessionTokenWithNullRoute() {
+ // GIVEN that media data has been loaded with a null token
+ manager.onMediaDataLoaded(KEY, null, mediaData.copy(token = null))
+ // WHEN media data is loaded with a different token
+ // AND that token results in a null route
+ reset(listener)
+ whenever(mr2.getRoutingSessionForMediaController(any())).thenReturn(null)
+ manager.onMediaDataLoaded(KEY, null, mediaData)
+ // THEN the device should be disabled
+ fakeExecutor.runAllReady()
+ val data = captureDeviceData(KEY)
+ assertThat(data.enabled).isFalse()
+ assertThat(data.name).isNull()
+ assertThat(data.icon).isNull()
}
@Test
@@ -164,6 +213,15 @@ public class MediaDeviceManagerTest : SysuiTestCase() {
}
@Test
+ fun removeListener() {
+ // WHEN a listener is removed
+ manager.removeListener(listener)
+ // THEN it doesn't receive device events
+ manager.onMediaDataLoaded(KEY, null, mediaData)
+ verify(listener, never()).onMediaDeviceChanged(eq(KEY), any())
+ }
+
+ @Test
fun deviceListUpdate() {
manager.onMediaDataLoaded(KEY, null, mediaData)
val deviceCallback = captureCallback()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
index 24e9bd837d5d..c8ef9fbf06e5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt
@@ -40,6 +40,7 @@ import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
import org.mockito.Mock
import org.mockito.Mockito.any
+import org.mockito.Mockito.eq
import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.times
@@ -204,7 +205,7 @@ public class SeekBarViewModelTest : SysuiTestCase() {
@Test
fun updateElapsedTime() {
- // GIVEN that the PlaybackState contins the current position
+ // GIVEN that the PlaybackState contains the current position
val position = 200L
val state = PlaybackState.Builder().run {
setState(PlaybackState.STATE_PLAYING, position, 1f)
@@ -246,7 +247,7 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
- fun handleSeek() {
+ fun onSeek() {
whenever(mockController.getTransportControls()).thenReturn(mockTransport)
viewModel.updateController(mockController)
// WHEN user input is dispatched
@@ -258,19 +259,73 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
- fun handleProgressChangedUser() {
+ fun onSeekWithFalse() {
whenever(mockController.getTransportControls()).thenReturn(mockTransport)
viewModel.updateController(mockController)
+ // WHEN a false is received during the seek gesture
+ val pos = 42L
+ with(viewModel) {
+ onSeekStarting()
+ onSeekFalse()
+ onSeek(pos)
+ }
+ fakeExecutor.runAllReady()
+ // THEN the seek is rejected and the transport never receives seekTo
+ verify(mockTransport, never()).seekTo(pos)
+ }
+
+ @Test
+ fun onSeekProgress() {
+ val pos = 42L
+ with(viewModel) {
+ onSeekStarting()
+ onSeekProgress(pos)
+ }
+ fakeExecutor.runAllReady()
+ // THEN then elapsed time should be updated
+ assertThat(viewModel.progress.value!!.elapsedTime).isEqualTo(pos)
+ }
+
+ @Test
+ fun onSeekProgressWithSeekStarting() {
+ val pos = 42L
+ with(viewModel) {
+ onSeekProgress(pos)
+ }
+ fakeExecutor.runAllReady()
+ // THEN then elapsed time should not be updated
+ assertThat(viewModel.progress.value!!.elapsedTime).isNull()
+ }
+
+ @Test
+ fun onProgressChangedFromUser() {
// WHEN user starts dragging the seek bar
val pos = 42
- viewModel.seekBarListener.onProgressChanged(SeekBar(context), pos, true)
+ val bar = SeekBar(context)
+ with(viewModel.seekBarListener) {
+ onStartTrackingTouch(bar)
+ onProgressChanged(bar, pos, true)
+ }
fakeExecutor.runAllReady()
- // THEN transport controls should be used
- verify(mockTransport).seekTo(pos.toLong())
+ // THEN then elapsed time should be updated
+ assertThat(viewModel.progress.value!!.elapsedTime).isEqualTo(pos)
+ }
+
+ @Test
+ fun onProgressChangedFromUserWithoutStartTrackingTouch() {
+ // WHEN user starts dragging the seek bar
+ val pos = 42
+ val bar = SeekBar(context)
+ with(viewModel.seekBarListener) {
+ onProgressChanged(bar, pos, true)
+ }
+ fakeExecutor.runAllReady()
+ // THEN then elapsed time should not be updated
+ assertThat(viewModel.progress.value!!.elapsedTime).isNull()
}
@Test
- fun handleProgressChangedOther() {
+ fun onProgressChangedNotFromUser() {
whenever(mockController.getTransportControls()).thenReturn(mockTransport)
viewModel.updateController(mockController)
// WHEN user starts dragging the seek bar
@@ -282,7 +337,7 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
- fun handleStartTrackingTouch() {
+ fun onStartTrackingTouch() {
whenever(mockController.getTransportControls()).thenReturn(mockTransport)
viewModel.updateController(mockController)
// WHEN user starts dragging the seek bar
@@ -297,7 +352,7 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
- fun handleStopTrackingTouch() {
+ fun onStopTrackingTouch() {
whenever(mockController.getTransportControls()).thenReturn(mockTransport)
viewModel.updateController(mockController)
// WHEN user ends drag
@@ -312,6 +367,26 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
+ fun onStopTrackingTouchAfterProgress() {
+ whenever(mockController.getTransportControls()).thenReturn(mockTransport)
+ viewModel.updateController(mockController)
+ // WHEN user starts dragging the seek bar
+ val pos = 42
+ val progPos = 84
+ val bar = SeekBar(context).apply {
+ progress = pos
+ }
+ with(viewModel.seekBarListener) {
+ onStartTrackingTouch(bar)
+ onProgressChanged(bar, progPos, true)
+ onStopTrackingTouch(bar)
+ }
+ fakeExecutor.runAllReady()
+ // THEN then elapsed time should be updated
+ verify(mockTransport).seekTo(eq(pos.toLong()))
+ }
+
+ @Test
fun queuePollTaskWhenPlaying() {
// GIVEN that the track is playing
val state = PlaybackState.Builder().run {
@@ -369,7 +444,7 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
// AND the playback state is playing
val state = PlaybackState.Builder().run {
- setState(PlaybackState.STATE_STOPPED, 200L, 1f)
+ setState(PlaybackState.STATE_PLAYING, 200L, 1f)
build()
}
whenever(mockController.getPlaybackState()).thenReturn(state)
@@ -398,6 +473,90 @@ public class SeekBarViewModelTest : SysuiTestCase() {
}
@Test
+ fun noQueuePollTaskWhenSeeking() {
+ // GIVEN listening
+ viewModel.listening = true
+ // AND the playback state is playing
+ val state = PlaybackState.Builder().run {
+ setState(PlaybackState.STATE_PLAYING, 200L, 1f)
+ build()
+ }
+ whenever(mockController.getPlaybackState()).thenReturn(state)
+ viewModel.updateController(mockController)
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // WHEN seek starts
+ viewModel.onSeekStarting()
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // THEN an update task is not queued because we don't want it fighting with the user when
+ // they are trying to move the thumb.
+ assertThat(fakeExecutor.numPending()).isEqualTo(0)
+ }
+
+ @Test
+ fun queuePollTaskWhenDoneSeekingWithFalse() {
+ // GIVEN listening
+ viewModel.listening = true
+ // AND the playback state is playing
+ val state = PlaybackState.Builder().run {
+ setState(PlaybackState.STATE_PLAYING, 200L, 1f)
+ build()
+ }
+ whenever(mockController.getPlaybackState()).thenReturn(state)
+ viewModel.updateController(mockController)
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // WHEN seek finishes after a false
+ with(viewModel) {
+ onSeekStarting()
+ onSeekFalse()
+ onSeek(42L)
+ }
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // THEN an update task is queued because the gesture was ignored and progress was restored.
+ assertThat(fakeExecutor.numPending()).isEqualTo(1)
+ }
+
+ @Test
+ fun noQueuePollTaskWhenDoneSeeking() {
+ // GIVEN listening
+ viewModel.listening = true
+ // AND the playback state is playing
+ val state = PlaybackState.Builder().run {
+ setState(PlaybackState.STATE_PLAYING, 200L, 1f)
+ build()
+ }
+ whenever(mockController.getPlaybackState()).thenReturn(state)
+ viewModel.updateController(mockController)
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // WHEN seek finishes after a false
+ with(viewModel) {
+ onSeekStarting()
+ onSeek(42L)
+ }
+ with(fakeExecutor) {
+ advanceClockToNext()
+ runAllReady()
+ }
+ // THEN no update task is queued because we are waiting for an updated playback state to be
+ // returned in response to the seek.
+ assertThat(fakeExecutor.numPending()).isEqualTo(0)
+ }
+
+ @Test
fun startListeningQueuesPollTask() {
// GIVEN not listening
viewModel.listening = false
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
index cdef49d6c94d..2fa6cf02d8b4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
@@ -36,6 +36,8 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain
import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController;
+import com.android.systemui.util.concurrency.FakeExecutor;
+import com.android.systemui.util.time.FakeSystemClock;
import org.junit.Assert;
import org.junit.Before;
@@ -51,6 +53,7 @@ import org.mockito.junit.MockitoRule;
@TestableLooper.RunWithLooper
public class ActivityLaunchAnimatorTest extends SysuiTestCase {
+ private final FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock());
private ActivityLaunchAnimator mLaunchAnimator;
@Mock
private ActivityLaunchAnimator.Callback mCallback;
@@ -80,8 +83,8 @@ public class ActivityLaunchAnimatorTest extends SysuiTestCase {
mCallback,
mNotificationPanelViewController,
mNotificationShadeDepthController,
- mNotificationContainer);
-
+ mNotificationContainer,
+ mExecutor);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt
index 661fad2d6d5c..bd596800e86d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt
@@ -38,6 +38,7 @@ import org.mockito.MockitoAnnotations
@TestableLooper.RunWithLooper
@RunWith(AndroidTestingRunner::class)
@SmallTest
+@Ignore("Blocking presubmits - investigating in b/158697054")
class PhysicsAnimatorTest : SysuiTestCase() {
private lateinit var viewGroup: ViewGroup
private lateinit var testView: View
diff --git a/packages/Tethering/TEST_MAPPING b/packages/Tethering/TEST_MAPPING
index 73254cdc79a9..5617b0c13c1c 100644
--- a/packages/Tethering/TEST_MAPPING
+++ b/packages/Tethering/TEST_MAPPING
@@ -1,7 +1,12 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "TetheringTests"
}
+ ],
+ "postsubmit": [
+ {
+ "name": "TetheringIntegrationTests"
+ }
]
}
diff --git a/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java b/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java
index fd6f171487a9..f14def6a3a02 100644
--- a/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java
+++ b/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java
@@ -37,8 +37,8 @@ public final class TetheringConstants {
private TetheringConstants() { }
/**
- * Extra used for communicating with the TetherService. Includes the type of tethering to
- * enable if any.
+ * Extra used for communicating with the TetherService and TetherProvisioningActivity.
+ * Includes the type of tethering to enable if any.
*/
public static final String EXTRA_ADD_TETHER_TYPE = "extraAddTetherType";
/**
@@ -56,8 +56,38 @@ public final class TetheringConstants {
*/
public static final String EXTRA_RUN_PROVISION = "extraRunProvision";
/**
- * Extra used for communicating with the TetherService. Contains the {@link ResultReceiver}
- * which will receive provisioning results. Can be left empty.
+ * Extra used for communicating with the TetherService and TetherProvisioningActivity.
+ * Contains the {@link ResultReceiver} which will receive provisioning results.
+ * Can not be empty.
*/
public static final String EXTRA_PROVISION_CALLBACK = "extraProvisionCallback";
+
+ /**
+ * Extra used for communicating with the TetherService and TetherProvisioningActivity.
+ * Contains the subId of current active cellular upstream.
+ * @hide
+ */
+ public static final String EXTRA_TETHER_SUBID = "android.net.extra.TETHER_SUBID";
+
+ /**
+ * Extra used for telling TetherProvisioningActivity the entitlement package name and class
+ * name to start UI entitlement check.
+ * @hide
+ */
+ public static final String EXTRA_TETHER_UI_PROVISIONING_APP_NAME =
+ "android.net.extra.TETHER_UI_PROVISIONING_APP_NAME";
+
+ /**
+ * Extra used for telling TetherService the intent action to start silent entitlement check.
+ * @hide
+ */
+ public static final String EXTRA_TETHER_SILENT_PROVISIONING_ACTION =
+ "android.net.extra.TETHER_SILENT_PROVISIONING_ACTION";
+
+ /**
+ * Extra used for TetherService to receive the response of provisioning check.
+ * @hide
+ */
+ public static final String EXTRA_TETHER_PROVISIONING_RESPONSE =
+ "android.net.extra.TETHER_PROVISIONING_RESPONSE";
}
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java b/packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java
index 3c6e8d88ed13..9dace709d734 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java
@@ -19,6 +19,10 @@ package com.android.networkstack.tethering;
import static android.net.TetheringConstants.EXTRA_ADD_TETHER_TYPE;
import static android.net.TetheringConstants.EXTRA_PROVISION_CALLBACK;
import static android.net.TetheringConstants.EXTRA_RUN_PROVISION;
+import static android.net.TetheringConstants.EXTRA_TETHER_PROVISIONING_RESPONSE;
+import static android.net.TetheringConstants.EXTRA_TETHER_SILENT_PROVISIONING_ACTION;
+import static android.net.TetheringConstants.EXTRA_TETHER_SUBID;
+import static android.net.TetheringConstants.EXTRA_TETHER_UI_PROVISIONING_APP_NAME;
import static android.net.TetheringManager.TETHERING_BLUETOOTH;
import static android.net.TetheringManager.TETHERING_ETHERNET;
import static android.net.TetheringManager.TETHERING_INVALID;
@@ -69,7 +73,6 @@ public class EntitlementManager {
protected static final String DISABLE_PROVISIONING_SYSPROP_KEY = "net.tethering.noprovisioning";
private static final String ACTION_PROVISIONING_ALARM =
"com.android.networkstack.tethering.PROVISIONING_RECHECK_ALARM";
- private static final String EXTRA_SUBID = "subId";
private final ComponentName mSilentProvisioningService;
private static final int MS_PER_HOUR = 60 * 60 * 1000;
@@ -197,9 +200,9 @@ public class EntitlementManager {
// till upstream change to cellular.
if (mUsingCellularAsUpstream) {
if (showProvisioningUi) {
- runUiTetherProvisioning(downstreamType, config.activeDataSubId);
+ runUiTetherProvisioning(downstreamType, config);
} else {
- runSilentTetherProvisioning(downstreamType, config.activeDataSubId);
+ runSilentTetherProvisioning(downstreamType, config);
}
mNeedReRunProvisioningUi = false;
} else {
@@ -262,9 +265,9 @@ public class EntitlementManager {
if (mCurrentEntitlementResults.indexOfKey(downstream) < 0) {
if (mNeedReRunProvisioningUi) {
mNeedReRunProvisioningUi = false;
- runUiTetherProvisioning(downstream, config.activeDataSubId);
+ runUiTetherProvisioning(downstream, config);
} else {
- runSilentTetherProvisioning(downstream, config.activeDataSubId);
+ runSilentTetherProvisioning(downstream, config);
}
}
}
@@ -361,7 +364,7 @@ public class EntitlementManager {
* @param subId default data subscription ID.
*/
@VisibleForTesting
- protected void runSilentTetherProvisioning(int type, int subId) {
+ protected Intent runSilentTetherProvisioning(int type, final TetheringConfiguration config) {
if (DBG) mLog.i("runSilentTetherProvisioning: " + type);
// For silent provisioning, settings would stop tethering when entitlement fail.
ResultReceiver receiver = buildProxyReceiver(type, false/* notifyFail */, null);
@@ -369,17 +372,20 @@ public class EntitlementManager {
Intent intent = new Intent();
intent.putExtra(EXTRA_ADD_TETHER_TYPE, type);
intent.putExtra(EXTRA_RUN_PROVISION, true);
+ intent.putExtra(EXTRA_TETHER_SILENT_PROVISIONING_ACTION, config.provisioningAppNoUi);
+ intent.putExtra(EXTRA_TETHER_PROVISIONING_RESPONSE, config.provisioningResponse);
intent.putExtra(EXTRA_PROVISION_CALLBACK, receiver);
- intent.putExtra(EXTRA_SUBID, subId);
+ intent.putExtra(EXTRA_TETHER_SUBID, config.activeDataSubId);
intent.setComponent(mSilentProvisioningService);
// Only admin user can change tethering and SilentTetherProvisioning don't need to
// show UI, it is fine to always start setting's background service as system user.
mContext.startService(intent);
+ return intent;
}
- private void runUiTetherProvisioning(int type, int subId) {
+ private void runUiTetherProvisioning(int type, final TetheringConfiguration config) {
ResultReceiver receiver = buildProxyReceiver(type, true/* notifyFail */, null);
- runUiTetherProvisioning(type, subId, receiver);
+ runUiTetherProvisioning(type, config, receiver);
}
/**
@@ -389,17 +395,20 @@ public class EntitlementManager {
* @param receiver to receive entitlement check result.
*/
@VisibleForTesting
- protected void runUiTetherProvisioning(int type, int subId, ResultReceiver receiver) {
+ protected Intent runUiTetherProvisioning(int type, final TetheringConfiguration config,
+ ResultReceiver receiver) {
if (DBG) mLog.i("runUiTetherProvisioning: " + type);
Intent intent = new Intent(Settings.ACTION_TETHER_PROVISIONING_UI);
intent.putExtra(EXTRA_ADD_TETHER_TYPE, type);
+ intent.putExtra(EXTRA_TETHER_UI_PROVISIONING_APP_NAME, config.provisioningApp);
intent.putExtra(EXTRA_PROVISION_CALLBACK, receiver);
- intent.putExtra(EXTRA_SUBID, subId);
+ intent.putExtra(EXTRA_TETHER_SUBID, config.activeDataSubId);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Only launch entitlement UI for system user. Entitlement UI should not appear for other
// user because only admin user is allowed to change tethering.
mContext.startActivity(intent);
+ return intent;
}
// Not needed to check if this don't run on the handler thread because it's private.
@@ -631,7 +640,7 @@ public class EntitlementManager {
receiver.send(cacheValue, null);
} else {
ResultReceiver proxy = buildProxyReceiver(downstream, false/* notifyFail */, receiver);
- runUiTetherProvisioning(downstream, config.activeDataSubId, proxy);
+ runUiTetherProvisioning(downstream, config, proxy);
}
}
}
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java b/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
index 48a600dfe6e1..1d45f129b51b 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
@@ -107,6 +107,7 @@ public class TetheringConfiguration {
public final String[] provisioningApp;
public final String provisioningAppNoUi;
public final int provisioningCheckPeriod;
+ public final String provisioningResponse;
public final int activeDataSubId;
@@ -141,10 +142,13 @@ public class TetheringConfiguration {
enableLegacyDhcpServer = getEnableLegacyDhcpServer(res);
provisioningApp = getResourceStringArray(res, R.array.config_mobile_hotspot_provision_app);
- provisioningAppNoUi = getProvisioningAppNoUi(res);
+ provisioningAppNoUi = getResourceString(res,
+ R.string.config_mobile_hotspot_provision_app_no_ui);
provisioningCheckPeriod = getResourceInteger(res,
R.integer.config_mobile_hotspot_provision_check_period,
0 /* No periodic re-check */);
+ provisioningResponse = getResourceString(res,
+ R.string.config_mobile_hotspot_provision_response);
mOffloadPollInterval = getResourceInteger(res,
R.integer.config_tether_offload_poll_interval,
@@ -337,9 +341,9 @@ public class TetheringConfiguration {
return copy(LEGACY_DHCP_DEFAULT_RANGE);
}
- private static String getProvisioningAppNoUi(Resources res) {
+ private static String getResourceString(Resources res, final int resId) {
try {
- return res.getString(R.string.config_mobile_hotspot_provision_app_no_ui);
+ return res.getString(resId);
} catch (Resources.NotFoundException e) {
return "";
}
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/TetheringNotificationUpdater.java b/packages/Tethering/src/com/android/networkstack/tethering/TetheringNotificationUpdater.java
index d03deda37fdf..593d04a06b93 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/TetheringNotificationUpdater.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/TetheringNotificationUpdater.java
@@ -24,8 +24,10 @@ import android.app.Notification.Action;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
+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.net.NetworkCapabilities;
@@ -253,6 +255,14 @@ public class TetheringNotificationUpdater {
}
@VisibleForTesting
+ static String getSettingsPackageName(@NonNull final PackageManager pm) {
+ final Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
+ final ComponentName settingsComponent = settingsIntent.resolveActivity(pm);
+ return settingsComponent != null
+ ? settingsComponent.getPackageName() : "com.android.settings";
+ }
+
+ @VisibleForTesting
void notifyTetheringDisabledByRestriction() {
final Resources res = getResourcesForSubId(mContext, mActiveDataSubId);
final String title = res.getString(R.string.disable_tether_notification_title);
@@ -262,8 +272,9 @@ public class TetheringNotificationUpdater {
final PendingIntent pi = PendingIntent.getActivity(
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
0 /* requestCode */,
- new Intent(Settings.ACTION_TETHER_SETTINGS),
- Intent.FLAG_ACTIVITY_NEW_TASK,
+ new Intent(Settings.ACTION_TETHER_SETTINGS)
+ .setPackage(getSettingsPackageName(mContext.getPackageManager())),
+ Intent.FLAG_ACTIVITY_NEW_TASK | PendingIntent.FLAG_IMMUTABLE,
null /* options */);
showNotification(R.drawable.stat_sys_tether_general, title, message,
@@ -284,7 +295,7 @@ public class TetheringNotificationUpdater {
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
0 /* requestCode */,
intent,
- 0 /* flags */);
+ PendingIntent.FLAG_IMMUTABLE);
final Action action = new Action.Builder(NO_ICON_ID, disableButton, pi).build();
showNotification(R.drawable.stat_sys_tether_general, title, message,
@@ -305,8 +316,9 @@ public class TetheringNotificationUpdater {
final PendingIntent pi = PendingIntent.getActivity(
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
0 /* requestCode */,
- new Intent(Settings.ACTION_TETHER_SETTINGS),
- Intent.FLAG_ACTIVITY_NEW_TASK,
+ new Intent(Settings.ACTION_TETHER_SETTINGS)
+ .setPackage(getSettingsPackageName(mContext.getPackageManager())),
+ Intent.FLAG_ACTIVITY_NEW_TASK | PendingIntent.FLAG_IMMUTABLE,
null /* options */);
showNotification(R.drawable.stat_sys_tether_general, title, message,
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/EntitlementManagerTest.java b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/EntitlementManagerTest.java
index 72fa916b9e42..354e75356e9f 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/EntitlementManagerTest.java
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/EntitlementManagerTest.java
@@ -16,8 +16,16 @@
package com.android.networkstack.tethering;
+import static android.net.TetheringConstants.EXTRA_ADD_TETHER_TYPE;
+import static android.net.TetheringConstants.EXTRA_PROVISION_CALLBACK;
+import static android.net.TetheringConstants.EXTRA_RUN_PROVISION;
+import static android.net.TetheringConstants.EXTRA_TETHER_PROVISIONING_RESPONSE;
+import static android.net.TetheringConstants.EXTRA_TETHER_SILENT_PROVISIONING_ACTION;
+import static android.net.TetheringConstants.EXTRA_TETHER_SUBID;
+import static android.net.TetheringConstants.EXTRA_TETHER_UI_PROVISIONING_APP_NAME;
import static android.net.TetheringManager.TETHERING_BLUETOOTH;
import static android.net.TetheringManager.TETHERING_ETHERNET;
+import static android.net.TetheringManager.TETHERING_INVALID;
import static android.net.TetheringManager.TETHERING_USB;
import static android.net.TetheringManager.TETHERING_WIFI;
import static android.net.TetheringManager.TETHERING_WIFI_P2P;
@@ -44,6 +52,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.content.Context;
+import android.content.Intent;
import android.content.res.Resources;
import android.net.util.SharedLog;
import android.os.Bundle;
@@ -53,6 +62,7 @@ import android.os.ResultReceiver;
import android.os.SystemProperties;
import android.os.test.TestLooper;
import android.provider.DeviceConfig;
+import android.provider.Settings;
import android.telephony.CarrierConfigManager;
import androidx.test.filters.SmallTest;
@@ -76,6 +86,7 @@ public final class EntitlementManagerTest {
private static final String[] PROVISIONING_APP_NAME = {"some", "app"};
private static final String PROVISIONING_NO_UI_APP_NAME = "no_ui_app";
+ private static final String PROVISIONING_APP_RESPONSE = "app_response";
@Mock private CarrierConfigManager mCarrierConfigManager;
@Mock private Context mContext;
@@ -122,15 +133,51 @@ public final class EntitlementManagerTest {
}
@Override
- protected void runUiTetherProvisioning(int type, int subId, ResultReceiver receiver) {
+ protected Intent runUiTetherProvisioning(int type,
+ final TetheringConfiguration config, final ResultReceiver receiver) {
+ Intent intent = super.runUiTetherProvisioning(type, config, receiver);
+ assertUiTetherProvisioningIntent(type, config, receiver, intent);
uiProvisionCount++;
receiver.send(fakeEntitlementResult, null);
+ return intent;
+ }
+
+ private void assertUiTetherProvisioningIntent(int type, final TetheringConfiguration config,
+ final ResultReceiver receiver, final Intent intent) {
+ assertEquals(Settings.ACTION_TETHER_PROVISIONING_UI, intent.getAction());
+ assertEquals(type, intent.getIntExtra(EXTRA_ADD_TETHER_TYPE, TETHERING_INVALID));
+ final String[] appName = intent.getStringArrayExtra(
+ EXTRA_TETHER_UI_PROVISIONING_APP_NAME);
+ assertEquals(PROVISIONING_APP_NAME.length, appName.length);
+ for (int i = 0; i < PROVISIONING_APP_NAME.length; i++) {
+ assertEquals(PROVISIONING_APP_NAME[i], appName[i]);
+ }
+ assertEquals(receiver, intent.getParcelableExtra(EXTRA_PROVISION_CALLBACK));
+ assertEquals(config.activeDataSubId,
+ intent.getIntExtra(EXTRA_TETHER_SUBID, INVALID_SUBSCRIPTION_ID));
}
@Override
- protected void runSilentTetherProvisioning(int type, int subId) {
+ protected Intent runSilentTetherProvisioning(int type,
+ final TetheringConfiguration config) {
+ Intent intent = super.runSilentTetherProvisioning(type, config);
+ assertSilentTetherProvisioning(type, config, intent);
silentProvisionCount++;
addDownstreamMapping(type, fakeEntitlementResult);
+ return intent;
+ }
+
+ private void assertSilentTetherProvisioning(int type, final TetheringConfiguration config,
+ final Intent intent) {
+ assertEquals(type, intent.getIntExtra(EXTRA_ADD_TETHER_TYPE, TETHERING_INVALID));
+ assertEquals(true, intent.getBooleanExtra(EXTRA_RUN_PROVISION, false));
+ assertEquals(PROVISIONING_NO_UI_APP_NAME,
+ intent.getStringExtra(EXTRA_TETHER_SILENT_PROVISIONING_ACTION));
+ assertEquals(PROVISIONING_APP_RESPONSE,
+ intent.getStringExtra(EXTRA_TETHER_PROVISIONING_RESPONSE));
+ assertTrue(intent.hasExtra(EXTRA_PROVISION_CALLBACK));
+ assertEquals(config.activeDataSubId,
+ intent.getIntExtra(EXTRA_TETHER_SUBID, INVALID_SUBSCRIPTION_ID));
}
}
@@ -187,6 +234,8 @@ public final class EntitlementManagerTest {
.thenReturn(PROVISIONING_APP_NAME);
when(mResources.getString(R.string.config_mobile_hotspot_provision_app_no_ui))
.thenReturn(PROVISIONING_NO_UI_APP_NAME);
+ when(mResources.getString(R.string.config_mobile_hotspot_provision_response)).thenReturn(
+ PROVISIONING_APP_RESPONSE);
// Act like the CarrierConfigManager is present and ready unless told otherwise.
when(mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE))
.thenReturn(mCarrierConfigManager);
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
index 1999ad786ed4..312186391d5f 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
@@ -61,6 +61,8 @@ public class TetheringConfigurationTest {
private final SharedLog mLog = new SharedLog("TetheringConfigurationTest");
private static final String[] PROVISIONING_APP_NAME = {"some", "app"};
+ private static final String PROVISIONING_NO_UI_APP_NAME = "no_ui_app";
+ private static final String PROVISIONING_APP_RESPONSE = "app_response";
@Mock private Context mContext;
@Mock private TelephonyManager mTelephonyManager;
@Mock private Resources mResources;
@@ -388,6 +390,8 @@ public class TetheringConfigurationTest {
new MockTetheringConfiguration(mMockContext, mLog, anyValidSubId);
assertEquals(mockCfg.provisioningApp[0], PROVISIONING_APP_NAME[0]);
assertEquals(mockCfg.provisioningApp[1], PROVISIONING_APP_NAME[1]);
+ assertEquals(mockCfg.provisioningAppNoUi, PROVISIONING_NO_UI_APP_NAME);
+ assertEquals(mockCfg.provisioningResponse, PROVISIONING_APP_RESPONSE);
}
private void setUpResourceForSubId() {
@@ -403,6 +407,10 @@ public class TetheringConfigurationTest {
new int[0]);
when(mResourcesForSubId.getStringArray(
R.array.config_mobile_hotspot_provision_app)).thenReturn(PROVISIONING_APP_NAME);
+ when(mResourcesForSubId.getString(R.string.config_mobile_hotspot_provision_app_no_ui))
+ .thenReturn(PROVISIONING_NO_UI_APP_NAME);
+ when(mResourcesForSubId.getString(
+ R.string.config_mobile_hotspot_provision_response)).thenReturn(
+ PROVISIONING_APP_RESPONSE);
}
-
}
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringNotificationUpdaterTest.kt b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringNotificationUpdaterTest.kt
index 7d5471f7703d..4b6bbac051e0 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringNotificationUpdaterTest.kt
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringNotificationUpdaterTest.kt
@@ -19,6 +19,10 @@ package com.android.networkstack.tethering
import android.app.Notification
import android.app.NotificationManager
import android.content.Context
+import android.content.pm.ActivityInfo
+import android.content.pm.ApplicationInfo
+import android.content.pm.PackageManager
+import android.content.pm.ResolveInfo
import android.content.res.Resources
import android.net.ConnectivityManager.TETHERING_WIFI
import android.os.Handler
@@ -51,6 +55,7 @@ import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.eq
import org.mockito.Mock
import org.mockito.Mockito.doReturn
+import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.reset
import org.mockito.Mockito.times
@@ -351,4 +356,26 @@ class TetheringNotificationUpdaterTest {
notificationUpdater.onUpstreamCapabilitiesChanged(ROAMING_CAPABILITIES)
verifyNotificationCancelled(listOf(NO_UPSTREAM_NOTIFICATION_ID, ROAMING_NOTIFICATION_ID))
}
+
+ @Test
+ fun testGetSettingsPackageName() {
+ val defaultSettingsPackageName = "com.android.settings"
+ val testSettingsPackageName = "com.android.test.settings"
+ val pm = mock(PackageManager::class.java)
+ doReturn(null).`when`(pm).resolveActivity(any(), anyInt())
+ assertEquals(defaultSettingsPackageName,
+ TetheringNotificationUpdater.getSettingsPackageName(pm))
+
+ val resolveInfo = ResolveInfo().apply {
+ activityInfo = ActivityInfo().apply {
+ name = "test"
+ applicationInfo = ApplicationInfo().apply {
+ packageName = testSettingsPackageName
+ }
+ }
+ }
+ doReturn(resolveInfo).`when`(pm).resolveActivity(any(), anyInt())
+ assertEquals(testSettingsPackageName,
+ TetheringNotificationUpdater.getSettingsPackageName(pm))
+ }
}
diff --git a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
index 26e85beba58b..103151dcdda5 100644
--- a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
+++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
@@ -51,7 +51,7 @@ import java.util.function.Consumer;
*/
public class AppPredictionPerUserService extends
AbstractPerUserSystemService<AppPredictionPerUserService, AppPredictionManagerService>
- implements RemoteAppPredictionService.RemoteAppPredictionServiceCallbacks {
+ implements RemoteAppPredictionService.RemoteAppPredictionServiceCallbacks {
private static final String TAG = AppPredictionPerUserService.class.getSimpleName();
private static final String PREDICT_USING_PEOPLE_SERVICE_PREFIX =
@@ -114,11 +114,8 @@ public class AppPredictionPerUserService extends
public void onCreatePredictionSessionLocked(@NonNull AppPredictionContext context,
@NonNull AppPredictionSessionId sessionId) {
if (!mSessionInfos.containsKey(sessionId)) {
- // TODO(b/157500121): remove below forceUsingPeopleService logic after testing
- // PeopleService for 2 weeks on Droidfood.
- final boolean forceUsingPeopleService = context.getUiSurface().equals("share");
mSessionInfos.put(sessionId, new AppPredictionSessionInfo(sessionId, context,
- forceUsingPeopleService || DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
+ DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false),
this::removeAppPredictionSessionInfo));
}
diff --git a/services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java b/services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java
index e7a43b75f9d5..48895ad42e99 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java
@@ -93,7 +93,7 @@ final class AutofillInlineSuggestionsRequestSession {
@Nullable
private InlineFillUi mInlineFillUi;
@GuardedBy("mLock")
- private boolean mPreviousResponseIsNotEmpty;
+ private Boolean mPreviousResponseIsNotEmpty = null;
@GuardedBy("mLock")
private boolean mDestroyed = false;
@@ -213,7 +213,7 @@ final class AutofillInlineSuggestionsRequestSession {
// if IME is visible, and response is not null, send the response
InlineSuggestionsResponse response = mInlineFillUi.getInlineSuggestionsResponse();
boolean isEmptyResponse = response.getInlineSuggestions().isEmpty();
- if (isEmptyResponse && !mPreviousResponseIsNotEmpty) {
+ if (isEmptyResponse && Boolean.FALSE.equals(mPreviousResponseIsNotEmpty)) {
// No-op if both the previous response and current response are empty.
return;
}
diff --git a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
index 851e4cc0bfd1..a7d0061cc043 100644
--- a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
+++ b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
@@ -245,6 +245,11 @@ final class RemoteAugmentedAutofillService
if (inlineSuggestionsData == null || inlineSuggestionsData.isEmpty()
|| inlineSuggestionsCallback == null || request == null
|| remoteRenderService == null) {
+ // If it was an inline request and the response doesn't have any inline suggestions,
+ // we will send an empty response to IME.
+ if (inlineSuggestionsCallback != null && request != null) {
+ inlineSuggestionsCallback.apply(InlineFillUi.emptyUi(focusedId));
+ }
return;
}
mCallbacks.setLastResponse(sessionId);
diff --git a/services/core/java/android/content/pm/PackageManagerInternal.java b/services/core/java/android/content/pm/PackageManagerInternal.java
index 81de29c4ee4d..b241bd16d3ee 100644
--- a/services/core/java/android/content/pm/PackageManagerInternal.java
+++ b/services/core/java/android/content/pm/PackageManagerInternal.java
@@ -988,4 +988,14 @@ public abstract class PackageManagerInternal {
* Unblocks uninstall for all packages for the user.
*/
public abstract void clearBlockUninstallForUser(@UserIdInt int userId);
+
+ /**
+ * Unsuspends all packages suspended by the given package for the user.
+ */
+ public abstract void unsuspendForSuspendingPackage(String suspendingPackage, int userId);
+
+ /**
+ * Returns {@code true} if the package is suspending any packages for the user.
+ */
+ public abstract boolean isSuspendingAnyPackages(String suspendingPackage, int userId);
}
diff --git a/services/core/java/com/android/server/AppStateTracker.java b/services/core/java/com/android/server/AppStateTracker.java
index b765d81d42b7..74f79e0d40f5 100644
--- a/services/core/java/com/android/server/AppStateTracker.java
+++ b/services/core/java/com/android/server/AppStateTracker.java
@@ -1120,7 +1120,8 @@ public class AppStateTracker {
return false;
}
final int userId = UserHandle.getUserId(uid);
- if (mExemptedPackages.contains(userId, packageName)) {
+ if (mAppStandbyInternal.isAppIdleEnabled() && !mAppStandbyInternal.isInParole()
+ && mExemptedPackages.contains(userId, packageName)) {
return false;
}
return mForceAllAppsStandby;
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 0ab571854c72..2958fd2ae63a 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -6426,7 +6426,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
final boolean shouldFilter = requiresVpnIsolation(nai, newNc, nai.linkProperties);
final String iface = nai.linkProperties.getInterfaceName();
// For VPN uid interface filtering, old ranges need to be removed before new ranges can
- // be added, due to the range being expanded and stored as invidiual UIDs. For example
+ // be added, due to the range being expanded and stored as individual UIDs. For example
// the UIDs might be updated from [0, 99999] to ([0, 10012], [10014, 99999]) which means
// prevRanges = [0, 99999] while newRanges = [0, 10012], [10014, 99999]. If prevRanges
// were added first and then newRanges got removed later, there would be only one uid
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 9080bdb44eaf..a3c164d63605 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -1606,7 +1606,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(
PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED)
- && idMatch(r.subId, subId, phoneId)) {
+ && idMatchWithoutDefaultPhoneCheck(r.subId, subId)) {
try {
r.callback.onDisplayInfoChanged(telephonyDisplayInfo);
} catch (RemoteException ex) {
@@ -2726,6 +2726,24 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
Rlog.e(TAG, s);
}
+ /**
+ * If the registrant specified a subId, then we should only notify it if subIds match.
+ * If the registrant registered with DEFAULT subId, we should notify only when the related subId
+ * is default subId (which could be INVALID if there's no default subId).
+ *
+ * This should be the correct way to check record ID match. in idMatch the record's phoneId is
+ * speculated based on subId passed by the registrant so it's not a good reference.
+ * But to avoid triggering potential regression only replace idMatch with it when an issue with
+ * idMatch is reported. Eventually this should replace all instances of idMatch.
+ */
+ private boolean idMatchWithoutDefaultPhoneCheck(int subIdInRecord, int subIdToNotify) {
+ if (subIdInRecord == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
+ return (subIdToNotify == mDefaultSubId);
+ } else {
+ return (subIdInRecord == subIdToNotify);
+ }
+ }
+
boolean idMatch(int rSubId, int subId, int phoneId) {
if(subId < 0) {
diff --git a/services/core/java/com/android/server/adb/AdbDebuggingManager.java b/services/core/java/com/android/server/adb/AdbDebuggingManager.java
index 27ea4716e12d..df3b6880fdfb 100644
--- a/services/core/java/com/android/server/adb/AdbDebuggingManager.java
+++ b/services/core/java/com/android/server/adb/AdbDebuggingManager.java
@@ -337,6 +337,7 @@ public class AdbDebuggingManager {
class PortListenerImpl implements AdbConnectionPortListener {
public void onPortReceived(int port) {
+ if (DEBUG) Slog.d(TAG, "Received tls port=" + port);
Message msg = mHandler.obtainMessage(port > 0
? AdbDebuggingHandler.MSG_SERVER_CONNECTED
: AdbDebuggingHandler.MSG_SERVER_DISCONNECTED);
@@ -392,6 +393,7 @@ public class AdbDebuggingManager {
mOutputStream = mSocket.getOutputStream();
mInputStream = mSocket.getInputStream();
+ mHandler.sendEmptyMessage(AdbDebuggingHandler.MSG_ADBD_SOCKET_CONNECTED);
} catch (IOException ioe) {
Slog.e(TAG, "Caught an exception opening the socket: " + ioe);
closeSocketLocked();
@@ -504,6 +506,7 @@ public class AdbDebuggingManager {
} catch (IOException ex) {
Slog.e(TAG, "Failed closing socket: " + ex);
}
+ mHandler.sendEmptyMessage(AdbDebuggingHandler.MSG_ADBD_SOCKET_DISCONNECTED);
}
/** Call to stop listening on the socket and exit the thread. */
@@ -729,6 +732,10 @@ public class AdbDebuggingManager {
static final int MSG_SERVER_CONNECTED = 24;
// Notifies us the TLS server is disconnected
static final int MSG_SERVER_DISCONNECTED = 25;
+ // Notification when adbd socket successfully connects.
+ static final int MSG_ADBD_SOCKET_CONNECTED = 26;
+ // Notification when adbd socket is disconnected.
+ static final int MSG_ADBD_SOCKET_DISCONNECTED = 27;
// === Messages we can send to adbd ===========
static final String MSG_DISCONNECT_DEVICE = "DD";
@@ -1170,6 +1177,28 @@ public class AdbDebuggingManager {
}
break;
}
+ case MSG_ADBD_SOCKET_CONNECTED: {
+ if (DEBUG) Slog.d(TAG, "adbd socket connected");
+ if (mAdbWifiEnabled) {
+ // In scenarios where adbd is restarted, the tls port may change.
+ mConnectionPortPoller =
+ new AdbDebuggingManager.AdbConnectionPortPoller(mPortListener);
+ mConnectionPortPoller.start();
+ }
+ break;
+ }
+ case MSG_ADBD_SOCKET_DISCONNECTED: {
+ if (DEBUG) Slog.d(TAG, "adbd socket disconnected");
+ if (mConnectionPortPoller != null) {
+ mConnectionPortPoller.cancelAndWait();
+ mConnectionPortPoller = null;
+ }
+ if (mAdbWifiEnabled) {
+ // In scenarios where adbd is restarted, the tls port may change.
+ onAdbdWifiServerDisconnected(-1);
+ }
+ break;
+ }
}
}
diff --git a/services/core/java/com/android/server/adb/AdbService.java b/services/core/java/com/android/server/adb/AdbService.java
index e1f9a7a150d8..ef81d7159c42 100644
--- a/services/core/java/com/android/server/adb/AdbService.java
+++ b/services/core/java/com/android/server/adb/AdbService.java
@@ -241,12 +241,7 @@ public class AdbService extends IAdbManager.Stub {
private AdbService(Context context) {
mContext = context;
mContentResolver = context.getContentResolver();
-
- boolean secureAdbEnabled = AdbProperties.secure().orElse(false);
- boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt"));
- if (secureAdbEnabled && !dataEncrypted) {
- mDebuggingManager = new AdbDebuggingManager(context);
- }
+ mDebuggingManager = new AdbDebuggingManager(context);
initAdbState();
LocalServices.addService(AdbManagerInternal.class, new AdbManagerInternalImpl());
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 026f147e955c..079512275797 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -1671,6 +1671,12 @@ public class ActivityManagerService extends IActivityManager.Stub
*/
@Nullable ContentCaptureManagerInternal mContentCaptureService;
+ /**
+ * Set of {@link ProcessRecord} that have either {@link ProcessRecord#hasTopUi()} or
+ * {@link ProcessRecord#runningRemoteAnimation} set to {@code true}.
+ */
+ final ArraySet<ProcessRecord> mTopUiOrRunningRemoteAnimApps = new ArraySet<>();
+
final class UiHandler extends Handler {
public UiHandler() {
super(com.android.server.UiThread.get().getLooper(), null, true);
@@ -14702,6 +14708,7 @@ public class ActivityManagerService extends IActivityManager.Stub
mProcessesToGc.remove(app);
mPendingPssProcesses.remove(app);
+ mTopUiOrRunningRemoteAnimApps.remove(app);
ProcessList.abortNextPssTime(app.procStateMemTracker);
// Dismiss any open dialogs.
@@ -18490,6 +18497,22 @@ public class ActivityManagerService extends IActivityManager.Stub
return proc;
}
+ /**
+ * @return {@code true} if {@link #mTopUiOrRunningRemoteAnimApps} set contains {@code app} or when there are no apps
+ * in this list, an false otherwise.
+ */
+ boolean containsTopUiOrRunningRemoteAnimOrEmptyLocked(ProcessRecord app) {
+ return mTopUiOrRunningRemoteAnimApps.isEmpty() || mTopUiOrRunningRemoteAnimApps.contains(app);
+ }
+
+ void addTopUiOrRunningRemoteAnim(ProcessRecord app) {
+ mTopUiOrRunningRemoteAnimApps.add(app);
+ }
+
+ void removeTopUiOrRunningRemoteAnim(ProcessRecord app) {
+ mTopUiOrRunningRemoteAnimApps.remove(app);
+ }
+
@Override
public boolean dumpHeap(String process, int userId, boolean managed, boolean mallocInfo,
boolean runGc, String path, ParcelFileDescriptor fd, RemoteCallback finishCallback) {
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index da5f48962130..58b0a157e2c2 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -1151,8 +1151,17 @@ public final class OomAdjuster {
// is currently showing UI.
app.systemNoUi = true;
if (app == topApp) {
+ // If specific system app has set ProcessRecord.mHasTopUi or is running a remote
+ // animation (ProcessRecord.runningRemoteAnimation), this will prevent topApp
+ // to use SCHED_GROUP_TOP_APP to ensure process with mHasTopUi will have exclusive
+ // access to configured cores.
+ if (mService.containsTopUiOrRunningRemoteAnimOrEmptyLocked(app)) {
+ app.setCurrentSchedulingGroup(ProcessList.SCHED_GROUP_TOP_APP);
+ } else {
+ app.setCurrentSchedulingGroup(ProcessList.SCHED_GROUP_DEFAULT);
+ }
app.systemNoUi = false;
- app.setCurrentSchedulingGroup(ProcessList.SCHED_GROUP_TOP_APP);
+
app.adjType = "pers-top-activity";
} else if (app.hasTopUi()) {
// sched group/proc state adjustment is below
@@ -1193,10 +1202,20 @@ public final class OomAdjuster {
boolean foregroundActivities = false;
if (PROCESS_STATE_CUR_TOP == PROCESS_STATE_TOP && app == topApp) {
- // The last app on the list is the foreground app.
- adj = ProcessList.FOREGROUND_APP_ADJ;
- schedGroup = ProcessList.SCHED_GROUP_TOP_APP;
- app.adjType = "top-activity";
+
+ // If specific system app has set ProcessRecord.mHasTopUi or is running a remote
+ // animation (ProcessRecord.runningRemoteAnimation), this will prevent topApp
+ // to use SCHED_GROUP_TOP_APP to ensure process with mHasTopUi will have exclusive
+ // access to configured cores.
+ if (mService.containsTopUiOrRunningRemoteAnimOrEmptyLocked(app)) {
+ adj = ProcessList.FOREGROUND_APP_ADJ;
+ schedGroup = ProcessList.SCHED_GROUP_TOP_APP;
+ app.adjType = "top-activity";
+ } else {
+ adj = ProcessList.FOREGROUND_APP_ADJ;
+ schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
+ app.adjType = "top-activity-behind-topui";
+ }
foregroundActivities = true;
procState = PROCESS_STATE_CUR_TOP;
if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index c5152c081e70..4c75ab21d6f2 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -1268,6 +1268,7 @@ class ProcessRecord implements WindowProcessListener {
void setHasTopUi(boolean hasTopUi) {
mHasTopUi = hasTopUi;
mWindowProcessController.setHasTopUi(hasTopUi);
+ updateTopUiOrRunningRemoteAnim();
}
boolean hasTopUi() {
@@ -1518,10 +1519,19 @@ class ProcessRecord implements WindowProcessListener {
Slog.i(TAG, "Setting runningRemoteAnimation=" + runningRemoteAnimation
+ " for pid=" + pid);
}
+ updateTopUiOrRunningRemoteAnim();
mService.updateOomAdjLocked(this, true, OomAdjuster.OOM_ADJ_REASON_UI_VISIBILITY);
}
}
+ void updateTopUiOrRunningRemoteAnim() {
+ if (runningRemoteAnimation || hasTopUi()) {
+ mService.addTopUiOrRunningRemoteAnim(this);
+ } else {
+ mService.removeTopUiOrRunningRemoteAnim(this);
+ }
+ }
+
public long getInputDispatchingTimeout() {
return mWindowProcessController.getInputDispatchingTimeout();
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index ea7059894f38..f2c4e4428af2 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -2515,7 +2515,7 @@ class UserController implements Handler.Callback {
showUserSwitchDialog(fromToUserPair);
break;
case CLEAR_USER_JOURNEY_SESSION_MSG:
- clearSessionId(msg.arg1);
+ logAndClearSessionId(msg.arg1);
break;
}
return false;
@@ -2630,6 +2630,21 @@ class UserController implements Handler.Callback {
}
/**
+ * Log a final event of the {@link UserJourneySession} and clear it.
+ */
+ private void logAndClearSessionId(@UserIdInt int userId) {
+ synchronized (mUserIdToUserJourneyMap) {
+ final UserJourneySession userJourneySession = mUserIdToUserJourneyMap.get(userId);
+ if (userJourneySession != null) {
+ FrameworkStatsLog.write(FrameworkStatsLog.USER_LIFECYCLE_EVENT_OCCURRED,
+ userJourneySession.mSessionId, userId, USER_LIFECYCLE_EVENT_UNKNOWN,
+ USER_LIFECYCLE_EVENT_STATE_NONE);
+ }
+ clearSessionId(userId);
+ }
+ }
+
+ /**
* Helper class to store user journey and session id.
*
* <p> User journey tracks a chain of user lifecycle events occurring during different user
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index a498e3867c05..b647a1ab9873 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -207,6 +207,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035;
static final int MSG_INITIALIZE_IME = 1040;
static final int MSG_CREATE_SESSION = 1050;
+ static final int MSG_REMOVE_IME_SURFACE = 1060;
static final int MSG_START_INPUT = 2000;
@@ -2352,6 +2353,16 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mImeTargetWindowMap.put(startInputToken, mCurFocusedWindow);
mStartInputHistory.addEntry(info);
+ // Seems that PackageManagerInternal#grantImplicitAccess() doesn't handle cross-user
+ // implicit visibility (e.g. IME[user=10] -> App[user=0]) thus we do this only for the
+ // same-user scenarios.
+ // That said ignoring cross-user scenario will never affect IMEs that do not have
+ // INTERACT_ACROSS_USERS(_FULL) permissions, which is actually almost always the case.
+ if (mSettings.getCurrentUserId() == UserHandle.getUserId(mCurClient.uid)) {
+ mPackageManagerInternal.grantImplicitAccess(mSettings.getCurrentUserId(),
+ null /* intent */, UserHandle.getAppId(mCurMethodUid), mCurClient.uid, true);
+ }
+
final SessionState session = mCurClient.curSession;
executeOrSendMessage(session.method, mCaller.obtainMessageIIOOOO(
MSG_START_INPUT, mCurInputContextMissingMethods, initial ? 0 : 1 /* restarting */,
@@ -3936,6 +3947,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
}
+ @Override
+ public void removeImeSurface() {
+ mContext.enforceCallingPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW, null);
+ mHandler.sendMessage(mHandler.obtainMessage(MSG_REMOVE_IME_SURFACE));
+ }
+
@BinderThread
private void notifyUserAction(@NonNull IBinder token) {
if (DEBUG) {
@@ -4206,6 +4223,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
args.recycle();
return true;
}
+ case MSG_REMOVE_IME_SURFACE: {
+ try {
+ if (mEnabledSession != null && mEnabledSession.session != null) {
+ mEnabledSession.session.removeImeSurface();
+ }
+ } catch (RemoteException e) {
+ }
+ return true;
+ }
// ---------------------------------------------------------
case MSG_START_INPUT: {
diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
index 2129e9bd34f3..d025b0f4ece5 100644
--- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
@@ -1462,6 +1462,12 @@ public final class MultiClientInputMethodManagerService {
@BinderThread
@Override
+ public void removeImeSurface() {
+ reportNotSupported();
+ }
+
+ @BinderThread
+ @Override
public boolean showSoftInput(
IInputMethodClient client, IBinder token, int flags,
ResultReceiver resultReceiver) {
diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java
index 067bdcb111fb..bfcbe465a271 100644
--- a/services/core/java/com/android/server/location/LocationManagerService.java
+++ b/services/core/java/com/android/server/location/LocationManagerService.java
@@ -231,7 +231,7 @@ public class LocationManagerService extends ILocationManager.Stub {
private final AppForegroundHelper mAppForegroundHelper;
private final LocationUsageLogger mLocationUsageLogger;
- @Nullable private GnssManagerService mGnssManagerService = null;
+ @Nullable private volatile GnssManagerService mGnssManagerService = null;
private final PassiveLocationProviderManager mPassiveManager;
@@ -381,6 +381,10 @@ public class LocationManagerService extends ILocationManager.Stub {
// prepare providers
initializeProvidersLocked();
}
+
+ // initialize gnss last because it has no awareness of boot phases and blindly assumes that
+ // all other location providers are loaded at initialization
+ initializeGnss();
}
private void onAppOpChanged(String packageName) {
@@ -602,16 +606,19 @@ public class LocationManagerService extends ILocationManager.Stub {
}
manager.setMockProvider(new MockProvider(properties));
}
+ }
- // initialize gnss last because it has no awareness of boot phases and blindly assumes that
- // all other location providers are loaded at initialization
+ private void initializeGnss() {
+ // Do not hold mLock when calling GnssManagerService#isGnssSupported() which calls into HAL.
if (GnssManagerService.isGnssSupported()) {
mGnssManagerService = new GnssManagerService(mContext, mAppOpsHelper, mSettingsHelper,
mAppForegroundHelper, mLocationUsageLogger);
mGnssManagerService.onSystemReady();
LocationProviderManager gnssManager = new LocationProviderManager(GPS_PROVIDER);
- mProviderManagers.add(gnssManager);
+ synchronized (mLock) {
+ mProviderManagers.add(gnssManager);
+ }
gnssManager.setRealProvider(mGnssManagerService.getGnssLocationProvider());
// bind to geofence proxy
diff --git a/services/core/java/com/android/server/media/BluetoothRouteProvider.java b/services/core/java/com/android/server/media/BluetoothRouteProvider.java
index 2461b0ce93a5..c7575d4fc8a4 100644
--- a/services/core/java/com/android/server/media/BluetoothRouteProvider.java
+++ b/services/core/java/com/android/server/media/BluetoothRouteProvider.java
@@ -48,6 +48,7 @@ import java.util.Objects;
class BluetoothRouteProvider {
private static final String TAG = "BTRouteProvider";
+ private static final String HEARING_AID_ROUTE_ID_PREFIX = "HEARING_AID_";
private static BluetoothRouteProvider sInstance;
@SuppressWarnings("WeakerAccess") /* synthetic access */
@@ -179,9 +180,16 @@ class BluetoothRouteProvider {
@NonNull
List<MediaRoute2Info> getAllBluetoothRoutes() {
- ArrayList<MediaRoute2Info> routes = new ArrayList<>();
+ List<MediaRoute2Info> routes = new ArrayList<>();
+ List<String> routeIds = new ArrayList<>();
+
for (BluetoothRouteInfo btRoute : mBluetoothRoutes.values()) {
+ // A pair of hearing aid devices or the same hardware address
+ if (routeIds.contains(btRoute.route.getId())) {
+ continue;
+ }
routes.add(btRoute.route);
+ routeIds.add(btRoute.route.getId());
}
return routes;
}
@@ -222,8 +230,8 @@ class BluetoothRouteProvider {
private BluetoothRouteInfo createBluetoothRoute(BluetoothDevice device) {
BluetoothRouteInfo newBtRoute = new BluetoothRouteInfo();
newBtRoute.btDevice = device;
- // Current volume will be set when connected.
- // TODO: Is there any BT device which has fixed volume?
+
+ String routeId = device.getAddress();
String deviceName = device.getName();
if (TextUtils.isEmpty(deviceName)) {
deviceName = mContext.getResources().getText(R.string.unknownName).toString();
@@ -236,10 +244,13 @@ class BluetoothRouteProvider {
if (mHearingAidProfile != null
&& mHearingAidProfile.getConnectedDevices().contains(device)) {
newBtRoute.connectedProfiles.put(BluetoothProfile.HEARING_AID, true);
+ // Intentionally assign the same ID for a pair of devices to publish only one of them.
+ routeId = HEARING_AID_ROUTE_ID_PREFIX + mHearingAidProfile.getHiSyncId(device);
type = MediaRoute2Info.TYPE_HEARING_AID;
}
- newBtRoute.route = new MediaRoute2Info.Builder(device.getAddress(), deviceName)
+ // Current volume will be set when connected.
+ newBtRoute.route = new MediaRoute2Info.Builder(routeId, deviceName)
.addFeature(MediaRoute2Info.FEATURE_LIVE_AUDIO)
.setConnectionState(MediaRoute2Info.CONNECTION_STATE_DISCONNECTED)
.setDescription(mContext.getResources().getText(
@@ -247,6 +258,7 @@ class BluetoothRouteProvider {
.setType(type)
.setVolumeHandling(MediaRoute2Info.PLAYBACK_VOLUME_VARIABLE)
.setVolumeMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC))
+ .setAddress(device.getAddress())
.build();
return newBtRoute;
}
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index c12f89c25a9e..9a2aee3d8df6 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -567,7 +567,8 @@ class MediaRouter2ServiceImpl {
boolean hasModifyAudioRoutingPermission) {
final IBinder binder = router.asBinder();
if (mAllRouterRecords.get(binder) != null) {
- Slog.w(TAG, "Same router already exists. packageName=" + packageName);
+ Slog.w(TAG, "registerRouter2Locked: Same router already exists. packageName="
+ + packageName);
return;
}
@@ -665,8 +666,7 @@ class MediaRouter2ServiceImpl {
final RouterRecord routerRecord = mAllRouterRecords.get(binder);
if (routerRecord == null) {
- Slog.w(TAG, "requestCreateSessionWithRouter2ByManagerRequestLocked: "
- + "Ignoring unknown router.");
+ Slog.w(TAG, "notifySessionHintsForCreatingSessionLocked: Ignoring unknown router.");
return;
}
@@ -789,7 +789,8 @@ class MediaRouter2ServiceImpl {
ManagerRecord managerRecord = mAllManagerRecords.get(binder);
if (managerRecord != null) {
- Slog.w(TAG, "Same manager already exists. packageName=" + packageName);
+ Slog.w(TAG, "registerManagerLocked: Same manager already exists. packageName="
+ + packageName);
return;
}
@@ -854,7 +855,8 @@ class MediaRouter2ServiceImpl {
RouterRecord routerRecord = managerRecord.mUserRecord.findRouterRecordLocked(packageName);
if (routerRecord == null) {
- Slog.w(TAG, "Ignoring session creation for unknown router.");
+ Slog.w(TAG, "requestCreateSessionWithManagerLocked: Ignoring session creation for "
+ + "unknown router.");
return;
}
@@ -1231,7 +1233,8 @@ class MediaRouter2ServiceImpl {
for (MediaRoute2Info route : currentRoutes) {
if (!route.isValid()) {
- Slog.w(TAG, "Ignoring invalid route : " + route);
+ Slog.w(TAG, "onProviderStateChangedOnHandler: Ignoring invalid route : "
+ + route);
continue;
}
MediaRoute2Info prevRoute = prevInfo.getRoute(route.getOriginalId());
@@ -1309,8 +1312,8 @@ class MediaRouter2ServiceImpl {
try {
routerRecord.mRouter.getSessionHintsForCreatingSession(uniqueRequestId, route);
} catch (RemoteException ex) {
- Slog.w(TAG, "requestGetSessionHintsOnHandler: "
- + "Failed to request. Router probably died.");
+ Slog.w(TAG, "getSessionHintsForCreatingSessionOnHandler: "
+ + "Failed to request. Router probably died.", ex);
mSessionCreationRequests.remove(request);
notifyRequestFailedToManager(managerRecord.mManager,
toOriginalRequestId(uniqueRequestId), REASON_UNKNOWN_ERROR);
@@ -1323,8 +1326,8 @@ class MediaRouter2ServiceImpl {
final MediaRoute2Provider provider = findProvider(route.getProviderId());
if (provider == null) {
- Slog.w(TAG, "Ignoring session creation request since no provider found for"
- + " given route=" + route);
+ Slog.w(TAG, "requestCreateSessionWithRouter2OnHandler: Ignoring session "
+ + "creation request since no provider found for given route=" + route);
notifySessionCreationFailedToRouter(routerRecord,
toOriginalRequestId(uniqueRequestId));
return;
@@ -1349,22 +1352,21 @@ class MediaRouter2ServiceImpl {
}
}
if (matchingRequest == null) {
- Slog.w(TAG, "requestCreateSessionWithKnownRequestOnHandler: "
- + "Ignoring an unknown request.");
+ Slog.w(TAG, "requestCreateSessionWithManagerOnHandler: "
+ + "Ignoring an unknown session creation request.");
return;
}
if (!TextUtils.equals(matchingRequest.mRoute.getId(), route.getId())) {
- Slog.w(TAG, "requestCreateSessionWithKnownRequestOnHandler: "
+ Slog.w(TAG, "requestCreateSessionWithManagerOnHandler: "
+ "The given route is different from the requested route.");
return;
}
final MediaRoute2Provider provider = findProvider(route.getProviderId());
if (provider == null) {
- Slog.w(TAG, "Ignoring session creation request since no provider found for"
- + " given route=" + route);
-
+ Slog.w(TAG, "requestCreateSessionWithManagerOnHandler: Ignoring session "
+ + "creation request since no provider found for given route=" + route);
mSessionCreationRequests.remove(matchingRequest);
notifyRequestFailedToManager(matchingRequest.mRequestedManagerRecord.mManager,
toOriginalRequestId(uniqueRequestId), REASON_ROUTE_NOT_AVAILABLE);
@@ -1468,7 +1470,7 @@ class MediaRouter2ServiceImpl {
int volume) {
final MediaRoute2Provider provider = findProvider(route.getProviderId());
if (provider == null) {
- Slog.w(TAG, "setRouteVolume: couldn't find provider for route=" + route);
+ Slog.w(TAG, "setRouteVolumeOnHandler: Couldn't find provider for route=" + route);
return;
}
provider.setRouteVolume(uniqueRequestId, route.getOriginalId(), volume);
@@ -1478,8 +1480,8 @@ class MediaRouter2ServiceImpl {
@NonNull String uniqueSessionId, int volume) {
final MediaRoute2Provider provider = findProvider(getProviderId(uniqueSessionId));
if (provider == null) {
- Slog.w(TAG, "setSessionVolume: couldn't find provider for session "
- + "id=" + uniqueSessionId);
+ Slog.w(TAG, "setSessionVolumeOnHandler: Couldn't find provider for session id="
+ + uniqueSessionId);
return;
}
provider.setSessionVolume(uniqueRequestId, getOriginalId(uniqueSessionId), volume);
@@ -1599,7 +1601,8 @@ class MediaRouter2ServiceImpl {
RouterRecord routerRecord = mSessionToRouterMap.get(sessionInfo.getId());
if (routerRecord == null) {
- Slog.w(TAG, "No matching router found for session=" + sessionInfo);
+ Slog.w(TAG, "onSessionInfoChangedOnHandler: No matching router found for session="
+ + sessionInfo);
return;
}
notifySessionInfoChangedToRouter(routerRecord, sessionInfo);
@@ -1612,7 +1615,8 @@ class MediaRouter2ServiceImpl {
RouterRecord routerRecord = mSessionToRouterMap.get(sessionInfo.getId());
if (routerRecord == null) {
- Slog.w(TAG, "No matching router found for session=" + sessionInfo);
+ Slog.w(TAG, "onSessionReleasedOnHandler: No matching router found for session="
+ + sessionInfo);
return;
}
notifySessionReleasedToRouter(routerRecord, sessionInfo);
@@ -1789,7 +1793,7 @@ class MediaRouter2ServiceImpl {
currentRoutes.addAll(systemProviderInfo.getRoutes());
} else {
// This shouldn't happen.
- Slog.w(TAG, "notifyRoutesToRouter: System route provider not found.");
+ Slog.wtf(TAG, "System route provider not found.");
}
currentSystemSessionInfo = mSystemProvider.getSessionInfos().get(0);
} else {
diff --git a/services/core/java/com/android/server/media/MediaRouterService.java b/services/core/java/com/android/server/media/MediaRouterService.java
index bf2cc5e68fac..3337b480d6a8 100644
--- a/services/core/java/com/android/server/media/MediaRouterService.java
+++ b/services/core/java/com/android/server/media/MediaRouterService.java
@@ -891,8 +891,24 @@ public final class MediaRouterService extends IMediaRouterService.Stub
if (intent.getAction().equals(BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED)) {
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
synchronized (mLock) {
+ boolean wasA2dpOn = mGlobalBluetoothA2dpOn;
mActiveBluetoothDevice = btDevice;
mGlobalBluetoothA2dpOn = btDevice != null;
+ if (wasA2dpOn != mGlobalBluetoothA2dpOn) {
+ UserRecord userRecord = mUserRecords.get(mCurrentUserId);
+ if (userRecord != null) {
+ for (ClientRecord cr : userRecord.mClientRecords) {
+ // mSelectedRouteId will be null for BT and phone speaker.
+ if (cr.mSelectedRouteId == null) {
+ try {
+ cr.mClient.onGlobalA2dpChanged(mGlobalBluetoothA2dpOn);
+ } catch (RemoteException e) {
+ // Ignore exception
+ }
+ }
+ }
+ }
+ }
}
}
}
diff --git a/services/core/java/com/android/server/net/NetworkStatsSubscriptionsMonitor.java b/services/core/java/com/android/server/net/NetworkStatsSubscriptionsMonitor.java
index 0bdf3f22ee9a..a0ab5eae7315 100644
--- a/services/core/java/com/android/server/net/NetworkStatsSubscriptionsMonitor.java
+++ b/services/core/java/com/android/server/net/NetworkStatsSubscriptionsMonitor.java
@@ -28,6 +28,7 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.CollectionUtils;
import java.util.ArrayList;
@@ -38,8 +39,6 @@ import java.util.concurrent.Executor;
/**
* Helper class that watches for events that are triggered per subscription.
*/
-// TODO (b/152176562): Write tests to verify subscription changes generate corresponding
-// register/unregister calls.
public class NetworkStatsSubscriptionsMonitor extends
SubscriptionManager.OnSubscriptionsChangedListener {
@@ -207,5 +206,10 @@ public class NetworkStatsSubscriptionsMonitor extends
mLastCollapsedRatType = collapsedRatType;
mMonitor.mDelegate.onCollapsedRatTypeChanged(mSubscriberId, mLastCollapsedRatType);
}
+
+ @VisibleForTesting
+ public int getSubId() {
+ return mSubId;
+ }
}
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index a9139adff4f9..b64e99168445 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2048,12 +2048,15 @@ public class NotificationManagerService extends SystemService {
mStripRemoteViewsSizeBytes = getContext().getResources().getInteger(
com.android.internal.R.integer.config_notificationStripRemoteViewSizeBytes);
- mMsgPkgsAllowedAsConvos = Set.of(
- getContext().getResources().getStringArray(
- com.android.internal.R.array.config_notificationMsgPkgsAllowedAsConvos));
+ mMsgPkgsAllowedAsConvos = Set.of(getStringArrayResource(
+ com.android.internal.R.array.config_notificationMsgPkgsAllowedAsConvos));
mStatsManager = statsManager;
}
+ protected String[] getStringArrayResource(int key) {
+ return getContext().getResources().getStringArray(key);
+ }
+
@Override
public void onStart() {
SnoozeHelper snoozeHelper = new SnoozeHelper(getContext(), (userId, r, muteOnReturn) -> {
@@ -2741,10 +2744,7 @@ public class NotificationManagerService extends SystemService {
}
protected void maybeRegisterMessageSent(NotificationRecord r) {
- Context appContext = r.getSbn().getPackageContext(getContext());
- Notification.Builder nb =
- Notification.Builder.recoverBuilder(appContext, r.getNotification());
- if (nb.getStyle() instanceof Notification.MessagingStyle) {
+ if (r.isConversation()) {
if (r.getShortcutInfo() != null) {
if (mPreferencesHelper.setValidMessageSent(
r.getSbn().getPackageName(), r.getUid())) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 5e5274849fcd..ae8b3a0e9acc 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -11067,7 +11067,7 @@ public class PackageManagerService extends IPackageManager.Stub
} else {
pkgSetting = result.pkgSetting;
if (originalPkgSetting != null) {
- mSettings.addRenamedPackageLPw(parsedPackage.getPackageName(),
+ mSettings.addRenamedPackageLPw(parsedPackage.getRealPackage(),
originalPkgSetting.name);
mTransferredPackages.add(originalPkgSetting.name);
}
@@ -11176,7 +11176,7 @@ public class PackageManagerService extends IPackageManager.Stub
@GuardedBy("mLock")
private @Nullable PackageSetting getOriginalPackageLocked(@NonNull AndroidPackage pkg,
@Nullable String renamedPkgName) {
- if (!isPackageRenamed(pkg, renamedPkgName)) {
+ if (isPackageRenamed(pkg, renamedPkgName)) {
return null;
}
for (int i = ArrayUtils.size(pkg.getOriginalPackages()) - 1; i >= 0; --i) {
@@ -13518,6 +13518,17 @@ public class PackageManagerService extends IPackageManager.Stub
removeSuspensionsBySuspendingPackage(allPackages, suspendingPackage::equals, userId);
}
+ boolean isSuspendingAnyPackages(String suspendingPackage, int userId) {
+ synchronized (mLock) {
+ for (final PackageSetting ps : mSettings.mPackages.values()) {
+ if (ps.isSuspendedBy(suspendingPackage, userId)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* Removes any suspensions on given packages that were added by packages that pass the given
* predicate.
@@ -23913,7 +23924,6 @@ public class PackageManagerService extends IPackageManager.Stub
callingUid);
}
-
@Override
public boolean isPlatformSigned(String packageName) {
PackageSetting packageSetting = mSettings.mPackages.get(packageName);
@@ -25018,6 +25028,16 @@ public class PackageManagerService extends IPackageManager.Stub
mSettings.writePackageRestrictionsLPr(userId);
}
}
+
+ @Override
+ public void unsuspendForSuspendingPackage(final String packageName, int affectedUser) {
+ PackageManagerService.this.unsuspendForSuspendingPackage(packageName, affectedUser);
+ }
+
+ @Override
+ public boolean isSuspendingAnyPackages(String suspendingPackage, int userId) {
+ return PackageManagerService.this.isSuspendingAnyPackages(suspendingPackage, userId);
+ }
}
@GuardedBy("mLock")
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java
index 00a5fe766593..834303cc14c6 100644
--- a/services/core/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/core/java/com/android/server/pm/PackageSettingBase.java
@@ -422,6 +422,11 @@ public abstract class PackageSettingBase extends SettingBase {
return readUserState(userId).suspended;
}
+ boolean isSuspendedBy(String suspendingPackage, int userId) {
+ final PackageUserState state = readUserState(userId);
+ return state.suspendParams != null && state.suspendParams.containsKey(suspendingPackage);
+ }
+
void addOrUpdateSuspension(String suspendingPackage, SuspendDialogInfo dialogInfo,
PersistableBundle appExtras, PersistableBundle launcherExtras, int userId) {
final PackageUserState existingUserState = modifyUserState(userId);
diff --git a/services/core/java/com/android/server/pm/TEST_MAPPING b/services/core/java/com/android/server/pm/TEST_MAPPING
index 2614076e9b6c..eb51cc3cd25c 100644
--- a/services/core/java/com/android/server/pm/TEST_MAPPING
+++ b/services/core/java/com/android/server/pm/TEST_MAPPING
@@ -69,6 +69,9 @@
"exclude-annotation": "androidx.test.filters.Suppress"
}
]
+ },
+ {
+ "name": "PackageManagerServiceHostTests"
}
],
"postsubmit": [
diff --git a/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java b/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java
index 7c89b9850c5d..492b84a0a84b 100644
--- a/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java
+++ b/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java
@@ -363,7 +363,8 @@ class UserSystemPackageInstaller {
pmInt.forEachPackage(pkg -> {
if (!pkg.isSystem()) return;
final String pkgName = pkg.getManifestPackageName();
- if (!allWhitelistedPackages.contains(pkgName)) {
+ if (!allWhitelistedPackages.contains(pkgName)
+ && !isAutoGeneratedRRO(pmInt.getPackage(pkgName))) {
errors.add(String.format(logMessageFmt, pkgName));
}
});
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java
index 0b95be15f157..8f0fd607f928 100644
--- a/services/core/java/com/android/server/power/Notifier.java
+++ b/services/core/java/com/android/server/power/Notifier.java
@@ -616,6 +616,7 @@ public class Notifier {
} catch (RemoteException ex) {
// Ignore
}
+ FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_WAKE_REPORTED, reason);
}
/**
diff --git a/services/core/java/com/android/server/slice/SliceClientPermissions.java b/services/core/java/com/android/server/slice/SliceClientPermissions.java
index ab94a59c4d9c..e241205cfb99 100644
--- a/services/core/java/com/android/server/slice/SliceClientPermissions.java
+++ b/services/core/java/com/android/server/slice/SliceClientPermissions.java
@@ -160,6 +160,9 @@ public class SliceClientPermissions implements DirtyTracker, Persistable {
// Get to the beginning of the provider.
while (parser.getEventType() != XmlPullParser.START_TAG
|| !TAG_CLIENT.equals(parser.getName())) {
+ if (parser.getEventType() == XmlPullParser.END_DOCUMENT) {
+ throw new XmlPullParserException("Can't find client tag in xml");
+ }
parser.next();
}
int depth = parser.getDepth();
@@ -173,6 +176,9 @@ public class SliceClientPermissions implements DirtyTracker, Persistable {
parser.next();
while (parser.getDepth() > depth) {
+ if (parser.getEventType() == XmlPullParser.END_DOCUMENT) {
+ return provider;
+ }
if (parser.getEventType() == XmlPullParser.START_TAG
&& TAG_AUTHORITY.equals(parser.getName())) {
try {
diff --git a/services/core/java/com/android/server/slice/SlicePermissionManager.java b/services/core/java/com/android/server/slice/SlicePermissionManager.java
index 1d1c28f5f9b7..343d2e353abb 100644
--- a/services/core/java/com/android/server/slice/SlicePermissionManager.java
+++ b/services/core/java/com/android/server/slice/SlicePermissionManager.java
@@ -130,7 +130,7 @@ public class SlicePermissionManager implements DirtyTracker {
}
SliceClientPermissions client = getClient(pkgUser);
client.clear();
- mHandler.obtainMessage(H.MSG_REMOVE, pkgUser);
+ mHandler.obtainMessage(H.MSG_REMOVE, pkgUser).sendToTarget();
}
public String[] getAllPackagesGranted(String pkg) {
diff --git a/services/core/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java b/services/core/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java
index 2f963b7e6b35..522e5e189232 100644
--- a/services/core/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java
+++ b/services/core/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java
@@ -20,8 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.hardware.soundtrigger.V2_1.ISoundTriggerHwCallback;
import android.hardware.soundtrigger.V2_2.ISoundTriggerHw;
-import android.media.audio.common.AudioConfig;
-import android.media.audio.common.AudioOffloadInfo;
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
import android.media.soundtrigger_middleware.ISoundTriggerModule;
import android.media.soundtrigger_middleware.ModelParameterRange;
@@ -30,6 +28,7 @@ import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
import android.media.soundtrigger_middleware.PhraseSoundModel;
import android.media.soundtrigger_middleware.RecognitionConfig;
import android.media.soundtrigger_middleware.RecognitionEvent;
+import android.media.soundtrigger_middleware.RecognitionStatus;
import android.media.soundtrigger_middleware.SoundModel;
import android.media.soundtrigger_middleware.SoundModelType;
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
@@ -579,7 +578,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
@NonNull ISoundTriggerHwCallback.RecognitionEvent recognitionEvent,
int cookie) {
synchronized (SoundTriggerModule.this) {
- android.media.soundtrigger_middleware.RecognitionEvent aidlEvent =
+ RecognitionEvent aidlEvent =
ConversionUtil.hidl2aidlRecognitionEvent(recognitionEvent);
aidlEvent.captureSession = mSession.mSessionHandle;
try {
@@ -589,8 +588,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
// In any case, client callbacks are considered best effort.
Log.e(TAG, "Client callback execption.", e);
}
- if (aidlEvent.status
- != android.media.soundtrigger_middleware.RecognitionStatus.FORCED) {
+ if (aidlEvent.status != RecognitionStatus.FORCED) {
setState(ModelState.LOADED);
}
}
@@ -601,7 +599,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
@NonNull ISoundTriggerHwCallback.PhraseRecognitionEvent phraseRecognitionEvent,
int cookie) {
synchronized (SoundTriggerModule.this) {
- android.media.soundtrigger_middleware.PhraseRecognitionEvent aidlEvent =
+ PhraseRecognitionEvent aidlEvent =
ConversionUtil.hidl2aidlPhraseRecognitionEvent(phraseRecognitionEvent);
aidlEvent.common.captureSession = mSession.mSessionHandle;
try {
@@ -611,8 +609,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
// In any case, client callbacks are considered best effort.
Log.e(TAG, "Client callback execption.", e);
}
- if (aidlEvent.common.status
- != android.media.soundtrigger_middleware.RecognitionStatus.FORCED) {
+ if (aidlEvent.common.status != RecognitionStatus.FORCED) {
setState(ModelState.LOADED);
}
}
@@ -623,15 +620,13 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
/**
* Creates a default-initialized recognition event.
*
- * Object fields are default constructed.
- * Array fields are initialized to 0 length.
+ * Non-nullable object fields are default constructed.
+ * Non-nullable array fields are initialized to 0 length.
*
* @return The event.
*/
private static RecognitionEvent newEmptyRecognitionEvent() {
RecognitionEvent result = new RecognitionEvent();
- result.audioConfig = new AudioConfig();
- result.audioConfig.offloadInfo = new AudioOffloadInfo();
result.data = new byte[0];
return result;
}
@@ -639,8 +634,8 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient {
/**
* Creates a default-initialized phrase recognition event.
*
- * Object fields are default constructed.
- * Array fields are initialized to 0 length.
+ * Non-nullable object fields are default constructed.
+ * Non-nullable array fields are initialized to 0 length.
*
* @return The event.
*/
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index c2bae1a8962b..7fe21e32cbaf 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -209,14 +209,6 @@ public class StatsPullAtomService extends SystemService {
// Random seed stable for StatsPullAtomService life cycle - can be used for stable sampling
private static final int RANDOM_SEED = new Random().nextInt();
- /**
- * Lowest available uid for apps.
- *
- * <p>Used to quickly discard memory snapshots of the zygote forks from native process
- * measurements.
- */
- private static final int MIN_APP_UID = 10_000;
-
private static final int DIMENSION_KEY_SIZE_HARD_LIMIT = 800;
private static final int DIMENSION_KEY_SIZE_SOFT_LIMIT = 500;
private static final long APP_OPS_SAMPLING_INITIALIZATION_DELAY_MILLIS = 45000;
@@ -1819,10 +1811,6 @@ public class StatsPullAtomService extends SystemService {
return StatsManager.PULL_SUCCESS;
}
- private static boolean isAppUid(int uid) {
- return uid >= MIN_APP_UID;
- }
-
private void registerProcessMemoryHighWaterMark() {
int tagId = FrameworkStatsLog.PROCESS_MEMORY_HIGH_WATER_MARK;
mStatsManager.setPullAtomCallback(
@@ -1859,7 +1847,7 @@ public class StatsPullAtomService extends SystemService {
int size = processCmdlines.size();
for (int i = 0; i < size; ++i) {
final MemorySnapshot snapshot = readMemorySnapshotFromProcfs(processCmdlines.keyAt(i));
- if (snapshot == null || isAppUid(snapshot.uid)) {
+ if (snapshot == null) {
continue;
}
StatsEvent e = StatsEvent.newBuilder()
@@ -1920,7 +1908,7 @@ public class StatsPullAtomService extends SystemService {
for (int i = 0; i < size; ++i) {
int pid = processCmdlines.keyAt(i);
final MemorySnapshot snapshot = readMemorySnapshotFromProcfs(pid);
- if (snapshot == null || isAppUid(snapshot.uid)) {
+ if (snapshot == null) {
continue;
}
StatsEvent e = StatsEvent.newBuilder()
@@ -3577,7 +3565,16 @@ public class StatsPullAtomService extends SystemService {
private void processHistoricalOp(AppOpsManager.HistoricalOp op,
List<AppOpEntry> opsList, int uid, int samplingRatio, String packageName,
@Nullable String attributionTag) {
- AppOpEntry entry = new AppOpEntry(packageName, attributionTag, op, uid);
+ int firstChar = 0;
+ if (attributionTag != null && attributionTag.startsWith(packageName)) {
+ firstChar = packageName.length();
+ if (firstChar < attributionTag.length() && attributionTag.charAt(firstChar) == '.') {
+ firstChar++;
+ }
+ }
+ AppOpEntry entry = new AppOpEntry(packageName,
+ attributionTag == null ? null : attributionTag.substring(firstChar), op,
+ uid);
if (entry.mHash < samplingRatio) {
opsList.add(entry);
}
diff --git a/services/core/java/com/android/server/textclassifier/FixedSizeQueue.java b/services/core/java/com/android/server/textclassifier/FixedSizeQueue.java
new file mode 100644
index 000000000000..edb258db88c8
--- /dev/null
+++ b/services/core/java/com/android/server/textclassifier/FixedSizeQueue.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.textclassifier;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.Preconditions;
+
+import java.util.ArrayDeque;
+import java.util.Objects;
+import java.util.Queue;
+
+/**
+ * A fixed-size queue which automatically evicts the oldest element from the queue when it is full.
+ *
+ * <p>This class does not accept null element.
+ *
+ * @param <E> the type of elements held in this queue
+ */
+@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+public final class FixedSizeQueue<E> {
+
+ private final Queue<E> mDelegate;
+
+ @Nullable
+ private final OnEntryEvictedListener<E> mOnEntryEvictedListener;
+
+ private final int mMaxSize;
+
+ public FixedSizeQueue(int maxSize, @Nullable OnEntryEvictedListener<E> onEntryEvictedListener) {
+ Preconditions.checkArgument(maxSize > 0, "maxSize (%s) must > 0", maxSize);
+ mDelegate = new ArrayDeque<>(maxSize);
+ mMaxSize = maxSize;
+ mOnEntryEvictedListener = onEntryEvictedListener;
+ }
+
+ /** Returns the number of items in the queue. */
+ public int size() {
+ return mDelegate.size();
+ }
+
+ /** Adds an element to the queue, evicts the oldest element if it reaches its max capacity. */
+ public boolean add(@NonNull E element) {
+ Objects.requireNonNull(element);
+ if (size() == mMaxSize) {
+ E removed = mDelegate.remove();
+ if (mOnEntryEvictedListener != null) {
+ mOnEntryEvictedListener.onEntryEvicted(removed);
+ }
+ }
+ mDelegate.add(element);
+ return true;
+ }
+
+ /**
+ * Returns and removes the head of the queue, or returns null if this queue is empty.
+ */
+ @Nullable
+ public E poll() {
+ return mDelegate.poll();
+ }
+
+ /**
+ * Removes an element from the queue, returns a boolean to indicate if an element is removed.
+ */
+ public boolean remove(@NonNull E element) {
+ Objects.requireNonNull(element);
+ return mDelegate.remove(element);
+ }
+
+ /** Returns whether the queue is empty. */
+ public boolean isEmpty() {
+ return mDelegate.isEmpty();
+ }
+
+ /**
+ * A listener to get notified when an element is evicted.
+ *
+ * @param <E> the type of element
+ */
+ public interface OnEntryEvictedListener<E> {
+ /**
+ * Notifies that an element is evicted because the queue is reaching its max capacity.
+ */
+ void onEntryEvicted(@NonNull E element);
+ }
+}
diff --git a/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java b/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java
index 1c96a2e8c5c2..1707d9542813 100644
--- a/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java
+++ b/services/core/java/com/android/server/textclassifier/TextClassificationManagerService.java
@@ -41,6 +41,7 @@ import android.service.textclassifier.TextClassifierService;
import android.service.textclassifier.TextClassifierService.ConnectionState;
import android.text.TextUtils;
import android.util.ArrayMap;
+import android.util.LruCache;
import android.util.Slog;
import android.util.SparseArray;
import android.view.textclassifier.ConversationAction;
@@ -68,12 +69,10 @@ import com.android.server.SystemService;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.Queue;
/**
* A manager for TextClassifier services.
@@ -308,13 +307,15 @@ public final class TextClassificationManagerService extends ITextClassifierServi
Objects.requireNonNull(classificationContext);
Objects.requireNonNull(classificationContext.getSystemTextClassifierMetadata());
+ synchronized (mLock) {
+ mSessionCache.put(sessionId, classificationContext);
+ }
handleRequest(
classificationContext.getSystemTextClassifierMetadata(),
/* verifyCallingPackage= */ true,
/* attemptToBind= */ false,
service -> {
service.onCreateTextClassificationSession(classificationContext, sessionId);
- mSessionCache.put(sessionId, classificationContext);
},
"onCreateTextClassificationSession",
NO_OP_CALLBACK);
@@ -588,12 +589,14 @@ public final class TextClassificationManagerService extends ITextClassifierServi
* are cleaned up automatically when the client process is dead.
*/
static final class SessionCache {
+ private static final int MAX_CACHE_SIZE = 100;
+
@NonNull
private final Object mLock;
@NonNull
@GuardedBy("mLock")
- private final Map<TextClassificationSessionId, StrippedTextClassificationContext> mCache =
- new ArrayMap<>();
+ private final LruCache<TextClassificationSessionId, StrippedTextClassificationContext>
+ mCache = new LruCache<>(MAX_CACHE_SIZE);
@NonNull
@GuardedBy("mLock")
private final Map<TextClassificationSessionId, DeathRecipient> mDeathRecipients =
@@ -775,6 +778,8 @@ public final class TextClassificationManagerService extends ITextClassifierServi
}
private final class ServiceState {
+ private static final int MAX_PENDING_REQUESTS = 20;
+
@UserIdInt
final int mUserId;
@NonNull
@@ -786,7 +791,15 @@ public final class TextClassificationManagerService extends ITextClassifierServi
final int mBindServiceFlags;
@NonNull
@GuardedBy("mLock")
- final Queue<PendingRequest> mPendingRequests = new ArrayDeque<>();
+ final FixedSizeQueue<PendingRequest> mPendingRequests =
+ new FixedSizeQueue<>(MAX_PENDING_REQUESTS,
+ request -> {
+ Slog.w(LOG_TAG,
+ String.format("Pending request[%s] is dropped", request.mName));
+ if (request.mOnServiceFailure != null) {
+ request.mOnServiceFailure.run();
+ }
+ });
@Nullable
@GuardedBy("mLock")
ITextClassifierService mService;
@@ -910,7 +923,7 @@ public final class TextClassificationManagerService extends ITextClassifierServi
pw.printPair("bindServiceFlags", mBindServiceFlags);
pw.printPair("boundServiceUid", mBoundServiceUid);
pw.printPair("binding", mBinding);
- pw.printPair("numberRequests", mPendingRequests.size());
+ pw.printPair("numOfPendingRequests", mPendingRequests.size());
}
}
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index be2f9d410475..01eb9c5cb3d9 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -311,7 +311,6 @@ import com.android.server.uri.UriPermissionOwner;
import com.android.server.wm.ActivityMetricsLogger.TransitionInfoSnapshot;
import com.android.server.wm.ActivityStack.ActivityState;
import com.android.server.wm.SurfaceAnimator.AnimationType;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import com.android.server.wm.WindowManagerService.H;
import com.android.server.wm.utils.InsetUtils;
@@ -4166,14 +4165,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
@Override
- boolean applyAnimation(WindowManager.LayoutParams lp, int transit, boolean enter,
- boolean isVoiceInteraction,
- @Nullable OnAnimationFinishedCallback animationFinishedCallback) {
+ boolean applyAnimation(LayoutParams lp, int transit, boolean enter,
+ boolean isVoiceInteraction, @Nullable ArrayList<WindowContainer> sources) {
if (mUseTransferredAnimation) {
return false;
}
- return super.applyAnimation(lp, transit, enter, isVoiceInteraction,
- animationFinishedCallback);
+ return super.applyAnimation(lp, transit, enter, isVoiceInteraction, sources);
}
/**
diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java
index 67fe9685fd2a..d60d098071cc 100644
--- a/services/core/java/com/android/server/wm/AppTransitionController.java
+++ b/services/core/java/com/android/server/wm/AppTransitionController.java
@@ -49,7 +49,7 @@ import static com.android.server.wm.ActivityTaskManagerInternal.APP_TRANSITION_W
import static com.android.server.wm.AppTransition.isKeyguardGoingAwayTransit;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS_ANIM;
-import static com.android.server.wm.WindowContainer.AnimationFlags.CHILDREN;
+import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.WindowContainer.AnimationFlags.PARENTS;
import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -75,7 +75,6 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.function.Predicate;
-
/**
* Checks for app transition readiness, resolves animation attributes and performs visibility
* change for apps that animate as part of an app transition.
@@ -375,18 +374,14 @@ public class AppTransitionController {
// triggers WC#onAnimationFinished only on the promoted target. So we need to take care
// of triggering AR#onAnimationFinished on each ActivityRecord which is a part of the
// app transition.
- final ArrayList<ActivityRecord> transitioningDecendants = new ArrayList<>();
+ final ArrayList<ActivityRecord> transitioningDescendants = new ArrayList<>();
for (int j = 0; j < apps.size(); ++j) {
final ActivityRecord app = apps.valueAt(j);
if (app.isDescendantOf(wc)) {
- transitioningDecendants.add(app);
+ transitioningDescendants.add(app);
}
}
- wc.applyAnimation(animLp, transit, visible, voiceInteraction, (type, anim) -> {
- for (int j = 0; j < transitioningDecendants.size(); ++j) {
- transitioningDecendants.get(j).onAnimationFinished(type, anim);
- }
- });
+ wc.applyAnimation(animLp, transit, visible, voiceInteraction, transitioningDescendants);
}
}
@@ -540,7 +535,14 @@ public class AppTransitionController {
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS, "Now opening app %s", app);
app.commitVisibility(true /* visible */, false /* performLayout */);
- if (!app.isAnimating(PARENTS | CHILDREN)) {
+
+ // In case a trampoline activity is used, it can happen that a new ActivityRecord is
+ // added and a new app transition starts before the previous app transition animation
+ // ends. So we cannot simply use app.isAnimating(PARENTS) to determine if the app must
+ // to be added to the list of tokens to be notified of app transition complete.
+ final WindowContainer wc = app.getAnimatingContainer(PARENTS,
+ ANIMATION_TYPE_APP_TRANSITION);
+ if (wc == null || !wc.getAnimationSources().contains(app)) {
// This token isn't going to be animating. Add it to the list of tokens to
// be notified of app transition complete since the notification will not be
// sent be the app window animator.
@@ -599,8 +601,7 @@ public class AppTransitionController {
for (int i = 0; i < appsCount; i++) {
WindowContainer wc = apps.valueAt(i);
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS, "Now changing app %s", wc);
- wc.applyAnimation(null, transit, true, false,
- null /* animationFinishedCallback */);
+ wc.applyAnimation(null, transit, true, false, null /* sources */);
}
}
diff --git a/services/core/java/com/android/server/wm/Dimmer.java b/services/core/java/com/android/server/wm/Dimmer.java
index fdcc3f4d1510..d43a7b87ee35 100644
--- a/services/core/java/com/android/server/wm/Dimmer.java
+++ b/services/core/java/com/android/server/wm/Dimmer.java
@@ -22,7 +22,6 @@ import static com.android.server.wm.AlphaAnimationSpecProto.TO;
import static com.android.server.wm.AnimationSpecProto.ALPHA;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_DIMMER;
-import android.annotation.Nullable;
import android.graphics.Rect;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
@@ -31,7 +30,6 @@ import android.view.SurfaceControl;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.wm.SurfaceAnimator.AnimationType;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import java.io.PrintWriter;
@@ -160,8 +158,7 @@ class Dimmer {
@VisibleForTesting
interface SurfaceAnimatorStarter {
void startAnimation(SurfaceAnimator surfaceAnimator, SurfaceControl.Transaction t,
- AnimationAdapter anim, boolean hidden, @AnimationType int type,
- @Nullable OnAnimationFinishedCallback animationFinishedCallback);
+ AnimationAdapter anim, boolean hidden, @AnimationType int type);
}
Dimmer(WindowContainer host) {
@@ -348,7 +345,7 @@ class Dimmer {
mSurfaceAnimatorStarter.startAnimation(animator, t, new LocalAnimationAdapter(
new AlphaAnimationSpec(startAlpha, endAlpha, getDimDuration(container)),
mHost.mWmService.mSurfaceAnimationRunner), false /* hidden */,
- ANIMATION_TYPE_DIMMER, null /* animationFinishedCallback */);
+ ANIMATION_TYPE_DIMMER);
}
private long getDimDuration(WindowContainer container) {
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index 6a4975950f1a..c8d9fe0f0a65 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -280,7 +280,7 @@ class InsetsSourceProvider {
}
final Transaction t = mDisplayContent.getPendingTransaction();
mWin.startAnimation(t, mAdapter, !mClientVisible /* hidden */,
- ANIMATION_TYPE_INSETS_CONTROL, null /* animationFinishedCallback */);
+ ANIMATION_TYPE_INSETS_CONTROL);
// The leash was just created. We cannot dispatch it until its surface transaction is
// applied. Otherwise, the client's operation to the leash might be overwritten by us.
diff --git a/services/core/java/com/android/server/wm/InsetsStateController.java b/services/core/java/com/android/server/wm/InsetsStateController.java
index 77bc37f0c2d7..bf9a78489167 100644
--- a/services/core/java/com/android/server/wm/InsetsStateController.java
+++ b/services/core/java/com/android/server/wm/InsetsStateController.java
@@ -178,6 +178,7 @@ class InsetsStateController {
if (imeSource != null && imeSource.isVisible()) {
imeSource = new InsetsSource(imeSource);
imeSource.setVisible(false);
+ imeSource.setFrame(0, 0, 0, 0);
state = new InsetsState(state);
state.addSource(imeSource);
}
diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java
index 1cd94b40f660..24bb7c8d5560 100644
--- a/services/core/java/com/android/server/wm/RecentTasks.java
+++ b/services/core/java/com/android/server/wm/RecentTasks.java
@@ -1341,6 +1341,17 @@ class RecentTasks {
break;
}
+ // Tasks managed by/associated with an ActivityView should be excluded from recents.
+ // singleTaskInstance is set on the VirtualDisplay managed by ActivityView
+ // TODO(b/126185105): Find a different signal to use besides isSingleTaskInstance
+ final ActivityStack stack = task.getStack();
+ if (stack != null) {
+ DisplayContent display = stack.getDisplay();
+ if (display != null && display.isSingleTaskInstance()) {
+ return false;
+ }
+ }
+
// If we're in lock task mode, ignore the root task
if (task == mService.getLockTaskController().getRootTask()) {
return false;
diff --git a/services/core/java/com/android/server/wm/ShellRoot.java b/services/core/java/com/android/server/wm/ShellRoot.java
index 7a38bb65f73b..0ae9ca9b882e 100644
--- a/services/core/java/com/android/server/wm/ShellRoot.java
+++ b/services/core/java/com/android/server/wm/ShellRoot.java
@@ -104,7 +104,7 @@ public class ShellRoot {
0 /* windowCornerRadius */),
mDisplayContent.mWmService.mSurfaceAnimationRunner);
mToken.startAnimation(mToken.getPendingTransaction(), adapter, false /* hidden */,
- ANIMATION_TYPE_WINDOW_ANIMATION, null /* animationFinishedCallback */);
+ ANIMATION_TYPE_WINDOW_ANIMATION);
}
WindowInfo getWindowInfo() {
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 3ee7ee7a4276..56ad9643e619 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -85,7 +85,6 @@ import static com.android.server.wm.IdentifierProto.TITLE;
import static com.android.server.wm.IdentifierProto.USER_ID;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ADD_REMOVE;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_RECENTS_ANIMATIONS;
-import static com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import static com.android.server.wm.WindowContainer.AnimationFlags.CHILDREN;
import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;
import static com.android.server.wm.WindowContainerChildProto.TASK;
@@ -1436,15 +1435,6 @@ class Task extends WindowContainer<WindowContainer> {
mAtmService.getTaskChangeNotificationController().notifyTaskStackChanged();
}
- final boolean isRootTask = isRootTask();
- if (isRootTask) {
- final DisplayContent display = getDisplayContent();
- if (display.isSingleTaskInstance()) {
- mAtmService.notifySingleTaskDisplayEmpty(display.mDisplayId);
- }
- display.mDisplayContent.setLayoutNeeded();
- }
-
if (hasChild()) {
updateEffectiveIntent();
@@ -1465,7 +1455,7 @@ class Task extends WindowContainer<WindowContainer> {
} else if (!mReuseTask && !mCreatedByOrganizer) {
// Remove entire task if it doesn't have any activity left and it isn't marked for reuse
// or created by task organizer.
- if (!isRootTask) {
+ if (!isRootTask()) {
getStack().removeChild(this, reason);
}
EventLogTags.writeWmTaskRemoved(mTaskId,
@@ -2817,6 +2807,10 @@ class Task extends WindowContainer<WindowContainer> {
if (DEBUG_STACK) Slog.i(TAG, "removeTask: removing taskId=" + mTaskId);
EventLogTags.writeWmTaskRemoved(mTaskId, "removeTask");
+ if (mDisplayContent != null && mDisplayContent.isSingleTaskInstance()) {
+ mAtmService.notifySingleTaskDisplayEmpty(mDisplayContent.mDisplayId);
+ }
+
// If applicable let the TaskOrganizer know the Task is vanishing.
setTaskOrganizer(null);
@@ -3500,7 +3494,7 @@ class Task extends WindowContainer<WindowContainer> {
@Override
protected void applyAnimationUnchecked(WindowManager.LayoutParams lp, boolean enter,
int transit, boolean isVoiceInteraction,
- @Nullable OnAnimationFinishedCallback finishedCallback) {
+ @Nullable ArrayList<WindowContainer> sources) {
final RecentsAnimationController control = mWmService.getRecentsAnimationController();
if (control != null) {
// We let the transition to be controlled by RecentsAnimation, and callback task's
@@ -3509,10 +3503,14 @@ class Task extends WindowContainer<WindowContainer> {
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
"applyAnimationUnchecked, control: %s, task: %s, transit: %s",
control, asTask(), AppTransition.appTransitionToString(transit));
- control.addTaskToTargets(this, finishedCallback);
+ control.addTaskToTargets(this, (type, anim) -> {
+ for (int i = 0; i < sources.size(); ++i) {
+ sources.get(i).onAnimationFinished(type, anim);
+ }
+ });
}
} else {
- super.applyAnimationUnchecked(lp, enter, transit, isVoiceInteraction, finishedCallback);
+ super.applyAnimationUnchecked(lp, enter, transit, isVoiceInteraction, sources);
}
}
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 90156fd4f475..6406f0ae51a6 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -64,6 +64,7 @@ import android.graphics.Rect;
import android.os.Debug;
import android.os.IBinder;
import android.os.Trace;
+import android.util.ArraySet;
import android.util.Pair;
import android.util.Pools;
import android.util.Slog;
@@ -181,6 +182,14 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
final SurfaceFreezer mSurfaceFreezer;
protected final WindowManagerService mWmService;
+ /**
+ * Sources which triggered a surface animation on this container. An animation target can be
+ * promoted to higher level, for example, from a set of {@link ActivityRecord}s to
+ * {@link ActivityStack}. In this case, {@link ActivityRecord}s are set on this variable while
+ * the animation is running, and reset after finishing it.
+ */
+ private final ArraySet<WindowContainer> mSurfaceAnimationSources = new ArraySet<>();
+
private final Point mTmpPos = new Point();
protected final Point mLastSurfacePosition = new Point();
@@ -193,8 +202,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
*/
private boolean mCommittedReparentToAnimationLeash;
- private final Configuration mTmpConfig = new Configuration();
-
/** Interface for {@link #isAnimating} to check which cases for the container is animating. */
public interface AnimationFlags {
/**
@@ -872,29 +879,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* @see AnimationFlags#PARENTS
* @see AnimationFlags#CHILDREN
*/
- boolean isAnimating(int flags, int typesToCheck) {
- int animationType = mSurfaceAnimator.getAnimationType();
- if (mSurfaceAnimator.isAnimating() && (animationType & typesToCheck) > 0) {
- return true;
- }
- if ((flags & TRANSITION) != 0 && isWaitingForTransitionStart()) {
- return true;
- }
- if ((flags & PARENTS) != 0) {
- final WindowContainer parent = getParent();
- if (parent != null && parent.isAnimating(flags & ~CHILDREN, typesToCheck)) {
- return true;
- }
- }
- if ((flags & CHILDREN) != 0) {
- for (int i = 0; i < mChildren.size(); ++i) {
- final WindowContainer wc = mChildren.get(i);
- if (wc.isAnimating(flags & ~PARENTS, typesToCheck)) {
- return true;
- }
- }
- }
- return false;
+ final boolean isAnimating(int flags, int typesToCheck) {
+ return getAnimatingContainer(flags, typesToCheck) != null;
}
/**
@@ -904,16 +890,20 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* checking animating status.
* @param typesToExclude The combination of bitmask {@link AnimationType} to exclude when
* checking if animating.
+ *
+ * @deprecated Use {@link #isAnimating(int, int)}
*/
- boolean isAnimatingExcluding(int flags, int typesToExclude) {
+ @Deprecated
+ final boolean isAnimatingExcluding(int flags, int typesToExclude) {
return isAnimating(flags, ANIMATION_TYPE_ALL & ~typesToExclude);
}
/**
- * @see #isAnimating(int, int)
+ * @deprecated Use {@link #isAnimating(int, int)}
* TODO (b/152333373): Migrate calls to use isAnimating with specified animation type
*/
- boolean isAnimating(int flags) {
+ @Deprecated
+ final boolean isAnimating(int flags) {
return isAnimating(flags, ANIMATION_TYPE_ALL);
}
@@ -2107,10 +2097,15 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
}
void cancelAnimation() {
+ doAnimationFinished(mSurfaceAnimator.getAnimationType(), mSurfaceAnimator.getAnimation());
mSurfaceAnimator.cancelAnimation();
mSurfaceFreezer.unfreeze(getPendingTransaction());
}
+ ArraySet<WindowContainer> getAnimationSources() {
+ return mSurfaceAnimationSources;
+ }
+
@Override
public SurfaceControl getFreezeSnapshotTarget() {
return null;
@@ -2156,6 +2151,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* @param transit The app transition type indicates what kind of transition to be applied.
* @param enter Whether the app transition is entering transition or not.
* @param isVoiceInteraction Whether the container is participating in voice interaction or not.
+ * @param sources {@link ActivityRecord}s which causes this app transition animation.
*
* @return {@code true} when the container applied the app transition, {@code false} if the
* app transition is disabled or skipped.
@@ -2163,7 +2159,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* @see #getAnimationAdapter
*/
boolean applyAnimation(WindowManager.LayoutParams lp, int transit, boolean enter,
- boolean isVoiceInteraction, @Nullable OnAnimationFinishedCallback finishedCallback) {
+ boolean isVoiceInteraction, @Nullable ArrayList<WindowContainer> sources) {
if (mWmService.mDisableTransitionAnimation) {
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS_ANIM,
"applyAnimation: transition animation is disabled or skipped. "
@@ -2178,7 +2174,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "WC#applyAnimation");
if (okToAnimate()) {
- applyAnimationUnchecked(lp, enter, transit, isVoiceInteraction, finishedCallback);
+ applyAnimationUnchecked(lp, enter, transit, isVoiceInteraction, sources);
} else {
cancelAnimation();
}
@@ -2276,14 +2272,17 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
protected void applyAnimationUnchecked(WindowManager.LayoutParams lp, boolean enter,
int transit, boolean isVoiceInteraction,
- @Nullable OnAnimationFinishedCallback finishedCallback) {
+ @Nullable ArrayList<WindowContainer> sources) {
final Pair<AnimationAdapter, AnimationAdapter> adapters = getAnimationAdapter(lp,
transit, enter, isVoiceInteraction);
AnimationAdapter adapter = adapters.first;
AnimationAdapter thumbnailAdapter = adapters.second;
if (adapter != null) {
+ if (sources != null) {
+ mSurfaceAnimationSources.addAll(sources);
+ }
startAnimation(getPendingTransaction(), adapter, !isVisible(),
- ANIMATION_TYPE_APP_TRANSITION, finishedCallback);
+ ANIMATION_TYPE_APP_TRANSITION);
if (adapter.getShowWallpaper()) {
getDisplayContent().pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
}
@@ -2411,10 +2410,18 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
updateSurfacePosition(t);
}
+ private void doAnimationFinished(@AnimationType int type, AnimationAdapter anim) {
+ for (int i = 0; i < mSurfaceAnimationSources.size(); ++i) {
+ mSurfaceAnimationSources.valueAt(i).onAnimationFinished(type, anim);
+ }
+ mSurfaceAnimationSources.clear();
+ }
+
/**
* Called when an animation has finished running.
*/
protected void onAnimationFinished(@AnimationType int type, AnimationAdapter anim) {
+ doAnimationFinished(type, anim);
mWmService.onAnimationFinished();
}
@@ -2428,16 +2435,66 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
/**
* @return The {@link WindowContainer} which is running an animation.
*
- * It traverses from the current container to its parents recursively. If nothing is animating,
- * it will return {@code null}.
+ * By default this only checks if this container itself is actually running an animation, but
+ * you can extend the check target over its relatives, or relax the condition so that this can
+ * return {@code WindowContainer} if an animation starts soon by giving a combination
+ * of {@link AnimationFlags}.
+ *
+ * Note that you can give a combination of bitmask flags to specify targets and condition for
+ * checking animating status.
+ * e.g. {@code isAnimating(TRANSITION | PARENT)} returns {@code true} if either this
+ * container itself or one of its parents is running an animation or waiting for an app
+ * transition.
+ *
+ * Note that TRANSITION propagates to parents and children as well.
+ *
+ * @param flags The combination of bitmask flags to specify targets and condition for
+ * checking animating status.
+ * @param typesToCheck The combination of bitmask {@link AnimationType} to compare when
+ * determining if animating.
+ *
+ * @see AnimationFlags#TRANSITION
+ * @see AnimationFlags#PARENTS
+ * @see AnimationFlags#CHILDREN
*/
@Nullable
- WindowContainer getAnimatingContainer() {
- if (isAnimating()) {
+ WindowContainer getAnimatingContainer(int flags, int typesToCheck) {
+ int animationType = mSurfaceAnimator.getAnimationType();
+ if (mSurfaceAnimator.isAnimating() && (animationType & typesToCheck) > 0) {
return this;
}
- final WindowContainer parent = getParent();
- return (parent != null) ? parent.getAnimatingContainer() : null;
+ if ((flags & TRANSITION) != 0 && isWaitingForTransitionStart()) {
+ return this;
+ }
+ if ((flags & PARENTS) != 0) {
+ final WindowContainer parent = getParent();
+ if (parent != null) {
+ final WindowContainer wc = parent.getAnimatingContainer(
+ flags & ~CHILDREN, typesToCheck);
+ if (wc != null) {
+ return wc;
+ }
+ }
+ }
+ if ((flags & CHILDREN) != 0) {
+ for (int i = 0; i < mChildren.size(); ++i) {
+ final WindowContainer wc = mChildren.get(i).getAnimatingContainer(
+ flags & ~PARENTS, typesToCheck);
+ if (wc != null) {
+ return wc;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @deprecated Use {@link #getAnimatingContainer(int, int)} instead.
+ */
+ @Nullable
+ @Deprecated
+ final WindowContainer getAnimatingContainer() {
+ return getAnimatingContainer(PARENTS, ANIMATION_TYPE_ALL);
}
/**
diff --git a/services/core/java/com/android/server/wm/WindowContainerThumbnail.java b/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
index a27a11259772..126154b10350 100644
--- a/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
+++ b/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
@@ -133,15 +133,14 @@ class WindowContainerThumbnail implements Animatable {
mWindowContainer.getDisplayContent().mAppTransition.canSkipFirstFrame(),
mWindowContainer.getDisplayContent().getWindowCornerRadius()),
mWindowContainer.mWmService.mSurfaceAnimationRunner), false /* hidden */,
- ANIMATION_TYPE_RECENTS, null /* animationFinishedCallback */);
+ ANIMATION_TYPE_RECENTS);
}
/**
* Start animation with existing adapter.
*/
void startAnimation(Transaction t, AnimationAdapter anim, boolean hidden) {
- mSurfaceAnimator.startAnimation(t, anim, hidden, ANIMATION_TYPE_RECENTS,
- null /* animationFinishedCallback */);
+ mSurfaceAnimator.startAnimation(t, anim, hidden, ANIMATION_TYPE_RECENTS);
}
private void onAnimationFinished(@AnimationType int type, AnimationAdapter anim) {
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index fe3ee50c34c5..32717d0e1e65 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -5049,16 +5049,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mWindowFrames.updateLastInsetValues();
}
+ @Nullable
@Override
- boolean isAnimating(int flags, int typesToCheck) {
-
- // If we are an inset provider, all our animations are driven by the inset client, so we
- // aren't really animating.
- // TODO: Replace this with a proper animation type system.
+ WindowContainer<WindowState> getAnimatingContainer(int flags, int typesToCheck) {
if (mControllableInsetProvider != null) {
- return false;
+ return null;
}
- return super.isAnimating(flags, typesToCheck);
+ return super.getAnimatingContainer(flags, typesToCheck);
}
void startAnimation(Animation anim) {
@@ -5101,8 +5098,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
private void startAnimation(Transaction t, AnimationAdapter adapter) {
- startAnimation(t, adapter, mWinAnimator.mLastHidden, ANIMATION_TYPE_WINDOW_ANIMATION,
- null /* animationFinishedCallback */);
+ startAnimation(t, adapter, mWinAnimator.mLastHidden, ANIMATION_TYPE_WINDOW_ANIMATION);
}
@Override
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index df55b3bbd1a4..10ad07cff847 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -2755,7 +2755,8 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
Slog.i(LOG_TAG, "Giving the PO additional power...");
markProfileOwnerOnOrganizationOwnedDeviceUncheckedLocked(poAdminComponent, poUserId);
Slog.i(LOG_TAG, "Migrating DO policies to PO...");
- moveDoPoliciesToProfileParentAdmin(doAdmin, poAdmin.getParentActiveAdmin());
+ moveDoPoliciesToProfileParentAdminLocked(doAdmin, poAdmin.getParentActiveAdmin());
+ migratePersonalAppSuspensionLocked(doUserId, poUserId, poAdmin);
saveSettingsLocked(poUserId);
Slog.i(LOG_TAG, "Clearing the DO...");
final ComponentName doAdminReceiver = doAdmin.info.getComponent();
@@ -2775,6 +2776,25 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
.write();
}
+ @GuardedBy("getLockObject()")
+ private void migratePersonalAppSuspensionLocked(
+ int doUserId, int poUserId, ActiveAdmin poAdmin) {
+ final PackageManagerInternal pmi = mInjector.getPackageManagerInternal();
+ if (!pmi.isSuspendingAnyPackages(PLATFORM_PACKAGE_NAME, doUserId)) {
+ Slog.i(LOG_TAG, "DO is not suspending any apps.");
+ return;
+ }
+
+ if (getTargetSdk(poAdmin.info.getPackageName(), poUserId) >= Build.VERSION_CODES.R) {
+ Slog.i(LOG_TAG, "PO is targeting R+, keeping personal apps suspended.");
+ getUserData(doUserId).mAppsSuspended = true;
+ poAdmin.mSuspendPersonalApps = true;
+ } else {
+ Slog.i(LOG_TAG, "PO isn't targeting R+, unsuspending personal apps.");
+ pmi.unsuspendForSuspendingPackage(PLATFORM_PACKAGE_NAME, doUserId);
+ }
+ }
+
private void uninstallOrDisablePackage(String packageName, int userHandle) {
final ApplicationInfo appInfo;
try {
@@ -2816,7 +2836,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
pi.uninstall(packageName, 0 /* flags */, new IntentSender((IIntentSender) mLocalSender));
}
- private void moveDoPoliciesToProfileParentAdmin(ActiveAdmin doAdmin, ActiveAdmin parentAdmin) {
+ @GuardedBy("getLockObject()")
+ private void moveDoPoliciesToProfileParentAdminLocked(
+ ActiveAdmin doAdmin, ActiveAdmin parentAdmin) {
// The following policies can be already controlled via parent instance, skip if so.
if (parentAdmin.mPasswordPolicy.quality == PASSWORD_QUALITY_UNSPECIFIED) {
parentAdmin.mPasswordPolicy = doAdmin.mPasswordPolicy;
@@ -16147,25 +16169,34 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
}
Slog.i(LOG_TAG, String.format("%s personal apps for user %d",
suspended ? "Suspending" : "Unsuspending", userId));
+
+ if (suspended) {
+ suspendPersonalAppsInPackageManager(userId);
+ } else {
+ mInjector.getPackageManagerInternal().unsuspendForSuspendingPackage(
+ PLATFORM_PACKAGE_NAME, userId);
+ }
+
+ synchronized (getLockObject()) {
+ getUserData(userId).mAppsSuspended = suspended;
+ saveSettingsLocked(userId);
+ }
+ }
+
+ private void suspendPersonalAppsInPackageManager(int userId) {
mInjector.binderWithCleanCallingIdentity(() -> {
try {
final String[] appsToSuspend = mInjector.getPersonalAppsForSuspension(userId);
- final String[] failedPackages = mIPackageManager.setPackagesSuspendedAsUser(
- appsToSuspend, suspended, null, null, null, PLATFORM_PACKAGE_NAME, userId);
- if (!ArrayUtils.isEmpty(failedPackages)) {
- Slog.wtf(LOG_TAG, String.format("Failed to %s packages: %s",
- suspended ? "suspend" : "unsuspend", String.join(",", failedPackages)));
+ final String[] failedApps = mIPackageManager.setPackagesSuspendedAsUser(
+ appsToSuspend, true, null, null, null, PLATFORM_PACKAGE_NAME, userId);
+ if (!ArrayUtils.isEmpty(failedApps)) {
+ Slog.wtf(LOG_TAG, "Failed to suspend apps: " + String.join(",", failedApps));
}
} catch (RemoteException re) {
// Shouldn't happen.
Slog.e(LOG_TAG, "Failed talking to the package manager", re);
}
});
-
- synchronized (getLockObject()) {
- getUserData(userId).mAppsSuspended = suspended;
- saveSettingsLocked(userId);
- }
}
@GuardedBy("getLockObject()")
diff --git a/services/net/java/android/net/ip/IpClientCallbacks.java b/services/net/java/android/net/ip/IpClientCallbacks.java
index c93e5c5e4759..b172c4be7b0d 100644
--- a/services/net/java/android/net/ip/IpClientCallbacks.java
+++ b/services/net/java/android/net/ip/IpClientCallbacks.java
@@ -16,7 +16,6 @@
package android.net.ip;
-import android.net.DhcpResults;
import android.net.DhcpResultsParcelable;
import android.net.Layer2PacketParcelable;
import android.net.LinkProperties;
@@ -67,19 +66,15 @@ public class IpClientCallbacks {
* <p>DHCPv4 or static IPv4 configuration failure or success can be determined by whether or not
* the passed-in DhcpResults object is null.
*/
- public void onNewDhcpResults(DhcpResults dhcpResults) {}
-
- /**
- * Callback called when new DHCP results are available.
- *
- * <p>This is purely advisory and not an indication of provisioning success or failure. This is
- * only here for callers that want to expose DHCPv4 results to other APIs
- * (e.g., WifiInfo#setInetAddress).
- *
- * <p>DHCPv4 or static IPv4 configuration failure or success can be determined by whether or not
- * the passed-in DhcpResults object is null.
- */
- public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {}
+ public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {
+ // In general callbacks would not use a parcelable directly (DhcpResultsParcelable), and
+ // would use a wrapper instead. But there are already two classes in the tree for DHCP
+ // information: DhcpInfo and DhcpResults, and each of them do not expose an appropriate API
+ // (they are bags of mutable fields and can't be changed because they are public API and
+ // @UnsupportedAppUsage). Adding a third class would cost more than the gain considering
+ // that the only client of this callback is WiFi, which will end up converting the results
+ // to DhcpInfo anyway.
+ }
/**
* Indicates that provisioning was successful.
diff --git a/services/net/java/android/net/ip/IpClientUtil.java b/services/net/java/android/net/ip/IpClientUtil.java
index b329aeec4853..426614ec2f53 100644
--- a/services/net/java/android/net/ip/IpClientUtil.java
+++ b/services/net/java/android/net/ip/IpClientUtil.java
@@ -16,8 +16,6 @@
package android.net.ip;
-import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcelable;
-
import android.content.Context;
import android.net.DhcpResultsParcelable;
import android.net.Layer2PacketParcelable;
@@ -118,7 +116,6 @@ public class IpClientUtil {
// null or not.
@Override
public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {
- mCb.onNewDhcpResults(fromStableParcelable(dhcpResults));
mCb.onNewDhcpResults(dhcpResults);
}
diff --git a/services/net/java/android/net/util/DhcpResultsCompatUtil.java b/services/net/java/android/net/util/DhcpResultsCompatUtil.java
new file mode 100644
index 000000000000..fce0834c116e
--- /dev/null
+++ b/services/net/java/android/net/util/DhcpResultsCompatUtil.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.util;
+
+import static android.net.shared.IpConfigurationParcelableUtil.unparcelAddress;
+
+import android.annotation.Nullable;
+import android.net.DhcpResults;
+import android.net.DhcpResultsParcelable;
+
+import java.net.Inet4Address;
+
+/**
+ * Compatibility utility for code that still uses DhcpResults.
+ *
+ * TODO: remove this class when all usages of DhcpResults (including Wifi in AOSP) are removed.
+ */
+public class DhcpResultsCompatUtil {
+
+ /**
+ * Convert a DhcpResultsParcelable to DhcpResults.
+ *
+ * contract {
+ * returns(null) implies p == null
+ * returnsNotNull() implies p != null
+ * }
+ */
+ @Nullable
+ public static DhcpResults fromStableParcelable(@Nullable DhcpResultsParcelable p) {
+ if (p == null) return null;
+ final DhcpResults results = new DhcpResults(p.baseConfiguration);
+ results.leaseDuration = p.leaseDuration;
+ results.mtu = p.mtu;
+ results.serverAddress = (Inet4Address) unparcelAddress(p.serverAddress);
+ results.vendorInfo = p.vendorInfo;
+ results.serverHostName = p.serverHostName;
+ results.captivePortalApiUrl = p.captivePortalApiUrl;
+ return results;
+ }
+}
diff --git a/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java b/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
index 2e60f2afcdea..236ac8407faa 100644
--- a/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
+++ b/services/people/java/com/android/server/people/prediction/ShareTargetPredictor.java
@@ -16,6 +16,8 @@
package com.android.server.people.prediction;
+import static java.util.Collections.reverseOrder;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
@@ -39,6 +41,7 @@ import com.android.server.people.data.PackageData;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.function.Consumer;
@@ -85,7 +88,9 @@ class ShareTargetPredictor extends AppTargetPredictor {
List<ShareTarget> shareTargets = getDirectShareTargets();
SharesheetModelScorer.computeScore(shareTargets, getShareEventType(mIntentFilter),
System.currentTimeMillis());
- Collections.sort(shareTargets, (t1, t2) -> -Float.compare(t1.getScore(), t2.getScore()));
+ Collections.sort(shareTargets,
+ Comparator.comparing(ShareTarget::getScore, reverseOrder())
+ .thenComparing(t -> t.getAppTarget().getRank()));
List<AppTarget> res = new ArrayList<>();
for (int i = 0; i < Math.min(getPredictionContext().getPredictedTargetCount(),
shareTargets.size()); i++) {
@@ -135,6 +140,7 @@ class ShareTargetPredictor extends AppTargetPredictor {
new AppTargetId(shortcutInfo.getId()),
shortcutInfo)
.setClassName(shareShortcut.getTargetComponent().getClassName())
+ .setRank(shortcutInfo.getRank())
.build();
String packageName = shortcutInfo.getPackage();
int userId = shortcutInfo.getUserId();
diff --git a/services/tests/PackageManagerServiceTests/host/Android.bp b/services/tests/PackageManagerServiceTests/host/Android.bp
new file mode 100644
index 000000000000..dad001b52b15
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+java_test_host {
+ name: "PackageManagerServiceHostTests",
+ srcs: ["src/**/*.kt"],
+ libs: [
+ "tradefed",
+ "junit",
+ "truth-prebuilt",
+ ],
+ static_libs: [
+ "frameworks-base-hostutils",
+ ],
+ test_suites: ["general-tests"],
+ java_resources: [
+ ":PackageManagerDummyAppVersion1",
+ ":PackageManagerDummyAppVersion2",
+ ":PackageManagerDummyAppVersion3",
+ ":PackageManagerDummyAppOriginalOverride",
+ ]
+}
diff --git a/services/tests/PackageManagerServiceTests/host/AndroidTest.xml b/services/tests/PackageManagerServiceTests/host/AndroidTest.xml
new file mode 100644
index 000000000000..dc8c8113fac2
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/AndroidTest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<configuration description="Test module config for PackageManagerServiceHostTests">
+ <option name="test-tag" value="PackageManagerServiceHostTests" />
+
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+
+ <test class="com.android.tradefed.testtype.HostTest">
+ <option name="jar" value="PackageManagerServiceHostTests.jar" />
+ </test>
+</configuration>
diff --git a/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/HostUtils.kt b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/HostUtils.kt
new file mode 100644
index 000000000000..4927c45550b5
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/HostUtils.kt
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.pm.test
+
+import com.android.internal.util.test.SystemPreparer
+import com.android.tradefed.device.ITestDevice
+import java.io.File
+
+internal fun SystemPreparer.pushApk(file: String, partition: Partition) =
+ pushResourceFile(file, HostUtils.makePathForApk(file, partition))
+
+internal fun SystemPreparer.deleteApk(file: String, partition: Partition) =
+ deleteFile(partition.baseFolder.resolve(file.removeSuffix(".apk")).toString())
+
+internal object HostUtils {
+
+ fun getDataDir(device: ITestDevice, pkgName: String) =
+ device.executeShellCommand("dumpsys package $pkgName")
+ .lineSequence()
+ .map(String::trim)
+ .single { it.startsWith("dataDir=") }
+ .removePrefix("dataDir=")
+
+ fun makePathForApk(fileName: String, partition: Partition) =
+ makePathForApk(File(fileName), partition)
+
+ fun makePathForApk(file: File, partition: Partition) =
+ partition.baseFolder
+ .resolve(file.nameWithoutExtension)
+ .resolve(file.name)
+ .toString()
+}
diff --git a/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/OriginalPackageMigrationTest.kt b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/OriginalPackageMigrationTest.kt
new file mode 100644
index 000000000000..90494c591363
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/OriginalPackageMigrationTest.kt
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.pm.test
+
+import com.android.internal.util.test.SystemPreparer
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test
+import com.google.common.truth.Truth.assertThat
+import org.junit.ClassRule
+import org.junit.Rule
+import org.junit.Test
+import org.junit.rules.RuleChain
+import org.junit.rules.TemporaryFolder
+import org.junit.runner.RunWith
+
+@RunWith(DeviceJUnit4ClassRunner::class)
+class OriginalPackageMigrationTest : BaseHostJUnit4Test() {
+
+ companion object {
+ private const val TEST_PKG_NAME = "com.android.server.pm.test.dummy_app"
+ private const val VERSION_ONE = "PackageManagerDummyAppVersion1.apk"
+ private const val VERSION_TWO = "PackageManagerDummyAppVersion2.apk"
+ private const val VERSION_THREE = "PackageManagerDummyAppVersion3.apk"
+ private const val NEW_PKG = "PackageManagerDummyAppOriginalOverride.apk"
+
+ @get:ClassRule
+ val deviceRebootRule = SystemPreparer.TestRuleDelegate(true)
+ }
+
+ private val tempFolder = TemporaryFolder()
+ private val preparer: SystemPreparer = SystemPreparer(tempFolder,
+ SystemPreparer.RebootStrategy.START_STOP, deviceRebootRule) { this.device }
+
+ @get:Rule
+ val rules = RuleChain.outerRule(tempFolder).around(preparer)!!
+
+ @Test
+ fun lowerVersion() {
+ runForApk(VERSION_ONE)
+ }
+
+ @Test
+ fun sameVersion() {
+ runForApk(VERSION_TWO)
+ }
+
+ @Test
+ fun higherVersion() {
+ runForApk(VERSION_THREE)
+ }
+
+ // A bug was found where renamed the package during parsing was leading to an invalid version
+ // code check at scan time. A lower version package was being dropped after reboot. To test
+ // this, the override APK is defined as versionCode 2 and the original package is given
+ // versionCode 1, 2, and 3 from the other methods.
+ private fun runForApk(apk: String) {
+ preparer.pushApk(apk, Partition.SYSTEM)
+ .reboot()
+
+ device.getAppPackageInfo(TEST_PKG_NAME).run {
+ assertThat(codePath).contains(apk.removeSuffix(".apk"))
+ }
+
+ // Ensure data is preserved by writing to the original dataDir
+ val file = tempFolder.newFile().apply { writeText("Test") }
+ device.pushFile(file, "${HostUtils.getDataDir(device, TEST_PKG_NAME)}/files/test.txt")
+
+ preparer.deleteApk(apk, Partition.SYSTEM)
+ .pushApk(NEW_PKG, Partition.SYSTEM)
+ .reboot()
+
+ device.getAppPackageInfo(TEST_PKG_NAME)
+ .run {
+ assertThat(this.toString()).isNotEmpty()
+ assertThat(codePath)
+ .contains(NEW_PKG.removeSuffix(".apk"))
+ }
+
+ // And then reading the data contents back
+ assertThat(device.pullFileContents(
+ "${HostUtils.getDataDir(device, TEST_PKG_NAME)}/files/test.txt"))
+ .isEqualTo("Test")
+ }
+}
diff --git a/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/Partition.kt b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/Partition.kt
new file mode 100644
index 000000000000..35192a73ceda
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/Partition.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.pm.test
+
+import java.nio.file.Path
+import java.nio.file.Paths
+
+// Unfortunately no easy way to access PMS SystemPartitions, so mock them here
+internal enum class Partition(val baseFolder: Path) {
+ SYSTEM("/system/app"),
+ VENDOR("/vendor/app"),
+ PRODUCT("/product/app"),
+ SYSTEM_EXT("/system_ext/app")
+ ;
+
+ constructor(baseFolder: String) : this(Paths.get(baseFolder))
+}
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/Android.bp b/services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
new file mode 100644
index 000000000000..9568faa7dfd0
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test_helper_app {
+ name: "PackageManagerDummyAppVersion1",
+ manifest: "AndroidManifestVersion1.xml"
+}
+
+android_test_helper_app {
+ name: "PackageManagerDummyAppVersion2",
+ manifest: "AndroidManifestVersion2.xml"
+}
+
+android_test_helper_app {
+ name: "PackageManagerDummyAppVersion3",
+ manifest: "AndroidManifestVersion3.xml"
+}
+
+android_test_helper_app {
+ name: "PackageManagerDummyAppOriginalOverride",
+ manifest: "AndroidManifestOriginalOverride.xml"
+}
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestOriginalOverride.xml b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestOriginalOverride.xml
new file mode 100644
index 000000000000..f16e1bc8a927
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestOriginalOverride.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.server.pm.test.dummy_app.override"
+ android:versionCode="2"
+ >
+
+ <original-package android:name="com.android.server.pm.test.dummy_app"/>
+
+</manifest>
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion1.xml b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion1.xml
new file mode 100644
index 000000000000..d772050d7fd0
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion1.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.server.pm.test.dummy_app"
+ android:versionCode="1"
+ />
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion2.xml b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion2.xml
new file mode 100644
index 000000000000..53f836b222e6
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion2.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.server.pm.test.dummy_app"
+ android:versionCode="2"
+ />
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion3.xml b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion3.xml
new file mode 100644
index 000000000000..90ca9d0ac02c
--- /dev/null
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/AndroidManifestVersion3.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.server.pm.test.dummy_app"
+ android:versionCode="3"
+ />
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
index fde40aa77a0e..cdafd32cbbb5 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
@@ -63,6 +63,7 @@ import static com.android.server.am.ProcessList.VISIBLE_APP_ADJ;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.AdditionalAnswers.answer;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.anyLong;
@@ -170,6 +171,7 @@ public class MockingOomAdjusterTests {
mock(OomAdjProfiler.class));
doReturn(new ActivityManagerService.ProcessChangeItem()).when(sService)
.enqueueProcessChangeItemLocked(anyInt(), anyInt());
+ doReturn(true).when(sService).containsTopUiOrRunningRemoteAnimOrEmptyLocked(any());
sService.mOomAdjuster = new OomAdjuster(sService, sService.mProcessList,
mock(ActiveUids.class));
sService.mOomAdjuster.mAdjSeq = 10000;
@@ -266,6 +268,21 @@ public class MockingOomAdjusterTests {
@SuppressWarnings("GuardedBy")
@Test
+ public void testUpdateOomAdj_DoOne_TopApp_PreemptedByTopUi() {
+ ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID,
+ MOCKAPP_PROCESSNAME, MOCKAPP_PACKAGENAME, true));
+ doReturn(PROCESS_STATE_TOP).when(sService.mAtmInternal).getTopProcessState();
+ doReturn(app).when(sService).getTopAppLocked();
+ doReturn(false).when(sService).containsTopUiOrRunningRemoteAnimOrEmptyLocked(eq(app));
+ sService.mWakefulness = PowerManagerInternal.WAKEFULNESS_AWAKE;
+ sService.mOomAdjuster.updateOomAdjLocked(app, false, OomAdjuster.OOM_ADJ_REASON_NONE);
+ doReturn(null).when(sService).getTopAppLocked();
+
+ assertProcStates(app, PROCESS_STATE_TOP, FOREGROUND_APP_ADJ, SCHED_GROUP_DEFAULT);
+ }
+
+ @SuppressWarnings("GuardedBy")
+ @Test
public void testUpdateOomAdj_DoOne_RunningInstrumentation() {
ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID,
MOCKAPP_PROCESSNAME, MOCKAPP_PACKAGENAME, true));
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
index a0b9d9d2a875..3167820f0a48 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
@@ -18,17 +18,24 @@ package com.android.server.devicepolicy;
import static android.os.UserHandle.USER_SYSTEM;
import static com.android.server.devicepolicy.DpmTestUtils.writeInputStreamToFile;
+import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
import static org.junit.Assert.assertArrayEquals;
+import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.admin.DevicePolicyManager;
import android.app.admin.DevicePolicyManagerInternal;
import android.content.ComponentName;
+import android.content.Intent;
import android.content.pm.PackageManager;
+import android.os.Build;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
@@ -354,8 +361,7 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase {
prepareAdmin1AsDo();
prepareAdminAnotherPackageAsPo(COPE_PROFILE_USER_ID);
- final DevicePolicyManagerServiceTestable dpms;
- dpms = bootDpmsUp();
+ final DevicePolicyManagerServiceTestable dpms = bootDpmsUp();
// DO should still be DO since no migration should happen.
assertTrue(dpms.mOwners.hasDeviceOwner());
@@ -364,13 +370,12 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase {
@SmallTest
public void testCompMigrationAffiliated() throws Exception {
prepareAdmin1AsDo();
- prepareAdmin1AsPo(COPE_PROFILE_USER_ID);
+ prepareAdmin1AsPo(COPE_PROFILE_USER_ID, Build.VERSION_CODES.R);
// Secure lock screen is needed for password policy APIs to work.
when(getServices().lockPatternUtils.hasSecureLockScreen()).thenReturn(true);
- final DevicePolicyManagerServiceTestable dpms;
- dpms = bootDpmsUp();
+ final DevicePolicyManagerServiceTestable dpms = bootDpmsUp();
// DO should cease to be DO.
assertFalse(dpms.mOwners.hasDeviceOwner());
@@ -408,6 +413,66 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase {
dpms.getProfileOwnerAdminLocked(COPE_PROFILE_USER_ID)
.getEffectiveRestrictions()
.containsKey(UserManager.DISALLOW_CONFIG_DATE_TIME));
+ assertEquals("Personal apps suspension wasn't migrated",
+ DevicePolicyManager.PERSONAL_APPS_NOT_SUSPENDED,
+ dpm.getPersonalAppsSuspendedReasons(admin1));
+ });
+ }
+
+ @SmallTest
+ public void testCompMigration_keepSuspendedAppsWhenDpcIsRPlus() throws Exception {
+ prepareAdmin1AsDo();
+ prepareAdmin1AsPo(COPE_PROFILE_USER_ID, Build.VERSION_CODES.R);
+
+ // Pretend some packages are suspended.
+ when(getServices().packageManagerInternal.isSuspendingAnyPackages(
+ PLATFORM_PACKAGE_NAME, USER_SYSTEM)).thenReturn(true);
+
+ final DevicePolicyManagerServiceTestable dpms = bootDpmsUp();
+
+ verify(getServices().packageManagerInternal, never())
+ .unsuspendForSuspendingPackage(PLATFORM_PACKAGE_NAME, USER_SYSTEM);
+
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_STARTED, USER_SYSTEM);
+
+ // Verify that actual package suspension state is not modified after user start
+ verify(getServices().packageManagerInternal, never())
+ .unsuspendForSuspendingPackage(PLATFORM_PACKAGE_NAME, USER_SYSTEM);
+ verify(getServices().ipackageManager, never()).setPackagesSuspendedAsUser(
+ any(), anyBoolean(), any(), any(), any(), any(), anyInt());
+
+ final DpmMockContext poContext = new DpmMockContext(getServices(), mRealTestContext);
+ poContext.binder.callingUid = UserHandle.getUid(COPE_PROFILE_USER_ID, COPE_ADMIN1_APP_ID);
+
+ runAsCaller(poContext, dpms, dpm -> {
+ assertEquals("Personal apps suspension wasn't migrated",
+ DevicePolicyManager.PERSONAL_APPS_SUSPENDED_EXPLICITLY,
+ dpm.getPersonalAppsSuspendedReasons(admin1));
+ });
+ }
+
+ @SmallTest
+ public void testCompMigration_unsuspendAppsWhenDpcNotRPlus() throws Exception {
+ prepareAdmin1AsDo();
+ prepareAdmin1AsPo(COPE_PROFILE_USER_ID, Build.VERSION_CODES.Q);
+
+ // Pretend some packages are suspended.
+ when(getServices().packageManagerInternal.isSuspendingAnyPackages(
+ PLATFORM_PACKAGE_NAME, USER_SYSTEM)).thenReturn(true);
+
+ final DevicePolicyManagerServiceTestable dpms = bootDpmsUp();
+
+ // Verify that apps get unsuspended.
+ verify(getServices().packageManagerInternal)
+ .unsuspendForSuspendingPackage(PLATFORM_PACKAGE_NAME, USER_SYSTEM);
+
+ final DpmMockContext poContext = new DpmMockContext(getServices(), mRealTestContext);
+ poContext.binder.callingUid = UserHandle.getUid(COPE_PROFILE_USER_ID, COPE_ADMIN1_APP_ID);
+
+ runAsCaller(poContext, dpms, dpm -> {
+ assertEquals("Personal apps weren't unsuspended",
+ DevicePolicyManager.PERSONAL_APPS_NOT_SUSPENDED,
+ dpm.getPersonalAppsSuspendedReasons(admin1));
});
}
@@ -439,22 +504,23 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase {
.getAbsoluteFile());
}
- private void prepareAdmin1AsPo(int profileUserId) throws Exception {
+ private void prepareAdmin1AsPo(int profileUserId, int targetSdk) throws Exception {
preparePo(profileUserId, admin1, R.raw.comp_profile_owner_same_package,
- R.raw.comp_policies_profile_same_package, COPE_ADMIN1_APP_ID);
+ R.raw.comp_policies_profile_same_package, COPE_ADMIN1_APP_ID, targetSdk);
}
private void prepareAdminAnotherPackageAsPo(int profileUserId) throws Exception {
preparePo(profileUserId, adminAnotherPackage, R.raw.comp_profile_owner_another_package,
- R.raw.comp_policies_profile_another_package, COPE_ANOTHER_ADMIN_APP_ID);
+ R.raw.comp_policies_profile_another_package, COPE_ANOTHER_ADMIN_APP_ID,
+ Build.VERSION.SDK_INT);
}
private void preparePo(int profileUserId, ComponentName admin, int profileOwnerXmlResId,
- int policyXmlResId, int adminAppId) throws Exception {
+ int policyXmlResId, int adminAppId, int targetSdk) throws Exception {
final File profileDir = getServices().addUser(profileUserId, 0,
UserManager.USER_TYPE_PROFILE_MANAGED, USER_SYSTEM /* profile group */);
- setUpPackageManagerForFakeAdmin(
- admin, UserHandle.getUid(profileUserId, adminAppId), admin1);
+ setUpPackageManagerForFakeAdmin(admin, UserHandle.getUid(profileUserId, adminAppId),
+ /* enabledSetting =*/ null, targetSdk, admin1);
writeInputStreamToFile(getRawStream(policyXmlResId),
(new File(profileDir, "device_policies.xml")).getAbsoluteFile());
writeInputStreamToFile(getRawStream(profileOwnerXmlResId),
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
index 4a774898e1b5..daaabf8141ff 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -254,7 +254,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
@Override
protected void tearDown() throws Exception {
- flushTasks();
+ flushTasks(dpms);
getMockTransferMetadataManager().deleteMetadataFile();
super.tearDown();
}
@@ -4961,7 +4961,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
// CertificateMonitor.updateInstalledCertificates is called on the background thread,
// let it finish with system uid, otherwise it will throw and crash.
- flushTasks();
+ flushTasks(dpms);
mContext.binder.restoreCallingIdentity(ident);
}
@@ -5459,7 +5459,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
getServices().injectBroadcast(mServiceContext, new Intent(KeyChain.ACTION_TRUST_STORE_CHANGED)
.putExtra(Intent.EXTRA_USER_HANDLE, callerUser.getIdentifier()),
callerUser.getIdentifier());
- flushTasks();
+ flushTasks(dpms);
final List<String> ownerInstalledCaCerts = new ArrayList<>();
@@ -5486,7 +5486,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
getServices().injectBroadcast(mServiceContext, new Intent(KeyChain.ACTION_TRUST_STORE_CHANGED)
.putExtra(Intent.EXTRA_USER_HANDLE, callerUser.getIdentifier()),
callerUser.getIdentifier());
- flushTasks();
+ flushTasks(dpms);
// Verify that the CA cert is no longer reported as installed by the Device Owner / Profile
// Owner.
@@ -5530,7 +5530,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
getServices().injectBroadcast(mServiceContext, new Intent(KeyChain.ACTION_TRUST_STORE_CHANGED)
.putExtra(Intent.EXTRA_USER_HANDLE, callerUser.getIdentifier()),
callerUser.getIdentifier());
- flushTasks();
+ flushTasks(dpms);
// Removing the Profile Owner should clear the information on which CA certs were installed
runAsCaller(admin1Context, dpms, dpm -> dpm.clearProfileOwner(admin1));
@@ -6311,7 +6311,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
clearInvocations(getServices().alarmManager);
setUserUnlocked(CALLER_USER_HANDLE, false);
- sendBroadcastWithUser(Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
// Verify the alarm was scheduled for time when the warning should be shown.
verify(getServices().alarmManager, times(1))
@@ -6325,7 +6325,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
// Pretend the alarm went off.
dpms.mMockInjector.setSystemCurrentTimeMillis(PROFILE_OFF_WARNING_TIME + 10);
- sendBroadcastWithUser(ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
// Verify the alarm was scheduled for the actual deadline this time.
verify(getServices().alarmManager, times(1)).set(anyInt(), eq(PROFILE_OFF_DEADLINE), any());
@@ -6340,7 +6340,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
// Pretend the alarm went off.
dpms.mMockInjector.setSystemCurrentTimeMillis(PROFILE_OFF_DEADLINE + 10);
- sendBroadcastWithUser(ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
// Verify the alarm was not set.
verifyZeroInteractions(getServices().alarmManager);
@@ -6364,10 +6364,10 @@ public class DevicePolicyManagerTest extends DpmTestBase {
mContext.binder.callingUid = DpmMockContext.SYSTEM_UID;
setUserUnlocked(CALLER_USER_HANDLE, false);
- sendBroadcastWithUser(Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
clearInvocations(getServices().alarmManager);
setUserUnlocked(CALLER_USER_HANDLE, true);
- sendBroadcastWithUser(Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
// Verify that the alarm got discharged.
verify(getServices().alarmManager, times(1)).cancel((PendingIntent) null);
@@ -6384,16 +6384,16 @@ public class DevicePolicyManagerTest extends DpmTestBase {
mContext.binder.callingUid = DpmMockContext.SYSTEM_UID;
setUserUnlocked(CALLER_USER_HANDLE, false);
- sendBroadcastWithUser(Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
// Pretend the alarm went off.
dpms.mMockInjector.setSystemCurrentTimeMillis(PROFILE_OFF_WARNING_TIME + 10);
- sendBroadcastWithUser(ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
clearInvocations(getServices().alarmManager);
clearInvocations(getServices().notificationManager);
setUserUnlocked(CALLER_USER_HANDLE, true);
- sendBroadcastWithUser(Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
// Verify that the alarm got discharged.
verify(getServices().alarmManager, times(1)).cancel((PendingIntent) null);
@@ -6413,24 +6413,24 @@ public class DevicePolicyManagerTest extends DpmTestBase {
mContext.binder.callingUid = DpmMockContext.SYSTEM_UID;
setUserUnlocked(CALLER_USER_HANDLE, false);
- sendBroadcastWithUser(Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_STOPPED, CALLER_USER_HANDLE);
// Pretend the alarm went off after the deadline.
dpms.mMockInjector.setSystemCurrentTimeMillis(PROFILE_OFF_DEADLINE + 10);
- sendBroadcastWithUser(ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, ACTION_PROFILE_OFF_DEADLINE, CALLER_USER_HANDLE);
clearInvocations(getServices().alarmManager);
clearInvocations(getServices().notificationManager);
clearInvocations(getServices().ipackageManager);
// Pretend the user clicked on the "apps suspended" notification to turn the profile on.
- sendBroadcastWithUser(ACTION_TURN_PROFILE_ON_NOTIFICATION, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, ACTION_TURN_PROFILE_ON_NOTIFICATION, CALLER_USER_HANDLE);
// Verify that the profile is turned on.
verify(getServices().userManager, times(1))
.requestQuietModeEnabled(eq(false), eq(UserHandle.of(CALLER_USER_HANDLE)));
setUserUnlocked(CALLER_USER_HANDLE, true);
- sendBroadcastWithUser(Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
+ sendBroadcastWithUser(dpms, Intent.ACTION_USER_UNLOCKED, CALLER_USER_HANDLE);
// Verify that the notification is removed (at this point DPC should show it).
verify(getServices().notificationManager, times(1))
@@ -6454,13 +6454,6 @@ public class DevicePolicyManagerTest extends DpmTestBase {
.isEqualTo(DevicePolicyManager.PERSONAL_APPS_SUSPENDED_PROFILE_TIMEOUT);
}
- private void sendBroadcastWithUser(String action, int userHandle) throws Exception {
- final Intent intent = new Intent(action);
- intent.putExtra(Intent.EXTRA_USER_HANDLE, userHandle);
- getServices().injectBroadcast(mServiceContext, intent, userHandle);
- flushTasks();
- }
-
private void setUserUnlocked(int userHandle, boolean unlocked) {
when(getServices().userManager.isUserUnlocked(eq(userHandle))).thenReturn(unlocked);
}
@@ -6471,10 +6464,6 @@ public class DevicePolicyManagerTest extends DpmTestBase {
when(getServices().userManager.isUserUnlocked()).thenReturn(true);
- // Pretend our admin handles CHECK_POLICY_COMPLIANCE intent.
- final Intent intent = new Intent(ACTION_CHECK_POLICY_COMPLIANCE);
- intent.setPackage(admin1.getPackageName());
-
doReturn(Collections.singletonList(new ResolveInfo()))
.when(getServices().packageManager).queryIntentActivitiesAsUser(
any(Intent.class), anyInt(), eq(CALLER_USER_HANDLE));
@@ -6674,12 +6663,4 @@ public class DevicePolicyManagerTest extends DpmTestBase {
return new StringParceledListSlice(Arrays.asList(s));
}
- private void flushTasks() throws Exception {
- dpms.mHandler.runWithScissors(() -> {}, 0 /*now*/);
- dpms.mBackgroundHandler.runWithScissors(() -> {}, 0 /*now*/);
-
- // We can't let exceptions happen on the background thread. Throw them here if they happen
- // so they still cause the test to fail despite being suppressed.
- getServices().rethrowBackgroundBroadcastExceptions();
- }
}
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
index 9a1a5fbfd186..41d54e9010d3 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
@@ -83,6 +83,23 @@ public abstract class DpmTestBase extends AndroidTestCase {
return mServices;
}
+ protected void sendBroadcastWithUser(DevicePolicyManagerServiceTestable dpms, String action,
+ int userHandle) throws Exception {
+ final Intent intent = new Intent(action);
+ intent.putExtra(Intent.EXTRA_USER_HANDLE, userHandle);
+ getServices().injectBroadcast(getContext(), intent, userHandle);
+ flushTasks(dpms);
+ }
+
+ protected void flushTasks(DevicePolicyManagerServiceTestable dpms) throws Exception {
+ dpms.mHandler.runWithScissors(() -> { }, 0 /*now*/);
+ dpms.mBackgroundHandler.runWithScissors(() -> { }, 0 /*now*/);
+
+ // We can't let exceptions happen on the background thread. Throw them here if they happen
+ // so they still cause the test to fail despite being suppressed.
+ getServices().rethrowBackgroundBroadcastExceptions();
+ }
+
protected interface DpmRunnable {
void run(DevicePolicyManager dpm) throws Exception;
}
@@ -180,7 +197,7 @@ public abstract class DpmTestBase extends AndroidTestCase {
* @param copyFromAdmin package information for {@code admin} will be built based on this
* component's information.
*/
- private void setUpPackageManagerForFakeAdmin(ComponentName admin, int packageUid,
+ protected void setUpPackageManagerForFakeAdmin(ComponentName admin, int packageUid,
Integer enabledSetting, Integer appTargetSdk, ComponentName copyFromAdmin)
throws Exception {
diff --git a/services/tests/servicestests/src/com/android/server/people/prediction/ShareTargetPredictorTest.java b/services/tests/servicestests/src/com/android/server/people/prediction/ShareTargetPredictorTest.java
index 60104d390eb7..b09a3c374e86 100644
--- a/services/tests/servicestests/src/com/android/server/people/prediction/ShareTargetPredictorTest.java
+++ b/services/tests/servicestests/src/com/android/server/people/prediction/ShareTargetPredictorTest.java
@@ -117,10 +117,10 @@ public final class ShareTargetPredictorTest {
@Test
public void testPredictTargets() {
- mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc1"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc2"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc3"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc4"));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc1", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc2", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc3", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc4", 0));
when(mPackageData1.getConversationInfo("sc1")).thenReturn(mock(ConversationInfo.class));
when(mPackageData1.getConversationInfo("sc2")).thenReturn(mock(ConversationInfo.class));
@@ -165,12 +165,12 @@ public final class ShareTargetPredictorTest {
@Test
public void testPredictTargets_reachTargetsLimit() {
- mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc1"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc2"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc3"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc4"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc5"));
- mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc6"));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc1", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc2", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc3", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc4", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc5", 0));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc6", 0));
when(mPackageData1.getConversationInfo("sc1")).thenReturn(mock(ConversationInfo.class));
when(mPackageData1.getConversationInfo("sc2")).thenReturn(mock(ConversationInfo.class));
@@ -250,6 +250,41 @@ public final class ShareTargetPredictorTest {
}
@Test
+ public void testPredictTargets_noSharingHistoryRankedByShortcutRank() {
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc1", 3));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_1, CLASS_1, "sc2", 2));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc3", 1));
+ mShareShortcuts.add(buildShareShortcut(PACKAGE_2, CLASS_2, "sc4", 0));
+
+ when(mPackageData1.getConversationInfo("sc1")).thenReturn(mock(ConversationInfo.class));
+ when(mPackageData1.getConversationInfo("sc2")).thenReturn(mock(ConversationInfo.class));
+ when(mPackageData2.getConversationInfo("sc3")).thenReturn(mock(ConversationInfo.class));
+ // "sc4" does not have a ConversationInfo.
+
+ mPredictor.predictTargets();
+
+ verify(mUpdatePredictionsMethod).accept(mAppTargetCaptor.capture());
+ List<AppTarget> res = mAppTargetCaptor.getValue();
+ assertEquals(4, res.size());
+
+ assertEquals("sc4", res.get(0).getId().getId());
+ assertEquals(CLASS_2, res.get(0).getClassName());
+ assertEquals(PACKAGE_2, res.get(0).getPackageName());
+
+ assertEquals("sc3", res.get(1).getId().getId());
+ assertEquals(CLASS_2, res.get(1).getClassName());
+ assertEquals(PACKAGE_2, res.get(1).getPackageName());
+
+ assertEquals("sc2", res.get(2).getId().getId());
+ assertEquals(CLASS_1, res.get(2).getClassName());
+ assertEquals(PACKAGE_1, res.get(2).getPackageName());
+
+ assertEquals("sc1", res.get(3).getId().getId());
+ assertEquals(CLASS_1, res.get(3).getClassName());
+ assertEquals(PACKAGE_1, res.get(3).getPackageName());
+ }
+
+ @Test
public void testSortTargets() {
AppTarget appTarget1 = new AppTarget.Builder(
new AppTargetId("cls1#pkg1"), PACKAGE_1, UserHandle.of(USER_ID))
@@ -348,19 +383,20 @@ public final class ShareTargetPredictorTest {
}
private static ShareShortcutInfo buildShareShortcut(
- String packageName, String className, String shortcutId) {
- ShortcutInfo shortcutInfo = buildShortcut(packageName, shortcutId);
+ String packageName, String className, String shortcutId, int rank) {
+ ShortcutInfo shortcutInfo = buildShortcut(packageName, shortcutId, rank);
ComponentName componentName = new ComponentName(packageName, className);
return new ShareShortcutInfo(shortcutInfo, componentName);
}
- private static ShortcutInfo buildShortcut(String packageName, String shortcutId) {
+ private static ShortcutInfo buildShortcut(String packageName, String shortcutId, int rank) {
Context mockContext = mock(Context.class);
when(mockContext.getPackageName()).thenReturn(packageName);
when(mockContext.getUserId()).thenReturn(USER_ID);
when(mockContext.getUser()).thenReturn(UserHandle.of(USER_ID));
ShortcutInfo.Builder builder = new ShortcutInfo.Builder(mockContext, shortcutId)
.setShortLabel(shortcutId)
+ .setRank(rank)
.setIntent(new Intent("TestIntent"));
return builder.build();
}
diff --git a/services/tests/servicestests/src/com/android/server/textclassifier/FixedSizeQueueTest.java b/services/tests/servicestests/src/com/android/server/textclassifier/FixedSizeQueueTest.java
new file mode 100644
index 000000000000..90527b82c2c3
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/textclassifier/FixedSizeQueueTest.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.textclassifier;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FixedSizeQueueTest {
+
+ @Test
+ public void add_belowMaxCapacity() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+ assertThat(queue.size()).isEqualTo(0);
+
+ queue.add(1);
+
+ assertThat(queue.size()).isEqualTo(1);
+ assertThat(queue.poll()).isEqualTo(1);
+ }
+
+ @Test
+ public void add_exceedMaxCapacity() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(2, /* onEntryEvictedListener= */ null);
+
+ queue.add(1);
+ queue.add(2);
+ queue.add(3);
+
+ assertThat(queue.size()).isEqualTo(2);
+ assertThat(queue.poll()).isEqualTo(2);
+ assertThat(queue.poll()).isEqualTo(3);
+ }
+
+ @Test
+ public void poll() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+
+ queue.add(1);
+
+ assertThat(queue.poll()).isEqualTo(1);
+ assertThat(queue.poll()).isNull();
+ }
+
+ @Test
+ public void remove() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+
+ queue.add(1);
+
+ assertThat(queue.remove(1)).isTrue();
+ assertThat(queue.isEmpty()).isTrue();
+ }
+
+ @Test
+ public void remove_noSuchElement() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+
+ queue.add(1);
+
+ assertThat(queue.remove(2)).isFalse();
+ }
+
+ @Test
+ public void isEmpty_true() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+
+ assertThat(queue.isEmpty()).isTrue();
+ }
+
+ @Test
+ public void isEmpty_false() {
+ FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null);
+
+ queue.add(1);
+
+ assertThat(queue.isEmpty()).isFalse();
+ }
+
+ @Test
+ public void onEntryEvicted() {
+ List<Integer> onEntryEvictedElements = new ArrayList<>();
+ FixedSizeQueue<Integer> queue =
+ new FixedSizeQueue<>(1, onEntryEvictedElements::add);
+
+ queue.add(1);
+ queue.add(2);
+ queue.add(3);
+
+ assertThat(onEntryEvictedElements).containsExactly(1, 2).inOrder();
+ }
+}
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 ae22b2be0c69..ef4d5db2f32f 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -178,6 +178,7 @@ import com.android.server.wm.WindowManagerInternal;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -347,6 +348,11 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
super.setNotificationAssistantAccessGrantedForUserInternal(assistant, userId, granted);
}
+ @Override
+ protected String[] getStringArrayResource(int key) {
+ return new String[] {PKG_O};
+ }
+
private void setNotificationAssistantAccessGrantedCallback(
@Nullable NotificationAssistantAccessGrantedCallback callback) {
this.mNotificationAssistantAccessGrantedCallback = callback;
@@ -434,7 +440,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Setup managed services
mListener = mListeners.new ManagedServiceInfo(
- null, new ComponentName(PKG, "test_class"), mUid, true, null, 0);
+ null, new ComponentName(PKG, "test_class"),
+ UserHandle.getUserId(mUid), true, null, 0);
ComponentName defaultComponent = ComponentName.unflattenFromString("config/device");
ArraySet<ComponentName> components = new ArraySet<>();
components.add(defaultComponent);
@@ -444,7 +451,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
when(mAssistants.getDefaultComponents()).thenReturn(components);
when(mAssistants.queryPackageForServices(
anyString(), anyInt(), anyInt())).thenReturn(components);
- when(mListeners.checkServiceTokenLocked(any())).thenReturn(mListener);
+ when(mListeners.checkServiceTokenLocked(null)).thenReturn(mListener);
ManagedServices.Config listenerConfig = new ManagedServices.Config();
listenerConfig.xmlTag = NotificationListeners.TAG_ENABLED_NOTIFICATION_LISTENERS;
when(mListeners.getConfig()).thenReturn(listenerConfig);
@@ -497,6 +504,10 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mBinderService.createNotificationChannels(
PKG, new ParceledListSlice(Arrays.asList(mTestNotificationChannel)));
+ mBinderService.createNotificationChannels(
+ PKG_P, new ParceledListSlice(Arrays.asList(mTestNotificationChannel)));
+ mBinderService.createNotificationChannels(
+ PKG_O, new ParceledListSlice(Arrays.asList(mTestNotificationChannel)));
assertNotNull(mBinderService.getNotificationChannel(
PKG, mContext.getUserId(), PKG, TEST_CHANNEL_ID));
clearInvocations(mRankingHandler);
@@ -583,7 +594,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setGroupSummary(isSummary);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, id,
"tag" + System.currentTimeMillis(), mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
return new NotificationRecord(mContext, sbn, channel);
}
@@ -603,7 +614,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
nb.extend(extender);
}
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
return new NotificationRecord(mContext, sbn, channel);
}
@@ -635,7 +646,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb = getMessageStyleNotifBuilder(addMetadata, groupKey, isSummary);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, id,
tag, mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
return new NotificationRecord(mContext, sbn, channel);
}
@@ -1328,6 +1339,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
}
@Test
+ @Ignore
public void testPostCancelPostNotifiesListeners() throws Exception {
// WHEN a notification is posted
final StatusBarNotification sbn = generateNotificationRecord(null).getSbn();
@@ -1687,7 +1699,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setSmallIcon(android.R.drawable.sym_def_app_icon)
.build();
StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, null, mUid, 0,
- n, new UserHandle(mUid), null, 0);
+ n, UserHandle.getUserHandleForUid(mUid), null, 0);
sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
mBinderService.enqueueNotificationWithTag(PKG, PKG, null,
sbn.getId(), sbn.getNotification(), sbn.getUserId());
@@ -2191,7 +2203,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testCreateChannelNotifyListener() throws Exception {
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mService.setPreferencesHelper(mPreferencesHelper);
when(mPreferencesHelper.getNotificationChannel(eq(PKG), anyInt(),
eq(mTestNotificationChannel.getId()), anyBoolean()))
@@ -2219,7 +2232,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testCreateChannelGroupNotifyListener() throws Exception {
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mService.setPreferencesHelper(mPreferencesHelper);
NotificationChannelGroup group1 = new NotificationChannelGroup("a", "b");
NotificationChannelGroup group2 = new NotificationChannelGroup("n", "m");
@@ -2239,7 +2253,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testUpdateChannelNotifyListener() throws Exception {
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mService.setPreferencesHelper(mPreferencesHelper);
mTestNotificationChannel.setLightColor(Color.CYAN);
when(mPreferencesHelper.getNotificationChannel(eq(PKG), anyInt(),
@@ -2257,7 +2272,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testDeleteChannelNotifyListener() throws Exception {
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mService.setPreferencesHelper(mPreferencesHelper);
when(mPreferencesHelper.getNotificationChannel(eq(PKG), anyInt(),
eq(mTestNotificationChannel.getId()), anyBoolean()))
@@ -2273,7 +2289,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testDeleteChannelGroupNotifyListener() throws Exception {
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
NotificationChannelGroup ncg = new NotificationChannelGroup("a", "b/c");
mService.setPreferencesHelper(mPreferencesHelper);
when(mPreferencesHelper.getNotificationChannelGroup(eq(ncg.getId()), eq(PKG), anyInt()))
@@ -2290,7 +2307,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
when(mPreferencesHelper.getNotificationChannel(eq(PKG), anyInt(),
eq(mTestNotificationChannel.getId()), anyBoolean()))
.thenReturn(mTestNotificationChannel);
@@ -2310,7 +2328,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testUpdateNotificationChannelFromPrivilegedListener_noAccess() throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
try {
mBinderService.updateNotificationChannelFromPrivilegedListener(
@@ -2333,7 +2352,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mListener = mock(ManagedServices.ManagedServiceInfo.class);
mListener.component = new ComponentName(PKG, PKG);
when(mListener.enabledAndUserMatches(anyInt())).thenReturn(false);
@@ -2360,7 +2380,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mBinderService.getNotificationChannelsFromPrivilegedListener(
null, PKG, Process.myUserHandle());
@@ -2373,7 +2394,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testGetNotificationChannelFromPrivilegedListener_cdm_noAccess() throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
try {
mBinderService.getNotificationChannelsFromPrivilegedListener(
@@ -2391,7 +2413,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testGetNotificationChannelFromPrivilegedListener_assistant_success()
throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(new ArrayList<>());
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(new ArrayList<>());
when(mAssistants.isServiceTokenValidLocked(any())).thenReturn(true);
mBinderService.getNotificationChannelsFromPrivilegedListener(
@@ -2405,7 +2428,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testGetNotificationChannelFromPrivilegedListener_assistant_noAccess()
throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(new ArrayList<>());
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(new ArrayList<>());
when(mAssistants.isServiceTokenValidLocked(any())).thenReturn(false);
try {
@@ -2425,7 +2449,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mListener = mock(ManagedServices.ManagedServiceInfo.class);
when(mListener.enabledAndUserMatches(anyInt())).thenReturn(false);
when(mListeners.checkServiceTokenLocked(any())).thenReturn(mListener);
@@ -2447,7 +2472,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
associations.add("a");
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mBinderService.getNotificationChannelGroupsFromPrivilegedListener(
null, PKG, Process.myUserHandle());
@@ -2459,7 +2485,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testGetNotificationChannelGroupsFromPrivilegedListener_noAccess() throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
try {
mBinderService.getNotificationChannelGroupsFromPrivilegedListener(
@@ -2476,7 +2503,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
public void testGetNotificationChannelGroupsFromPrivilegedListener_badUser() throws Exception {
mService.setPreferencesHelper(mPreferencesHelper);
List<String> associations = new ArrayList<>();
- when(mCompanionMgr.getAssociations(PKG, mUid)).thenReturn(associations);
+ when(mCompanionMgr.getAssociations(PKG, UserHandle.getUserId(mUid)))
+ .thenReturn(associations);
mListener = mock(ManagedServices.ManagedServiceInfo.class);
when(mListener.enabledAndUserMatches(anyInt())).thenReturn(false);
when(mListeners.checkServiceTokenLocked(any())).thenReturn(mListener);
@@ -3026,8 +3054,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mBinderService.setNotificationAssistantAccessGranted(c, true);
verify(mListeners).migrateToXml();
- verify(mListeners).notifyNotificationChannelChanged(anyString(), any(), any(),
- anyInt());
verify(mConditionProviders).setPackageOrComponentEnabled(
anyString(), anyInt(), anyBoolean(), anyBoolean());
verify(mAssistants).migrateToXml();
@@ -3041,8 +3067,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mBinderService.setNotificationPolicyAccessGranted(c.getPackageName(), true);
verify(mListeners).migrateToXml();
- verify(mListeners).notifyNotificationChannelChanged(anyString(), any(), any(),
- anyInt());
verify(mConditionProviders).setPackageOrComponentEnabled(
anyString(), anyInt(), anyBoolean(), anyBoolean());
verify(mAssistants).migrateToXml();
@@ -3178,7 +3202,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setSmallIcon(android.R.drawable.sym_def_app_icon);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
"testNoFakeColorizedPermission", mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mBinderService.enqueueNotificationWithTag(PKG, PKG, sbn.getTag(),
@@ -3216,7 +3240,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.build();
StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "tag", mUid, 0,
- n, new UserHandle(mUid), null, 0);
+ n, UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord otherPackage =
new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mService.addEnqueuedNotification(otherPackage);
@@ -3224,7 +3248,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Same notifications are enqueued as posted, everything counts b/c id and tag don't match
// anything that's currently enqueued or posted
- int userId = new UserHandle(mUid).getIdentifier();
+ int userId = UserHandle.getUserId(mUid);
assertEquals(40,
mService.getNotificationCountLocked(PKG, userId, 0, null));
assertEquals(40,
@@ -3441,8 +3465,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
StatusBarNotification sbn = new StatusBarNotification(preOPkg, preOPkg, 9,
"testBumpFGImportance_noChannelChangePreOApp",
- Binder.getCallingUid(), 0, nb.build(), new UserHandle(Binder.getCallingUid()), null,
- 0);
+ Binder.getCallingUid(), 0, nb.build(),
+ UserHandle.getUserHandleForUid(Binder.getCallingUid()), null, 0);
mBinderService.enqueueNotificationWithTag(sbn.getPackageName(), sbn.getOpPkg(),
sbn.getTag(), sbn.getId(), sbn.getNotification(), sbn.getUserId());
@@ -3459,7 +3483,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
sbn = new StatusBarNotification(preOPkg, preOPkg, 9,
"testBumpFGImportance_noChannelChangePreOApp", Binder.getCallingUid(),
- 0, nb.build(), new UserHandle(Binder.getCallingUid()), null, 0);
+ 0, nb.build(), UserHandle.getUserHandleForUid(Binder.getCallingUid()), null, 0);
mBinderService.enqueueNotificationWithTag(preOPkg, preOPkg,
"testBumpFGImportance_noChannelChangePreOApp",
@@ -3813,7 +3837,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.addMessage(message1)
.addMessage(message2));
NotificationRecord recordA = new NotificationRecord(mContext, new StatusBarNotification(
- PKG, PKG, 0, "tag", mUid, 0, nbA.build(), new UserHandle(mUid), null, 0), c);
+ PKG, PKG, 0, "tag", mUid, 0, nbA.build(), UserHandle.getUserHandleForUid(mUid),
+ null, 0), c);
// First post means we grant access to both
reset(mUgm);
@@ -3831,7 +3856,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setSmallIcon(android.R.drawable.sym_def_app_icon)
.setStyle(new Notification.MessagingStyle("").addMessage(message2));
NotificationRecord recordB = new NotificationRecord(mContext, new StatusBarNotification(PKG,
- PKG, 0, "tag", mUid, 0, nbB.build(), new UserHandle(mUid), null, 0), c);
+ PKG, 0, "tag", mUid, 0, nbB.build(), UserHandle.getUserHandleForUid(mUid), null, 0),
+ c);
// Update means we drop access to first
reset(mUgmInternal);
@@ -3870,7 +3896,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setStyle(new Notification.MessagingStyle("")
.addMessage(message1));
NotificationRecord recordA = new NotificationRecord(mContext, new StatusBarNotification(
- PKG, PKG, 0, "tag", mUid, 0, nbA.build(), new UserHandle(mUid), null, 0), c);
+ PKG, PKG, 0, "tag", mUid, 0, nbA.build(), UserHandle.getUserHandleForUid(mUid),
+ null, 0), c);
doThrow(new SecurityException("no access")).when(mUgm)
.grantUriPermissionFromOwner(
@@ -4029,7 +4056,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentTitle("foo");
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
@@ -4037,7 +4064,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setFlag(FLAG_FOREGROUND_SERVICE, true)
.setContentTitle("bar");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4049,14 +4076,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentTitle("foo");
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setContentTitle("bar");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4069,7 +4096,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setStyle(new Notification.InboxStyle()
.addLine("line1").addLine("line2"));
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
@@ -4077,7 +4104,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setStyle(new Notification.InboxStyle()
.addLine("line1").addLine("line2_changed"));
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4087,7 +4114,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setStyle(new Notification.InboxStyle()
.addLine("line1"));
StatusBarNotification sbn3 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb3.build(), new UserHandle(mUid), null, 0);
+ nb3.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r3 =
new NotificationRecord(mContext, sbn3, mock(NotificationChannel.class));
@@ -4097,7 +4124,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setStyle(new Notification.InboxStyle()
.addLine("line1").addLine("line2").addLine("line3"));
StatusBarNotification sbn4 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb4.build(), new UserHandle(mUid), null, 0);
+ nb4.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r4 =
new NotificationRecord(mContext, sbn4, mock(NotificationChannel.class));
@@ -4106,7 +4133,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb5 = new Notification.Builder(mContext, "")
.setContentText("not an inbox");
StatusBarNotification sbn5 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb5.build(), new UserHandle(mUid), null, 0);
+ nb5.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r5 =
new NotificationRecord(mContext, sbn5, mock(NotificationChannel.class));
@@ -4118,14 +4145,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentText("foo");
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setContentText("bar");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4137,14 +4164,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentText("foo");
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setContentText("foo");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4156,14 +4183,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentText(Html.fromHtml("<b>foo</b>"));
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setContentText(Html.fromHtml("<b>foo</b>"));
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4175,14 +4202,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setContentText(Html.fromHtml("<b>foo</b>"));
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setContentText(Html.fromHtml("<b>bar</b>"));
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4194,14 +4221,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setProgress(100, 90, false);
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setProgress(100, 100, false);
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4213,14 +4240,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setProgress(100, 90, false);
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setProgress(100, 91, false);
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4232,14 +4259,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb1 = new Notification.Builder(mContext, "")
.setProgress(100, 100, false);
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
Notification.Builder nb2 = new Notification.Builder(mContext, "")
.setProgress(100, 100, false);
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4253,7 +4280,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setFlag(Notification.FLAG_GROUP_SUMMARY, true)
.setContentText("foo");
StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb1.build(), new UserHandle(mUid), null, 0);
+ nb1.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r1 =
new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
@@ -4262,7 +4289,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setFlag(Notification.FLAG_GROUP_SUMMARY, true)
.setContentText("bar");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4276,7 +4303,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setFlag(Notification.FLAG_GROUP_SUMMARY, true)
.setContentText("bar");
StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
- nb2.build(), new UserHandle(mUid), null, 0);
+ nb2.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r2 =
new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
@@ -4694,7 +4721,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
n.flags |= FLAG_FOREGROUND_SERVICE;
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 9, null, mUid, 0,
- n, new UserHandle(mUid), null, 0);
+ n, UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mService.addEnqueuedNotification(r);
@@ -4713,7 +4740,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
n.flags |= FLAG_FOREGROUND_SERVICE;
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 9, null, mUid, 0,
- n, new UserHandle(mUid), null, 0);
+ n, UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mService.addNotification(r);
@@ -5026,7 +5053,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setSmallIcon(android.R.drawable.sym_def_app_icon);
StatusBarNotification sbn = new StatusBarNotification(PKG, "opPkg", 0, "tag", mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mService.reportSeen(r);
@@ -5050,7 +5077,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, r.getSbn().getId(),
r.getSbn().getTag(), mUid, 0,
new Notification.Builder(mContext, mTestNotificationChannel.getId()).build(),
- new UserHandle(mUid), null, 0);
+ UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord update = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mService.addEnqueuedNotification(update);
assertNull(update.getSbn().getNotification().getSmallIcon());
@@ -5084,7 +5111,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
}
@Test
- public void testgetNotificationChannels_crossUser() throws Exception {
+ public void testGetNotificationChannels_crossUser() throws Exception {
// same user no problem
mBinderService.getNotificationChannels("src", "target", mContext.getUserId());
@@ -5273,7 +5300,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
.setSmallIcon(android.R.drawable.sym_def_app_icon)
.setBubbleMetadata(getBubbleMetadata());
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, "tag", mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
// Say we're foreground
@@ -5319,7 +5346,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
nb.setShortcutId(null);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
null, mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
mBinderService.enqueueNotificationWithTag(PKG, PKG, sbn.getTag(),
sbn.getId(), sbn.getNotification(), sbn.getUserId());
@@ -5363,7 +5390,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
"testFlagBubbleNotifs_noFlag_notBubble", mUid, 0,
- nb.build(), new UserHandle(mUid), null, 0);
+ nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
// Post the notification
@@ -6178,7 +6205,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
nb.setShortcutId(VALID_CONVO_SHORTCUT_ID);
nb.setBubbleMetadata(metadata);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
- "tag", mUid, 0, nb.build(), new UserHandle(mUid), null, 0);
+ "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
// Test: Send the bubble notification
@@ -6203,7 +6230,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Test: Remove the shortcut
when(mLauncherApps.getShortcuts(any(), any())).thenReturn(null);
launcherAppsCallback.getValue().onShortcutsChanged(PKG, Collections.emptyList(),
- new UserHandle(mUid));
+ UserHandle.getUserHandleForUid(mUid));
waitForIdle();
// Verify:
@@ -6238,7 +6265,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
nb.setShortcutId(shortcutId);
nb.setBubbleMetadata(metadata);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
- "tag", mUid, 0, nb.build(), new UserHandle(mUid), null, 0);
+ "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
// Pretend the shortcut exists
@@ -6686,15 +6713,43 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
@Test
public void testRecordMessages_invalidMsg() throws RemoteException {
- NotificationRecord nr =
- generateMessageBubbleNotifRecord(mTestNotificationChannel,
- "testRecordMessages_invalidMsg");
+ Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */,
+ null /* groupKey */, false /* isSummary */);
+ nb.setShortcutId(null);
+ StatusBarNotification sbn = new StatusBarNotification(PKG_P, PKG_P, 1,
+ "testRecordMessages_invalidMsg", mUid, 0, nb.build(),
+ UserHandle.getUserHandleForUid(mUid), null, 0);
+ NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+
when(mLauncherApps.getShortcuts(any(), any())).thenReturn(null);
- mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(),
+ mBinderService.enqueueNotificationWithTag(PKG_P, PKG_P, nr.getSbn().getTag(),
nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId());
waitForIdle();
- assertTrue(mBinderService.isInInvalidMsgState(PKG, mUid));
+ assertTrue(mBinderService.isInInvalidMsgState(PKG_P, mUid));
+ }
+
+ @Test
+ public void testRecordMessages_invalidMsg_notMessageStyle() throws RemoteException {
+ Notification.Builder nb = new Notification.Builder(mContext,
+ mTestNotificationChannel.getId())
+ .setContentTitle("foo")
+ .setShortcutId(null)
+ .setSmallIcon(android.R.drawable.sym_def_app_icon)
+ .setCategory(Notification.CATEGORY_MESSAGE);
+ StatusBarNotification sbn = new StatusBarNotification(PKG_O, PKG_O, 1,
+ "testRecordMessages_invalidMsg_notMessageStyle", mUid, 0, nb.build(),
+ UserHandle.getUserHandleForUid(mUid), null, 0);
+ NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+
+ when(mLauncherApps.getShortcuts(any(), any())).thenReturn(null);
+ mBinderService.enqueueNotificationWithTag(PKG_O, PKG_O, nr.getSbn().getTag(),
+ nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId());
+ waitForIdle();
+
+ // PKG_O is allowed to be in conversation space b/c of override in
+ // TestableNotificationManagerService
+ assertTrue(mBinderService.isInInvalidMsgState(PKG_O, mUid));
}
@Test
@@ -6702,24 +6757,25 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */,
null /* groupKey */, false /* isSummary */);
nb.setShortcutId(null);
- StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
- "testRecordMessages_validMsg", mUid, 0, nb.build(), new UserHandle(mUid), null, 0);
+ StatusBarNotification sbn = new StatusBarNotification(PKG_P, PKG_P, 1,
+ "testRecordMessages_validMsg", mUid, 0, nb.build(),
+ UserHandle.getUserHandleForUid(mUid), null, 0);
NotificationRecord nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
- mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(),
+ mBinderService.enqueueNotificationWithTag(PKG_P, PKG_P, nr.getSbn().getTag(),
nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId());
waitForIdle();
- assertTrue(mBinderService.isInInvalidMsgState(PKG, mUid));
+ assertTrue(mBinderService.isInInvalidMsgState(PKG_P, mUid));
nr = generateMessageBubbleNotifRecord(mTestNotificationChannel,
"testRecordMessages_validMsg");
- mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(),
+ mBinderService.enqueueNotificationWithTag(PKG_P, PKG_P, nr.getSbn().getTag(),
nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId());
waitForIdle();
- assertFalse(mBinderService.isInInvalidMsgState(PKG, mUid));
+ assertFalse(mBinderService.isInInvalidMsgState(PKG_P, mUid));
}
@Test
@@ -6739,7 +6795,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
nb.setShortcutId(null);
StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1,
"testRecordMessages_invalidMsg_afterValidMsg_2", mUid, 0, nb.build(),
- new UserHandle(mUid), null, 0);
+ UserHandle.getUserHandleForUid(mUid), null, 0);
nr = new NotificationRecord(mContext, sbn, mTestNotificationChannel);
mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(),
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 30df0d4b4ad9..4040fa6a675e 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -54,6 +54,8 @@
<activity android:name="com.android.server.wm.TaskStackChangedListenerTest$ActivityViewTestActivity" />
<activity android:name="com.android.server.wm.TaskStackChangedListenerTest$ActivityInActivityView"
android:resizeableActivity="true" />
+ <activity android:name="com.android.server.wm.TaskStackChangedListenerTest$ActivityLaunchesNewActivityInActivityView"
+ android:resizeableActivity="true" />
<activity android:name="com.android.server.wm.TaskStackChangedListenerTest$LandscapeActivity"
android:screenOrientation="sensorLandscape"
android:showWhenLocked="true"
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
index 02de408343c5..ef28a450695b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -38,7 +38,6 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doCallRealMethod;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_AFTER_ANIM;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_BEFORE_ANIM;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_NONE;
@@ -65,12 +64,12 @@ import android.view.WindowManager;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.ArrayList;
+
/**
* Tests for the {@link ActivityRecord} class.
*
@@ -406,12 +405,11 @@ public class AppWindowTokenTests extends WindowTestsBase {
assertHasStartingWindow(activity2);
// Assert that bottom activity is allowed to do animation.
+ ArrayList<WindowContainer> sources = new ArrayList<>();
+ sources.add(activity2);
doReturn(true).when(activity2).okToAnimate();
doReturn(true).when(activity2).isAnimating();
- final OnAnimationFinishedCallback onAnimationFinishedCallback =
- mock(OnAnimationFinishedCallback.class);
- assertTrue(activity2.applyAnimation(null, TRANSIT_ACTIVITY_OPEN, true, false,
- onAnimationFinishedCallback));
+ assertTrue(activity2.applyAnimation(null, TRANSIT_ACTIVITY_OPEN, true, false, sources));
}
@Test
diff --git a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
index 77ceeedae1ac..f7beb74688d6 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
@@ -29,18 +29,14 @@ import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.never;
import static org.mockito.Mockito.when;
-import android.annotation.Nullable;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
import com.android.server.wm.SurfaceAnimator.AnimationType;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import org.junit.Before;
import org.junit.Test;
@@ -119,12 +115,8 @@ public class DimmerTests extends WindowTestsBase {
private static class SurfaceAnimatorStarterImpl implements Dimmer.SurfaceAnimatorStarter {
@Override
public void startAnimation(SurfaceAnimator surfaceAnimator, SurfaceControl.Transaction t,
- AnimationAdapter anim, boolean hidden, @AnimationType int type,
- @Nullable OnAnimationFinishedCallback animationFinishedCallback) {
+ AnimationAdapter anim, boolean hidden, @AnimationType int type) {
surfaceAnimator.mStaticAnimationFinishedCallback.onAnimationFinished(type, anim);
- if (animationFinishedCallback != null) {
- animationFinishedCallback.onAnimationFinished(type, anim);
- }
}
}
@@ -229,7 +221,7 @@ public class DimmerTests extends WindowTestsBase {
mDimmer.updateDims(mTransaction, new Rect());
verify(mSurfaceAnimatorStarter).startAnimation(any(SurfaceAnimator.class), any(
SurfaceControl.Transaction.class), any(AnimationAdapter.class), anyBoolean(),
- eq(ANIMATION_TYPE_DIMMER), isNull());
+ eq(ANIMATION_TYPE_DIMMER));
verify(mHost.getPendingTransaction()).remove(dimLayer);
}
@@ -287,7 +279,7 @@ public class DimmerTests extends WindowTestsBase {
mDimmer.updateDims(mTransaction, new Rect());
verify(mSurfaceAnimatorStarter, never()).startAnimation(any(SurfaceAnimator.class), any(
SurfaceControl.Transaction.class), any(AnimationAdapter.class), anyBoolean(),
- eq(ANIMATION_TYPE_DIMMER), isNull());
+ eq(ANIMATION_TYPE_DIMMER));
verify(mTransaction).remove(dimLayer);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskStackChangedListenerTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskStackChangedListenerTest.java
index 2c17bbeae498..2bd342420e2c 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskStackChangedListenerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskStackChangedListenerTest.java
@@ -299,6 +299,20 @@ public class TaskStackChangedListenerTest {
waitForCallback(singleTaskDisplayDrawnLatch);
}
+ public static class ActivityLaunchesNewActivityInActivityView extends TestActivity {
+ private boolean mActivityBLaunched = false;
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ if (mActivityBLaunched) {
+ return;
+ }
+ mActivityBLaunched = true;
+ startActivity(new Intent(this, ActivityB.class));
+ }
+ }
+
@Test
public void testSingleTaskDisplayEmpty() throws Exception {
final Instrumentation instrumentation = getInstrumentation();
@@ -335,13 +349,20 @@ public class TaskStackChangedListenerTest {
});
waitForCallback(activityViewReadyLatch);
+ // 1. start ActivityLaunchesNewActivityInActivityView in an ActivityView
+ // 2. ActivityLaunchesNewActivityInActivityView launches ActivityB
+ // 3. ActivityB finishes self.
+ // 4. Verify ITaskStackListener#onSingleTaskDisplayEmpty is not called yet.
final Context context = instrumentation.getContext();
- Intent intent = new Intent(context, ActivityInActivityView.class);
+ Intent intent = new Intent(context, ActivityLaunchesNewActivityInActivityView.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
activityView.startActivity(intent);
waitForCallback(singleTaskDisplayDrawnLatch);
+ UiDevice.getInstance(getInstrumentation()).waitForIdle();
assertEquals(1, singleTaskDisplayEmptyLatch.getCount());
+ // 5. Release the container, and ActivityLaunchesNewActivityInActivityView finishes.
+ // 6. Verify ITaskStackListener#onSingleTaskDisplayEmpty is called.
activityView.release();
waitForCallback(activityViewDestroyedLatch);
waitForCallback(singleTaskDisplayEmptyLatch);
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
index d65b084ca8c1..f1dbde066125 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskStackTests.java
@@ -153,7 +153,8 @@ public class TaskStackTests extends WindowTestsBase {
// Stack removal is deferred if one of its child is animating.
doReturn(true).when(stack).hasWindowsAlive();
- doReturn(true).when(task).isAnimating(eq(TRANSITION | CHILDREN), anyInt());
+ doReturn(stack).when(task).getAnimatingContainer(
+ eq(TRANSITION | CHILDREN), anyInt());
stack.removeIfPossible();
// For the case of deferred removal the task controller will still be connected to the its
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
index 00439f84702d..87485eac3412 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
@@ -66,14 +66,14 @@ import android.view.SurfaceSession;
import androidx.test.filters.SmallTest;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
-
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
+import java.util.ArrayList;
import java.util.Comparator;
+
/**
* Test class for {@link WindowContainer}.
*
@@ -828,17 +828,21 @@ public class WindowContainerTests extends WindowTestsBase {
public void testTaskCanApplyAnimation() {
final ActivityStack stack = createTaskStackOnDisplay(mDisplayContent);
final Task task = createTaskInStack(stack, 0 /* userId */);
- final ActivityRecord activity =
+ final ActivityRecord activity2 =
+ WindowTestUtils.createActivityRecordInTask(mDisplayContent, task);
+ final ActivityRecord activity1 =
WindowTestUtils.createActivityRecordInTask(mDisplayContent, task);
- verifyWindowContainerApplyAnimation(task, activity);
+ verifyWindowContainerApplyAnimation(task, activity1, activity2);
}
@Test
public void testStackCanApplyAnimation() {
final ActivityStack stack = createTaskStackOnDisplay(mDisplayContent);
- final ActivityRecord activity = WindowTestUtils.createActivityRecordInTask(mDisplayContent,
+ final ActivityRecord activity2 = WindowTestUtils.createActivityRecordInTask(mDisplayContent,
createTaskInStack(stack, 0 /* userId */));
- verifyWindowContainerApplyAnimation(stack, activity);
+ final ActivityRecord activity1 = WindowTestUtils.createActivityRecordInTask(mDisplayContent,
+ createTaskInStack(stack, 0 /* userId */));
+ verifyWindowContainerApplyAnimation(stack, activity1, activity2);
}
@Test
@@ -871,7 +875,8 @@ public class WindowContainerTests extends WindowTestsBase {
assertEquals(displayArea, displayArea.getDisplayArea());
}
- private void verifyWindowContainerApplyAnimation(WindowContainer wc, ActivityRecord act) {
+ private void verifyWindowContainerApplyAnimation(WindowContainer wc, ActivityRecord act,
+ ActivityRecord act2) {
// Initial remote animation for app transition.
final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter(
new IRemoteAnimationRunner.Stub() {
@@ -895,17 +900,23 @@ public class WindowContainerTests extends WindowTestsBase {
wc.getDisplayContent().mAppTransition.overridePendingAppTransitionRemote(adapter);
spyOn(wc);
doReturn(true).when(wc).okToAnimate();
- final OnAnimationFinishedCallback onAnimationFinishedCallback =
- mock(OnAnimationFinishedCallback.class);
// Make sure animating state is as expected after applied animation.
- assertTrue(wc.applyAnimation(null, TRANSIT_TASK_OPEN, true, false,
- onAnimationFinishedCallback));
- assertEquals(wc.getTopMostActivity(), act);
+
+ // Animation target is promoted from act to wc. act2 is a descendant of wc, but not a source
+ // of the animation.
+ ArrayList<WindowContainer<WindowState>> sources = new ArrayList<>();
+ sources.add(act);
+ assertTrue(wc.applyAnimation(null, TRANSIT_TASK_OPEN, true, false, sources));
+
+ assertEquals(act, wc.getTopMostActivity());
assertTrue(wc.isAnimating());
+ assertTrue(wc.isAnimating(0, ANIMATION_TYPE_APP_TRANSITION));
+ assertTrue(wc.getAnimationSources().contains(act));
+ assertFalse(wc.getAnimationSources().contains(act2));
assertTrue(act.isAnimating(PARENTS));
- verify(onAnimationFinishedCallback, times(0)).onAnimationFinished(
- eq(ANIMATION_TYPE_APP_TRANSITION), any());
+ assertTrue(act.isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION));
+ assertEquals(wc, act.getAnimatingContainer(PARENTS, ANIMATION_TYPE_APP_TRANSITION));
// Make sure animation finish callback will be received and reset animating state after
// animation finish.
@@ -914,8 +925,6 @@ public class WindowContainerTests extends WindowTestsBase {
verify(wc).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), any());
assertFalse(wc.isAnimating());
assertFalse(act.isAnimating(PARENTS));
- verify(onAnimationFinishedCallback, times(1)).onAnimationFinished(
- eq(ANIMATION_TYPE_APP_TRANSITION), any());
}
/* Used so we can gain access to some protected members of the {@link WindowContainer} class */
diff --git a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java
index b3d7c0d36763..4606fb4b631c 100644
--- a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java
+++ b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java
@@ -21,7 +21,6 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
-import android.content.res.Resources;
import android.os.SystemConfigManager;
import android.os.UserHandle;
import android.permission.PermissionManager;
@@ -30,9 +29,7 @@ import android.telephony.TelephonyManager;
import android.util.ArrayMap;
import android.util.Log;
-import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.telephony.util.ArrayUtils;
import java.util.ArrayList;
import java.util.List;
@@ -162,12 +159,9 @@ public final class CarrierAppUtils {
try {
for (ApplicationInfo ai : candidates) {
String packageName = ai.packageName;
- String[] restrictedCarrierApps = Resources.getSystem().getStringArray(
- R.array.config_restrictedPreinstalledCarrierApps);
boolean hasPrivileges = telephonyManager != null
&& telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName)
- == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS
- && !ArrayUtils.contains(restrictedCarrierApps, packageName);
+ == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
// add hiddenUntilInstalled flag for carrier apps and associated apps
packageManager.setSystemAppState(
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index 1993550d52b8..e6279dc977ee 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -366,7 +366,7 @@ public final class CellIdentityLte extends CellIdentity {
.append(" mPci=").append(mPci)
.append(" mTac=").append(mTac)
.append(" mEarfcn=").append(mEarfcn)
- .append(" mBands=").append(mBands)
+ .append(" mBands=").append(Arrays.toString(mBands))
.append(" mBandwidth=").append(mBandwidth)
.append(" mMcc=").append(mMccStr)
.append(" mMnc=").append(mMncStr)
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 8dd7bdd57841..e34bbfcde492 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -242,7 +242,7 @@ public final class CellIdentityNr extends CellIdentity {
.append(" mPci = ").append(mPci)
.append(" mTac = ").append(mTac)
.append(" mNrArfcn = ").append(mNrArfcn)
- .append(" mBands = ").append(mBands)
+ .append(" mBands = ").append(Arrays.toString(mBands))
.append(" mMcc = ").append(mMccStr)
.append(" mMnc = ").append(mMncStr)
.append(" mNci = ").append(mNci)
diff --git a/tests/net/java/com/android/server/net/NetworkStatsSubscriptionsMonitorTest.java b/tests/net/java/com/android/server/net/NetworkStatsSubscriptionsMonitorTest.java
new file mode 100644
index 000000000000..058856dcd6fb
--- /dev/null
+++ b/tests/net/java/com/android/server/net/NetworkStatsSubscriptionsMonitorTest.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.net;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.annotation.NonNull;
+import android.content.Context;
+import android.os.Looper;
+import android.telephony.PhoneStateListener;
+import android.telephony.ServiceState;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.internal.util.CollectionUtils;
+import com.android.server.net.NetworkStatsSubscriptionsMonitor.Delegate;
+import com.android.server.net.NetworkStatsSubscriptionsMonitor.RatTypeListener;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+@RunWith(JUnit4.class)
+public final class NetworkStatsSubscriptionsMonitorTest {
+ private static final int TEST_SUBID1 = 3;
+ private static final int TEST_SUBID2 = 5;
+ private static final String TEST_IMSI1 = "466921234567890";
+ private static final String TEST_IMSI2 = "466920987654321";
+ private static final String TEST_IMSI3 = "466929999999999";
+
+ @Mock private Context mContext;
+ @Mock private PhoneStateListener mPhoneStateListener;
+ @Mock private SubscriptionManager mSubscriptionManager;
+ @Mock private TelephonyManager mTelephonyManager;
+ @Mock private Delegate mDelegate;
+ private final List<Integer> mTestSubList = new ArrayList<>();
+
+ private final Executor mExecutor = Executors.newSingleThreadExecutor();
+ private NetworkStatsSubscriptionsMonitor mMonitor;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+
+ if (Looper.myLooper() == null) {
+ Looper.prepare();
+ }
+
+ when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager);
+
+ when(mContext.getSystemService(eq(Context.TELEPHONY_SUBSCRIPTION_SERVICE)))
+ .thenReturn(mSubscriptionManager);
+ when(mContext.getSystemService(eq(Context.TELEPHONY_SERVICE)))
+ .thenReturn(mTelephonyManager);
+
+ mMonitor = new NetworkStatsSubscriptionsMonitor(mContext, mExecutor, mDelegate);
+ }
+
+ @Test
+ public void testStartStop() {
+ // Verify that addOnSubscriptionsChangedListener() is never called before start().
+ verify(mSubscriptionManager, never())
+ .addOnSubscriptionsChangedListener(mExecutor, mMonitor);
+ mMonitor.start();
+ verify(mSubscriptionManager).addOnSubscriptionsChangedListener(mExecutor, mMonitor);
+
+ // Verify that removeOnSubscriptionsChangedListener() is never called before stop()
+ verify(mSubscriptionManager, never()).removeOnSubscriptionsChangedListener(mMonitor);
+ mMonitor.stop();
+ verify(mSubscriptionManager).removeOnSubscriptionsChangedListener(mMonitor);
+ }
+
+ @NonNull
+ private static int[] convertArrayListToIntArray(@NonNull List<Integer> arrayList) {
+ final int[] list = new int[arrayList.size()];
+ for (int i = 0; i < arrayList.size(); i++) {
+ list[i] = arrayList.get(i);
+ }
+ return list;
+ }
+
+ private void setRatTypeForSub(List<RatTypeListener> listeners,
+ int subId, int type) {
+ final ServiceState serviceState = mock(ServiceState.class);
+ when(serviceState.getDataNetworkType()).thenReturn(type);
+ final RatTypeListener match = CollectionUtils
+ .find(listeners, it -> it.getSubId() == subId);
+ if (match != null) {
+ match.onServiceStateChanged(serviceState);
+ }
+ }
+
+ private void addTestSub(int subId, String subscriberId) {
+ // add SubId to TestSubList.
+ if (!mTestSubList.contains(subId)) {
+ mTestSubList.add(subId);
+ }
+ final int[] subList = convertArrayListToIntArray(mTestSubList);
+ when(mSubscriptionManager.getCompleteActiveSubscriptionIdList()).thenReturn(subList);
+ when(mTelephonyManager.getSubscriberId(subId)).thenReturn(subscriberId);
+ mMonitor.onSubscriptionsChanged();
+ }
+
+ private void removeTestSub(int subId) {
+ // Remove subId from TestSubList.
+ mTestSubList.removeIf(it -> it == subId);
+ final int[] subList = convertArrayListToIntArray(mTestSubList);
+ when(mSubscriptionManager.getCompleteActiveSubscriptionIdList()).thenReturn(subList);
+ mMonitor.onSubscriptionsChanged();
+ }
+
+ private void assertRatTypeChangedForSub(String subscriberId, int ratType) {
+ assertEquals(mMonitor.getRatTypeForSubscriberId(subscriberId), ratType);
+ final ArgumentCaptor<Integer> typeCaptor = ArgumentCaptor.forClass(Integer.class);
+ // Verify callback with the subscriberId and the RAT type should be as expected.
+ // It will fail if get a callback with an unexpected RAT type.
+ verify(mDelegate).onCollapsedRatTypeChanged(eq(subscriberId), typeCaptor.capture());
+ final int type = typeCaptor.getValue();
+ assertEquals(ratType, type);
+ }
+
+ private void assertRatTypeNotChangedForSub(String subscriberId, int ratType) {
+ assertEquals(mMonitor.getRatTypeForSubscriberId(subscriberId), ratType);
+ // Should never get callback with any RAT type.
+ verify(mDelegate, never()).onCollapsedRatTypeChanged(eq(subscriberId), anyInt());
+ }
+
+ @Test
+ public void testSubChangedAndRatTypeChanged() {
+ final ArgumentCaptor<RatTypeListener> ratTypeListenerCaptor =
+ ArgumentCaptor.forClass(RatTypeListener.class);
+
+ mMonitor.start();
+ // Insert sim1, verify RAT type is NETWORK_TYPE_UNKNOWN, and never get any callback
+ // before changing RAT type.
+ addTestSub(TEST_SUBID1, TEST_IMSI1);
+ assertRatTypeNotChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+
+ // Insert sim2.
+ addTestSub(TEST_SUBID2, TEST_IMSI2);
+ assertRatTypeNotChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ verify(mTelephonyManager, times(2)).listen(ratTypeListenerCaptor.capture(),
+ eq(PhoneStateListener.LISTEN_SERVICE_STATE));
+ reset(mDelegate);
+
+ // Set RAT type of sim1 to UMTS.
+ // Verify RAT type of sim1 after subscription gets onCollapsedRatTypeChanged() callback
+ // and others remain untouched.
+ setRatTypeForSub(ratTypeListenerCaptor.getAllValues(), TEST_SUBID1,
+ TelephonyManager.NETWORK_TYPE_UMTS);
+ assertRatTypeChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UMTS);
+ assertRatTypeNotChangedForSub(TEST_IMSI2, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ assertRatTypeNotChangedForSub(TEST_IMSI3, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ reset(mDelegate);
+
+ // Set RAT type of sim2 to LTE.
+ // Verify RAT type of sim2 after subscription gets onCollapsedRatTypeChanged() callback
+ // and others remain untouched.
+ setRatTypeForSub(ratTypeListenerCaptor.getAllValues(), TEST_SUBID2,
+ TelephonyManager.NETWORK_TYPE_LTE);
+ assertRatTypeNotChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UMTS);
+ assertRatTypeChangedForSub(TEST_IMSI2, TelephonyManager.NETWORK_TYPE_LTE);
+ assertRatTypeNotChangedForSub(TEST_IMSI3, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ reset(mDelegate);
+
+ // Remove sim2 and verify that callbacks are fired and RAT type is correct for sim2.
+ // while the other two remain untouched.
+ removeTestSub(TEST_SUBID2);
+ verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_NONE));
+ assertRatTypeNotChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UMTS);
+ assertRatTypeChangedForSub(TEST_IMSI2, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ assertRatTypeNotChangedForSub(TEST_IMSI3, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ reset(mDelegate);
+
+ // Set RAT type of sim1 to UNKNOWN. Then stop monitoring subscription changes
+ // and verify that the listener for sim1 is removed.
+ setRatTypeForSub(ratTypeListenerCaptor.getAllValues(), TEST_SUBID1,
+ TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ assertRatTypeChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ reset(mDelegate);
+
+ mMonitor.stop();
+ verify(mTelephonyManager, times(2)).listen(any(), eq(PhoneStateListener.LISTEN_NONE));
+ assertRatTypeChangedForSub(TEST_IMSI1, TelephonyManager.NETWORK_TYPE_UNKNOWN);
+ }
+}
diff --git a/tests/utils/hostutils/Android.bp b/tests/utils/hostutils/Android.bp
new file mode 100644
index 000000000000..c9ad70280aa6
--- /dev/null
+++ b/tests/utils/hostutils/Android.bp
@@ -0,0 +1,28 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+java_library_host {
+ name: "frameworks-base-hostutils",
+
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ ],
+
+ libs: [
+ "tradefed",
+ "junit",
+ ],
+}
diff --git a/tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java b/tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java
new file mode 100644
index 000000000000..6bd6985f9675
--- /dev/null
+++ b/tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java
@@ -0,0 +1,362 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util.test;
+
+import static org.junit.Assert.assertTrue;
+
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.log.LogUtil;
+
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.rules.ExternalResource;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+
+import javax.annotation.Nullable;
+
+/**
+ * Allows pushing files onto the device and various options for rebooting. Useful for installing
+ * APKs/files to system partitions which otherwise wouldn't be easily changed.
+ *
+ * It's strongly recommended to pass in a {@link ClassRule} annotated {@link TestRuleDelegate} to
+ * do a full reboot at the end of a test to ensure the device is in a valid state, assuming the
+ * default {@link RebootStrategy#FULL} isn't used.
+ */
+public class SystemPreparer extends ExternalResource {
+ private static final long OVERLAY_ENABLE_TIMEOUT_MS = 30000;
+
+ // The paths of the files pushed onto the device through this rule.
+ private ArrayList<String> mPushedFiles = new ArrayList<>();
+
+ // The package names of packages installed through this rule.
+ private ArrayList<String> mInstalledPackages = new ArrayList<>();
+
+ private final TemporaryFolder mHostTempFolder;
+ private final DeviceProvider mDeviceProvider;
+ private final RebootStrategy mRebootStrategy;
+ private final TearDownRule mTearDownRule;
+
+ public SystemPreparer(TemporaryFolder hostTempFolder, DeviceProvider deviceProvider) {
+ this(hostTempFolder, RebootStrategy.FULL, null, deviceProvider);
+ }
+
+ public SystemPreparer(TemporaryFolder hostTempFolder, RebootStrategy rebootStrategy,
+ @Nullable TestRuleDelegate testRuleDelegate, DeviceProvider deviceProvider) {
+ mHostTempFolder = hostTempFolder;
+ mDeviceProvider = deviceProvider;
+ mRebootStrategy = rebootStrategy;
+ mTearDownRule = new TearDownRule(mDeviceProvider);
+ if (testRuleDelegate != null) {
+ testRuleDelegate.setDelegate(mTearDownRule);
+ }
+ }
+
+ /** Copies a file within the host test jar to a path on device. */
+ public SystemPreparer pushResourceFile(String filePath, String outputPath)
+ throws DeviceNotAvailableException, IOException {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ remount();
+ assertTrue(device.pushFile(copyResourceToTemp(filePath), outputPath));
+ mPushedFiles.add(outputPath);
+ return this;
+ }
+
+ /** Copies a file directly from the host file system to a path on device. */
+ public SystemPreparer pushFile(File file, String outputPath)
+ throws DeviceNotAvailableException {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ remount();
+ assertTrue(device.pushFile(file, outputPath));
+ mPushedFiles.add(outputPath);
+ return this;
+ }
+
+ /** Deletes the given path from the device */
+ public SystemPreparer deleteFile(String file) throws DeviceNotAvailableException {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ remount();
+ device.deleteFile(file);
+ return this;
+ }
+
+ /** Installs an APK within the host test jar onto the device. */
+ public SystemPreparer installResourceApk(String resourcePath, String packageName)
+ throws DeviceNotAvailableException, IOException {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ final File tmpFile = copyResourceToTemp(resourcePath);
+ final String result = device.installPackage(tmpFile, true /* reinstall */);
+ Assert.assertNull(result);
+ mInstalledPackages.add(packageName);
+ return this;
+ }
+
+ /** Sets the enable state of an overlay package. */
+ public SystemPreparer setOverlayEnabled(String packageName, boolean enabled)
+ throws DeviceNotAvailableException {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ final String enable = enabled ? "enable" : "disable";
+
+ // Wait for the overlay to change its enabled state.
+ final long endMillis = System.currentTimeMillis() + OVERLAY_ENABLE_TIMEOUT_MS;
+ String result;
+ while (System.currentTimeMillis() <= endMillis) {
+ device.executeShellCommand(String.format("cmd overlay %s %s", enable, packageName));
+ result = device.executeShellCommand("cmd overlay dump isenabled "
+ + packageName);
+ if (((enabled) ? "true\n" : "false\n").equals(result)) {
+ return this;
+ }
+
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException ignore) {
+ }
+ }
+
+ throw new IllegalStateException(String.format("Failed to %s overlay %s:\n%s", enable,
+ packageName, device.executeShellCommand("cmd overlay list")));
+ }
+
+ /** Restarts the device and waits until after boot is completed. */
+ public SystemPreparer reboot() throws DeviceNotAvailableException {
+ ITestDevice device = mDeviceProvider.getDevice();
+ switch (mRebootStrategy) {
+ case FULL:
+ device.reboot();
+ break;
+ case UNTIL_ONLINE:
+ device.rebootUntilOnline();
+ break;
+ case USERSPACE:
+ device.rebootUserspace();
+ break;
+ case USERSPACE_UNTIL_ONLINE:
+ device.rebootUserspaceUntilOnline();
+ break;
+ case START_STOP:
+ device.executeShellCommand("stop");
+ device.executeShellCommand("start");
+ ITestDevice.RecoveryMode cachedRecoveryMode = device.getRecoveryMode();
+ device.setRecoveryMode(ITestDevice.RecoveryMode.ONLINE);
+
+ if (device.isEncryptionSupported()) {
+ if (device.isDeviceEncrypted()) {
+ LogUtil.CLog.e("Device is encrypted after userspace reboot!");
+ device.unlockDevice();
+ }
+ }
+
+ device.setRecoveryMode(cachedRecoveryMode);
+ device.waitForDeviceAvailable();
+ break;
+ }
+ return this;
+ }
+
+ public SystemPreparer remount() throws DeviceNotAvailableException {
+ mTearDownRule.remount();
+ return this;
+ }
+
+ /** Copies a file within the host test jar to a temporary file on the host machine. */
+ private File copyResourceToTemp(String resourcePath) throws IOException {
+ final File tempFile = mHostTempFolder.newFile();
+ final ClassLoader classLoader = getClass().getClassLoader();
+ try (InputStream assetIs = classLoader.getResource(resourcePath).openStream();
+ FileOutputStream assetOs = new FileOutputStream(tempFile)) {
+ if (assetIs == null) {
+ throw new IllegalStateException("Failed to find resource " + resourcePath);
+ }
+
+ int b;
+ while ((b = assetIs.read()) >= 0) {
+ assetOs.write(b);
+ }
+ }
+
+ return tempFile;
+ }
+
+ /** Removes installed packages and files that were pushed to the device. */
+ @Override
+ protected void after() {
+ final ITestDevice device = mDeviceProvider.getDevice();
+ try {
+ remount();
+ for (final String file : mPushedFiles) {
+ device.deleteFile(file);
+ }
+ for (final String packageName : mInstalledPackages) {
+ device.uninstallPackage(packageName);
+ }
+ reboot();
+ } catch (DeviceNotAvailableException e) {
+ Assert.fail(e.toString());
+ }
+ }
+
+ /**
+ * A hacky workaround since {@link org.junit.AfterClass} and {@link ClassRule} require static
+ * members. Will defer assignment of the actual {@link TestRule} to execute until after any
+ * test case has been run.
+ *
+ * In effect, this makes the {@link ITestDevice} to be accessible after all test cases have
+ * been executed, allowing {@link ITestDevice#reboot()} to be used to fully restore the device.
+ */
+ public static class TestRuleDelegate implements TestRule {
+
+ private boolean mThrowOnNull;
+
+ @Nullable
+ private TestRule mTestRule;
+
+ public TestRuleDelegate(boolean throwOnNull) {
+ mThrowOnNull = throwOnNull;
+ }
+
+ public void setDelegate(TestRule testRule) {
+ mTestRule = testRule;
+ }
+
+ @Override
+ public Statement apply(Statement base, Description description) {
+ if (mTestRule == null) {
+ if (mThrowOnNull) {
+ throw new IllegalStateException("TestRule delegate was not set");
+ } else {
+ return new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ base.evaluate();
+ }
+ };
+ }
+ }
+
+ Statement statement = mTestRule.apply(base, description);
+ mTestRule = null;
+ return statement;
+ }
+ }
+
+ /**
+ * Forces a full reboot at the end of the test class to restore any device state.
+ */
+ private static class TearDownRule extends ExternalResource {
+
+ private DeviceProvider mDeviceProvider;
+ private boolean mInitialized;
+ private boolean mWasVerityEnabled;
+ private boolean mWasAdbRoot;
+ private boolean mIsVerityEnabled;
+
+ TearDownRule(DeviceProvider deviceProvider) {
+ mDeviceProvider = deviceProvider;
+ }
+
+ @Override
+ protected void before() {
+ // This method will never be run
+ }
+
+ @Override
+ protected void after() {
+ try {
+ initialize();
+ ITestDevice device = mDeviceProvider.getDevice();
+ if (mWasVerityEnabled != mIsVerityEnabled) {
+ device.executeShellCommand(
+ mWasVerityEnabled ? "enable-verity" : "disable-verity");
+ }
+ device.reboot();
+ if (!mWasAdbRoot) {
+ device.disableAdbRoot();
+ }
+ } catch (DeviceNotAvailableException e) {
+ Assert.fail(e.toString());
+ }
+ }
+
+ /**
+ * Remount is done inside this class so that the verity state can be tracked.
+ */
+ public void remount() throws DeviceNotAvailableException {
+ initialize();
+ ITestDevice device = mDeviceProvider.getDevice();
+ device.enableAdbRoot();
+ if (mIsVerityEnabled) {
+ mIsVerityEnabled = false;
+ device.executeShellCommand("disable-verity");
+ device.reboot();
+ }
+ device.executeShellCommand("remount");
+ device.waitForDeviceAvailable();
+ }
+
+ private void initialize() throws DeviceNotAvailableException {
+ if (mInitialized) {
+ return;
+ }
+ mInitialized = true;
+ ITestDevice device = mDeviceProvider.getDevice();
+ mWasAdbRoot = device.isAdbRoot();
+ device.enableAdbRoot();
+ String veritySystem = device.getProperty("partition.system.verified");
+ String verityVendor = device.getProperty("partition.vendor.verified");
+ mWasVerityEnabled = (veritySystem != null && !veritySystem.isEmpty())
+ || (verityVendor != null && !verityVendor.isEmpty());
+ mIsVerityEnabled = mWasVerityEnabled;
+ }
+ }
+
+ public interface DeviceProvider {
+ ITestDevice getDevice();
+ }
+
+ /**
+ * How to reboot the device. Ordered from slowest to fastest.
+ */
+ public enum RebootStrategy {
+ /** @see ITestDevice#reboot() */
+ FULL,
+
+ /** @see ITestDevice#rebootUntilOnline() () */
+ UNTIL_ONLINE,
+
+ /** @see ITestDevice#rebootUserspace() */
+ USERSPACE,
+
+ /** @see ITestDevice#rebootUserspaceUntilOnline() () */
+ USERSPACE_UNTIL_ONLINE,
+
+ /**
+ * Uses shell stop && start to "reboot" the device. May leave invalid state after each test.
+ * Whether this matters or not depends on what's being tested.
+ */
+ START_STOP
+ }
+}
diff --git a/wifi/Android.bp b/wifi/Android.bp
index 9c5b7b66f2a3..941ff61b3ba5 100644
--- a/wifi/Android.bp
+++ b/wifi/Android.bp
@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+java_defaults {
+ name: "wifi-module-sdk-version-defaults",
+ min_sdk_version: "30",
+ target_sdk_version: "30",
+}
+
filegroup {
name: "framework-wifi-updatable-exported-aidl-sources",
srcs: ["aidl-export/**/*.aidl"],
@@ -73,6 +79,7 @@ test_access_hidden_api_whitelist = [
// classes before they are renamed.
java_library {
name: "framework-wifi-pre-jarjar",
+ defaults: ["wifi-module-sdk-version-defaults"],
sdk_version: "module_current",
static_libs: [
"framework-wifi-util-lib",
@@ -98,7 +105,10 @@ java_library {
// post-jarjar version of framework-wifi
java_sdk_library {
name: "framework-wifi",
- defaults: ["framework-module-defaults"],
+ defaults: [
+ "framework-module-defaults",
+ "wifi-module-sdk-version-defaults",
+ ],
static_libs: [
"framework-wifi-util-lib",
"android.hardware.wifi-V1.0-java-constants",
diff --git a/wifi/java/android/net/wifi/SoftApCapability.java b/wifi/java/android/net/wifi/SoftApCapability.java
index 18b26db1b020..dcb57ecc933f 100644
--- a/wifi/java/android/net/wifi/SoftApCapability.java
+++ b/wifi/java/android/net/wifi/SoftApCapability.java
@@ -102,7 +102,9 @@ public final class SoftApCapability implements Parcelable {
/**
* Returns true when all of the queried features are supported, otherwise false.
*
- * @param features One or combination of the features from {@link @HotspotFeatures}
+ * @param features One or combination of the following features:
+ * {@link #SOFTAP_FEATURE_ACS_OFFLOAD}, {@link #SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT} or
+ * {@link #SOFTAP_FEATURE_WPA3_SAE}.
*/
public boolean areFeaturesSupported(@HotspotFeatures long features) {
return (mSupportedFeatures & features) == features;
@@ -122,7 +124,9 @@ public final class SoftApCapability implements Parcelable {
* Constructor with combination of the feature.
* Zero to no supported feature.
*
- * @param features One or combination of the features from {@link @HotspotFeatures}.
+ * @param features One or combination of the following features:
+ * {@link #SOFTAP_FEATURE_ACS_OFFLOAD}, {@link #SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT} or
+ * {@link #SOFTAP_FEATURE_WPA3_SAE}.
* @hide
*/
public SoftApCapability(@HotspotFeatures long features) {
diff --git a/wifi/java/android/net/wifi/SoftApConfiguration.java b/wifi/java/android/net/wifi/SoftApConfiguration.java
index 457e0db9dc54..2bcd4f4241a6 100644
--- a/wifi/java/android/net/wifi/SoftApConfiguration.java
+++ b/wifi/java/android/net/wifi/SoftApConfiguration.java
@@ -165,7 +165,8 @@ public final class SoftApConfiguration implements Parcelable {
/**
* The operating band of the AP.
- * One of the band types from {@link @BandType}.
+ * One or combination of the following band type:
+ * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
*/
private final @BandType int mBand;
@@ -181,7 +182,11 @@ public final class SoftApConfiguration implements Parcelable {
/**
* The operating security type of the AP.
- * One of the security types from {@link @SecurityType}
+ * One of the following security types:
+ * {@link #SECURITY_TYPE_OPEN},
+ * {@link #SECURITY_TYPE_WPA2_PSK},
+ * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
+ * {@link #SECURITY_TYPE_WPA3_SAE}
*/
private final @SecurityType int mSecurityType;
@@ -393,8 +398,12 @@ public final class SoftApConfiguration implements Parcelable {
}
/**
- * Returns {@link BandType} set to be the band for the AP.
- * {@link Builder#setBand(@BandType int)}.
+ * Returns band type set to be the band for the AP.
+ *
+ * One or combination of the following band type:
+ * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
+ *
+ * {@link Builder#setBand(int)}.
*
* @hide
*/
@@ -679,15 +688,19 @@ public final class SoftApConfiguration implements Parcelable {
/**
* Specifies that this AP should use specific security type with the given ASCII passphrase.
*
- * @param securityType one of the security types from {@link @SecurityType}.
- * @param passphrase The passphrase to use for sepcific {@link @SecurityType} configuration
- * or null with {@link @SecurityType#SECURITY_TYPE_OPEN}.
+ * @param securityType One of the following security types:
+ * {@link #SECURITY_TYPE_OPEN},
+ * {@link #SECURITY_TYPE_WPA2_PSK},
+ * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
+ * {@link #SECURITY_TYPE_WPA3_SAE}.
+ * @param passphrase The passphrase to use for sepcific {@code securityType} configuration
+ * or null with {@link #SECURITY_TYPE_OPEN}.
*
* @return Builder for chaining.
* @throws IllegalArgumentException when the passphrase length is invalid and
- * {@code securityType} is not {@link @SecurityType#SECURITY_TYPE_OPEN}
+ * {@code securityType} is not {@link #SECURITY_TYPE_OPEN}
* or non-null passphrase and {@code securityType} is
- * {@link @SecurityType#SECURITY_TYPE_OPEN}.
+ * {@link #SECURITY_TYPE_OPEN}.
*/
@NonNull
public Builder setPassphrase(@Nullable String passphrase, @SecurityType int securityType) {
@@ -735,9 +748,10 @@ public final class SoftApConfiguration implements Parcelable {
/**
* Specifies the band for the AP.
* <p>
- * <li>If not set, defaults to BAND_2GHZ {@link @BandType}.</li>
+ * <li>If not set, defaults to {@link #BAND_2GHZ}.</li>
*
- * @param band One or combination of the band types from {@link @BandType}.
+ * @param band One or combination of the following band type:
+ * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
* @return Builder for chaining.
*/
@NonNull
@@ -758,7 +772,7 @@ public final class SoftApConfiguration implements Parcelable {
* <p>
* The default for the channel is a the special value 0 to have the framework
* auto-select a valid channel from the band configured with
- * {@link #setBand(@BandType int)}.
+ * {@link #setBand(int)}.
*
* The channel auto selection will offload to driver when
* {@link SoftApCapability#areFeaturesSupported(
diff --git a/wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java b/wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java
index 3215246a9c1f..4116234c4c8d 100644
--- a/wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java
+++ b/wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java
@@ -1039,11 +1039,11 @@ public class WifiNl80211Manager {
* The result depends on the on the country code that has been set.
*
* @param band as specified by one of the WifiScanner.WIFI_BAND_* constants.
- * The following bands are supported {@link @WifiScanner.WifiBandBasic}:
- * WifiScanner.WIFI_BAND_24_GHZ
- * WifiScanner.WIFI_BAND_5_GHZ
- * WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY
- * WifiScanner.WIFI_BAND_6_GHZ
+ * The following bands are supported:
+ * {@link WifiScanner#WIFI_BAND_24_GHZ},
+ * {@link WifiScanner#WIFI_BAND_5_GHZ},
+ * {@link WifiScanner#WIFI_BAND_5_GHZ_DFS_ONLY},
+ * {@link WifiScanner#WIFI_BAND_6_GHZ}
* @return frequencies vector of valid frequencies (MHz), or an empty array for error.
* @throws IllegalArgumentException if band is not recognized.
*/