Commit Graph

1052 Commits

Author SHA1 Message Date
Agatha Man
39ba8c9cc3 Add CAR_DRIVING_STATE and CAR_CONTROL_AUDIO_VOLUME permissions to run
ATS tests

AtsCarHostTestCases and AtsCarDeviceApp requires CAR_DRIVING_STATE.
AtsDeviceInfo and AtsAudioDeviceTestCases requires
CAR_CONTROL_AUDIO_VOLUME.

Bug: 161193447
Test: m -j && run ats tests
Change-Id: Ib16c6c5e54b489479c872cfa826b055262b797bb
2020-07-17 17:48:36 +00:00
Joshua Duong
b497b40119 Merge changes from topic "adbwifi-cts" into rvc-dev am: 5ab3aa0c7b am: af1f67ebd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000446

Change-Id: I56de8c996bccc8c926547afdc322c36d381f557b
2020-06-30 01:09:39 +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
f543091ab8 Merge "Allow Background Location Access for Shell" into rvc-dev am: 811cf5d8f5 am: 86013d505f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914608

Change-Id: Id715cf6426d157e3fc1bd036dead615afb3832e3
2020-06-19 19:17:05 +00:00
Nathan Harold
89796d4936 Allow Background Location Access for Shell
The shell has COARSE and FINE permission, but it
needs background access to support CTS test cases
that must be run with elevated permissions from
the shell.

Bug: 159236070
Test: atest PhoneStateListenerTest#testBarringInfo

Change-Id: Iba3fcb3a43c5df3c30dadf6b7733eaee03d1d0e3
2020-06-19 09:03:29 -07:00
Bill Yi
0edbd7bf02 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I4ee30f50c8fc9ad7a9884eb5403a070f2ca40be0
2020-06-14 01:24:36 +00:00
Rhed Jao
c83e455d98 Merge "Enable scrolling for bugreport info dialog" into rvc-dev am: fbc9630c3f am: 6f373ac372
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11745981

Change-Id: I7bfc66263fc73ce733191162e896589b636b07f9
2020-06-05 10:50:09 +00:00
Rhed Jao
fbc9630c3f Merge "Enable scrolling for bugreport info dialog" into rvc-dev 2020-06-05 10:23:59 +00:00
Rhed Jao
de2109b178 Enable scrolling for bugreport info dialog
Bug: 156291300
Test: Scrolls the dialog with largest display and font size.
Change-Id: Ic1c101612fb8cc0c281d96b62fee3f9309e6a66f
2020-06-05 14:20:41 +08:00
TreeHugger Robot
c1baf5783b Merge "Adding LOADER_USAGE_STATS permission to shell" into rvc-dev am: dfdac64a90 am: ebededcbf3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11725939

Change-Id: Icdd02ee90667b3a7bdb86822a4a06f42fd2f2d60
2020-06-05 01:57:14 +00:00
Dimuthu Gamage
a2b2226d6b Adding LOADER_USAGE_STATS permission to shell
This is expected to be used with adoptShellPermission in the Incremental CTS tests.

Test: atest android.content.pm.cts.PackageManagerShellCommandTest
(There will be future tests relying on this)

Bug: 158024822
Change-Id: I4f146337429679edddba698aa88bb9b2cb883ab9
2020-06-04 23:43:47 +00:00
Sung Min Lee
101eaed95a Merge "Add CAPTURE_AUDIO_OUTPUT permission required for GTS test" into rvc-dev am: 5bafce8420 am: 0bb87d4503
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11712625

Change-Id: I76e69b9f5123fdd72e416c5be4b2d3469d84807a
2020-06-04 01:36:12 +00:00
Sung Min Lee
a90b1fcaca Add CAPTURE_AUDIO_OUTPUT permission required for GTS test
GtsDialerAudioTestCases require this privileged permission for testing in GTS.

Bug: 157243201
Test: run gts -m GtsDialerAudioTestCases
Change-Id: I32516e5dcf966b05cfb8ab4956a0cdb183298f2a
2020-06-02 21:24:59 -07:00
TreeHugger Robot
c117c453bd Merge "Add LOCATION_HARDWARE permission to shell." into rvc-dev am: 8a6ef8e52d am: 2a9258b974
Change-Id: I32438339b2c0bd2aa2f5674ccf2ca4e31a59d1a8
2020-05-28 21:51:43 +00:00
Wei Wang
96f7636149 Add LOCATION_HARDWARE permission to shell.
A few location System APIs require LOCATION_HARDWARE permssion. Adding
this permission to shell so CTS tests can adopt this permission.

Bug:154347471

