Commit Graph

10961 Commits

Author SHA1 Message Date
Adrian Roos
90c27c332a Merge "DisplayCutout: Add xml wrapper for layoutInDisplayCutoutMode" 2018-03-01 13:57:22 +00:00
Abodunrinwa Toki
fa6d6d963b Merge "Add TCM.getTextClassifier(int type)" 2018-03-01 06:38:24 +00:00
TreeHugger Robot
8e1522197a Merge "Remove RemoteSurfaceTrace functionality." 2018-03-01 04:21:25 +00:00
Dake Gu
467b444d0a Merge "autofill: touch on IME should not close autofill" 2018-03-01 02:40:03 +00:00
TreeHugger Robot
8006a272da Merge changes I5c2facba,I2fecbeaa,I045ddf19,I961d190d
* changes:
  Move frame validation logic for deferTransactionUntil.
  Handle surfaceInset changes with deferred transactions.
  Various pinned animation bug fixes.
  Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset.
2018-03-01 02:06:40 +00:00
Dake Gu
b0fa378f9d autofill: touch on IME should not close autofill
ag/3434666 causes a regression:
Before ag/3434666, autofill gets touch event after IME, autofill
close itself if it gets ACTION_OUTSIDE touch event.
But after ag/3434666, autofill intercepts touch events before IME, if
user touches within IME, autofill still gets ACTION_OUTSIDE event,
and close itself unexpectedly.

The fix moves the closing code to ViewRootImpl.EarlyPostImeStage
around the same place closing tooltip.

If user taps outside autofill window, we will force to close window,
even last autofillid that requestShowUi does not match.

Bug: 73796497
Test: atest CtsAutoFillServiceTestCases
Test: Added LoginActivityTest.testAutofillTapOutside
Test: manually tested using IME and sample app
TODO: need a fake IME service to dispatch given key upon touch.

Change-Id: I10fc0d29dc30d29a48b2118264ec1c4375062deb
2018-02-28 16:10:07 -08:00
Abodunrinwa Toki
c7073a4b05 Add TCM.getTextClassifier(int type)
Bug: 72747726
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationConstantsTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: I0d6cb5eaf3f9baa0564672c4d4b680fb00f40a51
2018-03-01 00:00:16 +00:00
TreeHugger Robot
4a62ce9da7 Merge "Restore AutofillId when view is restored from a bundle." 2018-02-28 23:41:45 +00:00
TreeHugger Robot
23bb050575 Merge "Associate TCconstants with the TCM instead of TCImpl" 2018-02-28 22:34:58 +00:00
Robert Carr
024378c5ae Move frame validation logic for deferTransactionUntil.
Currently it's only in place applying for operations on the global transaction.

Bug: 70666541
Test: Manual
Change-Id: I5c2facba14c783bad0d3aca0e8b66fea73df0776
2018-02-28 11:44:55 -08:00
Robert Carr
c6d5af556e Handle surfaceInset changes with deferred transactions.
First we have the client pass up the next frameNumber from relayoutWindow
and then we simply deferTransactions at the WindowState level until
this frame number is reached. This was always a little terrifying
because deferring transaction effecftively meant we gave up
control of the surface until the frame number was reached. However now
we can still control the surface from the stack and other SurfaceControl
nodes and so the window can still be moved around and animated even if
the client is unresponsive.

Bug: 70666541
Test: Manual. go/wm-smoke
Change-Id: I2fecbeaa30fc0eb9cc8f08e1ea734dcc65da0aa0
2018-02-28 11:44:14 -08:00
Felipe Leme
5116bfa09f Restore AutofillId when view is restored from a bundle.
Test: atest \
      CtsAutoFillServiceTestCases:android.autofillservice.cts.MultiWindowLoginActivityTest \
      CtsAutoFillServiceTestCases:android.autofillservice.cts.DuplicateIdActivityTest \
      CtsAutoFillServiceTestCases:android.autofillservice.cts.SessionLifecycleTest
Test: atest CtsAutoFillServiceTestCases # Although it has unrelated failures

