Commit Graph

9397 Commits

Author SHA1 Message Date
TreeHugger Robot
1bef83f613 Merge "Added inputType to Assist API." 2017-03-02 03:01:50 +00:00
TreeHugger Robot
de06d67d16 Merge "Added auto-fill support for DatePicker and TimePicker." 2017-03-01 23:15:35 +00:00
Felipe Leme
305b72c925 Added auto-fill support for DatePicker and TimePicker.
Also fixed some getAutoFillType() implementations to return null
when the view is disabled.

Bug: 33550221
Bug: 35840787
Test: CtsAutoFillServiceTestCases (with new tests) pass
Test: m update-api

Change-Id: I46acc1fb106cf2153515cc1c9567b34cfabd1c62
2017-03-01 10:43:48 -08:00
Robert Carr
693f3432ae Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Icb7259365b51ebe8c7f6c7cd4f9ba29f9fce08a4
2017-02-28 09:39:07 -08:00
Alan Viverette
7485a9bbb3 Setting focusableInTouchMode clears FOCUSABLE_AUTO
Bug: 35726873
Test: View_FocusHandlingTest#testHasFocusable
Change-Id: I10ec94684846dc2280ba0bd7922d9304bf8a95db
2017-02-27 23:34:25 +00:00
Phil Weaver
2fe5752635 Merge "Document null labels for standard a11y actions" 2017-02-27 22:35:02 +00:00
Alan Viverette
8a8e33dbb0 Merge "Always handle hover events if the View is already hovered" 2017-02-27 22:16:55 +00:00
Felipe Leme
16aafc36de Added inputType to Assist API.
It will be used mostly for auto-fill purposes..

Bug: 35364993
Test: CtsAutoFillServiceTestCase (with new tests) pass
Test: manual verification

Change-Id: Ia5b6ff94e66a7da385cfb6f42ad994fe5e1e976b
2017-02-27 14:09:44 -08:00
TreeHugger Robot
956545b07f Merge "Exit touch mode on mouse/stylus click" 2017-02-27 17:40:03 +00:00
Alan Viverette
8e1a729645 Implicitly cast views obtained via View.findView methods
Removes all explicit casts from android.widget classes. Also @removes
methods on ListView that were overriding @hidden methods and should
never have been exposed as public API.

Bug: 24137209
Test: make
Change-Id: I89f0e51258560987b3942251fd249210f825ac2a
2017-02-27 11:06:20 -05:00
Evan Rosky
cbf78f80cf Merge "Fixed poor behavior of position-based focus order" 2017-02-24 18:51:44 +00:00
Evan Rosky
b2048d4247 Merge "Add focusdirection annotations to cluster methods" 2017-02-24 18:50:34 +00:00
Phil Weaver
426361c371 Document null labels for standard a11y actions
Bug: 27274855
Test: Comment change only, so just verifying the build.
Change-Id: I8c03e895cd3c77c623ca912decc32b8d531bf1f6
2017-02-24 09:44:32 -08:00
TreeHugger Robot
1b0f1568d9 Merge "Auto-fill logging improvements:" 2017-02-23 23:01:33 +00:00
TreeHugger Robot
125d2f14ee Merge "Update fill UI" 2017-02-23 20:01:06 +00:00
TreeHugger Robot
8716ef9419 Merge "Revert "Don't trigger auto-fill request if mode is manual"" 2017-02-23 18:58:26 +00:00
Rob Carr
c864ca3039 Merge "Correct SurfaceControl matrix parameter names." 2017-02-23 18:26:29 +00:00
Svet Ganov
28a2c7e057 Update fill UI
1. Abstracted the fill/save view and window management
   in dedicated classs

2. Avoided the need of a second window to detect outside
   touches

3. Simplified the fill-ui window management

4. Moved the UI in its own package to ease mmigration to
   sys UI.

5. Removed hard-coded colors from the layout

6. Make sure the save UI cannot grow as wide as the screen
   as this would not look good on tablets

7. Update the save UI to look closer to mocks

Test: CTS tests pass
Bug: 35708258

Change-Id: Ia74a5aad6f16bba0047a9e8e61958c77af0d358d
2017-02-23 10:13:03 -08:00
Felipe Leme
0ab53dcb31 Auto-fill logging improvements:
- Shorten history line by removing less relevant items.
- Decrease number of history items (from 100 to 20).
- Removed redundant logs from service (and kept them on manager)
- Use {} on all log statements.
- Remove DEBUG guard on some important messages.
- Remove DEBUG guard from service-side toString() implementations.
- Don't log FLAG_FOCUS_LOST actions.

