14 Commits

Author SHA1 Message Date
Felipe Leme
e28d7fc21c Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created.
BUG: 20447313
Change-Id: Iecbaf3ce2f0e3d82ac31a6c7bfbd8fb3037de5e4
2015-07-13 14:59:35 -07:00
Ian Pedowitz
c16a26a2b9 Merge "Renaming bugreport.txt to bugreportFile.getName()" into mnc-dev 2015-06-22 23:01:10 +00:00
Wei Liu
9fbee9ba98 resolved conflicts for merge of 1dac6bd9 to mnc-dev
Change-Id: I000b35f5e2658a065c780396254bcb88f1cbce5e
2015-06-18 22:52:37 -07:00
Ian Pedowitz
bd82c7d364 Renaming bugreport.txt to bugreportFile.getName()
Many times to file a bug, its necessary to take several bugreports and
attach them all to the same bug.  With the current implementation, all
extracted files are bugreport.txt which makes it difficult to attach
several bugreports to the same bug, and reference them throughout the
bug uniquely.

Bug: 20447313
Change-Id: I22d2286d06c8dfb82273b5b98c48b21f77941b15
2015-06-18 07:43:56 -07:00
Wei Liu
ae363d2db4 Wear doesn't need Shell to send notification when bugreport captured.
b/19179040

Change-Id: Iec74e1e55adee16c8674f28a6e7d697499b85acf
2015-06-17 15:32:05 -07:00
Felipe Leme
00f4a6ecbc Improved zipping logic so it zips chunks, instead of the whole file at once, to avoid OOM.
BUG: 20447313
Change-Id: I66f90cdd2a07288f9e37a38185f1583c57cf65c8
2015-06-16 10:32:45 -07:00
Felipe Leme
55beae09e5 Changed BugReportReceiver to send zipped bugreports.
When BugReporterReceiver receives a android.permission.DUMP, it will handle the bugreport file (extra android.intent.extra.BUGREPORT) depending on its format:

 - If it's a plain-text file (extension .txt), it will create a zip file with the plain-text report renamed as bugreport.txt.
 - If there is an error creating the zip file, the plain-text bugreport will be sent instead.
 - If it's not a plain-text file, it fill send the file as is (so if 'dumpstate' is later changed to generate a zipped file directly, nothing has to be done here).

Note that only the bugreport itself is included in the zip file, the screenshot is still sent separately (extra android.intent.extra.SCREENSHOT), so the receiver of the bugreport intent can display a screenshot thumbnail without unzipping the other file (which is useful when sending the bugreport through GMail, for example).

BUG: 20447313
BUG: 21868658
Change-Id: I3fa1e0c89190bfe6fa5c418f0f01ce1fb376f537
2015-06-16 09:05:22 -07: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
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Wei Liu
e255e4e536 Hide bug report notification in Android Framework from watches.
Bug: 17806348
Change-Id: I1a90a9bc68d8ef4ff540dbbd9e4af4bfed8a61ae
2014-10-06 14:50:10 -07:00
Selim Cinek
255dd04271 Added notification color to all system notifications
Bug: 17128331
Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
2014-08-20 14:25:18 +02:00
Jeff Sharkey
e37e9ba3ca Show notification ticker for finished bugreports.
Change-Id: I7d326b0da83c3ae334739cdb8cb4ca18f948c50f
2013-03-20 12:10:51 -07:00
Jeff Sharkey
d9526907d1 Move deleteOlderFiles() to framework, tests.
Supports both age and count based constraints.  Added light docs and
tests to verify behavior.

Bug: 8387555
Change-Id: If4d0dac8bc54ce705c2a339bc09a60ea748728b8
2013-03-14 15:04:12 -07: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