Commit Graph

4822 Commits

Author SHA1 Message Date
George Mount
890f20e8e8 am 039cc060: am 82fd8428: Merge "Protect against ImageView changing to a null Drawable during Transition." into lmp-mr1-dev
* commit '039cc060493a88a603cc8f3224a9ac2fa31908be':
  Protect against ImageView changing to a null Drawable during Transition.
2014-10-23 22:04:28 +00:00
Alan Viverette
cccea2b976 am 265f8106: am 4ad964d9: Merge "Swap names for clock delegates so they are correct" into lmp-mr1-dev
* commit '265f8106c374ce72284e86a5bb6df4514d320d51':
  Swap names for clock delegates so they are correct
2014-10-23 22:03:43 +00:00
George Mount
82fd842827 Merge "Protect against ImageView changing to a null Drawable during Transition." into lmp-mr1-dev 2014-10-23 21:46:54 +00:00
Alan Viverette
daf33ed853 Swap names for clock delegates so they are correct
Change-Id: Ic11affae802f0afe4746f65f0b96979a7c5a9c0a
2014-10-23 13:34:17 -07:00
Svet Ganov
ae23078b23 am 012b4eae: am d8bc6677: Merge "Optimize text rendering in accessibility mode." into lmp-mr1-dev
* commit '012b4eae10216648b2cff082e2c7809a1b0489a7':
  Optimize text rendering in accessibility mode.
2014-10-23 15:58:43 +00:00
Alan Viverette
d439b034cb am 171c98bd: am e8f676c0: Merge "Use correct smooth scroll default duration" into lmp-mr1-dev
* commit '171c98bd71c97a7f37c5274a2e37c359837cf9e3':
  Use correct smooth scroll default duration
2014-10-23 15:58:38 +00:00
Alan Viverette
5e1a55a3fa am 0a736fa7: am 183cef06: Merge "Ensure AdapterView doesn\'t post selection notifications forever" into lmp-mr1-dev
* commit '0a736fa7ae00ab1fcf8f12d2e1326690740c1814':
  Ensure AdapterView doesn't post selection notifications forever
2014-10-23 08:01:47 +00:00
Svet Ganov
d8bc6677e5 Merge "Optimize text rendering in accessibility mode." into lmp-mr1-dev 2014-10-23 01:55:44 +00:00
Alan Viverette
e8f676c0e5 Merge "Use correct smooth scroll default duration" into lmp-mr1-dev 2014-10-23 01:29:06 +00:00
Alan Viverette
183cef06df Merge "Ensure AdapterView doesn't post selection notifications forever" into lmp-mr1-dev 2014-10-23 00:04:09 +00:00
Alan Viverette
3b415e41cc Use correct smooth scroll default duration
BUG: 18092378
Change-Id: I503677129edb647b7970b4e39a175289d5798e1b
2014-10-22 16:19:57 -07:00
Wale Ogunwale
cbe7f81819 am 1546422e: am d0aae5a2: Merge "Fix issue #17789629: PopupWindow overlaps with navigation bar." into lmp-mr1-dev
* commit '1546422ea7b0c62e6205ab9e85a370caf1d01756':
  Fix issue #17789629: PopupWindow overlaps with navigation bar.
2014-10-22 22:39:35 +00:00
Wale Ogunwale
d0aae5a222 Merge "Fix issue #17789629: PopupWindow overlaps with navigation bar." into lmp-mr1-dev 2014-10-22 22:17:19 +00:00
Wale Ogunwale
393b1c1e88 Fix issue #17789629: PopupWindow overlaps with navigation bar.
The Lollipop release introduced a feature that allowed
apps to extend under the navigation bar. This also means
any popup window that is anchored to the bottom of its
parent window will overlap with the navigation bar if the
parent window is extending underneath the navigation bar.

This change introduces a new window flag
(FLAG_LAYOUT_ATTACHED_IN_DECOR) that allows the app to
specify if the popup window should be attached to the decor
frame of the parent window thereby avoiding an overlap
with the screen decorations.

By default the flag is set on SDK version LOLLIPOP_MR1 or
greater and cleared on lesser SDK versions.

Also, replaced flags FLAG_NEEDS_MENU_KEY and
PRIVATE_FLAG_NEEDS_MENU_KEY_SET with needsMenuKey state
variable to make room for the new
FLAG_LAYOUT_ATTACHED_IN_DECOR flag.