BUG: 33197203
Test: manual verification
Change-Id: I30466ab3c0d12cfa2ad68b2b2a107d5890256845
2017-02-23 17:30:42 +00:00
Philip P. Moltmann
e572989b3f Revert "Don't trigger auto-fill request if mode is manual"
This reverts commit 576a847e03.

Fixes: 35701500
Change-Id: I972c2d0e56d365d1fad76a66e74bfad227bf26c4
2017-02-23 17:06:27 +00:00
Bryan Cassell
7c4e9341d2 Merge "Added VSYNC and INTENDED_VSYNC timestamps to FrameMetrics API." 2017-02-23 16:08:37 +00:00
Bryce Lee
32bd2ea56c Merge "Update DisplayAdjustments in Display from Resources." 2017-02-23 15:15:10 +00:00
Felipe Leme
62fb65fd3c Merge "Added auto-fill support for Spinner." 2017-02-23 06:45:16 +00:00
TreeHugger Robot
30172869a7 Merge "Don't trigger auto-fill request if mode is manual" 2017-02-23 05:57:21 +00:00
Felipe Leme
d09ccb8db6 Added auto-fill support for Spinner.
Spinner is a special kind of list-value field because its auto-fillable
values are not currently present in the assist structure: this change
adds a getAutoFillOptions() to fill that void, and implements the
auto-fill APIs on Spinner.

It also fixes RadioGroup.getAutoFillValue() - it should return the index
of the child, not its resource id.

Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass
Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
2017-02-22 16:09:50 -08:00
Svetoslav Ganov
6699538fb6 Merge "Fix a memory leak in AutoFillManager" 2017-02-23 00:02:56 +00:00
TreeHugger Robot
f5da23114d Merge "Improved documentation and added @CallSuper on onProvideAutoFillStructure()." 2017-02-22 19:39:18 +00:00
Philip P. Moltmann
576a847e03 Don't trigger auto-fill request if mode is manual
Also improve descriptions of the attributes, constants and methods.

Test: Ran updated ViewAttributesTest
Bug: 34077687
Change-Id: I532f1b26b97ba113f316eed6fc68dae2ed33ea6a
2017-02-22 11:05:46 -08:00
Bryce Lee
609bf65668 Update DisplayAdjustments in Display from Resources.
Previously, a copy of DisplayAdjustments was provided during Display
construction. If the Display instance is held, the adjustments would
not update. However, the DisplayInfo would, leading to a mismatch.

This changelist adds a reference to the Resources, which can be
queried to provide the latest adjustments.

Fixes: 33430498
Test: manual from bug repro steps.
Test: make -j32 cts; cts-tradefed; run cts --module CtsAppTestCases --test android.app.cts.DisplayTest#testRotation

Change-Id: Ida2ed3990add885d06b011494af24b055343f3fa
2017-02-22 10:27:34 -08:00
Bryan Cassell
f4c2a52be3 Added VSYNC and INTENDED_VSYNC timestamps to FrameMetrics API.
BUG: b/31650117

Test: cts-tradefed run singleCommand cts --skip-device-info
--skip-preconditions -m CtsViewTestCases -t
android.view.cts.FrameMetricsListenerTest

Change-Id: I8341809b6dac420859dad8c21f30d4ee8897425d
2017-02-22 09:49:32 -08:00
Felipe Leme
bd271212a2 Improved documentation and added @CallSuper on onProvideAutoFillStructure().
onProvideAutoFillStructure() sets mandatory auto-fill information like the
auto-fill id, so we must enforce subclass to call it.

Bug: 35395043
Test: m update-api
Change-Id: I525690b38639d970f516a906ddeb3a6bd6e01d8c
2017-02-22 09:05:50 -08:00
Robert Carr
0edf18f34c Correct SurfaceControl matrix parameter names.
DsDx is used for the X scale but DtDy is used for the Y scale, it
seems like this is a simple mix up. Correct before documenting
SurfaceControl.

Test: Animations and such work.
Change-Id: Ic52b67596bf576f58346e4db66661b06ea1bdc2f
2017-02-21 20:01:47 -08:00
Svet Ganov
17db9dc38c Fix a memory leak in AutoFillManager
Test: Auto-fill CTS tests pass

bug:35435080

