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

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
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;
        }
    }