203 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
62607a4de0 Merge "Changed workflow so max progress can be dynamically updated." 2015-12-04 22:12:20 +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
719aaae3c1 Changed workflow so max progress can be dynamically updated.
BUG: 25794470
Change-Id: I75dfdabf9febf54f2fb714441d48b339f8d3d293
2015-12-04 11:50:58 -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
a413143afc Improved helper used to choose an activity.
- 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
2015-12-03 11:09:53 -08:00
Felipe Leme
ec52d7983c Merge "Adds a notification action to cancel a bugreport in progress." 2015-12-03 00:18:34 +00:00
Felipe Leme
9cadb75714 Adds a notification action to cancel a bugreport in progress.
BUG: 25794470
Change-Id: I6f9c58fa7257f0826ab77007562cbff7db3e4cf0
2015-12-02 15:42:52 -08:00
Geoff Mendal
ce890c325c Import translations. DO NOT MERGE
Change-Id: Icead64fbc942b39b292289d3054845eefe3170b8
Auto-generated-cl: translation import
2015-12-02 05:37:33 -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
c14a26307b Merge "Refactored the BUGREPORT_RECEIVED logic into a new service." 2015-11-26 00:14:30 +00:00
Felipe Leme
076e098b75 Merge "Initial integration test for BugReportReceiver." 2015-11-26 00:14:03 +00:00
Geoff Mendal
0634fbb334 Import translations. DO NOT MERGE
Change-Id: I8ab271a3bfdd0b4d4917cc21234b70b79063e3cf
Auto-generated-cl: translation import
2015-11-25 05:37:11 -08:00
Felipe Leme
b9238b3783 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
2015-11-24 17:38:23 -08:00
Geoff Mendal
d36d67445c Import translations. DO NOT MERGE
Change-Id: I852a848512375e624b758709aa12aacdb7fb98b2
Auto-generated-cl: translation import
2015-11-23 05:51:56 -08:00
Felipe Leme
e53e85f605 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
2015-11-20 12:00:17 -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
Jeff Sharkey
f9fc6d6cc0 More file-based encryption work.
Add granular StorageManager APIs for key creation/destruction and
unlocking/locking.  Start passing through an opaque token as part
of the unlock command, but leave it empty for now.  We now have a
separate "prepare" method that sanity checks that user directories
are correctly setup.

Define a handful of system properties used for marking devices that
should be operating in FBE mode, and if they're emulating FBE.  Wire
a command to "sm", but persisting will come later.

Start using new "encryptionAware" flag on apps previously marked with
coreApp flag, which were apps running in the legacy CryptKeeper
model.  Small tweaks to handle non-encryptionAware voice interaction
services.  Switch PackageManager to consult StorageManager about the
unlocked state of a user.

Bug: 22358539
Change-Id: Ic2865f9b81c10ea39369c441422f7427a3c3c3d6
2015-11-11 10:47:23 -08:00
Felipe Leme
a89c6e421e Added serial number in the bugreport message body.
Also labeled information contained in the body (i.e., Build Info: and Serial Number:).

BUG: 21454488

Change-Id: I5f2a62147ca3e1989aebfbd465f3e42b96b655df
2015-11-03 09:21:39 -08:00
Felipe Leme
96b1195956 Set ClipData with attachments URIs on bugreport notification.
The ACTION_SEND_MULTIPLE contract expects the EXTRA_TEXT to be an
ArrayList<String>, but it's currently set as String, which causes an
exception when exporting the EXTRA_STREAM as ClipData.

The right approach would be changing the EXTRA_TEXT content, but that
would break some clients like GMail, so a safer fix is to explicitly
set the ClipData.

Also removed unused variables and imports.

BUG: 21735884
BUG: 21729227

 Changes to be committed:
	modified:   src/com/android/shell/BugreportReceiver.java

