Methods Summary |
---|
public synchronized void | callBackgroundEventHandler()Notify media event consumer about the switch to background
if (map == null) {
return;
}
int size = map.size();
hasForeground = false;
for (int i = 0; i < size; ++i) {
MediaEventConsumer c = (MediaEventConsumer)map.elementAt(i);
c.handleMediaBackgroundNotify();
}
|
public synchronized void | callForegroundEventHandler()Notify media event consumer about the switch to foreground
if (map == null) {
return;
}
int size = map.size();
hasForeground = true;
for (int i = 0; i < size; ++i) {
MediaEventConsumer c = (MediaEventConsumer)map.elementAt(i);
c.handleMediaForegroundNotify();
}
|
public static com.sun.mmedia.MediaTunnel | getInstance()Get media tunnel singleton object
if (instance == null) {
instance = new MediaTunnel();
}
return instance;
|
public boolean | isBackPlayable()Is this midlet background playable?
return false;
|
public synchronized boolean | registerMediaEventConsumer(MediaEventConsumer consumer)Register media event consumer
if (map == null) {
map = new Vector(5);
}
if (false == map.contains(consumer)) {
map.addElement(consumer);
}
return hasForeground;
|
public synchronized void | unregisterMediaEventConsumer(MediaEventConsumer consumer)Register media event consumer
if (map == null) {
return;
}
if (true == map.contains(consumer)) {
map.removeElement(consumer);
}
|