Merge branch 'bugfix/android10_completion_sound' into 'master'
Fix late playing completion sound (Android 10) Closes #62 See merge request tslocum/meditationassistant!5merge-requests/7/head
commit
fe9da0c854
|
@ -145,10 +145,7 @@ public class CompleteActivity extends Activity {
|
|||
break;
|
||||
}
|
||||
|
||||
String finishSoundPath = getMeditationAssistant().getPrefs().getString("pref_meditation_sound_finish", "");
|
||||
if (!manual) {
|
||||
getMeditationAssistant().notifySession(2, false, false);
|
||||
} else {
|
||||
if (manual) {
|
||||
getMeditationAssistant().restoreVolume();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1889,9 +1889,8 @@ public class MainActivity extends Activity implements OnShowcaseEventListener {
|
|||
}
|
||||
|
||||
if (fullWakeUp) {
|
||||
if (getMeditationAssistant().getPrefs().getBoolean("pref_softfinish", false)) {
|
||||
getMeditationAssistant().notifySession(2, false, false);
|
||||
} else {
|
||||
getMeditationAssistant().notifySession(2, false, false);
|
||||
if (!getMeditationAssistant().getPrefs().getBoolean("pref_softfinish", false)) {
|
||||
Intent openAlarmReceiverActivity = new Intent(getApplicationContext(), CompleteActivity.class);
|
||||
openAlarmReceiverActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
openAlarmReceiverActivity.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
|
|
|
@ -674,7 +674,7 @@ public class MeditationAssistant extends Application {
|
|||
// Vibrate device
|
||||
if (!skipVibration) {
|
||||
String vibration = prefs.getString("pref_meditation_vibrate_" + label, "");
|
||||
if (!vibration.equals("none")) {
|
||||
if (!vibration.isEmpty()) {
|
||||
if (vibration.equals("custom")) {
|
||||
vibrateDevice(prefs.getString("pref_meditation_vibrate_" + label + "_custom", ""));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue