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

Commit 68293b35 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am d338b977: am db380410: am 16062128: Merge "Allow more scaling values to be...

am d338b977: am db380410: am 16062128: Merge "Allow more scaling values to be tuned in resource overlays" into jb-mr1-dev

* commit 'd338b977':
  Allow more scaling values to be tuned in resource overlays
parents 35b9ec35 d338b977
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.view;

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

@@ -162,9 +163,11 @@ public class ScaleGestureDetector {
        mContext = context;
        mListener = listener;
        mSpanSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 2;
        mTouchMinMajor =
                (int) (context.getResources().getDisplayMetrics().density * TOUCH_MIN_MAJOR + 0.5f);
        mMinSpan = context.getResources().getDimensionPixelSize(

        final Resources res = context.getResources();
        mTouchMinMajor = res.getDimensionPixelSize(
                com.android.internal.R.dimen.config_minScalingTouchMajor);
        mMinSpan = res.getDimensionPixelSize(
                com.android.internal.R.dimen.config_minScalingSpan);
    }

+4 −0
Original line number Diff line number Diff line
@@ -941,6 +941,10 @@
         reported by the hardware. -->
    <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
    the SPL on headphone output is compliant to EN 60950 requirements for portable music
    players. -->
+1 −0
Original line number Diff line number Diff line
@@ -1150,6 +1150,7 @@
  <java-symbol type="string" name="bluetooth_a2dp_audio_route_name" />

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

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