Exemplo n.º 1
0
 private void stop() {
   this.playing = false;
   this.stopAudio();
   synchronized (bmpQ) {
     this.index -= bmpQ.size();
     while (!bmpQ.isEmpty()) {
       bmpQ.poll().recycle();
     }
   }
   this.updateProgress();
   this.ctrlView.setVisibility(View.VISIBLE);
   this.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
 }
Exemplo n.º 2
0
  private void updateProgress() {
    int progress = 0;
    synchronized (bmpQ) {
      progress = this.index + bmpQ.size();
    }

    Message msg = new Message();
    Bundle b = new Bundle();
    b.putInt(KEY_PLAY_PROGRESS, progress);
    msg.setData(b);
    msg.what = MSG_WHAT_PLAY_FRAME;
    this.handler.sendMessage(msg);
  }