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
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
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)
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
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
* 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
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
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
This is essential for bugreports that do not send progress updates.
Bug: 152343458
Test: Take and share full bugreport
Change-Id: Id634afd82a92c02d1cf96ffd719fff8670fb8709
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
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
So we can test system APIs in cts.
Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: Ife5a5f712cdf3d3c2e5dd747fa1d3bc8c165b85b
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
Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell which
is needed to run GTS tests on @systemApis for
audio effects control.
Bug: 148703417
Test: run gts -m GtsAudioTestCases -t com.google.android.audio.gts.DeviceEffectTest#testCreateDeviceEffect
Change-Id: Iba579001aeffd85743850727135a6f536579ea17
* Make fields (progress, lastUpdate and finished) atomic to make them
thread safe and also reduce getters/setters.
* Make lastProgress a private field in BugreportInfo.
* Move deleteScreenshots to BugreportInfo class.
* Make fields with lock protected getters/setters as private.
* Make fields that should not be changed as final.
Bug: 147033613
Test: manual
Merged-In: I8f0fb4865c1b7c5d62bebca3e250eee59b4e71f4
Change-Id: I8f0fb4865c1b7c5d62bebca3e250eee59b4e71f4
(cherry picked from commit fe7d1ab0cb)
Bug: 151096665
Test: presubmit
This is needed for CTS tests to be able to call
Settings.System.putString(..., overrideableByRestore=true)
Change-Id: I7eb64df187bd59509067130c31c2e804f75d9830
This reverts commit 8d14f5162a.
Bug: 150236894
Reason for revert: It is not appropriate from a security perspective for the shell to have this permission.
Change-Id: I5b933fe6850ebd5b5f230c16722357ead4ec4286
Make REGISTER_STATS_PULL_ATOM permission available to Shell to allow
testing it in gts.
Is the minimally scoped permission that needs to be added?
Yes, it is the only permission to register pulled atoms.
What options did you explore that did not need this permission?
I explored expanding the permission to be development in addition to
privileged, and giving the permission to gmscore. However, this solution
was recommended to me by the GTS team. If there are better ways to enable
testing the API in GTS, I am open to feedback.
Test: atest GtsStatsdHostTestCases
Bug: 150329323
Change-Id: I103d937842beaa2d918181b1a952d27179411dcc
Grant NETWORK_STACK permission to the shell so
that CTS can use the shell identity to call
APIs protected with this permission.
Bug: 150236894
Test: atest android.net.wifi.cts.WifiManagerTest#testGetCountryCode
Change-Id: I4f93e76bcda83c528f1f2c7bcf800965886ea8da
Merged-In: I4f93e76bcda83c528f1f2c7bcf800965886ea8da
(clean cherry pick from AOSP)
Change-Id: I1502b2d53d3d43cce36ba6563533cd3560ff8747
This permission is needed for some wifi CTS tests.
Is the minimally scoped permission that needs to be added?
- Yes, this only allows the retireval of the saved wifi network
credentials on the device.
What options did you explore that did not need this permission?
- Possibly creating a UI to ask for manual entry of network credentials.
But, that would not let us do automated CTS tests (will need to become
CTS verifier tests then).
Bug: 150236894
Test: atest android.net.wifi.cts.WifiNetworkSpecifierTest
Change-Id: I6881003510191f667950be1ab27a5399fe3914b4
1. This is a minimally scoped permission (which allows the new WiFi API's
to silently connect to a wifi network).
2. I explored writing a GTS test instead of a CTS test, with the idea being that it would run inside the Android Auto user. Unfortunately the API under test requires two permissions, MANAGE_COMPANION_DEVICES and COMPANION_APPROVE_WIFI_CONNECTIONS. Android Auto will only have COMPANION_APPROVE_WIFI_CONNECTIONS, and if I elevate to Shell privileges the test will have MANAGE_COMPANION_DEVICES, but not COMPANION_APPROVE_WIFI_CONNECTIONS. Beyond this, I've been told that it's better for us to test this API in CTS than what it is under GTS.
The addition of the permission to androis.os.shell could theoretically allow it to connect to a WiFi network using the new WiFi APIs without the user being prompted. Android R will still allow the legacy WiFi API's which also allow wifi connections without users being prompted without this permission. Android Auto requires the new API's as they better handle cases of connecting to WiFi networks with no internet access. The old API's will not always result in fallback to LTE, whereas the new ones do that.
Test: Unit test in separate change.
Change-Id: Ifd8ae6b7e53307ea8973406fdefa468dfa679bda
Bug: b/147748710