Commit Graph

12686 Commits

Author SHA1 Message Date
Tracy Zhou
966860dbae Merge "Implement the new PiP animation (fade-in)." into qt-dev 2019-04-09 21:06:28 +00:00
Tracy Zhou
9c675d4f4b Implement the new PiP animation (fade-in).
The new fully gestural navigation changes how user goes home from an
app as well as the animation of the app transition. The current PiP animation (bounds) is not compatible with the new model because of the direction of movements. Instead of animating bounds, we can fade the PiP window in after app closing animation finishes.

Fixes: 122609330
Test: 1. Open youtube, play a video, tap home to observe the new PiP
animation (demo video attached in the ticket b/122609330) 2. With gestural nav on, observe pip transition when swiping up to home.
atest ActivityManagerPinnedStackTests
atest BoundsAnimationControllerTests
atest RecentsAnimationTestTest

Change-Id: I28eeb1aa99c4fd569845ca7a42561f6b20796f9b
2019-04-09 10:37:32 -07:00
TreeHugger Robot
16f682cac6 Merge "Fix InsetsSourceConsumer visibility" into qt-dev 2019-04-09 05:34:11 +00:00
Rob Carr
f8f5f0290e Merge "Careful with screenshots containing secure layers!" into qt-dev 2019-04-09 00:45:22 +00:00
Robert Carr
66b5664f2d Careful with screenshots containing secure layers!
For purposes of	the screen rotation animation the system server	is allowed
to capture secure (not protected) layers and trusted not to persist screenshots
which may contain secure layers. However when displaying the screen rotation animation,
the layer the screenshot is placed on will itself not be secure, so if we record
the animation the recording will contain persisted versions of the secure content. Make sure
we use the new API from SurfaceFlinger to set FLAG_SECURE if our screenshot contains secure
content.

Bug: 69703445
Test: Transaction_test#SetFlagsSecureEuidSystem
Change-Id: I1b016fb1ad56eccd712442a71cc134e5fa3b1ac6
2019-04-08 15:22:46 -07:00
Tarandeep Singh
fb1689f1be Fix InsetsSourceConsumer visibility
It seems we mistakenly removed[1] leash visbility transaction from
InsetsSourceConsumer#setVisible() method causing tests to fail.

[1] I47b3d3b430fa38f80203276b9984df1f71008f6e

Change-Id: I370805a5a5bdceda4bd363c66376a8975c5ea669
Merged-In: I370805a5a5bdceda4bd363c66376a8975c5ea669
Fix: 128537917
Test: atest InsetsSourceConsumerTest
(cherry picked from commit 9602bd62bd)
2019-04-08 20:43:12 +00:00
Qasid Ahmad Sadiq
7bcdd702c9 Revert "Depecrate flags, and try to match them to actions"
This reverts commit 063eefa78a.
The problem with this fix is that services expect to be able to
determine if a node has certain capabilities, even if it is disabled,
and doesn't have the action associated with them.

Change-Id: Ia17ed6ed5f92737226cfe704dc71957f2ae5541b
Fix: 120247282
Test: it builds.
2019-04-05 19:47:41 +00:00
Rob Carr
f6bd0bc297 Merge "SurfaceFlinger: Add exclusion list for captureLayers." into qt-dev 2019-04-05 18:47:40 +00:00
TreeHugger Robot
96aaa9f237 Merge "Fix metadata surfacecontrol api/jni" into qt-dev 2019-04-05 18:33:24 +00:00
TreeHugger Robot
08f5841707 Merge "Add getTextClassifier perf test" into qt-dev 2019-04-05 18:04:23 +00:00
Evan Rosky
b51e246143 Fix metadata surfacecontrol api/jni
This was wrong

Bug: 122925737
Test: Using setMetadata doesn't crash anymore
Change-Id: I75216ca9778e356b3f2a76555367e2563d9a29e0
2019-04-05 16:22:56 +00:00
TreeHugger Robot
3b74731f4e Merge "Flag to configure model parameters" into qt-dev 2019-04-05 15:52:17 +00:00
Tony Mak
20fe187bdf Flag to configure model parameters
The objective is to allow us to push model parameters by using a settings flag,
without the need of pushing a new model file.

Settings.Global#TEXT_CLASSIFIER_ACTION_MODEL_PARAMS stores a comma
separated string that contains these three fields:
1. required_model_version
2. required_locales
3. serialized_preconditions

To ensure serialized_preconditions is applied to the target model file,
TextClassifierImpl only applies the serialized_preconditions when
required_model_version and required_locales are both met.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: adb shell settings put global text_classifier_action_model_params 'required_model_version=0,required_locales=en,serialized_preconditions=FAAAAAAADgAIAAAAAAAAAAAABAAOAAAAAAAAAA=='
      Observe that the flag is actually applied in the model.
Test: Ensure that finalize is called when the activity is dead.

BUG: 123616497

