Enable PiP by default

This commit is contained in:
ByteHamster 2020-01-27 09:09:14 +01:00
parent 3bbe6d55f7
commit 5e84229918
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;
}
}