summaryrefslogtreecommitdiff
path: root/core/tests
Commit message (Collapse)AuthorAgeFilesLines
* Sanitize cross-profile intents.Andrey Yepin2025-10-071-0/+59
| | | | | | | | | | | | Remove package or component information from payload intents (and their selectors) for cross-profile sharing. Bug: 407764858 Test: manual testing with test app Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:39cad715d8e0bfc6266ddf553fc1cc120181e227) Merged-In: Ib153416d98325da300fe383b877374bc6b21ff90 Change-Id: Ib153416d98325da300fe383b877374bc6b21ff90
* InputMethodSubtypeArray: prevent negative count injectionAdrian Roos2025-02-211-0/+36
| | | | | | | | | | | | | | Fixes an issue where negative counts could be injected via the Parcel constructor. The writeToParcel method in that case would write data that a subsequent read would not consume. Fixes: 277916797 Fixes: 354682735 Test: atest InputMethodSubtypeArrayTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b9a097e28be9b87566ce0194b7525caf462daf2f) Merged-In: I7e881d82415051179c59bf5df97f8ba0a41e693e Change-Id: I7e881d82415051179c59bf5df97f8ba0a41e693e
* Fix allowlist token issuesMatías Hernández2025-01-131-0/+49
| | | | | | | | | | | | | | 1) Don't accept enqueued notifications with an unexpected token. 2) Ensure allowlist token matches for all parceled and unparceled notifications (by only using the "root notification" one). 3) Simplify cookie usage in allowlist token serialization. 4) Ensure group summary (and any notifications added directly by NMS) have the correct token. Bug: 328254922 Bug: 305695605 Test: atest NotificationManagerServiceTest ParcelTest CloseSystemDialogsTest + manually (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8a7453435b633282a9445ee01a902f090adc138c) Merged-In: I232e9b74eece745560ed2e762071b48984b3f176 Change-Id: I232e9b74eece745560ed2e762071b48984b3f176
* DO NOT MERGE Ignore - Sanitized uri scheme by removing scheme delimiterKiran Ramachandra2024-09-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially considered removing unsupported characters as per IANA guidelines, but this could break applications that use custom schemes with asterisks. Instead, opted to remove only the "://" to minimize disruption Bug: 261721900 Test: atest FrameworksCoreTests:android.net.UriTest No-Typo-Check: The unit test is specifically written to test few cases, string "http://https://" is not a typo NOTE FOR REVIEWERS - original patch and result patch are not identical. PLEASE REVIEW CAREFULLY. Diffs between the patches: @AsbSecurityTest(cveBugId = 261721900) > + @SmallTest > + public void testSchemeSanitization() { > + Uri uri = new Uri.Builder() > + .scheme("http://https://evil.com:/te:st/") > + .authority("google.com").path("one/way").build(); > + assertEquals("httphttpsevil.com:/te:st/", uri.getScheme()); > + assertEquals("httphttpsevil.com:/te:st/://google.com/one/way", uri.toString()); > + } > + Original patch: diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java old mode 100644 new mode 100644 --- a/core/java/android/net/Uri.java +++ b/core/java/android/net/Uri.java @@ -1388,7 +1388,11 @@ * @param scheme name or {@code null} if this is a relative Uri */ public Builder scheme(String scheme) { - this.scheme = scheme; + if (scheme != null) { + this.scheme = scheme.replace("://", ""); + } else { + this.scheme = null; + } return this; } diff --git a/core/tests/coretests/src/android/net/UriTest.java b/core/tests/coretests/src/android/net/UriTest.java old mode 100644 new mode 100644 --- a/core/tests/coretests/src/android/net/UriTest.java +++ b/core/tests/coretests/src/android/net/UriTest.java @@ -87,6 +87,16 @@ assertNull(u.getAuthority()); assertNull(u.getHost()); } + + @AsbSecurityTest(cveBugId = 261721900) + @SmallTest + public void testSc [[[Original patch trimmed due to size. Decoded string size: 1426. Decoded string SHA1: 55d69e9f854938457b2d98b18776898b16c2dd54.]]] Result patch: diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java index 3da696a..f0262e9 100644 --- a/core/java/android/net/Uri.java +++ b/core/java/android/net/Uri.java @@ -1388,7 +1388,11 @@ * @param scheme name or {@code null} if this is a relative Uri */ public Builder scheme(String scheme) { - this.scheme = scheme; + if (scheme != null) { + this.scheme = scheme.replace("://", ""); + } else { + this.scheme = null; + } return this; } diff --git a/core/tests/coretests/src/android/net/UriTest.java b/core/tests/coretests/src/android/net/UriTest.java index 89632a4..8c130ee 100644 --- a/core/tests/coretests/src/android/net/UriTest.java +++ b/core/tests/coretests/src/android/net/UriTest.java @@ -88,6 +88,16 @@ assertNull(u.getHost()); } + @AsbSecurityTest(cveBugId = 261721900) + @SmallTest + public void testSchemeSanitization() { + Uri uri = new [[[Result patch trimmed due to size. Decoded string size: 1417. Decoded string SHA1: f9ce831a369872ae9bfd9f50f01dd394682e0f3f.]]] (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:841ce92aa1b350c83148ef6fb57bfff617364e1a) Merged-In: Icab100bd4ae9b1c8245e6f891ad22101bda5eea5 Change-Id: Icab100bd4ae9b1c8245e6f891ad22101bda5eea5
* Add the protection to avoid data overflow in BinaryXmlSerializer.javalpeter2024-08-271-0/+50
| | | | | | | | | | | | Add an integer overflow check in the writeShort in these two methods: 1.BinaryXmlSerializer#attributeBytesHex 2.BinaryXmlSerializer#attributeBytesBase64 Bug: 307288067 Test: atest BinaryXmlTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2f04963358987679cb4cbab085ec78c1b5e0ed0e) Merged-In: I81f5ed43342d5b906f36f3733c2115232da90ac1 Change-Id: I81f5ed43342d5b906f36f3733c2115232da90ac1
* isUserInLockDown can be true when there are other strong authBeverly2024-04-091-5/+34
| | | | | | | | | | | | | requirements Bug: 315206668 Bug: 218495634 Flag: None Test: manual, atest LockPatternUtilsTest (cherry picked from commit d341f1ecdb011d24b17358f115391b3f997cb179) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ba8dfc68aada76127abafdb17d0f0896cc14447a) Merged-In: I5e979a7822dd7254b4579ab28ecf96df1db44179 Change-Id: I5e979a7822dd7254b4579ab28ecf96df1db44179
* Merge tag 'android-13.0.0_r72' of ↵George Zacharia2023-08-091-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 72 (TQ3C.230805.001.A3) * tag 'android-13.0.0_r72' of https://android.googlesource.com/platform/frameworks/base: Keyguard: use transition state for syncing occlude [RESTRICT AUTOMERGE] Report folding features to letterboxed apps. Send update config change when letterbox is moved Cancel current animation instead of candidate Merge "Resolve StatusHints image exploit across user." into sc-v2-dev am: e371b3018f Remove unnecessary padding code Use Settings.System.getIntForUser instead of getInt to make sure user specific settings are used DO NOT MERGE Verify URI permissions in MediaMetadata Visit URIs in themed remoteviews icons. Check URIs in sized remote views. Fix PrivacyChip not visible issue Update Pip launches to not enter pinned task if in background. Validate ComponentName for MediaButtonBroadcastReceiver Implement visitUris for RemoteViews ViewGroupActionAdd. Check URIs in notification public version. Preserve flags for non-runtime permissions upon package update. On device lockdown, always show the keyguard Ensure policy has no absurdly long strings Verify URI permissions for notification shortcutIcon. Do not load drawable for wallet card if the card image icon iscreated with content URI. ActivityManagerService: Allow openContentUri from vendor/system/product. Cancel current animation instead of candidate Report folding features to letterboxed apps. Send update config change when letterbox is moved Cancel current animation instead of candidate Cancel current animation instead of candidate Cancel current animation instead of candidate Cancel current animation instead of candidate Visit URIs in landscape/portrait custom remote views. [RESTRICT AUTOMERGE] Prevent installing apps in policy restricted work profile using ADB Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS. [1-time permissions] Use internal api to check proc states Watch uid proc state instead of importance for 1-time permissions Truncate ShortcutInfo Id Dismiss keyguard when simpin auth'd and... Only allow NEW_TASK flag when adjusting pending intents Grant URI permissions to the CallStyle-related ones Revert "Ensure that only SysUI can override pending intent launch flags" Ensure that only SysUI can override pending intent launch flags Revert "Improve first opaque activity candidate detection" Revert "Improve first opaque activity candidate detection" Revert "Improve first opaque activity candidate detection" Disable emoji compat initializer Disable emoji compat initializer Improve first opaque activity candidate detection Invalidate buffers on transform change Skip letterboxing if the activity below is embedded Unfreeze the surface when the transition is done Make sure to reset isFoldHandled Set corner radius to 0 when casting Refresh layout parameter for bounds change from relayout DO NOT SUBMIT: Don't ever show the build number. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:252407fd77fcb126834be02233b799b230ee2c6e) Merged-In: I28e35f8686a66b6eb76f3a09a163c6873ca23ba0 Change-Id: I28e35f8686a66b6eb76f3a09a163c6873ca23ba0 Set corner radius to 0 when casting Refresh layout parameter for bounds change from relayout DO NOT SUBMIT: Don't ever show the build number. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:252407fd77fcb126834be02233b799b230ee2c6e) Merged-In: I28e35f8686a66b6eb76f3a09a163c6873ca23ba0 Change-Id: I28e35f8686a66b6eb76f3a09a163c6873ca23ba0 Make sure to reset isFoldHandled Set corner radius to 0 when casting Refresh layout parameter for bounds change from relayout [RESTRICT AUTOMERGE] Always set last report configuration for starting window. Fix deadlock in BaseDataProducer. Set corner radius to 0 when casting Refresh layout parameter for bounds change from relayout Fixes foldable autorotation setting being out of sync in QS and Settings Fix split cannot active if app trampoline launch new task Update the timing of clearing SplitRequest Prevents activity being stopped while folding/unfolding device Gates RotationResolverService with a config flag Also reverse rotation for #freezeRotation path Don't show home controls complication if not available. Fixes foldable autorotation setting being out of sync in QS and Settings Fix split cannot active if app trampoline launch new task Update the timing of clearing SplitRequest Prevents activity being stopped while folding/unfolding device Gates RotationResolverService with a config flag Also reverse rotation for #freezeRotation path Update the disabled-opa navbar icon size to reflect icon change Restrict maximum size of FontInterpolator font caches Fix KeyguardSecurityContainerControllerTest Rename orientation request loop property Fixes flicker of not applying initial transform to leash Reset NSSL translationY after a transision gets cancelled AudioService: fix volume group setting name Make sure to clear outdated screenshot of splitting tasks Make sure to clear outdated screenshot of splitting tasks DO NOT MERGE Revert "Accept a Window as shown if it's in any transition" Fix home controls showing on low light dream DO NOT MERGE Fix crash related to getting the root of an unattached view Revert "Remove pip resize flicks" DO NOT MERGE Change-Id: I76f0d5e6c39a7066e44366571b6836ee4bf594f5
| * Send update config change when letterbox is movedGraciela Wissen Putri2023-06-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When letterbox is repositioned, window configuration bounds are changed. Because we currently only report public config changes in diffPublicOnly, the client doesn't report changes in window configuration. We should always report window configuration bounds change to notify that the position of window has changed. Bug: 262900133 Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest Manual test with app in bug (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:70187af25ce3f56f85ddd703f982caa82f685605) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2d435949ef08a2219feb23dba035f5a78b038f3f) Merged-In: I9fc10876c03933ac8aac05205d56ad6537df72a8 Change-Id: I9fc10876c03933ac8aac05205d56ad6537df72a8
| * Visit URIs in themed remoteviews icons.Ioana Alexandru2023-06-161-0/+13
| | | | | | | | | | | | | | | | Bug: 281018094 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:634a69b7700017eac534f3f58cdcc2572f3cc659) Merged-In: I2014bf21cf90267f7f1b3f370bf00ab7001b064e Change-Id: I2014bf21cf90267f7f1b3f370bf00ab7001b064e
| * Check URIs in sized remote views.Ioana Alexandru2023-06-161-0/+40
| | | | | | | | | | | | | | | | | | Bug: 277741109 Test: atest RemoteViewsTest (cherry picked from commit ae0d45137b0f8ea49a085bbce4d39f901685c4a5) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:902f020bc81e5b584d5cb0276568b888a728fc4a) Merged-In: Iceb33606da3a49b9638ab21aeae17a168c1b411a Change-Id: Iceb33606da3a49b9638ab21aeae17a168c1b411a
| * Implement visitUris for RemoteViews ViewGroupActionAdd.Ioana Alexandru2023-06-161-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | This is to prevent a vulnerability where notifications can show resources belonging to other users, since the URI in the nested views was not being checked. Bug: 277740082 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:850fd984e5f346645b5a941ed7307387c7e4c4de) Merged-In: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8 Change-Id: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8
| * Visit URIs in landscape/portrait custom remote views.Ioana Alexandru2023-05-291-0/+64
| | | | | | | | | | | | | | | | Bug: 277740848 Test: atest RemoteViewsTest NotificationManagerServiceTest & tested with POC from bug (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b4692946c10d11c1e935869e11dc709a9cdcba69) Merged-In: I7d3d35df0ec38945019f71755bed8797b7af4517 Change-Id: I7d3d35df0ec38945019f71755bed8797b7af4517
* | Merge tag 'android-13.0.0_r67' of ↵George Zacharia2023-08-091-0/+77
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 67 (TQ3A.230805.001) * tag 'android-13.0.0_r67' of https://android.googlesource.com/platform/frameworks/base: Merge "Resolve StatusHints image exploit across user." into sc-v2-dev am: e371b3018f Remove unnecessary padding code Use Settings.System.getIntForUser instead of getInt to make sure user specific settings are used DO NOT MERGE Verify URI permissions in MediaMetadata Visit URIs in themed remoteviews icons. Check URIs in sized remote views. Fix PrivacyChip not visible issue Update Pip launches to not enter pinned task if in background. Validate ComponentName for MediaButtonBroadcastReceiver Implement visitUris for RemoteViews ViewGroupActionAdd. Check URIs in notification public version. Preserve flags for non-runtime permissions upon package update. On device lockdown, always show the keyguard Ensure policy has no absurdly long strings Verify URI permissions for notification shortcutIcon. Do not load drawable for wallet card if the card image icon iscreated with content URI. ActivityManagerService: Allow openContentUri from vendor/system/product. Change-Id: Ice3533cb5ebf4868cc9aa0500568b899293872ab
| * | Visit URIs in themed remoteviews icons.Ioana Alexandru2023-06-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 281018094 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:634a69b7700017eac534f3f58cdcc2572f3cc659) Merged-In: I2014bf21cf90267f7f1b3f370bf00ab7001b064e Change-Id: I2014bf21cf90267f7f1b3f370bf00ab7001b064e
| * | Check URIs in sized remote views.Ioana Alexandru2023-06-141-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 277741109 Test: atest RemoteViewsTest (cherry picked from commit ae0d45137b0f8ea49a085bbce4d39f901685c4a5) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:902f020bc81e5b584d5cb0276568b888a728fc4a) Merged-In: Iceb33606da3a49b9638ab21aeae17a168c1b411a Change-Id: Iceb33606da3a49b9638ab21aeae17a168c1b411a
| * | Implement visitUris for RemoteViews ViewGroupActionAdd.Ioana Alexandru2023-06-141-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to prevent a vulnerability where notifications can show resources belonging to other users, since the URI in the nested views was not being checked. Bug: 277740082 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:850fd984e5f346645b5a941ed7307387c7e4c4de) Merged-In: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8 Change-Id: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8
* | | Merge tag 'android-13.0.0_r63' of ↵George Zacharia2023-08-021-0/+64
|\| | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0-r52 Android 13.0.0 release 63 Change-Id: I89d2c7a713cd97f805f07f604090a6d779117575
| * | Visit URIs in landscape/portrait custom remote views.Ioana Alexandru2023-05-271-0/+64
| |/ | | | | | | | | | | | | | | Bug: 277740848 Test: atest RemoteViewsTest NotificationManagerServiceTest & tested with POC from bug (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b4692946c10d11c1e935869e11dc709a9cdcba69) Merged-In: I7d3d35df0ec38945019f71755bed8797b7af4517 Change-Id: I7d3d35df0ec38945019f71755bed8797b7af4517
* | Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-0216-48/+868
|\| | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * Merge "Do not flush when sending view tree appearing event." into tm-qpr-devCarbo Kuo2023-03-231-0/+17
| |\
| | * Do not flush when sending view tree appearing event.Kai Li2023-03-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Fix a memory leak in UidState.Yu-Ting Tseng2023-03-211-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Test: atest ProcessStatsTest Bug: 271320793 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1635233cd4eabd0225769f37e737b770388bf340) Merged-In: I22e0e266a346f24c7ca0a95bf450320c8b68cbb1 Change-Id: I22e0e266a346f24c7ca0a95bf450320c8b68cbb1
| * | Merge "Proportionally attribute Mobile Radio Energy Consumption to Phone ↵TreeHugger Robot2023-03-211-6/+14
| |\ \ | | |/ | |/| | | | usage." into tm-qpr-dev
| | * Proportionally attribute Mobile Radio Energy Consumption to Phone usage.Michael Wachenschwanz2023-03-161-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proportionally split out the energy consumption of phone usage from the rest of the mobile radio energy consumption. Fixes: 244603408 Test: atest MobileRadioPowerCalculator Change-Id: I5db49ea7c88cfd502db36265ae5a6555f728d2f7 Merged-In: I5db49ea7c88cfd502db36265ae5a6555f728d2f7 (cherry picked from commit 4789053d52cdb92c44ccee76c7e4babc2bbbb3dc)
| * | Merge "Add bound_top, bound_fgs and frozen states to ProcessStats." into ↵Yu-Ting Tseng2023-03-141-0/+30
| |\ \ | | |/ | |/| | | | tm-qpr-dev
| | * Add bound_top, bound_fgs and frozen states to ProcessStats.Yu-Ting Tseng2023-03-131-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also merge various cached states into a single one. Test: atest ProcessStatsTest Bug: 271160990 Bug: 260242581 Change-Id: I678d9ac5268dcc863b209bb2c2e8430d54f39ff7
| * | Merge "Merge "Client logging changes for ProcessState and ProcessAssociation ↵Yu-Ting Tseng2023-03-081-0/+159
| |\| | | | | | | | | | atoms" into tm-qpr-dev" into tm-qpr-dev
| | * Merge "Client logging changes for ProcessState and ProcessAssociation atoms" ↵Yu-Ting Tseng2023-03-021-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into tm-qpr-dev Bug: 271160990 Test: atest ProcessStatsTest Change-Id: Idd9f8f394ffab2fda75803b7c7658d2220b8735d Merged-In: Idd9f8f394ffab2fda75803b7c7658d2220b8735d
| * | Revert "Add config to control BatteryStats reset logic"Michael Wachenschwanz2023-03-021-298/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert submission 21485850 Reason for revert: introduced deadlock Reverted changes: /q/submissionid:21485850 Change-Id: Id3f920a130bc20d59abefc0a2f018873b08415ed
| * | Revert "Reset BatteryStats when device has been plugged in for a..."Michael Wachenschwanz2023-03-023-71/+7
| |/ | | | | | | | | | | | | | | | | | | Revert submission 21485850 Reason for revert: introduced deadlock Reverted changes: /q/submissionid:21485850 Change-Id: Ib8dfc28154e9004e48f5537aef677b77724072b6
| * Reset BatteryStats when device has been plugged in for a long time.Michael Wachenschwanz2023-02-173-7/+71
| | | | | | | | | | | | | | | | | | | | | | BatteryStats continues to accumlate some stats while plugged in. The avoid overflows or excessive memory usage, occasionally reset while plugged in for extended periods of time. Bug: 256919205 Test: atest BatteryStatsResetTest Change-Id: If0db995ffaf4866bbadc828a0ade37a10da91553 Merged-In: If0db995ffaf4866bbadc828a0ade37a10da91553
| * Add config to control BatteryStats reset logicMichael Wachenschwanz2023-02-171-0/+298
| | | | | | | | | | | | | | | | | | | | | | Also, fix the significant charge reset logic and add BatteryStats reset tests. Fix: 269538224 Bug: 256919205 Test: atest BatteryStatsResetTest Change-Id: Id4a6dd22708ddee38dd6c10ceb6c81f6a7bfb44f Merged-In: Id4a6dd22708ddee38dd6c10ceb6c81f6a7bfb44f
| * Merge "Reclassify FGS and BOUND_TOP as "background" in BatteryUsageStats" ↵Dmitri Plotnikov2023-02-102-22/+46
| |\ | | | | | | | | | into tm-qpr-dev
| | * Reclassify FGS and BOUND_TOP as "background" in BatteryUsageStatsDmitri Plotnikov2023-02-072-22/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 257392992 Bug: 239667114 Test: atest FrameworksCoreTests:BatteryStatsTests Change-Id: Ice58ea7537847441f41ed97c5f8b2bda2b4b7e4d (cherry picked from commit 758ad303e54b9a4b37376f65fce2daad74231976) Merged-In: Ice58ea7537847441f41ed97c5f8b2bda2b4b7e4d
| * | Fix error prone of AccessibilityShortcutControllerTestmenghanli2023-02-101-0/+2
| | | | | | | | | | | | | | | | | | Bug: 260261870 Test: Build & atest AccessibilityShortcutControllerTest Change-Id: I22738576dfa0231b45fd0dcc87fd63272379170e
| * | Avoid users add one-handed mode by edit shortcut dialog in unsupported devicesmenghanli2023-02-074-3/+273
| |/ | | | | | | | | | | | | | | | | | | | | Root cause: We show preinstalled framework features in edit shortcut dialog Solution: Only show one-handed mode if the device supports Bug: 260182478 Test: atest AccessibilityTargetHelperTest Change-Id: Id0696bff522cb7e19c5a16a47bbb76a794472c52 merged-in: Id0696bff522cb7e19c5a16a47bbb76a794472c52 (cherry picked from commit 1a9081a982970d812676a3ee3e3aa7fe27f3b449)
| * Merge "Add SystemUiSystemPropertiesFlags" into tm-qpr-devJeff DeCew2023-02-032-0/+111
| |\
| | * Add SystemUiSystemPropertiesFlagsJeff DeCew2023-02-022-0/+111
| | | | | | | | | | | | | | | | | | | | | Bug: 267338705 Test: atest FrameworksCoreTests:SystemUiSystemPropertiesFlagsTest Ignore-AOSP-First: folder is new in this branch Change-Id: Iee2cac6f322b98254d709560b0a84f0549e91972
| * | Add log on screenshot capture failedMiranda Kephart2023-01-311-0/+6
| |/ | | | | | | | | | | | | | | | | | | Also moves the request logging slightly earlier so we capture the request even if it fails due to e.g. locked storage. Bug: 264457397 Fix: 264457397 Test: atest TakeScreenshotService, statsd_testdrive Change-Id: I7cd268114a91ffa63328fa37f12d201316c94173
| * Merge "Make ScreenshotRequest handle hardware bitmap conversion" into tm-qpr-devMiranda Kephart2023-01-193-11/+172
| |\
| | * Make ScreenshotRequest handle hardware bitmap conversionMiranda Kephart2023-01-183-11/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, ScreenshotHelper provides utility functions to convert between a hardware bitmap and a parcelable form for sending between processes, but the originating code must handle the conversion itself. This change moves the conversion so that it occurs seamlessly inside of the ScreenshotRequest class, and refactors the inputs to ScreenshotHelper slightly so that the ScreenshotRequest data class is what gets passed in. Bug: 264457397 Test: atest Merged-In: I1041bbcfdc5f5ece6e98bd0844017d4f3dc4e9f3 Change-Id: I1041bbcfdc5f5ece6e98bd0844017d4f3dc4e9f3
| * | Merge "Fix concurrency issue in PropertyInvalidatedCache" into tm-qpr-devLee Shombert2023-01-171-0/+16
| |\ \ | | |/ | |/|
| | * Fix concurrency issue in PropertyInvalidatedCacheLee Shombert2022-12-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 253063488 Ensure the global lock is held while fetching the list of active caches. The global lock is necessary while the list is being fetched; it is not necessary while each cache in the list is cleared. Added a new test for PropertyInvalidatedCache.onTrimMemory(). This test will not catch race conditions but does verify that onTrimMemory() behaves as expected. Test: atest * FrameworksCoreTests:PropertyInvalidatedCacheTests Change-Id: I5022620cd4f2561179af709246a9bf149423143f (cherry picked from commit 803254d0ab3109165ffc1e3f409c07a692a9ac37)
| * | DO NOT MERGE Split BackEvent into an internal BackMotionEvent and public ↵Shan Huang2022-12-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BackEvent. The constructor of BackEvent has diverged on QPR and master, which will create merge conflicts for all subsequent SysUI back animations to be added from QPR. This cherry-picks ag/20445076 minus the public API changes to solve this problem. Test: atest BackAnimationControllerTest Test: atest BackNavigationControllerTests Test: atest WindowOnBackInvokedDispatcherTest Test: atest TouchTrackerTest Test: m -j Bug: 238475284 Change-Id: Ib9100a9d667a9a17e8f357a1bfc3ee2b52ec17c7
* | | fixup! SystemUI: screenshot: open long screenshot activity for partial ↵Michael Bestas2023-04-161-0/+7
| | | | | | | | | | | | | | | | | | screenshots Change-Id: I718cb0d8516d72d55fd439b132c27e6edc81158c
* | | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-0329-132/+3071
|\| | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * | Merge "[Chooser/ResolverActivity] Fix flakiness in work profile tests" into ↵Nick Chameyev2022-12-292-4/+32
| |\ \ | | |/ | |/| | | | tm-qpr-dev
| | * [Chooser/ResolverActivity] Fix flakiness in work profile testsNick Chameyev2022-12-212-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes work profile tests were failing because work profile tab button click was not handled. Most likely it is related to the opening animation of the drawer layout. Added retry mechanism to click on the button again if the tab was not selected. Test: repeated run of ResolverActivityWorkProfileTest Test: atest com.android.internal.app.ChooserActivityWorkProfileTest Test: atest com.android.internal.app.ResolverActivityWorkProfileTest Test: atest com.android.intentresolve.UnbundledChooserActivityWorkProfileTest Bug: 262018267 Change-Id: Icb6d0337d7f92f1ceb59ef3c03e5b9338dcf2890
| * | Enable forced focus for resumed split screen activitiesMariia Sandrikova2022-12-255-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed because some game engines wait until they get focus before drawing the content of the app so they are blacked out when they are resumed and do not have focus yet. Bug: 203398248 Test: atest FrameworksCoreTests:ViewRootImplTest#whenDispatchFakeFocus_noFocusAfterwards Change-Id: I5675b32fbb9f60a7373fadbce379d571168436e7 Merged-In: I5675b32fbb9f60a7373fadbce379d571168436e7
| * | Add owners for controlsFabian Kozynski2022-12-211-0/+1
| |/ | | | | | | | | | | | | | | Change-Id: Ief1fc9185574e25e47e496fdeec26880f35dcb09 Test: no test Bug: no bug (cherry picked from commit 1b0810e43a029dab226ce20b18cb7faa17ade73d) Merged-In: Ief1fc9185574e25e47e496fdeec26880f35dcb09