Commit Graph

1758 Commits

Author SHA1 Message Date
TreeHugger Robot
3226bed7fd Merge "Introduce SystemAPI MediaProjectionGlobal" 2022-09-16 16:19:23 +00:00
Chavi Weingarten
612711c345 Introduce SystemAPI MediaProjectionGlobal
This API can be used from calls outside applications to create a virtual
display for mirroring. The permission checks in system server are still
in place so the caller must have CAPTURE_VIDEO_OUTPUT permission. This
class is intented to be used by systems that to stream device content,
but not from an application. In most cases, this will be called from
Shell or a system application.

Test: MediaProjectGlobalTest
Bug: 237664947
Change-Id: I43f79c83db7c82c0b682ef174fb1a5ab83795489
2022-09-16 13:13:04 +00:00
Chavi Weingarten
2b7f2aee30 Migrate screen capture code to ScreenCapture file
Test: ScreenshotTests
Bug: 242714168
Change-Id: I8061f1717cc4e293ee07672d6d415c2c36010ccd
2022-09-14 15:35:46 +00:00
Bill Yi
1fc656cd29 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0e54a02266cb2fc303890fe1bf0f95d59344e084
2022-09-03 18:41:00 -07:00
Bill Yi
0dfc0faa35 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I63f98c9af1c05e4f4e7e208a8d679dbb29b521f1
2022-08-25 03:29:02 -07:00
Bill Yi
165338ca71 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I40fb7826128a9388ea4986808d12a4eec66f2c83
2022-07-14 04:28:15 -07:00
Yohei Yukawa
b869c78380 Protect isInputMethodPickerShown() with TEST_INPUT_METHOD permission
IInputMethodManager#isInputMethodPickerShownForTest() was introduced
in Android P (API 28) to verify IME picker visibility in CTS [1].

To make it clear that that IPC method must be available only for
special testing purpose, this CL introduces an @hide permission

   android.permission.TEST_INPUT_METHOD

and requires it in

   InputMethodManagerService#isInputMethodPickerShownForTest().

This CL grants that permission to the shell process hence CTS tests
can still access to the corresponding test API by using
UiAutomation#adoptShellPermissionIdentity().

 [1]: I4e21625c32a0ca1abc740229efb3c7fcd97141cc
      eb5706183f

Bug: 237317525
Test: atest CtsInputMethodTestCases
Test: Manually verified as follows.
 1. adb logcat -b events | grep 237317525
 2. atest CtsInputMethodTestCases:InputMethodManagerTest#testIsInputMethodPickerShownProtection
Ignore-AOSP-First: For a security fix
Change-Id: Ie79a3e9d41ce22605ae083594d639c37d08b7def
2022-07-12 19:03:26 -07:00
Jimmy Chen
318410fe93 Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78 am: a29505af31 am: a6b28ca5eb am: f1223c1738 am: 5a6c0e7802
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Icd950eb147b5b0828dbed889cdf3b4f91a0df85d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 02:08:54 +00:00
Jimmy Chen
a6b28ca5eb Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78 am: a29505af31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Id14c36a6cdfc6b01e97846c38238f14fc231cfe0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:44:21 +00:00
Jimmy Chen
a29505af31 Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Ifc3ffd42afdfdd3c887251484490661a5100b02e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:18:58 +00:00
Jimmy Chen
1bf4072c78 Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" 2022-06-16 00:26:38 +00:00
Jimmy Chen
f46b780f16 p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test
Bug: 230699791
Test: atest android.net.wifi.cts.ConcurrencyTest#testP2pSetWfdInfo
Change-Id: Ic25dc6d7b18bad38863acfd32d839155da28141b
2022-06-08 15:38:18 +08:00
Bill Yi
f93db9d41f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3acfd507af097c2b0924114681b9acd924bdcdcd
2022-06-05 20:14:42 -07:00
Bill Yi
7d7855e502 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I90089bdc5aa6a00be7e69cf324aca3e6f435e954
2022-06-05 18:54:09 -07:00
Neil Fuller
1aa92e3754 Merge "Add a Y2038 check into the time_detector" am: 808b9f1b73
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1994850