Change-Id: If9954e8cae4af7b74f077a32806f25eb7d55dffb
2015-10-30 08:43:00 -07:00
Geoff Mendal
cc98d3fa51 Import translations. DO NOT MERGE
Change-Id: Idcb5330948acdc172f2af763f32e6d8235d64a30
Auto-generated-cl: translation import
2015-10-26 05:56:23 -07:00
Baligh Uddin
20622f6e66 Import translations. DO NOT MERGE
Change-Id: I49e6c5f9bef969104fc5a03f74f601b1e2c05e68
Auto-generated-cl: translation import
2015-09-10 12:34:40 -07:00
Tim Kilbourn
0e6dab92b7 am fca744ce: am 573cdc42: am 38ae1196: am 7cd6aaaf: am ee72f99d: Merge "Allow shell to disable keyguard when not secure" into mnc-dev
* commit 'fca744cef6800bbf923780ff0537ad618c715685':
  Allow shell to disable keyguard when not secure
2015-09-03 06:39:20 +00:00
Tim Kilbourn
573cdc420b am 38ae1196: am 7cd6aaaf: am ee72f99d: Merge "Allow shell to disable keyguard when not secure" into mnc-dev
* commit '38ae119688f94d68c42d8d29958038e37bb74915':
  Allow shell to disable keyguard when not secure
2015-09-02 17:59:51 +00:00
Tim Kilbourn
38ae119688 am 7cd6aaaf: am ee72f99d: Merge "Allow shell to disable keyguard when not secure" into mnc-dev
* commit '7cd6aaafda35509607e945fcadc4a556f75ed23b':
  Allow shell to disable keyguard when not secure
2015-09-02 17:48:28 +00:00
Tim Kilbourn
7cd6aaafda am ee72f99d: Merge "Allow shell to disable keyguard when not secure" into mnc-dev
* commit 'ee72f99dd14c8e531cd1a114d162a49636e7b809':
  Allow shell to disable keyguard when not secure
2015-09-02 17:40:36 +00:00
Tim Kilbourn
bba73a038e Allow shell to disable keyguard when not secure
Bug: 22694837
Change-Id: I0f08048f617d064017468f331a5c6875ab27174b
2015-09-01 14:21:09 -07:00
Jeff Sharkey
3f4c298248 am 0551d5d9: am ac4fd070: am 90023609: am 71f15791: am d88152b4: Merge "Give shell permission to move apps." into mnc-dev
* commit '0551d5d9ee2888779e9c37c9a509451ef65ef981':
  Give shell permission to move apps.
2015-08-28 20:18:39 +00:00
Jeff Sharkey
ac4fd0702e am 90023609: am 71f15791: am d88152b4: Merge "Give shell permission to move apps." into mnc-dev
* commit '90023609cff5e25697c852034106d9c4fdb9ea49':
  Give shell permission to move apps.
2015-08-28 19:59:40 +00:00
Jeff Sharkey
90023609cf am 71f15791: am d88152b4: Merge "Give shell permission to move apps." into mnc-dev
* commit '71f1579190ee3658db15f55a4e5571f03ce431b6':
  Give shell permission to move apps.
2015-08-28 19:48:26 +00:00
Jeff Sharkey
71f1579190 am d88152b4: Merge "Give shell permission to move apps." into mnc-dev
* commit 'd88152b4d910fa5e79908dcb6f14cd56ad03b21a':
  Give shell permission to move apps.
2015-08-28 19:36:31 +00:00
Jeff Sharkey
e515c6495d Give shell permission to move apps.
Also clear identity when measuring ASEC sizes to relax a second
permission requirement.

Bug: 23600574
Change-Id: Ib3a104426758e0e8f35dff0e504fe874bed7311f
2015-08-28 11:50:22 -07:00
Nicholas Sauer
21e79ac800 am 3671aa87: am 5554a4eb: am 6c97bb1b: am 59af87c2: am 7c17ec5f: Merge "Add GET_APP_OPS_STATS to Shell" into mnc-dev
* commit '3671aa878974a8ecb149b11f2b32766721833cf1':
  Add GET_APP_OPS_STATS to Shell
2015-08-26 21:11:51 +00:00
Nicholas Sauer
5554a4eb63 am 6c97bb1b: am 59af87c2: am 7c17ec5f: Merge "Add GET_APP_OPS_STATS to Shell" into mnc-dev
* commit '6c97bb1b744ff67ad5ec3d590bbf511c165672ee':
  Add GET_APP_OPS_STATS to Shell
