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

Commit 6cde9d9a authored by Songchun Fan's avatar Songchun Fan
Browse files

add DataLoaderManagerService to system server and register to system service

Test: boots
Change-Id: I9cba99327da012b6f6de898ad1c5cc7cf11d1d31
parent a98fb179
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -53,7 +53,9 @@ import android.content.RestrictionsManager;
import android.content.om.IOverlayManager;
import android.content.om.OverlayManager;
import android.content.pm.CrossProfileApps;
import android.content.pm.DataLoaderManager;
import android.content.pm.ICrossProfileApps;
import android.content.pm.IDataLoaderManager;
import android.content.pm.IPackageManager;
import android.content.pm.IShortcutService;
import android.content.pm.LauncherApps;
@@ -1197,6 +1199,15 @@ public final class SystemServiceRegistry {
                        return new BatteryStatsManager(
                                IBatteryStats.Stub.asInterface(b));
                    }});
        registerService(Context.DATA_LOADER_MANAGER_SERVICE, DataLoaderManager.class,
                new CachedServiceFetcher<DataLoaderManager>() {
                    @Override
                    public DataLoaderManager createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        IBinder b = ServiceManager.getServiceOrThrow(
                                Context.DATA_LOADER_MANAGER_SERVICE);
                        return new DataLoaderManager(IDataLoaderManager.Stub.asInterface(b));
                    }});
        //CHECKSTYLE:ON IndentationCheck

        sInitializing = true;
+8 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ import com.android.server.os.DeviceIdentifiersPolicyService;
import com.android.server.os.SchedulingPolicyService;
import com.android.server.pm.BackgroundDexOptService;
import com.android.server.pm.CrossProfileAppsService;
import com.android.server.pm.DataLoaderManagerService;
import com.android.server.pm.DynamicCodeLoggingService;
import com.android.server.pm.Installer;
import com.android.server.pm.LauncherAppsService;
@@ -321,6 +322,7 @@ public final class SystemServer {
    private PackageManager mPackageManager;
    private ContentResolver mContentResolver;
    private EntropyMixer mEntropyMixer;
    private DataLoaderManagerService mDataLoaderManagerService;

    private boolean mOnlyCore;
    private boolean mFirstBoot;
@@ -694,6 +696,12 @@ public final class SystemServer {
        mWindowManagerGlobalLock = atm.getGlobalLock();
        t.traceEnd();

        // Data loader manager service needs to be started before package manager
        t.traceBegin("StartDataLoaderManagerService");
        mDataLoaderManagerService = mSystemServiceManager.startService(
                DataLoaderManagerService.class);
        t.traceEnd();

        // Power manager needs to be started early because other services need it.
        // Native daemons may be watching for it to be registered so it must be ready
        // to handle incoming binder calls immediately (including being able to verify