Home | History | Annotate | Download | only in media

Lines Matching defs:session

51 import android.media.session.IActiveSessionsListener;
52 import android.media.session.ICallback;
53 import android.media.session.IOnMediaKeyListener;
54 import android.media.session.IOnVolumeKeyLongPressListener;
55 import android.media.session.ISession;
56 import android.media.session.ISessionCallback;
57 import android.media.session.ISessionManager;
58 import android.media.session.MediaSession;
59 import android.media.session.MediaSessionManager;
209 Log.w(TAG, "Unknown session updated. Ignoring.");
214 Log.d(TAG, "Global priority session is updated, active=" + record.isActive());
219 Log.w(TAG, "Unknown session updated. Ignoring.");
232 Log.d(TAG, "Global priority session is changed from " + mGlobalPrioritySession
236 // Handle the global priority session separately.
237 // Otherwise, it can be the media button session regardless of the active state
262 // Return global priority session at the first whenever it's asked.
272 * Tells the system UI that volume has changed on an active remote session.
274 public void notifyRemoteVolumeChanged(int flags, MediaSessionRecord session) {
275 if (mRvc == null || !session.isActive()) {
279 mRvc.remoteVolumeChanged(session.getControllerBinder(), flags);
289 Log.d(TAG, "Unknown session changed playback state. Ignoring.");
300 Log.d(TAG, "Unknown session changed playback type. Ignoring.");
350 void sessionDied(MediaSessionRecord session) {
352 destroySessionLocked(session);
356 void destroySession(MediaSessionRecord session) {
358 destroySessionLocked(session);
414 * When a session is removed several things need to happen.
418 * 4. If this is the system priority session we need to clear it.
420 * 6. We need to tell the session to do any final cleanup (onDestroy)
422 private void destroySessionLocked(MediaSessionRecord session) {
424 Log.d(TAG, "Destroying " + session);
426 FullUserRecord user = getFullUserRecordLocked(session.getUserId());
427 if (mGlobalPrioritySession == session) {
429 if (session.isActive() && user != null) {
434 user.mPriorityStack.removeSession(session);
439 session.getCallback().asBinder().unlinkToDeath(session, 0);
441 // ignore exceptions while destroying a session.
443 session.onDestroy();
444 mHandler.postSessionsChanged(session.getUserId());
448 // TODO(jaewan): Only consider changed packages when building session service list
495 // Since we only want to update session service list once, ignore
533 // List to keep the session services that need be removed because they don't exist
561 Log.w(TAG, "Invalid session service", e);
567 // New session service is found.
582 Log.d(TAG, "Found " + mSessionRecords.size() + " session services");
674 * When a session is created the following things need to happen.
685 throw new RuntimeException("Session request from invalid user.");
688 final MediaSessionRecord session = new MediaSessionRecord(callerPid, callerUid, userId,
691 cb.asBinder().linkToDeath(session, 0);
693 throw new RuntimeException("Media Session owner died prematurely.", e);
696 user.mPriorityStack.addSession(session);
700 Log.d(TAG, "Created session for " + callerPackageName + " with tag " + tag);
702 return session;
762 * @param record the media session whose media button receiver is updated.
861 for (MediaSessionRecord session : sessions) {
862 MediaSessionService.this.destroySessionLocked(session);
894 Log.d(TAG, "Media button session is changed to " + newMediaButtonSession);
1100 * @param asSystemService {@code true} if the event sent to the session as if it was come
1104 * by foreground activity. {@code false} otherwise to tell session about the real
1140 // priority session is active.
1142 + "to the global priority session.");
1339 * there's no active global priority session, long-pressess will be sent to the
1343 * @param asSystemService {@code true} if the event sent to the session as if it was come
1347 * by foreground activity. {@code false} otherwise to tell session about the real
1517 pw.println("MEDIA SESSION SERVICE (dumpsys media_session)");
1522 pw.println("Global priority session is " + mGlobalPrioritySession);
1578 * 1. Keep the newly created session in the service
1582 * @return {@code true} if the session's id isn't used by the package now. {@code false}
1617 * Ideally service should know that a session is destroyed through the
1620 * issue. If the package recreates the session almost immediately, which happens commonly
1813 MediaSessionRecord session = isGlobalPriorityActiveLocked() ? mGlobalPrioritySession
1822 Log.d(TAG, "Adjusting " + session + " by " + direction + ". flags="
1826 if (session == null || preferSuggestedStream) {
1830 Log.d(TAG, "No active session to adjust, skipping media only volume event");
1857 session.adjustVolume(packageName, pid, uid, null, asSystemService,
1891 MediaSessionRecord session = mCurrentFullUserRecord.getMediaButtonSessionLocked();
1892 if (session != null) {
1894 Log.d(TAG, "Sending " + keyEvent + " to " + session);
1900 session.sendMediaButton(packageName, pid, uid, asSystemService, keyEvent,
1906 keyEvent, new MediaSession.Token(session.getControllerBinder()));
2263 Log.w(TAG, "Failed to notify session tokens changed", e);