Commit Graph

4779 Commits

Author SHA1 Message Date
Dianne Hackborn
529b78941c am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '89b196958fee07475765bd3c458098464ba16f2e':
  Put in real "code" (aka marketing) name.
2014-10-08 22:48:44 +00:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Newton Allen
408f7534ef am d84ce32b: Merge "Fix some documentation typos." into lmp-dev
* commit 'd84ce32bd2d7c3cebac15545504f4fec464a6956':
  Fix some documentation typos.
2014-10-02 16:46:03 +00:00
Newton Allen
d84ce32bd2 Merge "Fix some documentation typos." into lmp-dev 2014-10-02 16:39:12 +00:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
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-10-01 14:04:15 +01:00
Alan Viverette
0be2757ad5 am c44c77d3: Merge "Implement missing visibility management for FrameLayout foreground" into lmp-dev
* commit 'c44c77d305c02d9c8280df5ce3a816ee586c9d52':
  Implement missing visibility management for FrameLayout foreground
2014-09-30 22:09:26 +00:00
Alan Viverette
3be5e0e625 Implement missing visibility management for FrameLayout foreground
BUG: 15350931
Change-Id: I16900d0d95051489852385d682e7b5aa4adad327
2014-09-30 14:27:58 -07:00
Newton Allen
8f8a11b7fa Fix some documentation typos.
Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa
(cherry picked from commit 4465d1a03e)
2014-09-30 02:52:26 +00:00
Alan Viverette
cde6e29ac6 am 63756956: Merge "Add callback to track and thumb drawables, propagate state in ASLD" into lmp-dev
* commit '637569566d2234b06e08d94acf4db1b0d3be6501':
  Add callback to track and thumb drawables, propagate state in ASLD
2014-09-26 23:19:32 +00:00
Alan Viverette
b067405bf4 Add callback to track and thumb drawables, propagate state in ASLD
BUG: 17665424
Change-Id: I22da4530f3e2869d856102e804f020461a46fe49
2014-09-26 16:12:16 -07:00
Raph Levien
5d8fa6c173 am a3e8bd63: Merge "Defer spelling correction with apostrophe" into lmp-dev
* commit 'a3e8bd63d0d6640b9073b5617c76e1d890a29fcb':
  Defer spelling correction with apostrophe
2014-09-26 19:43:41 +00:00
Raph Levien
c8ffeeca67 Merge "Defer spelling correction with apostrophe" into lmp-dev 2014-09-26 17:12:49 +00:00
Raph Levien
b1fef1114e Defer spelling correction with apostrophe
When typing a contraction (such as "doesn't") we don't want a spell
right after the apostrophe, as this will create a false temporary red
underline, and the span split also breaks a kern pair causing text to
shift. This patch detects the case where the cursor is immediately after
such a word and suppresses correction in that case.

Bug: 17641350

Change-Id: I4d09576a31df551c96f820242fd2cbc675506dae
2014-09-26 08:59:28 -07:00
Alan Viverette
10db809f24 am a9ac89a3: Merge "Correctly advertise accessibility scrolling actions" into lmp-dev
* commit 'a9ac89a3fa9291553edb72f4557dcff9e77863ae':
  Correctly advertise accessibility scrolling actions
2014-09-26 01:24:10 +00:00
Alan Viverette
80c0bbe82c Merge "Correctly advertise accessibility scrolling actions" into lmp-dev 2014-09-26 01:13:13 +00:00
Alan Viverette
947a969560 Correctly advertise accessibility scrolling actions
Previously, we didn't take into account partially-visible views. This
extracts existing logic for determining whether the list can scroll
up or down and applies that when adding scrolling actions.

BUG: 17648502
Change-Id: I7ed9382e1645970ab098c210ad10f8a077da834b
2014-09-25 12:43:47 -07:00
Adam Powell
006dd76bd2 am abadb107: am c8d72a97: Merge "Track persistent nested Y offset for fling velocity" into lmp-dev
* commit 'abadb107b8d1bb55feb2217c7fa4417257d4e369':
  Track persistent nested Y offset for fling velocity
2014-09-23 21:06:26 +00:00
Adam Powell
744beffb6a Track persistent nested Y offset for fling velocity
Track the nested offsets applied persistently in AbsListView and
ScrollView. This allows accurate velocity to be reported to nested
fling/pre-fling.

Bug 17548219

