Commit Graph

483536 Commits

Author SHA1 Message Date
Ioana Alexandru
47e661cbf3 Verify URI permissions for notification shortcutIcon.
Bug: 277593270
Change-Id: I1efaa1301bca36895ad4322a919d7421156a60df
Test: atest NotificationManagerServiceTest
Merged-In: Iaf2a9a82f18e018e60e6cdc020da6ebf7267e8b1
2023-05-10 13:00:31 +00:00
Ioana Alexandru
d402a8dd75 Merge "DO NOT MERGE Revert "Verify URI permissions for notification shortcutIcon."" into rvc-dev 2023-05-10 09:25:50 +00:00
Abhijit Adsule
a31fad611d DO NOT MERGE
Revert "Verify URI permissions for notification shortcutIcon."

This reverts commit 39a131783c.

Reason for revert: breaks build on rvc-dev based builds
rvc-dev based builds do not have ag/13901746

Change-Id: I3a1dadc6f21c39db5432847ca5d57a7d3f6ce2a6
2023-05-10 00:39:56 +00:00
Dmitry Dementyev
5323ecef73 Ignore failing RecoverableKeyStoreManager tests. am: ca24397a4d am: d0ff6dcb61 am: fdde2e60a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23111846

Change-Id: I433b5d30d9911afbd63b3652e1fb8a9f9d1f3f09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 21:12:16 +00:00
Dmitry Dementyev
fdde2e60a2 Ignore failing RecoverableKeyStoreManager tests. am: ca24397a4d am: d0ff6dcb61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23111846

Change-Id: I1efde1d2314c1819fcd2a7db1ba449c9f85c09d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 20:36:15 +00:00
Dmitry Dementyev
d0ff6dcb61 Ignore failing RecoverableKeyStoreManager tests. am: ca24397a4d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23111846

Change-Id: Ic60f72ac520c153c5686e3576b68478bc4d19e5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 19:55:22 +00:00
Dmitry Dementyev
ca24397a4d Ignore failing RecoverableKeyStoreManager tests.
Failure started after certifcicate expiration.

Bug: 281583079
Test: atest com.android.server.locksettings.recoverablekeystore
Change-Id: I9f07182ec92f023ee74d90e861452b6906e6a1b1
2023-05-09 16:25:04 +00:00
Ioana Alexandru
eadfe8b90a Merge "Verify URI permissions for notification shortcutIcon." into rvc-dev 2023-05-09 14:16:49 +00:00
Ioana Alexandru
39a131783c Verify URI permissions for notification shortcutIcon.
Bug: 277593270
Test: atest NotificationManagerServiceTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:041d6d022af1b5968a19b6bc101f3f6643b2a56d)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f2196093cc67eb31ba624f71a6d1fc0c4b7b99fc)
Merged-In: Iaf2a9a82f18e018e60e6cdc020da6ebf7267e8b1
Change-Id: Iaf2a9a82f18e018e60e6cdc020da6ebf7267e8b1
2023-05-08 11:59:09 +00:00
Ioana Alexandru
42635aa4d0 Merge "Visit URIs in landscape/portrait custom remote views." into rvc-dev 2023-05-08 08:44:40 +00:00
Austin Borger
2a509c82ba Merge "ActivityManagerService: Allow openContentUri from vendor/system/product." into rvc-dev 2023-05-05 22:16:43 +00:00
András Kurucz
ab15dd4748 Merge "Truncate ShortcutInfo Id" into rvc-dev 2023-05-04 13:47:04 +00:00
Ioana Alexandru
08a8ba51f0 Merge "Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS." into rvc-dev 2023-05-04 13:19:04 +00:00
András Kurucz
f31df62340 Truncate ShortcutInfo Id
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.
Change-Id: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5
Merged-In: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5
2023-05-03 13:02:30 +00:00
Ioana Alexandru
43e1ae4e0d Visit URIs in landscape/portrait custom remote views.
Bug: 277740848
Test: atest RemoteViewsTest NotificationManagerServiceTest & tested with POC from bug
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e8acb2f660bdb03616989852f9dbbf1726f8237e)
Merged-In: I7d3d35df0ec38945019f71755bed8797b7af4517
Change-Id: I7d3d35df0ec38945019f71755bed8797b7af4517
2023-05-02 17:02:33 +00:00
Ioana Alexandru
63f8ce3efd Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.
Also added the person URIs in the test, since they weren't being
checked.

