Commit Graph

482837 Commits

Author SHA1 Message Date
Siarhei Vishniakou
cccf19150f Add ALLOW_SLIPPERY_TOUCHES permission
This permission allows the app to use FLAG_SLIPPERY. This means, windows
of the app that has this permission can let touches slip out when the
finger moves out of the window bounds.

Bug: 157929241
Bug: 206188649
Test: atest FlagSlipperyTest
Change-Id: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
Merged-In: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
2021-12-21 18:05:01 +00:00
Tomasz Wasilczyk
b5fa0a6c5e Don't crash if default supervision profile owner is not set
Bug: 175430552
Bug: 197399948
Test: build, flash, watch logcat

Change-Id: If441946fa278c04ae88122f6243f5a7dedd96ebc
Merged-In: If441946fa278c04ae88122f6243f5a7dedd96ebc
(cherry picked from commit bd27c36591)
(cherry picked from commit bcb5ee6f43)
2021-12-14 19:18:47 +00:00
Remi NGUYEN VAN
d994d146c2 Merge "Disable the test (1/n)" into rvc-dev 2021-12-10 01:47:56 +00:00
Ganesh Olekar
5b0fc9279c Merge "DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without Parcel private APIs." into rvc-dev 2021-12-09 17:06:48 +00:00
Matt Pietal
2cc3ce9885 Merge "[DO NOT MERGE] Controls - Do not recreate intent" into rvc-dev 2021-12-09 13:23:41 +00:00
Wu Ahan
712a05c34b [automerger skipped] DO NOT MERGE: Decode the input of both setStream and setResource calls first am: c2188d60ee -s ours am: 5e154e8d5b -s ours am: c47c8f1b83 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Icba229be82049ac6a10f78cff97d966b4b18da71
2021-12-09 01:59:36 +00:00
Wu Ahan
87bdfa2e73 [automerger skipped] DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 4d91b5aa0b am: 6910c87745 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ia159ef8e86ed8a11d9801ad7161c1fdc8400e864
2021-12-09 01:59:15 +00:00
Wu Ahan
c47c8f1b83 [automerger skipped] DO NOT MERGE: Decode the input of both setStream and setResource calls first am: c2188d60ee -s ours am: 5e154e8d5b -s ours
am skip reason: subject contains skip directive

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

Change-Id: I3e4cd98ac92190a74919f8c164716c813126e87a
2021-12-09 01:51:31 +00:00
Wu Ahan
5e154e8d5b [automerger skipped] DO NOT MERGE: Decode the input of both setStream and setResource calls first am: c2188d60ee -s ours
am skip reason: subject contains skip directive

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

Change-Id: I1c6e013a08bd36dd068fbea081c8d2c675b1499b
2021-12-09 01:44:37 +00:00
Wu Ahan
6910c87745 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 4d91b5aa0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379915

Change-Id: Id96d35b0fe3a31764221a584faed10dd8780f849
2021-12-09 01:43:00 +00:00
Hai Zhang
562f1bd91f DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without
Parcel private APIs.

Bug:197228210
Test: atest CtsSecurityTestCases:android.security.cts.AndroidFutureTest
(cherry picked from I577da5a3bc4ed537123b7eceaa5addf8f7bb0d92 and
Icc5ce702f0cd84e9136dee3c65f63619df697358)

Change-Id: I1d488c475f2f7af835a67496535cecdd6987c0cf
2021-12-07 18:14:35 +00:00
Wu Ahan
c2188d60ee 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:17:59 +00:00
Wu Ahan
4d91b5aa0b 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:16:20 +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
JW Wang
a9ee99be7a Disable the test (1/n)
Disable the test because it is blocking pre-submit.

The analysis is at b/159569441#comment2. Waiting for the NetworkStack
team to figure out what's going wrong.

Bug: 159569441
Test: m
Merged-In: Ibb921b8e718c5c9cd86c5580010cb163125d8fae
(cherry picked from commit 50aa93d6af)

Change-Id: Ie6365bdbf94710afc50fbfcb0bcff5ed622184b9
2021-12-02 11:01:08 +00:00
Sam Saccone
c9bc394198 Update tools/ OWNERS to valid owners and remove noparent rule to allow for parent owners in cases where needed.
BUG=208667308

Change-Id: I74a607219f546d18127954bf961771394e4553ab
Merged-In: I74a607219f546d18127954bf961771394e4553ab
(cherry picked from commit 0fab999056bba21599928a64691e80c267c9641a)
2021-12-01 20:25:51 +00:00
Dave Mankoff
66460c8ff4 [automerger skipped] RESTRICT AUTOMERGE Remove line of code that was mistakently left in. am: d7097b817b am: f6e612d73e -s ours
am skip reason: subject contains skip directive

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

Change-Id: I9c28325d581bb00c94226d960e47903185002d5c
2021-11-17 23:00:23 +00:00
Dave Mankoff
f6e612d73e RESTRICT AUTOMERGE Remove line of code that was mistakently left in. am: d7097b817b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16264332

