Search in sources :

Example 56 with DeadObjectException

use of android.os.DeadObjectException in project android_frameworks_base by crdroidandroid.

the class MediaSessionRecord method pushPlayItemResponse.

private void pushPlayItemResponse() {
    synchronized (mLock) {
        if (mDestroyed) {
            return;
        }
        for (int i = mControllerCallbacks.size() - 1; i >= 0; i--) {
            ISessionControllerCallback cb = mControllerCallbacks.get(i);
            try {
                Log.d(TAG, "pushPlayItemResponse");
                cb.onPlayItemResponse(mPlayItemStatus);
            } catch (DeadObjectException e) {
                Log.w(TAG, "Removing dead callback in pushPlayItemResponse. ", e);
                mControllerCallbacks.remove(i);
            } catch (RemoteException e) {
                Log.w(TAG, "unexpected exception in pushPlayItemResponse. ", e);
            }
        }
    }
}
Also used : DeadObjectException(android.os.DeadObjectException) RemoteException(android.os.RemoteException) ISessionControllerCallback(android.media.session.ISessionControllerCallback)

Aggregations

DeadObjectException (android.os.DeadObjectException)56 ICancellationSignal (android.os.ICancellationSignal)37 Nullable (android.annotation.Nullable)35 RemoteException (android.os.RemoteException)35 AssetFileDescriptor (android.content.res.AssetFileDescriptor)12 ISessionControllerCallback (android.media.session.ISessionControllerCallback)12 ParcelFileDescriptor (android.os.ParcelFileDescriptor)12 FileNotFoundException (java.io.FileNotFoundException)12 Cursor (android.database.Cursor)11 Resources (android.content.res.Resources)6 File (java.io.File)6 ServiceSpecificException (android.os.ServiceSpecificException)5