Added a UserManager.DISALLOW_AUTOFILL restriction.
bug: 35710740
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testUserRestriction
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedProfileOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDisallowAutofill_allowed
Change-Id: I41b2bf9fe3bc8df627c6650960bd11346c430a7e
diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java
index 709e5f9..6f17d0e 100644
--- a/core/java/android/service/autofill/AutofillService.java
+++ b/core/java/android/service/autofill/AutofillService.java
@@ -228,8 +228,11 @@
*/
//TODO(b/33197203): remove once clients are not using anymore
@Deprecated
- public abstract void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle data,
- @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback);
+ public void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle data,
+ @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback) {
+ // Should never be called because it was abstract before.
+ throw new UnsupportedOperationException("deprecated");
+ }
/**
* Called when user requests service to save the fields of an {@link Activity}.