@@ -165,6 +165,7 @@ public void onBugreportShared(final Context context, Intent intent,
165
165
final String bugreportFileHash ) {
166
166
Log .i (TAG , "Bugreport shared, hash: " + bugreportFileHash );
167
167
final Uri bugreportUri = intent .getData ();
168
+ Log .i (TAG , "Bugreport URI: " + bugreportUri );
168
169
169
170
final PendingResult result = goAsync ();
170
171
new AsyncTask <Void , Void , String >() {
@@ -180,16 +181,20 @@ protected String doInBackground(Void... params) {
180
181
in = new FileInputStream (mInputPfd .getFileDescriptor ());
181
182
outputBugreportFile = new File (context .getExternalFilesDir (null ),
182
183
bugreportUri .getLastPathSegment ());
184
+ Log .i (TAG , "Writing bugreport to " + outputBugreportFile );
183
185
out = new FileOutputStream (outputBugreportFile );
184
186
byte [] buffer = new byte [1024 ];
185
187
int read ;
188
+ long totalRead = 0 ;
186
189
while ((read = in .read (buffer )) != -1 ) {
190
+ totalRead += read ;
187
191
out .write (buffer , 0 , read );
188
192
}
189
193
in .close ();
190
194
out .close ();
191
195
message = context .getString (R .string .received_bugreport ,
192
- outputBugreportFile .getPath (), bugreportFileHash );
196
+ outputBugreportFile .getPath (), bugreportFileHash , totalRead );
197
+ Log .i (TAG , message );
193
198
} catch (IOException e ) {
194
199
Log .e (TAG , e .getMessage ());
195
200
message = context .getString (R .string .received_bugreport_failed_retrieval );
0 commit comments