Test: atest NotificationManagerServiceTest & tested with POC from bug
Bug: 276729064
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e0d8602a0200ba92283463bd54cefcf97394bfa8)
Merged-In: I848545f7aee202495c515f47a32871a2cb6ae707
Change-Id: I848545f7aee202495c515f47a32871a2cb6ae707
2023-05-02 17:01:44 +00:00
Ioana Alexandru
5664378a7c DO NOT MERGE Increase notification channel limit.
This was previously reduced because it can cause an out of memory error or be abused to trigger a permanent denial of service, but it breaks some messages apps in Android 11, as they are creating too many channels. Rolling it back until the apps are fixed to reduce user impact.

Bug: 279447569
Bug: 261723753
Test: N/A, this was previously 50k
Change-Id: Id8da382f812d4abb8db723c40a61366a7402da4f
2023-05-02 10:29:27 +00:00
Austin Borger
821f4c0d8b ActivityManagerService: Allow openContentUri from vendor/system/product.
Apps should not have direct access to this entry point. Check that the
caller is a vendor, system, or product package.

Test: Ran PoC app and CtsMediaPlayerTestCases.
Bug: 236688380
Change-Id: I0335496d28fa5fc3bfe1fecd4be90040b0b3687f
Merged-In: I0335496d28fa5fc3bfe1fecd4be90040b0b3687f
(cherry picked from commit d0ba7467c2)
2023-05-01 19:51:01 +00:00
Aaron Liu
2b3817680a Merge "DO NOT MERGE Dismiss keyguard when simpin auth'd and..." into rvc-dev 2023-04-19 17:30:06 +00:00
Winson Chung
7d8fd7a9e9 Merge "Only allow NEW_TASK flag when adjusting pending intents" into qt-dev am: a082fd92a4 am: a0237b2e83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21327525

Change-Id: Ifef9764db9f05834e98d53e946028ce1b7a54463
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-19 09:00:10 +00:00
Winson Chung
a0237b2e83 Merge "Only allow NEW_TASK flag when adjusting pending intents" into qt-dev am: a082fd92a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21327525

Change-Id: I6815d23a9672f31048a650bb29de39880b698194
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-19 08:19:51 +00:00
Winson Chung
a082fd92a4 Merge "Only allow NEW_TASK flag when adjusting pending intents" into qt-dev 2023-04-19 07:24:18 +00:00
Nate(Qiang) Jiang
07272cfaee Merge "DO NOT MERGE: Limit the ServiceFriendlyNames" into rvc-dev 2023-04-18 17:23:33 +00:00
Aaron Liu
09f0047222 DO NOT MERGE Dismiss keyguard when simpin auth'd and...
security method is none. This is mostly to fix the case where we auth
sim pin in the set up wizard and it goes straight to keyguard instead of
the setup wizard activity.

This works with the prevent bypass keyguard flag because the device
should be noe secure in this case.

Fixes: 222446076
Test: turn locked sim on, which opens the sim pin screen. Auth the
screen and observe that keyguard is not shown.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48fa9bef3451e4a358c941af5b230f99881c5cb6)
Merged-In: Ib2d5400e930fa4d6f7f98e46f32a290ba5f558f4
Change-Id: Ib2d5400e930fa4d6f7f98e46f32a290ba5f558f4
Cherry-picking this CL as a security fix

