• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2014 The Android Open Source Project
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package android.media.session;
17 
18 import android.app.PendingIntent;
19 import android.content.pm.ParceledListSlice;
20 import android.media.AudioAttributes;
21 import android.media.MediaMetadata;
22 import android.media.session.ISessionController;
23 import android.media.session.PlaybackState;
24 import android.media.session.MediaSession;
25 import android.os.Bundle;
26 import android.os.ResultReceiver;
27 
28 /**
29  * Interface to a MediaSession in the system.
30  * @hide
31  */
32 interface ISession {
sendEvent(String event, in Bundle data)33     void sendEvent(String event, in Bundle data);
getController()34     ISessionController getController();
setFlags(int flags)35     void setFlags(int flags);
setActive(boolean active)36     void setActive(boolean active);
setMediaButtonReceiver(in PendingIntent mbr)37     void setMediaButtonReceiver(in PendingIntent mbr);
setLaunchPendingIntent(in PendingIntent pi)38     void setLaunchPendingIntent(in PendingIntent pi);
destroy()39     void destroy();
40 
41     // These commands are for the TransportPerformer
setMetadata(in MediaMetadata metadata)42     void setMetadata(in MediaMetadata metadata);
setPlaybackState(in PlaybackState state)43     void setPlaybackState(in PlaybackState state);
setQueue(in ParceledListSlice queue)44     void setQueue(in ParceledListSlice queue);
setQueueTitle(CharSequence title)45     void setQueueTitle(CharSequence title);
setExtras(in Bundle extras)46     void setExtras(in Bundle extras);
setRatingType(int type)47     void setRatingType(int type);
48 
49     // These commands relate to volume handling
setPlaybackToLocal(in AudioAttributes attributes)50     void setPlaybackToLocal(in AudioAttributes attributes);
setPlaybackToRemote(int control, int max)51     void setPlaybackToRemote(int control, int max);
setCurrentVolume(int currentVolume)52     void setCurrentVolume(int currentVolume);
53 
getCallingPackage()54     String getCallingPackage();
55 }
56