Commit Graph

105724 Commits

Author SHA1 Message Date
Wu Ahan
64479d2daf Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: cc4fe8984a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16631185

Change-Id: I16089ff8866b99e105fdb86cd8557854cb428888
2022-01-19 22:14:23 +00:00
Wu Ahan
cc4fe8984a Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit fa9c73975e.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I567f20b4f545bed906938731c27eac6eb7aeddff
2022-01-13 14:43:00 +00:00
Wu Ahan
3b44a185d6 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: fa9c73975e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379914

Change-Id: Ie69bb33c922f79bf535608a8d0f28086d1043438
2021-12-09 01:42:51 +00:00
Wu Ahan
fa9c73975e DO NOT MERGE: Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 03:13:06 +00:00
Varun Shah
a7174fa6db Merge "Update deletion conditions for a package's UsageStats." into rvc-dev am: 06c5973697
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222704

Bug: 206039322
Change-Id: I8f02f4bce0661eaea6ae1e72c05f6fcafdc49884
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-13 00:03:58 +00:00
Winson Chung
c9869e0d9c Add mechanism for a task's windows to be trusted overlays am: 47fb132ef2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15975849

Change-Id: Ia323593ceba41580d88b6d058ae0bfc8c92dce3f
2021-11-11 19:00:04 +00:00
Varun Shah
06c5973697 Merge "Update deletion conditions for a package's UsageStats." into rvc-dev 2021-11-11 18:47:24 +00:00
Varun Shah
d95ce6779d Update deletion conditions for a package's UsageStats.
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.

Bug: 197399948
Test: atest  UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-11 10:13:47 -08:00
Chris Ye
0ee0d7f55e Change InputWindowInfo::isTrustedOverlay() to be permission and flag based am: 716333761d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15975848

Bug: 196389741
Change-Id: I3109c9cadb88297ec13751171b15410633bba03a
Merged-In: I70151697cc01e8427129f951f0ebadc4805b2d56
2021-11-10 19:06:16 +00:00
Winson Chung
47fb132ef2 Add mechanism for a task's windows to be trusted overlays
- Exposes a method to set that a certain part of the SF hierarchy is
  trusted, and sets this state for tasks in PIP.

Bug: 191529039
Bug: 196389741
Test: Manual, try using permission dialog while PIP is active

Change-Id: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
Merged-In: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
2021-11-05 21:15:54 +00:00
Chris Ye
716333761d Change InputWindowInfo::isTrustedOverlay() to be permission and flag based
Add private flag to WindowManager.LayoutParams. If the flag is set,
check if caller has INTERNAL_SYSTEM_WINDOW permission.

Bug: 155781676
Bug: 196389741
Test: atest WindowManagerServiceTests
Change-Id: I70151697cc01e8427129f951f0ebadc4805b2d56
Merged-In: I70151697cc01e8427129f951f0ebadc4805b2d56
2021-11-05 21:15:53 +00:00
TreeHugger Robot
21886570d2 Merge "Change the ownership of CDM" into rvc-dev am: 231a42b77e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15779907

Change-Id: Id6c89667a9578925cb8c14f9e172c84ba05b00c0
2021-09-08 17:34:30 +00:00
Evan Chen
5c42cc9336 Change the ownership of CDM
Bug: 199185781
Change-Id: I7be0bbd88aa5b0bf0b22a7372f3069c518a769c4
Test: Manual
2021-09-07 20:51:56 +00:00
TreeHugger Robot
f6db6bcb3e Merge "Bluetooth: Fix formatting in getAlias()" into rvc-dev am: 16a307631e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15616111

Change-Id: Ia7ce6aaebccf6f3460ad576a9e703858584fcd93
2021-08-31 23:00:05 +00:00
TreeHugger Robot
c744a25d14 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into rvc-dev 2021-08-31 22:41:01 +00:00
TreeHugger Robot
54c29aa710 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into rvc-qpr-dev 2021-08-31 22:40:30 +00:00
TreeHugger Robot
16a307631e Merge "Bluetooth: Fix formatting in getAlias()" into rvc-dev 2021-08-31 22:39:51 +00:00
TreeHugger Robot
7b6380a147 Merge "Fix parsing code parcelling errors" into rvc-dev am: 2b220b4ef7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15583462

Change-Id: Ifba815fef90ebfbac8b871b337baf8f87d1a2d27
2021-08-31 22:25:31 +00:00
Aseem Kumar
9050942832 Prevent apps from spamming addAccountExplicitly.
See comment here for the discussion on solution
https://b.corp.google.com/issues/169762606#comment14

Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253

Bug: 169762606
(cherry picked from commit 11053c17b3)

Change-Id: Ic65162df3415275514f6277891a9412865e2315b
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-08-20 17:11:57 +00:00
Aseem Kumar
c65b81ba27 Prevent apps from spamming addAccountExplicitly.
See comment here for the discussion on solution
https://b.corp.google.com/issues/169762606#comment14

Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253

Bug: 169762606
(cherry picked from commit 11053c17b3)