Bug: 222446076
Change-Id: If4360dd6ae2e5f79b43eaf1a29687ac9cc4b6101
2023-04-14 19:56:13 +00:00
Nate(Qiang) Jiang
23a890a43f Merge "DO NOT MERGE: Add size check on PPS#policy" into rvc-dev 2023-04-14 19:43:49 +00:00
Winson Chung
c62d2e1021 Only allow NEW_TASK flag when adjusting pending intents
Bug: 243794108
Test: atest CtsSecurityBulletinHostTestCases:android.security.cts.CVE_2023_20918
Change-Id: I5d329beecef1902c36704e93d0bc5cb60d0e2f5b
2023-04-14 19:23:04 +00:00
Nate(Qiang) Jiang
d1afd2c47d DO NOT MERGE: Add size check on PPS#policy
Bug: 275340417
Test: atest android.net.wifi
Change-Id: I6e6128b7ed5327da8dbc9186a82bef0f2e4197bb
2023-04-13 21:20:37 +00:00
Nate(Qiang) Jiang
6b1746ab6f DO NOT MERGE: Limit the ServiceFriendlyNames
Bug: 274445194
Test: atest android.net.wifi
Change-Id: Id4e16007531ba1ce3e3f9fa3d3111b5af57751be
2023-04-12 18:43:20 +00:00
TreeHugger Robot
1360ebb441 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-dev 2023-04-06 06:12:02 +00:00
Michael Groover
00f3afecdb Merge "Limit the number of supported v1 and v2 signers" into rvc-dev 2023-04-05 00:38:04 +00:00
Bill Yi
2fe87df11e Import translations. DO NOT MERGE ANYWHERE
BUG:204554636

Auto-generated-cl: translation import
Change-Id: I1720c67e4361d9019b12fa5a510cd34918dfedb4
2023-04-04 11:24:47 -07:00
Michael Groover
6f6ee8a55f Limit the number of supported v1 and v2 signers
The v1 and v2 APK Signature Schemes support multiple signers; this
was intended to allow multiple entities to sign an APK. Previously,
the platform had no limits placed on the number of signers supported
in an APK, but this commit sets a hard limit of 10 supported signers
for these signature schemes to ensure a large number of signers
does not place undue burden on the platform.

Bug: 266580022
Test: Manually verified the platform only allowed an APK with the
       maximum number of supported signers.
Change-Id: I6aa86b615b203cdc69d58a593ccf8f18474ca091
2023-04-03 15:22:44 +00:00
Jeff DeCew
2f02357e1d Merge "[RESTRICT AUTOMERGE] Add BubbleMetadata detection to block FSI" into rvc-dev 2023-03-31 15:01:38 +00:00
Pavel Grafov
b4083e039e Merge "Enforce DevicePolicyManager.setUserControlDisabledPackages in AppStandbyController" into rvc-dev 2023-03-31 14:09:57 +00:00
Julia Reynolds
9fa258770e Merge "Allow filtering of services" into rvc-dev 2023-03-29 15:25:15 +00:00
Julia Reynolds
44dcb8351e Allow filtering of services
Test: ServiceListingTest
Bug: 260570119
Change-Id: Ib4740ba401667de62fa1a33334c2c1fbee25b760
Merged-In: Ib4740ba401667de62fa1a33334c2c1fbee25b760
2023-03-29 13:22:33 +00:00
TreeHugger Robot
36fd98e6b5 [automerger skipped] Merge "Handle invalid data during job loading." into qt-dev am: ba8c9b4f2d am: b59868db83 -s ours
am skip reason: Merged-In Id0ceba345942baf21177f687b8dd85ef001c0a9e with SHA-1 df1ba00dd9 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20026092

Change-Id: Ibacc09f78b4dca469da219441563597a03282ede
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 04:51:28 +00:00
TreeHugger Robot
b59868db83 Merge "Handle invalid data during job loading." into qt-dev am: ba8c9b4f2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20026092

Change-Id: I3cbb3042328108ba2847cffede3f56c73d34290d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 04:24:56 +00:00
TreeHugger Robot
ba8c9b4f2d Merge "Handle invalid data during job loading." into qt-dev 2023-03-29 03:52:02 +00:00
Kweku Adams
a9d54c2d90 Handle invalid data during job loading.
Catch exceptions that may be thrown if invalid data ended up in the
persisted job file.

Bug: 246541702
Bug: 246542132
Bug: 246542285
Bug: 246542330
Test: install test app with invalid job config, start app to schedule job, then reboot device
Change-Id: Id0ceba345942baf21177f687b8dd85ef001c0a9e
(cherry picked from commit c98fb42b48)
Merged-In: Id0ceba345942baf21177f687b8dd85ef001c0a9e
2023-03-28 21:31:12 +00:00
TreeHugger Robot
2ef87719c8 Merge "Handle invalid data during job loading." into rvc-dev 2023-03-28 19:24:54 +00:00
Alex Johnston
552dbbc142 Enforce DevicePolicyManager.setUserControlDisabledPackages in AppStandbyController
When deciding an app's standby bucket, check if the
app has its user control disabled by an IT admin. If so,
the app should be the exempted restricted bucket.

