Lines Matching refs:callback
285 public boolean onControlRequest(Intent intent, ControlRequestCallback callback) { in onControlRequest() argument
291 success = handlePlay(intent, callback); in onControlRequest()
293 success = handleEnqueue(intent, callback); in onControlRequest()
295 success = handleRemove(intent, callback); in onControlRequest()
297 success = handleSeek(intent, callback); in onControlRequest()
299 success = handleGetStatus(intent, callback); in onControlRequest()
301 success = handlePause(intent, callback); in onControlRequest()
303 success = handleResume(intent, callback); in onControlRequest()
305 success = handleStop(intent, callback); in onControlRequest()
307 success = handleStartSession(intent, callback); in onControlRequest()
309 success = handleGetSessionStatus(intent, callback); in onControlRequest()
311 success = handleEndSession(intent, callback); in onControlRequest()
321 if (callback != null) { in onControlRequest()
322 callback.onResult(data); in onControlRequest()
340 private boolean handlePlay(Intent intent, ControlRequestCallback callback) { in handlePlay() argument
349 return handleEnqueue(intent, callback); in handlePlay()
352 private boolean handleEnqueue(Intent intent, ControlRequestCallback callback) { in handleEnqueue() argument
382 if (callback != null) { in handleEnqueue()
389 callback.onResult(result); in handleEnqueue()
391 callback.onError("Failed to open " + uri.toString(), null); in handleEnqueue()
398 private boolean handleRemove(Intent intent, ControlRequestCallback callback) { in handleRemove() argument
406 if (callback != null) { in handleRemove()
411 callback.onResult(result); in handleRemove()
413 callback.onError("Failed to remove" + in handleRemove()
420 private boolean handleSeek(Intent intent, ControlRequestCallback callback) { in handleSeek() argument
430 if (callback != null) { in handleSeek()
435 callback.onResult(result); in handleSeek()
437 callback.onError("Failed to seek" + in handleSeek()
444 private boolean handleGetStatus(Intent intent, ControlRequestCallback callback) { in handleGetStatus() argument
449 if (callback != null) { in handleGetStatus()
454 callback.onResult(result); in handleGetStatus()
456 callback.onError("Failed to get status" + in handleGetStatus()
463 private boolean handlePause(Intent intent, ControlRequestCallback callback) { in handlePause() argument
467 if (callback != null) { in handlePause()
469 callback.onResult(new Bundle()); in handlePause()
472 callback.onError("Failed to pause, sid=" + sid, null); in handlePause()
478 private boolean handleResume(Intent intent, ControlRequestCallback callback) { in handleResume() argument
482 if (callback != null) { in handleResume()
484 callback.onResult(new Bundle()); in handleResume()
487 callback.onError("Failed to resume, sid=" + sid, null); in handleResume()
493 private boolean handleStop(Intent intent, ControlRequestCallback callback) { in handleStop() argument
497 if (callback != null) { in handleStop()
499 callback.onResult(new Bundle()); in handleStop()
502 callback.onError("Failed to stop, sid=" + sid, null); in handleStop()
508 private boolean handleStartSession(Intent intent, ControlRequestCallback callback) { in handleStartSession() argument
511 if (callback != null) { in handleStartSession()
517 callback.onResult(result); in handleStartSession()
522 callback.onError("Failed to start session.", null); in handleStartSession()
528 private boolean handleGetSessionStatus(Intent intent, ControlRequestCallback callback) { in handleGetSessionStatus() argument
532 if (callback != null) { in handleGetSessionStatus()
537 callback.onResult(result); in handleGetSessionStatus()
539 callback.onError("Failed to get session status, sid=" + sid, null); in handleGetSessionStatus()
545 private boolean handleEndSession(Intent intent, ControlRequestCallback callback) { in handleEndSession() argument
549 if (callback != null) { in handleEndSession()
555 callback.onResult(result); in handleEndSession()
559 callback.onError("Failed to end session, sid=" + sid, null); in handleEndSession()