Commit Graph

6735 Commits

Author SHA1 Message Date
Kirill Grouchnikov
2c52d1b5e4 Merge "Tweak the logic of AbsListView smoothScrollToPositionFromTop" 2016-09-13 23:05:55 +00:00
Kirill Grouchnikov
29840f30b1 Merge "Javadocs fixes for deprecated methods on OverScroller" 2016-09-12 17:13:15 +00:00
Kirill Grouchnikov
a8e64d983a Tweak the logic of AbsListView smoothScrollToPositionFromTop
Account for how much of first / last row is visible to make a
better estimation of how many screens we need to travel to
reach our target row.

Bug: 30390402
Change-Id: If38419b2ff94424ba4cbb8127f21f34904df8f44
2016-09-09 14:42:06 -07:00
Svetoslav Ganov
de72d8cba9 Merge "Remove toast window immediately" 2016-09-08 22:36:30 +00:00
Svet Ganov
1777c91f8f Remove toast window immediately
To address a security issue where a toast window can be
used by an app to overlay other apps without a permission
we now allow legacy apps to be able to put at most one
toast window on the screen to prevent adding the same
window over and over again to go around the new restriction
that toast windows are always removed after a timeout.
This change ensures that Toast removes its window immediately.

bug:31340854

Change-Id: Ia7f90844eb64b583321103d090e4407038b41547
2016-09-08 07:11:55 -07:00
Keisuke Kuroyanagi
fe1a3b6f03 Merge changes from topic 'ksk_long_text_edit'
* changes:
  Always redraw text that protrude from line bounds.
  Lazy RenderNode creation to improve performance.
2016-09-08 04:37:17 +00:00
Kirill Grouchnikov
cdac515398 Javadocs fixes for deprecated methods on OverScroller
Change-Id: I73aebc4727df394195d1b98e73a256d6420c3a7b
2016-09-07 08:40:54 -07:00
Keisuke Kuroyanagi
f5af4a344e Always redraw text that protrude from line bounds.
With I63af3a6ecbf92, we create RenderNode lazily, but
blocks containing contents that protrude from line top or
bottom cannot be simply lazily redrawn after edit or
scroll.
With this CL, we check if the contents protrude from line
top or bottom by comparing the text bounds with relevant
font metrics values and we always redrawn such blocks after
edit or scroll.

Bug: 27889485
Change-Id: I666da5eeb39f780c341597f347bfcba21eb34295
2016-09-05 17:45:37 +09:00
Keisuke Kuroyanagi
499c15963a Lazy RenderNode creation to improve performance.
Bug: 27889485

Change-Id: I63af3a6ecbf921cb428e5f7812e1c6983bfb0882
2016-09-05 17:45:30 +09:00
Svetoslav Ganov
71c510236c resolve merge conflicts of bde1d34 to master
Change-Id: Id3cef32bb97cfe8483001e71207b65bc0bc6e304
2016-09-02 18:04:29 -07:00
Svetoslav Ganov
bde1d3458f Prevent apps to overlay other apps via toast windows am: aa07653d2e
am: dea62c6f58

Change-Id: I7ee488e4ac0fc312405680d04a480d473c176ac5
2016-09-02 23:46:20 +00:00
Svetoslav Ganov
dea62c6f58 Prevent apps to overlay other apps via toast windows
am: aa07653d2e

Change-Id: I309615a989eade43401b086da42ff6522d000b68
2016-09-02 23:36:59 +00:00
Svetoslav Ganov
aa07653d2e Prevent apps to overlay other apps via toast windows
It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout.

Now for apps targeting SDK greater than N MR1 to add a
toast window one needs to have a special token. The token
is added by the notificatoion manager service only for
the lifetime of the shown toast and is then removed
including all windows associated with this token. This
prevents apps to add arbitrary toast windows.

Since legacy apps may rely on the ability to directly
add toasts we mitigate by allowing these apps to still
add such windows for unlimited duration if this app is
the currently focused one, i.e. the user interacts with
it then it can overlay itself, otherwise we make sure
these toast windows are removed after a timeout like
a toast would be.

We don't allow more that one toast window per UID being
added at a time which prevents 1) legacy apps to put the
same toast after a timeout to go around our new policy
of hiding toasts after a while; 2) modern apps to reuse
the passed token to add more than one window; Note that
the notification manager shows toasts one at a time.

bug:30150688

Change-Id: Ia1dae626bd9e22541be46edb072aa288eb1ae414
2016-09-02 14:00:07 -07:00
Robert Carr
3dc9c74e61 PopupWindow: Gravity fixes. am: 085160612d am: a732ea6c1f
am: 0ceb3cd785

Change-Id: I9e8dbd01cc0dfa0e115a5f0270912cbb67e9213d
2016-09-01 03:01:00 +00:00
Ned Burns
c8a00b2478 Add rotary encoder support to scrolling containers am: 20ad073581
am: dc47505734