Bug: 272042183
Test: atest AppStandbyControllerTests
Change-Id: I4279dc37f0e17aedb1c2a87468478248443a253e
Merged-In: I4279dc37f0e17aedb1c2a87468478248443a253e
(cherry picked from commit 269fcb6873)
2023-03-28 17:01:14 +00:00
Jeff DeCew
c60e264a55 [RESTRICT AUTOMERGE] Add BubbleMetadata detection to block FSI
Bug: 274759612
Test: atest NotificationInterruptStateProviderImplTest
Change-Id: I40e1aa6377b8a60d91cb2f4189df1e9a4a4578a2
2023-03-28 13:58:19 +00:00
Dmitry Dementyev
c162515bd5 Merge "Check key intent for selectors and prohibited flags" into rvc-dev 2023-03-23 19:51:55 +00:00
TreeHugger Robot
677e9e1181 Merge "[DO NOT MERGE] Prevent RemoteViews crashing SystemUi" into rvc-dev 2023-03-22 18:47:42 +00:00
Jean Chalard
230c7ab574 Merge "Sanitize VPN label to prevent HTML injection" into rvc-dev 2023-03-20 05:22:22 +00:00
Brian Lee
92114886bd Check key intent for selectors and prohibited flags
Bug: 265015796
Test: atest
FrameworksServicesTests: com.android.server.accounts.AccountManagerServiceTest
Change-Id: Ie16f8654337bd75eaad3156817470674b4f0cee3
(cherry picked from commit e53a963043)
Merged-In: Ie16f8654337bd75eaad3156817470674b4f0cee3
2023-03-16 22:49:22 +00:00
Valentin Iftime
cfc0b34432 [DO NOT MERGE] Prevent RemoteViews crashing SystemUi
Catch canvas drawing exceptions caused  by unsuported image sizes.

Test: 1. Post a custom view notification with a layout
	containing an ImageView that references a 5k x 5k image
2. Add an App Widget to the home screen with that has the
	layout mentioned above as preview/initial layout.

Bug: 268193777

Change-Id: Ib3bda769c499b4069b49c566b1b227f98f707a8a
Merged-In: Ib3bda769c499b4069b49c566b1b227f98f707a8a
2023-03-15 18:34:50 +01:00
Valentin Iftime
733089e71c [DO NOT MERGE] Wait for preloading images to complete before inflating notifications
NotificationContentInflater waits on SysUiBg thread for images to load, with a timeout
 of 1000ms.

Test: 1. Build a test app that posts MessagingStyle notifications with a huge image (8k+) set as data Uri.
 2. SystemUi should not ANR
 3. adb logcat | grep NotificationInlineImageCache  - shows timeout/cancellation logs

Bug: 252766417
Bug: 223859644

Change-Id: I341db60223214cf2282b5c0270e343e1ce95fa01
(cherry picked from commit 195043f40e)
Merged-In: I341db60223214cf2282b5c0270e343e1ce95fa01
2023-03-10 10:30:49 +01:00
Lucas Lin
2178216b98 Sanitize VPN label to prevent HTML injection
This commit will try to sanitize the content of VpnDialog. This
commit creates a function which will try to sanitize the VPN
label, if the sanitized VPN label is different from the original
one, which means the VPN label might contain HTML tag or the VPN
label violates the words restriction(may contain some wording
which will mislead the user). For this kind of case, show the
package name instead of the VPN label to prevent misleading the
user.

The malicious VPN app might be able to add a large number of line
breaks with HTML in order to hide the system-displayed text from
the user in the connection request dialog. Thus, sanitizing the
content of the dialog is needed.

Bug: 204554636
Test: N/A
Change-Id: I8eb890fd2e5797d8d6ab5b12f9c628bc9616081d
Merged-In: I8eb890fd2e5797d8d6ab5b12f9c628bc9616081d
2023-03-09 21:14:14 +09:00