Bug: 17789629
Change-Id: I2150e0c6ac688c966c0e8f7e54d42fd20285bea6
2014-10-21 12:45:53 -07:00
Alan Viverette
c74ca4415e am a74b9432: am 3d52809b: Merge "Prevent excessive accessibility announcements in TimePicker" into lmp-mr1-dev
* commit 'a74b9432e893acf8989fa9e2f553c0bdd3cc48d8':
  Prevent excessive accessibility announcements in TimePicker
2014-10-21 18:29:08 +00:00
Alan Viverette
3d52809bad Merge "Prevent excessive accessibility announcements in TimePicker" into lmp-mr1-dev 2014-10-21 18:16:25 +00:00
Alan Viverette
15b6be2d16 am c97924f4: am a496ba55: am e61519b4: am 15e7b2ac: Merge "Translate compound button drawable by scroll position" into lmp-dev
* commit 'c97924f49365e61f409071ad23bc0b920ebdf2b3':
  Translate compound button drawable by scroll position
2014-10-18 00:44:08 +00:00
Alan Viverette
a496ba5552 am e61519b4: am 15e7b2ac: Merge "Translate compound button drawable by scroll position" into lmp-dev
* commit 'e61519b4a541a4262389842ae8b72dac401b2199':
  Translate compound button drawable by scroll position
2014-10-18 00:32:17 +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
Alan Viverette
26c563b051 Prevent excessive accessibility announcements in TimePicker
This is not a complete solution, and it's still awkward to use for
actually setting the time using the radial time picker. Better
software keyboard support and explore-by-touch CLs are still pending.

BUG: 17994166
Change-Id: Ia2871840a13cb00c140f7f2ab07fe03371acab2f
2014-10-17 12:49:16 -07:00
Alan Viverette
777949c64d Merge "Update AM/PM selectors for clock face TimePicker" into lmp-mr1-dev automerge: 0db6536
automerge: e0fceba

* commit 'e0fceba162a3bd583fa8ed16d3d69920cadd4a4c':
  Update AM/PM selectors for clock face TimePicker
2014-10-17 00:15:02 +00:00
Alan Viverette
0db6536190 Merge "Update AM/PM selectors for clock face TimePicker" into lmp-mr1-dev 2014-10-16 23:48:38 +00:00
Alan Viverette
bba4bcf0b1 am ca66be9e: am b4a29247: Merge "Set content description on CalendarView day labels" into lmp-mr1-dev
* commit 'ca66be9e0ef691a4c8ccd5c7da7e07e618e9bb85':
  Set content description on CalendarView day labels
2014-10-16 02:37:32 +00:00
Alan Viverette
b4a29247ff Merge "Set content description on CalendarView day labels" into lmp-mr1-dev 2014-10-16 01:07:04 +00:00
Alan Viverette
e3171d2762 am c07241ca: am 05110234: Merge "Document Toolbar\'s vertical alignment strategy" into lmp-mr1-dev
* commit 'c07241cab3aa3f2fdc7b39a37861c22f245bd8f1':
  Document Toolbar's vertical alignment strategy
2014-10-16 00:57:09 +00:00
Alan Viverette
6950153f95 am 205a5e69: am 8afc90fd: Merge "Add style support to PopupMenu, clean up constructor javadoc" into lmp-mr1-dev
* commit '205a5e69cc7f2cf30202cf1e122670aac254e5f1':
  Add style support to PopupMenu, clean up constructor javadoc
2014-10-16 00:57:03 +00:00
Alan Viverette
0511023432 Merge "Document Toolbar's vertical alignment strategy" into lmp-mr1-dev 2014-10-16 00:46:24 +00:00
Alan Viverette
29632521c3 Add style support to PopupMenu, clean up constructor javadoc
BUG: 18002523
Change-Id: Ice492686b814460248ccbe9727c64dd002e7ed7a
2014-10-15 17:19:30 -07:00
Alan Viverette
ef71947fd3 Set content description on CalendarView day labels
BUG: 17985867
Change-Id: I64fa9c757504fe7aebd8d5b7576ebe57e3a3e3fd
2014-10-15 14:16:41 -07:00
Alan Viverette
67945c11a5 Update AM/PM selectors for clock face TimePicker
The selectors are now CheckedTextViews, which makes more sense when
using a screen reader.

BUG: 17468036
Change-Id: I09c62a08172a710faa8fb7ed2bf99a66331e5701
2014-10-15 13:20:54 -07:00
Svet Ganov
9e1c67e861 Optimize text rendering in accessibility mode.
In accessibility mode when iterating over the text of a TextView we
use the selection to keep track of the current position. Consequentally,
if the text of a TextView does not support selection we change the text
to Spannable. Doing that has performance cost. While we need selection
support before we used to convert the text to Spannable even if we do
not need to. Now this transformation happens only when the user decides
to traverse the text which is very rare as opposed to doing this for
every TextView.

