Commit Graph

482884 Commits

Author SHA1 Message Date
TreeHugger Robot
dc2e9bd10f [automerger skipped] Merge "Prevent apps from creating blocked channel groups" into qt-qpr1-dev am: 59300f1715 -s ours
am skip reason: skipped by user juliacr

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

Change-Id: I77e5ec7ed4765d755f9471141def9d6341d65d48
2022-01-20 20:00:12 +00:00
TreeHugger Robot
fc06439710 Merge "Prevent apps from creating blocked channel groups" into rvc-dev 2022-01-20 19:21:42 +00:00
TreeHugger Robot
59300f1715 Merge "Prevent apps from creating blocked channel groups" into qt-qpr1-dev 2022-01-20 18:36:45 +00:00
TreeHugger Robot
9523520806 [automerger skipped] Merge "Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"" into qt-dev am: 13ad919ff5 am: c4ee9df900 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I417eb895fe579b1e92c8eaecc687101cc37a6efc
2022-01-19 22:33:44 +00:00
Wu Ahan
5336a5afbb [automerger skipped] Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: b6509bdc18 am: 14bfa0cbd0 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I59008a3b8e8a0e3ba8a04414cde129cffbd50637
2022-01-19 22:33:24 +00:00
TreeHugger Robot
c4ee9df900 Merge "Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"" into qt-dev am: 13ad919ff5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630308

Change-Id: I1cdf031b38d920645b5877f9fb8195830e8be9a3
2022-01-19 22:14:48 +00:00
Wu Ahan
14bfa0cbd0 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: b6509bdc18
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630308

Change-Id: I27fbeb2579c5c9ff689b5e20593195bd66cb07de
2022-01-19 22:14:40 +00:00
TreeHugger Robot
57095ccbeb Merge "Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"" into rvc-dev 2022-01-19 21:27:12 +00:00
TreeHugger Robot
13ad919ff5 Merge "Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"" into qt-dev 2022-01-19 21:27:05 +00:00
Wu Ahan
cc4fe8984a Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit fa9c73975e.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I567f20b4f545bed906938731c27eac6eb7aeddff
2022-01-13 14:43:00 +00:00
Wu Ahan
b6509bdc18 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit 4d91b5aa0b.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I8691f47251157aae83d326eb808dd1c06b13a420
2022-01-13 14:41:40 +00:00
Julia Reynolds
450617d4fb Prevent apps from creating blocked channel groups
setBlocked is a hidden API, so apps should not be calling
the method, but fix up the data in case they do

Test: PreferencesHelperTest; manual with ApiDemos FGS
Bug: 209966086
Change-Id: Icc709a6b0d0a8c5f2d9243959992f1b6764354db
Merged-In: I8a27853c7ed05d9dfd38a3142fbbe185946c3992
2022-01-13 13:32:57 +00:00
Julia Reynolds
c5b545329f Prevent apps from creating blocked channel groups
setBlocked is a hidden API, so apps should not be calling
the method, but fix up the data in case they do

Test: PreferencesHelperTest; manual with ApiDemos FGS
Bug: 209966086
Change-Id: Icc709a6b0d0a8c5f2d9243959992f1b6764354db
Merged-In: I8a27853c7ed05d9dfd38a3142fbbe185946c3992
2022-01-13 13:32:00 +00:00
TreeHugger Robot
ea90d380e7 Merge "Handle onNullBinding" into rvc-dev 2022-01-12 22:29:12 +00:00
TreeHugger Robot
41a585070d Merge "Check group channels for FGSes" into rvc-dev 2022-01-12 19:04:16 +00:00
TreeHugger Robot
35ff8e4096 [automerger skipped] Merge "Check group channels for FGSes" into qt-qpr1-dev am: 347e74fb87 -s ours
am skip reason: Merged-In I9db781c300e96e9c80bd5d21585b8be9b4db08c8 with SHA-1 331b617949 is already in history

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

Change-Id: I372cc4ca8c88b5129a7bb19ac64447b655742b2d
2022-01-12 16:50:26 +00:00
TreeHugger Robot
347e74fb87 Merge "Check group channels for FGSes" into qt-qpr1-dev 2022-01-12 16:37:07 +00:00
Jeff DeCew
86ec69b6a8 Merge "Prevent a crash when constructing NSSL." into qt-dev am: a9828ff519 am: bba34a3fcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16611809

Change-Id: Ic9c5d7c32bc1dace98e548fe5fea9734855aa72a
2022-01-12 15:31:49 +00:00
Julia Reynolds
6456b622fd Check group channels for FGSes
Before allowing the group to be deleted, by updating
the current check to the method that populates the channel
list

Test: NotificationManagerServiceTest
Bug: 209965481
Change-Id: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
Merged-In: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
2022-01-12 15:16:57 +00:00
Jeff DeCew
bba34a3fcf Merge "Prevent a crash when constructing NSSL." into qt-dev am: a9828ff519
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16611809

