diff --git a/app/src/main/java/com/quran/labs/androidquran/service/AudioService.kt b/app/src/main/java/com/quran/labs/androidquran/service/AudioService.kt index 24c065ff4b..fbebe83763 100644 --- a/app/src/main/java/com/quran/labs/androidquran/service/AudioService.kt +++ b/app/src/main/java/com/quran/labs/androidquran/service/AudioService.kt @@ -575,7 +575,12 @@ class AudioService : Service(), OnCompletionListener, OnPreparedListener, val timeDelta = gaplessSuraData[updatedAyah + 1] - localPlayer.currentPosition val t = clamp(timeDelta, 100, 10000) val tAccountingForSpeed = t / (audioRequest?.playbackSpeed ?: 1f) - Timber.d("updateAudioPlayPosition after: %d, speed %f", t, tAccountingForSpeed) + Timber.d( + "updateAudioPlayPosition before: %d, after %f, speed: %f", + t, + tAccountingForSpeed, + audioRequest?.playbackSpeed + ) serviceHandler.sendEmptyMessageDelayed(MSG_UPDATE_AUDIO_POS, tAccountingForSpeed.toLong()) } else if (maxAyahs == updatedAyah) { serviceHandler.sendEmptyMessageDelayed(MSG_UPDATE_AUDIO_POS, 150) @@ -1395,7 +1400,6 @@ class AudioService : Service(), OnCompletionListener, OnPreparedListener, // so user can pass in a serializable LegacyAudioRequest to the intent const val EXTRA_PLAY_INFO = "com.quran.labs.androidquran.PLAY_INFO" - const val EXTRA_PLAY_SPEED = "com.quran.labs.androidquran.PLAY_SPEED" private const val NOTIFICATION_CHANNEL_ID = Constants.AUDIO_CHANNEL private const val MSG_INCOMING = 1 private const val MSG_START_AUDIO = 2 diff --git a/app/src/main/java/com/quran/labs/androidquran/ui/fragment/AyahPlaybackFragment.kt b/app/src/main/java/com/quran/labs/androidquran/ui/fragment/AyahPlaybackFragment.kt index 649190224f..815b2d7ccc 100644 --- a/app/src/main/java/com/quran/labs/androidquran/ui/fragment/AyahPlaybackFragment.kt +++ b/app/src/main/java/com/quran/labs/androidquran/ui/fragment/AyahPlaybackFragment.kt @@ -1,6 +1,7 @@ package com.quran.labs.androidquran.ui.fragment import android.content.Context +import android.os.Build import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -80,6 +81,11 @@ class AyahPlaybackFragment : AyahActionFragment() { repeatRangePicker = view.findViewById(R.id.repeat_range_picker) playbackSpeedPicker = view.findViewById(R.id.playback_speed_picker) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + val speedArea = view.findViewById(R.id.playback_speed_area) + speedArea.visibility = View.GONE + } + val context = requireContext() val isArabicNames = QuranSettings.getInstance(context).isArabicNames val locale: Locale = if (isArabicNames) { diff --git a/app/src/main/res/layout/playback_speed.xml b/app/src/main/res/layout/playback_speed.xml index 4b14f8bd90..146ea2849d 100644 --- a/app/src/main/res/layout/playback_speed.xml +++ b/app/src/main/res/layout/playback_speed.xml @@ -4,6 +4,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:id="@+id/playback_speed_area" >