bug:17491082

Change-Id: Id7e82e01034e439b5d34133b9350a4efc4d19d4a
2014-10-14 08:53:37 -07:00
Alan Viverette
157afde397 Document Toolbar's vertical alignment strategy
BUG: 17526065
Change-Id: I78fdd8da225c33971985d3941f54624b20248409
2014-10-13 17:25:26 -07:00
Jorim Jaggi
1137ea7eaf am 782994ef: am 51650235: Merge "Apply color to progress bar for notifications" into lmp-mr1-dev
* commit '782994efd30a153af44c38a9871d24fecb0eb609':
  Apply color to progress bar for notifications
2014-10-10 17:01:07 +00:00
Dianne Hackborn
75a6e82bcc am 36ae48a8: am d83e9e42: am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '36ae48a850bade17d485cb49dd40a3f11f667ad4':
  Put in real "code" (aka marketing) name.
2014-10-10 04:26:40 +00:00
Jorim Jaggi
ef72a198af Apply color to progress bar for notifications
Bug: 17128179
Change-Id: Ia642ff2a352bbabf2d1e468367d45dc188ee0e73
2014-10-09 11:37:00 -07:00
Dianne Hackborn
d83e9e4280 am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '0761b1b5ebb453a411e3289c1c972dbfddcee880':
  Put in real "code" (aka marketing) name.
2014-10-09 13:03:21 +00:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Alan Viverette
ec8e720ae2 Ensure AdapterView doesn't post selection notifications forever
Previously we would loop forever if a selection notification was
posted after data had changed but the data changed bit was never
reset (e.g. a layout pass never occurred). This moves the pending
notification to occur as part of a layoutChildren() /
checkSelectionChanged() pass. If the client does horrible things
to prevent layout, no notification will occur -- but we won't loop
forever.

BUG: 17736536
Change-Id: I9773a769ad402c92dcbe2af7b8982d4443001961
2014-10-07 21:54:34 +00:00
George Mount
f6c763d6a4 Protect against ImageView changing to a null Drawable during Transition.
Bug 17600191

Change-Id: I5918866dbb6594725f4712a92acdef23003e8f3e
2014-10-07 00:35:10 +00:00
Benjamin Franz
adabf536fb am 00fcb749: am 31409c0c: Merge "Introduce new API to get an unbadged icon and unbadge permissions." into lmp-mr1-dev
* commit '00fcb749cbd26c83d1a29a974bd92967b41c5882':
  Introduce new API to get an unbadged icon and unbadge permissions.
2014-10-06 16:52:27 +00:00
Benjamin Franz
31409c0ccd Merge "Introduce new API to get an unbadged icon and unbadge permissions." into lmp-mr1-dev 2014-10-06 16:26:27 +00:00
Benjamin Franz
ec2d48b96d Introduce new API to get an unbadged icon and unbadge permissions.
Bug: 17125560
Change-Id: I61b884186c96cc54dcaf1d3c7ee8f47610fd1d21
2014-10-03 09:41:08 +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
94f5155d6c am c68aad9f: am d84ce32b: Merge "Fix some documentation typos." into lmp-dev
* commit 'c68aad9fd0f7937176ac6a8238e6236dd7ea3427':
  Fix some documentation typos.
2014-10-02 16:52:50 +00:00
Newton Allen
d84ce32bd2 Merge "Fix some documentation typos." into lmp-dev 2014-10-02 16:39:12 +00:00
Alan Viverette
52bab6e722 am 3c062db9: am a5ecdbb1: Merge "Manage pressed state during drag-to-open" into lmp-mr1-dev
* commit '3c062db99406f083f8c3529bcc56d042b9cb06b0':
  Manage pressed state during drag-to-open
2014-10-02 13:37:56 +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
Alan Viverette
62a8b61f92 Manage pressed state during drag-to-open
BUG: 17573390
Change-Id: Ia85d7b51d6e4a18dcbf99b930f9f7c045697a31b
2014-10-01 16:41:31 -07:00
Alan Viverette
0a059f87b7 am a6a9b86b: am 601fa249: am 8c14ff5c: am c44c77d3: Merge "Implement missing visibility management for FrameLayout foreground" into lmp-dev
* commit 'a6a9b86b7a79fbb0ab5b24a9c480f4f859b47823':
  Implement missing visibility management for FrameLayout foreground
2014-10-01 17:10:21 +00: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