Change-Id: I791a25c36760a8828eea27e11c5dfc5bdd9e8d0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 20:56:13 +00:00
Neil Fuller
808b9f1b73 Merge "Add a Y2038 check into the time_detector" 2022-05-10 11:44:09 +00:00
Neil Fuller
2ff5ec1aad Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-10 10:01:58 +00:00
The Android Open Source Project
7d5bd6e8ec Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3985c46e6747989fe41b64ea5f10c4b4281b51d3
2022-05-08 18:59:01 +00:00
Neil Fuller
68d98c0673 Merge "Add a Y2038 check into the time_detector" into tm-dev-plus-aosp am: 4b8d4c830c am: c37cbfd6c4 am: 9ee897724d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18142264

Change-Id: I5e816029c9978d1a313ddba9a2904d8ac9dc79ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 01:26:53 +00:00
Neil Fuller
4b8d4c830c Merge "Add a Y2038 check into the time_detector" into tm-dev-plus-aosp 2022-05-06 16:53:29 +00:00
Treehugger Robot
95671fc41a Merge "Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell" am: 87e124332d am: ea4f257004 am: e0ceb9de72 am: 9fa6409399 am: d28e148bd9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2081684

Change-Id: I2c3d0fe1279cf740ab6e85afeed1df1325472d9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 03:31:58 +00:00
Treehugger Robot
e0ceb9de72 Merge "Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell" am: 87e124332d am: ea4f257004
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2081684

Change-Id: I5f93d5daaaf09eb1d1a257df44bb2781828b734d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 02:19:17 +00:00
Treehugger Robot
ea4f257004 Merge "Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell" am: 87e124332d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2081684

Change-Id: I1cb22ce69e434c15e0324a5526d00478cf0c1850
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 01:51:52 +00:00
Neil Fuller
b1f132b5e6 Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Ignore-AOSP-First: The change will be cherry-picked upstream
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-03 19:19:53 +00:00
Inseob Kim
0052c6c370 Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell
The permission allows a package to create a protected VM with custom
config. It's used by MicrodroidHostTestCases.

Bug: 207769805
Test: atest MicrodroidHostTestCases
Change-Id: If049d26c0ef97695098979c4a36fe1f7f607af5a
2022-05-02 18:05:26 +09:00
TreeHugger Robot
1784612fd8 Merge "Import translations. DO NOT MERGE ANYWHERE" 2022-04-19 00:15:29 +00:00
Seth Moore
bcc8929a4c Add new privileged permission for unique id attestation
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.

Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.

Test: KeyAttestationTest
Bug: 216778747
Ignore-AOSP-First: "do not merge" blocked automerging -- pick to master
Merged-In: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
2022-04-18 09:09:45 -07:00
Bill Yi
12eb6ddc91 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iec8adbec1ebd87f7c399b1c19e6fc0d6603d287c
2022-04-17 14:46:03 +00:00
Bill Yi
bd7eaef677 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I232cdb37bf848c6ed44309d4b1e1eeec4d8c1e36
2022-04-17 06:40:31 +00:00
TreeHugger Robot
addff7a70d Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-04-14 17:09:15 +00:00
TreeHugger Robot
10938e1a16 Merge "Import translations. DO NOT MERGE ANYWHERE" 2022-04-14 17:04:31 +00:00
TreeHugger Robot
9dac2d8576 Merge "Make READ_NEARBY_STREAMING_POLICY adoptable by shell for CTS tests" into tm-dev am: c0fc0ae2c7 am: cbfd0d3f77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17729989

Change-Id: Ifcecaf6223dde8bb0d0feecc199a495e2d5bd140
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 16:44:48 +00:00
TreeHugger Robot
cbfd0d3f77 Merge "Make READ_NEARBY_STREAMING_POLICY adoptable by shell for CTS tests" into tm-dev am: c0fc0ae2c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17729989

