Merge "Don't crash if SoundTriggerDetectionService client is gone or if there is a remote exception while finishing an opperation" into pi-dev
am: 74b6863504
Change-Id: I5b95c04240b85b2358c8e120a563a4d6a3bb9ce6
This commit is contained in:
@@ -191,13 +191,14 @@ public abstract class SoundTriggerDetectionService extends Service {
|
|||||||
client = mClients.get(uuid);
|
client = mClients.get(uuid);
|
||||||
|
|
||||||
if (client == null) {
|
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?");
|
+ uuid + ". Was this called after onDisconnected?");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client.onOpFinished(opId);
|
client.onOpFinished(opId);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.rethrowFromSystemServer();
|
Log.e(LOG_TAG, "operationFinished, remote exception for client " + uuid, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user