Fixes: 73950415
Fixes: 73963360

Change-Id: I60e882d856b5623c3ee4de9ed8dae8dad8dc0f65
2018-02-28 11:19:07 -08:00
Julia Reynolds
fc64001126 Tag foreground notis that use certain services
- Draw over other apps
- Camera
- Microphone

The icons are not yet clickable, and the system 'drawing over
other apps' notification still appears even when the app's
notification is tagged.

Test: runtest systemui
Bug: 64085448
Change-Id: Ib3b0cdd9adced82f562f256cb81af80dc395440d
2018-02-28 18:48:58 +00:00
TreeHugger Robot
5ef4247352 Merge "Revert "Update A11y action serialization to use longs"" 2018-02-28 17:08:47 +00:00
TreeHugger Robot
2f3adb4d27 Merge "Revert "Elevate remote/recents animation priority"" 2018-02-28 16:25:31 +00:00
Adrian Roos
2292031e3d DisplayCutout: Add xml wrapper for layoutInDisplayCutoutMode
Allows native apps to request a layoutInDisplayCutoutMode without
having to implement a custom NativeActivity subclass.

Change-Id: I0b7fd4624e89fabe177462d615360442f72a1e11
Fixes: 73807928
Test: atest PhoneWindowTest
2018-02-28 16:43:16 +01:00
Artem Iglikov
5e97621c97 Revert "Update A11y action serialization to use longs"
This reverts commit 54549163b0.

Reason for revert: breaks tests, b/73997494

Bug: 73997494
Change-Id: I122c260898277d876c019554cb92351ac13a9eb0
2018-02-28 15:07:31 +00:00
Abodunrinwa Toki
db8fc314d2 Associate TCconstants with the TCM instead of TCImpl
Also updates flags list.

Bug: 72946306
Bug: 72946123
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationConstantsTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: I8af9d3d1da01836fbadcbbf6ce7c1c0db7456a05
2018-02-28 14:35:49 +00:00
Jorim Jaggi
a8b48ab733 Revert "Elevate remote/recents animation priority"
This reverts commit 574aea0f1b.

Reason for revert: Crashes sometimes (chaselist issue)

Change-Id: I1440ef7a002e85c3e020d424f13073ca2516dd9c
Fixes: 73991490
2018-02-28 14:03:08 +00:00
Robert Carr
7ea0cc485d Remove RemoteSurfaceTrace functionality.
Only used by a test which is now deleted. Obsoleted by protobuf
tracing.

Bug: 70693884
Test: Boots
Change-Id: I3bc95880afc0e72bb05640cdd18a916fbb664eae
2018-02-27 15:58:37 -08:00
TreeHugger Robot
d3d139ab1e Merge "Elevate remote/recents animation priority" 2018-02-27 13:49:27 +00:00
Phil Weaver
f75cd84398 Merge "Update A11y action serialization to use longs" 2018-02-27 04:13:57 +00:00
TreeHugger Robot
255ed5cbdc Merge "[Magnifier-26] Wire up frame callback for realsies" 2018-02-27 02:13:46 +00:00
TreeHugger Robot
c6f9c1b9fd Merge "Allow TouchDelegate to forward non-primary pointer" 2018-02-26 23:49:23 +00:00
Phil Weaver
54549163b0 Update A11y action serialization to use longs
Change-Id: If1c903cdf43e8fed0d22a823dcd28e1c08b6267e
Fixes: 73897184
Test: Updating test (which was failing) to use long.
2018-02-26 14:41:49 -08:00
Mihai Popa
9568800d90 [Magnifier-26] Wire up frame callback for realsies
Test: none yet
Bug: 73810478
Bug: 72041926
Change-Id: I7154ed4b3d2cd820dc8c8ff55eed130be87d1606
2018-02-26 11:23:27 -08:00
TreeHugger Robot
6dcc9de2fe Merge "New APIs to let app developers manage autofill semantics when reusing views." 2018-02-23 18:26:36 +00:00
Jorim Jaggi
574aea0f1b Elevate remote/recents animation priority
If we have another process running a remote animation, we need to
elevate its scheduling priority in order to achieve a smooth
animation. To do that, we set the priority as if it would be the
top app.

