Commit Graph

370861 Commits

Author SHA1 Message Date
John Reck
6edabc0301 Fix a potential thread safety issue in VectorDrawable
Bug: 158839504
Bug: 185178568
Test: speculative
Change-Id: Id9f229f08fe5897dda25441fbaa15c98f8130de9
2021-06-11 17:20:08 +00:00
lucaslin
0f311f7b28 [automerger skipped] Fix the security issue that preloaded apps can get SSID & BSSID am: 0684e7a64a -s ours
am skip reason: Merged-In I12050737291c7fa0ebff4e7411b91f4c6f57a413 with SHA-1 e97d1f5484 is already in history

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

Change-Id: Ia7cfcceb95501f9a0ed99a6c0f9b16f7162ecee5
2021-05-12 18:06:44 +00:00
lucaslin
e97d1f5484 Fix the security issue that preloaded apps can get SSID & BSSID
NetworkMonitor sends "android.net.conn.NETWORK_CONDITIONS_MEASURED"
broadcast with Wifi SSID & BSSID. The receiver of this broadcast
is only required to have "android.permission.ACCESS_NETWORK_CONDITIONS"
permission but not the "android.permission.ACCESS_FINE_LOCATION".
It's incorrect because if the apps want to know the Wifi SSID and
BSSID, they should get the run-time permission with user consent.
Since this broadcast is not used anymore, delete it and the related
code.

Bug: 175213041
Test: atest NetworkStackNextTests NetworkStackTests
Change-Id: I12050737291c7fa0ebff4e7411b91f4c6f57a413
Merged-In: I1b8b6a3f4390adbabf92fb9e48da61c47b08b2ec
Merged-In: I7b43940dc32826c70fa82f471b35bc5cb8394aad
2021-05-12 09:16:38 +00:00
lucaslin
0684e7a64a Fix the security issue that preloaded apps can get SSID & BSSID
NetworkMonitor sends "android.net.conn.NETWORK_CONDITIONS_MEASURED"
broadcast with Wifi SSID & BSSID. The receiver of this broadcast
is only required to have "android.permission.ACCESS_NETWORK_CONDITIONS"
permission but not the "android.permission.ACCESS_FINE_LOCATION".
It's incorrect because if the apps want to know the Wifi SSID and
BSSID, they should get the run-time permission with user consent.
Since this broadcast is not used anymore, delete it and the related
code.

Bug: 175213041
Test: atest NetworkStackNextTests NetworkStackTests
Change-Id: I12050737291c7fa0ebff4e7411b91f4c6f57a413
Merged-In: I12050737291c7fa0ebff4e7411b91f4c6f57a413
Merged-In: I7b43940dc32826c70fa82f471b35bc5cb8394aad
2021-05-12 09:15:37 +00:00
Julia Reynolds
d61aae299c Restrict alarm broadcast
To android only

Test: NotificationManagerTest, NotificationManagerServiceTest
Bug: 175614289
Change-Id: I4f8e56729d90f8f5288d08881129b1c45d5790e7
Merged-In: I4f8e56729d90f8f5288d08881129b1c45d5790e7
(cherry picked from commit abf15b731a)
(cherry picked from commit 4056976f1e)
(cherry picked from commit f1e84b42b1)
2021-04-29 15:30:43 +00:00
Julia Reynolds
d749dc3510 Merge "Restrict alarm broadcast" into oc-mr1-dev am: 3b0fc6bd38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14103469

Change-Id: I2a933b691bfc17ed88f60e21c1083bc947d5b329
2021-04-27 17:24:27 +00:00
Julia Reynolds
3b0fc6bd38 Merge "Restrict alarm broadcast" into oc-mr1-dev 2021-04-27 16:57:51 +00:00
Louis Chang
1c750cd367 [automerger skipped] Detects all activities for whether showing work challenge am: 6820d70823 -s ours
am skip reason: skip tag Change-Id I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21 with SHA-1 fe5e1432cf is already in history

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

Change-Id: I3d9c5b0efa38727c820032f11344b9145206bf28
2021-04-27 05:18:41 +00:00
Louis Chang
fe5e1432cf Detects all activities for whether showing work challenge
Work challenge did not show when a work activity is not on top, but
still visible after screen turns on.

