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

Commit ad0f5f8b authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Add PackageManagerLocal for mainline modules" into tm-dev

parents 3e2a850f c4481c54
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -44,6 +44,13 @@ package com.android.server.am {

}

package com.android.server.pm {

  public interface PackageManagerLocal {
  }

}

package com.android.server.role {

  public interface RoleServicePlatformHelper {
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.pm;

import android.annotation.SystemApi;

/**
 * In-process API for server side PackageManager related infrastructure.
 *
 * For now, avoiding adding methods that rely on package data until we solve the snapshot
 * consistency problem.
 *
 * @hide
 */
@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
public interface PackageManagerLocal {
}
+5 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ import com.android.internal.util.Preconditions;
import com.android.permission.persistence.RuntimePermissionsPersistence;
import com.android.server.EventLogTags;
import com.android.server.FgThread;
import com.android.server.LocalManagerRegistry;
import com.android.server.LocalServices;
import com.android.server.LockGuard;
import com.android.server.PackageWatchdog;
@@ -1552,6 +1553,7 @@ public class PackageManagerService extends IPackageManager.Stub
        ServiceManager.addService("package", m);
        final PackageManagerNative pmn = new PackageManagerNative(m);
        ServiceManager.addService("package_native", pmn);
        LocalManagerRegistry.addManager(PackageManagerLocal.class, m.new PackageManagerLocalImpl());
        return m;
    }

@@ -6790,6 +6792,9 @@ public class PackageManagerService extends IPackageManager.Stub
        return mComputer.canQueryPackage(callingUid, targetPackageName);
    }

    private class PackageManagerLocalImpl implements PackageManagerLocal {
    }

    private class PackageManagerInternalImpl extends PackageManagerInternal {
        @Override
        public List<ApplicationInfo> getInstalledApplications(