Test: atest PrivilegedLocationPermissionTest
Change-Id: I4abe4dc044ec4a3ab62352cc0f4a1726bebac633
2020-05-27 17:53:31 -07:00
TreeHugger Robot
1c4bcda424 Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev am: f49fa1a9ea am: b7e62faf05
Change-Id: I0759509548df5394233a23a1904c61de490c3eff
2020-05-27 04:59:31 +00:00
TreeHugger Robot
f49fa1a9ea Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev 2020-05-27 04:39:45 +00:00
Robin Lee
a08021a958 Merge "Take interactive bugreports on Android TV" into rvc-dev am: 1d22ea4eca am: ddf65460e4
Change-Id: Ifc03e176cc83bfb5220fbf094007e6430a2795ca
2020-05-22 10:35:40 +00:00
Robin Lee
1d22ea4eca Merge "Take interactive bugreports on Android TV" into rvc-dev 2020-05-22 09:58:53 +00:00
Robin Lee
93059d2f0b Take interactive bugreports on Android TV
We want to take a screenshot immediately, not after dumpsys finished.
This also gives the user some feedback that we took a screenshot when
they were paying attention, whereas the notification might go under
the radar if posted the 30-90 seconds later it will be shown
otherwise.

Also gives us the progress notification in the Android TV notification
tray, which helps the user keep track of what is going on and how long
it is expected to take.

Previously either no feedback was shown at all on key press, or a simple
Toast was shown on selecting the bugreport option from the TV Settings
app.

Test: Press DPAD_CENTER + BACK, observe screenshot and progress.
Fix: 151865303
Change-Id: I78753697a7867042d28364a6b6d61fdb96f8bc96
2020-05-21 20:19:03 +00:00
TreeHugger Robot
3f953bb49b Merge "Revert "Add a null home activity to Shell.apk"" into rvc-dev am: 6351c72746 am: e3d4b1b779
Change-Id: I370dcf83265a815fbc46351fefbbb79d651e924c
2020-05-18 23:39:53 +00:00
TreeHugger Robot
6351c72746 Merge "Revert "Add a null home activity to Shell.apk"" into rvc-dev 2020-05-18 17:28:46 +00:00
TreeHugger Robot
c86a144dd0 Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-05-15 20:09:36 +00:00
Bill Yi
197c8d4e8f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I2df45fec7fcb399134f93a57adc889d392bfcf15
2020-05-15 11:43:52 +00:00
Amy Zhang
5f8498bcf1 Add support for TvInputManager.acquireTvInputHardware CTS
1. Add a test api in TvInputManager to add hardware device for testing
2. Add Shell permission for TV_INPUT_HARDWARE
3. Add TUNER_RESOURCE_ACCESS permission for TvInput Framework.

Test: atest android.media.tv.cts
Bug: 155114656
Change-Id: I227f13cbf14532d8732729412ae9c2518755ef02
2020-05-14 17:37:52 -07:00
TreeHugger Robot
38420cca4d Merge "Add day-night-mode permission to Shell." into rvc-dev am: 021ceaecf2 am: f3ae8b5bd1
Change-Id: I63a4afc458a4f6f3d711be4b83589284d96a727c
2020-05-13 19:55:39 +00:00
TreeHugger Robot
f3ae8b5bd1 Merge "Add day-night-mode permission to Shell." into rvc-dev am: 021ceaecf2
Change-Id: Ib364f93a1f0c338b7139c8f0a6945653a2db01bf
2020-05-13 19:47:17 +00:00
TreeHugger Robot
be49b5bd79 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." into rvc-dev am: e795081a19 am: c32739e700
Change-Id: I738e487d3724ef2f280b1713c1b30649aa4796b0
2020-05-12 20:10:05 +00:00
TreeHugger Robot
c32739e700 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." into rvc-dev am: e795081a19
Change-Id: Ibfef5104a52de83b364a53d20f95c392c8ade115
2020-05-12 20:03:51 +00:00
Eugene Susla
cbb2901ffb Merge "Fix auto revoke installer whitelist APIs" into rvc-dev am: 511c3aa955 am: d867abc731
Change-Id: I0bcf01d9509b6a614a4a7291773d613e03eedbf9
2020-05-12 19:20:53 +00:00
Treehugger Robot
fbd4a6f80a Add day-night-mode permission to Shell.
Without the permission "adb shell cmd uimode night <mode>" doesn't work.
Adding the permission to the AndroidManifest file so the shell command
will work.

Bug: 155584597
Test: run `adb shell cmd uimode night <no|yes|auto>`
Change-Id: Ic444f3351cb130d24a2794284c6bf8709c80712c
(cherry picked from commit a85cc22044)
2020-05-12 15:13:26 +00:00
TreeHugger Robot
e795081a19 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." into rvc-dev 2020-05-11 19:47:42 +00:00
Bill Yi
f561833e30 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Ibe70e89bdbbb848c3a9a95c70f77febb52c38aad
2020-05-09 15:45:32 -07:00
Hai Zhang
a4b344c576 Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing.
Bug: 154348597
Test: presubmit
Change-Id: Ic721288e8f1e1a1f255eca95b2efb7b6e0c7c83b
2020-05-08 14:14:09 -07:00
Isaac Chen
539298c1b9 Revert "Add a null home activity to Shell.apk"
This reverts commit 6b1c4a9e09.

