Commit Graph

809 Commits

Author SHA1 Message Date
Jorim Jaggi
cb17416a8d am 0da89b76: resolved conflicts for merge of f0fc23a1 to lmp-mr1-dev-plus-aosp
* commit '0da89b76402816dade084166a97b1d352ae1f78b':
  Fixed several time related states for secondary users
2014-11-25 15:04:28 +00:00
Jorim Jaggi
0da89b7640 resolved conflicts for merge of f0fc23a1 to lmp-mr1-dev-plus-aosp
Change-Id: I8f1dbae2ecd14ae4e51a9e86eb6d36dd56a48be1
2014-11-25 15:34:56 +01:00
Narayan Kamath
65af39f57e am 43395d67: am 68e9af7b: am 1d84709c: Merge "Stop reading Settings.System.DATE_FORMAT."
* commit '43395d677b431def5e6d8707297d590ba8f204a1':
  Stop reading Settings.System.DATE_FORMAT.
2014-11-24 16:23:59 +00:00
Narayan Kamath
43395d677b am 68e9af7b: am 1d84709c: Merge "Stop reading Settings.System.DATE_FORMAT."
* commit '68e9af7ba0b846768036f268d719f3d2a333ffca':
  Stop reading Settings.System.DATE_FORMAT.
2014-11-24 16:19:04 +00:00
Narayan Kamath
f91f06a599 Stop reading Settings.System.DATE_FORMAT.
Also, move over DateFormat.getInstance(SHORT) instead of
LocaleData.shortDateFormat4 (which forces 4 digit years).
Based on an analysis of git history, there seems to be no
real motiviation for using 4 digit years.

If anyone in the platform complains loudly, we could look at
using a skeleton pattern instead of just replacing 'y' with 'yy'.

If third party apps are affected, we could add a targetSdkversion
based check and revert to the old behaviour for older targetSdks.

bug: 18388178
bug: 18322220
Change-Id: Ieab2b41691958a2e668d382c5a6b3d9aaf741ed2
2014-11-24 16:05:19 +00:00
Selim Cinek
9c4a707912 Fixed several time related states for secondary users
The 24 hour setting was not respected correctly. Also
fixed a bug where the next alarm would not display itself
in the QS panel.

Bug: 16239208
Change-Id: I89734f783912dead5831db49db53fba04dbf54ee
2014-11-21 18:25:30 +01:00
Raph Levien
93e48e8cf1 Fix missing ellipsis when just one character is truncated
The "moreChars" test in StaticLayout's generate method would evaluate to
false when the last character in a word caused the break. This in turn
suppressed the ellipsis in this case. The proposed fix is always to set
moreChars true in the code path where the line is broken because more
text wouldn't fit.

Bug: 17738112
Change-Id: Ifa1a69841ca952da4d1937dc8326778179b026b3
2014-11-19 15:39:34 -08:00
Chris Craik
de81cf0c31 am 22e8e8ef: am bde9ffbd: Merge "Fix missing ellipsis when just one character is truncated" into lmp-mr1-dev
* commit '22e8e8ef57ecef6fe7b3489c3c16babfda017435':
  Fix missing ellipsis when just one character is truncated
2014-11-18 22:25:39 +00:00
Raph Levien
396879f3f8 Fix missing ellipsis when just one character is truncated
The "moreChars" test in StaticLayout's generate method would evaluate to
false when the last character in a word caused the break. This in turn
suppressed the ellipsis in this case. The proposed fix is always to set
moreChars true in the code path where the line is broken because more
text wouldn't fit.

Bug: 17738112
Change-Id: Ifa1a69841ca952da4d1937dc8326778179b026b3
2014-11-17 12:32:06 -08:00
Adrian Roos
e8dce89a83 am 34c45bb9: am b2a6c7b8: am 418f4ed0: Merge "Round charging indication to nearest minute" into lmp-mr1-dev
* commit '34c45bb953f3fc230207bacb1a3b4d073068ca9f':
  Round charging indication to nearest minute
2014-11-06 16:36:04 +00:00
Adrian Roos
34c45bb953 am b2a6c7b8: am 418f4ed0: Merge "Round charging indication to nearest minute" into lmp-mr1-dev
* commit 'b2a6c7b83f894922663e7144048264af96239a1e':
  Round charging indication to nearest minute
