Commit Graph

9245 Commits

Author SHA1 Message Date
Phil Weaver
7da087d87d Merge "Accessibility can capture fingerprint gestures" 2017-02-01 02:01:44 +00:00
TreeHugger Robot
5594ab958a Merge "Propagate surface type and owner through to SurfaceFlinger." 2017-01-31 23:22:12 +00:00
Phil Weaver
27fcd9c97a Accessibility can capture fingerprint gestures
Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
2017-01-31 14:27:09 -08:00
TreeHugger Robot
7b552516ae Merge "Implicitly cast views obtained via View.findView methods" 2017-01-31 22:04:25 +00:00
Chris Craik
b27aba9a92 Merge "Replace invalidateChild/invalidateChildInParent" 2017-01-31 18:23:22 +00:00
TreeHugger Robot
6675bbf093 Merge "Binary compatibility stubs for get/setTooltip()" 2017-01-30 19:07:59 +00:00
Alan Viverette
775b9dc89f Binary compatibility stubs for get/setTooltip()
Change-Id: I8784ccfd48d8c809b70d7c5c977bcbf44e3f4d47
Fixes: 34798233
Test: n/a
2017-01-30 10:02:11 -05:00
Chet Haase
b64e777f6c Add methods to query animation state
Testing utilities want the ability to know whether things in the UI
are in flux and they need to wait before testing on-screen values.
These changes (a subset of what's needed, but will have to do for
a start) allow querying of ActivityTransitions and ProgressBar, two
common/difficult pieces in the puzzle.

Test: CTS tests at ag/1835467
Bug: 30978257 Provide view transition Api to prevent flaky tests

Change-Id: If63b3d0dde2178d826ac1dbfad0fc50e5ed9a780
2017-01-30 12:57:43 +00:00
Yohei Yukawa
06b4be771c Minor code clean-ups with no behavior change
As another preparation CL to work on Bug 7254002, this CL cleans up
miscellaneous minor coding style issues that do not cause any
user-visible problems.

 - Add final keyboard to classes that are not intended to be extended.
 - Add static keyboard to nested classes if possible.
 - Fix a typo in log message.
 - Remove a redundant synchronized keyword in method signature.
 - Remove unused class fields.

Test: checkbuild
Bug: 7254002
Change-Id: I3b54179116a74cafc99a3dfd3f2a429a7111c12e
2017-01-29 14:08:17 -08:00
Andrii Kulian
5f5aaa8142 Merge "Rename flag that enables showing display content with keyguard" 2017-01-28 04:08:35 +00:00
TreeHugger Robot
b46df69a77 Merge "Move autofill focus triggers from TextView to View." 2017-01-28 01:54:48 +00:00
Andrii Kulian
7211d2eba8 Rename flag that enables showing display content with keyguard
Renamed SHOW_WITH_INSECURE_LOCKSCREEN to CAN_SHOW_WITH_INSECURE_KEYGUARD.

Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: Ie03ee59730a9e9e715b2bad0a14fdd107b8c7c00
2017-01-27 17:27:11 -08:00
Jason Long
2b004b3aba Move autofill focus triggers from TextView to View.
Bug: 31001899
Change-Id: I6fd01b86936b3140edf87ac63292c77015bb019d
Test: Manual
2017-01-27 13:47:37 -08:00
Adam Powell
995c043acf Fix ListView click handling under new focus rules
ListView historically uses View#hasFocusable to change signifcant
behavior around the clickability of items: an item view with any
focusable children could not be clicked via an item click
listener. Many apps therefore have sub-views in list items that are
deliberately clickable, but not focusable. This comes up in cases like
overflow menu buttons on list items.

Now that we have auto-focusability triggered when a view is set as
clickable, the expectations of apps using this pattern have changed.

Create an overload of hasFocusable that optionally can filter out
auto-focusable views in its results. Have ListView use it to preserve
its previous behavior. This isn't public API for now, but perhaps it
should be if this pattern shows up in practice in places other than
ListView.

