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

Commit b7db79be authored by Nandana Dutt's avatar Nandana Dutt Committed by android-build-merger
Browse files

Merge "Warn about sensitive bugreport contents." am: 702587e7

am: f0f9fab3

Change-Id: I57e9d3698fc6e16256ef46f73e20dc8729db5358
parents ba27861b f0f9fab3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.database.Cursor;
import android.database.MatrixCursor;
import android.database.MatrixCursor.RowBuilder;
import android.net.Uri;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
@@ -67,6 +68,18 @@ public class BugreportStorageProvider extends FileSystemProvider {
        return result;
    }

    @Override
    public Cursor queryChildDocuments(
            String parentDocumentId, String[] projection, String sortOrder)
            throws FileNotFoundException {
        final Cursor c = super.queryChildDocuments(parentDocumentId, projection, sortOrder);
        final Bundle extras = new Bundle();
        extras.putCharSequence(DocumentsContract.EXTRA_INFO,
                getContext().getText(R.string.bugreport_confirm));
        c.setExtras(extras);
        return c;
    }

    @Override
    public Cursor queryDocument(String documentId, String[] projection)
            throws FileNotFoundException {