Commit Graph

129 Commits

Author SHA1 Message Date
TreeHugger Robot
0ecc0ff5e0 Merge "Enable wide color gamut rendering" 2017-06-02 20:07:56 +00:00
Romain Guy
26a2b97dbe Enable wide color gamut rendering
When wide color gamut rendering is requested, hwui will now
use an rgba16f scRGB-nl surface for rendering. This change
also fixes the way screenshots are handled in the platform
to behave properly with wide gamut rendering.

This change does not affect hardware layers. They also
need to use rgba16f scRGB-nl; this will be addressed in
another CL.

Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases

Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5
2017-06-02 11:02:13 -07:00
Amit Pawar
44ff1b7e78 Merge "Fix #62169466 bug report sharing options empty" into oc-dev am: 4d473c65cb
am: e775158c6b

Change-Id: Ice0e3330502330dde934d7e7544e466fcffcacca
2017-05-30 20:39:37 +00:00
Amith Yamasani
1d6e1759d2 Fix #62169466 bug report sharing options empty
Was caused by a new requirement to not offer to show
non-exported intent handlers as options. For first
time warning dialog, don't show a chooser activity.

Change-Id: Ibada9a7a14b77ec0670bf35ba0944f369d42bf69
Fixes: 62169466
Test: manual
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
2017-05-30 20:04:32 +00:00
Makoto Onuki
72f378d0c1 Merge "Working around bugreport crash issues" into oc-dev am: 5176a4cda3
am: 44cb1486f3

Change-Id: I70495f11952e9d234d74fa3fd7149dec70fb7350
2017-05-25 18:27:52 +00:00
Makoto Onuki
22291dde0a Working around bugreport crash issues
Overall we need more synchronization, but I'm taking a safe approach
here for oc-dev for now.

Bug: 62043115
Test: adb shell am instrument -w com.android.shell.tests
Change-Id: I0e22c5160cb96ce51dc1775237f01b7bf5c97a17
2017-05-25 00:24:58 +00:00
Ben Lin
14ec967020 Merge "Make BugreportStorageProvider subclass FileSystemProvider." 2017-05-24 00:12:15 +00:00
Bryce Lee
6483b86a92 Add new task flag when starting chooser activity in bug report.
This flag is required whenever starting an activity from a
non-activity context.

Change-Id: Ia77e6e7801d712a20d407bc2ac92e543bc287010
Fixes: 62016780
Test: Click on generated bug report notification
2017-05-23 09:02:09 -07:00
Ben Lin
d8235e2647 Make BugreportStorageProvider subclass FileSystemProvider.
This allows it to gain all the benefits of FSP, ie. listening in on
File-system level changes without any explicitly notification Uri
passing back and forth.

This also reverts commit 6c9ff513c6d7d3de7ab8920d88111c2b1dc1bb1f.

Test: Manual test.
Bug: 38183534
Change-Id: I30a1d8489ec8732bdb80611bd8fa7099763de2a3
2017-05-22 17:15:51 -07:00
Makoto Onuki
c6cf2b8072 Only show progress log every 10%
Bug: 37501913
Test: manual
Change-Id: Ib7d14da0af33d39aa29b0b58c63c51e1059e0ada
2017-04-21 12:01:03 -07:00
Naveen Kalla
ca3d5434e8 Add API to request Bug Report with a certain title and description
ActivityManagerService will send the details to dumpstate and
BugreportProgressService will get the details from dumpstate and use
that for the notification.

Bug: 33561517
Test: Modify TelephonyMonitor to use this API and ensure that the
      notification uses that the title and description sent as arguments
      to the API. File a bug using betterBug and ensure that the
      information gets populated automatically.

Change-Id: I455f1df2278e5d569dd19c74245a0704dcf5a321
2017-03-23 12:06:04 +00:00
Dmitri Plotnikov
ce42134828 Enabling bugreport notifications on TV
Bug: 36175844
Test: by generating a bugreport (long-press DPAD_CENTER + BACK)
Test: verified that BugreportProgressServiceTest still passes
Change-Id: If5bf53512c60a359838aa76dc61b90d4e67a45df
2017-03-14 08:19:13 -07:00
Jorim Jaggi
f631ef769a Fix sharing bugreports from lockscreen
When launching ChooserActivity from lockscreen, we will start it
in stopped state because lockscreen is still showing, meaning that
the activity goes through start -> resume -> pause -> stop
immediately after it was launched, and will be later resumed once
Keyguard actually goes away.

However, ResolverActivity finished itself in onStop. We add a
private extra to change this behavior for sharing bugreports.