Test: go/wm-smoke
Test: Capture trace, open/close apps/recents, inspect priority in
trace.

Change-Id: Ia167eeff95700d86e96e96a984099f1e28040b59
Fixes: 73555925
2018-02-23 15:14:46 +01:00
Dake Gu
09571f8943 Merge "autofill: pass keyevent from fillui to app" 2018-02-23 01:35:55 +00:00
Phil Weaver
cfd17093cd Merge "Use accessibility pane API in keyguard" 2018-02-23 00:31:48 +00:00
Felipe Leme
42b9793d0f New APIs to let app developers manage autofill semantics when reusing views.
From the Autofill workflow point of view, each view has an unique AutofillId
that is used to semantically, semantically identify the view. Currently, once
the View's AutofillId is set it cannot be changed, which make it hard to reuse
views for optimization (for example, in a RecyclerView).

This change introduces 2 new APIs (View.setAutofillId() and
Activity.getNextAutofillId()) that let app developers reuse views without
breaking their logical autofill semantics.

Fixes: 73555342

Test: atest CtsAutoFillServiceTestCases:MutableAutofillIdTest
Test: atest CtsAutoFillServiceTestCases

Change-Id: I35fe07b10657f17d7b260f90f578ca7a13782a18
2018-02-22 12:47:24 -08:00
TreeHugger Robot
99ef04f717 Merge "DisplayCutout: Cache inflations from resources" 2018-02-22 18:34:37 +00:00
Phil Weaver
7d847b0375 Use accessibility pane API in keyguard
Using the new accessibility pane title API
to identify the pattern, pin, and password unlock
screens.

Bug: 73131182
Test: Verified that accessibility events are properly
sent when unlocking the phone with each of the lock
methods.
Change-Id: I32594f4736b503e7f9e3be96e9f77a84ffcadc54
2018-02-22 09:44:54 -08:00
Jorim Jaggi
00ef1483df Merge "Add ability to show wallpaper during animation" 2018-02-22 16:10:56 +00:00
TreeHugger Robot
02e2518f5b Merge "Make default entity lists flag configurable" 2018-02-22 16:08:51 +00:00
Jorim Jaggi
82c1786e2c Add ability to show wallpaper during animation
In the new task switch animations, we'd like to show the wallpaper
behind. For that, we add the ability to show the wallpaper for
any animation via Animation.showWallpaper as an XML attribute.

If the window of an app is animating, and the animation requests
the wallpaper, it can also be a wallpaper.

One remaning issue here is that we don't wait for the wallpaper
to be drawn when waiting for the transition. However, usually this
isn't an issue because the wallpaper is drawn in any case.

To fix this we'd need to load the animation already and then make
it a target before the animation starts, which is a bit involved
/quirky.

Test: Open/close task, observe wallpaper behind
Test: go/wm-smoke
Bug: 72396815
Change-Id: I676273a4e6627f8b5e0a1366fcd80a7c92018123
2018-02-22 14:57:55 +01:00
Adrian Roos
8d13bf132c DisplayCutout: Cache inflations from resources
Caches inflations from resources if the parameters did  not
change. This increases the hitrate of the rotation variants
cache in window manager, and avoids unnecessairy reinflations
whenever the display changes.

Change-Id: I2ed9a2c259158bf1a6b551b3422534efbfec99c9
Bug: 72444324
Test: atest DisplayCutoutTest
2018-02-22 13:27:31 +01:00
Mihai Popa
acd4e6de6e Merge changes from topic "magnifier_sync_movement"
* changes:
  [Magnifier-24] Add completion callback TestApi
  [Magnifier-21] Rate-limit drawings to renderer
  [Magnifier-20] Raw Surface instead of PopupWindow
