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

Commit de153d18 authored by George Chan's avatar George Chan
Browse files

Added BackgroundInstallControlManager to system service.

For more info: go/bic-v

Bug: 296060433
Test: atest BackgroundInstallControlManagerTest
Change-Id: I80dd166a60638f061876129846afe451f62b55f0
parent 4ee4e6bc
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1617,6 +1617,19 @@ public final class SystemServiceRegistry {
                        return new ContactKeysManager(ctx);
                    }});

        // DO NOT do a flag check like this unless the flag is read-only.
        // (because this code is executed during preload in zygote.)
        // If the flag is mutable, the check should be inside CachedServiceFetcher.
        if (Flags.bicClient()) {
            registerService(Context.BACKGROUND_INSTALL_CONTROL_SERVICE,
                    BackgroundInstallControlManager.class,
                    new CachedServiceFetcher<BackgroundInstallControlManager>() {
                        @Override
                        public BackgroundInstallControlManager createService(ContextImpl ctx) {
                            return new BackgroundInstallControlManager(ctx);
                        }
                    });
        }
        sInitializing = true;
        try {
            // Note: the following functions need to be @SystemApis, once they become mainline