307 Commits

Author SHA1 Message Date
Felipe Leme
f8cf395636 Removed FLAG_ADVANCED.
On M, internal storage such as bugreport files were only shown when user
selected the "Show internal storage", but such UI has changed on N.

BUG: 27862860
Change-Id: I1edf086a9f9345303595ee952e4646764709d36d
2016-03-28 13:02:04 -07:00
Felipe Leme
1ae5a69bc4 Proper handle of duplicated BUGREPORT_STARTED.
When Shell receives a BUGREPORT_STARTED intent for a process it's
already monitoring, it should completely ignore it, but current it's
taking an extra screenshot.

BUG: 27804637
Change-Id: I733cacfee5e9c82646a3295b50c3856b6e0352c3
2016-03-23 14:57:17 -07:00
Felipe Leme
9545d8e337 Merge "Changed logic when dumpstate's max progress increases." into nyc-dev 2016-03-22 17:21:20 +00:00
Felipe Leme
3fc44b9a62 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
2016-03-22 10:05:30 -07:00
Aga Wronska
1719b3555d Add config flag to show/hide internal storage.
Hide internal storage by default.

Revert "Always show intern storage."

This reverts commit 7c4395804e450533afb553ab992c47f737da8a9b.

Bug: 27683276

Change-Id: I04ea8b9a307babcea003f9bec200d41265a42c7f
2016-03-21 17:33:27 -07:00
Geoff Mendal
feb85ef1a3 Import translations. DO NOT MERGE
Change-Id: Ic015ff842053551bbe10b0eb420137cd045a23ef
Auto-generated-cl: translation import
2016-03-19 14:04:50 +05:30
Jeff Sharkey
8a372a0a28 Refactoring FBE APIs based on council feedback.
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
2016-03-17 14:49:08 -06:00
Felipe Leme
f3a65fd317 Merge "Minor UI improvements and code cleanup:" into nyc-dev 2016-03-16 16:29:57 +00:00
Geoff Mendal
04517c3e2e Import translations. DO NOT MERGE
Change-Id: I949b397af1475733943f0b3597c9ff4c050bba03
Auto-generated-cl: translation import
2016-03-16 07:21:07 -07:00
Felipe Leme
1f7659ba34 Merge "Log received intent." into nyc-dev 2016-03-15 20:53:14 +00:00
Felipe Leme
39355fb5f7 Log received intent.
BUG: 27660862
Change-Id: Ibe49080c15448ac2672f5e1d5eeaf6d9ff8d282e
2016-03-15 13:52:14 -07:00
Felipe Leme
213e355c77 Handle AccountManager failures so Shell doesn't crash.
BUG: 27665208
Change-Id: Iccb6ce810c8e1c93bded58871d7ec220b7d14ba9
2016-03-15 13:21:43 -07:00
Ian Pedowitz
440ef18fe7 Merge "Revert "Permissions: Get rid of GET_ACCOUNTS"" into nyc-dev 2016-03-15 17:09:53 +00:00
Ian Pedowitz
358e51f3d1 Revert "Permissions: Get rid of GET_ACCOUNTS"
This reverts commit d39600585bcb720d739ef6f0091066e3d4f77765.

Bug: 27665091
Change-Id: I7d017ba7062ac594225229436d2877c7d21fb065
2016-03-15 17:08:27 +00:00
Felipe Leme
208b1881ae 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
2016-03-14 19:07:43 -07:00
Carlos Valdivia
658e4c5ece Merge "Permissions: Get rid of GET_ACCOUNTS" into nyc-dev 2016-03-15 01:36:26 +00:00
Geoff Mendal
4e81500ba7 Import translations. DO NOT MERGE
Change-Id: Ibb696b389c27d30115f09d8e0f2d59dcec951c8b
Auto-generated-cl: translation import
2016-03-14 07:22:38 -07:00
Carlos Valdivia
d39600585b Permissions: Get rid of GET_ACCOUNTS
Second attempt. Still need to add strict mode violation checks and
logging.

Bug: 21901286

This reverts commit bf33bd4d31cfec895c96990525b0cb856407c8d6.

Change-Id: I5d73343544c32ce4fc4c377ba44db8e677a1287d
2016-03-13 17:13:54 -07:00
Felipe Leme
bded63d9c9 Merge "Don't log metrics for initial screenshot." into nyc-dev 2016-03-12 00:38:34 +00:00
Felipe Leme
52ca701cd4 Don't log metrics for initial screenshot.
BUG: 26759986
Change-Id: Ie1ff6626bb3174efa12c7cefe14782f4c18fb6d2
2016-03-11 11:47:50 -08:00
Bill Yi
d835db0f28 Import translations. DO NOT MERGE
Change-Id: If375ea874afe99e685cb66c295785b108fc98e29
Auto-generated-cl: translation import
2016-03-10 18:52:52 -08:00
Felipe Leme
0108597395 Merge "Warn user when bugreport is finished but screenshot is pending." into nyc-dev 2016-03-09 22:12:25 +00:00
Felipe Leme
509d407e30 Merge "Vibrate after a screenshot is taken, not before." into nyc-dev 2016-03-09 22:05:30 +00:00
Felipe Leme
5ee846dd18 Warn user when bugreport is finished but screenshot is pending.
BUG: 27524556
Change-Id: Iaecdd01605dc4b01cdf669baf443eaee7fb20f6f
2016-03-09 10:41:32 -08:00
Felipe Leme
aa00f2d909 Vibrate after a screenshot is taken, not before.
BUG: 27389320
Change-Id: I383b4252a80ae2f1d820a97b9deb930dccf50313
2016-03-08 15:59:46 -08:00
Felipe Leme
d06e5afd6f Merge "Minor improvements on BugreportProgressService:" into nyc-dev 2016-03-08 21:18:23 +00:00
Felipe Leme
4f663f6c25 Minor improvements on BugreportProgressService:
- Removed unnecessary ContextWrapper used to get files dir.
- Immproved logging.