Change-Id: I66199c534aca7fb81746eff6d04c931e4c4e48da
2014-09-22 17:18:42 -07:00
Svetoslav
dacb58d6f6 am 5b119d7d: am 35abe50d: Merge "Keep existing API behavior that regressed." into lmp-dev
* commit '5b119d7db1ccce7aef5230020ddc00fee858d573':
  Keep existing API behavior that regressed.
2014-09-19 22:02:13 +00:00
Svetoslav
1258dd2142 Merge "Keep existing API behavior that regressed." into lmp-dev 2014-09-19 21:41:39 +00:00
Svetoslav
b624244325 Keep existing API behavior that regressed.
If RemoteViews get a null package in the constructor we are
using the context in which they are applied to obtain resources
during inflation. In such a case if we call the getPackage()
method we were getting null, i.e. the package passed in the
contructor, but now we are returning the package if the app
that created the remote views.

bug:17513823
Change-Id: I0c4a8953c8320469a9160dbaae46ce31465b313b
2014-09-19 13:59:10 -07:00
Adam Powell
dca6740355 am 8040e47d: am 20ffcaa1: Merge "Add colorEdgeEffect to themes, default it to colorPrimary" into lmp-dev
* commit '8040e47d83e3fe2c1d28c2dcbfbd80fd5cc0b26f':
  Add colorEdgeEffect to themes, default it to colorPrimary
2014-09-19 20:53:01 +00:00
Adam Powell
17f48457d2 Merge "Add colorEdgeEffect to themes, default it to colorPrimary" into lmp-dev 2014-09-19 20:31:14 +00:00
Adam Powell
c6c744da75 Add colorEdgeEffect to themes, default it to colorPrimary
Allow edgeeffect colors to be changed independently of the primary
color for the current theme.

Bug 16512225

Change-Id: Ibc13ad755f489fe1f6d16af0c61a1d12dd1a61f7
2014-09-19 12:50:31 -07:00
Alan Viverette
7c7e3ba312 am c17a38b1: am 40994e66: Merge "Fix radial time picker inner circle (1-12) selections" into lmp-dev
* commit 'c17a38b12d936885a9867e92e40d6e740f2d98f4':
  Fix radial time picker inner circle (1-12) selections
2014-09-19 19:36:07 +00:00
Alan Viverette
840855c021 Merge "Fix radial time picker inner circle (1-12) selections" into lmp-dev 2014-09-19 19:11:47 +00:00
Alan Viverette
bb696dcca9 Fix radial time picker inner circle (1-12) selections
Result of a poorly collapsed set of if block conditionals.

BUG: 17580782
Change-Id: I7f7e5038f943d1f49e1541acfa282479cb2505ea
2014-09-19 10:20:45 -07:00
Yigit Boyar
4a40485725 am de86d9c2: am 6cdaab18: Merge "Fix scroll position calculation when clipToPadding is false" into lmp-dev
* commit 'de86d9c24f89642289012d865cdd604bbe056bda':
  Fix scroll position calculation when clipToPadding is false
2014-09-19 03:52:57 +00:00
Yigit Boyar
40c6c555e9 Fix scroll position calculation when clipToPadding is false
Bug: 17568582
Change-Id: I904450d62c93105db5c61a071c7816278bb441be
2014-09-18 16:31:52 -07:00
Brian Attwell
e3a742f5a0 am 942be889: am 56d143ae: Merge "Pass different dy into dispatchNestedSCroll" into lmp-dev
* commit '942be889125d2530091f192a8872009580594313':
  Pass different dy into dispatchNestedSCroll
2014-09-16 23:58:09 +00:00
Alan Viverette
1ebc3fb56b am 36c132a8: am 67798394: Merge "Preserve NPE behavior of removed TextView.getTextColors() API" into lmp-dev
* commit '36c132a84be88e395e567c66ccc897c6fe628c62':
  Preserve NPE behavior of removed TextView.getTextColors() API
2014-09-16 23:43:02 +00:00
Alan Viverette
03b51f427f am 17f9b8d6: am 07e867a0: Merge "Fix TimePicker.setCurrentHour() when argument is 0" into lmp-dev
* commit '17f9b8d6f921dd2c8ce5f265645e63919d9dd474':
  Fix TimePicker.setCurrentHour() when argument is 0
