summaryrefslogtreecommitdiff
path: root/core/java/android/content
Commit message (Collapse)AuthorAgeFilesLines
* PM: Restrict subclass construction.Steven Moreland2025-10-071-0/+4
| | | | | | | | | | | | Don't construct a random class just because you were asked to. Bug: 373467684 Test: atest PackageParsingPerfTest Flag: EXEMPT bugfix (cherry picked from commit 65c1a90bf4af54f555ded29ec2384072b1c962b8) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b6af52a75354b862781c7b46466c3356791c5599) Merged-In: I328eca7b8de1eab637e3991adeb2e1d147c30268 Change-Id: I328eca7b8de1eab637e3991adeb2e1d147c30268
* Fail parseUri if end is missingWilliam Loh2024-11-151-0/+3
| | | | | | | | | | Bug: 318683126 Test: atest IntentTest Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b85bee508793e31d6fe37fc9cd4e8fa3787113cc) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:77c140c674ec1cec011989f4a2c2666949771370) Merged-In: I5f619ced684ff505ce2b7408cd35dd3e9be89dea Change-Id: I5f619ced684ff505ce2b7408cd35dd3e9be89dea
* Fix vulnerability in AttributionSource due to incorrect Binder callLokesh Kumar Goel2024-06-231-3/+17
| | | | | | | | | | | | | | | | | | | AttributionSource uses Binder.getCallingUid to verify the UID of the caller from another process. However, getCallingUid does not always behave as expected. If the AttributionSource is unparceled outside a transaction thread, which is quite possible, getCallingUid will return the UID of the current process instead. If this is a system process, the UID check gets bypassed entirely, meaning any uid can be provided. This patch fixes the vulnerability by emptying out the state of the AttributionSource, so that the service checking its credentials will fail to give permission to the app. Bug: 267231571 Test: v2/android-virtual-infra/test_mapping/presubmit-avd (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5d79e535b9a802680062545e15fc1faaf779c0bf) Merged-In: I3f228064fbd62e1c907f1ebe870cb61102f788f0 Change-Id: I3f228064fbd62e1c907f1ebe870cb61102f788f0
* DO NOT MERGE Disallow Wallpaper service to launch activity from background.Nan Wu2024-02-151-0/+9
| | | | | | | | | | | | Add a flag so that when a foreground client binds to a service, disallow the bound service to launch activity from background. Modify the WallpaperManagerService to take advantage of the new flag. Test: atest BackgroundActivityLaunchTest WallpaperManagerServiceTests Bug: 298094386 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8efec2c0958ef8316cd24f7c79de818a7ca4cde9) Merged-In: Id4e4cb6144597cf3638f2aaa34ea455a239fa1a7 Change-Id: Id4e4cb6144597cf3638f2aaa34ea455a239fa1a7
* Merge tag 'android-13.0.0_r63' of ↵George Zacharia2023-08-021-3/+17
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0-r52 Android 13.0.0 release 63 Change-Id: I89d2c7a713cd97f805f07f604090a6d779117575
| * Truncate ShortcutInfo IdAndrás Kurucz2023-05-271-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | Creating Conversation with a ShortcutId longer than 65_535 (max unsigned short), we did not save the conversation settings into the notification_policy.xml due to a restriction in FastDataOutput. This put us to a state where the user changing the importance or turning off the notifications for the given conversation had no effect on notification behavior. Fixes: 273729476 Test: atest ShortcutManagerTest2 Test: Create a test app which creates a Conversation with a long shortcutId. Go to the Conversation Settings and turn off Notifications. Post a new Notification to this Conversation and see if it is displayed. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8a5223fcd59e805da510c31c5f8462c5d01ec6d5) Merged-In: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5 Change-Id: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5
* | Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-026-15/+246
|\| | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * Merge "Implement flag to not relaunch on dock config change for apps without ↵William Xiao2023-03-243-0/+20
| |\ | | | | | | | | | -desk resources" into tm-qpr-dev
| | * Implement flag to not relaunch on dock config change for apps withoutWilliam Xiao2023-03-233-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -desk resources Activities are relaunched when they encounter an unhandled configuration change. When a device is docked, this is surfaced to activities as a uiMode change to UI_MODE_TYPE_DESK. Some apps don't handle this configuration change by default, leading to a poor user experience, such as video playback stopping when docking. This change adds a flag that modifies this behavior and does not relaunch activities if the device is docked or undocked and the app does not have desk resources. Apps that have desk resources likely already either handle the uiMode configuration update or expect to be relaunched, so we want to preserve the default behavior for them. This flag is turned off by default. Bug: 266924897 Test: atest WmTests:ActivityRecordTests Change-Id: Ib9eeb251f803e41ff8fd0ed56f1ea8d52e67ba81 Merged-In: Ib9eeb251f803e41ff8fd0ed56f1ea8d52e67ba81
| | * Merge "Fix vulnerability in AttributionSource due to incorrect Binder call" ↵Austin Borger2023-03-071-3/+17
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into tm-dev am: 1e6fb47016 am: fcb86e5bf9 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21779363 Change-Id: I78c22fc6ea680e74dc3baec16540723fa0ccb35f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Fix vulnerability in AttributionSource due to incorrect Binder callAustin Borger2023-03-061-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AttributionSource uses Binder.getCallingUid to verify the UID of the caller from another process. However, getCallingUid does not always behave as expected. If the AttributionSource is unparceled outside a transaction thread, which is quite possible, getCallingUid will return the UID of the current process instead. If this is a system process, the UID check gets bypassed entirely, meaning any uid can be provided. This patch fixes the vulnerability by emptying out the state of the AttributionSource, so that the service checking its credentials will fail to give permission to the app. Bug: 267231571 Test: v2/android-virtual-infra/test_mapping/presubmit-avd Merged-In: Ic301a8518b8e57e1c9a2c9f2f845e51dca145257 Change-Id: Ic985afdb5e4495f2e051e6d0d62d39c6660c585e
| * | | Merge "Prevent orientation request loop in override" into tm-qpr-devGraciela Putri2023-03-231-0/+14
| |\ \ \
| | * | | Prevent orientation request loop in overrideGraciela Wissen Putri2023-03-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUST_SLEEP Ignore any orientation requests if activity is not letterboxed for fixed orientation and aspect ratio and activity already requests orientation change more than twice. Logic is behind per-app OVERRIDE_ENABLE_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED. Bug: 273509367 Test: atest WmTests:LetterboxUiControllerTest Change-Id: I72e8c9faf191c0ae819b409a3906da28389e72e6
| * | | | Do not flush when sending view tree appearing event.Kai Li2023-03-221-6/+34
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can mitigate the IPC spam by half, since the view tree appearing event always comes with a view tree appeared event, and we just need to flush at the view tree appeared time. BYPASS_INCLUSIVE_LANGUAGE_REASON=existing API Bug: 269435271 Change-Id: I0ba3f7df7d6b511d155ac9509826d39633b668f6 Merged-in: I0ba3f7df7d6b511d155ac9509826d39633b668f6 Test: some unit tests & I've manually tested it locally. (cherry picked from commit 624070c95db4ca427a053a5430fac857c51d04f8)
| * / / Per-app override sandboxing View API to Activity boundsOleg Blinnikov2023-02-241-0/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some applications assume that they occupy the whole screen and therefore use the display coordinates in their calculations. This can lead to shifted or out of bounds UI elements in case the activity is Letterboxed or is in split-screen mode. OVERRIDE_SANDBOX_VIEW_BOUNDS_APIS change id forces the packages it is applied to sandbox View API to Activity bounds for: android.view.View#getBoundsOnScreen android.view.View#getLocationOnScreen android.view.View#getWindowVisibleDisplayFrame android.view.View#getWindowDisplayFrame This sandboxing is happening indirectly in android.view.ViewRootImpl through android.view.ViewRootImpl#getWindowVisibleDisplayFrame, android.view.ViewRootImpl#getDisplayFrame respectively. Application developers can opt-out of this treatment by using the following configuration in their manifest: <application> <property android:name= "android.window.PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS" android:value="false"/> </application> The difference between this CL and the previous attempt in commit:Ia064d26b46402a04056f498a1ed5c090a6d1b965 is that in the current CL the window bounds are found with windowConfiguration.getBounds(), which is subtracted from displayFrame to make the latter appear as occupying the whole screen without letterbox or multi-window mode. getBounds also takes compatScale and overrideScale into account so no additional scaling is needed. This compat change is taking effect only in non-system processes, this important because all compat changes are enabled for the system process. For example this compat change may impact ANR dialog created within the system process, but it does not require this compat change to be enabled. Test: atest CtsWindowManagerDeviceTestCases:CompatChangeTests Bug: 234799838 Change-Id: If69772bea750380e9f127cea31141a5f953c4e30 Merged-In: If69772bea750380e9f127cea31141a5f953c4e30
| * | EXTRA_CHOOSER_PAYLOAD_RESELECTION_ACTION -> EXTRA_CHOOSER_MODIFY_SHARE_ACTIONMatt Casey2023-02-151-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functionally the same as before, just a slight change in semantics: instead of focusing solely on reselection, broaden to a 'modify share' affordance. Bug: 267870268 Test: Build Change-Id: Ida05cc4efb8d5c95ab783a7fd22a7008bf77aca2 Merged-In: Ida05cc4efb8d5c95ab783a7fd22a7008bf77aca2 (cherry picked from commit 651a576c12961950a5c77fd551b753f79d5aa7a1)
| * | [RESTRICT AUTOMERGE] Fix bypass BG-FGS and BAL via package manager APIs am: ↵Rhed Jao2023-02-071-2/+39
| |\| | | | | | | | | | | | | | | | | | | | | | | | | 03b77aee35 am: c16586d342 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21005178 Change-Id: I6da02c4f384d90a90f448a1882917ac876cf47f5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * [RESTRICT AUTOMERGE] Fix bypass BG-FGS and BAL via package manager APIsRhed Jao2023-01-171-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt-in for BAL of PendingIntent for following APIs: * PackageInstaller.uninstall() * PackageInstaller.installExistingPackage() * PackageInstaller.uninstallExistingPackage() * PackageInstaller.Session.commit() * PackageInstaller.Session.commitTransferred() * PackageManager.freeStorage() Bug: 230492955 Bug: 243377226 Test: atest android.security.cts.PackageInstallerTest Test: atest CtsStagedInstallHostTestCases Change-Id: I9b6f801d69ea6d2244a38dbe689e81afa4e798bf
| | * Encode Intent scheme when serializing to URI string RESTRICT AUTOMERGEWinson Chiu2023-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids deserialization error when the scheme contains a reserved character. Bug: 261858325 Test: atest android.content.cts.IntentTest#testEncoding Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470 Change-Id: Ic34b3f796b762763db5aa7b5d7c109ae70607470
| * | Merge "Revert "Per-app override sandboxing View API to Activity bounds"" ↵TreeHugger Robot2023-02-031-28/+0
| |\ \ | | | | | | | | | | | | into tm-qpr-dev
| | * | Revert "Per-app override sandboxing View API to Activity bounds"Oleg Blinnikov2023-02-021-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1fa3b3821e158574570330f28ee25a4d7fd37f61. Reason for revert: b/267507947 Change-Id: Ie8924e59b04b3044391c6929380a1db212c871b0 Merged-In: I460488c6307cae25abeee6045b712a1af453834a
| * | | Merge "Per-app override for disabling ignoreOrientationRequest" into tm-qpr-devTreeHugger Robot2023-02-021-0/+11
| |\ \ \
| | * | | Per-app override for disabling ignoreOrientationRequestMariia Sandrikova2023-02-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: 236283604 Test: atest WmTests:SizeCompatTests Change-Id: I77afbb8ee43d441a44f29a308b11685e74df5c83
| * | | | Merge "Per-app override sandboxing View API to Activity bounds" into tm-qpr-devOleg Blinnikov2023-02-011-0/+28
| |\ \ \ \ | | |/ / / | |/| / / | | |/ /
| | * | Per-app override sandboxing View API to Activity boundsOleg Blinnikov2023-02-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some applications assume that they occupy the whole screen and therefore use the display coordinates in their calculations. This can lead to shifted or out of bounds UI elements in case the activity is Letterboxed or is in split-screen mode. OVERRIDE_SANDBOX_VIEW_BOUNDS_APIS change id forces the packages it is applied to sandbox View API to Activity bounds for: android.view.View#getBoundsOnScreen android.view.View#getLocationOnScreen android.view.View#getWindowVisibleDisplayFrame android.view.View#getWindowDisplayFrame This sandboxing is happening indirectly in android.view.ViewRootImpl through android.view.ViewRootImpl#getWindowVisibleDisplayFrame, android.view.ViewRootImpl#getDisplayFrame respectively. Application developers can opt-out of this treatment by using the following configuration in their manifest: <application> <property android:name= "android.window.PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS" android:value="false"/> </application> Test: atest CtsWindowManagerDeviceTestCases:CompatChangeTests Bug: 234799838 Change-Id: Ia064d26b46402a04056f498a1ed5c090a6d1b965 Merged-In: Ia064d26b46402a04056f498a1ed5c090a6d1b965
| * | | [6/n] Camera Compat: Orientation override for camera onlyMariia Sandrikova2023-01-311-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | Adds OVERRIDE_ORIENTATION_ONLY_FOR_CAMERA that acts as a modifier for the existing orientation overrides allowing to limit them to when the app is connected to the camera. Fix: 226051012 Test: atest WmTests:LetterboxUiControllerTest Change-Id: Iac7ea582dcdb996fc416576d886ab92c2d48c225
| * | Per-app controls for using landscape display orientationMariia Sandrikova2023-01-261-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OVERRIDE_USE_DISPLAY_LANDSCAPE_NATURAL_ORIENTATION fixes display orientation to landscape natural orientation when the following conditions are met: - Task is in fullscreen - Opt-out component property PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE isn't enabled - ignoreOrientationRequest isn’t enabled for the display - Natural orientation of the display is landscape Main use case for this override are camera-using activities that are portrait-only and assume alignment with natural device orientation. Such activities can automatically be rotated with DisplayRotationCompatPolicy but not all of them can handle dynamic rotation and thus can benefit from this override. Also, start caching other overrides in LetterboxUiController Test: atest WmTests:LetterboxUiControllerTest Fix: 255940284 Change-Id: I2a8688e7a033b30ea83db827679c729feaac1c9c
| * | Add orientation per-app controls.Mariia Sandrikova2023-01-251-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overrides for device manufacturers: - OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT override orientation to SCREEN_ORIENTATION_PORTRAIT - OVERRIDE_UNDEFINED_ORIENTATION_TO_NOSENSOR override orientation to SCREEN_ORIENTATION_NOSENSOR - OVERRIDE_LANDSCAPE_ORIENTATION_TO_REVERSE_LANDSCAPE override orientation to SCREEN_ORIENTATION_REVERSE_LANDSCAPE - OVERRIDE_ANY_ORIENTATION allows OVERRIDE_*_ORIENTATION_TO_* to override any orientation. PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE allows app developers to opt-out from per-app overrides above. Test: atest WmTests:LetterboxUiControllerTest Fix: 255940284, 265452344, 265451093, 265464455, 266124927 Merged-In: I6d83170632a04e3d60461f37f13acc1de5b6a6cb Change-Id: I6d83170632a04e3d60461f37f13acc1de5b6a6cb
| * | DO NOT MERGE - Backport master API changesAndrey Epin2023-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport linter error fixes from a reveal API change in master (see ag/20832242) Bug: 259947071 Test: presubmits Change-Id: I024248b00023baa77fbb6c4e1f5cb7000d1c67db
| * | Merge "Encode Intent scheme when serializing to URI string RESTRICT ↵Winson Chiu2023-01-111-1/+1
| |\ \ | | | | | | | | | | | | AUTOMERGE" into tm-qpr-dev
| | * | Encode Intent scheme when serializing to URI string RESTRICT AUTOMERGEWinson Chiu2023-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids deserialization error when the scheme contains a reserved character. Bug: 261858325 Test: atest android.content.cts.IntentTest#testEncoding Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470 Change-Id: Ic34b3f796b762763db5aa7b5d7c109ae70607470
| * | | [4/n] Camera Compat: per-app controls for force rotation and refreshMariia Sandrikova2023-01-091-0/+35
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the following per-app controls using overrides and component properties: - Way to disable force rotation with OVERRIDE_CAMERA_COMPAT_DISABLE_FORCE_ROTATION and PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION - Way to disable activity refresh after force rotation with OVERRIDE_CAMERA_COMPAT_DISABLE_REFRESH and PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH - Way to switch to activity refresh via "onPause -> onResume" with OVERRIDE_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE and PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE Test: atest WmTests:LetterboxUiControllerTest WmTests:DisplayRotationCompatPolicyTests Fix: 263959004 Fix: 264304459 Fix: 264301586 Change-Id: I41698c577057a74ef5c3b6afda1b78f1d98bde77 Signed-off-by: Mariia Sandrikova <mariiasand@google.com>
* | | Merge tag 'android-13.0.0_r41' into t13.0Semavi Ulusoy2023-04-162-3/+40
|\ \ \ | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 41 (TQ2A.230405.003.E1) Change-Id: I816e58beecec181349eb0ffdf85a5445fb7a0581
| * | | [RESTRICT AUTOMERGE] Fix bypass BG-FGS and BAL via package manager APIsRhed Jao2023-02-141-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt-in for BAL of PendingIntent for following APIs: * PackageInstaller.uninstall() * PackageInstaller.installExistingPackage() * PackageInstaller.uninstallExistingPackage() * PackageInstaller.Session.commit() * PackageInstaller.Session.commitTransferred() * PackageManager.freeStorage() Bug: 230492955 Bug: 243377226 Test: atest android.security.cts.PackageInstallerTest Test: atest CtsStagedInstallHostTestCases Change-Id: I9b6f801d69ea6d2244a38dbe689e81afa4e798bf (cherry picked from commit 03b77aee350696781b4d7a61768a172bedc3ac73) Merged-In: I9b6f801d69ea6d2244a38dbe689e81afa4e798bf
| * | | Encode Intent scheme when serializing to URI string RESTRICT AUTOMERGEWinson Chiu2023-02-141-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids deserialization error when the scheme contains a reserved character. Bug: 261858325 Test: atest android.content.cts.IntentTest#testEncoding Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470 Change-Id: Ic34b3f796b762763db5aa7b5d7c109ae70607470 (cherry picked from commit 0d561708bc4c83cabb6c4c0f404e522b6491ec07) Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470
* | | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-035-3/+90
|\| | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * | Per-app compat treatment for setRequestedOrientation loops.Mariia Sandrikova2023-01-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per-package controls introduced in this change: - OVERRIDE_ENABLE_COMPAT_IGNORE_REQUESTED_ORIENTATION for device manufactures to opt in a package into the treatment. - android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION for app developers to opt in/out from the treatment via a component property. When enabled for the package and on the devices, treatment ignores app requested orientation in response to an app calling Activity#setRequestedOrientation if app is currently relaunching or has an active Camera Compat treatment. This is needed to avoid getting into Activity#setRequestedOrientation loop when ignoreOrientationRequest is enabled. For example, the loop can look like this: 1) App sets default orientation to "unspecified" at runtime 2) App requests to "portrait" after checking some condition (e.g. display rotation). 3) (2) leads to fullscreen -> letterboxed bounds change and activity relaunch because app can't handle the corresponding config changes. 4) Loop goes back to (1) Fix: 254631730 Test: atest WmTests:LetterboxUiControllerTest Change-Id: I3dc88db4193d08215c36d9a69ef2cc53155b60c7
| * | Merge "Add per-app controls for compat fake focus" into tm-qpr-devMariia Sandrikova2022-12-281-0/+11
| |\ \
| | * | Add per-app controls for compat fake focusMariia Sandrikova2022-12-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per-package controls introduced in this change: - OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS for device manufactures to opt in a package to receive compat fake focus. - com.android.COMPAT_FAKE_FOCUS_OPT_IN for app developers to opt in via component property to receive compat fake focus. - com.android.COMPAT_FAKE_FOCUS_OPT_OUT for app developers to opt out via component property from receiving compat fake focus. This change is needed because some game engines wait to get focus before drawing the content of the app so fake focus helps them to avoid staying blacked out when they are resumed and do not have focus yet. Fix: 261828290 Fix: 263259275 Test: atest WmTests:LetterboxConfigurationTest#testIsFakeFocusEnabledOnDevice Test: atest WmTests:SizeCompatTests#testShouldSendFakeFocus_overrideEnabled_returnsTrue Test: atest WmTests:SizeCompatTests#testShouldSendFakeFocus_overrideDisabled_returnsFalse Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optOutPropertyEnabled_overrideEnabled_fakeFocusDisabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optInPropertyEnabled_overrideDisabled_fakeFocusEnabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optOutPropertyEnabled_fakeFocusDisabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optInPropertyEnabled_fakeFocusEnabled Change-Id: Ib16084728bc0d5870c8d2effc5dd0d54bfe04d24 Merged-In: Ib16084728bc0d5870c8d2effc5dd0d54bfe04d24
| * | | Chooser custom actions API.Andrey Epin2022-12-221-0/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A proposal for the new API for custom Chooser actions. A new extra flags for Intent, EXTRA_CHOOSER_CUSTOM_ACTIONS and EXTRA_CHOOSER_PAYLOAD_RESELECTION_ACTION. EXTRA_CHOOSER_CUSTOM_ACTIONS can be used with intent action ACTION_CHOOSER to provide a collection of application custom that would be present to the user in the sharesheet. ChooserAction class is a new data for carrying app-specified actions. EXTRA_CHOOSER_PAYLOAD_RESELECTION_ACTION extra flag for content reselection custom action. Bug: 258838272 Test: smoke build test, the API is not used at the moment. Change-Id: Id6748c01ad84cc8ec4a1bc7010e2b82812def9ad
| * | Merge "Fix permanent denial of service via apis with illegal intent filter" ↵Rhed Jao2022-12-191-0/+23
| |\ \ | | | | | | | | | | | | into tm-qpr-dev
| | * | Fix permanent denial of service via apis with illegal intent filterRhed Jao2022-11-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 246749702 Bug: 246749764 Bug: 246749936 Bug: 246750467 Bug: 249094310 Test: atest android.security.cts.PackageManagerBadIntentFilterTest Change-Id: I632ebd1342e0f39da494a02ffabc690ad242e14a
| * | | AudioDeviceVolumeManager and VolumeInfo API changesJean-Michel Trivi2022-11-251-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context service name for accessing AudioDeviceVolume manager. Add support in VolumeInfo to know whether it carries an explicit mute/unmute information (vs just default value of isMuted()). Bug: 244326361 Test: atest android.media.audio.cts.AudioDeviceVolumeManagerTest Test: atest android.media.audio.cts.VolumeInfoTest Change-Id: Id718fbd7e0d5795ac480d9188faad4a70fba9808 Merged-In: Id718fbd7e0d5795ac480d9188faad4a70fba9808
| * | Add IS_REMOTE extra for ClipDataMiranda Kephart2022-10-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extra can be used to indicate that a ClipData comes from a separate device rather than being local. It is a rendering hint that can be used to take different behavior based on the source device of copied data. Bug: 246808749 Test: manual (no behavior change) Merged-In: I6998b7a216fac73a1387367f4179efb95d7562c5 Change-Id: I6998b7a216fac73a1387367f4179efb95d7562c5
* | | Merge tag 'android-13.0.0_r16' into t13.0George Zacharia2022-12-159-73/+222
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
| * | Merge "[pm] fix getPackageArchiveInfo" into tm-qpr-devSongchun Fan2022-09-131-1/+1
| |\ \
| | * | [pm] fix getPackageArchiveInfoSongchun Fan2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: 243479679 Test: atest android.content.pm.cts.PackageManagerTest#testGetPackageArchiveInfo Change-Id: I3a353c9b0f05117b233888d74a42f1ed3cf26eb8 (cherry picked from commit 9407d10cd01b3fc25d7e63dd46ef359896ea60b7) Merged-In: I3a353c9b0f05117b233888d74a42f1ed3cf26eb8
| * | | Merge "Added check for user info is not null" into tm-qpr-devTreeHugger Robot2022-09-071-0/+35
| |\ \ \
| | * | | Added check for user info is not nullMayank Garg2022-09-071-0/+35
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | user's actual state might have changed by the time the broadcast is received, so added a null check. Bug: 237413499 Test: atest HandlerThreadingDomainTest LocationTimeZoneProviderControllerTest LocationTimeZoneProviderTest ZoneInfoDbTimeZoneProviderEventPreProcessorTest Change-Id: I79087a3e83a51b81568bdb6ff5540ee78b51b91a Merged-In: Ieacbb35e522b35353c96de1f162a8a71388b4b04 (cherry pick from commit 799c6528f56a9baae32cd4892d1eb58da7bfb544)
| * / / Adjust aspect ratio override portrait fullscreenVali Calinescu2022-08-311-0/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | We're defining a new compat framework change id that restricts the other aspect ratio overrides for devices in portrait fullscreen. Fix: 218959984 Test: As manual testing use 'adb shell am compat disable/enable OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'. Change-Id: I84eaab4df045c93fb2c159a789852094caf9121a Merged-In: I84eaab4df045c93fb2c159a789852094caf9121a