Commit Graph

1063 Commits

Author SHA1 Message Date
Ashwini Oruganti
02f8c0f5ef Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for future versions. This change adds the value reflecting the
previous default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: Ic2a2b9ee1c9bae64690691a95b885f4b69cb21f8
Merged-In: Ic2a2b9ee1c9bae64690691a95b885f4b69cb21f8
2020-05-29 19:51:27 +00:00
TreeHugger Robot
fc7c4138ef Merge "Add LOCATION_HARDWARE permission to shell." into rvc-dev am: 8a6ef8e52d
Change-Id: Ica09e8dba5b17f0df7d15f980c284b48defac8d0
2020-05-28 19:45:06 +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
629cac54f6 Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev am: f49fa1a9ea
Change-Id: I5a4cbbb4bda0e975129108ee32dd3c1965bed24f
2020-05-27 04:48:53 +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
699592ebcb Merge "Take interactive bugreports on Android TV" into rvc-dev am: 1d22ea4eca
Change-Id: Id1d787c9445d4a954a8ebb8f3d88d7f1b53edc5c
2020-05-22 10:23:35 +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
01b3848ade Merge "Revert "Add a null home activity to Shell.apk"" into rvc-dev am: 6351c72746
Change-Id: I46fddd88ef99f71cb8574420be0782bb5be90b7e
2020-05-18 17:32:13 +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
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
4d79a92078 Merge "Add day-night-mode permission to Shell." am: 963c11e32d am: dbf9eed8c1
Change-Id: I5fe4468f78049f9907a92121b7e3661bb9598440
2020-05-11 22:56:39 +00:00
Treehugger Robot
dbf9eed8c1 Merge "Add day-night-mode permission to Shell." am: 963c11e32d
Change-Id: Iad4aba4108aa1d60e470388bfadf2bdc78984324
2020-05-11 22:38:44 +00:00
Treehugger Robot
302bed33d8 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." am: 1b9f4b926c
Change-Id: I663020a8a74a913035cbbd7ceab31cac59871ba7
2020-05-11 22:36:42 +00:00
Treehugger Robot
963c11e32d Merge "Add day-night-mode permission to Shell." 2020-05-11 22:36:27 +00:00
Hai Zhang
68cc951bf6 Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing.
Bug: 154348597
Test: presubmit
Change-Id: I75f07b88c6eca9d2296d3bcdbcc43ad9ff382023
Merged-In: Ic721288e8f1e1a1f255eca95b2efb7b6e0c7c83b
2020-05-11 21:06:35 +00:00
TreeHugger Robot
5eee203278 Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." into rvc-dev am: e795081a19
Change-Id: I813dd66a377329bc9a58492b0f35092ac4f3ee3c
2020-05-11 19:59:19 +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
Kweku Adams
6adfa79de1 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: Ibfb145d762c73bba9de639d4050b9b26e4778cc9
2020-05-11 11:46:34 -07:00
Eugene Susla
8a63b1ab19 Merge "Fix auto revoke installer whitelist APIs" into rvc-dev am: 511c3aa955
Change-Id: I3a97457a60f9dfcc42e1dea65162c575b0c8b816
2020-05-10 05:14:17 +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
39d7ec4fd5 Merge "Delete empty bugreport files onError" into rvc-dev am: 873f59dc0e
Change-Id: I15e242816f24c218ce81d48912f76b1651ceaeb2
2020-04-07 09:34:04 +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
Eugene Susla
bfb6efe93a RESTRICT AUTOMERGE am: b4aaa9d8ad am: 6015cb062b
Change-Id: I0a679eb49f46041f39edc7f3f166eaef4ffb1c1c
2020-04-01 21:10:24 +00:00
Eugene Susla
6015cb062b RESTRICT AUTOMERGE am: b4aaa9d8ad
Change-Id: I47af344ace38759669c9e13a03aee96d3ed40b9e
2020-04-01 20:58:33 +00: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
Abhijeet Kaur
0b304c36f6 Show predefined title and description in finished notification
shareTitle and shareDescription is passed by the caller of the
bugreport. Show these in the finished bugreport notification.

Pre-set shareTitle takes precedence over user modified title.

shareDescription and description are not related/dependant on each other
in any way.

Bug: 150333444
Test: Manual (by passing EXTRA_TITLE and EXTRA_DESCRIPTION from
ActivityManagerService when trigerring a bugreport)

Change-Id: I2bfd080aeee677cdc8d0af339d7ad4a29451c3e0
2020-03-25 15:55:27 +00:00
shubang
d7a3204c4e Add tuner permissions to Shell
So we can test system APIs in cts.

Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: Ife5a5f712cdf3d3c2e5dd747fa1d3bc8c165b85b
2020-03-23 19:41:35 -07:00
Abhijeet Kaur
78ef10aa72 Merge "Clean up code in BugreportProgressService" into rvc-dev 2020-03-23 14:18:44 +00:00
Treehugger Robot
5fe173c31f Merge "Shell: Allow usage of wifi usability score APIs" am: dfeb2a2bfc am: 025d303874
Change-Id: I6a197220e3b6d4f0206991937bddbb9986e01f56
2020-03-20 00:23:25 +00:00
Roshan Pius
7b0a22dcad Shell: Allow usage of wifi usability score APIs
This permission is needed for wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the app to influnce wifi vs lte network
selection algorithm.

What options did you explore that did not need this permission?
- Without this permission, it would be impossible to test these API's:
WifiManager.setWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.addOnWifiUsabilityStatsListener()

Bug: 150236894
Test: Device boots up.
Change-Id: Ic173e44ab818cdfecebde80715ddaec347019db6
Merged-In: Ic173e44ab818cdfecebde80715ddaec347019db6
2020-03-19 23:14:31 +00:00
Roshan Pius
c551b3386a Shell: Allow usage of wifi usability score APIs
This permission is needed for wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the app to influnce wifi vs lte network
selection algorithm.

What options did you explore that did not need this permission?
- Without this permission, it would be impossible to test these API's:
WifiManager.setWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.addOnWifiUsabilityStatsListener()

Bug: 150236894
Test: Device boots up.
Change-Id: Ic173e44ab818cdfecebde80715ddaec347019db6
2020-03-19 13:14:50 -07:00
Treehugger Robot
d8f24b052d Merge "Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell" am: a3161c6627 am: 3637bc567d
Change-Id: I2fbc86155d031625dfd68605bb632cfca63c714d
2020-03-19 17:51:15 +00:00