Made the requested changes

This commit is contained in:
Marius Wagner 2023-02-07 17:10:18 +00:00 committed by Stypox
parent 2ded8c7cc1
commit 72ca52a29b
3 changed files with 19 additions and 22 deletions

View File

@ -2013,10 +2013,10 @@ public final class VideoDetailFragment
restoreDefaultBrightness();
} else {
// Do not restore if user has disabled brightness gesture
if (!(PlayerHelper.getRightSideGesture(activity)
.equals(getString(R.string.right_brightness_control_key))
&& PlayerHelper.getLeftSideGesture(activity)
.equals(getString(R.string.left_brightness_control_key)))) {
if (PlayerHelper.getRightSideGesture(activity)
.equals(getString(R.string.brightness_control_key))
|| PlayerHelper.getLeftSideGesture(activity)
.equals(getString(R.string.brightness_control_key))) {
return;
}
// Restore already saved brightness level

View File

@ -198,16 +198,16 @@ class MainPlayerGestureListener(
if (getDisplayHalfPortion(initialEvent) == DisplayPortion.RIGHT_HALF) {
when (rightSide) {
player.context.getString(R.string.right_volume_control_key) ->
player.context.getString(R.string.volume_control_key) ->
onScrollVolume(distanceY)
player.context.getString(R.string.right_brightness_control_key) ->
player.context.getString(R.string.brightness_control_key) ->
onScrollBrightness(distanceY)
}
} else {
when (leftSide) {
player.context.getString(R.string.left_volume_control_key) ->
player.context.getString(R.string.volume_control_key) ->
onScrollVolume(distanceY)
player.context.getString(R.string.left_brightness_control_key) ->
player.context.getString(R.string.brightness_control_key) ->
onScrollBrightness(distanceY)
}
}

View File

@ -191,35 +191,32 @@
</string-array>
<string name="left_gesture_control_key">left_gesture_control</string>
<string name="default_left_gesture_control_value">@string/left_brightness_control_key</string>
<string name="left_brightness_control_key">left_brightness_control</string>
<string name="left_volume_control_key">left_volume_control</string>
<string name="left_none_control_key">left_none_control</string>
<string name="default_left_gesture_control_value">@string/brightness_control_key</string>
<string name="brightness_control_key">brightness_control</string>
<string name="volume_control_key">volume_control</string>
<string name="none_control_key">none_control</string>
<string-array name="left_gesture_control_description">
<item>@string/brightness</item>
<item>@string/volume</item>
<item>@string/none</item>
</string-array>
<string-array name="left_gesture_control_values">
<item>@string/left_brightness_control_key</item>
<item>@string/left_volume_control_key</item>
<item>@string/left_none_control_key</item>
<item>@string/brightness_control_key</item>
<item>@string/volume_control_key</item>
<item>@string/none_control_key</item>
</string-array>
<string name="right_gesture_control_key">right_gesture_control</string>
<string name="default_right_gesture_control_value">@string/right_volume_control_key</string>
<string name="right_brightness_control_key">right_brightness_control</string>
<string name="right_volume_control_key">right_volume_control</string>
<string name="right_none_control_key">right_none_control</string>
<string name="default_right_gesture_control_value">@string/volume_control_key</string>
<string-array name="right_gesture_control_description">
<item>@string/volume</item>
<item>@string/brightness</item>
<item>@string/none</item>
</string-array>
<string-array name="right_gesture_control_values">
<item>@string/right_volume_control_key</item>
<item>@string/right_brightness_control_key</item>
<item>@string/right_none_control_key</item>
<item>@string/volume_control_key</item>
<item>@string/brightness_control_key</item>
<item>@string/none_control_key</item>
</string-array>
<string name="last_resize_mode">last_resize_mode</string>