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

Commit 43574b03 authored by Svet Ganov's avatar Svet Ganov
Browse files

Add autofill feature API

We now have a software feature for autofill which can be used
by partners to disable it on low-end devices or form factors
for which autofill doesn't make sense.

bug:35956220

Test: manual (requires a custom build)

Change-Id: I6c06462ed9ca3ae93331700dce38a8c08dfd0722
parent 19ffd1d0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10619,6 +10619,7 @@ package android.content.pm {
    field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency";
    field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
    field public static final java.lang.String FEATURE_AUDIO_PRO = "android.hardware.audio.pro";
    field public static final java.lang.String FEATURE_AUTOFILL = "android.software.autofill";
    field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive";
    field public static final java.lang.String FEATURE_BACKUP = "android.software.backup";
    field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
+1 −0
Original line number Diff line number Diff line
@@ -11303,6 +11303,7 @@ package android.content.pm {
    field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency";
    field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
    field public static final java.lang.String FEATURE_AUDIO_PRO = "android.hardware.audio.pro";
    field public static final java.lang.String FEATURE_AUTOFILL = "android.software.autofill";
    field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive";
    field public static final java.lang.String FEATURE_BACKUP = "android.software.backup";
    field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
+1 −0
Original line number Diff line number Diff line
@@ -10658,6 +10658,7 @@ package android.content.pm {
    field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency";
    field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
    field public static final java.lang.String FEATURE_AUDIO_PRO = "android.hardware.audio.pro";
    field public static final java.lang.String FEATURE_AUTOFILL = "android.software.autofill";
    field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive";
    field public static final java.lang.String FEATURE_BACKUP = "android.software.backup";
    field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
+6 −3
Original line number Diff line number Diff line
@@ -641,7 +641,8 @@ final class SystemServiceRegistry {
                new CachedServiceFetcher<PrintManager>() {
            @Override
            public PrintManager createService(ContextImpl ctx) throws ServiceNotFoundException {
                IBinder iBinder = ServiceManager.getServiceOrThrow(Context.PRINT_SERVICE);
                // Get the services without throwing as this is an optional feature
                IBinder iBinder = ServiceManager.getService(Context.PRINT_SERVICE);
                IPrintManager service = IPrintManager.Stub.asInterface(iBinder);
                return new PrintManager(ctx.getOuterContext(), service, UserHandle.myUserId(),
                        UserHandle.getAppId(Process.myUid()));
@@ -652,8 +653,9 @@ final class SystemServiceRegistry {
                    @Override
                    public CompanionDeviceManager createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        // Get the services without throwing as this is an optional feature
                        IBinder iBinder =
                                ServiceManager.getServiceOrThrow(Context.COMPANION_DEVICE_SERVICE);
                                ServiceManager.getService(Context.COMPANION_DEVICE_SERVICE);
                        ICompanionDeviceManager service =
                                ICompanionDeviceManager.Stub.asInterface(iBinder);
                        return new CompanionDeviceManager(service, ctx);
@@ -833,7 +835,8 @@ final class SystemServiceRegistry {
                new CachedServiceFetcher<AutofillManager>() {
            @Override
            public AutofillManager createService(ContextImpl ctx) throws ServiceNotFoundException {
                IBinder b = ServiceManager.getServiceOrThrow(Context.AUTOFILL_MANAGER_SERVICE);
                // Get the services without throwing as this is an optional feature
                IBinder b = ServiceManager.getService(Context.AUTOFILL_MANAGER_SERVICE);
                IAutoFillManager service = IAutoFillManager.Stub.asInterface(b);
                return new AutofillManager(ctx.getOuterContext(), service);
            }});
+9 −0
Original line number Diff line number Diff line
@@ -2402,6 +2402,15 @@ public abstract class PackageManager {
    public static final String FEATURE_VR_MODE_HIGH_PERFORMANCE
            = "android.hardware.vr.high_performance";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
     * The device supports autofill of user credentials, addresses, credit cards, etc
     * via integration with {@link android.service.autofill.AutofillService autofill
     * providers}.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_AUTOFILL = "android.software.autofill";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
     * The device implements headtracking suitable for a VR device.
Loading