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

Commit be306613 authored by mike dooley's avatar mike dooley
Browse files

Don't crash if SoundTriggerDetectionService client is gone

or if there is a remote exception while finishing an opperation

Test: built
Bug: 78137044
Change-Id: I4bc92f8688c2269178d101d95946f4835ab7c6a5
parent 1b5e2d8b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -191,13 +191,14 @@ public abstract class SoundTriggerDetectionService extends Service {
                client = mClients.get(uuid);

                if (client == null) {
                    throw new IllegalStateException("operationFinished called, but no client for "
                    Log.w(LOG_TAG, "operationFinished called, but no client for "
                            + uuid + ". Was this called after onDisconnected?");
                    return;
                }
            }
            client.onOpFinished(opId);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
            Log.e(LOG_TAG, "operationFinished, remote exception for client " + uuid, e);
        }
    }