Commit Graph

1129 Commits

Author SHA1 Message Date
Treehugger Robot
3a0640daea Merge "Add MANAGE_SENSOR_PRIVACY to shell permissions" 2021-01-15 18:30:12 +00:00
Shashwat Razdan
751ea3c10e Add new MANAGE_SMARTSPACE permission for the cts test
Bug: 176851064
Test: cts test runs only with this CL
Change-Id: I6466bd3871ff3ad0e5178451d18bacf52be0f491
2021-01-14 20:23:00 +00:00
Evan Severson
dc4bf14bf7 Add MANAGE_SENSOR_PRIVACY to shell permissions
Test: test shell commands
Bug: 162549680
Change-Id: I8a56b70c928b7ddd3904c2e9533578b531d81757
Merged-In: I8a56b70c928b7ddd3904c2e9533578b531d81757
2021-01-13 16:32:20 -08:00
Treehugger Robot
945be59043 Merge "Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission" 2021-01-08 12:00:36 +00:00
Rhed Jao
2042ea04aa Merge "Fix missing fields when parceling the BugreportInfo" 2021-01-07 12:05:46 +00:00
Rhed Jao
fe41c8a0ce Fix missing fields when parceling the BugreportInfo
Shell app exception resulted from two missing fields in BugreportInfo
when it's parceling. Application ran into the duplicate logic to send
notification and start foreground service then caused the exception.

Bug: 176624074
Test: Request a bugreport; kill the com.android.shell; \
      tap the share notification
Change-Id: Ia80f5e77f5486addf9ea7822f566c3fd7d75f42a
2021-01-07 14:19:18 +08:00
Quang Luong
c7dfd602ee Merge "Add wifi coex permissions to Shell for CTS tests" 2021-01-06 19:08:24 +00:00
Rhed Jao
9ca3672319 Merge changes I5e1802c5,I4542568f,I99a052d7,Iae89206d,Ie955266a
* changes:
  Returns immediately if the bugreport file already exists
  Fixes an error handling in BugreportProgressService
  Fixes BugreportReceiverTest failed
  Fix BugreportReceiverTest
  Do not buzzing for each progress of bugreport notification
2021-01-06 10:41:13 +00:00
Etan Cohen
ddb4902597 Grant shell permissions for Airplane Mode to Shell to support CTS
New permission is needed to allow CTS to trigger the new WiFi subsystem
restart API.

Bug: 175084231
Test: atest android.net.wifi.cts.WifiManagerTest#testRestartWifiSubsystem
Change-Id: Id844fb799c61f65580e686d1da7ec38a62dd01d0
2021-01-02 22:34:50 -08:00
Rhed Jao
7cb78fdf34 Returns immediately if the bugreport file already exists
There's a case that BugreportProgressService is invoked twice quickly,
and both services create the same bugreport file name. The later one
may delete current running bugreport file in its clean function,
when it detects another bugreport is running.

Bug: 174314124
Bug: 175287931
Test: atest BugreportReceiverTest
Change-Id: I5e1802c5912f4414f1ad3b8bdaf7c7420332b9d6
Merged-In: I5e1802c5912f4414f1ad3b8bdaf7c7420332b9d6
2020-12-21 04:20:03 +00:00
Rhed Jao
39b6acbb55 Fixes an error handling in BugreportProgressService
Calls onError function when bugreport is finished and file is empty.

Bug: 174314124
Bug: 175287931
Test: atest BugreportReceiverTest
Change-Id: I4542568fd2d2ad1c75c7c3b223accca4995938a3
Merged-In: I4542568fd2d2ad1c75c7c3b223accca4995938a3
2020-12-21 04:19:52 +00:00
Rhed Jao
e9a2038f8a Fixes BugreportReceiverTest failed
Instead of sending INTENT_BUGREPORT_REQUESTED, invoke
BugreportRequestedReceiver instance directly.

Bug: 174832302
Bug: 175287931
Test: atest BugreportReceiverTest
Change-Id: I99a052d74b71d503a655a769064a74246da150e5
Merged-In: I99a052d74b71d503a655a769064a74246da150e5
2020-12-21 04:19:44 +00:00
Rhed Jao
2150ce56db Fix BugreportReceiverTest
- Implements a local binder and #onBind in the service to return the
  service instance.
- Mocks BugreportManager in the service to avoid service interacting
  with the dumpstate.
- Fixes dialog name field did not disable after service is finished.
- Fixes screenshot did not remove if the name is empty.
- Extends screenshot delay timeout in tests.
- Fine tune the UiBot to fit new bugreport notification.
- Removes obsolete cases in the tests.

Bug: 143130523
Bug: 175287931
Test: atest BugreportReceiverTest
Change-Id: Iae89206da1d08a10891503869bbbf1ce18d4e31f
Merged-In: Iae89206da1d08a10891503869bbbf1ce18d4e31f
2020-12-21 04:19:36 +00:00
Rhed Jao
52e7d23f53 Do not buzzing for each progress of bugreport notification
Only alert bugreport notification at the begining and end.