2014-09-16 23:42:57 +00:00
Brian Attwell
5665c0f265 Merge "Pass different dy into dispatchNestedSCroll" into lmp-dev 2014-09-16 23:33:24 +00:00
Alan Viverette
af8e823d99 Merge "Preserve NPE behavior of removed TextView.getTextColors() API" into lmp-dev 2014-09-16 23:25:07 +00:00
Alan Viverette
4813482324 Merge "Fix TimePicker.setCurrentHour() when argument is 0" into lmp-dev 2014-09-16 23:23:23 +00:00
Craig Mautner
6e85aada76 am b23fec37: am 880d88b3: Merge "Restore changes that were needed." into lmp-dev
* commit 'b23fec371a22975abfb5a2951b4cf05d4b7238f2':
  Restore changes that were needed.
2014-09-16 23:14:46 +00:00
Craig Mautner
a67d9095b7 Restore changes that were needed.
Reverting the changes in ag/548487 also reverted alanv's changes
in ag/547793. This restores alanv's changes.

Fixes build.

Change-Id: Ifa2aa928a3ad29fe49e52dbec4e4833538dfe7e9
2014-09-16 15:50:32 -07:00
Brian Attwell
e0e4217330 Pass different dy into dispatchNestedSCroll
Bug: 16462679
Bug: 17529919
Change-Id: I328457a27507253cc7bfeab0e2daa4d4563aab17
2014-09-16 22:48:27 +00:00
Alan Viverette
fe16787bd4 Preserve NPE behavior of removed TextView.getTextColors() API
BUG: 17511449
Change-Id: Iea7e9aed69c21b230e3c474d4c1378a8663cfcb1
2014-09-16 15:41:27 -07:00
Craig Mautner
884d31943c am e80f40c5: am b53e4c4a: Merge "Revert "Fix various bugs in DatePickerCalendarDelegate"" into lmp-dev
* commit 'e80f40c5e86fff5ce075082b8ecbf23ea429f1dd':
  Revert "Fix various bugs in DatePickerCalendarDelegate"
2014-09-16 22:39:06 +00:00
Craig Mautner
704991224d Merge "Revert "Fix various bugs in DatePickerCalendarDelegate"" into lmp-dev 2014-09-16 22:16:29 +00:00
Craig Mautner
706b3547f8 Revert "Fix various bugs in DatePickerCalendarDelegate"
alanv@ fixed this yesterday.

This reverts commit 82537efa4c5f4aad12b9aa249fb27eda21647f39.

Change-Id: If2b91ee36f8b24f695200ac1a87a306246ee5e44
2014-09-16 22:13:39 +00:00
Craig Mautner
3cb639d471 am 48ae7ee3: am 459b2ba5: Merge "Fix various bugs in DatePickerCalendarDelegate" into lmp-dev
* commit '48ae7ee3f980c811bf0ff8fc9e9797133d9bc3a5':
  Fix various bugs in DatePickerCalendarDelegate
2014-09-16 21:51:50 +00:00
Amit Mahajan
7c511fee3f am 5807817d: am c5429d6f: Merge "Use Op package name when creating toasts" into lmp-dev
* commit '5807817d293e705c23fa062db22345323da8d372':
  Use Op package name when creating toasts
2014-09-16 21:34:59 +00:00
Craig Mautner
f6b4254bef Merge "Fix various bugs in DatePickerCalendarDelegate" into lmp-dev 2014-09-16 21:30:29 +00:00
Craig Mautner
9c26b54d3c Fix various bugs in DatePickerCalendarDelegate
These bugs were exposed by cts DatePickerTest.

Fixes one item in 17459129.

Change-Id: Ifab52c6e6e760b75633aa4fe8ccf2d724f587e09
2014-09-16 13:57:59 -07:00
Amit Mahajan
915a666c21 Merge "Use Op package name when creating toasts" into lmp-dev 2014-09-16 20:47:24 +00:00
Alan Viverette
dcfe464fbf am ab9cbf1c: am 7194361c: Merge "Properly handle dispatchRestoreInstanceState for new-style DatePicker" into lmp-dev
* commit 'ab9cbf1ca187453910ceca717e54843c7494cb98':
  Properly handle dispatchRestoreInstanceState for new-style DatePicker
2014-09-16 18:13:53 +00:00
Tony Hill
929442d509 Use Op package name when creating toasts
Some components may be running in processes other than their
base package using android:process directives. The op package
name must therefore be used otherwise the AppOps check will fail
due to a mismatch between the base package name and the UID.

Bug: 17431423
Change-Id: I429aa46066935b964151a2ec0854f0e14c117c4e
2014-09-16 10:16:43 -07:00