diff options
| author | Jose Lima <joselima@google.com> | 2014-08-12 17:41:12 -0700 |
|---|---|---|
| committer | Jose Ricardo Lima <joselima@google.com> | 2014-08-14 02:00:04 +0000 |
| commit | 4b6c6697da5a20c08b2f9f2ca40c94008477e914 (patch) | |
| tree | be4cf7a9f9e826dc1773a5c35cc4dffac8219b92 /core/java/android/app/ApplicationThreadNative.java | |
| parent | c12035cd40d01b032013f515cb509e6c8791cf65 (diff) | |
Renamed "media playing" APIs to "visible behind"
- Request from API Review: rename the media playing APIs to a more
generic name, reflecting the background visibility feature these
methods actually control.
- Made the new isActivityVisibleBehind().
- Changed convertFromTranslucent() and convertToTranslucent() to be
SystemApi.
Bug: 16959028
Change-Id: I526eac22f44273b3254dd6201f89194d13e597e2
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index e9d4bd9763e4..52b69e12eb84 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -648,21 +648,21 @@ public abstract class ApplicationThreadNative extends Binder return true; } - case STOP_MEDIA_PLAYING_TRANSACTION: + case CANCEL_VISIBLE_BEHIND_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); IBinder token = data.readStrongBinder(); - scheduleStopMediaPlaying(token); + scheduleCancelVisibleBehind(token); reply.writeNoException(); return true; } - case BACKGROUND_MEDIA_PLAYING_CHANGED_TRANSACTION: + case BACKGROUND_VISIBLE_BEHIND_CHANGED_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); IBinder token = data.readStrongBinder(); boolean enabled = data.readInt() > 0; - scheduleBackgroundMediaPlayingChanged(token, enabled); + scheduleBackgroundVisibleBehindChanged(token, enabled); reply.writeNoException(); return true; } @@ -1334,21 +1334,23 @@ class ApplicationThreadProxy implements IApplicationThread { } @Override - public void scheduleStopMediaPlaying(IBinder token) throws RemoteException { + public void scheduleCancelVisibleBehind(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeStrongBinder(token); - mRemote.transact(STOP_MEDIA_PLAYING_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); + mRemote.transact(CANCEL_VISIBLE_BEHIND_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); } @Override - public void scheduleBackgroundMediaPlayingChanged(IBinder token, boolean enabled) throws RemoteException { + public void scheduleBackgroundVisibleBehindChanged(IBinder token, boolean enabled) + throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeStrongBinder(token); data.writeInt(enabled ? 1 : 0); - mRemote.transact(BACKGROUND_MEDIA_PLAYING_CHANGED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); + mRemote.transact(BACKGROUND_VISIBLE_BEHIND_CHANGED_TRANSACTION, data, null, + IBinder.FLAG_ONEWAY); data.recycle(); } |
