Skip to content
Snippets Groups Projects
Commit 48a3126d authored by Ioannis Ilkos's avatar Ioannis Ilkos Committed by Gerrit Code Review
Browse files

Merge "Publish TracingServiceProxy after storage has been unlocked" into main

parents 41e38545 5a104f2b
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,7 @@ public class TracingServiceProxy extends SystemService {
private final Context mContext;
private final PackageManager mPackageManager;
private final LruCache<ComponentName, ServiceConnector<IMessenger>> mCachedReporterServices;
private boolean mServicePublished = false;
private final ITracingServiceProxy.Stub mTracingServiceProxy = new ITracingServiceProxy.Stub() {
/**
......@@ -122,9 +123,12 @@ public class TracingServiceProxy extends SystemService {
public void onStart() {}
@Override
public void onBootPhase(int phase) {
if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
public void onUserUnlocking(@NonNull TargetUser user) {
// We need the device storage to be unlocked before we can accept and forward
// requests.
if (!mServicePublished) {
publishBinderService(TRACING_SERVICE_PROXY_BINDER_NAME, mTracingServiceProxy);
mServicePublished = true;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment