Loading services/core/java/com/android/server/media/MediaSessionService.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -1134,8 +1134,19 @@ public class MediaSessionService extends SystemService implements Monitor { if (cb == null) { if (cb == null) { throw new IllegalArgumentException("Controller callback cannot be null"); throw new IllegalArgumentException("Controller callback cannot be null"); } } return createSessionInternal(pid, uid, resolvedUserId, packageName, cb, tag, MediaSessionRecord session = createSessionInternal( sessionInfo).getSessionBinder(); pid, uid, resolvedUserId, packageName, cb, tag, sessionInfo); if (session == null) { throw new IllegalStateException("Failed to create a new session record"); } ISession sessionBinder = session.getSessionBinder(); if (sessionBinder == null) { throw new IllegalStateException("Invalid session record"); } return sessionBinder; } catch (Exception e) { Slog.w(TAG, "Exception in creating a new session", e); throw e; } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } Loading Loading
services/core/java/com/android/server/media/MediaSessionService.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -1134,8 +1134,19 @@ public class MediaSessionService extends SystemService implements Monitor { if (cb == null) { if (cb == null) { throw new IllegalArgumentException("Controller callback cannot be null"); throw new IllegalArgumentException("Controller callback cannot be null"); } } return createSessionInternal(pid, uid, resolvedUserId, packageName, cb, tag, MediaSessionRecord session = createSessionInternal( sessionInfo).getSessionBinder(); pid, uid, resolvedUserId, packageName, cb, tag, sessionInfo); if (session == null) { throw new IllegalStateException("Failed to create a new session record"); } ISession sessionBinder = session.getSessionBinder(); if (sessionBinder == null) { throw new IllegalStateException("Invalid session record"); } return sessionBinder; } catch (Exception e) { Slog.w(TAG, "Exception in creating a new session", e); throw e; } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } Loading