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

Commit 17e333aa authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan
Browse files

[ECM] Register EnhancedConfirmationManager

Register EnhancedConfirmationManager as a SystemService.

Bug: 310655061
Test: atest EnhancedConfirmationManagerTest
Change-Id: I3a06b8a832bedc2752042656971bddb5dd74a66a
parent f8c229db
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3527,6 +3527,7 @@ package android.content {
    field public static final String CLOUDSEARCH_SERVICE = "cloudsearch";
    field public static final String CONTENT_SUGGESTIONS_SERVICE = "content_suggestions";
    field public static final String CONTEXTHUB_SERVICE = "contexthub";
    field @FlaggedApi("android.permission.flags.enhanced_confirmation_mode_apis_enabled") public static final String ECM_ENHANCED_CONFIRMATION_SERVICE = "ecm_enhanced_confirmation";
    field public static final String ETHERNET_SERVICE = "ethernet";
    field public static final String EUICC_CARD_SERVICE = "euicc_card";
    field public static final String FONT_SERVICE = "font";
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.app.appsearch.AppSearchManagerFrameworkInitializer;
import android.app.blob.BlobStoreManagerFrameworkInitializer;
import android.app.contentsuggestions.ContentSuggestionsManager;
import android.app.contentsuggestions.IContentSuggestionsManager;
import android.app.ecm.EnhancedConfirmationFrameworkInitializer;
import android.app.job.JobSchedulerFrameworkInitializer;
import android.app.people.PeopleManager;
import android.app.prediction.AppPredictionManager;
@@ -1631,6 +1632,9 @@ public final class SystemServiceRegistry {
            OnDevicePersonalizationFrameworkInitializer.registerServiceWrappers();
            DeviceLockFrameworkInitializer.registerServiceWrappers();
            VirtualizationFrameworkInitializer.registerServiceWrappers();
            if (android.permission.flags.Flags.enhancedConfirmationModeApisEnabled()) {
                EnhancedConfirmationFrameworkInitializer.registerServiceWrappers();
            }
        } finally {
            // If any of the above code throws, we're in a pretty bad shape and the process
            // will likely crash, but we'll reset it just in case there's an exception handler...
+13 −0
Original line number Diff line number Diff line
@@ -4218,6 +4218,7 @@ public abstract class Context {
            VIRTUALIZATION_SERVICE,
            GRAMMATICAL_INFLECTION_SERVICE,
            SECURITY_STATE_SERVICE,
           //@hide: ECM_ENHANCED_CONFIRMATION_SERVICE,

    })
    @Retention(RetentionPolicy.SOURCE)
@@ -6502,6 +6503,18 @@ public abstract class Context {
    @FlaggedApi(Flags.FLAG_SECURITY_STATE_SERVICE)
    public static final String SECURITY_STATE_SERVICE = "security_state";

    /**
     * Use with {@link #getSystemService(String)} to retrieve an
     * {@link android.app.ecm.EnhancedConfirmationManager}.
     *
     * @see #getSystemService(String)
     * @see android.app.ecm.EnhancedConfirmationManager
     * @hide
     */
    @FlaggedApi(android.permission.flags.Flags.FLAG_ENHANCED_CONFIRMATION_MODE_APIS_ENABLED)
    @SystemApi
    public static final String ECM_ENHANCED_CONFIRMATION_SERVICE = "ecm_enhanced_confirmation";

    /**
     * Determine whether the given permission is allowed for a particular
     * process and user ID running in the system.