Test: Take bugreport, double tap on it on lockscreen
Test: com.android.shell.BugreportReceiverTest$1
Bug: 33009364
Change-Id: I973b2c71587950499b7c88b16af9cf1387795e17
2017-02-24 17:37:08 +00:00
Felipe Leme
92aaaa21ee Moved bugreport intents to the com.android.internal namespace.
Change-Id: I5ad53668b9393188cee4d8b0382f9c303ff95777
Fixes: 35275802
Test: manual verification
2017-02-15 16:08:53 -08:00
TreeHugger Robot
ccb258d001 Merge "Added more logging on BugreportProgressService." 2017-02-14 01:01:31 +00:00
Felipe Leme
ec60e5f40c Added more logging on BugreportProgressService.
BUG: 35010191
BUG: 35077822

Test: manual verification
Test: BugreportReceiverTest passes
Change-Id: Iaa37f633c6415127a3efa07c166f5a771a13ff5a
2017-02-10 17:41:18 -08:00
Felipe Leme
17d9e9c36d Dismiss keyguard before displaying bugrepot details dialog.
Fixes: 27494228
Test: manual verification
Test: BugreportReceiverTest passes

Change-Id: I7755fc2d3d4f1f9b55301c65f7a58c9374e93664
2017-02-10 16:20:02 -08:00
Makoto Onuki
ff329c4329 Bugreport sharing is now work profile aware
Now we look at work profile too, if available, when looking for a preferred
email address.

TODO: The chooser activity should default to work profile too, but it seems
to require a lot more work, so not done yet.

Test: manual tests
Test: adb shell am instrument -w -e class com.android.shell.BugreportProgressServiceTest com.android.shell.tests

Bug 30865666

Change-Id: I9b4776d53455a23bfdc4960da25e98bd1dc1b2a1
2017-01-05 14:14:51 -08:00
Felipe Leme
326336d14c Fixed obsolete comment.
Bug:32906084
Test: not needed
Change-Id: I0c79e4ffb66405a30d3c83d2e7654cbef413f6e1
2016-11-15 11:24:42 -08:00
Felipe Leme
fa26a0ed08 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
2016-11-11 15:50:21 -08:00
Tamas Berghammer
383db5ebcc Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:09 +00:00
Tomasz Mikolajewski
219fa882d1 Remove support for archives from External and Bugreport providers.
Change-Id: Ia281fe05a0a6a5dd6ff1b66d7197312cf4391793
Test: Compiles.
Bug: 31783726
2016-09-28 11:32:59 +09:00
Felipe Leme
1a83dede85 Use a system property to call different bugreport types.
Currently, we define 4 hardcoded init services to launch dumpstate with
different command-line options (since dumpstate must be launched by
root):

- bugreport
- bugreportplus
- bugreportwear
- bugreportremote

This approach does not scale well; a better option is to have just one
service, and let the framework pass the extra arguments through a system
property.

BUG: 31649719

Test: manual
Change-Id: I1d627a73bfbdd9930c605fa4468c15282a23bb65
2016-09-21 11:50:44 -07:00
Ben Lin
663e0e97d5 Push delete notification when Bug reports are deleted. am: 86805aa3af am: 64146c5d24
am: b01be62d58

Change-Id: I8e1b6dc42e44307feef1ba912a3465c2d25594e1
2016-08-31 04:37:16 +00:00
Ben Lin
86805aa3af Push delete notification when Bug reports are deleted.
Bug: 28768706
Change-Id: I6d3e91fe7d12be44918f97cef12c99d936401270
2016-08-29 14:08:32 -07:00
Felipe Leme
034bcf425a Cancel dialog before stopping service.
Fixes: 30746086

Change-Id: Iea8a197a2785259dd80aa8130d79ded484562826
2016-08-08 18:07:44 -07:00
TreeHugger Robot
5f48b026f0 Merge "Enable name text field when re-using the details dialog." 2016-08-04 02:15:53 +00:00
Felipe Leme
da1fbdd6f2 Enable name text field when re-using the details dialog.
Change-Id: I10671fc00ea918da901f36f122641e646057888c
Fixes: 30642226
2016-08-03 17:45:43 -07:00
TreeHugger Robot
1b5eb1e3cd Merge "Fixed BugreportReceiverTest failures:" 2016-08-04 00:31:27 +00:00
Felipe Leme
ca5002f6bd 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
2016-08-03 16:09:35 -07:00
Felipe Leme
6dd4e88210 Fixed year on copyright notice.
BUG: 30429392
Change-Id: If6477ccde5820dd118ad92bb5d4f74d938cf0d83
2016-08-03 10:05:54 -07:00
Felipe Leme
cec3844b6d Removed unused imports and fixed copyright notice.
BUG: 30429392
Change-Id: I3c849e507437ef733b04954af68bd47d00dc5165
2016-08-03 10:03:30 -07:00
Felipe Leme
b4027a01e3 Use SurfaceControl.screenshot() instead of screencap for screenshots.
*** cherrypick of 8cfc23f ***