2018-02-22 12:03:01 +00:00
Jan Althaus
0aacdb665c Make default entity lists flag configurable
Bug: 73277686
Test: bit CtsViewTestCases:android.view.textclassifier.cts
CtsTextTestCases:android.text.util.cts
FrameworksCoreTests:android.view.textclassifier
Change-Id: I84be54fb407088ee25c3ba2d4d62708a898621ad
2018-02-22 12:55:29 +01:00
TreeHugger Robot
b3d049c20f Merge "Adding logging for generateLinks" 2018-02-22 11:31:29 +00:00
TreeHugger Robot
2cb882d61a Merge "Rename HardwareLayer -> TextureLayer" 2018-02-22 04:30:27 +00:00
John Reck
9d8d99de97 Rename HardwareLayer -> TextureLayer
Update name to reflect meaning/usage

Change-Id: Iddb3621cbca147f96faa83380867baa49c382aab
Fixes: 20461288
Test: builds & boots
2018-02-21 15:55:58 -08:00
Lukas Zilka
f8c36bffb8 Updates the name of the native library wrapper class, adds options and removes hints.
Test: Built, tested on device, CTS passes.

bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest

Change-Id: I7c70427d28bec8218935ed45a39819b2ece8112a
2018-02-22 00:37:02 +01:00
Dake Gu
6a20a194dd autofill: pass keyevent from fillui to app
Since autofill window was made to have window focus, app lost the
ability to accept physical keyboard typing. User can no longer
type on physical keyboard to filter autofill result.

This CL dispatches unhandled keyevent(e.g. A/B/C) from autofill
window to app ViewRootImpl in a similar way InputMethodService
dispatches keyevent to app's ViewRoot.

The unhandled key is sent to app window's ViewRootImpl
PreImeStage so that the keystroke could be translated to CJK by IME.

This CL does not affect fullscreen autofill window for TV  where app
window is fully covered: user has to close fullscreen autofill window
first.

Bug: 72951156
Test: atest CtsAutoFillServiceTestCases:LoginActivityTest

Change-Id: I8e50cfdfe8d5691d2b248d85f924c38488ca30f4
2018-02-21 13:56:39 -08:00
TreeHugger Robot
00ddbbc8c3 Merge "Don't end transitions on a detached window, prevent crash in WindowId" 2018-02-21 21:26:36 +00:00
TreeHugger Robot
f66699314c Merge "Use structural equality for A11yNodeInfo#mChildNodeIds" 2018-02-21 20:59:21 +00:00
Mihai Popa
8b78910635 [Magnifier-21] Rate-limit drawings to renderer
Previously, we would make a renderer draw whenever a pixel copy
completes. Because of this happening more than once per view frame,
magnifier frames were being dropped or queued up and displayed later,
which was consequently leading to the magnifier movement getting out of
sync with the updates to its content.

This CL changes the magnifier to be rendered from a draw job post'd to
the UI thread queue. This way, multiple magnifier updates (the ones
already pending in the UI thread queue when the draw job is added) are
batched together in a single draw, naturally rate-limiting the draws we
send to the magnifier renderer by the number of frames of the magnified
view - this only holds when the user of the magnifier sends updates as a
result of user interaction or when the magnified view is drawn.

Also, previously the pixel copy finished events were post'd to the UI
thread. Since they were not post'd as async messages, they would have to
wait at frame barriers before being executed. This CL creates a
dedicated thread for them to be post'd, to avoid this from happening.

Bug: 72041926
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I89563a341a74e958f903eff2d470c6c33fb203ef
2018-02-21 18:29:38 +00:00
Narayan Kamath
81945916f1 Merge "Remove uses of libcore.util.Objects.hashCode / equals." 2018-02-21 09:34:42 +00:00
Richard Ledley
d173506597 Merge "Replace Entity Presets with hints and an explicit factory." 2018-02-21 09:33:05 +00:00
Jan Althaus
31efdc385c Adding logging for generateLinks
Bug: 67629726
Test: Added test and manually verified end-to-end
Change-Id: If5d20b7102b875a898a2fb897b624773554c9083
2018-02-21 09:35:31 +01:00