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

Commit 3307958c authored by Adam Powell's avatar Adam Powell
Browse files

Allow more scaling values to be tuned in resource overlays

Bug 7267507

Change-Id: I3fba6882a0ac4cb7d34430ba36dec83c030a73cd
parent e8f67ed3
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package android.view;
package android.view;


import android.content.Context;
import android.content.Context;
import android.content.res.Resources;
import android.os.SystemClock;
import android.os.SystemClock;
import android.util.FloatMath;
import android.util.FloatMath;


@@ -162,9 +163,11 @@ public class ScaleGestureDetector {
        mContext = context;
        mContext = context;
        mListener = listener;
        mListener = listener;
        mSpanSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 2;
        mSpanSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 2;
        mTouchMinMajor =

                (int) (context.getResources().getDisplayMetrics().density * TOUCH_MIN_MAJOR + 0.5f);
        final Resources res = context.getResources();
        mMinSpan = context.getResources().getDimensionPixelSize(
        mTouchMinMajor = res.getDimensionPixelSize(
                com.android.internal.R.dimen.config_minScalingTouchMajor);
        mMinSpan = res.getDimensionPixelSize(
                com.android.internal.R.dimen.config_minScalingSpan);
                com.android.internal.R.dimen.config_minScalingSpan);
    }
    }


+4 −0
Original line number Original line Diff line number Diff line
@@ -941,6 +941,10 @@
         reported by the hardware. -->
         reported by the hardware. -->
    <dimen name="config_minScalingSpan">27mm</dimen>
    <dimen name="config_minScalingSpan">27mm</dimen>


    <!-- Minimum accepted value for touchMajor while scaling. This may be tuned
         per-device in overlays. -->
    <dimen name="config_minScalingTouchMajor">48dp</dimen>

    <!-- Safe headphone volume index. When music stream volume is below this index
    <!-- Safe headphone volume index. When music stream volume is below this index
    the SPL on headphone output is compliant to EN 60950 requirements for portable music
    the SPL on headphone output is compliant to EN 60950 requirements for portable music
    players. -->
    players. -->
+1 −0
Original line number Original line Diff line number Diff line
@@ -1149,6 +1149,7 @@
  <java-symbol type="string" name="bluetooth_a2dp_audio_route_name" />
  <java-symbol type="string" name="bluetooth_a2dp_audio_route_name" />


  <java-symbol type="dimen" name="config_minScalingSpan" />
  <java-symbol type="dimen" name="config_minScalingSpan" />
  <java-symbol type="dimen" name="config_minScalingTouchMajor" />


  <!-- From android.policy -->
  <!-- From android.policy -->
  <java-symbol type="anim" name="app_starting_exit" />
  <java-symbol type="anim" name="app_starting_exit" />