Bug: 146135200
Bug: 175287931
Test: Manually changing the notification settings to default
      from silent.
Change-Id: Ie955266ad8a7a27a9dc74743e276b5e9c7a2d6fb
Merged-In: Ie955266ad8a7a27a9dc74743e276b5e9c7a2d6fb
2020-12-21 04:18:18 +00:00
Quang Luong
7597d0839c Add wifi coex permissions to Shell for CTS tests
Bug: 153651001
Test: CTS tests pass
Change-Id: I7c73bba692ade59731c1881b12f026e3a41891ca
2020-12-18 12:16:17 -08:00
Colin Cross
6601d43a23 Revert "Add coex permissions to Shell for CTS tests"
This reverts commit 9f956ccf41.

Reason for revert: b/175198007

Change-Id: Ie35dca0500734ff35781c7344dcc70953f29d174
2020-12-18 12:10:34 -08:00
Quang Luong
9f956ccf41 Add coex permissions to Shell for CTS tests
Bug: 153651001
Test: CTS tests pass
Change-Id: I697171d98a9c381e609638d926907c49572e0919
2020-12-17 02:53:29 +00:00
Treehugger Robot
63340382e0 Merge "Grant HDMI_CEC permission to Shell" 2020-12-16 14:59:53 +00:00
Kholoud Mohamed
0a11a92c0d Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission
CTS tests will now need to call some provisioning
APIs that require MANAGE_PROFILE_AND_DEVICE_OWNERS,
this was previously avoided because CTS tests were
starting Managed Proviosing using a hacky way
to provision devices, we are now getting rid of this
as it was causing a lot of flakines. This is
part of bigger a plan to improve our testing
infrastructure.

Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Bug: 175392542
Change-Id: Id2e2f98f1d3785e45d8b94569bf9b30ae8c9f808
2020-12-15 15:50:07 +00:00
Hyunyoung Song
243b768b24 Merge "Add new MANAGE_SEARCH_UI permission for the cts test" 2020-12-14 23:31:00 +00:00
Gavin Corkery
d45d533b6e Merge "Replace broadcast with adding a method in BugreportCallback" 2020-12-14 18:55:55 +00:00
Hyunyoung Song
547b770d43 Add new MANAGE_SEARCH_UI permission for the cts test
Bug: 162234997
Test: cts test runs only with this CL
Change-Id: I42b3456fc655851c052115b888617213be629c61
2020-12-14 08:47:37 -08:00
Marvin Ramin
d6c4631862 Grant HDMI_CEC permission to Shell
Needed for HDMI_CEC CTS tests to call HdmiControlManager.

Bug: 169914520
Test: atest CtsHdmiCecHostTestCases with changes to tests
Change-Id: Ia997f3910ab4ca3a149b2cbd3b1d3d7e9f7202f2
Merged-In: Ia997f3910ab4ca3a149b2cbd3b1d3d7e9f7202f2
2020-12-09 17:02:56 +01:00
Nick Moukhine
a7d6351972 Merge "Allow shell to invoke music recognition api" 2020-12-07 16:15:31 +00:00
Nick Moukhine
a06b55ee9e Allow shell to invoke music recognition api
Needed to allow MusicRecognitionManagerTest in cts to exercise the api.

Bug: 158194857
Test: patched and verified on internal master
Change-Id: Ia1b250de28c492c4058c7dd8f6573a0f0a178505
2020-12-07 10:04:32 +01:00
Bill Yi
506e8d1697 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Id2c26adb70f2403ba0dfa3a0065be715825f9446
2020-12-05 23:36:10 +00:00
Paul Chang
00dff9634c Replace broadcast with adding a method in BugreportCallback
BUG: 154298410
Test: BetterBug can work normally in bug report shortcut flow
Change-Id: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
Merged-In: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
(cherry picked from commit ec91d7700d)
2020-11-23 12:55:46 +00:00
Ioana Stefan
2ad02a383b Add permission for protecting UI tracing
The new permission will protect the UI traces, allowing only wanted
development tools to start the tracing. At the moment, the permission is
planned to be used for WindowManager and InputMethod traces.

Bug: 172444310
Test: N/A
Change-Id: Ibdeb38dc9a066cb8ed2904adcdac29014b166526
2020-11-19 11:59:50 +00:00
Gavin Corkery
8fafabfed1 Merge changes from topic "bugreporting-aosp-sync"
* changes:
  Fix consent timed out to sharing bugreport data
  Add BugreportManagerTestCases to bugreport presubmit
  Enable bug report tests in pre/postsubmit
  Run bugreport unit test without script
2020-10-21 11:48:11 +00:00
Bill Yi
db3f7703bb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1420e9937d8d303da1f1abbb8ff37da74275bea1
2020-10-05 06:27:38 -07:00
Neil Fuller
770f5ab2db Add a new permission in AOSP
This adds a new permission in AOSP, so it can be referenced by the Shell
command, which presubmit suggests has to be maintained in AOSP.

