Commit Graph

6559 Commits

Author SHA1 Message Date
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
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
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
Robert Carr
d4f839c477 PopupWindow: Be more consistent about Gravity calculation.
am: 798fb79866

Change-Id: Ia7c49dbe2fbe751565d6c8be46586a66c535a148
2016-08-23 14:43:21 +00:00
Rob Carr
b19915bea8 Merge "PopupWindow: Be more consistent about Gravity calculation." into nyc-mr1-dev 2016-08-22 20:47:10 +00:00
Alan Viverette
122fca86b3 Announce the date for accessibility using EMMMMdy format am: a770530e12
am: d239411420

Change-Id: I6c2323d6e17a6497bcab0161d745586feb96076c
2016-08-17 20:23:59 +00:00
Alan Viverette
a770530e12 Announce the date for accessibility using EMMMMdy format
Which for en_US would be something like "Friday August 5th 2016" but may
be re-ordered for other locales. Dates are hard.

Bug: 30682782
Change-Id: I015d293526592add27ce8fada12cd58bcc274ccf
2016-08-17 12:46:59 -04:00
Alan Viverette
4922fdc35f Use localized hour when announcing selection for accessibility am: 66a8562c58
am: fde654fb97

Change-Id: I8a07c4f9af6bfc31a2510dc5cc5aa7b763d77bc0
2016-08-10 22:11:10 +00:00
Alan Viverette
fde654fb97 Use localized hour when announcing selection for accessibility
am: 66a8562c58

Change-Id: Ieffd33d1e33fdd38e2383396b18dce8031fb1538
2016-08-10 22:04:59 +00:00
TreeHugger Robot
75f7bfdc7a Merge "Use localized hour when announcing selection for accessibility" into nyc-mr1-dev 2016-08-10 21:55:30 +00:00
Alan Viverette
56a05f464e Use symmetric conditions for advertising and performing ACTION_SCROLL am: 47be54bb78
am: fd855c17b1

Change-Id: I6efe57707e22099409869c3e7c42bfa12a081ff4
2016-08-10 21:20:05 +00:00
Robert Carr
798fb79866 PopupWindow: Be more consistent about Gravity calculation.
Currently we are only appending the DISPLAY_CLIP_VERTICAL
if the API user happens to call update() after showAsDropDown().
This fixes that behavior, and fixes a RTL issue (START v. LEFT).
Unblocks a CTS test I am working on.

Bug: 30578621
Change-Id: Ibf838544d453986b66eb223e2ac0f7d909fe5630
(cherry picked from commit 8367c50972)
2016-08-08 20:35:17 +00:00
Alan Viverette
47be54bb78 Use symmetric conditions for advertising and performing ACTION_SCROLL
Bug: 30186372
Change-Id: Ieea0cd539049990ffa98edabb2a7b026445dd14a
2016-08-05 16:48:19 -04:00
Alan Viverette
66a8562c58 Use localized hour when announcing selection for accessibility
Bug: 30451273
Change-Id: I04276dc12d479ff5336799ebb32ff4cf5d66068a
2016-08-04 13:24:14 -04:00
Alan Viverette
f0ac2ba9f4 Constrain input hour and minute to valid range
This is consistent with the legacy spinner implementation.

Bug: 30570390
Change-Id: I14fb1363b410b2f56ead01e0b632efb8f7508268
2016-08-04 13:23:33 -04:00
Alan Viverette
768ca7d19b Clean up VideoView, SurfaceView constructors
Also cleans up VideoView fields. No functional changes.

Bug: 30600463
Change-Id: I42241e376006c328695d46d63f7fdeda409f1a67
2016-08-04 09:54:14 -04:00
Yigit Boyar
5eede8910b Target API check for margin params fix am: 2dd20a61e9
am: 6efd207022

Change-Id: Ic05edff9014a74cd543d0eef03ba8862a198613a
2016-08-02 20:57:22 +00:00
Yigit Boyar
2dd20a61e9 Target API check for margin params fix
Prior to N, our widgets were not converting MarginLayoutParams
properly between ViewGroups. The fix intrudced some issues in
older apps as the broken conversion code would hide developer
errors. This CL guards the change with a target API check so
that we don't affect older apps.