Change-Id: I82e9d47a968f2753ebb1bd40ef2cc2f4a325258a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 16:20:51 +00:00
Iris Yang
d24c070acb Make READ_NEARBY_STREAMING_POLICY adoptable by shell for CTS tests
Bug: 217224856
Test: atest android.devicepolicy.cts.NearbyAppStreamingPolicyTest && atest android.devicepolicy.cts.NearbyNotificationStreamingPolicyTest
Ignore-AOSP-First: This new permission is part of a T-targeting feature
Change-Id: I303549d4f9fcf639da3d4981a8887c3ba55434fc
2022-04-14 21:52:23 +08:00
Bill Yi
deb0fd8dd9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I77c8751189db1858372676f1b54c8d47760c8beb
2022-04-13 06:51:51 +00:00
Bill Yi
ef08e0be7f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic1c041e225768216da2261ae15fa381bd576dc3b
2022-04-13 06:50:44 +00:00
Bill Yi
003091784b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I370200ba81f3d27e10a8a27249cc6cd744e0f3e3
2022-04-13 06:49:42 +00:00
Seth Moore
d60f9898e4 Merge "Add new privileged permission for unique id attestation" am: d690893b54
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2049992

Change-Id: I572f6e3573f054ef20dc01d0d9190eb5e2d23435
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 13:00:04 +00:00
Seth Moore
d690893b54 Merge "Add new privileged permission for unique id attestation" 2022-04-06 12:40:27 +00:00
Seth Moore
d18fe9e3ce Add new privileged permission for unique id attestation
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.

Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.

Test: KeyAttestationTest
Bug: 216778747
Merged-In: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
2022-04-05 13:56:27 -07:00
Peiyong Lin
67263ff42c Merge "Allow Shell to have permission for CTS." into tm-dev am: a2df99e5eb am: 41013feae6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17508836

Change-Id: I9f4c39e6c56dd16de728306758db6e0050142b4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 02:49:53 +00:00
Peiyong Lin
a2df99e5eb Merge "Allow Shell to have permission for CTS." into tm-dev 2022-04-05 02:23:55 +00:00
Neil Fuller
aff1739e5d Merge "Add Shell permission to support manual testing" am: a2b92f89ec am: 40bb89325f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2047905

Change-Id: Id865b55300c2128d42a8296fc6d6cd0a812d17dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 15:45:31 +00:00
TreeHugger Robot
98a91b9feb Merge "Add Shell permission to support manual testing" into tm-dev am: 8bc8d1b1fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17505025

Change-Id: I739c01cbd5343e407953169500e5653d77abe011
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 21:56:01 +00:00
Peiyong Lin
7479cbc372 Allow Shell to have permission for CTS.
Add ACCESS_FPS_COUNTER to Shell in order to run CTS properly.

Ignore-AOSP-First: permission doesn't exist in AOSP yet.
Bug: b/220029298
Test: atest TaskFpsCallbackCtsTest
Test: atest TaskFpsCallbackCtsTest --instant
Change-Id: Ica37bafff368f4a0027f9549de6a31ce3254c986
2022-03-30 17:17:50 +00:00
Neil Fuller
fddc4e2741 Add Shell permission to support manual testing
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.

Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.

Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Merged-In: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
2022-03-30 13:28:57 +00:00
Neil Fuller
c55590c810 Add Shell permission to support manual testing
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.

Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.

Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Ignore-AOSP-First: Merge conflict, AOSP cherry-pick will land after
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
2022-03-30 13:28:01 +00:00
Antoan Angelov
3537456763 Merge "Add ACCESS_PDB_STATE to shell permissions" into tm-dev am: 1fdf546865
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17473103

Change-Id: I7718a8f64aca2a4678d49ef0f944446081e62b41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 13:22:09 +00:00
arangelov
556bc1a363 Add ACCESS_PDB_STATE to shell permissions
This is needed for CtsPersistentDataBlockManagerTestCases

Bug: 220030410
Test: none
Change-Id: I8d3e75caa1eece052d5495fc06c8beb3ca76b480
2022-03-29 18:17:11 +00:00
Seth Moore
14e9f41072 Merge "DO NOT MERGE Add new privileged permission for unique id attestation" into tm-dev 2022-03-29 15:04:06 +00:00