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

Commit 4550c531 authored by William Escande's avatar William Escande Committed by Cherrypicker Worker
Browse files

HFP: No longer crash when service is not available

We can no longer assert the log here.
The service is set as non-available before the native is cleaned up.
Meaning it is not possible to get it, but still the callback can be
called. This only happens during shutdown and adding a synchronized
block between them both will only result in a deadlock.

Fix: 243732562
Change-Id: I3a9c267d2bea083e7529a07f7809e0e444160f80
Test: TH
(cherry picked from commit b40fc009)
Merged-In: I3a9c267d2bea083e7529a07f7809e0e444160f80
parent 1000968d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public class HeadsetNativeInterface {
        } else {
            // Service must call cleanup() when quiting and native stack shouldn't send any event
            // after cleanup() -> cleanupNative() is called.
            Log.wtf(TAG, "FATAL: Stack sent event while service is not available: " + event);
            Log.w(TAG, "Stack sent event while service is not available: " + event);
        }
    }