Also show work challenge even if the work activity is behind a top
fullscreen activity of another profile because the user can still
navigate back to the work activity when top activity finishes.

Bug: 177457096
Test: ActivityStackSupervisorTests

Change-Id: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
Merged-In: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
2021-04-19 09:20:04 +00:00
Louis Chang
6820d70823 Detects all activities for whether showing work challenge
Work challenge did not show when a work activity is not on top, but
still visible after screen turns on.

Also show work challenge even if the work activity is behind a top
fullscreen activity of another profile because the user can still
navigate back to the work activity when top activity finishes.

Bug: 177457096
Test: ActivityStackSupervisorTests

Change-Id: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
Merged-In: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
2021-04-19 09:17:19 +00:00
Julia Reynolds
7dfcfe85ae Restrict alarm broadcast
To android only

Test: NotificationManagerTest, NotificationManagerServiceTest
Bug: 175614289
Change-Id: I4f8e56729d90f8f5288d08881129b1c45d5790e7
Merged-In: I4f8e56729d90f8f5288d08881129b1c45d5790e7
(cherry picked from commit abf15b731a)
2021-04-07 20:10:35 +00:00
Beth Thibodeau
d17b979843 Merge "Increase maximum allowed size for status bar icons" into pi-dev 2021-04-06 18:44:57 +00:00
Chris Tate
2bec84a794 [automerger skipped] Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into oc-mr1-dev am: 6cc887c00d -s ours
am skip reason: subject contains skip directive

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

Change-Id: I9bab541f7c0c87385e1c5adb1a6beb5db4eda535
2021-04-06 16:49:29 +00:00
Chris Tate
6cc887c00d Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into oc-mr1-dev 2021-04-06 16:24:22 +00:00
Chris Tate
1735cdeea4 Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into pi-dev 2021-04-06 16:24:06 +00:00
Beth Thibodeau
cc35c516df Increase maximum allowed size for status bar icons am: 8875da5207
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14033398

Change-Id: Iad171ba42818085e0eef2fe98e357a6e0962fcfa
2021-04-02 22:10:51 +00:00
Beth Thibodeau
00b65a2963 Increase maximum allowed size for status bar icons
The previous size was causing some apps to crash which otherwise worked
fine. This more closely matches the hard limit in RecordingCanvas
(which we need to stay below to prevent SystemUI from crashing).

Fixes: 182891864
Fixes: 182232777
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: manual - posting notifications with different drawable sizes
Change-Id: I8deacc651e05a202ec980eeb8bcdf4f92daea8eb
(cherry picked from commit 5cd7976f7d)
2021-04-01 18:16:37 +00:00
Beth Thibodeau
8875da5207 Increase maximum allowed size for status bar icons
The previous size was causing some apps to crash which otherwise worked
fine. This more closely matches the hard limit in RecordingCanvas
(which we need to stay below to prevent SystemUI from crashing).

Fixes: 182891864
Fixes: 182232777
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: manual - posting notifications with different drawable sizes
Change-Id: I8deacc651e05a202ec980eeb8bcdf4f92daea8eb
(cherry picked from commit 5cd7976f7d)
2021-04-01 18:16:31 +00:00
Christopher Tate
b320763eb8 DO NOT MERGE - Disallow deletion of channels with FGS notifications
Bug: 156090809
Test: atest CtsAppTestCases:NotificationManagerTest
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Change-Id: I1c2bb78d86f194585d273661cecf3419f51965df
Merged-In: Ie917a4d1b4595a576c4ea5ea079ecc773000abdc
2021-03-19 04:24:37 +00:00
Christopher Tate
cfd88a8e24 DO NOT MERGE - Disallow deletion of channels with FGS notifications
Bug: 156090809
Test: atest CtsAppTestCases:NotificationManagerTest
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Change-Id: I1c2bb78d86f194585d273661cecf3419f51965df
Merged-In: I1c2bb78d86f194585d273661cecf3419f51965df
2021-03-19 04:24:24 +00:00
yawanng
264dea63b0 Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

Bug: 174661955
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
(cherry picked from commit cca5bf9282)

Change-Id: I630cfd7c3be9bf6f2a6b8e132f6b8dda6b7fa274
2021-03-15 18:46:55 +00:00
Patrick Baumann
8d900812b7 Revert "Adds caller check to getAllPackages()"
This reverts commit f7efdb4222.

Reason for revert: build failure
Bug: 174661955
Change-Id: Ic29331e90176c52a0c562ac119650d0bc0fd9a19
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
2021-03-15 18:46:30 +00:00
TreeHugger Robot
a9aaed5d47 Merge "Limit maximum allowed size for a status bar icon" into oc-mr1-dev am: 7e6da1776d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430253

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9abbc6a4e5e37ac6d3865ed14e7d9f65f06b687
2021-03-03 22:00:34 +00:00
TreeHugger Robot
7e6da1776d Merge "Limit maximum allowed size for a status bar icon" into oc-mr1-dev 2021-03-03 21:05:19 +00:00
Beth Thibodeau
ed7118d8bf Merge "Limit maximum allowed size for a status bar icon" into pi-dev 2021-03-03 19:13:46 +00:00
TreeHugger Robot
38fb80f008 [automerger skipped] Merge "Adds caller check to getAllPackages()" into oc-mr1-dev am: 835ab4eb82 -s ours
am skip reason: Change-Id I77460ae19a4d41151577646441f11e2eddbb741a with SHA-1 f7efdb4222 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibac93e8b843fd351544d3ad66b221b3a68bbe04b
2021-03-03 18:43:06 +00:00
TreeHugger Robot
835ab4eb82 Merge "Adds caller check to getAllPackages()" into oc-mr1-dev 2021-03-03 18:05:52 +00:00
yawanng
cca5bf9282 Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

Bug: 174661955
Change-Id: I77460ae19a4d41151577646441f11e2eddbb741a
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
(cherry picked from commit 8124efd57b)
2021-03-03 16:04:13 +00:00
TreeHugger Robot
d48073491f Merge "[RESTRICT AUTOMERGE] Use userId instead of USER_CURRENT in shouldLockKeyguard." into pi-dev 2021-03-03 11:24:54 +00:00
TreeHugger Robot
c5cd3bcbc1 [automerger skipped] Merge "Add pkg target to snoozing alarm" into oc-mr1-dev am: 119ebe193f -s ours
am skip reason: Change-Id I6aaf80a11dcae2eca41d4647411126ed41587027 with SHA-1 b341523840 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I098760eba9d21ef904632f8097269ca4ec421187
2021-03-03 08:05:52 +00:00
TreeHugger Robot
691b6ca55b Merge "Add pkg target to snoozing alarm" into pi-dev 2021-03-03 03:38:11 +00:00
Julia Reynolds
b341523840 Add pkg target to snoozing alarm
Test: SnoozeHelperTest
Bug: 174493336
Change-Id: I6aaf80a11dcae2eca41d4647411126ed41587027
(cherry picked from commit 6b5813b1f1)
Merged-In: I6aaf80a11dcae2eca41d4647411126ed41587027
2021-03-03 03:35:01 +00:00
TreeHugger Robot
119ebe193f Merge "Add pkg target to snoozing alarm" into oc-mr1-dev 2021-03-03 02:59:18 +00:00
Patrick Baumann
7905a07048 Merge "Adds caller check to getAllPackages()" into pi-dev 2021-03-03 00:24:55 +00:00
Winson Chiu
52e9d8f472 Revert "Only allow BROWSABLE && DEFAULT Intents to be always opened" am: ffe45e4497
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13728024

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1419659d16515aa1bbd63c5834e025c45e77cc09
2021-03-02 06:10:14 +00:00
Winson Chiu
ffe45e4497 Revert "Only allow BROWSABLE && DEFAULT Intents to be always opened"
Reason for revert: Punted to future release due to invalid fix

Bug: 175319005

Merged-In: I00b78d596ee05c5a4a228771bbf8082af2b0ab8a
Change-Id: I78284e0a0dd5c41345753cdd2ed9a518db1df930
2021-03-01 20:50:35 +00:00
yawanng
f7efdb4222 Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

Bug: 174661955
Change-Id: I77460ae19a4d41151577646441f11e2eddbb741a
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
(cherry picked from commit 8124efd57b)
2021-03-01 17:23:58 +00:00
Julia Reynolds
1433925beb Add pkg target to snoozing alarm
Test: SnoozeHelperTest
Bug: 174493336
Change-Id: I6aaf80a11dcae2eca41d4647411126ed41587027
(cherry picked from commit 6b5813b1f1)
Merged-In: I6aaf80a11dcae2eca41d4647411126ed41587027
2021-02-23 17:47:58 +00:00
Jonathan Scott
26a90c2b82 [RESTRICT AUTOMERGE] Use userId instead of USER_CURRENT in shouldLockKeyguard.
USER_CURRENT is not an acceptable input to isSecure(). The test has also
been updated as the use of any() for the mock hid this bug.

Test: atest LockTaskControllerTest
Bug: 176801033
Change-Id: If7b23426c16f97dccbea1ad7fc0b9f1d39612c2d
2021-02-04 14:37:35 +00:00
Miranda Kephart
663162c3b0 [automerger skipped] Merge "[DO NOT MERGE] Close screenshot process on user switched" into oc-mr1-dev am: 84fcb616be -s ours
am skip reason: subject contains skip directive

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6ff9ccd3bc986910f8bc1a75a971fe108a76020f
2021-02-03 15:02:15 +00:00
Miranda Kephart
5a8e9742ed Merge "[DO NOT MERGE] Close screenshot process on user switched" into pi-dev 2021-02-03 14:26:24 +00:00
Miranda Kephart
84fcb616be Merge "[DO NOT MERGE] Close screenshot process on user switched" into oc-mr1-dev 2021-02-03 14:23:55 +00:00
TreeHugger Robot
0847618070 Merge changes from topic "cdm_overlay-oc-mr1-dev" into oc-mr1-dev am: 5382574928
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13180989

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8033d0e1c60c957aa149c052dd1ba653f5449d5d
2021-02-03 01:33:51 +00:00
Eugene Susla
80d043197c [automerger skipped] RESTRICT AUTOMERGE am: 6a5777dd50 -s ours
am skip reason: subject contains skip directive

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia736a9acfe1f91e2a8d86cb8b7221a1472e5195f
2021-02-03 01:33:43 +00:00
TreeHugger Robot
5382574928 Merge changes from topic "cdm_overlay-oc-mr1-dev" into oc-mr1-dev
* changes:
  RESTRICT AUTOMERGE Allow CDM to hide overlays
  RESTRICT AUTOMERGE Prevent non-system overlays from showing over CDM UI
2021-02-03 01:07:11 +00:00
TreeHugger Robot
99e5a28c5b Merge changes from topic "cdm_overlay-pi-dev" into pi-dev
* changes:
  RESTRICT AUTOMERGE Allow CDM to hide overlays
  RESTRICT AUTOMERGE Prevent non-system overlays from showing over CDM UI
2021-02-02 23:03:57 +00:00
Miranda Kephart
8a2656d4b6 [DO NOT MERGE] Close screenshot process on user switched
Currently, we keep the process up even if the user switches,
meaning that in some cases (if the user is switched while the
screenshot UI is up) we will save images to the wrong profile.
This change makes ScreenshotHelper listen for user switches and
close the screenshot service, so that a new screenshot is
guaranteed to be constructed with the correct user's context.

Bug: 170474245
Fix: 170474245
Test: manual -- verified bad state occurs if user switches within
the timeout period, ensured that screenshots work immediately
after switching with this change.

Change-Id: I9d32d0928e6c2bda161d04555438d0dd7afef0ba
(cherry picked from commit 7ef1a5dd15)
2021-01-29 15:03:08 +00:00
TreeHugger Robot
47fb5ee20c Merge "Only allow BROWSABLE && DEFAULT Intents to be always opened" into pi-dev 2021-01-29 01:42:55 +00:00
TreeHugger Robot
df0b2e9939 [automerger skipped] Merge "Only allow BROWSABLE && DEFAULT Intents to be always opened" into oc-mr1-dev am: f4a729180c -s ours
am skip reason: skipped by user chiuwinson

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I679f76f348dfc1d72eb42e3704faa8208409ef0c
2021-01-28 22:53:40 +00:00
Beth Thibodeau
c508aed10f Limit maximum allowed size for a status bar icon
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: verified that app crashes instead of SysUI following repro steps
Change-Id: I66e3bb873841b5babfd522c82cea7bed361fc14c
(cherry picked from commit 4394595deb)
2021-01-28 22:00:46 +00:00