Loading core/java/android/app/IActivityManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ interface IActivityManager { in String shareDescription); void requestInteractiveBugReport(); void requestBugReportWithExtraAttachment(in Uri extraAttachment); void requestFullBugReport(); void requestRemoteBugReport(long nonce); boolean launchBugReportHandlerApp(); Loading packages/Shell/src/com/android/shell/BugreportProgressService.java +15 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import android.os.AsyncTask; import android.os.Binder; import android.os.BugreportManager; import android.os.BugreportManager.BugreportCallback; import android.os.BugreportManager.BugreportCallback.BugreportErrorCode; import android.os.BugreportParams; import android.os.Bundle; import android.os.FileUtils; Loading Loading @@ -169,6 +168,8 @@ public class BugreportProgressService extends Service { static final String EXTRA_DESCRIPTION = "android.intent.extra.DESCRIPTION"; static final String EXTRA_ORIGINAL_INTENT = "android.intent.extra.ORIGINAL_INTENT"; static final String EXTRA_INFO = "android.intent.extra.INFO"; static final String EXTRA_EXTRA_ATTACHMENT_URI = "android.intent.extra.EXTRA_ATTACHMENT_URI"; private static final int MSG_SERVICE_COMMAND = 1; private static final int MSG_DELAYED_SCREENSHOT = 2; Loading Loading @@ -634,9 +635,10 @@ public class BugreportProgressService extends Service { long nonce = intent.getLongExtra(EXTRA_BUGREPORT_NONCE, 0); String baseName = getBugreportBaseName(bugreportType); String name = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()); Uri extraAttachment = intent.getParcelableExtra(EXTRA_EXTRA_ATTACHMENT_URI, Uri.class); BugreportInfo info = new BugreportInfo(mContext, baseName, name, shareTitle, shareDescription, bugreportType, mBugreportsDir, nonce); BugreportInfo info = new BugreportInfo(mContext, baseName, name, shareTitle, shareDescription, bugreportType, mBugreportsDir, nonce, extraAttachment); synchronized (mLock) { if (info.bugreportFile.exists()) { Log.e(TAG, "Failed to start bugreport generation, the requested bugreport file " Loading Loading @@ -1184,6 +1186,10 @@ public class BugreportProgressService extends Service { clipData.addItem(new ClipData.Item(null, null, null, screenshotUri)); attachments.add(screenshotUri); } if (info.extraAttachment != null) { clipData.addItem(new ClipData.Item(null, null, null, info.extraAttachment)); attachments.add(info.extraAttachment); } intent.setClipData(clipData); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments); Loading Loading @@ -2042,6 +2048,9 @@ public class BugreportProgressService extends Service { */ final long nonce; @Nullable public Uri extraAttachment = null; private final Object mLock = new Object(); /** Loading @@ -2049,7 +2058,8 @@ public class BugreportProgressService extends Service { */ BugreportInfo(Context context, String baseName, String name, @Nullable String shareTitle, @Nullable String shareDescription, @BugreportParams.BugreportMode int type, File bugreportsDir, long nonce) { @BugreportParams.BugreportMode int type, File bugreportsDir, long nonce, @Nullable Uri extraAttachment) { this.context = context; this.name = this.initialName = name; this.shareTitle = shareTitle == null ? "" : shareTitle; Loading @@ -2058,6 +2068,7 @@ public class BugreportProgressService extends Service { this.nonce = nonce; this.baseName = baseName; this.bugreportFile = new File(bugreportsDir, getFileName(this, ".zip")); this.extraAttachment = extraAttachment; } void createBugreportFile() { Loading packages/SystemUI/res/drawable/ic_bugreport.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24.0dp" android:height="24.0dp" android:viewportWidth="24.0" android:viewportHeight="24.0" android:tint="?attr/colorControlNormal"> <path android:fillColor="#FF000000" android:pathData="M20,10V8h-2.81c-0.45,-0.78 -1.07,-1.46 -1.82,-1.96L17,4.41L15.59,3l-2.17,2.17c-0.03,-0.01 -0.05,-0.01 -0.08,-0.01c-0.16,-0.04 -0.32,-0.06 -0.49,-0.09c-0.06,-0.01 -0.11,-0.02 -0.17,-0.03C12.46,5.02 12.23,5 12,5h0c-0.49,0 -0.97,0.07 -1.42,0.18l0.02,-0.01L8.41,3L7,4.41l1.62,1.63l0.01,0C7.88,6.54 7.26,7.22 6.81,8H4v2h2.09C6.03,10.33 6,10.66 6,11v1H4v2h2v1c0,0.34 0.04,0.67 0.09,1H4v2h2.81c1.04,1.79 2.97,3 5.19,3h0c2.22,0 4.15,-1.21 5.19,-3H20v-2h-2.09l0,0c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1l0,0H20zM16,15c0,2.21 -1.79,4 -4,4c-2.21,0 -4,-1.79 -4,-4v-4c0,-2.21 1.79,-4 4,-4h0c2.21,0 4,1.79 4,4V15z"/> <path android:fillColor="#FF000000" android:pathData="M10,14h4v2h-4z"/> <path android:fillColor="#FF000000" android:pathData="M10,10h4v2h-4z"/> </vector> No newline at end of file packages/SystemUI/res/layout/record_issue_dialog.xml +41 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ android:layout_weight="0" android:src="@drawable/ic_screenrecord" app:tint="?androidprv:attr/materialColorOnSurface" android:importantForAccessibility="no" android:layout_gravity="center" android:layout_marginEnd="@dimen/screenrecord_option_padding" /> Loading @@ -78,4 +79,44 @@ android:layout_weight="0" android:contentDescription="@string/quick_settings_screen_record_label" /> </LinearLayout> <!-- Bug Report Switch --> <LinearLayout android:id="@+id/bugreport_switch_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/qqs_layout_margin_top" android:orientation="horizontal"> <ImageView android:layout_width="@dimen/screenrecord_option_icon_size" android:layout_height="@dimen/screenrecord_option_icon_size" android:layout_weight="0" android:src="@drawable/ic_bugreport" app:tint="?androidprv:attr/materialColorOnSurface" android:importantForAccessibility="no" android:layout_gravity="center" android:layout_marginEnd="@dimen/screenrecord_option_padding" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:minHeight="@dimen/screenrecord_option_icon_size" android:layout_weight="1" android:layout_gravity="fill_vertical" android:gravity="center" android:text="@string/qs_record_issue_bug_report" android:textAppearance="@style/TextAppearance.Dialog.Body.Message" android:importantForAccessibility="no"/> <Switch android:id="@+id/bugreport_switch" android:layout_width="wrap_content" android:minHeight="@dimen/screenrecord_option_icon_size" android:layout_height="wrap_content" android:gravity="center" android:layout_gravity="fill_vertical" android:layout_weight="0" android:contentDescription="@string/qs_record_issue_bug_report" /> </LinearLayout> </LinearLayout> No newline at end of file packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,8 @@ <string name="qs_record_issue_start">Start</string> <!-- QuickSettings: Text to prompt the user to stop an ongoing recording [CHAR LIMIT=20] --> <string name="qs_record_issue_stop">Stop</string> <!-- QuickSettings: Should user take a bugreport or only share trace files [CHAR LIMIT=20] --> <string name="qs_record_issue_bug_report">Bug Report</string> <!-- QuickSettings: Issue Type Drop down options in Record Issue Start Dialog [CHAR LIMIT=50] --> <string name="qs_record_issue_dropdown_header">What part of your device experience was affected?</string> Loading Loading
core/java/android/app/IActivityManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ interface IActivityManager { in String shareDescription); void requestInteractiveBugReport(); void requestBugReportWithExtraAttachment(in Uri extraAttachment); void requestFullBugReport(); void requestRemoteBugReport(long nonce); boolean launchBugReportHandlerApp(); Loading
packages/Shell/src/com/android/shell/BugreportProgressService.java +15 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import android.os.AsyncTask; import android.os.Binder; import android.os.BugreportManager; import android.os.BugreportManager.BugreportCallback; import android.os.BugreportManager.BugreportCallback.BugreportErrorCode; import android.os.BugreportParams; import android.os.Bundle; import android.os.FileUtils; Loading Loading @@ -169,6 +168,8 @@ public class BugreportProgressService extends Service { static final String EXTRA_DESCRIPTION = "android.intent.extra.DESCRIPTION"; static final String EXTRA_ORIGINAL_INTENT = "android.intent.extra.ORIGINAL_INTENT"; static final String EXTRA_INFO = "android.intent.extra.INFO"; static final String EXTRA_EXTRA_ATTACHMENT_URI = "android.intent.extra.EXTRA_ATTACHMENT_URI"; private static final int MSG_SERVICE_COMMAND = 1; private static final int MSG_DELAYED_SCREENSHOT = 2; Loading Loading @@ -634,9 +635,10 @@ public class BugreportProgressService extends Service { long nonce = intent.getLongExtra(EXTRA_BUGREPORT_NONCE, 0); String baseName = getBugreportBaseName(bugreportType); String name = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()); Uri extraAttachment = intent.getParcelableExtra(EXTRA_EXTRA_ATTACHMENT_URI, Uri.class); BugreportInfo info = new BugreportInfo(mContext, baseName, name, shareTitle, shareDescription, bugreportType, mBugreportsDir, nonce); BugreportInfo info = new BugreportInfo(mContext, baseName, name, shareTitle, shareDescription, bugreportType, mBugreportsDir, nonce, extraAttachment); synchronized (mLock) { if (info.bugreportFile.exists()) { Log.e(TAG, "Failed to start bugreport generation, the requested bugreport file " Loading Loading @@ -1184,6 +1186,10 @@ public class BugreportProgressService extends Service { clipData.addItem(new ClipData.Item(null, null, null, screenshotUri)); attachments.add(screenshotUri); } if (info.extraAttachment != null) { clipData.addItem(new ClipData.Item(null, null, null, info.extraAttachment)); attachments.add(info.extraAttachment); } intent.setClipData(clipData); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments); Loading Loading @@ -2042,6 +2048,9 @@ public class BugreportProgressService extends Service { */ final long nonce; @Nullable public Uri extraAttachment = null; private final Object mLock = new Object(); /** Loading @@ -2049,7 +2058,8 @@ public class BugreportProgressService extends Service { */ BugreportInfo(Context context, String baseName, String name, @Nullable String shareTitle, @Nullable String shareDescription, @BugreportParams.BugreportMode int type, File bugreportsDir, long nonce) { @BugreportParams.BugreportMode int type, File bugreportsDir, long nonce, @Nullable Uri extraAttachment) { this.context = context; this.name = this.initialName = name; this.shareTitle = shareTitle == null ? "" : shareTitle; Loading @@ -2058,6 +2068,7 @@ public class BugreportProgressService extends Service { this.nonce = nonce; this.baseName = baseName; this.bugreportFile = new File(bugreportsDir, getFileName(this, ".zip")); this.extraAttachment = extraAttachment; } void createBugreportFile() { Loading
packages/SystemUI/res/drawable/ic_bugreport.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24.0dp" android:height="24.0dp" android:viewportWidth="24.0" android:viewportHeight="24.0" android:tint="?attr/colorControlNormal"> <path android:fillColor="#FF000000" android:pathData="M20,10V8h-2.81c-0.45,-0.78 -1.07,-1.46 -1.82,-1.96L17,4.41L15.59,3l-2.17,2.17c-0.03,-0.01 -0.05,-0.01 -0.08,-0.01c-0.16,-0.04 -0.32,-0.06 -0.49,-0.09c-0.06,-0.01 -0.11,-0.02 -0.17,-0.03C12.46,5.02 12.23,5 12,5h0c-0.49,0 -0.97,0.07 -1.42,0.18l0.02,-0.01L8.41,3L7,4.41l1.62,1.63l0.01,0C7.88,6.54 7.26,7.22 6.81,8H4v2h2.09C6.03,10.33 6,10.66 6,11v1H4v2h2v1c0,0.34 0.04,0.67 0.09,1H4v2h2.81c1.04,1.79 2.97,3 5.19,3h0c2.22,0 4.15,-1.21 5.19,-3H20v-2h-2.09l0,0c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1l0,0H20zM16,15c0,2.21 -1.79,4 -4,4c-2.21,0 -4,-1.79 -4,-4v-4c0,-2.21 1.79,-4 4,-4h0c2.21,0 4,1.79 4,4V15z"/> <path android:fillColor="#FF000000" android:pathData="M10,14h4v2h-4z"/> <path android:fillColor="#FF000000" android:pathData="M10,10h4v2h-4z"/> </vector> No newline at end of file
packages/SystemUI/res/layout/record_issue_dialog.xml +41 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ android:layout_weight="0" android:src="@drawable/ic_screenrecord" app:tint="?androidprv:attr/materialColorOnSurface" android:importantForAccessibility="no" android:layout_gravity="center" android:layout_marginEnd="@dimen/screenrecord_option_padding" /> Loading @@ -78,4 +79,44 @@ android:layout_weight="0" android:contentDescription="@string/quick_settings_screen_record_label" /> </LinearLayout> <!-- Bug Report Switch --> <LinearLayout android:id="@+id/bugreport_switch_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/qqs_layout_margin_top" android:orientation="horizontal"> <ImageView android:layout_width="@dimen/screenrecord_option_icon_size" android:layout_height="@dimen/screenrecord_option_icon_size" android:layout_weight="0" android:src="@drawable/ic_bugreport" app:tint="?androidprv:attr/materialColorOnSurface" android:importantForAccessibility="no" android:layout_gravity="center" android:layout_marginEnd="@dimen/screenrecord_option_padding" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:minHeight="@dimen/screenrecord_option_icon_size" android:layout_weight="1" android:layout_gravity="fill_vertical" android:gravity="center" android:text="@string/qs_record_issue_bug_report" android:textAppearance="@style/TextAppearance.Dialog.Body.Message" android:importantForAccessibility="no"/> <Switch android:id="@+id/bugreport_switch" android:layout_width="wrap_content" android:minHeight="@dimen/screenrecord_option_icon_size" android:layout_height="wrap_content" android:gravity="center" android:layout_gravity="fill_vertical" android:layout_weight="0" android:contentDescription="@string/qs_record_issue_bug_report" /> </LinearLayout> </LinearLayout> No newline at end of file
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,8 @@ <string name="qs_record_issue_start">Start</string> <!-- QuickSettings: Text to prompt the user to stop an ongoing recording [CHAR LIMIT=20] --> <string name="qs_record_issue_stop">Stop</string> <!-- QuickSettings: Should user take a bugreport or only share trace files [CHAR LIMIT=20] --> <string name="qs_record_issue_bug_report">Bug Report</string> <!-- QuickSettings: Issue Type Drop down options in Record Issue Start Dialog [CHAR LIMIT=50] --> <string name="qs_record_issue_dropdown_header">What part of your device experience was affected?</string> Loading