summaryrefslogtreecommitdiff
path: root/test-runner/src/android/test/TouchUtils.java
AgeCommit message (Collapse)Author
2020-05-04Add WindowMetricsHelperCharles Chen
This metrics now is used for calculating the value reported by Display#getSize. It could be extended to have more function later. Also replace getCurrentMetrics usages to make them report Display#getSize value. Bug: 148904274 Test: atest WindowMetricsHelperTest Change-Id: I182b6e63f7c28752eee22839cb9e69f073046c3f
2020-03-24Report bounds instead of size in WindowMetricsAndrii Kulian
Use case: Jetpack WM will use them to get the location of windows on screen and compute the display feature positions in window coordinate space. Bug: 150908045 Test: atest FrameworksCoreTests:WindowMetricsTest Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b Exempt-From-Owner-Approval: API change
2020-01-31Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() ↵Andrii Kulian
in f/b Replace the existing usages of now-deprecated API WindowManager.getDefaultDisplay() with WindowMetrics or Context.getDisplay() in frameworks/base. Bug: 128338354 Test: Build, auto test Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
2016-01-27Deprecated platform Android testing APIsStephan Linzner
- Deprecated most android.test.* APIs - Kept ProviderTestCase2 and LoaderTestCase since we don't have a replacement yet - Deprecated android.test.suitebuilder - Added Javadoc to all deprecated APIs with links to corresponding Android Testing Support Library APIs - Removed all trailing whitespace Bug: 22314304 Change-Id: I1b1f0dd5132364110f1dfd4e3eb2dd044700d859
2014-10-02resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-01Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller
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
2014-09-22Remove unnecessary waits in TouchUtil's dragYigit Boyar
TouchUtil's drag method tries to sync after sending each event which is not necessary. Sync are slow so removing them greatly improves test running time. Bug: 17323559 Change-Id: Ia4ed02b2af44da0d821d93d28f963005d9d7ea79
2011-04-21Rework display size access.Dianne Hackborn
Applications now get the display size from the window manager. No behavior should be changed yet, this is just prep for some real changes. Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
2010-02-20Retry test-runner tests move.Brett Chabot
This time change the frameworks makefile so it only includes test-runner/src in the public API.
2010-02-19Revert "Move framework test-runner unit tests to be closer to their source."Brett Chabot
This reverts commit 12093976a4842a795491cfd2b1d3b71e18503f2d.
2010-02-19Move framework test-runner unit tests to be closer to their source.Brett Chabot
Move the test-runner source into a separate src folder to accommodate the test move.