Change-Id: I8a869e7e01eeb501bff3d270a85d90612f0bb53d
2021-11-17 22:45:25 +00:00
Dave Mankoff
d7097b817b RESTRICT AUTOMERGE Remove line of code that was mistakently left in.
This line was removed in O, S, & P, but somehow survived in the Q and R branches.

Bug: 193444889
Merged-In: I56589865427b10e2eab68e1ed2e7c290572a9edc
Change-Id: I56589865427b10e2eab68e1ed2e7c290572a9edc
2021-11-17 19:21:07 +00:00
Dave Mankoff
1b13bc873c RESTRICT AUTOMERGE Remove line of code that was mistakently left in.
This line was removed in O, S, & P, but somehow survived in the Q and R branches.

Bug: 193444889

Merged-In: I56589865427b10e2eab68e1ed2e7c290572a9edc
Change-Id: I56589865427b10e2eab68e1ed2e7c290572a9edc
2021-11-17 19:20:48 +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
Siarhei Vishniakou
07e7aaff29 Only allow trusted overlays to specify FLAG_SLIPPERY
For all other requests, drop this flag.

Test: atest FlagSlipperyTest
Bug: 157929241
Change-Id: Ia30f1c38d5ddb351c90b748ea76448a76a9dde7b
Merged-In: Ia30f1c38d5ddb351c90b748ea76448a76a9dde7b
2021-11-10 06:49:04 +00:00
TreeHugger Robot
bb3f22df9a Merge "Mark screen decorations as trusted overlays" into rvc-dev 2021-11-10 02:18:17 +00:00
Winson Chung
58c437f18c Merge changes from topic "trusted_overlay_backport" into rvc-dev
* changes:
  DO NOT MERGE: Revert "Map TYPE_TRUSTED_APPLICATION_OVERLAY to system window type for A11y"
  Add mechanism for a task's windows to be trusted overlays
  Change InputWindowInfo::isTrustedOverlay() to be permission and flag based
2021-11-09 23:03:14 +00:00
Siarhei Vishniakou
620ee47b2a Mark screen decorations as trusted overlays
These decorations set flag_slippery, to cover the unlikely event of user
tapping a screen decor and then not able to send this touch gesture to
the neighboring window.

Bug: 157929241
Test: `adb shell dumpsys input` and make sure that ScreenDecorOverlay
and ScreeDecorOverlayBottom have FLAG_SLIPPERY

Change-Id: Ib276764edcf1acffe94e3db7397fd23aaaa5dbaa
Merged-In: Ib276764edcf1acffe94e3db7397fd23aaaa5dbaa
(cherry picked from commit 8eca1d5615)
2021-11-09 17:35:14 +00:00
Dmitry Dementyev
c56d34c225 Merge "Force-set a ClipData to prevent later migration." into pi-dev am: d5c2fb380a am: 8e8fbc8927 am: d446e110b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16094504

Change-Id: I005854d66ac71e56cee1af1026fdc0d2d5d01c2a
2021-11-09 15:34:12 +00:00
Dmitry Dementyev
d446e110b6 Merge "Force-set a ClipData to prevent later migration." into pi-dev am: d5c2fb380a am: 8e8fbc8927
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16094504

Change-Id: Ic19f454deaa9ef8bb9a176c1879fc2570dd5d5ac
2021-11-09 15:06:14 +00:00
Dmitry Dementyev
8e8fbc8927 Merge "Force-set a ClipData to prevent later migration." into pi-dev am: d5c2fb380a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16094504

Change-Id: I0d01e8325beae6a69b88a38887863b222be01b95
2021-11-09 14:52:24 +00:00
Dmitry Dementyev
d5c2fb380a Merge "Force-set a ClipData to prevent later migration." into pi-dev 2021-11-09 14:24:20 +00:00
Winson Chung
0cf0d420e1 DO NOT MERGE: Revert "Map TYPE_TRUSTED_APPLICATION_OVERLAY to system window type for A11y"
This reverts commit 4ec7b5c3fb.

Bug: 196389741
Test: Ensure PIP windows are trusted overlays

Change-Id: I49477ffd489ecbc969ab9b9310c2344ab03280e8
2021-11-05 21:15:54 +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
200306a728 [automerger skipped] Merge "Allow forcing status bar state changes and do so when the screen turns off." into qt-qpr1-dev am: cc70d98ee4 -s ours
am skip reason: Merged-In I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3 with SHA-1 921d955822 is already in history

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

Change-Id: I7d108cc3b66769d0507a15a30539082cab1a711b
2021-11-04 19:19:57 +00:00
TreeHugger Robot
cc70d98ee4 Merge "Allow forcing status bar state changes and do so when the screen turns off." into qt-qpr1-dev 2021-11-04 18:49:34 +00:00
TreeHugger Robot
9af49ac0df [automerger skipped] Merge "Allow forcing status bar state changes and do so when the screen turns off." into qt-dev am: 7efe303e96 -s ours am: 8687963e7a -s ours
am skip reason: skipped by user jeffdq

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

