History log of /frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5ab024333065c60620867e58eaa27f27dfa85752 27-Jun-2017 Jeff Sharkey <jsharkey@android.com> Only require that system UIDs tag their sockets.

Apps with a normal UID are typically isolated enough to not require
socket tagging; we're mostly interested in tracking down internal
UIDs that have lots of code sharing the same UID.

Also fix up everyone doing manual string checks of Build.TYPE, since
we now have first-class fields for those.

Bug: 38126076
Test: builds, boots
Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
6540574ecc2041794fa659f1be5dc5af4eeb3abc 24-May-2017 Felipe Leme <felipeal@google.com> Fixed assertions on bugreport share notification.

Fixes: 36698286
Test: mmm -j32 frameworks/base/packages/Shell && adb install -r -g ${OUT}/data/app/ShellTests/ShellTests.apk && adb shell am instrument -e class com.android.shell.BugreportReceiverTest$1 -w com.android.shell.tests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I0f3586309103a07afca5be3d1e3073d8a5dd04ec
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
8775eaac44c0b70875ddac0040c291e0e2fe45ad 10-Feb-2017 Felipe Leme <felipeal@google.com> Set package name on bugreport intents.

BUG: 35257764
Test: BugreportReceiverTest passes
Change-Id: Ia6ff03b2a12ab9987f5b36fa1da88e9c77af18a2
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
fa26a0ed08fe3f14fe5be708ec6a9d9c30ecbff7 28-Oct-2016 Felipe Leme <felipeal@google.com> Refactored Shell to use IDumpstateListener.

BugreportProgressService used to poll system properties to get the
progress of the underlying dumpstate process, but now dumpstate provides
a IDumpstateListener and IDumpstateToken binder objects for the same
purpose.

Test: BugreportReceiverTest passes
Test: manual verification

BUG: 31636879

Change-Id: I81d551781a511cb1cc218a27452875b0bb267f7a
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
1ac5441f572c7866a8c5040ae16723fe604960e8 11-Oct-2016 Felipe Leme <felipeal@google.com> Collapses status bar on teardown so it does not affect other tests.

BUG: 30639703

Test: mmm -j32 frameworks/base/packages/Shell && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/ShellTests/ShellTests.apk && adb shell am instrument -e class com.android.shell.BugreportReceiverTest -w com.android.shell.tests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I2635439ac0c033d1ad6b4ba545b8d751f5576b72
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
47ec8bebb6b936e6e2701890a2763717b093e657 13-Aug-2016 Felipe Leme <felipeal@google.com> Migrate BugreportReceiverTest to JUnit 4.

BUG: 30839080

Change-Id: I4af0d9ba26eb07dd78f1eef26c4edb7d3e03f582
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
2c0f3a372ce66febe4640d6fd38f055ab466669d 09-Aug-2016 Felipe Leme <felipeal@google.com> Kill service before trying to cancel notifications.

BUG: 30639703
Change-Id: Ib564371797e31e1dde37416efdb89641fb3024b1
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
da1fbdd6f27534edd458b682409592da8415abd6 04-Aug-2016 Felipe Leme <felipeal@google.com> Enable name text field when re-using the details dialog.

Change-Id: I10671fc00ea918da901f36f122641e646057888c
Fixes: 30642226
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
ca5002f6bde51c0dc80281a821650ab28f36b39c 03-Aug-2016 Felipe Leme <felipeal@google.com> Fixed BugreportReceiverTest failures:

- testProgress_changeJustDetailsTouchingNotification was failing because
the notification mechanism changed and now provides a way to expand
and collapse the actions bar, and the test was collapsing it instead
of opening the details dialog. It was fixed by tapping the
notification content instead of the notification title.
- Similarly, openProgressNotification() was refactored to use the
bugreport name instead of id.
- Uses getObject() (instead of getVisibleObject()) to get the activity
from the intent chooser.
- Removed the redundant call to back to dismiss the keyboard, which was
causing some tests to fail due to an accessibility bug.
- Retry a few times in case the bugreport name system property assertion
fails, since the property is set by a background thread.
- Improved how notifications are canceled.
- Created a sleep() helper.

Besides the test case improvements, it also removed a redundant call to
setCancelable() in the main code.

BUG: 30641229
BUG: 30639703

Change-Id: Icd79fada22d0b8e4be034068c3e9143ef0134eed
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
91699af8c6dae2a3ca703abc410fc00c0ab5de59 29-Jul-2016 Felipe Leme <felipeal@google.com> Always use chooser for Share Bug Report intent.

When using startActivity(intent), the platform allows the user to pick
the same activity for the intent, which can be a problem for sharing bug
reports when the device has personal and work profiles.

Change-Id: I1fd66905feb5d894307bbe5656c2aec705a59ab7
Fixes: 22115530
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
a86a3012ef689af659261b209da86f2e24ac21ec 15-Jul-2016 Felipe Leme <felipeal@google.com> Close details dialog when bugreport is canceled by user.

