Convert DomainVerificationService.Connection to synchronous set
Unfortunately it's possible to call this during PackageManagerService initialization, so this needs to be attached before PMS gets created. Rather than using a deferred injection, this makes PMS call setConnection to directly set the callback. A better isolated might be worth exploring in the future, but overall it shouldn't really matter. Exempt-From-Owner-Approval: Already approved by owners on main branch Bug: 163565712 Test: com.android.server.pm.test.domain.verify Change-Id: Ib60f5560ecaa510474228aa1c38eff5d6041ab58
This commit is contained in:
@@ -87,7 +87,6 @@ import android.util.DisplayMetrics;
|
||||
import android.util.EventLog;
|
||||
import android.util.IndentingPrintWriter;
|
||||
import android.util.Pair;
|
||||
import android.util.Singleton;
|
||||
import android.util.Slog;
|
||||
import android.util.TimeUtils;
|
||||
import android.view.contentcapture.ContentCaptureManager;
|
||||
@@ -1064,16 +1063,7 @@ public final class SystemServer implements Dumpable {
|
||||
|
||||
t.traceBegin("StartDomainVerificationService");
|
||||
DomainVerificationService domainVerificationService = new DomainVerificationService(
|
||||
mSystemContext, SystemConfig.getInstance(), platformCompat,
|
||||
new Singleton<DomainVerificationService.Connection>() {
|
||||
@Override
|
||||
protected DomainVerificationService.Connection create() {
|
||||
// Deferred retrieval from PackageManagerService, since PMS is initialized after
|
||||
// DVS. The alternative would be to expose this through the PackageManagerInternal
|
||||
// local service, but making it visible to consumers of that interface isn't useful.
|
||||
return mPackageManagerService.getDomainVerificationConnection();
|
||||
}
|
||||
});
|
||||
mSystemContext, SystemConfig.getInstance(), platformCompat);
|
||||
mSystemServiceManager.startService(domainVerificationService);
|
||||
t.traceEnd();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user