Change-Id: I9639d5aa30d1ce36097cf94ec682c322977b7eb0
2021-11-04 15:59:05 +00:00
TreeHugger Robot
8687963e7a [automerger skipped] Merge "Allow forcing status bar state changes and do so when the screen turns off." into qt-dev am: 7efe303e96 -s ours
am skip reason: skipped by user jeffdq

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

Change-Id: Ie806300f59f18b0cc87a001ce229a963ed1d6a3a
2021-11-04 15:40:57 +00:00
Jeff DeCew
55fc4a9788 Allow forcing status bar state changes and do so when the screen turns off.
This adds a force flag, which we will use when turning the screen off to make sure that all UI components are reset to the SHADE state regardless.

Bug: 189575031
Test: make a call; lock screen; pull down shade
Merged-In: I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3
Change-Id: I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3
(cherry picked from commit 921d955822)
2021-11-04 15:40:30 +00:00
TreeHugger Robot
907512b03f [automerger skipped] Merge "Revert "Revert "[pm] remove old stage dirs on low storage""" into qt-dev am: 1023ace074 -s ours am: 267120cdec -s ours
am skip reason: skipped by user schfan

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

Change-Id: I7da1f0793b7a3925c4e407ed29e8b74db367b1ea
2021-11-04 15:22:25 +00:00
TreeHugger Robot
267120cdec [automerger skipped] Merge "Revert "Revert "[pm] remove old stage dirs on low storage""" into qt-dev am: 1023ace074 -s ours
am skip reason: skipped by user schfan

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

Change-Id: I674bf4ab0dcdef8facc89b664c13046f29367a41
2021-11-04 14:52:37 +00:00
TreeHugger Robot
7efe303e96 Merge "Allow forcing status bar state changes and do so when the screen turns off." into qt-dev 2021-11-04 02:51:52 +00:00
TreeHugger Robot
1023ace074 Merge "Revert "Revert "[pm] remove old stage dirs on low storage""" into qt-dev 2021-11-04 01:09:30 +00:00
TreeHugger Robot
6e7841799c Merge "Allow forcing status bar state changes and do so when the screen turns off." into rvc-dev 2021-11-04 01:01:59 +00:00
Songchun Fan
3de41d665a [automerger skipped] Revert "Revert "[pm] remove old stage dirs on low storage"" am: bd25f70623 -s ours am: 40ef8ac08d -s ours am: db7163c1e2 -s ours
am skip reason: skipped by user schfan

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

Change-Id: Ie4f56d7e8c1f404bf9f9b0ab0b5573979d3da5ae
2021-11-04 00:37:27 +00:00
Songchun Fan
db7163c1e2 [automerger skipped] Revert "Revert "[pm] remove old stage dirs on low storage"" am: bd25f70623 -s ours am: 40ef8ac08d -s ours
am skip reason: skipped by user schfan

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

Change-Id: Ib6d2854be4f6abf2a87ff18d58c11d88ee704127
2021-11-04 00:19:29 +00:00
Songchun Fan
40ef8ac08d [automerger skipped] Revert "Revert "[pm] remove old stage dirs on low storage"" am: bd25f70623 -s ours
am skip reason: skipped by user schfan

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

Change-Id: I284ba2ba12f8533a890e757189edb36399582c1d
2021-11-04 00:03:00 +00:00
TreeHugger Robot
abe4e3849b Merge "Revert "Revert "[pm] remove old stage dirs on low storage""" into rvc-dev 2021-11-03 23:19:52 +00:00
Jeff Sharkey
3cf2b04986 Force-set a ClipData to prevent later migration.
migrateExtraStreamToClipData() will only offer to promote Uri values
if a ClipData isn't already defined, so we ensure that a ClipData
value is always defined.  This blocks later promotion and granting.

Bug: 200683077
Bug: 123700107
Test: manual
Change-Id: I99c1411e8b4eb01eb27ac4306e3bf6cc88cb4273
(cherry picked from commit 6ebf410b81)
2021-11-03 19:53:42 +00:00
Matt Pietal
d7b16dd2a5 [DO NOT MERGE] Controls - Do not recreate intent
Recreating the control's intent in SystemUI can be exploited to launch
Intent's with SystemUI's privileges, rather than what is limited to
the application. Use the fillInIntent parameter to supply additional
parameters to the application.

Bug: 193445603
Test: Follow directions in bug to retest
Change-Id: Ib2b0342af85679c0514fb4d88530376b58e6e12a
Merged-In: 
(cherry picked from commit 0e120a5d4f)
2021-10-28 13:59:41 +00:00
Jeff DeCew
9be6207510 Allow forcing status bar state changes and do so when the screen turns off.
This adds a force flag, which we will use when turning the screen off to make sure that all UI components are reset to the SHADE state regardless.

Bug: 189575031
Test: make a call; lock screen; pull down shade
Merged-In: I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3
Change-Id: I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3
2021-10-21 19:54:57 +00:00