Merge pull request #3791 from ByteHamster/default-pip

Enable PiP by default
This commit is contained in:
H. Lehmann 2020-01-27 14:14:43 +01:00 committed by GitHub
commit 409fbdfc2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -84,5 +84,8 @@ public class PreferenceUpgrader {
UserPreferences.setEnqueueLocation(enqueueLocation);
}
}
if (oldVersion < 1080100) {
prefs.edit().putString(UserPreferences.PREF_VIDEO_BEHAVIOR, "pip").apply();
}
}
}

View File

@ -35,7 +35,7 @@
android:summary="@string/pref_resumeAfterCall_sum"
android:title="@string/pref_resumeAfterCall_title"/>
<ListPreference
android:defaultValue="stop"
android:defaultValue="pip"
android:entries="@array/video_background_behavior_options"
android:entryValues="@array/video_background_behavior_values"
android:key="prefVideoBehavior"

View File

@ -822,11 +822,11 @@ public class UserPreferences {
}
public static VideoBackgroundBehavior getVideoBackgroundBehavior() {
switch (prefs.getString(PREF_VIDEO_BEHAVIOR, "stop")) {
switch (prefs.getString(PREF_VIDEO_BEHAVIOR, "pip")) {
case "stop": return VideoBackgroundBehavior.STOP;
case "pip": return VideoBackgroundBehavior.PICTURE_IN_PICTURE;
case "continue": return VideoBackgroundBehavior.CONTINUE_PLAYING;
default: return VideoBackgroundBehavior.STOP;
default: return VideoBackgroundBehavior.PICTURE_IN_PICTURE;
}
}