2015-08-26 18:53:07 +00:00
Nicholas Sauer
6c97bb1b74 am 59af87c2: am 7c17ec5f: Merge "Add GET_APP_OPS_STATS to Shell" into mnc-dev
* commit '59af87c2b694fad361c5f7e053a19bf9e1483afa':
  Add GET_APP_OPS_STATS to Shell
2015-08-26 18:31:33 +00:00
Nicholas Sauer
59af87c2b6 am 7c17ec5f: Merge "Add GET_APP_OPS_STATS to Shell" into mnc-dev
* commit '7c17ec5fa5cb51d12713016622e4b5a939c8bb76':
  Add GET_APP_OPS_STATS to Shell
2015-08-26 18:25:26 +00:00
Nicholas Sauer
1344cb9b1b Add GET_APP_OPS_STATS to Shell
bug: 23397072
Change-Id: I9f60f175380048e0f3888d866069f8f76166c732
2015-08-25 08:47:50 -07:00
Geoff Mendal
8b29025bb6 Import translations. DO NOT MERGE
Change-Id: Ifec1749f39bdb7eedede6e2f478ca08f5fe3529e
Auto-generated-cl: translation import
2015-07-22 05:41:34 -07:00
Svet Ganov
28e7313992 am 71d12704: am 475858c3: am b295963b: am c00e49b6: am d4b566bf: Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev
* commit '71d12704f64eeace695a6b8e0cd8f36007b96270':
  Add APIs for verifier to grant at install and revoke permissions
2015-07-16 23:20:46 +00:00
Svet Ganov
475858c34d am b295963b: am c00e49b6: am d4b566bf: Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev
* commit 'b295963baebac1b70ca701a50c77a83659963608':
  Add APIs for verifier to grant at install and revoke permissions
2015-07-16 22:50:23 +00:00
Svet Ganov
b295963bae am c00e49b6: am d4b566bf: Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev
* commit 'c00e49b6e4e4cc8356529567040d6ee3be8c1dc3':
  Add APIs for verifier to grant at install and revoke permissions
2015-07-16 22:38:13 +00:00
Svet Ganov
c00e49b6e4 am d4b566bf: Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev
* commit 'd4b566bf56333de708908ce4accb5fb067be64f0':
  Add APIs for verifier to grant at install and revoke permissions
2015-07-16 22:23:38 +00:00
Svet Ganov
d4b566bf56 Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev 2015-07-16 22:22:01 +00:00
Svet Ganov
7121e18595 Add APIs for verifier to grant at install and revoke permissions
bug:22231699

Change-Id: Ie0c758bf73699f50bf99ff5aa0bf98dcc9004e37
2015-07-15 22:22:59 -07:00
Felipe Leme
396753d7c1 am 7ef4daa2: am 1bcd49a9: am 2ac41a90: am d9ab0ca2: am 68fd7c79: Merge "Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created." into mnc-dev
* commit '7ef4daa26be5000f2ccba80204b69c8058428f51':
  Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created.
2015-07-15 23:30:43 +00:00
Felipe Leme
1bcd49a9eb am 2ac41a90: am d9ab0ca2: am 68fd7c79: Merge "Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created." into mnc-dev
* commit '2ac41a902eb4e2af32ff4063dca03b656baa860f':
  Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created.
2015-07-15 22:56:46 +00:00
Felipe Leme
2ac41a902e am d9ab0ca2: am 68fd7c79: Merge "Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created." into mnc-dev
* commit 'd9ab0ca287a9ab1b5af19d70cb9b13e0e16cfcba':
  Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created.
2015-07-15 22:45:11 +00:00
Felipe Leme
d9ab0ca287 am 68fd7c79: Merge "Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created." into mnc-dev
* commit '68fd7c798d213bbe304775b13d775ee868abb448':
  Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created.
2015-07-15 22:26:47 +00:00
Geoff Mendal
78b6e6c742 Merge "Import translations. DO NOT MERGE" into mnc-dev 2015-07-15 21:56:27 +00:00
Geoff Mendal
6289ad5d8f Import translations. DO NOT MERGE
Change-Id: I428e579d5968139dcdf6e8e693f4d2eef182c682
Auto-generated-cl: translation import
2015-07-15 14:19:57 -07:00