Bug: 159891384
Test: build only
Exempt-From-Owner-Approval: jsharkey@ approved but it appears to have reset...?
Change-Id: Ic7d403e20731e9d6bd82d5b2e2758cc61989cc59
2020-09-30 08:39:25 +00:00
Dieter Hsu
6765448386 Enable bug report tests in pre/postsubmit
Bug: 155604488
Test: atest --test-mapping --dry-run \
          services/core/java/com/android/server/os:presubmit
Test: atest --test-mapping --dry-run core/java/android/os:presubmit
Change-Id: I054d05d4fa8ff02f1c404d0883c382a2d5911f88
Merged-In: I054d05d4fa8ff02f1c404d0883c382a2d5911f88
(cherry picked from commit 848113e595)
2020-09-29 18:54:32 +01:00
Treehugger Robot
986e49df72 Merge "Update language to comply with Android's inclusive language guidance" 2020-09-28 14:11:49 +00:00
Marin Shalamanov
7fb5deb779 Merge "Add permission to override display mode requests" 2020-09-21 12:23:13 +00:00
Marin Shalamanov
8f2f6d1465 Add permission to override display mode requests
This permission will be used for testing purposes
to override the display mode requests in DisplayModeDirector.

Bug: 159113268
Bug: 158316271
Test: m
Change-Id: Ibcafc50badcda929c3c3b446b6d0d9045c2a5b6d
Merged-In: I257636ae2a6ed74044e71e49a99024682c3a92c5
2020-09-21 14:04:48 +02:00
Bill Yi
5b49c68d11 Merge mainline-release 6664920 to master - DO NOT MERGE
Merged-In: Id04ea331831e8b26ba99478848392b40a92548d5
Change-Id: I888da0c9475f2d00602d917d2f58169f8d7c93a4
2020-09-17 21:56:59 -07:00
Sergey Nikolaienkov
ec82033d3e Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
2020-09-09 07:23:52 +00:00
Sergey Nikolaienkov
104d2f92b3 Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" 2020-09-09 07:09:11 +00:00
Bill Yi
7ffaf9920b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie97ecf1dd2063063851b827c19f7d17c27e7a158
2020-09-04 21:58:37 +00:00
Bill Yi
1a29d74066 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9bf56140e3ab788a4765fc80c4125f90796727a5
2020-09-03 04:54:48 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Nikolas Havrikov
0179047fef Add GET_INTENT_SENDER_INTENT permission to Shell
This is needed for a CTS test for picture-in-picture on TV.

As per go/privapp-permission:
1. This is the exact permission that guards specifically the
`PendingIntent::getIntent` method which is used in the test.

2. Two alternatives were considered:
a) Create another permisison and `@hide` it. However, this offers no
security benefit at the cost of maintenance overhead.
b) Do not create the test in the first place.

Bug: 153435517
Test: atest CtsSystemUiTestCases:PipNotificationTests
Change-Id: I04a5c82334a676351828fb82f2ac5886c888a0bc
2020-08-17 09:51:26 +00:00
Alice Kuo
5c75720453 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

 #inclusivefixit

Bug: 162536543
Change-Id: I468147a439c1a60488def7db3e44bfc361bddbe4
2020-08-03 15:42:39 +00:00
Treehugger Robot
a5a04bbb4e Merge "Adding LOADER_USAGE_STATS permission to shell" 2020-07-23 22:45:36 +00:00
Nikolas Havrikov
74941c20ed Make Shell require permission for a new CTS test
The permission RESET_APP_ERRORS is required for UnsupportedErrorDialogTests

Bug: 159443507
Test: built locally
Change-Id: I4d110278eb48799caf29f0582536a4dca10f10c1
2020-07-08 12:09:27 +00:00
Joshua Duong
265b25bfe4 Merge changes from topic "adbwifi-cts" into rvc-dev am: 5ab3aa0c7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000446

Change-Id: I7e0ecc743d2e831f208865df3604c5f7a3fa8820
2020-06-30 00:57:47 +00:00
Joshua Duong
b47d1e6100 Merge changes from topic "adbwifi-cts" into rvc-dev am: 5ab3aa0c7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000446

Change-Id: I27c6493f075ace2e9c12f9b7f359f42ccbb1406f
2020-06-30 00:57:37 +00:00
Joshua Duong
f2e03b393f Add shell permissions for CTS test (AdbManagerTest).
Bug: 159936209

Test: atest CtsAdbManagerTests
Change-Id: I896b53df582cceb7d1b0d6694d00064b0fb57b94
2020-06-25 15:03:19 -07:00
Nathan Harold
5a9fc5947c Merge "Allow Background Location Access for Shell" into rvc-dev am: 811cf5d8f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914608

Change-Id: I1c21b4ac3d5c019047e50252df4e6e07def4add2
2020-06-19 19:05:37 +00:00
Nathan Harold
c1197612dd Merge "Allow Background Location Access for Shell" into rvc-dev am: 811cf5d8f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914608

Change-Id: Ic22846e6f3337b2ebe7a6448829616a8a29056b3
2020-06-19 19:05:29 +00:00