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

Commit 4eff26b4 authored by Felipe Leme's avatar Felipe Leme
Browse files

Ignore auto-fill requests from system.

Change-Id: I3c318aeb96c1ba7a751feba2a0d9042015eaaffb
Fixes: 34819567
Bug: 34171325
Test: could not reproduce
parent c869ebff
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ShellCallback;
@@ -288,6 +289,11 @@ public final class AutoFillManagerService extends SystemService {
            final IBinder activityToken = LocalServices.getService(ActivityManagerInternal.class)
                        .getTopVisibleActivity(uid);
            if (activityToken == null) {
                // TODO(b/33197203, b/34819567, b/34171325): figure out proper way to handle it
                if (uid == Process.SYSTEM_UID) {
                    if (DEBUG) Log.w(TAG, "requestAutoFill(): ignoring call from system");
                    return;
                }
                throw new SecurityException("uid " + uid + " does not own the top activity");
            }