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

Commit 16062128 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Allow more scaling values to be tuned in resource overlays" into jb-mr1-dev

parents c0c0c0e6 3307958c
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" />