Change-Id: I3ff7d8f4df086cb4c153e7ec873b85a093810722
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-08-19 10:01:44 +00:00
Hansong Zhang
3c4a917cb9 Bluetooth: Fix formatting in getAlias()
Bug: 180747689
Test: manual
Change-Id: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
2021-08-18 23:43:45 +00:00
Winson
37a0b6de89 Fix parsing code parcelling errors
Address problems reading/writing:
- ParsingPackageImpl mKeySetMapping
- ParsingPackageImpl mQueriesIntent

Bug: 187043377
Bug: 195962697

Test: atest com.android.server.pm.test.parsing.parcelling

Merged-In: I5b33315f8248d5fcbdef2cc04ecf77cc18dbd7b6
Change-Id: I5b33315f8248d5fcbdef2cc04ecf77cc18dbd7b6
(cherry picked from commit f93af7ef7e)
2021-08-16 18:03:08 +00:00
Rhed Jao
1c93d67774 Merge "DO NOT MERGE Apply a maximum char count to the load label api" into rvc-dev 2021-08-11 05:19:39 +00:00
Jayant Chowdhary
9e82fb98ed Merge "camera2: Fix exception swallowing in params classes createFromParcel" into qt-dev am: 93e157955a am: 0cf6fdb791 am: 3c93e01ccf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15121727

Change-Id: I0dc4ada4e6e664d8517c710b8b905dffa825b2c0
2021-08-09 15:45:20 +00:00
Jayant Chowdhary
3c93e01ccf Merge "camera2: Fix exception swallowing in params classes createFromParcel" into qt-dev am: 93e157955a am: 0cf6fdb791
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15121727

Change-Id: I1adb4fa9ae369c1eabbd3fcbdac7abf4425743bb
2021-08-09 15:30:32 +00:00
Jayant Chowdhary
0cf6fdb791 Merge "camera2: Fix exception swallowing in params classes createFromParcel" into qt-dev am: 93e157955a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15121727

Change-Id: Id144b968bf5154f806900e030d2b7bd9ba407c67
2021-08-09 15:20:58 +00:00
Jayant Chowdhary
93e157955a Merge "camera2: Fix exception swallowing in params classes createFromParcel" into qt-dev 2021-08-09 15:12:22 +00:00
Rhed Jao
3c26a24644 DO NOT MERGE Apply a maximum char count to the load label api
The system is overwhelmed by an enormous label string returned by
the load label api. This cl truncates the label string if it exceeds
the maximum safe length.

Bug: 67013844
Test: atest PackageManagerTest
Change-Id: Ia4d768cc93a47cfb8b6f7c4b6dc73abd801809bd
Merged-in: Ia4d768cc93a47cfb8b6f7c4b6dc73abd801809bd
2021-08-02 16:13:21 +08:00
TreeHugger Robot
17d1be8efc Merge "Revert "wifidisplay: restrict broadcast by the proper permission"" into rvc-dev am: 30c6383d1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15287612

Change-Id: I2fba182703b7e2362a0cd0934903c6a2af849751
2021-07-20 02:31:53 +00:00
TreeHugger Robot
30c6383d1d Merge "Revert "wifidisplay: restrict broadcast by the proper permission"" into rvc-dev 2021-07-20 02:13:10 +00:00
Jimmy Chen
955b64a6e7 Revert "wifidisplay: restrict broadcast by the proper permission"
This reverts commit cff8340c84.

Reason for revert: Remove from July 2021 Android Security Bulletin due to break existing applications.

Bug: 176541017
Change-Id: Iacef744056630e85fb43d838a72abfae331cbaf4
Test: install WFD application and check whether it works normally.
2021-07-15 00:56:19 +00:00
Bernardo Rufino
ccdf929a26 Merge "Fix background bypass via notifications" into qt-dev am: 22500563c1 am: 57af3050d2 am: f7c195b4e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14937196

Change-Id: I0811d754d2b7a796e22baeb62d047c732f8d9826
2021-06-30 16:06:07 +00:00
Bernardo Rufino
f7c195b4e9 Merge "Fix background bypass via notifications" into qt-dev am: 22500563c1 am: 57af3050d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14937196

Change-Id: I0bf46422d4f7d2621a33776a4c98375d566af117
2021-06-30 15:41:55 +00:00
Bernardo Rufino
57af3050d2 Merge "Fix background bypass via notifications" into qt-dev am: 22500563c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14937196

Change-Id: I193bfe3aa08c2f397d037c2d5c71cfe854cd343d
2021-06-30 15:30:23 +00:00
Bernardo Rufino
22500563c1 Merge "Fix background bypass via notifications" into qt-dev 2021-06-30 07:18:28 +00:00
Jayant Chowdhary
7bf30cb92a camera2: Fix exception swallowing in params classes createFromParcel
Do not catch exceptions when we attempt to create the following classes
from a parcel
- OutputConfiguration
- VendorTagDescriptor
- VendorTagDescriptorCache
- SessionConfiguration
This could cause subsequent parcel information to be read incorrectly.

Bug: 188675581