BUG: 30158896
Change-Id: I0eab22586f6b431f2abe837088d48a655e03d213
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
af096719c0e45a2b7d67e9267b40cffdc16f441a 25-Apr-2016 Felipe Leme <felipeal@google.com> Don't opt-out of warning dialog by default on user builds.

BUG: 28341946
Change-Id: I9ce6bf52a02a14055d4ded41aac50c79abdb4ee9
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
69c53e65b941235a8d2e193d5b9a783f7787af0d 15-Apr-2016 Felipe Leme <felipeal@google.com> Set BugreportProgressService to run on foreground.

BugreportProgressService do not persist the user-provided
information (like details and screenshot paths), so if it's killed by
the framework, that info is lost.

Running it as foreground mitigates the changes of it being killed.

BUG: 27431998
BUG: 28291423
Change-Id: I2f58507beb38309628f2f19d3f7f950d07eca16f
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
079f89614c49364bb907783b008827fbc306dd73 18-Apr-2016 Felipe Leme <felipeal@google.com> Remove initial screenshot on interactive bugreport.

One of the changes in the 'interactive bugreport' bugreport workflow
introduced on N is that the initial screenshot was taken right away (by
Shell, not dumpstate).

Unfortunately, such initial screenshot is often delayed when the system
is overload. Also, if the user is not interested in a screenshot, it
would be adding more load on the system unnecessarily.

Given these issues, and the fact that the user can still easily take an
initial screenhsot by selecting the proper notification action, the
initial screenshot is being removed.

BUG: 28167977

Change-Id: I2cf6616ce3124102b62ec9a36dc5a0ce6455a909
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
7fd1cbd49d0ace00c65229f65252136902aedaf3 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert warning logic so it has a "don't show again" message." into nyc-dev
fcca68dfb137c061952d23e1873e995e6bcf172d 12-Apr-2016 Felipe Leme <felipeal@google.com> Revert warning logic so it has a "don't show again" message.

BUG: 28140003

Change-Id: I93e7b1494a0f4c5ca080fbe9dd94dc2168092ffa
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
a43d139359346ad57604e8335d92de57f3d47171 13-Apr-2016 Felipe Leme <felipeal@google.com> Removed redundant notification title.

When a bugreport is finished with a pending notification, it already
display a subtext explaining the situation - not only the extra title is
redundant, but it's too large.

BUG: 27583025
Change-Id: I8d8171faf7b8b86b34f6d860555839918be10550
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
9ca5e5639048375100acd98a40ad82d8b699c575 11-Apr-2016 Felipe Leme <felipeal@google.com> "Temporarily" removed progress check.

The code that asserts the right progress is displayed was based on the
percentage text displayed in the system notification, but such text is
gone.

Since UIObject doesn't easily expose the underlying ProgressBar, such
checks were temporarily disabled.

BUG: 28114251
Change-Id: Idb64fe97cf84f5f73e08e293b8fd0384bc8b70d6
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
3fc44b9a6274254e8d3a53b6b1e245c5f9177229 22-Mar-2016 Felipe Leme <felipeal@google.com> Changed logic when dumpstate's max progress increases.

When dumpstate starts, it estimates its maximum duration and sends it
through an extra on BUGREPORT_STARTED; as it progress, it sets a system
property with its current progress and if the progress value overflows
the estimated max, it increases the max as well.

Shell uses the max/progress to display the progress % in the
system notification, and need to handle the scenario where the max
changes. The initial implementation would recalculate the progress, with
makes it swing back and forth as dumpstate increases the max.

This CL changes the Shell logic so the progress never go back, just
forward. The drawback of this approach is that if dumpstate
underestimate the maximum, the progress might get stuck in a high
value (99%) early on, but such issue will be addressed in the long
term by tuning the estimated max value.

BUG: 26354314
Change-Id: I3a5416acaffaaa43fd28d2f1f8ec8ea12aa0d91e
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
208b1881ae924cd0c2bed326555e4aa18424d927 15-Mar-2016 Felipe Leme <felipeal@google.com> Minor UI improvements and code cleanup:

- 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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
5ee846dd18022307341c9808c9aacded2b2f60fd 09-Mar-2016 Felipe Leme <felipeal@google.com> Warn user when bugreport is finished but screenshot is pending.

BUG: 27524556
Change-Id: Iaecdd01605dc4b01cdf669baf443eaee7fb20f6f
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
bbd91e58444f092e1080f5a0a746fcd4b21ce113 27-Feb-2016 Felipe Leme <felipeal@google.com> Make bugreport details dialog confirm to Material Guidelines for Dialogs.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
db31363aa9670dbbc5837af7a04bdd8012493fd7 26-Feb-2016 Felipe Leme <felipeal@google.com> Open bugreport info when touching notification (as well as DETAILS button).

Also added test case for CANCEL button on system notification.

BUG: 26906985
Change-Id: I92eac2e5ec18a8d1d4412f5c1832a52705caf3b3
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
262887834c7938b7a7bbbd7ef026b5965d6412fc 25-Feb-2016 Felipe Leme <felipeal@google.com> Reset UI fields when dialog is reused, otherwise it might contain fields
from a previous bug report.

BUG: 26524513
Change-Id: If9d176806b28120b57dddeb62b636065f8ff7cf6
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
85ae3cf46ad66d71e5a29a93e89a0f569d74288b 25-Feb-2016 Felipe Leme <felipeal@google.com> Final (?) fixes on id / pid split.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
e86b63bd17da3d347b9392f897e361919655edd6 08-Feb-2016 Felipe Leme <felipeal@google.com> Add pid on main bugreport notifications.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
c8e2b6092c0fbf87e71f81fd2cffbb29ff8d9039 29-Jan-2016 Felipe Leme <felipeal@google.com> Fixed check for empty title.

Otherwise, if user entered "Details" but not "Summary", the
ACTION_SEND_MULTIPLE subject would be empty.

BUG: 26768595
Change-Id: I955ab5e8f05eba9fbfa6fe65eabb6a8a8e28c5b4
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
ec17538d46a49530ed6efdc2842ee16eaf18b9f6 27-Jan-2016 Felipe Leme <felipeal@google.com> Send broadcasts as foreground, otherwise test might fail when running
after reboot.

BUG: 26805230
Change-Id: I05dcf9871c9b4c4c9a465466d60ebe9a1ac63e51
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
c4f6467702e308844ef0769ba17dcb7b7b32a9e6 13-Jan-2016 Felipe Leme <felipeal@google.com> Save bugreport info on share intent.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
4967f737d9906e3d5c9bf3a0584a7b7cf83b5a8c 06-Jan-2016 Felipe Leme <felipeal@google.com> Include title and description on bugreport.zip

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
2288129d5208cd26ab41191db69a418d15ead9ee 06-Jan-2016 Felipe Leme <felipeal@google.com> Fixed corner-case scenario where a screenshot is finished after the share
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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
d1e0f12979441733753b538611f6d73e5527c43c 19-Dec-2015 Felipe Leme <felipeal@google.com> Handle bugreport screenshots on Shell.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
bc73ffc06fd2b5b30802cc7e8874a986626b897d 12-Dec-2015 Felipe Leme <felipeal@google.com> Allows users to add details about a bugreport in progress.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
84c0aeffae7951574b38181508df3776f638e26d 12-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Cleaned up unit tests."
e2b4f49795b4f23fa563a0ffb9986b49aee7f9be 12-Dec-2015 Felipe Leme <felipeal@google.com> Created initial bugreports dir if it doesn't exist.

BUG: 25752530
Change-Id: Iec65b88231e26aaa62d301a26b2f51cf92651c72
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
93702abf6e9a87079e81c46c82d8c3954a426759 11-Dec-2015 Felipe Leme <felipeal@google.com> Cleaned up unit tests.

This refactoring will make it easier to add new test cases for the
upcoming bugreport details notification.

BUG: 25794470
Change-Id: I0bf6ab54a7b4aa1dfa51ad0354682e5764b8a209
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
a5d3cfa9837e63486ed63ef7ad76b5bcac565f1e 11-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Unhardcoded file paths."
a0bf0336f0b6ff39cd90aabe0eb48b022d008ed6 11-Dec-2015 Felipe Leme <felipeal@google.com> Unhardcoded file paths.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
457ef13c14920a922c599f125d50633972992db4 11-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Refactored what happens when a BUGREPORT_FINISHED is received."
2bfa0858a8cb67e19a1c9df8aad0a4da423a52b8 10-Dec-2015 Felipe Leme <felipeal@google.com> Added test annotation.

BUG: 25752530
Change-Id: Ia84233371481be89b1c9c852dfbb990020f0e6c0
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
46d47911ea8bbbe0b8d7a6029b80da6b1eb94393 09-Dec-2015 Felipe Leme <felipeal@google.com> Refactored what happens when a BUGREPORT_FINISHED is received.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
ba477939f0ae38926b4b0a6501a2371acc612433 09-Dec-2015 Felipe Leme <felipeal@google.com> Improved test case by checking for dangling service.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
6bbb6b9caf0e91afa11421e6d64a95a9ee4ca26e 08-Dec-2015 Felipe Leme <felipeal@google.com> Improved test cases so they handle the initial warning.

BUG: 25752530
Change-Id: I78cd8b534fd3aeeadad0a2cf6712432a2438ca5a
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
719aaae3c167c2b15525dbe5c7db514a2c0c8269 01-Dec-2015 Felipe Leme <felipeal@google.com> Changed workflow so max progress can be dynamically updated.

BUG: 25794470
Change-Id: I75dfdabf9febf54f2fb714441d48b339f8d3d293
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
69c0292affe8be51e10afb2dbf58f0133918a2c3 25-Nov-2015 Felipe Leme <felipeal@google.com> Created a new bug report workflow so user can keep track of its progress.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
b9238b37838d653c38ce4e712421adb61978fc22 25-Nov-2015 Felipe Leme <felipeal@google.com> Refactored the BUGREPORT_RECEIVED logic into a new service.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
e53e85f6051d20cbd477bc25d446a41996411fab 18-Nov-2015 Felipe Leme <felipeal@google.com> Initial integration test for BugReportReceiver.

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
/frameworks/base/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java