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
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
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
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
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)
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
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
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
This is a second attempt at fixing the issue, the previous CL
ag/20642213 was reverted because it simply throws an exception when the
limit is reached, which causes apps to crash since chat apps tends to be
sending large amount of conversation shortcuts and they have no way to
know how many of these shortcuts are still cached by the system.
Instead of throwing an exception, this CL simply removes excessive
shortcuts to avoid crashes. Currently there is a limit on the number
of shortcuts an app can publish in respect to each launcher activity.
This CL further implements a global maximum of total number of shortcuts
that can be retained for an app to mitigate from any potential system
health issue.
When the global maximum is reached, ShortcutService will proactively
removes shortcuts from system memory. Cached shortcuts are removed
first, followed by dynamic shortcuts, using last updated time as
tie-breaker.
This CL additionally addresses an unexpected flow where re-publishing
previously removed shortcuts that are still retained by the system could
cause the total number of shortcuts to exceed previously set limit.
Bug: 250576066 233155034
Test: manual
Change-Id: I001c7a87b62aefa9487bf8efaf3cd02d7cb21521
Merged-In: I001c7a87b62aefa9487bf8efaf3cd02d7cb21521
The 'InputWindowInfo.isTrustedOverlay' function had been removed, we
have to indicate the trustedOverlay flag when fill input info to overlay
window.
Bug: 161789401
Bug: 158717144
Test: atest WindowInputTests
Change-Id: Idf17fd64c6a1399d04c51e3f0bd600dc4a84239a
Merged-In: Idf17fd64c6a1399d04c51e3f0bd600dc4a84239a
This is a backport of ag/20581190 and includes the fix in ag/20778075.
Note that on this branch, clearData doesn't seem to actually clear persistent storage.
Bug: 258422365
Test: atest NotificationManagerServiceTest SnoozeHelperTest
Change-Id: If7c7db6694330ffbac551d044efadb26219fe17f
Merged-In: I5a2823f10053ea8c83c612a567d6d4f1b6af23e7
Merged-In: Ie809cb4d648a40622618e0fb374f36b6d8dc972a
Merged-In: If7c7db6694330ffbac551d044efadb26219fe17f
Block touches from passing through activities by adding a dedicated
surface that consumes all touches that would otherwise pass through the
bounds availble to the Activity.
+ Keep displayId in sync for ActivityRecord
Bug: 194480991
Test: atest CtsWindowManagerDeviceTestCases:ActivityRecordInputSinkTests
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests
Test: Used "System > Developer Options > Simulate secondary display" to
test that moving activites between displays work as intended.
Change-Id: Idace4104c2708ce99309fa54fd44dd000e7f8894
- include disable accounts when looking up accounts for a package to
check if the limit is reached (10)
- put a new limit of 10 supported schemes
- put a new limit of 256 characters per scheme
- put a new limit of 256 characters per address
- ensure the Icon can write to memory w/o throwing an exception
bug: 259064622
bug: 256819769
Test: cts + unit
Change-Id: Ia7d8d00d9de0fb6694ded6a80c40bd55d7fdf7a7
Merged-In: Ia7d8d00d9de0fb6694ded6a80c40bd55d7fdf7a7
This is to prevent malicious app entering PiP without being visible
first, like blocking onResume from completion. Which in turn
leaves the PiP window in limbo and non-interactable.
Bug: 265293293
Test: atest PinnedStackTests
Change-Id: I458a9508662e72a1adb9d9818105f2e9d7096d44
* Previously, the height returned by Display#getSize was used to
determine visible objects. Based on the API level and the presence of system decorations (e.g. notches), this can cause objects near the
bottom of the screen to be considered out of bounds (i.e. only objects
within y=0 and y=partial_height are considered even if the omitted
decorations are at the top of the screen). cherry pick from aosp/2384832
Bug: 236669488
Test: manual
Merged-In: Iba21245c947cec0d0054f6d86e3585ba73233223
Change-Id: I50f143528d1f5a5b677eb2628efbcd658f4cc1b0
(cherry picked from commit afebeb7b43)
- If too large when parsing service XMLs then skip this service.
- If too large when a service attempts to update its own info
then throw an error.
Bug: 261589597
Test: atest AccessibilityServiceInfoTest
Change-Id: Iffc0cd48cc713f7904d68059e141cb7de5a4b906
Merged-In: Iffc0cd48cc713f7904d68059e141cb7de5a4b906