Bug: 34756767
Change-Id: Ie71ee6e388449f634b30f9162a8b3fa578e32db8
2017-01-27 13:31:44 -08:00
Albert Chaulk
3bf2e57f8d Propagate surface type and owner through to SurfaceFlinger.
This allows VrWindowManager to identify things like permission
dialogues in the list of SurfaceFlinger layers that show up while a
VR application is running and display them without leaving VR mode.

Bug: 30984984
Test: Run VR application, request permission at runtime, observe and
  accept permission in VrWindowManager without leaving VR mode.

Change-Id: I347313b5fcd08dea3cd6fddfaeb15640938e3a87
2017-01-27 15:14:48 -05:00
Chris Craik
9de95db4f2 Replace invalidateChild/invalidateChildInParent
Fixes: 34361503
Test: CTS: android.view.cts.ViewGroupTest
      APCT: android.view.ViewInvalidateTest

Simplify and unify HW accelerated invalidate/damage codepaths, since
both simply walk up to ViewRootImpl and schedule a traversal.

Adds a new overridable method 'onDescendantInvalidated' for observing
subtree rendering updates.

Change-Id: I7ef1f914c3411317692451787b3810b23e019591
2017-01-27 11:36:27 -08:00
Alan Viverette
06c2fffdaa 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: I6ccfc6f001b355c4880f2b54e1a5474df78d6228
2017-01-27 13:13:45 -05:00
Andrii Kulian
fc8f82bc6b Allow showing content on virtual displays when locked
This adds new flag to virtual display that changes its
behavior when keyguard is shown, but can be dismissed without
entering credentials. This can be applied only to private
virtual displays.

Bug: 34280365
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVirtualDisplayHidesContentWhenLocked
Test: #testShowWhenLockedVirtualDisplay
Test: #testShowWhenLockedPublicVirtualDisplay
Change-Id: I9c19d36295e62f59bd1db1352af707d54ea51667
2017-01-27 00:14:06 -08:00
TreeHugger Robot
e852d6731b Merge "Fix issues with launching activities on virtual displays" 2017-01-27 05:44:37 +00:00
TreeHugger Robot
e682445698 Merge changes from topic 'session_refactoring'
* changes:
  Adds autofill save ui
  Moar AutoFill Framework refactoring...
2017-01-27 03:46:36 +00:00
Andrii Kulian
4acfd858a4 Fix issues with launching activities on virtual displays
- Virtual displays might have hdr capabilities not initialized,
  which lead to exception when checking.
- Dynamic stacks were mistakenly considered an invalid launch stack.

Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I20356d6e25cf9e5fa4a3d7bd3699a8e82a73f21a
2017-01-26 19:43:13 -08:00
TreeHugger Robot
903f98e37f Merge "Expose Java side for parenting SurfaceControl" 2017-01-27 02:43:52 +00:00
Felipe Leme
bd00fef41c Moar AutoFill Framework refactoring...
* Encapsulated application-level auto-fill logic on AutoFillSession.
  Currently, Activity.java directly manages the IAutoFillCallback binder
  object used to auto-fill its views, but this logic need to be
  extended so Views can use it to draw the auto-fill bar.

* Pass auto-fill id and boundaries to requests
  So AutoFillUI can display its affordance in the right places.

