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

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

Merge "Move auto-fill shell command off IPC"

parents e767e087 ef0c1885
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -34,7 +34,4 @@ oneway interface IAutoFillManagerService {
    void updateSession(in IBinder activityToken, in AutoFillId id, in Rect bounds,
                       in AutoFillValue value, int flags);
    void finishSession(in IBinder activityToken);

    // Methods called by ShellCommand
    void requestSaveForUser(int userId);
}
+7 −8
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@ public final class AutoFillManagerService extends SystemService {
        return service;
    }

    void requestSaveForUser(int userId) {
        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
        mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageI(
                MSG_REQUEST_SAVE_FOR_USER, userId));
    }

    /**
     * Removes a cached service for a given user.
     */
@@ -317,13 +323,6 @@ public final class AutoFillManagerService extends SystemService {
                    UserHandle.getCallingUserId(), 0, activityToken));
        }

        @Override
        public void requestSaveForUser(int userId) {
            mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
            mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageI(MSG_REQUEST_SAVE_FOR_USER,
                    userId));
        }

        @Override
        public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            if (mContext.checkCallingPermission(
@@ -355,7 +354,7 @@ public final class AutoFillManagerService extends SystemService {
        @Override
        public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err,
                String[] args, ShellCallback callback, ResultReceiver resultReceiver) {
            (new AutoFillManagerServiceShellCommand(this)).exec(
            (new AutoFillManagerServiceShellCommand(AutoFillManagerService.this)).exec(
                    this, in, out, err, args, callback, resultReceiver);
        }
    }
+2 −3
Original line number Diff line number Diff line
@@ -20,15 +20,14 @@ import android.app.ActivityManager;
import android.os.RemoteException;
import android.os.ShellCommand;
import android.os.UserHandle;
import android.service.autofill.IAutoFillManagerService;

import java.io.PrintWriter;

public final class AutoFillManagerServiceShellCommand extends ShellCommand {

    private final IAutoFillManagerService.Stub mService;
    private final AutoFillManagerService mService;

    public AutoFillManagerServiceShellCommand(IAutoFillManagerService.Stub service) {
    public AutoFillManagerServiceShellCommand(AutoFillManagerService service) {
        mService = service;
    }