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

Commit 5f2f6b4d authored by Limon Mia's avatar Limon Mia
Browse files

Add new bugreport mode for debugging bluetooth.

Bug: 410692617
Test: atest android.bugreport.cts.BugreportManagerTest#testBluetoothBugreport
Flag: android.os.bluetooth_bugreport_mode
Change-Id: I33e7cefa16f4490a1519c4eadd5148b3da346a68
parent 2e195e44
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11390,6 +11390,7 @@ package android.os {
    field public static final int BUGREPORT_FLAG_DEFER_CONSENT = 2; // 0x2
    field @FlaggedApi("android.app.admin.flags.onboarding_bugreport_v2_enabled") public static final int BUGREPORT_FLAG_KEEP_BUGREPORT_ON_RETRIEVAL = 4; // 0x4
    field public static final int BUGREPORT_FLAG_USE_PREDUMPED_UI_DATA = 1; // 0x1
    field @FlaggedApi("android.os.bluetooth_bugreport_mode") public static final int BUGREPORT_MODE_BLUETOOTH = 8; // 0x8
    field public static final int BUGREPORT_MODE_FULL = 0; // 0x0
    field public static final int BUGREPORT_MODE_INTERACTIVE = 1; // 0x1
    field @FlaggedApi("android.app.admin.flags.onboarding_bugreport_v2_enabled") public static final int BUGREPORT_MODE_ONBOARDING = 7; // 0x7
+1 −1
Original line number Diff line number Diff line
@@ -2443,7 +2443,7 @@ package android.os {
  }

  public final class BugreportParams {
    field public static final int BUGREPORT_MODE_MAX_VALUE = 7; // 0x7
    field public static final int BUGREPORT_MODE_MAX_VALUE = 8; // 0x8
  }

  public class Build {
+12 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.os;

import static android.os.Flags.FLAG_BLUETOOTH_BUGREPORT_MODE;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.SystemApi;
@@ -85,7 +87,8 @@ public final class BugreportParams {
            BUGREPORT_MODE_WEAR,
            BUGREPORT_MODE_TELEPHONY,
            BUGREPORT_MODE_WIFI,
            BUGREPORT_MODE_ONBOARDING
            BUGREPORT_MODE_ONBOARDING,
            BUGREPORT_MODE_BLUETOOTH
    })
    public @interface BugreportMode {}

@@ -130,12 +133,19 @@ public final class BugreportParams {
    @FlaggedApi(Flags.FLAG_ONBOARDING_BUGREPORT_V2_ENABLED)
    public static final int BUGREPORT_MODE_ONBOARDING = IDumpstate.BUGREPORT_MODE_ONBOARDING;

    /**
     * Options for a lightweight bugreport that only includes a few sections related to
     * Bluetooth.
     */
    @FlaggedApi(FLAG_BLUETOOTH_BUGREPORT_MODE)
    public static final int BUGREPORT_MODE_BLUETOOTH = IDumpstate.BUGREPORT_MODE_BLUETOOTH;

    /**
     * The maximum value of supported bugreport mode.
     * @hide
     */
    @TestApi
    public static final int BUGREPORT_MODE_MAX_VALUE = BUGREPORT_MODE_ONBOARDING;
    public static final int BUGREPORT_MODE_MAX_VALUE = BUGREPORT_MODE_BLUETOOTH;

    /**
     * Defines acceptable flags for customizing bugreport requests.
+8 −0
Original line number Diff line number Diff line
@@ -202,6 +202,14 @@ flag {
    bug: "361157077"
}

flag {
    name: "bluetooth_bugreport_mode"
    is_exported: true
    namespace: "bluetooth"
    description: "Add bluetooth bugreport mode containing subset of log sections only related to bluetooth debugging."
    bug: "410692617"
}

flag {
    name: "bugreport_multi_display_screenshot_enabled"
    namespace: "crumpet"
+3 −0
Original line number Diff line number Diff line
@@ -7782,6 +7782,9 @@ public class ActivityManagerService extends IActivityManager.Stub
            case BugreportParams.BUGREPORT_MODE_ONBOARDING:
                type = "bugreportonboarding";
                break;
            case BugreportParams.BUGREPORT_MODE_BLUETOOTH:
                type = "bugreportbluetooth";
                break;
            default:
                throw new IllegalArgumentException(
                    "Provided bugreport type is not correct, value: "
Loading