Commit Graph

648968 Commits

Author SHA1 Message Date
Jeff Chang
d5fed4ae64 [automerger skipped] [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity am: 2c87a8a7ce am: a04ffe4326 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I169a506597dcc765e89cd224facedab1c16dbf75
2022-02-09 22:21:42 +00:00
Hui Yu
d16913a2bd [automerger skipped] Merge "BG-FGS-start while-in-use permission restriction improvement." into rvc-dev am: fc6fe37018 am: 3505ebb5f9 -s ours
am skip reason: skipped by user huiyu

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

Change-Id: I2bec32f7dcc4efa8f06f877cf308294f9ac2c495
2022-02-09 22:21:03 +00:00
TreeHugger Robot
7d43598fdf Merge "Security fixes for PendingIntent related apis in LauncherApps" into sc-dev 2022-02-09 17:53:50 +00:00
Jeff Chang
a04ffe4326 [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity am: 2c87a8a7ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16743363

Change-Id: Ifdf47e595d507cd8d67bb968b1234a5d11d2b387
2022-02-09 17:51:46 +00:00
Hui Yu
3505ebb5f9 Merge "BG-FGS-start while-in-use permission restriction improvement." into rvc-dev am: fc6fe37018
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16804648

Bug: 183147114
Change-Id: I0f8fb6de7a994f67061d57cb8b9bf89a271bb45d
2022-02-09 17:40:16 +00:00
TreeHugger Robot
5cf8597a1f Merge "[RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity" into sc-dev 2022-02-09 08:54:25 +00:00
Hui Yu
fc6fe37018 Merge "BG-FGS-start while-in-use permission restriction improvement." into rvc-dev 2022-02-09 06:29:23 +00:00
Pinyao Ting
e41e04bb8c Security fixes for PendingIntent related apis in LauncherApps
Allowing arbitrary activityOptions during the creation of PendingIntent
is a source of security vulnerability. This CL removes activityOptions
from the call-site.

Bug: 209607104
Test: manual
Change-Id: Id262b9a0de58d8834c85d925cf84bb44b8b99742
Merged-In: Id262b9a0de58d8834c85d925cf84bb44b8b99742
2022-02-09 03:12:10 +00:00
Bill Yi
f67b906f06 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-02-08 19:37:27 +00:00
Bill Yi
149512df23 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-02-08 19:36:33 +00:00
Bill Yi
038a340e67 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-02-08 19:34:03 +00:00
Vishnu Nair
799f0a7f66 Merge changes from topic "toast-security-fix-sc-dev" into sc-dev
* changes:
  Drop input for toast and child surfaces
  SurfaceControl: Add setDropInputMode api
2022-02-07 23:22:22 +00:00
TreeHugger Robot
537621f528 Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into rvc-dev am: e9a8a931b2 am: dd43d7b82b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16612525

Change-Id: I98538899f24aba6230a253bee690bb3c594882e9
2022-02-07 22:07:48 +00:00
TreeHugger Robot
dd43d7b82b Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into rvc-dev am: e9a8a931b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16612525

Change-Id: Ib68e11539aef9e9f002a3ed9ae62b0aae409cbc3
2022-02-07 21:54:46 +00:00
TreeHugger Robot
e9a8a931b2 Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into rvc-dev 2022-02-07 21:39:58 +00:00
TreeHugger Robot
f4c5343867 Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into sc-dev 2022-02-07 21:39:47 +00:00
TreeHugger Robot
6b223ea532 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-02-07 20:44:30 +00:00
TreeHugger Robot
eae3010a35 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-02-07 20:33:24 +00:00
Hui Yu
d5abccff3c BG-FGS-start while-in-use permission restriction improvement.
[This is a resbumit, previous fix ag/I0aca484e5a0dd051bbeac379d30b0fb4ecfa2da0
was reverted because the incorrect resetFgsRestrictionLocked() call]

Foreground service started from background shall not have while-in-use
access like location/camera/microphone.

Previously we set mAllowWhileInUsePermissionInFgs only at service start
by startService() or bindService() command. But after
service start, the Service.startForeground() call may be some time later
and at that time the caller may not be in the foreground any more. This
CL will add further restriction on that.

1. If the first Service.startForeground() call is more than 10 seconds (can be
configured by DeviceConfig key "fgs_start_foreground_timeout") after the
Context.startService() call, check the service's app proc state and set
mAllowWhileInUsePermissionInFgs again.
2. At Service.stopForeground() call, mAllowWhileInUsePermissionInFgs
should be reset to false so FGS while-in-use permission is not allowed.
3. After Context.startForegroundService()(or Context.startService()) ->
Service.startForeground() -> Service.stopForeground(), the second or
more times Service.startForeground() is called, check the service's
app proc state and set mAllowWhileInUsePermissionInFgs again.

This CL is the backport of ag/Idc88f274c7a323d175d65bb47eca041772ae9bb7 from
S branch.

Bug: 183147114
Bug: 183204439
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testStartForegroundTimeout
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testSecondStartForeground
Change-Id: Ie8712b8efe85aa8a6769b811c85a29c4013e58b9
Merged-In: Idc88f274c7a323d175d65bb47eca041772ae9bb7
2022-02-07 19:32:42 +00:00
Bill Yi
d77e32da00 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idea2deab56a5b9ae1e75870c63a3759a7020c226
2022-02-05 21:39:26 +00:00
Bill Yi
e4994c652f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib989febdc6f9740f7c5ddaaceee544f2fff1ef28
2022-02-05 21:15:20 +00:00
Bill Yi
51db0dd6bb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I57d6e90543148332e4a26e22d42e16edf5bf474d
2022-02-05 20:32:42 +00:00
Bill Yi
5415c5f7cf Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5db8f20068107f64644a6280224f5d3f3f16a6c2
2022-02-05 18:51:27 +00:00
Bill Yi
52a6ad7ca0 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I96610ce042ef7be842ade5093dccacceb1af065f
2022-02-05 17:29:09 +00:00
Ganesh Olekar
45312b8382 Merge "Validate pid can be trusted" into sc-dev 2022-02-05 03:56:26 +00:00
Vishnu Nair
6ac8376cd7 Drop input for toast and child surfaces
Toasts that do not have the trustedOverlay flag should not receive input.
These windows should not have any children, so force this hierarchy of
windows to drop all input by setting a flag on the toast window state
which will apply the DROP_INPUT flag on all windows with an input
channel. This is to prevent malicious apps from parenting surfaces with
input channels to the toast window.

Test: show toast and check if input feature flag DROP_INPUT id set via dumpsys
Bug: b/197296414

Merged-In: I316b76b685ca5030fd8aa91283555efcce4d6994
Change-Id: I316b76b685ca5030fd8aa91283555efcce4d6994
2022-02-04 02:14:42 +00:00
Vishnu Nair
a84612483f SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Note: this backport doesn't include the oclude mode since its not
needed for the security fix.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug: 197296414


Merged-In: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2022-02-02 16:50:46 +00:00
John Reck
6a0f27d52f Merge "Fix a mismatch in Bitmap_createFromParcel" into sc-dev 2022-01-28 18:07:35 +00:00
Jeff Chang
2c87a8a7ce [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity
A malicious application could overlay the activity. The overlay is
able to be tapped through, which can trick the user into starting a
harmful activity.

The CL added the flag SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS for
the activity to prevent the tapjacking/overlay attack.

Bug: 205595291
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: Ia1a1ae0dc451e04bf5c31e3cb8cf30a0d8e32991
(cherry picked from commit a04b3666b8)
2022-01-28 03:49:51 +00:00
Jeff Chang
9c5c42ad03 [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity
A malicious application could overlay the activity. The overlay is
able to be tapped through, which can trick the user into starting a
harmful activity.

The CL added the flag SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS for
the activity to prevent the tapjacking/overlay attack.

Bug: 205595291
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: Ia1a1ae0dc451e04bf5c31e3cb8cf30a0d8e32991
(cherry picked from commit a04b3666b8)
2022-01-28 03:19:44 +00:00
TreeHugger Robot
a9a177e057 Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev 2022-01-27 18:10:53 +00:00
TreeHugger Robot
928dda40af Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-01-27 11:40:41 +00:00
TreeHugger Robot
4a3fbd5851 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-01-27 05:41:32 +00:00
TreeHugger Robot
0a0426bd40 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-01-27 05:36:41 +00:00
TreeHugger Robot
efbb02e704 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-01-27 04:37:35 +00:00
TreeHugger Robot
871aa4262f Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2022-01-27 04:17:11 +00:00
Bill Yi
d6e4af674a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4cd2ce2344aee5a19e8e7501fcd6cb21ca8bb149
2022-01-26 04:03:35 +00:00
Bill Yi
50c9554ebc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I98d4c08281c06d64a7b56dfb293e5d893217fb18
2022-01-26 03:29:04 +00:00
Bill Yi
9829ca31f5 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4733fa551b5568e9f803b95bbb1d24cb2e3a846b
2022-01-26 02:27:17 +00:00
Bill Yi
438f56d10c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I620ca9fbac119bd636370a1d345c240da5ef249c
2022-01-26 01:33:45 +00:00
Bill Yi
e82ce9fd51 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I07319b2c87d92491dfaef0388bdc3f4003ddddce
2022-01-26 01:28:39 +00:00
Bill Yi
939c3bf6af Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4c0bbe1d5ca0279ff7f2a21aff2f4ccbd759005d
2022-01-26 00:12:08 +00:00
Jackal Guo
7172238add Move CtsContentTestCases to group presubmit-large
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Fix: 215431363
Fix: 215549069
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
Merged-In: Id9769bbc625b42257af603d69098ae69c0fabb80
(cherry picked from commit ccc91c4fa9)
2022-01-24 23:45:31 +08:00
Julia Reynolds
6dcb9e28be [automerger skipped] Merge "DO NOT MERGE Prevent apps from creating blocked channel groups" into qt-dev am: f1dc5b1ee1 am: 960d42c069 -s ours am: 2675838e1b -s ours am: f4e13e6e6a -s ours
am skip reason: subject contains skip directive

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

Change-Id: I70f0417df9c78a338a29beaa1464dafaa81eedcc
2022-01-21 04:19:03 +00:00
Julia Reynolds
a4845db3d8 [automerger skipped] DO NOT MERGE Prevent apps from creating blocked channel groups am: b993531c0d am: d761dbd934 -s ours am: 8b386cd940 -s ours am: 882759b36e -s ours
am skip reason: subject contains skip directive

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

Change-Id: I17e2c06a447043aef20ec03b84fade524a7666b3
2022-01-21 04:01:04 +00:00
Julia Reynolds
b9894cc610 [automerger skipped] Merge "DO NOT MERGE Prevent apps from creating blocked channel groups" into qt-dev am: f1dc5b1ee1 am: 960d42c069 -s ours am: 2675838e1b -s ours am: 09a1321d8d -s ours
am skip reason: subject contains skip directive

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

Change-Id: I0490ee1542c7005e20f8cf35a02223902c9cdb2f
2022-01-21 03:49:04 +00:00
Julia Reynolds
a51336f4e6 [automerger skipped] DO NOT MERGE Prevent apps from creating blocked channel groups am: b993531c0d am: d761dbd934 -s ours am: 8b386cd940 -s ours am: 222443606d -s ours
am skip reason: subject contains skip directive

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

Change-Id: I55234fe5f425adf3510cc92b17bdc49fe6b23c41
2022-01-21 03:48:44 +00:00
Julia Reynolds
f4e13e6e6a [automerger skipped] Merge "DO NOT MERGE Prevent apps from creating blocked channel groups" into qt-dev am: f1dc5b1ee1 am: 960d42c069 -s ours am: 2675838e1b -s ours
am skip reason: subject contains skip directive

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

Change-Id: I5e1696741554a2877099f3a9ee03247cb10cad11
2022-01-21 03:31:26 +00:00
Julia Reynolds
882759b36e [automerger skipped] DO NOT MERGE Prevent apps from creating blocked channel groups am: b993531c0d am: d761dbd934 -s ours am: 8b386cd940 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I811632ecec014b78a366604b0b6700ae34ad9955
2022-01-21 03:31:24 +00:00
Julia Reynolds
09a1321d8d [automerger skipped] Merge "DO NOT MERGE Prevent apps from creating blocked channel groups" into qt-dev am: f1dc5b1ee1 am: 960d42c069 -s ours am: 2675838e1b -s ours
am skip reason: subject contains skip directive

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

Change-Id: I9a6597ab4b8bbda62b7c9b18bc58c8153e218ee7
2022-01-21 03:30:42 +00:00