Change-Id: Ie42dcfeee705c83bbb693a5c1a0fedd0821df5e7
2019-04-05 14:35:13 +01:00
TreeHugger Robot
f8aeee04c3 Merge "Stores serialized entity data to the extras" into qt-dev 2019-04-05 13:26:20 +00:00
John Reck
0c7027d86b Add draw props back to greylist
Bug: 129957634
Test: none
Change-Id: Iaf2d7f8dc0f5d6f1b0dc12025210820bf8255f67
2019-04-04 18:05:10 +00:00
Robert Carr
ffcdc51319 SurfaceFlinger: Add exclusion list for captureLayers.
Among other use cases, WM needs to be able to omit the IME from Task Snapshots, even while it
is on-screen.

Bug: 126614127
Test: Transaction_test.cpp#CaptureLayerExclude
Change-Id: I055d99106c9ce2ed90d64eca06961d88cbd5e2d4
2019-04-04 09:23:47 -07:00
Tony Mak
751afc9821 Add getTextClassifier perf test
This helps us to evaluate the fix.

BUG: 129695635

Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh

Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
2019-04-04 17:09:58 +01:00
Tony Mak
fdb3554e5e Stores serialized entity data to the extras
libtextclassifier (native side) will serialize the extra entity information
(like parsed datetime) into a byte array and passed it to framework.
Framework puts it to the extras Bundle of result object, i.e. TextClassification
and ConversationActions.

In the future, we will provide a library (maybe AndroidX) to deserialize the
string and return structured objects.

BUG: 129119759

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

Change-Id: I8091a1038691419825f5d6da3562b8ba81787dc7
2019-04-04 10:24:34 +00:00
Jorim Jaggi
a6aabacbb5 Force app to draw navigation bar background
For gestural navigation, having a small bar drawn by SystemUI
looks really really weird. Since we force the status bar
background to be drawn in the client, we can also force the
navigation bar background without expecting any compat issues.

Bug: 129751541
Test: Open legacy app, ensure black is drawn in the client
Change-Id: I9cd4c5dd799324ff10bf9d28750e8f238ab1e459
(cherry picked from commit 461bb11371)
2019-04-04 07:27:10 +00:00
TreeHugger Robot
7e3051ca4e Merge "Fix NPE in RNA#callOnFinished" 2019-04-03 22:06:55 +00:00
Nicolas Geoffray
5d5972263f Merge "Use Class.forName instead of ClassLoader.loadClass." am: dc489aba0e am: 1b7fb8f7ae
am: cb6605192c

Change-Id: I953c2bb97dda4ca654e552d58bf56d884d609fc0
2019-04-03 14:22:03 -07:00
Nicolas Geoffray
cb6605192c Merge "Use Class.forName instead of ClassLoader.loadClass." am: dc489aba0e
am: 1b7fb8f7ae

Change-Id: I41141b6fc6934faf086ea930b19539a0daba8298
2019-04-03 13:14:39 -07:00
Nicolas Geoffray
7ef8030754 Use Class.forName instead of ClassLoader.loadClass.
Class.forName has a fast path that ClassLoader.loadClass doesn't
have yet.

Bug: 129834244
Test: m
Change-Id: I52427be9dae5acd8eef530f706626246d16dc82a
2019-04-03 10:32:49 -07:00
TreeHugger Robot
ffd5fb6954 Merge "Support content description with app name" 2019-04-03 16:30:08 +00:00
Michael Wright
89df2a72f7 Merge "Expose input region monitoring to system components." 2019-04-03 16:04:03 +00:00
Tony Mak
15b64be1f4 Support content description with app name
The logic is like:
1. If content description string with app name placeholder is available,
   and we also have a app name, then we will use this string.
2. Otherwise, fallback to content description string without app
   name placeholder.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: Actually see the content description with app name is formatted
      properly

BUG: 128541828

Change-Id: Iee1dc8d4a429d759d9ab3f4b84dc1ad13b698cdb
2019-04-03 14:06:47 +01:00
Michael Wright
c7995239ef Expose input region monitoring to system components.
This is to allow SysUI to detect system-wide gestures.

Test: manual
Bug: 123748692
Change-Id: Ic1e2cd6afea219d0e20b29e7150c9a42b75c7a67
2019-04-03 13:46:30 +01:00
TreeHugger Robot
a50bed00f3 Merge "SurfaceView: Correct comparison operator." 2019-04-02 18:14:53 +00:00
Chavi Weingarten
ace4f6a018 Merge "Remove closeTransactionSync since it's no longer used." 2019-04-02 17:12:07 +00:00
John Reck
6bb881fb45 Fix NPE in RNA#callOnFinished
Fixes: 129024198
Test: guess
Change-Id: I1c073c8bada086376fa849946b949225c5d1d977
2019-04-01 16:28:23 -07:00
John Reck
bcc0b914e3 Fix performance regression in textclassifier
DeviceConfig is far too slow to be used here, so
disable it.

