diff options
| author | Winson <chiuwinson@google.com> | 2021-01-20 12:26:37 -0800 |
|---|---|---|
| committer | Winson <chiuwinson@google.com> | 2021-02-04 10:27:00 -0800 |
| commit | 47dbabfc14420ff54646df05039657df43901554 (patch) | |
| tree | e808445fffa00aebada41fea518fd452fe7d2f79 /services/java | |
| parent | 0af8c46c2fa7653e15c21c29b4a0f9dfb986f086 (diff) | |
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
Diffstat (limited to 'services/java')
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index b09d8a67577f..7b117d76b328 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -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(); |
