public void volumeUp() { if (isPreview || !isPuzzleRunning || !AudioService.isBusy()) { return; } isSilentMode = false; AlarmHelper.changeSoundVolume(context, AudioService.MAX_VOLUME, isVibrating); }
public View runPuzzle(DisplayMetrics metrics) { this.isVibrating = AudioService.isVibrating(); if (handler == null) { handler = new Handler(hCallback); } volumeUp(); View puzzleView = onPuzzleRun(metrics); puzzleView .findViewById(R.id.puzzle_rescue_button) .setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { FragmentManager fm = ((FragmentActivity) getContext()).getSupportFragmentManager(); RescueDialog dialog = RescueDialog.newInstance( getPuzzleResTitle(), getPuzzleResBigDescription(), Puzzle.this); dialog.show(fm, RescueDialog.FRAGMENT_TAG); } }); return puzzleView; }