From 3a29bf5985278de6186d2f476879a55925d768bd Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 4 Jul 2020 22:36:17 +0200 Subject: [PATCH] fix https://github.com/sschueller/peertube-android/issues/202 --- CHANGELOG.md | 3 +++ app/build.gradle | 4 ++-- .../schueller/peertube/activity/VideoPlayActivity.java | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4f090..f6e2563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Version 1.0.43 Tag: v1.0.43 (2020-07-04) + * Fix back button issue + ### Version 1.0.42 Tag: v1.0.42 (2020-07-04) * Added appbar at the top of the SettingsActivity (@Poslovitch) * Improved and added some French translations (@Poslovitch) diff --git a/app/build.gradle b/app/build.gradle index 701767c..0751f3e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "net.schueller.peertube" minSdkVersion 21 targetSdkVersion 29 - versionCode 1042 - versionName "1.0.42" + versionCode 1043 + versionName "1.0.43" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ext { libVersions = [ diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index aa33eb1..f241d8b 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -415,6 +415,10 @@ public class VideoPlayActivity extends AppCompatActivity { } String backgroundBehavior = sharedPref.getString("pref_background_behavior","backgroundStop"); + + + // Log.v(TAG,"backgroundBehavior: " + backgroundBehavior); + switch (backgroundBehavior){ case "backgroundStop": Log.v(TAG,"stop the video"); @@ -440,6 +444,11 @@ public class VideoPlayActivity extends AppCompatActivity { super.onBackPressed(); } break; + default: + // Deal with bad entries from older version + Log.v(TAG,"No setting, fallback"); + super.onBackPressed(); + break; } Log.v(TAG, "onBackPressed()..."); }