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

Commit a89c6e42 authored by Felipe Leme's avatar Felipe Leme
Browse files

Added serial number in the bugreport message body.

Also labeled information contained in the body (i.e., Build Info: and Serial Number:).

BUG: 21454488

Change-Id: I5f2a62147ca3e1989aebfbd465f3e42b96b655df
parent 2d3c59c3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -136,9 +136,10 @@ public class BugreportReceiver extends BroadcastReceiver {
        // EXTRA_TEXT should be an ArrayList, but some clients are expecting a single String.
        // So, to avoid an exception on Intent.migrateExtraStreamToClipData(), we need to manually
        // create the ClipData object with the attachments URIs.
        intent.putExtra(Intent.EXTRA_TEXT, SystemProperties.get("ro.build.description"));
        final ClipData clipData = new ClipData(
                null, new String[] { mimeType },
        String messageBody = String.format("Build info: %s\nSerial number:%s",
                SystemProperties.get("ro.build.description"), SystemProperties.get("ro.serialno"));
        intent.putExtra(Intent.EXTRA_TEXT, messageBody);
        final ClipData clipData = new ClipData(null, new String[] { mimeType },
                new ClipData.Item(null, null, null, bugreportUri));
        clipData.addItem(new ClipData.Item(null, null, null, screenshotUri));
        intent.setClipData(clipData);