Change-Id: I20d6731276defbc2605ca078011c5c1bc5f18cdc
2016-08-31 22:28:55 +00:00
Robert Carr
0ceb3cd785 PopupWindow: Gravity fixes. am: 085160612d
am: a732ea6c1f

Change-Id: Ide4ccd6cbfef913392a46b89486de064e0196ad6
2016-08-31 19:31:48 +00:00
Robert Carr
a732ea6c1f PopupWindow: Gravity fixes.
am: 085160612d

Change-Id: Ia9477ead7cf1cdd942817f2f427053c6187a1cdf
2016-08-31 19:26:55 +00:00
Rob Carr
8330a91def Merge "PopupWindow: Gravity fixes." into nyc-mr1-dev 2016-08-31 19:21:52 +00:00
Adam Powell
8c52bf51a2 Fixes for ImageView drawable visibility dispatch am: 06f9eb8b62 am: fd86f7fdfd am: ee2f4d890e
am: 393279da8f

Change-Id: I7e42805b096de31e388cd86ee87b44f312841aed
2016-08-31 00:54:04 +00:00
Abodunrinwa Toki
306bcc3dd4 Merge "EditText: Proper support for "textIsSelectable"." 2016-08-30 19:04:38 +00:00
Ned Burns
dc47505734 Add rotary encoder support to scrolling containers
am: 20ad073581

Change-Id: Icb513cdc1d6e035dbb111b16a64d99899c571e42
2016-08-30 03:14:23 +00:00
Ned Burns
20ad073581 Add rotary encoder support to scrolling containers
Change-Id: I1b7a2a60ac9864f2639af81fff810db601b2fbd4
2016-08-29 20:09:23 -04:00
Adam Powell
393279da8f Fixes for ImageView drawable visibility dispatch am: 06f9eb8b62 am: fd86f7fdfd
am: ee2f4d890e

Change-Id: I8cb5a6e2ffc7a62cf6fe68176482cdaefc596ecc
2016-08-27 01:31:07 +00:00
Adam Powell
ee2f4d890e Fixes for ImageView drawable visibility dispatch am: 06f9eb8b62
am: fd86f7fdfd

Change-Id: I155ed970c7f58895419778f01eebc5babb141c33
2016-08-27 01:25:05 +00:00
Adam Powell
fd86f7fdfd Fixes for ImageView drawable visibility dispatch
am: 06f9eb8b62

Change-Id: I8b7d8c73f0a718963a191fd5460517e5a7445974
2016-08-27 01:19:28 +00:00
Adam Powell
06f9eb8b62 Fixes for ImageView drawable visibility dispatch
Some apps rely on their drawables not getting not-visible hints via
setVisible when the window visibility changes. This manifests as
additional animations, such as crossfading from placeholders when the
window becomes visible again.

Apps should be able to handle this case in the future now that we have
more detailed reporting via onVisibilityAggregated, but to keep
existing apps working as-is, ImageView now operates in a compatibility
mode for targetSdkVersion < N and will only dispatch visibility
signals based on the same triggers used in M. New apps get the more
detailed signals.

Fix a bug where window visibility dispatch via onVisibilityAggregated
would double-dispatch "not visible" when the window is transitioning
from GONE => INVISIBLE or INVISIBLE => GONE.

Make the growing set of compatibility check fields in ImageView
static, matching the pattern from View.

Bug 30216207

Change-Id: I88875260bf6aaa23687c7d51353de8d633383531
2016-08-26 22:59:39 +00:00
Guang Zhu
22bf2537a6 Merge "use threadtime when collecting logcat" into nyc-mr1-dev am: 333680114d am: 3c5b0dffe3
am: a3924f78f9

Change-Id: I38225078db5d41dd4fc120c0a4b7f9b13f537de0
2016-08-26 21:10:10 +00:00
Colin Cross
27ef5de65f resolve merge conflicts of 84d7f57 to master
Change-Id: If919f38b89dbb9936aa6b8232be27dcc793925cd
2016-08-26 12:23:10 -07:00
Alan Viverette
077cde7c6e Clean up VideoView, SurfaceView constructors am: 768ca7d19b am: 9af5e5b31b
am: 54131127e8

Change-Id: I8e10d0145e84489707623a934df352e61654a57c
2016-08-26 18:26:04 +00:00
TreeHugger Robot
a2d6d3ccb5 Merge "resolve merge conflicts of 1095b21 to master" 2016-08-26 18:20:34 +00:00
TreeHugger Robot
c5d2192f14 Merge "Various doc cleanups" 2016-08-26 17:37:09 +00:00
Chet Haase
8b9ed44f8d Various doc cleanups
Issue #6439958  More R.attr breakage
Issue #918412  android.graphics.Paint.FontMetricsInt fields & methods need doc
Issue #917387  javadoc bug: Canvas.EdgeType has minimal documentation
Issue #18948460 [DAC-bug] LinearLayout xml layout_weight parameter is missing description

