示例#1
0
 /**
  * Whether this ringtone is currently playing.
  *
  * @return True if playing, false otherwise.
  */
 @DSGenerator(
     tool_name = "Doppelganger",
     tool_version = "2.0",
     generated_on = "2013-12-30 12:28:26.981 -0500",
     hash_original_method = "0CA36CF7485684069EDD095AE8455157",
     hash_generated_method = "113EE03FEC2AB5B9B31E6309FF6709D4")
 public boolean isPlaying() {
   return mAudio != null && mAudio.isPlaying();
 }
示例#2
0
  @GuiCallback("pop")
  public void onPopDown(Widget w, MouseDownEvent event) {
    if (player.isPlaying()) {
      if (player.isPaused()) player.resume();
      else player.pause();
    } else {
      player.startPlay();
    }

    updatePopState();
    gui.postEvent(new UpdateMediaEvent());
  }
示例#3
0
 /**
  * Whether this ringtone is currently playing.
  *
  * @return True if playing, false otherwise.
  */
 public boolean isPlaying() {
   if (mLocalPlayer != null) {
     return mLocalPlayer.isPlaying();
   } else if (mAllowRemote && (mRemotePlayer != null)) {
     try {
       return mRemotePlayer.isPlaying(mRemoteToken);
     } catch (RemoteException e) {
       Log.w(TAG, "Problem checking ringtone: " + e);
       return false;
     }
   } else {
     Log.w(TAG, "Neither local nor remote playback available");
     return false;
   }
 }
示例#4
0
 private void updatePopState() {
   System.out.println(player.isPlaying());
   DrawTexture.get(pageMain.getWidget("pop")).texture =
       (player.isPlaying() && !player.isPaused()) ? T_PAUSE : T_PLAY;
 }