Change-Id: If26f91fd0f0e4d566ac056eb9b04513f4452bf67
2022-01-12 15:11:03 +00:00
Jeff DeCew
a9828ff519 Merge "Prevent a crash when constructing NSSL." into qt-dev 2022-01-12 14:58:53 +00:00
Julia Reynolds
138f4633c3 Check group channels for FGSes
Before allowing the group to be deleted, by updating
the current check to the method that populates the channel
list

Test: NotificationManagerServiceTest
Bug: 209965481
Change-Id: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
Merged-In: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
(cherry picked from commit 331b617949)
2022-01-12 14:26:18 +00:00
TreeHugger Robot
06653f3fdf [automerger skipped] Merge "[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity" into qt-dev am: 768bf858bb am: c4dfb0d88c -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ic871969c7969e8a050157defc2d5c4fefee346de
2022-01-12 10:56:32 +00:00
Jeff Chang
ef8a93f667 [automerger skipped] [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity am: cd1f9e72cf am: a9acc6ae3a -s ours
am skip reason: subject contains skip directive

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

Change-Id: I2842f83db267e3f4b1d98bcf6f78048eb8d7befa
2022-01-12 10:56:19 +00:00
TreeHugger Robot
c4dfb0d88c Merge "[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity" into qt-dev am: 768bf858bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16564590

Change-Id: I8a4911d1b7b4c23f79c433d6926302486008f143
2022-01-12 10:38:47 +00:00
Jeff Chang
a9acc6ae3a [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity am: cd1f9e72cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16564590

Change-Id: I92f4fa6032291031c3ab05f4e8518199c5545954
2022-01-12 10:38:33 +00:00
TreeHugger Robot
768bf858bb Merge "[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity" into qt-dev 2022-01-12 10:25:27 +00:00
Songchun Fan
18651732ad [automerger skipped] Merge "Persist destroyed staged sessions until they are cleaned up" into qt-dev am: 30348d5cdc am: ca4faab256 -s ours
am skip reason: Merged-In I4ede6b7a4b5d861e5c73f13884c7aa86cf7633a2 with SHA-1 731bd965fb is already in history

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

Change-Id: I02d6b14b5a55dc54931feb5ec1b08b41dfa95b92
2022-01-12 02:48:38 +00:00
Songchun Fan
793e127159 [automerger skipped] Merge "Don't abandon child sessions (1/n)" into qt-dev am: 5bf4a3f29e -s ours am: a0961661bb -s ours
am skip reason: skipped by user schfan

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

Change-Id: I4c52b159f68e5086d84edeb22080323ac205c96e
2022-01-12 02:48:31 +00:00
Songchun Fan
ca4faab256 Merge "Persist destroyed staged sessions until they are cleaned up" into qt-dev am: 30348d5cdc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16575908

Change-Id: I4b67d39d39b3592139235e3375edf5c408795e79
2022-01-12 02:31:29 +00:00
Songchun Fan
a0961661bb [automerger skipped] Merge "Don't abandon child sessions (1/n)" into qt-dev am: 5bf4a3f29e -s ours
am skip reason: skipped by user schfan

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

Change-Id: Ie9547a891f73ff858f29c144d4c4c55ddd7e4292
2022-01-12 02:31:25 +00:00
Jackal Guo
c9fc96e7b4 Merge "[RESTRICT AUTOMERGE] Fix the inconsistency of protection level" into rvc-dev 2022-01-12 01:32:38 +00:00
Songchun Fan
30348d5cdc Merge "Persist destroyed staged sessions until they are cleaned up" into qt-dev 2022-01-11 23:31:01 +00:00
Songchun Fan
5bf4a3f29e Merge "Don't abandon child sessions (1/n)" into qt-dev 2022-01-11 23:31:01 +00:00
Mohammad Samiul Islam
6151941007 Persist destroyed staged sessions until they are cleaned up
Currently, when we abandon a staged session we mark it as destroyed and
then immediately clean it up. Cleaning up a staged session immediately
causes racing condition with pre-reboot verification.

In order to avoid the racing condition, we want to delay cleanup of
staged session until it is safe to do so. This means, the system will
be carrying around destroyed staged sessions internally.

Since there is now a gap between when a session is destroyed and when it
is cleaned up, the user can reboot in this window. As such, we need to
persist the mDestroyed field of session so that we know session is
destroyed after reboot and act accordingly.

Also, once a session is destroyed, theoretically it doesn't exist.
Carrying it around internally is an implementation details which
shouldn't be exposed externally. As such, we filter out destroyed
sessions before surfacing them to users.

Bug: 145925842
Bug: 67862680
Test: atest PackageInstallerSessionTest
Test: atest StagedInstallTest
Change-Id: I4ede6b7a4b5d861e5c73f13884c7aa86cf7633a2
Merged-In: I4ede6b7a4b5d861e5c73f13884c7aa86cf7633a2
(cherry picked from commit 731bd965fb)
2022-01-11 22:54:46 +00:00
Julia Reynolds
a250ac1cf7 [automerger skipped] Check group channels for FGSes am: 331b617949 -s ours am: d21f306f3e -s ours
am skip reason: skipped by user juliacr

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

Change-Id: Ib98aa8fe63bacea3dad30b7c6a89c6a0a4cc1ae1
2022-01-11 22:11:20 +00:00
Songchun Fan
966fd5d60f Merge "Don't abandon child sessions (1/n)" into rvc-dev 2022-01-11 22:02:01 +00:00
Julia Reynolds
d21f306f3e [automerger skipped] Check group channels for FGSes am: 331b617949 -s ours
am skip reason: skipped by user juliacr

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

Change-Id: I8ff35bac38c3f355f0a6e83ab591e201be2a69a6
2022-01-11 21:58:21 +00:00
Fabian Kozynski
d0e683b8f6 Handle onNullBinding
According to the docs, an onNullBinding requires the service to be
manually unbound.
Test: test apk that return null on onBind
Test: atest ControlsProviderLifecycleManager
Fixes: 212286849

Change-Id: I71a59b875bbf9eb411e6e92ddc5a04a7353a46c4
2022-01-11 18:00:15 +00:00
Jeff DeCew
4ac20f1255 Prevent a crash when constructing NSSL.
The dependent change was validated on qt-dev and rvc-dev, but not explicitly on qt-qpr1-dev.
 - In qt-dev, we didn't have this check that the footer view was initialized, but hasActiveClearableNotifications did not call into the mDynamicPrivacyController (it didn't exist), so there was no initialization-time NPE.
 - In rvc-dev this footer view check existed, so updateFooter never did any work until setFooterView was called, which is strictly after mDynamicPrivacyController is initialized, so there was no crash.
 - In qt-qpr1-dev, mDynamicPrivacyController was added and is checked within updateFooter, but updateFooter didn't have the view check to short circuit before doing that on initialization.

Bug: 193149550
Fixes: 206344625
Test: manually run qt-qpr1-dev with and without fix
Depends-On: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7
Change-Id: If6e99b5fbe3d2a9d9274223c35d23c30f5524229
2022-01-11 15:27:05 +00:00
Julia Reynolds
331b617949 Check group channels for FGSes
Before allowing the group to be deleted, by updating
the current check to the method that populates the channel
list

Test: NotificationManagerServiceTest
Bug: 209965481
Change-Id: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
Merged-In: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
2022-01-10 21:45:07 +00:00
JW Wang
a4ef9e0e00 Don't abandon child sessions (1/n)
It will throw if abandon() is called on a child session.

Bug: 211944991
Bug: 67862680
Test: to be added
Change-Id: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
Merged-In: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
(cherry picked from commit 8b67e7db79)
2022-01-10 20:38:54 +00:00
TreeHugger Robot
e088b3cb5a Merge "[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity" into rvc-dev 2022-01-10 11:08:27 +00:00
Jeff Chang
cd1f9e72cf [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity
Any malicious application could hijack tasks by
android:relinquishTaskIdentity. This vulnerability can perform UI
spoofing or spy on user’s activities.

This CL limit the usage which only allow system and same app to apply
relinquishTaskIdentity

Bug: 185810717
Test: atest IntentTests
      atest ActivityStarterTests
Change-Id: I55fe8938cd9a0dd7c0268e1cfec89d4e95eee049
2022-01-06 17:46:33 +08:00
JW Wang
c685f8b19a Don't abandon child sessions (1/n)
It will throw if abandon() is called on a child session.

Bug: 211944991
Bug: 67862680
Test: to be added
Change-Id: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
Merged-In: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
(cherry picked from commit 8b67e7db79)
2022-01-06 00:57:17 +00:00
Jeff Chang
2844258da4 [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity
Any malicious application could hijack tasks by
android:relinquishTaskIdentity. This vulnerability can perform UI
spoofing or spy on user’s activities.

This CL limit the usage which only allow system and same app to apply
relinquishTaskIdentity

Bug: 185810717
Test: atest IntentTests
      atest ActivityStarterTests
      atest TaskRecordTests
Change-Id: I55fe8938cd9a0dd7c0268e1cfec89d4e95eee049
(cherry picked from commit c668064c04)
2022-01-05 09:56:59 +08:00
Jackal Guo
b5efdf7293 [RESTRICT AUTOMERGE] Fix the inconsistency of protection level
The value may be inconsistent between BasePermission.perm.protection-
Level and BasePermission.getProtectionLevel() within the same object.
Update the perm to fix the inconsistency.

Bug: 209607944
Test: manually using the PoC on the buganizer to ensure the symptom
      no longer exists.
Change-Id: I19d6135f98bee9392d85e56478c42e06cfea8ba5
2021-12-24 12:36:32 +08:00
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