Loading services/autofill/java/com/android/server/autofill/AutofillManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -760,6 +760,18 @@ public final class AutofillManagerService return false; } // Called by Shell command boolean isFieldDetectionServiceEnabledForUser(@UserIdInt int userId) { enforceCallingPermissionForManagement(); synchronized (mLock) { final AutofillManagerServiceImpl service = getServiceForUserLocked(userId); if (service != null) { return service.isPccClassificationEnabled(); } } return false; } // Called by Shell command String getFieldDetectionServiceName(@UserIdInt int userId) { enforceCallingPermissionForManagement(); Loading services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java +1 −4 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.os.RemoteCallback; import android.os.ShellCommand; import android.os.UserHandle; import android.service.autofill.AutofillFieldClassificationService.Scores; import android.text.TextUtils; import android.view.autofill.AutofillManager; import com.android.internal.os.IResultReceiver; Loading Loading @@ -348,9 +347,7 @@ public final class AutofillManagerServiceShellCommand extends ShellCommand { private int isFieldDetectionServiceEnabled(PrintWriter pw) { final int userId = getNextIntArgRequired(); String name = mService.getFieldDetectionServiceName(userId); boolean pccFlagEnabled = mService.isPccClassificationFlagEnabled(); boolean enabled = (!TextUtils.isEmpty(name)) && pccFlagEnabled; boolean enabled = mService.isFieldDetectionServiceEnabledForUser(userId); pw.println(enabled); return 0; } Loading Loading
services/autofill/java/com/android/server/autofill/AutofillManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -760,6 +760,18 @@ public final class AutofillManagerService return false; } // Called by Shell command boolean isFieldDetectionServiceEnabledForUser(@UserIdInt int userId) { enforceCallingPermissionForManagement(); synchronized (mLock) { final AutofillManagerServiceImpl service = getServiceForUserLocked(userId); if (service != null) { return service.isPccClassificationEnabled(); } } return false; } // Called by Shell command String getFieldDetectionServiceName(@UserIdInt int userId) { enforceCallingPermissionForManagement(); Loading
services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java +1 −4 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.os.RemoteCallback; import android.os.ShellCommand; import android.os.UserHandle; import android.service.autofill.AutofillFieldClassificationService.Scores; import android.text.TextUtils; import android.view.autofill.AutofillManager; import com.android.internal.os.IResultReceiver; Loading Loading @@ -348,9 +347,7 @@ public final class AutofillManagerServiceShellCommand extends ShellCommand { private int isFieldDetectionServiceEnabled(PrintWriter pw) { final int userId = getNextIntArgRequired(); String name = mService.getFieldDetectionServiceName(userId); boolean pccFlagEnabled = mService.isPccClassificationFlagEnabled(); boolean enabled = (!TextUtils.isEmpty(name)) && pccFlagEnabled; boolean enabled = mService.isFieldDetectionServiceEnabledForUser(userId); pw.println(enabled); return 0; } Loading