Commit Graph

4794 Commits

Author SHA1 Message Date
Adam Powell
8c9283f410 Merge "Fix NullPointerException in ListView" 2014-12-05 19:26:18 +00:00
Alan Viverette
71c5d62d96 Merge "Consider RTL layout in DPAD navigation in AbsSeekBar" 2014-12-02 19:21:22 +00:00
Kenji Sugimoto
827bb445d1 Fix NullPointerException in ListView
There is a NullPointerException in `handleHorizontalFocusWithinListItem()`
because `selectedView.findFocus()` returns null and then there is no null
check when when the assigned variable `currentFocus` is used, although
`View.findFocus()` states that it may return null.

Change-Id: I6897027e9a2a238d9283e6b9f5146198989fcac0
2014-11-26 06:56:10 +00:00
Narayan Kamath
32ed090f5a Merge "Stop using DATE_FORMAT from settings." 2014-11-24 16:14:33 +00:00
Alan Viverette
0218970afa Merge "Fix error overwriting when restoring error" 2014-11-21 20:40:30 +00:00
Adam Powell
d843564331 Merge "PopupWindow: fix typo in doc comment" 2014-11-18 23:32:57 +00:00
Narayan Kamath
775eca105c Stop using DATE_FORMAT from settings.
bug: 18388178
Change-Id: I315dc463bb0569adc0b5d1c5ac5a17485f2b5adc
2014-11-18 14:54:24 +00:00
Johan Redestig
575bb3815a Consider RTL layout in DPAD navigation in AbsSeekBar
Changes the behavior of onKeyDown for DPAD_LEFT/RIGHT when in RTL
to move the progress in same direction as the DPAD key suggest.

Change-Id: I776a48711571884a10ef9315de78bf4ebffd6e4b
2014-11-11 12:35:56 +01:00
Alexander Toresson
545a8bbe70 Fix error overwriting when restoring error
onRestoreInstanceState restores the old error, after layout has been
done. A new error may have been set before this is done, which thus
overwrites the new error.

This patch prevents the new error from being overwritten.

Change-Id: I8e7c91b5da27310fb6698e671d1f7d78ee268061
2014-11-07 07:00:05 +00:00
Elliott Hughes
87ce99ca72 am ced7ebdb: Merge "Migrate off timeFormat12 and timeFormat24."
* commit 'ced7ebdb1d522b4206e2048b278554ca841aeaba':
  Migrate off timeFormat12 and timeFormat24.
2014-10-28 04:39:24 +00:00
Elliott Hughes
ced7ebdb1d Merge "Migrate off timeFormat12 and timeFormat24." 2014-10-23 18:21:56 +00:00
Elliott Hughes
f7d5e0a53e Migrate off timeFormat12 and timeFormat24.
libcore now offers a wider variety of 12-/24-hour time formats,
so be more specific about which one we want here.

(cherry-pick of 85f60d3a03b5b5d9a0e8b8a138eb85a6b53a1eca.)

Bug: 10361358
Change-Id: I846ab7a6f84cd49e876ad21e9366aff1600e0530
2014-10-23 11:18:21 -07:00
Alan Viverette
6fffe58bf4 am 15e7b2ac: Merge "Translate compound button drawable by scroll position" into lmp-dev
* commit '15e7b2ac60b0e6355e6ed5c1be676744c23f5a0e':
  Translate compound button drawable by scroll position
2014-10-18 00:26:00 +00:00
Alan Viverette
b95c336d78 Translate compound button drawable by scroll position
BUG: 18028674
Change-Id: Iaba848642b87f0d134c6a6c57e5756d883e45904
2014-10-17 17:19:12 -07:00
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