2014-11-06 16:31:43 +00:00
Adrian Roos
874b35b836 Round charging indication to nearest minute
Bug: 18177374
Change-Id: I4eb7fcac83398a4d8432bf092d8d91506646b5a1
2014-11-05 16:11:10 +01:00
Narayan Kamath
f47a6db44b am f2196a6e: am 6220810b: am 78a3b7d5: Merge "Remove deprecated DateFormat APIs." into lmp-mr1-dev
* commit 'f2196a6ed5988f87d0e04cc30f0f82f7ea431095':
  Remove deprecated DateFormat APIs.
2014-11-04 10:16:22 +00:00
Narayan Kamath
f2196a6ed5 am 6220810b: am 78a3b7d5: Merge "Remove deprecated DateFormat APIs." into lmp-mr1-dev
* commit '6220810b8167deee7bf2577f5136736473cbea1c':
  Remove deprecated DateFormat APIs.
2014-11-04 10:08:53 +00:00
Narayan Kamath
9d68b3c839 Remove deprecated DateFormat APIs.
bug: 18074066
Change-Id: I99cef45105c9f25075c596cf4f52ec5573565596
2014-11-03 16:01:32 +00:00
Elliott Hughes
64a1a901dc am 87ce99ca: am ced7ebdb: Merge "Migrate off timeFormat12 and timeFormat24."
* commit '87ce99ca7243e4556a6cfe9f42cc51531301e979':
  Migrate off timeFormat12 and timeFormat24.
2014-10-29 17:13:38 +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
Neil Fuller
4400f96d1f am a021e922: resolved conflicts for merge of 12260ad7 to lmp-mr1-dev-plus-aosp
* commit 'a021e922184ee16fc019e29c066719daa793dd2b':
  Deprecating FloatMath and Time
2014-10-24 10:41:46 +00:00
Neil Fuller
a021e92218 resolved conflicts for merge of 12260ad7 to lmp-mr1-dev-plus-aosp
Change-Id: Ie2222794208475216941289cf062e05ca9c75e0f
2014-10-24 11:36:46 +01: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
Elliott Hughes
85f60d3a03 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.

Bug: 10361358
Change-Id: I846ab7a6f84cd49e876ad21e9366aff1600e0530
2014-10-23 11:06:43 -07:00
Neil Fuller
bbf8871e1c Deprecating FloatMath and Time
Bug: https://code.google.com/p/android/issues/detail?id=36199
Bug: https://code.google.com/p/android/issues/detail?id=37653
Bug: https://code.google.com/p/android/issues/detail?id=42750
Bug: https://code.google.com/p/android/issues/detail?id=61137
Bug: https://code.google.com/p/android/issues/detail?id=74754
Bug: https://code.google.com/p/android/issues/detail?id=76386
Bug: https://code.google.com/p/android/issues/detail?id=76439
Bug: https://code.google.com/p/android/issues/detail?id=77836
Change-Id: Ic9b57d8a575f93b2258a5481df0ed6b3a952f636
2014-10-23 13:13:05 +01:00
Deepanshu Gupta
eea621810c Merge "Add Optimized Line breaking to LayoutLib" 2014-10-21 22:44:38 +00:00
Deepanshu Gupta
7053919a3a Add Optimized Line breaking to LayoutLib
Change-Id: I308a7d07d98ddd7747f16e06bcffcfd14d667534
2014-10-21 15:43:53 -07:00
Neil Fuller
f4d51632a6 am 8ee06212: am 1802567a: am e4625cc1: Merge "Fix Time docs to document various error cases"
* commit '8ee062122f75f5f9e4904ed95ca3778e670c5f88':
  Fix Time docs to document various error cases
2014-10-15 16:10:03 +00:00
Neil Fuller
12f427d0b5 am 1802567a: am e4625cc1: Merge "Fix Time docs to document various error cases"
* commit '1802567a79b2fc94aa1dff387cd55db8521cdca6':
  Fix Time docs to document various error cases
2014-10-15 16:05:56 +00:00
Neil Fuller
8ee062122f am 1802567a: am e4625cc1: Merge "Fix Time docs to document various error cases"
* commit '1802567a79b2fc94aa1dff387cd55db8521cdca6':
  Fix Time docs to document various error cases
2014-10-15 16:05:55 +00:00
Neil Fuller
e4625cc1a8 Merge "Fix Time docs to document various error cases" 2014-10-15 15:56:06 +00:00
Neil Fuller
7079f2003c Fix Time docs to document various error cases
Bug: https://code.google.com/p/android/issues/detail?id=76386
Change-Id: Ibb71405b70453d5abaf45426ec4e36261b6695cf
2014-10-15 12:08:05 +01:00
Newton Allen
df2b8a1cb9 am 58f75627: am 94f5155d: am c68aad9f: am d84ce32b: Merge "Fix some documentation typos." into lmp-dev
* commit '58f75627d195082e263f6d6d8e3c46c6d0970e63':
  Fix some documentation typos.
