diff options
author | Romain Guy <romainguy@android.com> | 2009-05-29 15:02:55 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-05-29 15:02:55 -0700 |
commit | 8d78756c160bda736cccef9ca1a6e2d6a159ac42 (patch) | |
tree | b4c2f9469cfa7d78b8495594ef62fce5eb284b27 | |
parent | a5f50b8f49cc9b34b1de462e11498d92c692b978 (diff) | |
download | frameworks_base-8d78756c160bda736cccef9ca1a6e2d6a159ac42.zip frameworks_base-8d78756c160bda736cccef9ca1a6e2d6a159ac42.tar.gz frameworks_base-8d78756c160bda736cccef9ca1a6e2d6a159ac42.tar.bz2 |
Fix the build.
-rw-r--r-- | api/current.xml | 486 | ||||
-rwxr-xr-x | core/java/android/gesture/GestureOverlayView.java | 21 |
2 files changed, 442 insertions, 65 deletions
diff --git a/api/current.xml b/api/current.xml index c67c9c4..f572a4d 100644 --- a/api/current.xml +++ b/api/current.xml @@ -46404,10 +46404,75 @@ > </field> </class> -<class name="GestureLibrary" +<class name="GestureLibraries" extends="java.lang.Object" abstract="false" static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="fromFile" + return="android.gesture.GestureLibrary" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="path" type="java.lang.String"> +</parameter> +</method> +<method name="fromFile" + return="android.gesture.GestureLibrary" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="path" type="java.io.File"> +</parameter> +</method> +<method name="fromPrivateFile" + return="android.gesture.GestureLibrary" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="fromRawResource" + return="android.gesture.GestureLibrary" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="resourceId" type="int"> +</parameter> +</method> +</class> +<class name="GestureLibrary" + extends="java.lang.Object" + abstract="true" + static="false" final="false" deprecated="not deprecated" visibility="public" @@ -46417,10 +46482,8 @@ static="false" final="false" deprecated="not deprecated" - visibility="public" + visibility="protected" > -<parameter name="path" type="java.lang.String"> -</parameter> </constructor> <method name="addGesture" return="void" @@ -46461,6 +46524,17 @@ <parameter name="entryName" type="java.lang.String"> </parameter> </method> +<method name="getLearner" + return="android.gesture.Learner" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getOrientationStyle" return="int" abstract="false" @@ -46483,7 +46557,7 @@ visibility="public" > </method> -<method name="load" +<method name="isReadOnly" return="boolean" abstract="false" native="false" @@ -46494,6 +46568,17 @@ visibility="public" > </method> +<method name="load" + return="boolean" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="recognize" return="java.util.ArrayList<android.gesture.Prediction>" abstract="false" @@ -46537,7 +46622,7 @@ </method> <method name="save" return="boolean" - abstract="false" + abstract="true" native="false" synchronized="false" static="false" @@ -46572,48 +46657,14 @@ <parameter name="type" type="int"> </parameter> </method> -<field name="ORIENTATION_INVARIANT" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ORIENTATION_SENSITIVE" - type="int" - transient="false" - volatile="false" - value="2" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="SEQUENCE_INVARIANT" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="SEQUENCE_SENSITIVE" - type="int" +<field name="mStore" + type="android.gesture.GestureStore" transient="false" volatile="false" - value="2" - static="true" + static="false" final="true" deprecated="not deprecated" - visibility="public" + visibility="protected" > </field> </class> @@ -47245,6 +47296,259 @@ > </field> </class> +<class name="GestureStore" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="GestureStore" + type="android.gesture.GestureStore" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<method name="addGesture" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="entryName" type="java.lang.String"> +</parameter> +<parameter name="gesture" type="android.gesture.Gesture"> +</parameter> +</method> +<method name="getGestureEntries" + return="java.util.Set<java.lang.String>" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getGestures" + return="java.util.ArrayList<android.gesture.Gesture>" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="entryName" type="java.lang.String"> +</parameter> +</method> +<method name="getOrientationStyle" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getSequenceType" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="load" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="stream" type="java.io.InputStream"> +</parameter> +<exception name="IOException" type="java.io.IOException"> +</exception> +</method> +<method name="load" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="stream" type="java.io.InputStream"> +</parameter> +<parameter name="closeStream" type="boolean"> +</parameter> +<exception name="IOException" type="java.io.IOException"> +</exception> +</method> +<method name="recognize" + return="java.util.ArrayList<android.gesture.Prediction>" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="gesture" type="android.gesture.Gesture"> +</parameter> +</method> +<method name="removeEntry" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="entryName" type="java.lang.String"> +</parameter> +</method> +<method name="removeGesture" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="entryName" type="java.lang.String"> +</parameter> +<parameter name="gesture" type="android.gesture.Gesture"> +</parameter> +</method> +<method name="save" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="stream" type="java.io.OutputStream"> +</parameter> +<exception name="IOException" type="java.io.IOException"> +</exception> +</method> +<method name="save" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="stream" type="java.io.OutputStream"> +</parameter> +<parameter name="closeStream" type="boolean"> +</parameter> +<exception name="IOException" type="java.io.IOException"> +</exception> +</method> +<method name="setOrientationStyle" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="style" type="int"> +</parameter> +</method> +<method name="setSequenceType" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="type" type="int"> +</parameter> +</method> +<field name="ORIENTATION_INVARIANT" + type="int" + transient="false" + volatile="false" + value="1" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="ORIENTATION_SENSITIVE" + type="int" + transient="false" + volatile="false" + value="2" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="SEQUENCE_INVARIANT" + type="int" + transient="false" + volatile="false" + value="1" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="SEQUENCE_SENSITIVE" + type="int" + transient="false" + volatile="false" + value="2" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> <class name="GestureStroke" extends="java.lang.Object" abstract="false" @@ -47345,6 +47649,15 @@ > </field> </class> +<class name="Learner" + extends="java.lang.Object" + abstract="true" + static="false" + final="false" + deprecated="not deprecated" + visibility="" +> +</class> <class name="LetterRecognizer" extends="java.lang.Object" abstract="false" @@ -47353,19 +47666,17 @@ deprecated="not deprecated" visibility="public" > -<method name="getLetterRecognizer" - return="android.gesture.LetterRecognizer" +<method name="recognize" + return="java.util.ArrayList<android.gesture.Prediction>" abstract="false" native="false" synchronized="false" - static="true" + static="false" final="false" deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="type" type="int"> +<parameter name="gesture" type="android.gesture.Gesture"> </parameter> </method> <method name="recognize" @@ -47380,20 +47691,85 @@ > <parameter name="gesture" type="android.gesture.Gesture"> </parameter> +<parameter name="predictions" type="java.util.ArrayList<android.gesture.Prediction>"> +</parameter> </method> -<method name="recognize" - return="java.util.ArrayList<android.gesture.Prediction>" +</class> +<class name="LetterRecognizers" + extends="java.lang.Object" + abstract="false" + static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="fromFile" + return="android.gesture.LetterRecognizer" abstract="false" native="false" synchronized="false" - static="false" + static="true" final="false" deprecated="not deprecated" visibility="public" > -<parameter name="gesture" type="android.gesture.Gesture"> +<parameter name="path" type="java.lang.String"> </parameter> -<parameter name="predictions" type="java.util.ArrayList<android.gesture.Prediction>"> +</method> +<method name="fromFile" + return="android.gesture.LetterRecognizer" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="file" type="java.io.File"> +</parameter> +</method> +<method name="fromResource" + return="android.gesture.LetterRecognizer" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="resourceId" type="int"> +</parameter> +</method> +<method name="fromStream" + return="android.gesture.LetterRecognizer" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="stream" type="java.io.InputStream"> +</parameter> +</method> +<method name="fromType" + return="android.gesture.LetterRecognizer" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="type" type="int"> </parameter> </method> <field name="RECOGNIZER_LATIN_LOWERCASE" diff --git a/core/java/android/gesture/GestureOverlayView.java b/core/java/android/gesture/GestureOverlayView.java index cc58f1d..227cf3d 100755 --- a/core/java/android/gesture/GestureOverlayView.java +++ b/core/java/android/gesture/GestureOverlayView.java @@ -45,8 +45,9 @@ import java.util.ArrayList; * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeAngleThreshold * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeLengthThreshold * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeSquarenessThreshold - * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeType + * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeType * @attr ref android.R.styleable#GestureOverlayView_gestureColor + * @attr ref android.R.styleable#GestureOverlayView_orientation * @attr ref android.R.styleable#GestureOverlayView_uncertainGestureColor */ public class GestureOverlayView extends FrameLayout { @@ -86,7 +87,7 @@ public class GestureOverlayView extends FrameLayout { private float mX; private float mY; - + private float mCurveEndX; private float mCurveEndY; @@ -516,12 +517,12 @@ public class GestureOverlayView extends FrameLayout { final int count = listeners.size(); for (int i = 0; i < count; i++) { listeners.get(i).onGestureStarted(this, event); - } + } } private Rect touchMove(MotionEvent event) { Rect areaToRefresh = null; - + final float x = event.getX(); final float y = event.getY(); @@ -530,7 +531,7 @@ public class GestureOverlayView extends FrameLayout { final float dx = Math.abs(x - previousX); final float dy = Math.abs(y - previousY); - + if (dx >= GestureStroke.TOUCH_TOLERANCE || dy >= GestureStroke.TOUCH_TOLERANCE) { areaToRefresh = mInvalidRect; @@ -538,16 +539,16 @@ public class GestureOverlayView extends FrameLayout { final int border = mInvalidateExtraBorder; areaToRefresh.set((int) mCurveEndX - border, (int) mCurveEndY - border, (int) mCurveEndX + border, (int) mCurveEndY + border); - + float cX = mCurveEndX = (x + previousX) / 2; float cY = mCurveEndY = (y + previousY) / 2; mPath.quadTo(previousX, previousY, cX, cY); - + // union with the control point of the new curve areaToRefresh.union((int) previousX - border, (int) previousY - border, (int) previousX + border, (int) previousY + border); - + // union with the end point of the new curve areaToRefresh.union((int) cX - border, (int) cY - border, (int) cX + border, (int) cY + border); @@ -618,7 +619,7 @@ public class GestureOverlayView extends FrameLayout { cancelGesture(event); } - mStrokeBuffer.clear(); + mStrokeBuffer.clear(); mIsGesturing = false; } @@ -678,7 +679,7 @@ public class GestureOverlayView extends FrameLayout { setPaintAlpha(255); } - invalidate(); + invalidate(); } } |