1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-27 01:01:23 +00:00

Removed remember popup properties setting

This commit is contained in:
Panorea
2020-10-02 18:25:01 -04:00
parent 44e82217c1
commit 314615bfef
67 changed files with 3 additions and 153 deletions

View File

@@ -1656,13 +1656,10 @@ public class VideoPlayerImpl extends VideoPlayer
updateScreenSize();
final boolean popupRememberSizeAndPos = PlayerHelper.isRememberingPopupDimensions(service);
final float defaultSize = service.getResources().getDimension(R.dimen.popup_default_width);
final SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(service);
popupWidth = popupRememberSizeAndPos
? sharedPreferences.getFloat(POPUP_SAVED_WIDTH, defaultSize)
: defaultSize;
popupWidth = sharedPreferences.getFloat(POPUP_SAVED_WIDTH, defaultSize);
popupHeight = getMinimumVideoHeight(popupWidth);
popupLayoutParams = new WindowManager.LayoutParams(
@@ -1676,10 +1673,8 @@ public class VideoPlayerImpl extends VideoPlayer
final int centerX = (int) (screenWidth / 2f - popupWidth / 2f);
final int centerY = (int) (screenHeight / 2f - popupHeight / 2f);
popupLayoutParams.x = popupRememberSizeAndPos
? sharedPreferences.getInt(POPUP_SAVED_X, centerX) : centerX;
popupLayoutParams.y = popupRememberSizeAndPos
? sharedPreferences.getInt(POPUP_SAVED_Y, centerY) : centerY;
popupLayoutParams.x = sharedPreferences.getInt(POPUP_SAVED_X, centerX);
popupLayoutParams.y = sharedPreferences.getInt(POPUP_SAVED_Y, centerY);
checkPopupPositionBounds();

View File

@@ -209,10 +209,6 @@ public final class PlayerHelper {
return isBrightnessGestureEnabled(context, true);
}
public static boolean isRememberingPopupDimensions(@NonNull final Context context) {
return isRememberingPopupDimensions(context, true);
}
public static boolean isAutoQueueEnabled(@NonNull final Context context) {
return isAutoQueueEnabled(context, false);
}
@@ -393,12 +389,6 @@ public final class PlayerHelper {
.getBoolean(context.getString(R.string.brightness_gesture_control_key), b);
}
private static boolean isRememberingPopupDimensions(@NonNull final Context context,
final boolean b) {
return getPreferences(context)
.getBoolean(context.getString(R.string.popup_remember_size_pos_key), b);
}
private static boolean isUsingInexactSeek(@NonNull final Context context) {
return getPreferences(context)
.getBoolean(context.getString(R.string.use_inexact_seek_key), false);