Test: Sample app which tries to write invalid data into an
      OutputConfiguration parcel to send in an intent via Broadcast. When read by the receiving app,
      gets an exception (not swallowed).

Merged-In: I745ca49daa6ca36b1020d518e9f346b52684f2b1
Change-Id: I745ca49daa6ca36b1020d518e9f346b52684f2b1
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 6b0bcd60c8)
2021-06-28 20:32:50 +00:00
TreeHugger Robot
c5b814ec0a Merge "Improve ellipsize performance" into qt-dev am: 819dc46ad3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14904663

Change-Id: Ia1486957866ef76461718a679e956e7ee627cc7f
2021-06-26 02:45:31 +00:00
TreeHugger Robot
3f7f408f58 Merge "Improve ellipsize performance" into rvc-qpr-dev 2021-06-26 02:39:01 +00:00
TreeHugger Robot
b3b4990453 Merge "Improve ellipsize performance" into rvc-dev 2021-06-26 02:38:59 +00:00
Winson
f416e7b485 Remove ParsedIntentInfo CREATOR am: 75214cc510
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080916

Change-Id: I4210bdd97953331cfe9e7cfbe30422fec91a2eac
2021-06-24 21:45:37 +00:00
Bernardo Rufino
14c1c7b4a7 Fix background bypass via notifications
This is a CP of ag/14736230 to qt-dev.

Apps were able to bypass BAL and BG-FGS restrictions by retrieving their
own notifications and firing their PI since those were allowlisted for
those operations.

Now we strip the token that granted them that ability
from notifications returned via NM.getActiveNotifications(), which
returns the notifications of the caller.

Notifications returned via notification listener APIs still contain such
token, as they should.

Bug: 185388103
Bug: 169821287
Test: Manually tested
Change-Id: I2ede0d639a560f6acacec3864a0a7d23af152ba5
Merged-In: I2ede0d639a560f6acacec3864a0a7d23af152ba5
(cherry picked from commit 5fbeff59df)
2021-06-24 18:15:04 +00:00
Winson
75214cc510 Remove ParsedIntentInfo CREATOR
Its existence allows implicit readParcelable calls to invoke a Parcel
operation with mismatched read/write data sizes, allowing someone to
swap out the data on a reparcel.

Internal classes will use writeIntentInfoToParcel, so this is safe to
remove.

Bug: 191055353

Test: atest com.android.server.pm.test.parsing.parcelling

Change-Id: I44faa635faf8a77894a3dda8adf89c10064e53f1
2021-06-23 18:04:15 +00:00
Seigo Nonaka
40d7a4535a Improve ellipsize performance
Instead of iterate all ellipsized characters, only iterate the necessary
ranges for copying.

Bug: 188913943
Test: atest CtsTextTestCases CtsGraphicsTestCases CtsWidgetTestCases
Change-Id: I3d03b1e3897e427c23fbe51315f412c57a4ce9e9
(cherry picked from commit 2c6121f3e3)
2021-06-08 19:37:39 +00:00
Seigo Nonaka
599f1b76fa Improve ellipsize performance
Instead of iterate all ellipsized characters, only iterate the necessary
ranges for copying.

Bug: 188913943
Test: atest CtsTextTestCases CtsGraphicsTestCases CtsWidgetTestCases
Change-Id: I3d03b1e3897e427c23fbe51315f412c57a4ce9e9
(cherry picked from commit 2c6121f3e3)
2021-06-08 19:37:25 +00:00
Seigo Nonaka
5238a7a79b Improve ellipsize performance
Instead of iterate all ellipsized characters, only iterate the necessary
ranges for copying.

Bug: 188913943
Test: atest CtsTextTestCases CtsGraphicsTestCases CtsWidgetTestCases
Change-Id: I3d03b1e3897e427c23fbe51315f412c57a4ce9e9
(cherry picked from commit 2c6121f3e3)
2021-06-08 19:37:07 +00:00
Aemon Cannon
d2317d0fac Merge "Add instrumented app to JAR path (isolated splits)" into qt-qpr1-dev 2021-04-28 22:38:41 +00:00
Christopher Tate
3c507386ca DO NOT MERGE - Disallow deletion of channels with FGS notifications am: 88380a00d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13728411

Change-Id: I5c649a005fb5ad7bd904b64d03488a6be6ff30f7
2021-04-27 21:22:35 +00:00
Jason O'Brien
472e9444ac Add instrumented app to JAR path (isolated splits)
The base APK is loaded during normal execution even when isolated splits
are requested. This preserves that behavior during instrumented tests,
which previously skipped the base APK (causing class loading errors).

Test: tested on device with a trivial automated instrumented test
Bug: 146183755
Change-Id: Ia54072ee91b7c06cb4a787a8954ad2e69b322cac
(cherry picked from commit 6f2978c9fc)
2021-04-19 22:04:25 +00:00
Chris Tate
68a604b920 Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into rvc-dev 2021-04-06 16:23:21 +00:00
Chris Tate
ced44641d9 Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into rvc-qpr-dev 2021-04-06 16:22:21 +00:00