Change-Id: I5a9e7bbc5f3ae176ac5ae7209a133526992e92d4
Fixes: 30429392
2016-08-02 17:33:48 -07:00
Felipe Leme
aba9743643 Use SurfaceControl.screenshot() instead of screencap for screenshots.
Change-Id: I5a9e7bbc5f3ae176ac5ae7209a133526992e92d4
Fixes: 30429392
2016-07-28 17:31:45 -07:00
Felipe Leme
91699af8c6 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
2016-07-28 15:29:17 -07:00
Wei Liu
213b94ee1a Merge \\"Use the Shell app to show the bugreport notification on Wear.\\" into nyc-mr1-dev am: 1dfbf794b5
am: bc3c068189

Change-Id: I4555c232c5fc9d10a9b9d9cd0d64ac80720e30e9
2016-07-19 17:29:50 +00:00
Wei Liu
9f35541760 Use the Shell app to show the bugreport notification on Wear.
b/30041885

Change-Id: I998aa1606eb12f74a407fbafd9abc11c9454fb66
2016-07-18 13:56:25 -07:00
Felipe Leme
a86a3012ef Close details dialog when bugreport is canceled by user.
BUG: 30158896
Change-Id: I0eab22586f6b431f2abe837088d48a655e03d213
2016-07-18 13:29:46 -07:00
Ben Lin
c6905cfb11 Register change Uri and notify changes in bugreportServices.
Bug: 28767380
Change-Id: Ia4d1f5a2e44881d300f2869c628d4990406caf40
(cherry picked from commit 6c9ff513c6d7d3de7ab8920d88111c2b1dc1bb1f)
(cherry picked from commit 93fafd67a6)
2016-05-23 20:07:04 +00:00
Ben Lin
93fafd67a6 Register change Uri and notify changes in bugreportServices.
Bug: 28767380
Change-Id: Ia4d1f5a2e44881d300f2869c628d4990406caf40
(cherry picked from commit 6c9ff513c6d7d3de7ab8920d88111c2b1dc1bb1f)
2016-05-18 23:49:11 +00:00
Steve McKay
53a528bb4f Add archive support to Bug report docs provider.
Bug: 28386918
Change-Id: I2270324be3f020d73a68151002f885f70eb1449c
2016-04-27 16:46:16 -07:00
Felipe Leme
af096719c0 Don't opt-out of warning dialog by default on user builds.
BUG: 28341946
Change-Id: I9ce6bf52a02a14055d4ded41aac50c79abdb4ee9
2016-04-25 13:41:28 -07:00
Felipe Leme
45a905bbaf Show a toast when details cannot be added to zip file.
BUG: 28291423
Change-Id: I7febf66ef23f38b41fb1909324ee2260444518f6
2016-04-22 15:23:27 -07:00
Felipe Leme
69c53e65b9 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
2016-04-20 14:43:37 -07:00
TreeHugger Robot
0304688882 Merge "Only try to add details to zip once." into nyc-dev 2016-04-20 19:03:02 +00:00
Felipe Leme
51a4ede593 Only try to add details to zip once.
When the user enters details (title or description) to the bugreport,
Shell tries to add a title.txt (and/or description.txt) to the zip and
uses 2 instance variables (addedDetailsToZip and addingDetailsToZip) to
control its state.

The problem with the current approach is that if there is a failure
adding the entries (for example, if the entries already exist), these
variables are not updated and hence when the user taps Share, it will
try to add the entries again, which most likely would fail.

BUG: 28291423
Change-Id: I56a71256be4f8de15f8126b815334277319e8e8a
2016-04-20 10:25:12 -07:00
Felipe Leme
65a9c6760e Show "Android System" instead of "Shell" on notifications.
BUG: 26517701
Change-Id: If2543b8db0fdd913365df6f69cf26146d32d4b15
2016-04-19 09:49:18 -07:00
Felipe Leme
079f89614c 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
2016-04-18 12:06:58 -07:00
TreeHugger Robot
7fd1cbd49d Merge "Revert warning logic so it has a "don't show again" message." into nyc-dev 2016-04-13 17:56:34 +00:00
Felipe Leme
fcca68dfb1 Revert warning logic so it has a "don't show again" message.
BUG: 28140003

Change-Id: I93e7b1494a0f4c5ca080fbe9dd94dc2168092ffa
2016-04-13 09:36:24 -07:00