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

Commit 3c4f8c24 authored by Michal Olech's avatar Michal Olech Committed by Android (Google) Code Review
Browse files

Merge "Add custom bug report app support for TV bug reports"

parents 182306a2 345cc0b7
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -697,7 +697,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    accessibilityShortcutActivated();
                    break;
                case MSG_BUGREPORT_TV:
                    requestFullBugreport();
                    requestFullBugreportOrLaunchHandlerApp();
                    break;
                case MSG_ACCESSIBILITY_TV:
                    if (mAccessibilityShortcutController.isAccessibilityShortcutAvailable(false)) {
@@ -3061,12 +3061,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return mAccessibilityTvScheduled;
    }

    private void requestFullBugreport() {
    private void requestFullBugreportOrLaunchHandlerApp() {
        if ("1".equals(SystemProperties.get("ro.debuggable"))
                || Settings.Global.getInt(mContext.getContentResolver(),
                        Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) == 1) {
            try {
                if (!ActivityManager.getService().launchBugReportHandlerApp()) {
                    ActivityManager.getService().requestFullBugReport();
                }
            } catch (RemoteException e) {
                Slog.e(TAG, "Error taking bugreport", e);
            }