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

Commit dc44cbbb authored by Lalit Maganti's avatar Lalit Maganti
Browse files

fw: delay TracingServiceProxy until PHASE_THIRD_PARTY_APPS_CAN_START

Because all methods in TracingServiceProxy want to bind/start services
in places outside system_server, it makes sense to wait until
PHASE_THIRD_PARTY_APPS_CAN_START to actually publish the service

This should solve some subtle race conditions around OOM heap dumps where they were being dropped on the floor by system_server because the GMSCore package had not yet been populated by PackageManager.

Bug: 333846370
Change-Id: I1addeafd9eac69e11c896fdda9a7a3924c09e22c
parent 52bd4f13
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -119,9 +119,14 @@ public class TracingServiceProxy extends SystemService {
    }

    @Override
    public void onStart() {
    public void onStart() {}

    @Override
    public void onBootPhase(int phase) {
        if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
            publishBinderService(TRACING_SERVICE_PROXY_BINDER_NAME, mTracingServiceProxy);
        }
    }

    private void notifyTraceur(boolean sessionStolen) {
        final Intent intent = new Intent();