9 Commits

Author SHA1 Message Date
Felipe Leme
5662dd8379 Merge "Refactoring: pulled ServiceHandler methods to its parent class." 2015-12-04 22:14:05 +00:00
Felipe Leme
923afa9fe1 Refactoring: pulled ServiceHandler methods to its parent class.
Now ServiceHandler only have 2 methods:

- handleMessage(): part of its interface.
- poll(): delegates work to parent, but sends a delayed message
  so it keeps polling.

Also changed hardcoded "N/A" to a resource.

BUG: 25794470
Change-Id: I486fff46c1532685bfd6f5903349d14e55059219
2015-12-04 14:05:17 -08:00
Felipe Leme
d57dc996f5 Improved phrasing for "in progress" message.
BUG: 25948539
Change-Id: Ie746a12207da337ec26e85dfbbd4188aa751c20d
2015-12-03 17:42:31 -08:00
Felipe Leme
69c0292aff 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
2015-11-25 16:50:35 -08:00
Felipe Leme
3bf521a32e Improves how cornercase scenarios are handled:
- Bug reports without screenshots are supported.
- Shows a toast message when the bugreport file cannot be read.

BUG: 25751868
Change-Id: I4ed2c47a89b373cf878720ebcba90c96bd51342b
2015-11-18 10:46:54 -08:00
Ryo Hashimoto
dd98034edc Add BugreportStorageProvider
BugreportStorageProvider provides storage backend for bugreports.

BUG:18070208
Change-Id: I8506dd90d69907090295d99df7427fc747b83698
2015-03-23 18:28:01 +09:00
Wei Liu
9d43fa8405 Update the string for take bug report to say "Swipe left to share" instead of "Touch to share"
BUG: 15589908

Change-Id: I69e176343906c8f87b8f50ba844b15e3e89f0c48
2014-07-11 23:11:04 +00:00
Jeff Sharkey
02ffba940c Handle finished bugreports, share from private.
Show notification when a bugreport is finished, letting the user
launch a SEND_MULTIPLE intent to share them.  Add dialog that warns
user about contents before sharing.  Since bugreports are now stored
in private app data of the Shell app, use FileProvider to build Uris
that we can grant others access to.

Define BUGREPORT_FINISHED as being a protected broadcast.  Delete
older bugreports automatically to reclaim disk space.  Migrate any
Intent extras to ClipData when building PendingIntents.

Add --receiver-permission support to am shell command.

Bug: 7005318
Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
2013-03-13 16:42:38 -07:00
Dianne Hackborn
514074fae8 App ops: cleanup, handle root and shell, perms.
Rework how the shell user is defined so that it is
associated with an actual apk, instead of being a free
roaming uid with special permissions assigned to it.
This allows us to correctly account for its operations
in app ops.

Implement a special case for the root user in app ops --
it is always allowed, always with the package name "root".

Add various code to take care of cleaning up package state
from app ops -- when packages are uninstalled, and during
boot if any packages currently being stored no longer exist.

Also fix a bug in the activity manager to correctly grant
permissions in all cases when onNewIntent() is being called.

Change-Id: Iae9f6d793ee48b93518c984ad957e46ae4582581
2013-02-11 15:33:48 -08:00