Skip to content

Commit 6a58e01

Browse files
author
Android Build Coastguard Worker
committed
Merge cherrypicks of ['googleplex-android-review.googlesource.com/30154731'] into 24Q4-release.
Change-Id: Ifb5d6afcfd51eb80d7f5cb81d4ff10f086af525a
2 parents 15f7f44 + 5e41bb5 commit 6a58e01

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
import com.android.server.contentcapture.ContentCaptureManagerInternal;
9393
import com.android.server.infra.AbstractPerUserSystemService;
9494
import com.android.server.inputmethod.InputMethodManagerInternal;
95+
import com.android.server.pm.UserManagerInternal;
9596
import com.android.server.wm.ActivityTaskManagerInternal;
9697

9798
import java.io.PrintWriter;
@@ -192,6 +193,8 @@ final class AutofillManagerServiceImpl
192193

193194
private final ContentCaptureManagerInternal mContentCaptureManagerInternal;
194195

196+
private final UserManagerInternal mUserManagerInternal;
197+
195198
private final DisabledInfoCache mDisabledInfoCache;
196199

197200
AutofillManagerServiceImpl(AutofillManagerService master, Object lock,
@@ -208,6 +211,7 @@ final class AutofillManagerServiceImpl
208211
mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class);
209212
mContentCaptureManagerInternal = LocalServices.getService(
210213
ContentCaptureManagerInternal.class);
214+
mUserManagerInternal = LocalServices.getService(UserManagerInternal.class);
211215
mDisabledInfoCache = disableCache;
212216
updateLocked(disabled);
213217
}
@@ -379,6 +383,13 @@ long startSessionLocked(@NonNull IBinder activityToken, int taskId, int clientUi
379383
return 0;
380384
}
381385

386+
// TODO(b/376482880): remove this check once autofill service supports visible
387+
// background users.
388+
if (mUserManagerInternal.isVisibleBackgroundFullUser(mUserId)) {
389+
Slog.d(TAG, "Currently, autofill service does not support visible background users.");
390+
return 0;
391+
}
392+
382393
if (!forAugmentedAutofillOnly && isAutofillDisabledLocked(clientActivity)) {
383394
// Standard autofill is enabled, but service disabled autofill for this activity; that
384395
// means no session, unless the activity is allowlisted for augmented autofill

0 commit comments

Comments
 (0)