Bug: 30378230
Change-Id: I215281d261b553c3b4cedcd29ea0a861df809471
2016-08-02 11:27:18 -07:00
Svetoslav Ganov
e1c3ca5270 Revert "Prevent apps to overlay other apps via toast windows" am: 2fc661a453
am: 74b90c7d85

Change-Id: I6829cf6f04155a951bcfe79fcc13dbc2104a00ae
2016-08-02 02:17:56 +00:00
Svetoslav Ganov
74b90c7d85 Revert "Prevent apps to overlay other apps via toast windows"
am: 2fc661a453

Change-Id: I37bfb7dc01ad512f34332e83f6cc6be31d1feaab
2016-08-02 02:01:40 +00:00
Svetoslav Ganov
a2f247e6a6 Merge "Revert "Prevent apps to overlay other apps via toast windows"" into nyc-mr1-dev 2016-08-02 01:56:10 +00:00
Svetoslav Ganov
2fc661a453 Revert "Prevent apps to overlay other apps via toast windows"
bug:30150688

This reverts commit dc24f937b0.

Change-Id: Id7e8ddbf82ab426f55a5296791f1e8ebb61514bc
2016-08-02 01:55:01 +00:00
Alan Viverette
c0acf68d30 Adjust touch progress offset to account for changes to AbsSeekBar am: 1d33c3f3a3
am: 1cad05bdc0

Change-Id: Ie542424e2b46805a890cb73e8e1bbe2d155f3aff
2016-08-01 21:11:00 +00:00
Alan Viverette
1cad05bdc0 Adjust touch progress offset to account for changes to AbsSeekBar
am: 1d33c3f3a3

Change-Id: I7723f2fd11ea9c8969b9147e1ef893e67e0fb9e0
2016-08-01 20:58:10 +00:00
Alan Viverette
7dd40cd411 Merge "Adjust touch progress offset to account for changes to AbsSeekBar" into nyc-mr1-dev 2016-08-01 20:53:50 +00:00
Alan Viverette
1d33c3f3a3 Adjust touch progress offset to account for changes to AbsSeekBar
Previously AbsSeekBar always rounded up, which resulted in poor handling
of touches near the edge of a progress value. We fixed this but forgot
to adjust RatingBar for the new behavior.

Bug: 30558586
Change-Id: I634fa7a0b98568093e16279ef5a80abe08d2e2fe
2016-08-01 15:14:05 -04:00
Svet Ganov
a0030632f8 Prevent apps to overlay other apps via toast windows am: dc24f937b0
am: fd8ffb62a9

Change-Id: I94077046a2f38a7cffce5cc73f805f671c35db23
2016-08-01 19:02:53 +00:00
Svet Ganov
dc24f937b0 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: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd
2016-08-01 11:46:02 -07:00
Michael Kwan
f704097df4 Add titles to PreferenceFragments and PreferenceScreens for watches.
am: 744be16ffa

Change-Id: I54847a5ef3ddb4e09cc835433d80e121cf32b725
2016-07-26 21:11:47 +00:00
Michael Kwan
744be16ffa Add titles to PreferenceFragments and PreferenceScreens for watches.
Preferences lack a title on watch type devices due to lack of ActionBar
support. A custom ListView was added to use a custom wrapper adapter to
add a persistent header view at the top of the ListView that developers
would not be able to remove via the ListView API.

Bug: 27962897
Change-Id: I6bccecf85592d9507e0c7a04c9a035617001e9ef
2016-07-26 10:57:56 -07:00
Alan Viverette
1f53395128 Ensure forwarding listener target is long-clickable
am: 11ace9eedb

Change-Id: I182f933b35aef0da062bf6e7d4c485d681d50258
2016-07-22 21:18:43 +00:00
Alan Viverette
48c5f38b34 Merge "Ensure forwarding listener target is long-clickable" into nyc-mr1-dev 2016-07-22 21:09:37 +00:00
Selim Cinek
3f769aba2a Changed the appearance of fullscreen intent notifications again
am: 981962e6ad

Change-Id: Ib26d711e48aaff99a4e64e86feb67dbf987d67e2
2016-07-22 19:29:52 +00:00