This change logs the following user actions:
- Interactive bug report initiated from power menu.
- Full bug report initiated from power menu.
- Bug report canceled using system notification.
- Bug report details screen open using system notification.
- Additional Bug report screen shot taken using system notification.
- User changed bug report name using the details screen.
- User changed bug report title using the details screen.
- User changed bug report description using the details screen.
- Changes made on bug report details screen were saved by user.
- Changes made on bug report details screen were canceled by user.
BUG: 26759986
Change-Id: I1aae98b87a4dea66a1030a024dd799b97c25dd6d
Always keep all the files of the remote bugreport
operation and keep them for at least a day.
Bug: 27215341
Change-Id: I514956004bf982e868a87b39c705d7c4a4a7b001
service died.
There are scenarios when the user is running low on resources and it
kills Shell after it start monitoring a dumpstate process, in which case
the BugreportInfo is not available anymore when the user tap a
notification action.
We could add a mechanism to recover that info (like persistenting the
user-provided values in a shared preference), but would incur in more
costs when the device is already in a resource-constrained state, so
it's better to just stop monitoring and switch back to the traditional
model where the user is notified after the bugreport finishes (the
drawback is that all user-provided information will be lost).
Also improved how info.name is checked to avoid crash in similar cases.
BUG: 27186542
BUG: 27203559
Change-Id: I57076b098a3fce493e1a27121b6e070366808668
Although 'pid' is more useful when diagnosing problems with the
bugreport workflow, it could be confusing to the end user. Hence, a
sequential id (started at 1 after a reboot) would be more useful, and this CL changes Shell to accommodate such id (dumpstate will be changed separately).
BUG: 27076108
Change-Id: I5c42dc49a100b43266787d4f79698a22a4e533a9
Showing the pid is useful in many cases, like when one bug report is finished
and another one is in progress.
BUG: 26906985
Change-Id: Ib8ae462c85246b99234f8dac63edb608d1eafeb0
Otherwise, if user entered "Details" but not "Summary", the
ACTION_SEND_MULTIPLE subject would be empty.
BUG: 26768595
Change-Id: I955ab5e8f05eba9fbfa6fe65eabb6a8a8e28c5b4
If the user provides a title or description, it's necessary to create a
new zip file with the contents of the old file plus the new entries,
which takes time.
Hence, if the user didn't provide more info (title or description), we
should skip that step.
BUG: 26616935
Change-Id: Ice14f88b5763d463d8db2f942e823797e80bfde9
When a bugreport is finished, BugreportProgressService sends a
INTENT_BUGREPORT_SHARE intent containing the bugreport pid; then when
the user clicks the share notification, BugreportProgressService uses
the pid to retrieve the bugreport info.
The problem with this approach is that if the service dies before the
user clicks the notification, the bugreport won't be shared.
This change fix this scenario by saving the bugreport info in the share intent.
BUG: 26513652
Also added more logging statements.
Change-Id: Iba86d06369f843ad88194fb1dad0c8b69764df78
After receiving android.intent.action.REMOTE_BUGREPORT_FINISHED
in newly created RemoteBugreportReceiver, Shell will generate URI
to the bugreport zip file and send the broadcast
android.intent.action.REMOTE_BUGREPORT_DISPATCH.
Bug: 26152603
Change-Id: I058d626e021b488c9347b45467a4e3505134e79c
Prior to this change, the user-provide title and description were only
used in the ACTION_SEND_MULTIPLE intent, which was fine for the cases
where the user share the bug report with an app that used intent
extras (like an email app).
But if the app did not use the extras, or if
the user did not share the bug report right away, the info supplied by
the user would be lost.
With this change, such info will be saved into 2 new zip entries,
title.txt and description.txt
BUG: 26403310
Change-Id: I888364d14d67fb4e2f2c26cb66b21576d7ce13b4
notification is sent.
Prior to this change, if a screenshot finished after the share
notification was sent, it would replace the share notification with a
progress notification, and the share notification would never be sent
again.
Also improved the test cases that automatically generate a screenshot
but don't use it to wait for the screenshot to finish before proceeding,
otherwise it could cause a future test to fail (if the screenshot is
finished after the initial test is completed).
Change-Id: I6e2a6549ebb48e5bebf5aa78d1bda94404c1812b
Currently, the bugreport screenshots are taken by dumpstate and passed to
Shell as a path on BUGREPORT_RECEIVED; this change not only delegates the
screenshot taking to Shell, but also allows user to take more
screenshots while the bugreport is being generated.
As a result of this change, the final ACTION_SEND_MULTIPLE intent might
contain multiple screenshot attachments, all of them named
"screenshot-PREFIX-NUMBER.png", where PREFIX is the bugreport
name (either initial date provided by dumpstate or a name entered by the
user) and NUMBER is the sequential number of the screenshot as taken by
the user.
The screenshot is taken using screencap, which not only is simpler than
using Framework APIs, but also faster and less intrusive. The only
drawback is that it might fail if an OEM is not providing screencap; if
that happens in the field, we'll need to add fallback option to do it
using such APIs.
Prior to this change, all work done on BugreportProgressService was
executed in one single thread (through the ServiceHandler class) but the
code was guarded by unnecessary synchronization. Now there is another
thread (ScreenshotHandler) that will be used just for taking the
screenshot (so it doesn't handle the main thread). Despite the addition
of a new thread, the code was simplified to remove most synchronization
locks, excepted for the areas touched by both threads.
Once this change is submitted, the bugreport service will be changed so
it does not ask dumpstate to take a screenshot.
BUG: 26274653
Change-Id: I1df883e3c0ca6e3e3cad2522a6a99585f71abb75
The "bugreport in progress" notification now have a "DETAILS" button
that when clicked opens a dialog window displaying the following fields:
- Name: short name for the bugreport, will be used as part of the
final files (and by default is the timestamp sent by dumpstate)
- Title: a 1-line title for the bugreport, will be used as the subject
in the final message.
- Description: a detailed description for the bug.
The main advantage of such dialog is that it allows users to enter more
info about a bugreport while it's being generated, rather then when the
bugreport is finished (since of the user doesn't remember what the
context was when the problem happened).
BUG: 25794470
BUG: 10676443
Change-Id: I0d1dba2a94ad989e541415a2a59475619a2e3d13
When ActionSendMultipleConsumerActivity is not the default action, it
just need to be selected, without clicking 'Just Once'
BUG: 25752530
Change-Id: I111063aa0dbba37e0cac8f0572f43a48c659e975