From 3cc5eee0ff2d5eb650a71c78235229422322a3a6 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Sat, 31 Oct 2015 11:33:10 -0400 Subject: Have a different option for bluetooth reconnect. Vibrate when starting playback due to bluetooth reconnect. fixes AntennaPod/AntennaPod#1305 --- .../java/de/test/antennapod/ui/PreferencesTest.java | 12 ++++++++++++ app/src/main/res/xml/preferences.xml | 9 ++++++++- .../core/preferences/UserPreferences.java | 5 +++++ .../core/service/playback/PlaybackService.java | 21 ++++++++++++++++----- core/src/main/res/values/strings.xml | 4 +++- 5 files changed, 44 insertions(+), 7 deletions(-) diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java index 8de4ba3c8..fabc399ba 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java @@ -125,6 +125,18 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2 unpauseOnHeadsetReconnect == UserPreferences.isUnpauseOnHeadsetReconnect(), Timeout.getLargeTimeout())); } + public void testBluetoothReconnect() { + if(UserPreferences.isPauseOnHeadsetDisconnect() == false) { + solo.clickOnText(solo.getString(R.string.pref_pauseOnHeadsetDisconnect_title)); + assertTrue(solo.waitForCondition(() -> UserPreferences.isPauseOnHeadsetDisconnect(), Timeout.getLargeTimeout())); + } + final boolean unpauseOnBluetoothReconnect = UserPreferences.isUnpauseOnBluetoothReconnect(); + solo.clickOnText(solo.getString(R.string.pref_unpauseOnBluetoothReconnect_title)); + assertTrue(solo.waitForCondition(() -> unpauseOnBluetoothReconnect != UserPreferences.isUnpauseOnBluetoothReconnect(), Timeout.getLargeTimeout())); + solo.clickOnText(solo.getString(R.string.pref_unpauseOnBluetoothReconnect_title)); + assertTrue(solo.waitForCondition(() -> unpauseOnBluetoothReconnect == UserPreferences.isUnpauseOnBluetoothReconnect(), Timeout.getLargeTimeout())); + } + public void testContinuousPlayback() { final boolean continuousPlayback = UserPreferences.isFollowQueue(); solo.clickOnText(solo.getString(R.string.pref_followQueue_title)); diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 8d507663a..bc020fb36 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -73,7 +73,7 @@ android:defaultValue="true" android:enabled="true" android:key="prefPauseOnHeadsetDisconnect" - android:summary="@string/pref_pauseOnHeadsetDisconnect_sum" + android:summary="@string/pref_pauseOnDisconnect_sum" android:title="@string/pref_pauseOnHeadsetDisconnect_title"/> + Flattr Episode Cleanup Episodes that aren\'t in the queue and aren\'t favorites should be eligible for removal if space is needed - Pause playback when the headphones are disconnected + Pause playback when the headphones or Bluetooth are disconnected Resume playback when the headphones are reconnected + Resume playback when bluetooth reconnects Jump to next queue item when playback completes Delete episode when playback completes Auto Delete @@ -298,6 +299,7 @@ WiFi media download Headphones Disconnect Headphones Reconnect + Bluetooth Reconnect Mobile Updates Allow updates over the mobile data connection Refreshing -- cgit v1.2.3