summaryrefslogtreecommitdiff
path: root/core/java/android/gesture
Commit message (Collapse)AuthorAgeFilesLines
* Improve OWNERS coverage across frameworks/base/.Jeff Sharkey2020-12-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As general background, OWNERS files expedite code reviews by helping code authors quickly find relevant reviewers, and they also ensure that stakeholders are involved in code changes in their areas. Some teams under frameworks/base/ have been using OWNERS files successfully for many years, and we're ready to expand them to cover more areas. Here's the historical coverage statistics for the last two years of changes before these new OWNERS changes land: -- 56% of changes are fully covered by OWNERS -- 17% of changes are partially covered by OWNERS -- 25% of changes have no OWNERS coverage Working closely with team leads, we've now identified clear OWNERS on a per-package basis, and we're using "include" directives whenever possible to to simplify future maintenance. With this extensive effort, we've now improved our coverage as follows: -- 98% of changes are fully covered by OWNERS -- 1% of changes are partially covered by OWNERS -- 1% of changes have no OWNERS coverage This specific change is automatically generated by a script from detailed ownership information confirmed by team leads. Bug: 174932174 Test: manual Exempt-From-Owner-Approval: refactoring with team leads buy-in Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
* Add API to create GestureLibrary from FileDescriptorshafik2019-08-201-25/+60
| | | | | | | | | | GestureLibraries#fromFile takes a file path and returns a GestureLibrary object. This change adds an equivalent API GestureLibrary#fromFd that takes a FileDescriptor. Test: GestureBuilder.apk still works properly Bug: 139182427 Change-Id: Ie50f3a624703cf128d6ee34bb450bbe971ad1730
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Annotate ARGB integer parameters with @ColorIntTor Norbye2015-03-051-2/+5
| | | | Change-Id: I307f72a382272cf18ddb6b07d9fcb81228568d9a
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-1/+2
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* am 9b0109eb: am c7aa8fe6: Merge "Removing some more FloatMath references"Neil Fuller2014-10-171-1/+1
|\ | | | | | | | | * commit '9b0109eb051fcf0a7ad801d03e73aa4e0bf2d7a7': Removing some more FloatMath references
| * Removing some more FloatMath referencesNeil Fuller2014-10-151-1/+1
| | | | | | | | | | | | | | | | See frameworks/base commit 33253a4baa6279f81a73425b49dfb6abe5f5416e for details. Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I46d4ee4c4be7972e3bcc6782fb50f024b6fff1ee
* | resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-023-7/+6
|\| | | | | | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
| * Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller2014-10-013-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is an API change: FloatMath is going to be deprecated and/or removed. Performance is not the goal of this change. That said... Math is faster than FloatMath with AOT compilation. While making the change, occurances of: {Float}Math.sqrt(x * x + y * y) and {Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2)) have been replaced with: {(float)} Math.hypot(x, y) Right now there is no runtime intrinsic for hypot so is not faster in all cases for AOT compilation: Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with AOT, but all other combinations of FloatMath, use of pow() etc. are slower than hypot(). hypot() has the advantage of being self documenting and could be optimized in future. None of the behavior differences around NaN and rounding appear to be important for the cases looked at: they all assume results and arguments are in range and usually the results are cast to float. Different implementations measured on hammerhead / L: AOT compiled: [FloatMath.hypot(x, y)] benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials [FloatMath.sqrt(x*x + y*y)] benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials [FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))] benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials [(float) Math.hypot(x, y)] benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials [(float) Math.sqrt(x*x + y*y)] benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials [(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))] benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials Interpreter: benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I06c91f682095e627cb547d60d936ef87941be692
* | Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-4/+9
|/ | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* Fix hardware layers lifecycleRomain Guy2013-08-161-0/+1
| | | | | | | | Bug #10075732 Hardware layers could survive across EGL terminate events. Change-Id: Ie8565d55cb29fe6625fa1584d695edfecd37ab5e
* Correct executable bit for source filesKenny Root2012-11-076-0/+0
| | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
* Fix javadoc issuesRomain Guy2011-05-161-1/+1
| | | | Change-Id: Ife66a8664955ac1a79b6ffd0080000c820f24632
* Prevent possible NPE in android.gesture.LearnerKenny Root2010-02-171-1/+2
| | | | Change-Id: If9b0ac9a05b6736719d84c6b58be73e3f7771f07
* Rename GestureUtilities to GestureUtils.Romain Guy2010-02-047-19/+19
|
* Added comments for GestureUtilities.Yang Li2010-01-251-0/+10
|
* Made GestureUtilities's several methods public; Changed GestureStroke's ↵Yang Li2010-01-252-34/+70
| | | | smoothening threshold.
* Added a method for spatial sampling.Yang Li2010-01-152-1/+5
|
* Merge "Added clone to these three classes and added more comments."Romain Guy2010-01-153-14/+51
|\
| * Added clone to these three classes and added more comments.Yang Li2010-01-153-14/+51
| |
* | Added non-uniform scaling for spatial sampling.Yang Li2010-01-152-41/+66
|/
* Added non-uniform scaling for spatial sampling and converted double to float.Yang Li2010-01-141-50/+61
|
* Added the Protractor algorithm for calculating the minimum cosine distance ↵Yang Li2009-12-145-5/+42
| | | | between gestures
* Add @Widget annotation to GestureOverlayView to make it usable in ADT.Romain Guy2009-09-111-0/+2
| | | | Change-Id: I86251f0d35e38460f09779f047aabfa99d2e97ae
* Updates from API review.Dianne Hackborn2009-07-281-0/+1
| | | | | | | | | | | | * AccessibilityService -- document onBind() to not be implemented. * GestureLibrary.getLearner() -- needs to be hidden. * IntentSender -- remove protected constructors, document that it is retrieved from a PendingIntent. * Hide permissions: SHUTDOWN, STOP_APP_SWITCHES. * Context -- hide BACKUP_SERVICE. * ContextWrapper -- hide getSharedPrefs bla h blah * Intent.parseUri() -- fix docs. * ApplicationInfo.FLAG_TEST_ONLY?!? * Hide MockContext.getSharedPrefs blah blah
* Fixes #1972421. Prevents crash in ScrollView/HorizontalScrollView.Romain Guy2009-07-101-2/+3
| | | | Add several checks to make sure there's at least one child.
* Unhide android.gestures.Romain Guy2009-07-092-20/+1
|
* Make gestures visible again.Romain Guy2009-06-161-1/+1
|
* Fixes #1899284 and #1899287. Give applications more control over the ↵Romain Guy2009-06-161-9/+27
| | | | | | | | gesture's path. This change adds new APIs to control the gesture's path by deciding whether the path should be drawn and by getting the ability to get the Path itself and draw it differently.
* Hide gestures API.Romain Guy2009-06-121-0/+5
|
* Fix the way gestures are rasterized to bitmaps.Romain Guy2009-06-102-10/+20
| | | | It was just not working with multiple strokes.
* Add support for gestures in Home.Romain Guy2009-06-092-18/+28
| | | | | Adds a new animation style for the gestures pad, and de-normalize the scores in the recognition engine.
* Add a hidden API to modify the paint used to draw gestures.Romain Guy2009-06-091-0/+7
|
* Fix several issues in the gestures libraries.Romain Guy2009-06-093-15/+26
| | | | | | This mostly fixes how gestures libraries are saved and loaded. Saving a library twice in a row was erasing the entire library, which was preventing the sketch test app from working propertly.
* Merge change 3561 into donutAndroid (Google) Code Review2009-06-091-6/+14
|\ | | | | | | | | * changes: Fix multiple strokes support when fade is disabled. Multiple strokes would always be accepted after the first one.
| * Fix multiple strokes support when fade is disabled.Romain Guy2009-06-091-6/+14
| | | | | | | | Multiple strokes would always be accepted after the first one.
* | Fix bug in saving gestures stores. The outputstream was wrapping itself, ↵Romain Guy2009-06-091-2/+2
|/ | | | thus causing huge problems.
* Removes gestures from ListView.Romain Guy2009-06-082-344/+0
|
* Fixes #1899273.Romain Guy2009-06-051-2/+10
| | | | When a "ghost" stroke was showing, events would be intercepted in ListView. This patch modifies the logic used to detect when to still events: either the current stroke is a gesture, or the previous stroke was a gesture.
* Add new listener to GestureOverlayView. This listener fires whenever the ↵Romain Guy2009-06-021-5/+42
| | | | overlay thinks the user is starting a new gesture. This allows Home to snap the workspace back to its original position during a gesture operation.
* Fix the build.Romain Guy2009-05-291-10/+11
|
* Modify the base gestures API to use streams instead of files. Adds new ↵Romain Guy2009-05-297-326/+586
| | | | wrappers to easily load/save gestures from files, resources, etc. Do the same for the letters recognizer.
* Merge change 2737 into donutAndroid (Google) Code Review2009-05-292-46/+56
|\ | | | | | | | | * changes: Fixes #1878499.
| * Fixes #1878499.Romain Guy2009-05-292-46/+56
| | | | | | | | Ignore touch up events that happen after a gesture was cancelled. This fix also improves performance by ignoring move events that are within the touch threshold.
* | Fix for #1878497.Romain Guy2009-05-291-7/+2
|/ | | | Always pre-allocate a gesture's bounding box to avoid possible NPEs.
* Converted the angle of OrientedBoundingBox to degreesYang Li2009-05-281-1/+1
|
* Merge change 2593 into donutAndroid (Google) Code Review2009-05-275-41/+65
|\ | | | | | | | | * changes: Bug fixes and performance improvements
| * Bug fixes and performance improvementsYang Li2009-05-275-41/+65
| | | | | | | | | | | | - Added affine transform functions in GestureUtilities to remove Matrix - Fixed a bug with Instance.createInstance - Updated letter recognition file
* | Fix another crash in Gestures, this one caused by the data fileMarco Nelissen2009-05-271-0/+4
|/ | | | | | having the wrong version. I made the loader print a message to the log for this, and made the calling code disable gestures for the listview instead of crashing.
* Removed Matrix from spatial sampling for GestureUtilitiesYang Li2009-05-261-7/+12
| | | | - updated the letter training file