Commit Graph

482821 Commits

Author SHA1 Message Date
Matt Pietal
21e48cf26b [DO NOT MERGE] Keyguard - Treat messsages to lock with priority
When switching users and attempting to lock the device, the sysui main
thread becomes overwhelmed with events, creating a significant lag
between the time a message is posted and processed on the main
thread. This can be dangerous when these events are critical for
security, such as calls coming from PhoneWindowManager#lockNow() that
call KeyguardViewMediator#doKeyguardTimeout(). On older devices with
slower CPUs and less memory, the delay in processing can be
significant (15 - 30s).

The result of not prioritizing these events leads to a window of time
where a guest user can switch back to the owner, and gain access to
the owner's homescreen without needing to unlock the device with the
owner's credentials.

As a mitigation, prioritize two events originating in two specific
methods to make sure the device locks as soon as possible as well as
have the system server preemptively update its local cache.

Bug: 151095871
Test: Very manual race condition - follow steps listed in bug
Change-Id: I7585a0a5eeb308e0e32a4f77f581556d883b5cda
Merged-In: I7585a0a5eeb308e0e32a4f77f581556d883b5cda
(cherry picked from commit 28c53ab8bc)
2022-02-11 20:23:48 +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
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
Jeff DeCew
921d955822 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:48:19 +00:00
TreeHugger Robot
e3d406ab9a [automerger skipped] Merge "Disallow overlays for ResolverActivity" into qt-dev am: f3661fc780 am: d4be365335 -s ours
am skip reason: skipped by user joshtrask

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

Change-Id: I3398972f2772e2a688d391b246bc9b121f7ea204
2021-10-14 22:18:42 +00:00
Songchun Fan
bd25f70623 Revert "Revert "[pm] remove old stage dirs on low storage""
This reverts commit b45ebca772.

Reason for revert: adding the fix for system to abandon sessions

BUG: 67862680
Test: manual
Change-Id: I2b735e4860dce6eb6d5d8ddc158e8b3165910dc7
Merged-In: I91170ba399b3a596320b3bd9c8188912e5c4f1be
2021-10-14 10:40:29 -07:00
Songchun Fan
3e28df68fa Revert "Revert "[pm] remove old stage dirs on low storage""
This reverts commit b45ebca772.

Reason for revert: adding the fix for system to abandon sessions

BUG: 67862680
Test: manual
Change-Id: Ia798eb776eb1d05347514a238a6dd75e7c89e872
Merged-In: I91170ba399b3a596320b3bd9c8188912e5c4f1be
2021-10-14 09:26:28 -07:00
Songchun Fan
c98f06c286 Revert "Revert "[pm] remove old stage dirs on low storage""
This reverts commit b45ebca772.

Reason for revert: adding the fix for system to abandon sessions

BUG: 67862680
Test: manual
Change-Id: I5b762a29d12f62b516a59a85530386236259308b
Merged-In: I91170ba399b3a596320b3bd9c8188912e5c4f1be
2021-10-14 09:12:53 -07:00
Collin Fijalkovich
978809e428 Disallow overlays for ResolverActivity
Prevents non-system apps from placing a window over the app selection
screen.

Bug: 143559931
Test: Installed test app and attempted to overlay
Change-Id: Ied05088a5007e0f10cd3e1abd8d7da8ffeb3b674
Merged-In: Ied05088a5007e0f10cd3e1abd8d7da8ffeb3b674
(cherry picked from commit 34534e1fd2)
2021-10-07 14:24:33 +00:00
TreeHugger Robot
d4be365335 Merge "Disallow overlays for ResolverActivity" into qt-dev am: f3661fc780
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15960137

Change-Id: I9b7a79b6d27be475f72549b3716d8036459b3f31
2021-10-06 21:50:19 +00:00
TreeHugger Robot
f3661fc780 Merge "Disallow overlays for ResolverActivity" into qt-dev 2021-10-06 21:36:18 +00:00
TreeHugger Robot
e3a263bb6d Merge "DO NOT MERGE KeyStore ChunkedStreamer must tolerate update consuming 0 bytes." into rvc-dev 2021-10-06 20:40:50 +00:00
Jeff DeCew
525f35a68a [automerger skipped] Merge "Do not show the notification footer until the user is set up." into qt-dev am: 3bc24e3826 am: 025a668cf9 -s ours
am skip reason: Merged-In I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7 with SHA-1 73c3c0a7d6 is already in history

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

Change-Id: I7042095e29685860e34ca0d3200fe76216d9d184
2021-10-05 17:44:36 +00:00
Jeff DeCew
025a668cf9 Merge "Do not show the notification footer until the user is set up." into qt-dev am: 3bc24e3826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15877960

Change-Id: Id7097c9716292cb6edef1e06fe321b954fcff7ac
2021-10-05 17:32:35 +00:00
Jeff DeCew
3bc24e3826 Merge "Do not show the notification footer until the user is set up." into qt-dev 2021-10-05 17:21:10 +00:00
Jeff DeCew
e124ab6c0f Merge "Do not show the notification footer until the user is set up." into rvc-dev 2021-10-05 14:55:35 +00:00
Collin Fijalkovich
9bd0b2f9d0 Disallow overlays for ResolverActivity
Prevents non-system apps from placing a window over the app selection
screen.

Bug: 143559931
Test: Installed test app and attempted to overlay
Change-Id: Ied05088a5007e0f10cd3e1abd8d7da8ffeb3b674
Merged-In: Ied05088a5007e0f10cd3e1abd8d7da8ffeb3b674
(cherry picked from commit 34534e1fd2)
2021-10-01 19:20:03 +00:00
TreeHugger Robot
97ed8d6385 Merge "Fix serialization bug in GpsNavigationMessage" into rvc-dev 2021-09-30 23:18:51 +00:00
Quang Luong
b1cc7299a8 [automerger skipped] Merge "Fix NPE on getTitle()" into qt-dev am: afee5a7219 am: 72c56e2c88 -s ours
am skip reason: Merged-In I35bf6f5911dc0ee56e43af7faddaceb479362863 with SHA-1 c006ad915a is already in history

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

Change-Id: I26091e9af496ef90116074c93fa0ff79c5f6726f
2021-09-30 15:40:48 +00:00