Bug: 149226068
Bug: 149307007
Bug: 149780604
Test: $ lunch aosp_crosshatch-userdebug; m
      # flash and boot on a crosshatch
      # Settings -> Apps & notifications -> Default apps -> Home apps
      # Only Quickstep home is there; no Shell home any more
      $ lunch csi_arm64-userdebug; m
      # flash the resulted system.img on a crosshatch and boot
      $ atest DeviceHealthTests # all passed
Change-Id: I927b7dae779da25589f2198e0480c0f2a788a7e4
2020-05-08 14:35:24 +08:00
Eugene Susla
64c88c077e Fix auto revoke installer whitelist APIs
Test: ensure APIs work
Bug: 153607914
Change-Id: Ia477d26438037fed0e39758200ded0e0fc1e96bd
2020-05-07 16:02:20 -07:00
Bill Yi
ec80ca682a Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Ib782c35d049cbea3ac47deb8ef27e307f8805e40
2020-05-04 21:18:47 -07:00
Abhijeet Kaur
8abcebf3e2 Merge "Delete empty bugreport files onError" into rvc-dev am: 873f59dc0e
Change-Id: Icaa20adf0a4d583ae3d09b41a2034df1760f98cf
2020-04-07 09:34:12 +00:00
Abhijeet Kaur
873f59dc0e Merge "Delete empty bugreport files onError" into rvc-dev 2020-04-07 09:22:26 +00:00
Abhijeet Kaur
1a5687df2c Delete empty bugreport files onError
Bug: 152839953
Test: Take another bugreport, while one is in progress.
Without this change: bugreport files for the second bugreport can be
seen in /bugreports
With this change: no file for the second bugreport can be seen. This
is the expected behavior.

Change-Id: I45c1f66f3a52ba9a31413cf9748bc5504eaa65d0
2020-04-06 12:35:19 +01:00
Bill Yi
9c0d11cbb2 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I8eef41a13445c1463d2cd7789b8c375deedb1d97
2020-04-04 21:08:18 -07:00
TreeHugger Robot
abfb1b0eda Merge "Follow best practices for Atomic variables" into rvc-dev 2020-04-03 11:43:33 +00:00
Abhijeet Kaur
98deae1551 Follow best practices for Atomic variables
* Make Atomic variables final so it can never be re-assigned to a null
object and hence avoid NPE.
* Set the value of the variables instead of re-assigning the object.

Test: Manual
Bug: 152479372
Change-Id: I58279d589d6247c53155755223fd8863f1049257
2020-04-02 16:52:54 +00:00
Abhijeet Kaur
8449e85f3c Track bugreports immediately after triggering a bugreport
Remove an old hack that was put in place as bugreport ID was updated
a bit later in the bugreport generation phase.
This change removes the race condition around triggering bugreports
almost instantly.

Bug: 152292912
Test: Trigger consecutive bugreports from ActivityManager WAI. (Fails
without this change)

Change-Id: Ib08bc2c7d8ae765894998e5bfa0d9b6f3efa088b
2020-04-02 15:02:29 +01:00
TreeHugger Robot
8f08b1cd40 Merge "Delete bugreport file on bugreport cancel" into rvc-dev 2020-03-31 18:38:51 +00:00
Abhijeet Kaur
982b104755 Delete bugreport file on bugreport cancel
Note: bugreport Cancel is not the same as bugreport onError. Files are not
deleted onError, as it still has some information before the bugreport
crashed/stopped. Bugreport Cancel is triggered by the user, hence clean
up all the files.

Bug: 146994281
Test: Cancel interactive bugreport from UI, deletes the current
bugreport files

Change-Id: I2606e491cbaa20eaa60980e98af56a194bae2280
2020-03-30 17:25:04 +01:00
TreeHugger Robot
937e786319 Merge "Initialize progress and lastProgress AtomicIntegers" into rvc-dev 2020-03-27 12:03:54 +00:00
Todd Kennedy
fb590035e1 Merge "Define permission for installer API v2" into rvc-dev 2020-03-26 21:50:17 +00:00
Abhijeet Kaur
5f49375c4e Initialize progress and lastProgress AtomicIntegers
This is essential for bugreports that do not send progress updates.

Bug: 152343458
Test: Take and share full bugreport
Change-Id: Id634afd82a92c02d1cf96ffd719fff8670fb8709
2020-03-26 11:12:11 +00:00
Todd Kennedy
66ed8dff37 Define permission for installer API v2
The package installer v2 APIs were marked as @SystemApi merely as
a convenience for development. These APIs may change in the next
version of Android and their usage must be strictly controlled.

Bug: 151716357
Test: Manual. Use old Shell and see that incremental installation fails with a SecurityException
Test: Manual. Request INSTALLER_V2 permission for shell and see that incremental installation succeeds
Change-Id: I9612dc145eadda20083bcc43e7a35ef3cd90aa40
2020-03-25 12:57:05 -07:00