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

Commit 4d832266 authored by Makoto Onuki's avatar Makoto Onuki Committed by Gerrit Code Review
Browse files

Merge "[Bugfix] Fix after performing adb shell am hang and kill this process,...

Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state"
parents 3b0cb564 409fcc72
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -102,6 +102,10 @@ public class ShellCallback implements Parcelable {
        }
    }

    public IBinder getShellCallbackBinder() {
        return mShellCallback.asBinder();
    }

    ShellCallback(Parcel in) {
        mLocal = false;
        mShellCallback = IShellCallback.Stub.asInterface(in.readStrongBinder());
+8 −1
Original line number Diff line number Diff line
@@ -1690,7 +1690,14 @@ final class ActivityManagerShellCommand extends ShellCommand {

        pw.println("Hanging the system...");
        pw.flush();
        mInterface.hang(new Binder(), allowRestart);
        try {
            mInterface.hang(getShellCallback().getShellCallbackBinder(), allowRestart);
        } catch (NullPointerException e) {
            pw.println("Hanging failed, since caller " + Binder.getCallingPid() +
                    " did not provide a ShellCallback!");
            pw.flush();
            return 1;
        }
        return 0;
    }