Search in sources :

Example 1 with ISessionControllerCallback

use of android.media.session.ISessionControllerCallback in project android_frameworks_base by AOSPA.

the class MediaSessionRecord method pushNowPlayingEntries.

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

Example 2 with ISessionControllerCallback

use of android.media.session.ISessionControllerCallback in project android_frameworks_base by ResurrectionRemix.

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)

Example 3 with ISessionControllerCallback

use of android.media.session.ISessionControllerCallback in project android_frameworks_base by ResurrectionRemix.

the class MediaSessionRecord method pushNowPlayingContentChange.

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

Example 4 with ISessionControllerCallback

use of android.media.session.ISessionControllerCallback in project android_frameworks_base by crdroidandroid.

the class MediaSessionRecord method pushNowPlayingEntries.

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

Example 5 with ISessionControllerCallback

use of android.media.session.ISessionControllerCallback in project android_frameworks_base by AOSPA.

the class MediaSessionRecord method pushBrowsePlayerInfo.

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

Aggregations

ISessionControllerCallback (android.media.session.ISessionControllerCallback)12 DeadObjectException (android.os.DeadObjectException)12 RemoteException (android.os.RemoteException)12