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

Commit c40f578d authored by Paul Chang's avatar Paul Chang
Browse files

Bug report handler app via Bug Report Shortcut

- Send intent (android.internal.intent.action.BUGREPORT_REQUESTED) to bug report handler app after pressing Bug Report Shortcut
- Add config "config_bugReportHandlerEnabled" to enable this feature
- Add config "config_defaultBugReportHandlerApp" to get the package of default bugreport handler app
- Add settings CUSTOM_BUGREPORT_HANDLER_APP to get the package of custom bugreport handler app
- Add settings CUSTOM_BUGREPORT_HANDLER_USER to get the user id of custom bugreport handler app

BUG:142921485
Test: After pressing Bug Report Shortcut in manual local test:
- the intent can be sent to bugreport handler app.
- the intent can be sent to Shell if the chosen and the default bugreport handler app can't handle it.
- the intent can be sent to system user profile's default bugreport handler app if the custom profile(like work profile) is removed.
Change-Id: Idc33b47f0cc65b90cbf648bda54a1d900fef007a
parent 0715e47f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -387,6 +387,7 @@ interface IActivityManager {
    void requestInteractiveBugReport();
    void requestInteractiveBugReport();
    void requestFullBugReport();
    void requestFullBugReport();
    void requestRemoteBugReport();
    void requestRemoteBugReport();
    boolean launchBugReportHandlerApp();


    @UnsupportedAppUsage
    @UnsupportedAppUsage
    Intent getIntentForIntentSender(in IIntentSender sender);
    Intent getIntentForIntentSender(in IIntentSender sender);
+16 −0
Original line number Original line Diff line number Diff line
@@ -8759,6 +8759,22 @@ public final class Settings {
         */
         */
        public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
        public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
        /**
         * The package name for the custom bugreport handler app. This app must be whitelisted.
         * This is currently used only by Power Menu short press.
         *
         * @hide
         */
        public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app";
        /**
         * The user id for the custom bugreport handler app. This is currently used only by Power
         * Menu short press.
         *
         * @hide
         */
        public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user";
        /**
        /**
         * Whether ADB is enabled.
         * Whether ADB is enabled.
         */
         */
+6 −0
Original line number Original line Diff line number Diff line
@@ -4179,4 +4179,10 @@
    <string-array name="config_integrityRuleProviderPackages" translatable="false">
    <string-array name="config_integrityRuleProviderPackages" translatable="false">
        <!-- Add packages here -->
        <!-- Add packages here -->
    </string-array>
    </string-array>

    <!-- When true, enables the whitelisted app to handle bug reports from power menu short press. -->
    <bool name="config_bugReportHandlerEnabled">false</bool>

    <!-- The package name for the default bug report handler app from power menu short press. This app must be whitelisted. -->
    <string name="config_defaultBugReportHandlerApp" translatable="false"></string>
</resources>
</resources>
+4 −0
Original line number Original line Diff line number Diff line
@@ -3757,6 +3757,10 @@


  <java-symbol type="bool" name="config_showBuiltinWirelessChargingAnim" />
  <java-symbol type="bool" name="config_showBuiltinWirelessChargingAnim" />


  <!-- For bug report handler -->
  <java-symbol type="bool" name="config_bugReportHandlerEnabled" />
  <java-symbol type="string" name="config_defaultBugReportHandlerApp" />

  <java-symbol type="string" name="usb_device_resolve_prompt_warn" />
  <java-symbol type="string" name="usb_device_resolve_prompt_warn" />


  <!-- For Accessibility system actions -->
  <!-- For Accessibility system actions -->
+2 −0
Original line number Original line Diff line number Diff line
@@ -70,5 +70,7 @@ public class GlobalSettings {
        Settings.Global.CHARGING_VIBRATION_ENABLED,
        Settings.Global.CHARGING_VIBRATION_ENABLED,
        Settings.Global.AWARE_ALLOWED,
        Settings.Global.AWARE_ALLOWED,
        Settings.Global.NOTIFICATION_BUBBLES,
        Settings.Global.NOTIFICATION_BUBBLES,
        Settings.Global.CUSTOM_BUGREPORT_HANDLER_APP,
        Settings.Global.CUSTOM_BUGREPORT_HANDLER_USER,
    };
    };
}
}
Loading