Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10d73a55 authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Created a new bug report workflow so user can keep track of its progress."

parents 5a1c7e97 69c0292a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@
            android:name=".BugreportReceiver"
            android:permission="android.permission.DUMP">
            <intent-filter>
                <action android:name="android.intent.action.BUGREPORT_STARTED" />
                <action android:name="android.intent.action.BUGREPORT_FINISHED" />
            </intent-filter>
        </receiver>
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
<resources>
    <string name="app_label">Shell</string>

    <!-- Title of notification indicating a bugreport process is in progress. [CHAR LIMIT=50] -->
    <string name="bugreport_in_progress_title">Bug report in progress</string>
    <!-- Title of notification indicating a bugreport has been successfully captured. [CHAR LIMIT=50] -->
    <string name="bugreport_finished_title">Bug report captured</string>

+383 −27

File changed.

Preview size limit exceeded, changes collapsed.

+7 −2
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package com.android.shell;

import static com.android.shell.BugreportProgressService.EXTRA_BUGREPORT;
import static com.android.shell.BugreportProgressService.EXTRA_ORIGINAL_INTENT;
import static com.android.shell.BugreportProgressService.INTENT_BUGREPORT_FINISHED;
import static com.android.shell.BugreportProgressService.getFileExtra;

import java.io.File;
@@ -50,13 +52,16 @@ public class BugreportReceiver extends BroadcastReceiver {
        // Clean up older bugreports in background
        cleanupOldFiles(intent);

        // Delegate to service.
        // Delegate intent handling to service.
        Intent serviceIntent = new Intent(context, BugreportProgressService.class);
        serviceIntent.putExtras(intent.getExtras());
        serviceIntent.putExtra(EXTRA_ORIGINAL_INTENT, intent);
        context.startService(serviceIntent);
    }

    private void cleanupOldFiles(Intent intent) {
        if (!INTENT_BUGREPORT_FINISHED.equals(intent.getAction())) {
            return;
        }
        final File bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
        final PendingResult result = goAsync();
        new AsyncTask<Void, Void, Void>() {
+52 −1

File changed.

Preview size limit exceeded, changes collapsed.

Loading