BUG: 27548183
BUG: 27524556
Change-Id: Ia04c6b7640969e0013ae282efbb1142fc0fc5695
2016-03-08 13:13:26 -08:00
Felipe Leme
0f2daaf2f7 Call stopSelfWhenDone() *after* canceling the notification.
When a bugreport is shared it's necessary to remove its system notification and
stop the service if there is no more pending bugreports. Since the
service will might be killed as a result, to call to cancel the
notification must be done prior to calling stopSelf().

BUG: 27524556
Change-Id: Iae9a263b6cee0e4a0a7df3e52621e56b50983fec
2016-03-08 12:44:22 -08:00
Geoff Mendal
d76f9a23c9 Import translations. DO NOT MERGE
Change-Id: I4124a949eb423b0ab9074825c1eb7f00f1fd7302
Auto-generated-cl: translation import
2016-03-07 07:20:15 -08:00
Michal Karpinski
2552f8aec4 Do not re-define remote bugreport constants defined in DevicePolicyManager
Bug: 26226230
Change-Id: Ib26d8ba872b1ebdf24b43312daa1d04b90a7f393
2016-03-04 13:16:28 +00:00
Steve McKay
b4672ef6df Merge "Always show intern storage." into nyc-dev 2016-03-02 18:49:28 +00:00
Steve McKay
7c4395804e Always show intern storage.
Only show debug root when devel mode is enabled.
Remove all traces of "advanced".

Bug: 27297398

Change-Id: Ie7e8be282531bd245351d56ababa8ca625c10fd2
2016-03-02 10:47:59 -08:00
Geoff Mendal
1ddc11be55 Import translations. DO NOT MERGE
Change-Id: Id4836eb0d7454cbb028a40032ecd229e4a4d90d3
Auto-generated-cl: translation import
2016-03-02 07:20:37 -08:00
Felipe Leme
bbd91e5844 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
2016-02-29 16:46:54 -08:00
Felipe Leme
1e33af88ed Merge "Open bugreport info when touching notification (as well as DETAILS button)." into nyc-dev 2016-02-26 17:49:54 +00:00
Felipe Leme
db31363aa9 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
2016-02-25 17:09:46 -08:00
Felipe Leme
17fc60e13c Merge "Using Message.obtain() to decrease number of Messages allocated." into nyc-dev 2016-02-26 00:32:29 +00:00
Felipe Leme
8648a15406 Using Message.obtain() to decrease number of Messages allocated.
BUG: 26906985
Change-Id: Ide8c6e308dcc83e9627ec775a4d977d17cd2f0a9
2016-02-25 16:24:43 -08:00
Felipe Leme
5d9000aa45 Removed toast messsage sent after screenshot is taken.
That toast was kind of reduntant (since the phone already vibrates
before taking a screenshot) and often useless (because it was displayed
seconds after requested).

BUG: 26577203
Change-Id: I0ba6f974eefd473d158f7fefb12f6a5d2a50b772
2016-02-25 13:10:14 -08:00
Felipe Leme
262887834c Reset UI fields when dialog is reused, otherwise it might contain fields
from a previous bug report.

BUG: 26524513
Change-Id: If9d176806b28120b57dddeb62b636065f8ff7cf6
2016-02-25 12:10:43 -08:00
Felipe Leme
85ae3cf46a 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
2016-02-25 11:14:03 -08:00
Felipe Leme
510e922e47 Created counter (tron_varz_dumpstate_duration) for dumpstate duration.
BUG: 26759986
Change-Id: I18534c127b35776a03e31b9d5cd190d864dff9e6
2016-02-23 09:40:13 -08:00
Felipe Leme
6605bd89c5 Initial implementation of logging metrics for bugreport.
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
2016-02-23 09:08:56 -08:00
Felipe Leme
6a05eee2bd Fixed permissions so Shell can call netpolicy methods.
BUG: 27127112
Change-Id: I5548aba70a1c25be139462fbabe9a854fa96d2a6
2016-02-19 17:47:46 -08:00
Michal Karpinski
f58179a24b Merge "Be less aggressive in removing old remote bugreport files" into nyc-dev 2016-02-17 17:18:19 +00:00
Felipe Leme
6cb955826b Merge "Cancel notifications when user tap on Details or Take Screenshot after service died." into nyc-dev 2016-02-17 16:11:16 +00:00
Geoff Mendal
878b249c90 Import translations. DO NOT MERGE
Change-Id: If833e6af6b9206411e02db9c081d410c4893d73e
Auto-generated-cl: translation import
2016-02-17 07:14:57 -08:00
Michal Karpinski
a57f0e6b14 Be less aggressive in removing old remote bugreport files
Always keep all the files of the remote bugreport
operation and keep them for at least a day.

Bug: 27215341
Change-Id: I514956004bf982e868a87b39c705d7c4a4a7b001
2016-02-17 13:47:17 +00:00
Felipe Leme
1eee1996f5 Cancel notifications when user tap on Details or Take Screenshot after
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
2016-02-16 13:17:53 -08:00
Geoff Mendal
68e221ec0c Import translations. DO NOT MERGE
Change-Id: I5450d165959f42088148bf3aa9789d73137475bc
Auto-generated-cl: translation import
2016-02-15 07:19:37 -08:00