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

Commit 0a18820a authored by Nandana Dutt's avatar Nandana Dutt
Browse files

Expose bugreporting API as system API.

BUG: 111441001
Test: Builds
Change-Id: I1530f92971807b7e43c763a58dd1e18e793255da
(cherry picked from commit b3857c4f7301b0b9c80e6db3f27c8ebada82a60f)
parent ced0b0c9
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -5059,6 +5059,36 @@ package android.os {
    method public Object onTransactStarted(android.os.IBinder, int);
  }
  public class BugreportManager {
    method @RequiresPermission(android.Manifest.permission.DUMP) public void cancelBugreport();
    method @RequiresPermission(android.Manifest.permission.DUMP) public void startBugreport(@NonNull android.os.ParcelFileDescriptor, @Nullable android.os.ParcelFileDescriptor, @NonNull android.os.BugreportParams, @NonNull java.util.concurrent.Executor, @NonNull android.os.BugreportManager.BugreportCallback);
  }
  public abstract static class BugreportManager.BugreportCallback {
    ctor public BugreportManager.BugreportCallback();
    method public void onError(int);
    method public void onFinished();
    method public void onProgress(float);
    field public static final int BUGREPORT_ERROR_INVALID_INPUT = 1; // 0x1
    field public static final int BUGREPORT_ERROR_RUNTIME = 2; // 0x2
    field public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = 4; // 0x4
    field public static final int BUGREPORT_ERROR_USER_DENIED_CONSENT = 3; // 0x3
  }
  public final class BugreportParams {
    ctor public BugreportParams(@android.os.BugreportParams.BugreportMode int);
    method public int getMode();
    field public static final int BUGREPORT_MODE_FULL = 0; // 0x0
    field public static final int BUGREPORT_MODE_INTERACTIVE = 1; // 0x1
    field public static final int BUGREPORT_MODE_REMOTE = 2; // 0x2
    field public static final int BUGREPORT_MODE_TELEPHONY = 4; // 0x4
    field public static final int BUGREPORT_MODE_WEAR = 3; // 0x3
    field public static final int BUGREPORT_MODE_WIFI = 5; // 0x5
  }
  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix={"BUGREPORT_MODE_"}, value={android.os.BugreportParams.BUGREPORT_MODE_FULL, android.os.BugreportParams.BUGREPORT_MODE_INTERACTIVE, android.os.BugreportParams.BUGREPORT_MODE_REMOTE, android.os.BugreportParams.BUGREPORT_MODE_WEAR, android.os.BugreportParams.BUGREPORT_MODE_TELEPHONY, android.os.BugreportParams.BUGREPORT_MODE_WIFI}) public static @interface BugreportParams.BugreportMode {
  }
  public static class Build.VERSION {
    field public static final String PREVIEW_SDK_FINGERPRINT;
  }
+2 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.content.Context;
import android.os.IBinder.DeathRecipient;
@@ -35,8 +36,7 @@ import java.util.concurrent.Executor;
 *
 * @hide
 */
// TODO: Expose API when the implementation is more complete.
//@SystemApi
@SystemApi
@SystemService(Context.BUGREPORT_SERVICE)
public class BugreportManager {
    private final Context mContext;
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.os;

import android.annotation.IntDef;
import android.annotation.SystemApi;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -26,8 +27,7 @@ import java.lang.annotation.RetentionPolicy;
 *
 * @hide
 */
// TODO: Expose API when the implementation is more complete.
// @SystemApi
@SystemApi
public final class BugreportParams {
    private final int mMode;