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

This commit is contained in:
Adam Powell
2012-10-09 13:25:12 -07:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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. -->

View File

@@ -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" />