Test: trace calculator launch
Change-Id: I6b7ab56e4015448ee068deb49e7f6fa133fea53c
2019-04-01 16:00:24 -07:00
Robert Carr
57f026191e SurfaceView: Correct comparison operator.
We show the background when the Surface view is BEHIND
not when it is in front.

Bug: 129359905
Test: SurfaceViewSurfaceValidatorTest#testOnTopHasNoBackground
Change-Id: I3f3139d50972626e4c70139f1008d70d2935cd0b
2019-04-01 15:27:26 -07:00
John Reck
a3151aa9eb Merge "Disable checkThread temporarily" 2019-04-01 20:11:16 +00:00
Jorim Jaggi
671aa4d618 Merge "Immediately start drawing when becoming visible" 2019-04-01 19:21:34 +00:00
John Reck
52efe835f1 Disable checkThread temporarily
Bug: 129679214
Test: none
Change-Id: I58aa7110ee2ed18e7258e4c044ebe2a6e670aa8c
2019-04-01 11:54:01 -07:00
TreeHugger Robot
d4bc280d16 Merge "Gesture Exclusion: Fix crash when exclusion updates after detaching window" 2019-04-01 18:04:52 +00:00
Philip Quinn
5be044f37d Write touch classification metrics.
Bug: 111480215
Bug: 123663806
Test: statsd_testdrive 177

Change-Id: I44f0a1877acc38b3199dcc6a3b6d4bf00ac8d817
2019-04-01 17:01:02 +00:00
TreeHugger Robot
90cd3d6d48 Merge "Restrict access to private flags." 2019-04-01 16:28:54 +00:00
Jorim Jaggi
4840240055 Immediately start drawing when becoming visible
There was some old outdated logic about aborting draw if we have a
new surface. This isn't needed anymore and actually can cause up
to 5-10ms first draw delay for apps.

Test: AM/WM Presubmit CTS tests
Bug: 126612374
Bug: 123643797
Change-Id: I73d354efaee099e6a1ca1557e79440dc16e4976f
2019-04-01 16:26:30 +02:00
Adrian Roos
11dfd279a3 WindowInsets: populate system gesture and tappable element insets
Also fixes an infinite recursion when invoking
TestableContext.(un)registerComponentCallbacks().

Test: atest WindowInsetsPolicyTest
Bug: 126511573
Change-Id: I5c9f40054493a83746bce6124d72412e8eb8a0d1
2019-04-01 15:46:13 +02:00
TreeHugger Robot
cbc7969813 Merge "Add attr documentation for a couple accessibility attributes" 2019-03-29 22:59:34 +00:00
TreeHugger Robot
dd39518c07 Merge "Stop window redraws for invisible parent children" 2019-03-29 22:04:43 +00:00
Jorim Jaggi
338efa6092 Merge changes I95328c6b,I109cead7,I82b5a778,I352a3213
* changes:
  More random optimzations to make things go faster
  Don't compare configs during layout
  Get rid of some ancient logic around layouting invisible windows
  Window Manager spring cleaning
2019-03-29 22:01:13 +00:00
John Reck
368b384c88 Merge "Add missing checkThread" am: fdb8dfdadf am: 67793b0eec
am: 9117b1371f

Change-Id: I1a6cc8d995dad4e2ac06f046a693bdace767d79b
2019-03-29 14:59:45 -07:00
John Reck
9117b1371f Merge "Add missing checkThread" am: fdb8dfdadf
am: 67793b0eec

Change-Id: Ia8f3182a1d765937a5901cf6f9063ba8c84eb258
2019-03-29 14:48:24 -07:00
Treehugger Robot
fdb8dfdadf Merge "Add missing checkThread" 2019-03-29 21:18:10 +00:00
John Reck
78704efc3a Add missing checkThread
Fixes: 129362490
Test: none
Change-Id: I9429b48291908db7021ad10a18ef3180c7e83bf9
2019-03-29 10:26:01 -07:00
Jorim Jaggi
4981f15bd4 Window Manager spring cleaning
Our performance for wmLayout + prepareSurfaces regressed over
time, because we added a lot of functionality, but didn't have
fine grained perf tests enough to catch it.

This CL tries to attempt to undo that damage by optimizing various
things that regressed or didn't regress, but could still be
optimized.

Test: Presubmit tests + capture trace during wmRelayout
Bug: 129389526
Change-Id: I352a3213f074377bd10721d16535c1e27fb2e746
2019-03-29 16:00:13 +01:00
Felipe Leme
5a5b6c38f5 Merge "Checks package name belongs to called UID on some content capture methods." 2019-03-29 14:52:02 +00:00
Mihai Popa
4add16c4b8 Stop window redraws for invisible parent children
Bug: 69046604
Test: atest CtsViewTestCases:android.view.cts.ViewTest
Change-Id: If9f2d4212d613cb7122806adb31ad7ad875c8e45
2019-03-29 12:51:00 +00:00