summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-18Merge cherrypicks of [9950314, 9950315] into qt-qpr1-releaseandroid-10.0.0_r26android10-qpr1-releaseandroid-build-team Robot
Change-Id: I3411185536f0057b55127c295d141ea7212f50af
2019-12-18Put userId at the end of parcelTony Mak
userId is a new field added in ag/8350816, and it is written in between some old fields when we parcelize it. That breaks AiAi because some of its code rely on the implementation details of SelectionEvent.writeToParcel. In the long run, we may want to update AiAi such that it works without this assumption, but before that, let's fix that in platform for now. Bug: 145962464 Bug: 123232892 Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest Merged-In: I98137a095cddf0fb4c600e1e09eef507bb750528 Change-Id: I66f65ac4c81ca964f710404fd081496355276435 (cherry picked from commit 642c22b223e40459d74332b629692a94de99ec9a)
2019-12-18RESTRICT AUTOMERGE TextClassifier cross-user vulnerability in direct-replyAbodunrinwa Toki
Sys UI runs on user 0. This can lead to the TextClassifier (TC) running for the wrong user. Consequencies are user A can launch apps in user B via the TC's predicted actions and selected text being unintentionally shared from user A to an app running in user B. This fix ensures that the correct user id is passed and verified for every TC request going across process boundaries (i.e. via SystemTC). - Sys UI sets the appropriate user id in the TextView - TextClassificationManager (TCM) system service is constructed using a context generated from this user id - SystemTC sets this user id before querying the TCMService - TCMService validates the user id before forwarding the request to the TCService belonging to that user id. Bug: 136483597 Bug: 123232892 Test: atest android.view.textclassifier atest android.widget.TextViewActivityTest (manual) See I2fdffd8eb4221782cb1f34d2ddbe41dd3d36595c Change-Id: Ibe68bc9e257521de97cbb014176b2b8ba23547d1 (cherry picked from commit 34e380cdd64230db81a5754b7b6e2654509af180)
2019-12-18Merge cherrypicks of [9944753, 9944208, 9945193, 9945194, 9944754, 9944210, ↵android-build-team Robot
9945365, 9945195, 9945196, 9945197, 9944756, 9945878] into qt-qpr1-release Change-Id: I05885895c38a2b95f67fdc9952752622dc2393fc
2019-12-18Handles null outInfo in deleteSystemPackageLIPatrick Baumann
This change adds null checks before accessing outInfo in deleteSystemPackageLI. Bug: 142083996 Test: manual; remove static dependency on eng build and reboot Change-Id: If0fd48343e89cbb77ccd25826656194195d5b0cd (cherry picked from commit 17471016508bb9c9ffb8c3946dda0b4897d722f1) (cherry picked from commit 5a3888c613bbc8f70a5d9e4d53526a5ae1491bb5)
2019-12-18Merge cherrypicks of [9943992, 9944684, 9944054, 9943993, 9944476, 9942363, ↵android-build-team Robot
9942364, 9942365, 9942367, 9944685, 9944686, 9943217, 9944762, 9944764, 9944481, 9944411, 9944055, 9944056, 9944057] into qt-qpr1-release Change-Id: I4d3fc67b18ffa1f8f68e0a2ade6df02d2567aaa8
2019-12-18RESTRICT AUTOMERGEBernardo Rufino
Make toasts non-clickable Since enforcement was only on client-side, in Toast class, an app could use reflection (or other means) to make the Toast clickable. This is a security vulnerability since it allows tapjacking, that is, intercept touch events and do stuff like steal PINs and passwords. This CL brings the enforcement to the system by applying flag FLAG_NOT_TOUCHABLE. Test: atest CtsWindowManagerDeviceTestCases:ToastTest Test: Construct app that uses reflection to remove flag FLAG_NOT_TOUCHABLE and log click events. Then: 1) Observe click events are logged without this CL. 2) Observer click events are not logged with this CL. Bug: 128674520 Change-Id: Ic36585bc4f186e0224f5b687c49c0b3d9266838c (cherry picked from commit b81f269ae2afb446b9d4a909fc2bcf038af00c41)
2019-12-18DO NOT MERGE: Don't let NotificationEntryManager keep around old RankingMapsEvan Laird
When a notification becomes lifetime-extended, NotificationEntryManager was holding onto the RankingMap that was passed at the time of removal of _that_ notification, and using it again in the NotificationSafeToRemoveCallback. The problem here is that when onSafeToRemove gets called, it was passing that same stale ranking map to removeNotification, which caused any notification that arrived in the intervening time to get improperly ranked. This fixes an issue where any notification that arrives while another is lifetime-extended can get the wrong ranking applied to it, causing trouble later in time such as mis-ranking and mis-sorting until the next update from system server. Bug: 146046016 Bug: 119041698 Test: atest SystemUITests Test: manual - Post a FGS notification and immediately cancel, then post a regular notification and wait for the FGS notification to dismiss. Note that the regular notification keeps showing in the status bar. Change-Id: I3df1279f13c424fcedd878bae2095fadc75d61b4 (cherry picked from commit 323ce6205704cc1b3e13b61286069451643392b5)
2019-12-18Revoke granted permission when the permission defining app is removed.Philip P. Moltmann
Bug: 67319274 Test: atest android.permission.cts.RemovePermissionTest Change-Id: I22df546f5cd19e10045131d36dc3f5033f727baa Merged-In: I20c4c975a1dd41a0a6c3e068988fe60be51dd1b4 (cherry picked from commit bde381848d0d07780710ce36e0c974646ba8f995)
2019-12-18[DO NOT MERGE] Return correct offsets for getAttributeRange()Jin Seok Park
Cherry-picked from ag/9745767 Currently, the offset value returned from getAttributeRange() does not take into account the offset to the EXIF data within the image file. This CL fixes the code to return the correct offsets. The existing test code could not detect this issue because it does not explicitly seek to the given offset and retrieve/compare the data. This CL also adds test code to do this. Make tag information is also added because all test files have this information, while only a select few have thumbnail/GPS tag information. This CL also fixes a bug where the thumbnail offset was not being updated if the data was passed with StripOffsets tag. Bug: 143118731, Bug: 143663411 Test: atest ExifInterfaceTest Change-Id: I94c3438020d1091a8829a96e1b0a5ef4193d9dc9 (cherry picked from commit e6e97865f3f3965915c5fd45554e207ffad6111f)
2019-11-16Merge cherrypicks of [9740811, 9740883, 9740926, 9740927, 9740929, 9740931, ↵android-10.0.0_r22android-10.0.0_r21android-build-team Robot
9741053, 9741055, 9741072, 9740884, 9740966, 9740968, 9740969, 9740971, 9741093, 9741094] into qt-qpr1-release Change-Id: If6b3f6bf4e44786f2d36ae68f280b9f03eb28f69
2019-11-16Actually use mContext directlyDaniel Rosenberg
I40e95d72c63f864131f0028c47f121463d0f6dff (Use mContext directly) lost a needed line in a rebase Test: Forced commit to return exception, checked that device reboots Bug: 138952436 Merged-In: Idb7cb9a5b7c4c0d237ece9716932a260956a0109 Change-Id: I8e7484631cd76965e660544a1af9f567dc5d3a34 (cherry picked from commit c5fc5fe3266a7b01f689e2c981babadca5360836)
2019-11-16DO NOT MERGE: Fixes NPE when preparing app data during initPatrick Baumann
When deleting an unused static shared library on Q, the user manager was fetched via mContext.getSystemService. At this time during boot, the service wasn't registered and so null was returned. This has already been addressed in R with a move to injecting dependencies in the PackageManagerService constructor. Bug: 142083996 Bug: 141413692 Test: manual; remove static dependency on eng Q build and reboot Change-Id: I8ae4e331d09b4734c54cdc6887b273705dce88b1 (cherry picked from commit 46e6a0b1ff34d3a0a8fc006ba86677780195a1ff)
2019-11-16Use KNOWN_PACKAGES when shared lib consumersPatrick Baumann
This change ensures we find ALL known packages that could be consuming a shared library, not only currently installed ones. Without this check, the system may get into a state in which we have currently uninstalled but on-device apps that depend on a shared library that does not exist on device. This change also leaves static shared library packages on device even if it's not installed for any of the remaining users as it could still be used, but marked uninstalled for users in which it is consumed. Bug: 141413692 Bug: 142083996 Test: Manual; attempt to remove shared lib after marking its consumer uninstalled. Test: atest StaticSharedLibsHostTests Change-Id: Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea (cherry picked from commit 34b504c32ff054265630662fa6fa57158cbcdc6c)
2019-11-16Ensure SKP serialization occurs on RenderThreadJohn Reck
Instead of doing lazy serialization of SKP on the background executor serialize to a byte[] immediately at callback invocation. This ensures no potential for later mutations, race conditions, or wrong-thread issues at the expense of potentially impacting app rendering performance. However it seems preferable for a debug-only tool to be a slow instead of very crashy. Bug: 141772764 Test: test app Change-Id: I3316d49970b96f1c59bb0a28ff7335db608e539e (cherry picked from commit 8d0da1a6c5271d7f803b665d6a0784a2ca74d3c8)
2019-11-16Dismissed keyguard gone runnables when abortingSelim Cinek
Previously those actions could linger around and lead to a variety of bugs. Also fixed an issue when gutsManager calls were overlapping to protect against these issues Fixes: 130885521 Test: atest SystemUITests Test: see bug description Change-Id: Iffe37e6d48bbc9c26ba92f362d7b67bf743c7c28 (cherry picked from commit 300dcfb7c3ebcfcba2e76de6ce16f2b0309e2e6d)
2019-11-16Do not register lift when sensor is not presentLucas Dupin
Bug: 141284056 Fixes: 142365481 Test: force snesor to return null Change-Id: I45583e4f1c06ec7088a7d6335597a8671555f339 (cherry picked from commit 3b745ddf4a0105ee01b42f5024be4e0370a89b6b) (cherry picked from commit 0a410d3a6c4d7cff0d617e501ecc14e61219a358)
2019-11-15Merge cherrypicks of [9736358, 9736296, 9735406, 9736235, 9736059, 9736060, ↵android-build-team Robot
9736236, 9736297, 9736298, 9735210, 9735309] into qt-qpr1-release Change-Id: I7c111006a2aa42b19126f0a248b9b57434ca3a0a
2019-11-15Validate wallpaper dimension while generating cropAhan Wu
If dimensions of cropped wallpaper exceed max texture size that GPU can support, it will cause sysui keep crashing because it can not initialize egl with an appropriate surface. Bug: 120847476. Test: Write a custom app to set a 8000x800 bitmap as wallpaper. Test: The cropped file will be 29600x2960 and make sysui keep crashing. Test: After applyed this cl, wallpaper will use fallback. Test: Sysui will not keep crashing any more. Change-Id: Icdc6292191d1e966c52640f4c1a5a154dfba45d3 (cherry picked from commit 32c6a7c691b0d91085c1ed13fe6f1c473c94b4c8)
2019-11-15Prevent system uid component from running in an isolated app processJing Ji
Bug: 140055304 Test: Manual Change-Id: I5a1618fab529cb0300d4a8e9c7762ee218ca09eb Merged-In: I5a1618fab529cb0300d4a8e9c7762ee218ca09eb (cherry picked from commit 84f2b227b0a0e74157508f143c1ef44ef0f0be50)
2019-10-29Merge cherrypicks of [9638173, 9638613, 9638413, 9638414, 9638415, 9638614] ↵android-10.0.0_r16android-10.0.0_r15android-build-team Robot
into qt-qpr1-release Change-Id: Iae77574c5c04d7c1f839a05ebe969c76270fdec3
2019-10-29DO NOT MERGE Revert all scrim related changes in qprSelim Cinek
This reverts commit 9449cfc4a608e7d801da642958249a16c536411b. This reverts commit 22fa97577f39524e3ffbfbbf37040eff540bcb49. This reverts commit bde48202e7bb1ffa04acd5c42a332c62b73f34d8. Bug: 141649119 Bug: 143195895 is also fixed on my taimen with the above. Bug: 143185828 Test: atest SystemUITests Change-Id: I225b10fef2f88d3436ef3a683c09717467b071ad (cherry picked from commit f97d7f73cf965f30b645ddd01a5f639e7e79d192)
2019-10-16Merge cherrypicks of [9558225] into qt-qpr1-releaseandroid-build-team Robot
Change-Id: Iff354b34a8b8eb29d848598ab5a6150931546105
2019-10-16Fixed a bug where the statusbar wasn't interactiveSelim Cinek
Our restriction if it has finished was too strict before, let's loosen it to call whenever the animation has actually finished not when it reached the final value Fixes: 142189043 Test: atest SystemUITests Change-Id: Ic8a252316346782b485b25d0f5d5458b30511f09 (cherry picked from commit 9449cfc4a608e7d801da642958249a16c536411b)
2019-10-12Merge cherrypicks of [9542614, 9542552, 9542615, 9542478] into qt-qpr1-releaseandroid-build-team Robot
Change-Id: I59102d69cb3946775f950a16f0ae835c3b585e73
2019-10-12Revert "Keep interrupts on when in battery saver mode"Lubo Hristov
This reverts commit 6edeb187015a04e7ff6a8f06275336b7e4ac82e7. Reason for revert: cherry-picked into incorrect release branch Bug: 134157254 Change-Id: I914e36b29ad2e0cc13619dbe8d32c8f0f9b77399 (cherry picked from commit 599a8ea144af095f530545c5b73dafe083068449)
2019-10-11Merge cherrypicks of [9537713, 9537701, 9537702, 9537538, 9537180, 9537181, ↵android-build-team Robot
9537182, 9537183, 9537764, 9537703, 9537784, 9537785, 9537714, 9537715, 9537716, 9537717, 9537786, 9537718, 9537719, 9537720, 9537721, 9537722, 9537787, 9537788, 9537723, 9537804, 9537805, 9537789] into qt-qpr1-release Change-Id: Ic6776e8e237dbfccbf84f2ede975b185c18d045e
2019-10-11Keep interrupts on when in battery saver modeLucas Dupin
Battery saver was completely aborting the doze service, disabling all interrupts. This is not ideal since it impacts the user journey, especially when using face auth. From now on the screen will still be off, but DozeService will be retained, in order to receive sensor events. Test: w/ battery saver: lift, tap, and observe aod being off Test: w/ battery saver: receive notification, no HUN. Test: w/o battery saver: lift, tap, and observe aod being on Test: w/o battery saver: receive notification, HUN is received. Fixes: 134157254 Change-Id: I9b713c78857c4e4c22d8d9bfff165b1b51dfd804 Merged-In: I9b713c78857c4e4c22d8d9bfff165b1b51dfd804 (cherry picked from commit 6edeb187015a04e7ff6a8f06275336b7e4ac82e7)
2019-10-11DO NOT MERGE Update setting to be bubbles not badgingMady Mellor
Test: atest NotificationMangerTest NotificationManagerServiceTest Fixes: 142166809 Change-Id: I3ac5410a5185ef78cb0f90d05738191efca02de8 (cherry picked from commit 8527dcb20bce188766985cedfd5553e22808ff17)
2019-10-11Force FGS notifications to show for a minimum timeEvan Laird
It's possible for a service to do a start/stop foreground and cause a couple of things to happen: NotificationManagerService will enqueue a EnqueueNotificationRunnable, post a PostNotificationRunnable (for the startForeground), and then also enqueue a CancelNotificationRunnable. There is some racy behavior here in that the cancel runnable can get triggered in between enqueue and post runnables. If the cancel happens first, then NotificationListenerServices will never get the message. This behavior is technically allowed, however for foreground services we want to ensure that there is a minmum amount of time that notification listeners are aware of the foreground service so that (for instance) the FGS notification can be shown. This CL does two things to mitigate this problem: 1. Introduce checking in the CancelNotificationRunnable such that it will not cancel until after PostNotificationRunnable has finished executing. 2. Introduce a NotificationLifetimeExtender method that will allow a lifetime extender to manage the lifetime of a notification that has been enqueued but not inflated yet. Bug: 119041698 Test: atest NotificationManagerServiceTest Test: atest ForegroundServiceNotificationListenerTest Change-Id: I0680034ed9315aa2c05282524d48faaed066ebd0 Merged-In: I0680034ed9315aa2c05282524d48faaed066ebd0 (cherry picked from commit 5136eefeb3e343ad2a487296063d19e01ea554e0)
2019-10-11Update PermissionChecker usages to avoid unnecessary attribution.Svet Ganov
We had accidental usages of the PermissionChecker for cases where no private data was provided to the app but the checkPermission API on the latter also did blame data access on the app. The PermissionChecker was designed to handle IPC calls and not for generic API checks. To avoid future accidental incorrect PermissionChecker usages this change renames the existing APIs of the latter to clearly indicate that they should be used for data delivery and also adds sibling methods for doing the same permission checks for preflight purposes. Also the documentation is improved to furhter assist developers. In addition, this change fixes accidental permission checker usages that blame when they should not by using the new preflight flavor of the permission check APIs. Test: atest com.android.settingslib.location.RecentLocationAppsTest atest CtsPermissionTestCases added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled added: LocationAccessCheckTest#noNotificationIfFeatureDisabled added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess bug:141028068 Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e Change-Id: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e (cherry picked from commit 7fe065eb660cfe8ae54f8cd1e1e615f47d7b311c)
2019-10-11Only allow INSTALL_ALLOW_TEST from shell or rootTodd Kennedy
Bug: 141169173 Test: Manual. App can't be installed as test-only Change-Id: Ib6dcca7901aa549d620448c0165c22270a3042be (cherry picked from commit b5afc874838857bac783555bd665ac3bdd7966f9)
2019-10-06Merge cherrypicks of [9513175, 9513021, 9513295] into qt-qpr1-releaseandroid-build-team Robot
Change-Id: Ib86b158e0d92dd8298439ec849c442ac79494d88
2019-10-06Revert "Wifi usability: Change the unit of the threshold for tx/rx ↵Mingguang Xu
throughput from Mbps to Kbps" This reverts commit 078fe45552425c18aa8052da0ae3c9205fa5c309. Reason for revert: This change introduced a bug and it completely changed the functionality of WiFi data stall detection, e.g., high Tx link speed can easily trigger data stall.  We would like to roll back them to restore the normal functionality of Wifi data stall detection. Bug: 141995185 Change-Id: I024808b580955545b084112c4b14921f038b595f Merged-In: I078d28ed81a84e32aaece839a51590364a974481 (cherry picked from commit 038345da61cb9d560486386a1c46c18c870e597c)
2019-10-03Snap for 5915132 from e548ea7764636378f2970282043868033ec45b47 to ↵android-build-team Robot
qt-qpr1-release Change-Id: I864a35bb2c3d18dee6962fa46a8321cc33511aeb
2019-10-02[automerger skipped] RESTRICT AUTOMERGE Do not compute outside given range ↵Seigo Nonaka
in TextLine am: 4ce901e405 am: b51c7bb175 am: af62f3a7b3 -s ours am: 86ddd9eb6a -s ours am: eab868fa63 am: 59bfe5d653 Change-Id: Ie4856b8d5ef454e47f336b681af0a899c96dcb33
2019-10-02[automerger skipped] RESTRICT AUTOMERGE Do not compute outside given range ↵Seigo Nonaka
in TextLine am: 4ce901e405 am: b51c7bb175 am: af62f3a7b3 -s ours am: 86ddd9eb6a -s ours am: eab868fa63 Change-Id: I2f88eecd916f2642cc3cb0c8ba91ed6348247900
2019-10-02[automerger skipped] RESTRICT AUTOMERGE Do not compute outside given range ↵Seigo Nonaka
in TextLine am: 4ce901e405 am: b51c7bb175 am: af62f3a7b3 -s ours am: 86ddd9eb6a -s ours am skip reason: subject contains skip directive Change-Id: Ie6db3a3499cb02ef1bd34232a4ca8fb362b18e7d
2019-10-02[automerger skipped] Merge "RESTRICT AUTOMERGE Do not compute outside given ↵Sterling Huber
range in TextLine" into pi-dev am: e352c1f2bc -s ours am: 66e93df90a am: 43a23b721a Change-Id: Ie3ebb87b2a80189b7e06b93630898f5bb39715b6
2019-10-02[automerger skipped] RESTRICT AUTOMERGE Do not compute outside given range ↵Seigo Nonaka
in TextLine am: 4ce901e405 am: b51c7bb175 am: af62f3a7b3 -s ours am skip reason: subject contains skip directive Change-Id: Ifb67887f4b1a5860dca2569e57a74911efde801d
2019-10-02[automerger skipped] Merge "RESTRICT AUTOMERGE Do not compute outside given ↵Sterling Huber
range in TextLine" into pi-dev am: e352c1f2bc -s ours am: 66e93df90a Change-Id: I1c8d52d8db52e53f15095d43e9744ece11f9c900
2019-10-02RESTRICT AUTOMERGE Do not compute outside given range in TextLine am: 4ce901e405Seigo Nonaka
am: b51c7bb175 Change-Id: I6770f4b1a884020c374a75f67eb762b2c2bfd538
2019-10-02[automerger skipped] Merge "RESTRICT AUTOMERGE Do not compute outside given ↵Sterling Huber
range in TextLine" into pi-dev am: e352c1f2bc -s ours am skip reason: subject contains skip directive Change-Id: Id51032f27a8325444290483a9a30da49da8ac2e2
2019-10-02RESTRICT AUTOMERGE Do not compute outside given range in TextLineSeigo Nonaka
am: 4ce901e405 Change-Id: I739746d80a8dd29998a67c1d9aaa2d3f804ac57c
2019-10-02Merge "RESTRICT AUTOMERGE Do not compute outside given range in TextLine" ↵Sterling Huber
into pi-dev
2019-10-02Snap for 5911975 from f5b1101af91690d700a68eaae964c6be24a33210 to ↵android-build-team Robot
qt-qpr1-release Change-Id: Ib20bdd507878a85385521d0f3a57afbd018b7a9f
2019-10-01[automerger skipped] Import translations. DO NOT MERGEBill Yi
am: bfb7a7227c -s ours am skip reason: subject contains skip directive Change-Id: I0cd9a23fc9d8dc550921d4406e77485dd5a56582
2019-10-01Import translations. DO NOT MERGEBill Yi
BUG:138175268 Change-Id: I4e6ca4ed7c7ba4a39a15988100fad60dafd79c02 Auto-generated-cl: translation import
2019-10-01Snap for 5909972 from 29b8d32f0d14edb642e1570c35648e337bc5a28d to ↵android-build-team Robot
qt-qpr1-release Change-Id: If81796adbe5a6a1811cb289ed1029f73c1b5a96a
2019-09-30Merge "Import translations. DO NOT MERGE" into qt-qpr1-devTreeHugger Robot