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

Commit 6fa86b79 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Introduce config_customBugreport option"

parents 89ef5e39 88376e68
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -71,6 +71,12 @@ public interface WindowManagerPolicyConstants {
    String ACTION_USER_ACTIVITY_NOTIFICATION =
            "android.intent.action.USER_ACTIVITY_NOTIFICATION";

    /**
     * Broadcast sent when a (custom) bugreport is requested.
     */
    String ACTION_CUSTOM_BUGREPORT_REQUESTED =
            "android.intent.action.CUSTOM_BUGREPORT_REQUESTED";

    /**
     * Sticky broadcast of the current HDMI plugged state.
     */
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@
    <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_SUSPENDED" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" />
    <protected-broadcast android:name="android.intent.action.CUSTOM_BUGREPORT_REQUESTED" />

    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
+5 −0
Original line number Diff line number Diff line
@@ -4287,4 +4287,9 @@

    <!-- Whether or not to use assistant stream volume separately from music volume -->
    <bool name="config_useAssistantVolume">false</bool>

    <!-- Whether to use a custom Bugreport handling. When true, ACTION_CUSTOM_BUGREPORT_REQUESTED
         intent is broadcasted on bugreporting chord (instead of the default full bugreport
         generation). -->
    <bool name="config_customBugreport">false</bool>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -3800,5 +3800,5 @@
  <!-- Assistant handles -->
  <java-symbol type="dimen" name="assist_handle_shadow_radius" />


  <java-symbol type="bool" name="config_customBugreport" />
</resources>
+10 −1
Original line number Diff line number Diff line
@@ -697,7 +697,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    accessibilityShortcutActivated();
                    break;
                case MSG_BUGREPORT_TV:
                    boolean customBugreport = mContext.getResources().getBoolean(
                            com.android.internal.R.bool.config_customBugreport);
                    if (customBugreport) {
                        Log.i(TAG, "Triggering a custom bugreport!");
                        Intent intent = new Intent(ACTION_CUSTOM_BUGREPORT_REQUESTED);
                        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                        mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
                    } else {
                        requestFullBugreport();
                    }
                    break;
                case MSG_ACCESSIBILITY_TV:
                    if (mAccessibilityShortcutController.isAccessibilityShortcutAvailable(false)) {