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

Commit 287cc43f authored by yash's avatar yash
Browse files

Use WearBugreportWarningActivity from SystemUI in Shell

Bug:378047645

Flag: EXEMPT minor change
Test: Verified manually that correct activity
is launched in wear bugreport flow: https://screenshot.googleplex.com/43gvuNFZxByh73V, https://screenshot.googleplex.com/CwYuE65wJyjP2RJ

Change-Id: I709886407f6e81d6011c9e4d5c39dc6492b44596
parent de146b2d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- Default for Wear bugreport warning activity-->
    <!-- DO NOT TRANSLATE -->
    <string name="system_ui_wear_bugreport_warning_activity" />
</resources>
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
@@ -1317,7 +1317,11 @@ public class BugreportProgressService extends Service {
     */
    private Intent buildWearWarningIntent() {
        Intent intent = new Intent();
        intent.setClassName(mContext, getPackageName() + ".WearBugreportWarningActivity");
        String systemUIPackage = mContext.getResources().getString(
                com.android.internal.R.string.config_systemUi);
        String wearBugreportWarningActivity = getResources()
                .getString(R.string.system_ui_wear_bugreport_warning_activity);
        intent.setClassName(systemUIPackage, wearBugreportWarningActivity);
        if (mContext.getPackageManager().resolveActivity(intent, /* flags */ 0) == null) {
            Log.e(TAG, "Cannot find wear bugreport warning activity");
            return buildWarningIntent(mContext, /* sendIntent */ null);