Change-Id: I3006cd8394a04bcd64da015f392d084267646366
2017-02-21 20:00:20 -08:00
TreeHugger Robot
527e886704 Merge "Avoid copying NoCopySpans." 2017-02-22 02:14:05 +00:00
TreeHugger Robot
f7d364d820 Merge "Optimize AutoFillManager calls" 2017-02-22 01:27:16 +00:00
Svetoslav Ganov
acfa5ee00a Optimize AutoFillManager calls
AutoFillManager needs to handle calls for value changes and
reset only if there was a focus change reported, hence the
APIs for value change and reset do not need to connect to
the backing service to determine the enabled state.

Test: Auto-fill CTS tests pass

bug:35641424

Change-Id: I50e449925034c54257e35aa78e066e2a0fa53c03
2017-02-22 00:54:02 +00:00
Phil Weaver
0ebe6bd5da Avoid copying NoCopySpans.
Move from Spannable to SpannableStringBuilder, as the latter doesn't
copy NoCopySpans.

Bug: 34712634
Test: CTS tests that verify clickable spans still work.
Change-Id: I0ab029a7c79cb7d0b48724890c5cabe841390f4a
2017-02-21 16:24:31 -08:00
TreeHugger Robot
22e4f07439 Merge "Make scrollbarSize in Material Design theme configurable" 2017-02-21 21:56:58 +00:00
Evan Rosky
5722331efe Add focusdirection annotations to cluster methods
Bug: 34361917
Test: Still compiles
Change-Id: I47b5e9472524708544d567444b3fbcc93bc45119
2017-02-21 13:43:54 -08:00
TreeHugger Robot
f780d86963 Merge "Add API to mark sanitized fields and implement it on TextView." 2017-02-21 21:36:50 +00:00
Vladislav Kaznacheev
7614cdf9c3 Exit touch mode on mouse/stylus click
Bug: 35625345
Test: android.cts.view.ViewTest#testTouchMode
Change-Id: Ib31425c3da2c42a4df91735be4057d2aa8db7480
2017-02-21 11:57:59 -08:00
Felipe Leme
33791fd54b Add API to mark sanitized fields and implement it on TextView.
When sending a ViewNode to the auto-fill service, it's necessary to sanitize
it so it does not contain PII (Personally Identifiable Information).

A good rule of thumb is to mark as sanitized nodes whose value were statically
set from resources. Ideally, that logic should belong to View, but View does
not know how its contexts are set, so the decision must be made by the
subclasses, and this CL implements that logic on TextView (which is the main
auto-fill type - others will come soon...)

Bug: 33269702

Test: CtsAutoFillServiceTestCases pass
Test: manual verification

Change-Id: I4dcdd8419a35812bd2f15a63a5be85f8cd97bb4e
2017-02-21 11:47:33 -08:00
TreeHugger Robot
f9bd294469 Merge "Overhaul GraphicsStatsService" 2017-02-21 19:23:46 +00:00
Evan Rosky
5fd69c3864 Fixed poor behavior of position-based focus order
Rect-based focus order algorithm used to sort all views such-that
higher tops were higher. The result is that focus order could
easily move end-to-start when elements with varying heights (even
1px different) were arranged horizontally.

This changes the algorithm to take vertical overlap into account
when sorting. It tries its best to match UX for how focus-order
should work in ambiguous cases.

Bug: 33848452
Bug: 34854951
Test: Checked in a sample-app to make sure focus order matches UX
      more closely than before. Also verified that existing
      FocusFinder CTS tests still pass.

Change-Id: I0e0f2f63d5151693a2642604f64df985856c8991
2017-02-21 11:17:34 -08:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Derek Sollenberger
d7df6748f2 Merge "Add developer setting to set the default GPU renderer." 2017-02-21 17:37:38 +00:00
Svet Ganov
00c771dc7d Add support for remote views backed auto-fill UI
Test: CTS and manual

Change-Id: Ia09f0208d78439491052e4886a0e71c387b73370
2017-02-20 00:37:33 -08:00
TreeHugger Robot
6f781be91e Merge "Minor improvements to help diagnose auth workflow." 2017-02-18 02:18:24 +00:00
Vladislav Kaznacheev
98329f4da3 Make scrollbarSize in Material Design theme configurable
1. Introduce config_scrollbarSize, default value=4dp
2. Use it to define android:scrollbarSize in themes.
3. Remove the explicit size from the MD scrollbar thumb shape.

Bug: 35432058
Test: android.cts.view.ViewTest#testScrollbarSize
Change-Id: Ia97b8f34ae1b9296ca2afcf62ff5bde55f70a63e
2017-02-17 15:14:05 -08:00
TreeHugger Robot
cd1af32eda Merge "Add autoFillMode attribute to View" 2017-02-17 20:50:18 +00:00