* Uses a new auto-fill id on View (instead of reusing accessibility's).
  That allows moving the logic on whether a new request should be made or
  the existing UI moved to the service side.

* Split service methods in 2, for shell cmd and app
  And applied the right permission check on both.

* Removed CancelationSignal from onSaveRequest()
  Since it's not really needed.

* Etc...
  ¯\_(ツ)_/¯

BUG: 34637800
BUG: 31001899
Test: CtsAutoFillServiceTestCases passes
Test: manual verification

Change-Id: Ibd0cb2cfff6d0f6bb6b697a423ed5e89df687b82
2017-01-26 15:39:59 -08:00
TreeHugger Robot
ff73dd9c60 Merge "Splitscreen for minimized state that works with resizable launchers" 2017-01-26 20:07:07 +00:00
TreeHugger Robot
6ee80f3a65 Merge "Change configuration's color mode based on the display's color mode" 2017-01-26 18:56:23 +00:00
Matthew Ng
e15352e516 Splitscreen for minimized state that works with resizable launchers
If a launcher is resizable, going to minimized mode (dock task and then
press home) would show a cropped height of the task at the top in a
minimized state and the fullscreen stack would show the home launcher
which takes the rest of the remaining height. If the launcher is not
resizable, it will default the original behavior.

To enable this in a launcher, add android:resizeableActivity="true" in
the AndroidManifest.xml in the <application/> tag.

Test: manual - rotating while minimized, minimizing using dragging task
or holding overview nav button, installing resizable launcher with a
non-resizable launcher
Fixes: 32504542
Change-Id: Idf4015b40f9bec81b70f146f0f2d7df8ccfb4cf0
2017-01-26 10:31:50 -08:00
TreeHugger Robot
35089c466e Merge "Revert "Revert "Remove View.setTooltip/getTooltip""" 2017-01-26 07:39:51 +00:00
TreeHugger Robot
eb30016ad4 Merge "Implement pointer capture API" 2017-01-26 07:22:24 +00:00
Elliot Waite
0ce4b0e4c3 Fix @links in reference docs. am: 54de77470d am: ab978c035e am: 28ba4722a9
am: 9b21265b2c

Change-Id: If246ebdb36cf2832d5a6c42cbe752e290b6fb6e8
2017-01-26 04:49:33 +00:00
Elliot Waite
9b21265b2c Fix @links in reference docs. am: 54de77470d am: ab978c035e
am: 28ba4722a9

Change-Id: I98177a8cf0a20677e140406bb7371474ca259e5b
2017-01-26 04:44:54 +00:00
Elliot Waite
28ba4722a9 Fix @links in reference docs. am: 54de77470d
am: ab978c035e

Change-Id: If0d0613362e0ea95cf48eaf9a16d3eea48b589ea
2017-01-26 04:39:57 +00:00
Elliot Waite
ab978c035e Fix @links in reference docs.
am: 54de77470d

Change-Id: Id38c30bad13d6b61ed504a06471b9f197b360f7b
2017-01-26 04:34:57 +00:00
TreeHugger Robot
b66cfe8a88 Merge "Added support to authentication." 2017-01-26 01:35:39 +00:00
Elliot Waite
54de77470d Fix @links in reference docs.
Change-Id: I40cea46efd80c448640ff69753698fe8404da40b
2017-01-25 17:00:55 -08:00
Robert Carr
838120c9db Expose Java side for parenting SurfaceControl
Proposed by itself so others can experiment.

Test: Native side covered by SF Transaction test. Java side tested manually for now.
Change-Id: I44cf3acd65480bfe14e26db83e905f3ade73f7e0
2017-01-25 15:13:17 -08:00
John Reck
04b926a68b Merge "Overhaul RenderNode's DisplayList management" 2017-01-25 23:11:30 +00:00
Romain Guy
408afbf060 Change configuration's color mode based on the display's color mode
Bug: 32984164
Test: CtsContentTestCases

Change-Id: Iedc7d1cc488b80718576082667b6e96956c4f847
2017-01-25 14:43:36 -08:00
Vladislav Kaznacheev
3787de16d2 Implement pointer capture API
When in pointer capture mode, mouse pointer disappears and
further mouse events are dispatched to the focused view
in the window which has requested capture.

The captured events have the source SOURCE_MOUSE_RELATIVE
belonging to SOURCE_CLASS_TRACKBALL. They are
dispatched through dispatchCapturedPointerEvent /
onCapturedPointerEvent. There is also a new listener.

Pointer capture mode may only be granted to a currently
focused window, and will be canceled upon a window focus change.

Test: cts-tradefed ... --test android.view.cts.PointerCaptureTest
Bug: 30897034
Change-Id: I6e5934aa415ac2b6dda1cee173d0f23e5021af84
2017-01-25 13:13:45 -08:00
Abodunrinwa Toki
e363f427f8 Merge "Implement TextClassifierImpl.getLinks" 2017-01-25 21:05:03 +00:00
Felipe Leme
436ab6a91d Added support to authentication.
AutoFillService can now require user authentication, both at
FillResponse and Dataset levels;
- FillResponse authentication is typically used when the user data
  need to be unlocked before the first use.
- Dataset authentication is typically used to unlock sensitive data
  such as credit card info.

The authentication can be handled by the service itself (for example,
when it uses the credit card CVV to unlock it) or by the Android
system (when the service asks for fingerprint authentication).

Bug: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: If62f42f697ab5ef0d14d991ff1077d1c38808e61
2017-01-25 13:03:32 -08:00
John Reck
2de950d5a8 Overhaul RenderNode's DisplayList management
* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
  ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
  to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
2017-01-25 12:24:40 -08:00
TreeHugger Robot
000f7cd646 Merge "Initial IME integration." 2017-01-25 19:44:33 +00:00
Vladislav Kaznacheev
4db5dedb76 Revert "Revert "Remove View.setTooltip/getTooltip""
This reverts commit c56c7462ef.

Change-Id: Id129d099e3579b2c51d77c1fee25816ba3bd9df7
2017-01-25 19:24:15 +00:00
Evan Rosky
df7f283520 Merge "Changed cluster kb navigation shortcut to meta+[shift]+tab" 2017-01-25 19:04:22 +00:00
Felipe Leme
3461d3c069 Initial IME integration.
- Created an AutoFillManager class, which provides methods to show
  the auto-fill bar for views and virtual nodes.
- Automatically launches an auto-fill request when the IME is shown
(and an AutoFillService is set for the given user) on TextViews.
- Updated VirtualNodeListener to use this new API.

BUG: 31001899
BUG: 34171325
Test: CtsAutoFillServiceTestCases passes
Test: manual verification

Change-Id: Id72ce97da70217081b5823cfc7b138412634fcf3
2017-01-24 17:57:16 -08:00
TreeHugger Robot
01e4eeb0e8 Merge "Added StackWindowContainerController" 2017-01-25 01:25:19 +00:00
TreeHugger Robot
e84ad491c8 Merge "Add color mode to activity/window" 2017-01-25 01:20:28 +00:00
Romain Guy
4832745b84 Add color mode to activity/window
The color mode lets an application request a wide color gamut for
a specific window. This will also be used in the future to request
HDR. The color mode is currently either default (sRGB) or an undefined
wide gamut color space chosen by the platform. These attributes could
later be used to choose a specific color space if we deem this important
or useful.

This change also renames the various "colorimetry" attributes and
constants to "color mode" for consistency. These symbols were
added in O and can be safely renamed.

Test: CtsColorModeTestCases
Bug: 32984164
Change-Id: I4d4691dd12dbe3f3aa6a5cf893cff39aa16c739e
2017-01-24 15:55:09 -08:00
Abodunrinwa Toki
6b76675248 Implement TextClassifierImpl.getLinks
This is a simple implementation of getLinks that works. I plan to
improve on the algorithm later.

Bug: 34661057
Test: See: Ic2a5eceeaec4cd2943c6c753084df46d30511fee
Change-Id: Icb9d4678e19a72ff89556dcaef5940ffab5d95d5
2017-01-24 15:51:33 -08:00
Wale Ogunwale
1666e317dc Added StackWindowContainerController
For linking ActivityStack in AMS to TaskStack window container in WMS.

Change-Id: I8b9eaef49e62854d59b22d27f80f5935a5a4d7fc
Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.StackWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
2017-01-24 15:23:37 -08:00