예제 #1
0
  private void changeVolume() {
    if (currentVolume > MAX_VOLUME) {
      currentVolume = MAX_VOLUME;
    }
    if (currentVolume < MIN_VOLUME) {
      currentVolume = MIN_VOLUME;
    }

    player.changeVolume(currentVolume);

    saveVolume();
  }
예제 #2
0
        @Override
        public void onServiceConnected(ComponentName className, IBinder service) {
          PlayerService.LocalBinder binder = (PlayerService.LocalBinder) service;
          player = binder.getService();

          changeVolume();

          state = player.getState();
          changeState();

          bound = true;
        }