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

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

Merge "Add wrapper functions to eventually remove enum logic from callers."

parents 55aedb09 e9998513
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -350,11 +350,13 @@ interface IActivityManager {
    // Request a heap dump for the system server.
    void requestSystemServerHeapDump();

    // Deprecated - This method is only used by a few internal components and it will soon be
    // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
    // Deprecated - This method is only used by a few internal components and it will soon start
    // using bug report API (which will be restricted to a few, pre-defined apps).
    // No new code should be calling it.
    @UnsupportedAppUsage
    void requestBugReport(int bugreportType);
    void requestBugReportWithDescription(in @nullable String shareTitle,
                in @nullable String shareDescription, int bugreportType);

    /**
     *  Takes a telephony bug report and notifies the user with the title and description
@@ -369,7 +371,7 @@ interface IActivityManager {
    void requestTelephonyBugReport(in String shareTitle, in String shareDescription);

    /**
     *  Deprecated - This method is only used by Wifi, and it will soon be replaced by a proper
     *  Deprecated - This method is only used by Wifi, and it will soon start using
     *  bug report API.
     *
     *  Takes a minimal bugreport of Wifi-related state.
@@ -381,6 +383,12 @@ interface IActivityManager {
     *          parameters cannot be encoding to an UTF-8 charset.
     */
    void requestWifiBugReport(in String shareTitle, in String shareDescription);
    void requestInteractiveBugReportWithDescription(in String shareTitle,
            in String shareDescription);

    void requestInteractiveBugReport();
    void requestFullBugReport();
    void requestRemoteBugReport();

    @UnsupportedAppUsage
    Intent getIntentForIntentSender(in IIntentSender sender);
+46 −8
Original line number Diff line number Diff line
@@ -8203,10 +8203,12 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    /**
     * @deprecated This method is only used by a few internal components and it will soon be
     * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
     * @deprecated This method is only used by a few internal components and it will soon start
     * using bug report API (which will be restricted to a few, pre-defined apps).
     * No new code should be calling it.
     */
    // TODO(b/137825297): Remove deprecated annotation and rephrase comments for all
    // requestBugreport functions below.
    @Deprecated
    @Override
    public void requestBugReport(int bugreportType) {
@@ -8214,11 +8216,12 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    /**
     * @deprecated This method is only used by a few internal components and it will soon be
     * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
     * @deprecated This method is only used by a few internal components and it will soon start
     * using bug report API (which will be restricted to a few, pre-defined apps).
     * No new code should be calling it.
     */
    @Deprecated
    @Override
    public void requestBugReportWithDescription(@Nullable String shareTitle,
            @Nullable String shareDescription, int bugreportType) {
        String type = null;
@@ -8299,8 +8302,8 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    /**
     * @deprecated This method is only used by a few internal components and it will soon be
     * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
     * @deprecated This method is only used by a few internal components and it will soon start
     * using bug report API (which will be restricted to a few, pre-defined apps).
     * No new code should be calling it.
     */
    @Deprecated
@@ -8311,8 +8314,8 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    /**
     * @deprecated This method is only used by a few internal components and it will soon be
     * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
     * @deprecated This method is only used by a few internal components and it will soon start
     * using bug report API (which will be restricted to a few, pre-defined apps).
     * No new code should be calling it.
     */
    @Deprecated
@@ -8322,6 +8325,41 @@ public class ActivityManagerService extends IActivityManager.Stub
                ActivityManager.BUGREPORT_OPTION_WIFI);
    }
    /**
     * Takes an interactive bugreport with a progress notification
     */
    @Override
    public void requestInteractiveBugReport() {
        requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
    }
    /**
     * Takes an interactive bugreport with a progress notification. Also, shows the given title and
     * description on the final share notification
     */
    @Override
    public void requestInteractiveBugReportWithDescription(String shareTitle,
            String shareDescription) {
        requestBugReportWithDescription(shareTitle, shareDescription,
                ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
    }
    /**
     * Takes a bugreport with minimal user interference
     */
    @Override
    public void requestFullBugReport() {
        requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_FULL);
    }
    /**
     * Takes a bugreport remotely
     */
    @Override
    public void requestRemoteBugReport() {
        requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_REMOTE);
    }
    public void registerProcessObserver(IProcessObserver observer) {
        enforceCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER,
                "registerProcessObserver()");