- Removed initial selection of name field.
- Set notification type as system.
- Refactored some notification code.
- Removed initial focus on details UI.
BUG: 26906985
BUG: 27494227
Change-Id: I5aab95c06830da3850331a2dba09abae88cf59fc
Changes:
- Removed hints.
- Added TextViews for field labels.
- Added padding for inner dialog
- Adedd autoCorrect and capSentences to title and summary
- Changed strings.
- Set name to be selectAllOnFocus initially.
Also improved some logging statements.
BUG: 26324085
Change-Id: I32597a7c2839ca706dbbcf13660e976469ab8dd0
The main goal of this CL was to change the test cases to send an
EXTRA_ID instead of EXTRA_PID, but in changing that it was revealed 2
minor bugs:
- When setting the name property, it was using id instead of pid (which
is what dumpstate expects).
- When the pid is replaced by the name in the screenshots, it would be
replaced twice if the pid was small enough (because the call to
String.replace() would also replace the counter).
This CL fixes these issues, and removes the temporary assignment of id =
pid when the former is missing.
BUG: 27076108
Change-Id: I70e7ce7d145019438272594686ac0d4d5dbe1723
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
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
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
This refactoring will make it easier to add new test cases for the
upcoming bugreport details notification.
BUG: 25794470
Change-Id: I0bf6ab54a7b4aa1dfa51ad0354682e5764b8a209
Also added a sanity check when deleting old files to avoid a runtime
exception in the AsyncTask when the file doesn't exist.
BUG: 25752530
Change-Id: Ic4a118ae7cc5750cc96c2ac82f2c7dcc6a0cb506
Previously on 24: when a BUGREPORT_FINISHED was received,
BugreportProgressService would remove the watched BugreportInfo from its
map and if there was no info left, it would stop self and send the
SEND_MULTIPLE_ACTION intent.
Soon we're going to allow the user to enter more details (like a title
and description) for the bugreport, but if the service is stopped while
the user is still entering data, that window will be killed.
Hence, although this refactoring doesn't change the current logic, it
paves the way for such new feature.
BUG: 25794470
Change-Id: Ic5283ddc3e07d88ba2a9a925f9534426857e7606
This check will make it easier to refactor how the bugreport is shared, which is a requirement for showing the bugreport details window.
BUG: 25794470
Change-Id: If29f0515586c6680a44e0d52c4fc587808e668aa
- Decrease delay by first checking if the activity is the default
selection.
- Handle scrolling so it won't fail if the activity is not visible.
Change-Id: I8fce920bad207c3f35375316a139f20c1dcb9343
The old workflow was:
1. dumpstate starts.
2. When dumpstate finishes, it sends a BUGREPORT_FINISHED intent.
3. Shell's BugreportReceiver receives the BUGREPORT_FINISHED and issues a
system notification so user can share the bug report.
The new workflow is:
1. When dumpstate starts, it sends a BUGREPORT_STARTED with its pid and
the estimated total effort.
2. When Shell's BugreportReceiver receives the BUGREPORT_STARTED, it:
2.1 Issues a system notification so user can watch the
progresss (which is 0% initially).
2.2 Starts a service (BugreportProgressService) responsible for
polling the dumpstate progress (using system properties and the
pid) and updating the system notification.
3. As dumpstate progress, it updates the proper system property.
4. When dumpstate finishes, it sends a BUGREPORT_FINISHED event.
5. When Shell's BugreportReceiver receives the BUGREPORT_FINISHED, it:
5.1 Finishes the service if necessary.
5.2 Issues a system notification so user can share the bug report.
This CL handles the Shell changes only, the dumpstate changes will be
changed in a separate CL.
BUG: 25794470
Change-Id: Icbd0b42dd48e8db376b60544348b6818c6374338
Although this Change doesn't modify the workflow logic itself, it paves
the way for upcoming changes where the overall bug report progress will
be monitored by this service.
BUG: 25794470
Change-Id: Id0c867b04b595b5d31d11531405408f3423dd68b
These tests rely in the UI Automator to interact with the UI and
follow the workflow below:
* creates the bug report files
* generates the BUGREPORT_FINISHED intent
* emulate user actions to share the intent with a custom activity
* asserts the extras received by the custom activity
It still have some limitations, like requiring the phone to be unlocked
and having the bugreport warning already checked, and those will be
addressed in future CLs.
BUG: 25752530
Change-Id: I01d7fad9f94daf156b728cbb9ef228bbfa6ee0f5