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

Commit f4dcdaeb authored by Song Pan's avatar Song Pan Committed by Android (Google) Code Review
Browse files

Merge "Implement methods in AppIntegrityManagerServiceImpl."

parents cd87f72f 6e3677c0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ import android.content.ContentCaptureOptions;
import android.content.Context;
import android.content.IRestrictionsManager;
import android.content.RestrictionsManager;
import android.content.integrity.AppIntegrityManager;
import android.content.integrity.IAppIntegrityManager;
import android.content.om.IOverlayManager;
import android.content.om.OverlayManager;
import android.content.pm.CrossProfileApps;
@@ -1246,6 +1248,14 @@ public final class SystemServiceRegistry {
                                IIncrementalManagerNative.Stub.asInterface(b));
                    }});
        //CHECKSTYLE:ON IndentationCheck
        registerService(Context.APP_INTEGRITY_SERVICE, AppIntegrityManager.class,
                new CachedServiceFetcher<AppIntegrityManager>() {
                    @Override
                    public AppIntegrityManager createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        IBinder b = ServiceManager.getServiceOrThrow(Context.APP_INTEGRITY_SERVICE);
                        return new AppIntegrityManager(IAppIntegrityManager.Stub.asInterface(b));
                    }});

        sInitializing = true;
        try {
+13 −0
Original line number Diff line number Diff line
@@ -86,6 +86,19 @@ public final class AppInstallMetadata {
        return mIsPreInstalled;
    }

    @Override
    public String toString() {
        return String.format(
                "AppInstallMetadata { PackageName = %s, AppCert = %s, InstallerName = %s,"
                    + " InstallerCert = %s, VersionCode = %d, PreInstalled = %b }",
                mPackageName,
                mAppCertificate,
                mInstallerName == null ? "null" : mInstallerName,
                mInstallerCertificate == null ? "null" : mInstallerCertificate,
                mVersionCode,
                mIsPreInstalled);
    }

    /** Builder class for constructing {@link AppInstallMetadata} objects. */
    public static final class Builder {
        private String mPackageName;
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public class AppIntegrityManagerService extends SystemService {

    @Override
    public void onStart() {
        mService = new AppIntegrityManagerServiceImpl(mContext);
        // TODO: define and publish a binder service.
        mService = AppIntegrityManagerServiceImpl.create(mContext);
        publishBinderService(Context.APP_INTEGRITY_SERVICE, mService);
    }
}
+431 −14

File changed.

Preview size limit exceeded, changes collapsed.

+169 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading