Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9205f447 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Only apply back gesture device config if there are existing insets"...

Merge "Only apply back gesture device config if there are existing insets" into rvc-d1-dev am: f7a4faa2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12272603

Change-Id: Id6d570a78ed4e9d057fffe5f15b75234b2c2f4c1
parents 66909a0d f7a4faa2
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -103,8 +103,11 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
        final DisplayMetrics dm = userRes.getDisplayMetrics();
        final DisplayMetrics dm = userRes.getDisplayMetrics();
        final float defaultInset = userRes.getDimension(
        final float defaultInset = userRes.getDimension(
                com.android.internal.R.dimen.config_backGestureInset) / dm.density;
                com.android.internal.R.dimen.config_backGestureInset) / dm.density;
        final float backGestureInset = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
        // Only apply the back gesture config if there is an existing inset
                BACK_GESTURE_EDGE_WIDTH, defaultInset);
        final float backGestureInset = defaultInset > 0
                ? DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
                        BACK_GESTURE_EDGE_WIDTH, defaultInset)
                : defaultInset;
        final float inset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, backGestureInset,
        final float inset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, backGestureInset,
                dm);
                dm);
        final float scale = Settings.Secure.getFloatForUser(
        final float scale = Settings.Secure.getFloatForUser(