2014-10-02 19:43:39 +00: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
Neil Fuller
ebf2e8b451 am c2a0b448: resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
* commit 'c2a0b4482d7144e8382346ea4c22c7b89368fec0':
  Switch from FloatMath -> Math and Math.hypot where possible
2014-10-02 13:39:55 +00:00
Neil Fuller
c2a0b4482d resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-02 14:32:37 +01: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
Newton Allen
8f8a11b7fa Fix some documentation typos.
Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa
(cherry picked from commit 4465d1a03e)
2014-09-30 02:52:26 +00:00
Newton Allen
4465d1a03e Fix some documentation typos.
Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa
2014-09-30 02:49:00 +00:00
Elliott Hughes
51862b168f am 127ba8ff: am 4fec1b48: am 600ca140: Merge "Use constants instead of resources for ellipsis."
* commit '127ba8ff08fd8c317a11831ebf409d249fb5e646':
  Use constants instead of resources for ellipsis.
2014-09-19 23:41:01 +00:00
Elliott Hughes
69eb21074f am 4fec1b48: am 600ca140: Merge "Use constants instead of resources for ellipsis."
* commit '4fec1b488759a89732af151e21a89aa6693ba9bf':
  Use constants instead of resources for ellipsis.
2014-09-19 23:16:52 +00:00
Elliott Hughes
212998ce62 am 4fec1b48: am 600ca140: Merge "Use constants instead of resources for ellipsis."
* commit '4fec1b488759a89732af151e21a89aa6693ba9bf':
  Use constants instead of resources for ellipsis.
2014-09-19 23:02:14 +00:00
Elliott Hughes
600ca140e2 Merge "Use constants instead of resources for ellipsis." 2014-09-19 22:02:45 +00:00
Igor Viarheichyk
ed0daa93e4 Use constants instead of resources for ellipsis.
All supported locales use only U+2025 and U+2026 to represent
ellipses, and it will unlikely change in future. Given translated
resources are inconsistent and often use three dots it is safer
to use constants instead of resources.

Change-Id: I51a6cb903f62f739fbadd6b78e5765c0028d641a
2014-09-19 22:02:08 +00:00
Elliott Hughes
a559a68c36 am d2f9559a: Merge "resolved conflicts for merge of 2008cff7 to lmp-dev-plus-aosp" into lmp-dev-plus-aosp
* commit 'd2f9559ad7cff93527a05cb85172a7bb29f4d9b2':
  Small documentation fixes across many files.
2014-09-08 20:15:07 +00:00
Elliott Hughes
4656e69bf3 resolved conflicts for merge of 2008cff7 to lmp-dev-plus-aosp
Change-Id: I5148eda624e8504f12dbc1288cd4a7a5b7c10850
2014-09-08 13:08:43 -07:00
Elliott Hughes
ab94a1676e Merge "Small documentation fixes across many files." 2014-09-08 18:44:14 +00:00
Mark Doliner
d0646dca40 Small documentation fixes across many files.
Change-Id: I3e8787ce4bc6018ea1dc9aef2a2cd4e0a8dde663
2014-09-05 13:57:51 -07:00
Raph Levien
fa22262ed2 am a5c45276: am 188d9adb: am 43012fec: Merge "Up/down arrow moves to beginning/end of buffer" into lmp-dev
* commit 'a5c452769069bc21c9c8d29fb28dbfa371f6e81b':
  Up/down arrow moves to beginning/end of buffer
2014-09-04 23:42:11 +00:00
Raph Levien
fb0431b525 Up/down arrow moves to beginning/end of buffer
With a hardware keyboard, using up arrow within the top line should
move to the beginning of the buffer, to better match desktop text
editing expectations, and similarly for down arrow on the last line.
This patch implements that behavior.

Bug: 17385784
Change-Id: Ia23c23c9cc2462558bca9aaffec7d83e284d55e8
2014-09-04 15:03:14 -07:00
Raph Levien
9278b5f28e am c2a9bb67: am f7380a69: am 58e457cc: Merge "Fix Layout.isRtlCharAt" into lmp-dev
* commit 'c2a9bb67b8d76173e6220f852bcc4c78daa4bdd5':
  Fix Layout.isRtlCharAt
2014-09-04 21:28:29 +00:00