diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index ae927e6d6..c69a31bc3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -19,7 +19,6 @@ import android.media.MediaMetadataRetriever; import android.media.MediaPlayer; import android.media.RemoteControlClient; import android.media.RemoteControlClient.MetadataEditor; -import android.os.AsyncTask; import android.os.Binder; import android.os.Build; import android.os.IBinder; @@ -33,12 +32,9 @@ import android.widget.Toast; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; -import com.bumptech.glide.request.animation.GlideAnimation; -import com.bumptech.glide.request.target.SimpleTarget; import org.apache.commons.lang3.StringUtils; -import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException; @@ -406,7 +402,7 @@ public class PlaybackService extends Service { @Override public void onSleepTimerAlmostExpired() { - mediaPlayer.setVolume(0.5f); + mediaPlayer.setVolume(0.1f); } @Override diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java index 0a89860a8..4872dd7bd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java @@ -350,8 +350,6 @@ public class PlaybackServiceTaskManager { waitingTime -= now - lastTick; lastTick = now; - Log.d(TAG, "time left: " + waitingTime); - if(waitingTime < NOTIFICATION_THRESHOLD && !notifiedAlmostExpired) { Log.d(TAG, "Sleep timer is about to expire"); if(vibrate) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java index 77d765a85..446061ea6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java @@ -24,6 +24,8 @@ public class ShakeListener implements SensorEventListener } public void resume() { + // only a precaution, the user should actually not be able to activate shake to reset + // when the accelerometer is not available mSensorMgr = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); if (mSensorMgr == null) { throw new UnsupportedOperationException("Sensors not supported");