diff --git a/app/src/main/java/zechs/drive/stream/ui/player/PlayerActivity.kt b/app/src/main/java/zechs/drive/stream/ui/player/PlayerActivity.kt index 54b4e89..9e932c7 100644 --- a/app/src/main/java/zechs/drive/stream/ui/player/PlayerActivity.kt +++ b/app/src/main/java/zechs/drive/stream/ui/player/PlayerActivity.kt @@ -14,6 +14,7 @@ import android.widget.HorizontalScrollView import android.widget.LinearLayout import android.widget.Toast import androidx.activity.viewModels +import androidx.annotation.RequiresApi import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.core.view.* @@ -249,6 +250,7 @@ class PlayerActivity : AppCompatActivity() { playMedia() } + @RequiresApi(Build.VERSION_CODES.O) private fun enterPIPMode() { this.enterPictureInPictureMode( PictureInPictureParams @@ -639,6 +641,7 @@ class PlayerActivity : AppCompatActivity() { } } + @RequiresApi(Build.VERSION_CODES.O) override fun onPictureInPictureModeChanged( isInPictureInPictureMode: Boolean, newConfig: Configuration diff --git a/app/src/main/java/zechs/drive/stream/ui/player2/MPVActivity.kt b/app/src/main/java/zechs/drive/stream/ui/player2/MPVActivity.kt index 8052bcc..3a29e66 100644 --- a/app/src/main/java/zechs/drive/stream/ui/player2/MPVActivity.kt +++ b/app/src/main/java/zechs/drive/stream/ui/player2/MPVActivity.kt @@ -10,7 +10,6 @@ import android.os.Build import android.os.Bundle import android.util.Log import android.view.View -import android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE import android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON import android.widget.SeekBar import androidx.activity.viewModels @@ -19,6 +18,7 @@ import androidx.core.content.ContextCompat import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsControllerCompat +import androidx.core.view.WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE import androidx.core.view.isVisible import androidx.lifecycle.Lifecycle import androidx.lifecycle.lifecycleScope diff --git a/app/src/main/res/drawable-v24/ic_audio_24.xml b/app/src/main/res/drawable/ic_audio_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_audio_24.xml rename to app/src/main/res/drawable/ic_audio_24.xml diff --git a/app/src/main/res/drawable-v24/ic_back_24.xml b/app/src/main/res/drawable/ic_back_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_back_24.xml rename to app/src/main/res/drawable/ic_back_24.xml diff --git a/app/src/main/res/drawable-v24/ic_chapter_24.xml b/app/src/main/res/drawable/ic_chapter_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_chapter_24.xml rename to app/src/main/res/drawable/ic_chapter_24.xml diff --git a/app/src/main/res/drawable-v24/ic_delete_24.xml b/app/src/main/res/drawable/ic_delete_24.xml old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/res/drawable-v24/ic_delete_24.xml rename to app/src/main/res/drawable/ic_delete_24.xml diff --git a/app/src/main/res/drawable-v24/ic_forward_skip_24.xml b/app/src/main/res/drawable/ic_forward_skip_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_forward_skip_24.xml rename to app/src/main/res/drawable/ic_forward_skip_24.xml diff --git a/app/src/main/res/drawable-v24/ic_landscape_24.xml b/app/src/main/res/drawable/ic_landscape_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_landscape_24.xml rename to app/src/main/res/drawable/ic_landscape_24.xml diff --git a/app/src/main/res/drawable-v24/ic_my_drive_24.xml b/app/src/main/res/drawable/ic_my_drive_24.xml old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/res/drawable-v24/ic_my_drive_24.xml rename to app/src/main/res/drawable/ic_my_drive_24.xml diff --git a/app/src/main/res/drawable-v24/ic_pause_24.xml b/app/src/main/res/drawable/ic_pause_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_pause_24.xml rename to app/src/main/res/drawable/ic_pause_24.xml diff --git a/app/src/main/res/drawable-v24/ic_pip_24.xml b/app/src/main/res/drawable/ic_pip_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_pip_24.xml rename to app/src/main/res/drawable/ic_pip_24.xml diff --git a/app/src/main/res/drawable-v24/ic_play_24.xml b/app/src/main/res/drawable/ic_play_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_play_24.xml rename to app/src/main/res/drawable/ic_play_24.xml diff --git a/app/src/main/res/drawable-v24/ic_portrait_24.xml b/app/src/main/res/drawable/ic_portrait_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_portrait_24.xml rename to app/src/main/res/drawable/ic_portrait_24.xml diff --git a/app/src/main/res/drawable-v24/ic_resize_24.xml b/app/src/main/res/drawable/ic_resize_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_resize_24.xml rename to app/src/main/res/drawable/ic_resize_24.xml diff --git a/app/src/main/res/drawable-v24/ic_rewind_skip_24.xml b/app/src/main/res/drawable/ic_rewind_skip_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_rewind_skip_24.xml rename to app/src/main/res/drawable/ic_rewind_skip_24.xml diff --git a/app/src/main/res/drawable-v24/ic_shared_drive_24.xml b/app/src/main/res/drawable/ic_shared_drive_24.xml old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/res/drawable-v24/ic_shared_drive_24.xml rename to app/src/main/res/drawable/ic_shared_drive_24.xml diff --git a/app/src/main/res/drawable-v24/ic_shared_me_24.xml b/app/src/main/res/drawable/ic_shared_me_24.xml old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/res/drawable-v24/ic_shared_me_24.xml rename to app/src/main/res/drawable/ic_shared_me_24.xml diff --git a/app/src/main/res/drawable-v24/ic_speed_24.xml b/app/src/main/res/drawable/ic_speed_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_speed_24.xml rename to app/src/main/res/drawable/ic_speed_24.xml diff --git a/app/src/main/res/drawable-v24/ic_starred_24.xml b/app/src/main/res/drawable/ic_starred_24.xml old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/res/drawable-v24/ic_starred_24.xml rename to app/src/main/res/drawable/ic_starred_24.xml diff --git a/app/src/main/res/drawable-v24/ic_subtitles_24.xml b/app/src/main/res/drawable/ic_subtitles_24.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_subtitles_24.xml rename to app/src/main/res/drawable/ic_subtitles_24.xml diff --git a/app/src/main/res/layout/item_drive_file.xml b/app/src/main/res/layout/item_drive_file.xml index 7e0e637..9da8aba 100755 --- a/app/src/main/res/layout/item_drive_file.xml +++ b/app/src/main/res/layout/item_drive_file.xml @@ -76,6 +76,7 @@ style="@style/Widget.Material3.Button.IconButton" android:layout_width="0dp" android:layout_height="0dp" + android:background="@null" android:layout_marginEnd="8dp" android:contentDescription="@null" app:layout_constraintBottom_toBottomOf="parent" diff --git a/mpv/src/main/java/zechs/mpv/MPVView.kt b/mpv/src/main/java/zechs/mpv/MPVView.kt index 5ad309c..0b19882 100644 --- a/mpv/src/main/java/zechs/mpv/MPVView.kt +++ b/mpv/src/main/java/zechs/mpv/MPVView.kt @@ -42,7 +42,9 @@ class MPVView( @Suppress("DEPRECATION") wm.defaultDisplay } - val refreshRate = display.mode.refreshRate + val refreshRate = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + display.mode.refreshRate + } else 60.0F val deviceLanguage = Locale.getDefault().isO3Language Log.d(TAG, "Device language: $deviceLanguage")