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

This commit is contained in:
Alex Buynytskyy
2022-03-03 20:30:43 +00:00
committed by Android (Google) Code Review
3 changed files with 43 additions and 0 deletions

View File

@@ -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 {

View File

@@ -0,0 +1,31 @@
/*
* 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 {
}

View File

@@ -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(