Home | History | Annotate | Download | only in soundtrigger

Lines Matching defs:uuid

40 import java.util.UUID;
57 * {@link #operationFinished(UUID, int)}. If this does not happen in
59 * {@link #onStopOperation(UUID, Bundle, int)} is called and the service is unbound.
74 * Client indexed by model uuid. This is needed for the {@link #operationFinished(UUID, int)}
78 private final ArrayMap<UUID, ISoundTriggerDetectionServiceClient> mClients =
92 private void setClient(@NonNull UUID uuid, @Nullable Bundle params,
94 if (DEBUG) Log.i(LOG_TAG, uuid + ": handle setClient");
97 mClients.put(uuid, client);
99 onConnected(uuid, params);
102 private void removeClient(@NonNull UUID uuid, @Nullable Bundle params) {
103 if (DEBUG) Log.i(LOG_TAG, uuid + ": handle removeClient");
106 mClients.remove(uuid);
108 onDisconnected(uuid, params);
113 * {@code uuid}.
117 * @param uuid The {@code uuid} of the model the recognitions is registered for
121 public void onConnected(@NonNull UUID uuid, @Nullable Bundle params) {
127 * {@code uuid}.
130 * {@code uuid}.
132 * <p> {@link #onConnected(UUID, Bundle)} is called before any further operations are delivered.
134 * @param uuid The {@code uuid} of the model the recognitions is registered for
138 public void onDisconnected(@NonNull UUID uuid, @Nullable Bundle params) {
145 * @param uuid The {@code uuid} of the model the recognition is registered for
148 * {@link #operationFinished(UUID, int)}
152 public void onGenericRecognitionEvent(@NonNull UUID uuid, @Nullable Bundle params, int opId,
154 operationFinished(uuid, opId);
160 * @param uuid The {@code uuid} of the model the recognition is registered for
163 * {@link #operationFinished(UUID, int)}
167 public void onError(@NonNull UUID uuid, @Nullable Bundle params, int opId, int status) {
168 operationFinished(uuid, opId);
174 * @param uuid The {@code uuid} of the model the recognition is registered for
179 public abstract void onStopOperation(@NonNull UUID uuid, @Nullable Bundle params, int opId);
184 * @param uuid The {@code uuid} of the model the recognition is registered for
187 public final void operationFinished(@Nullable UUID uuid, int opId) {
191 client = mClients.get(uuid);
195 + uuid + ". Was this called after onDisconnected?");
201 Log.e(LOG_TAG, "operationFinished, remote exception for client " + uuid, e);
213 /** Cached params bundles indexed by the model uuid */
215 public final ArrayMap<UUID, Bundle> mParams = new ArrayMap<>();
220 UUID uuid = puuid.getUuid();
222 mParams.put(uuid, params);
225 if (DEBUG) Log.i(LOG_TAG, uuid + ": setClient(" + params + ")");
227 SoundTriggerDetectionService.this, uuid, params, client));
232 UUID uuid = puuid.getUuid();
235 params = mParams.remove(uuid);
238 if (DEBUG) Log.i(LOG_TAG, uuid + ": removeClient");
240 SoundTriggerDetectionService.this, uuid, params));
246 UUID uuid = puuid.getUuid();
249 params = mParams.get(uuid);
252 if (DEBUG) Log.i(LOG_TAG, uuid + "(" + opId + "): onGenericRecognitionEvent");
255 SoundTriggerDetectionService.this, uuid, params, opId, event));
260 UUID uuid = puuid.getUuid();
263 params = mParams.get(uuid);
266 if (DEBUG) Log.i(LOG_TAG, uuid + "(" + opId + "): onError(" + status + ")");
268 SoundTriggerDetectionService.this, uuid, params, opId, status));
273 UUID uuid = puuid.getUuid();
276 params = mParams.get(uuid);
279 if (DEBUG) Log.i(LOG_TAG, uuid + "(" + opId + "): onStopOperation");
281 SoundTriggerDetectionService.this, uuid, params, opId));