Change-Id: Idb289ca778b3f316923757405460031ce7a5e1e9
2016-08-26 06:50:21 -07:00
Colin Cross
2268fc12b5 resolve merge conflicts of 1095b21 to master
Change-Id: I611579044234435a07cad2f64930b731e53aec77
2016-08-25 22:18:33 -07:00
Chet Haase
df10332181 Document and deprecate various old, undocumented classes
These classes are mostly undocumented and, in some cases, completely
unobvious in what they do or how to use them. In some cases, I added
docs to explain the API. In other cases (ProgressDialog, ZoomButton,
DialerFilter), I deprecated the classes because there are far better ways
to accomplish that functionality with today's platform.

Issue #2164052 Underdocumented classes in Eclair

Change-Id: Ief0e7267852c2cb3c5ae604b3d902d66c89f4cd3
2016-08-25 12:38:46 -07:00
Guang Zhu
a3924f78f9 Merge "use threadtime when collecting logcat" into nyc-mr1-dev am: 333680114d
am: 3c5b0dffe3

Change-Id: I0203a2bc1b36c32902d78d778f231e5009cb7d22
2016-08-24 23:28:20 +00:00
Adam Powell
3c5b0dffe3 Always report visibility to new ImageView drawables am: 37b44dd592
am: a35c182637

Change-Id: Iff4507bf0607d33d9525c8695260f75b381a7ba8
2016-08-24 23:18:47 +00:00
Adam Powell
a35c182637 Always report visibility to new ImageView drawables
am: 37b44dd592

Change-Id: Ib8e1cc5d3ee91aae74875cc70fda9d8d4104892e
2016-08-24 23:12:27 +00:00
Adam Powell
37b44dd592 Always report visibility to new ImageView drawables
Fix a regression where some drawables would not be correctly updated
with their visibility state if set while an ImageView was not attached
to a window.

Bug 30216207

Change-Id: Ia30326a78168141c8f85bad9c782710f965623b7
2016-08-24 22:57:09 +00:00
Adam Powell
84d7f577d6 Focus behavior for scroll containers in watch mode
am: 2fe301db75

Change-Id: I748e941fcce1355a226bf56609511c8db8bb788e
2016-08-24 21:16:24 +00:00
Ned Burns
68efd087a3 Merge "Focus behavior for scroll containers in watch mode" into cw-f-dev 2016-08-24 21:11:45 +00:00
Alan Viverette
54131127e8 Clean up VideoView, SurfaceView constructors am: 768ca7d19b
am: 9af5e5b31b

Change-Id: Ic017d3855d81b3a6fbc72fd4c256f55584e453da
2016-08-24 18:43:53 +00:00
Alan Viverette
1095b21fa7 Constrain input hour and minute to valid range am: f0ac2ba9f4
am: a2c9a8c274

Change-Id: Ifc3701f407620892909d8228a330d4b7e0af101c
2016-08-24 18:42:47 +00:00
Alan Viverette
9af5e5b31b Clean up VideoView, SurfaceView constructors
am: 768ca7d19b

Change-Id: Ia3ff40a2c6dbbb2a725bc6306401de3cd662ba33
2016-08-24 18:31:38 +00:00
Alan Viverette
a2c9a8c274 Constrain input hour and minute to valid range
am: f0ac2ba9f4

Change-Id: I5f365e4869f0aabec71e478d9cba4edc3ce30900
2016-08-24 18:30:20 +00:00
Alan Viverette
16b8941dba Merge "Clean up VideoView, SurfaceView constructors" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Alan Viverette
4e32b47c48 Merge "Constrain input hour and minute to valid range" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Adam Powell
2fe301db75 Focus behavior for scroll containers in watch mode
Change default scrolling containers not to request a reveal (parent
scroll) on focus, and to be focusable in touch mode. This helps watch
devices with other input mechanisms that rely on view focus.

Since there's no attribute for the reveal on focus hint, set that in
code. Set focusable in touch mode on the default styles for
ScrollView/HorizontalScrollView. AbsListView already sets this
historically anyway.

Change-Id: I74760f6d523874127da6f6134f0461cc59ce189a
2016-08-23 18:36:04 -04:00
Robert Carr
085160612d PopupWindow: Gravity fixes.
First we restore the M semantics with respect
to DISPLAY_CLIP_VERTICAL, which we only applied
for drop downs, and omitted in the case of
showAtLocation. Further, we fix an error where
user specified gravity from showAtLocation is
erased when calling update() by storing the
gravity and including it in computeGravity().

Bug: 30445010
Bug: 30965176
Change-Id: I28a081e1237a8b41f2444717e0db21ef4181507b
2016-08-23 10:20:00 -07:00
Andrei Stingaceanu
1136e450e3 Merge "TextView - lazy GestureDetector creation for ClickableSpans" 2016-08-23 17:00:38 +00:00
Tenghui Zhu
174c92aa52 Merge "Update the javaDoc for VectorDrawable and AnimatedVectorDrawable" into nyc-mr1-dev am: 5cb0c13f76
am: d4f839c477

Change-Id: Iba7c42c3284b1b4b8c3df90c82ce24723d3dfba3
2016-08-23 15:03:39 +00:00