Commit Graph

8564 Commits

Author SHA1 Message Date
Chong Zhang
818b7218c5 DO NOT MERGE -- Only use saved surface if started by launcher or moved to front am: 813be138ae am: 9f92bc2602
am: 8673e303a7

Change-Id: I34d205de8f368df05e068548a69448da397d2e41
2016-08-26 23:40:04 +00:00
Chong Zhang
8673e303a7 DO NOT MERGE -- Only use saved surface if started by launcher or moved to front am: 813be138ae
am: 9f92bc2602

Change-Id: I94e29886a23fc829b4608a908df90746a4d794e5
2016-08-26 23:33:27 +00:00
Chong Zhang
9f92bc2602 DO NOT MERGE -- Only use saved surface if started by launcher or moved to front
am: 813be138ae

Change-Id: Id64071882a0b90212b92234a4d0bdc67f2ee5e1a
2016-08-26 23:28:17 +00:00
Chong Zhang
813be138ae DO NOT MERGE -- Only use saved surface if started by launcher or moved to front
Restrict saved surface to launcher start (ACTION_MAIN&CATEGORY_
LAUNCHER), or there is no intent at all (eg. task being brought to
front). If the intent is something else, likely the app is going
to show some specific page or view, instead of what's left last time.

This solves problems like the launcher shortcuts on DeckClock,
each of them is a different intent and will show one specific
view regardless of last states. Another example is Chrome tab
opened directly by action VIEW to open some URL.

(Note that this doesn't solve the problem with Chrome homescreen
shortcuts, it will still start with saved surface (if Chrome
is already open). This is because the shortcut is a trampoline
activity that starts the real chrome tab activity, but when
the trampoline is started, the whole task is already brought
to front, and ChromeTab could become visible with the task
before we actually start it.)

bug: 31055479
bug: 27747315

Change-Id: Id3e61c61ef516b0edc1f174320f02661222f226b
(cherry picked from commit ad24f96def)
2016-08-26 15:41:58 -07:00
Phil Weaver
381e4fdc7c Revert "Dispatch a11y events in separate thread." am: 5de2feab26
am: f0b8302109

Change-Id: I22e5ca5b0ecfd98e89d8546e287be56ec342ce57
2016-08-25 18:15:47 +00:00
Phil Weaver
f0b8302109 Revert "Dispatch a11y events in separate thread."
am: 5de2feab26

Change-Id: I0dcc9172c397dd44888de3295e5a34245b122096
2016-08-25 18:09:50 +00:00
Phil Weaver
1bb2cc8cc3 Merge "Revert "Dispatch a11y events in separate thread."" into nyc-mr1-dev 2016-08-25 18:05:36 +00:00
Phil Weaver
5de2feab26 Revert "Dispatch a11y events in separate thread."
This reverts commit c34649411d.

Dispatching accessibility events in their own thread is causing Chrome and gmail to crash. We've identified two issues: Chrome is allocating strings natively using references that aren't valid outside of their thread, and the text is being set to values that are changed in the UI thread. 

I'm going to resolve these issues on master by making deep copies of the strings, but that change will have its own performance implications.

Since we were bit almost immediately by an unexpected result of this change, and I need to erode its benefit by making deep copies, I think it's a bad bet to push it into MR1.

Bug: 31042124
Change-Id: I6f5c225a9197036db43fd0ac6008447b22617525
2016-08-25 16:31:25 +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
9af5e5b31b Clean up VideoView, SurfaceView constructors
am: 768ca7d19b

Change-Id: Ia3ff40a2c6dbbb2a725bc6306401de3cd662ba33
2016-08-24 18:31:38 +00:00
Alan Viverette
16b8941dba Merge "Clean up VideoView, SurfaceView constructors" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Ned Burns
312a7289dc DO NOT MERGE Cherry-Pick: Add ViewConfiguration.getScaledScrollFactor()
am: a5b41c88ec

Change-Id: I89907ec2fa66229a77f959d8b3459211a4cd0da0
2016-08-23 18:16:55 +00:00
Ned Burns
b8e74df82d Merge "DO NOT MERGE Cherry-Pick: Add ViewConfiguration.getScaledScrollFactor()" into cw-f-dev 2016-08-23 17:52:58 +00:00
Adam Powell
7cc5539a03 Only dispatch window visibility aggregation for targetSdk >= N am: 64e1ba4398 am: 02abbe8d4c
am: ca3a267478

Change-Id: I906793dda8f825882b562ab39822274cb5a0a1c7
2016-08-23 16:39:52 +00:00
Adam Powell
ca3a267478 Only dispatch window visibility aggregation for targetSdk >= N am: 64e1ba4398
am: 02abbe8d4c

Change-Id: I66f8610e52f2aaf06b02fa8d369692fc2f89ee17
2016-08-23 15:33:49 +00:00
Teng-Hui Zhu
0b1ef056cc Correctly report the transparent region am: f8da30dc65
am: 94a2f7e6fd

Change-Id: Ice979b549a74f1e8e59210f2b7c7e5a6f141b9f6
2016-08-23 15:15:06 +00:00
Teng-Hui Zhu
94a2f7e6fd Correctly report the transparent region
am: f8da30dc65

Change-Id: I2fa623c2893a6cea96843f78d46fe753913b6f4d
2016-08-23 14:45:55 +00:00
Adam Powell
02abbe8d4c Only dispatch window visibility aggregation for targetSdk >= N
am: 64e1ba4398

Change-Id: Id2d00bc0ae66cdfca11e34b8f1465e4ce19243dc
2016-08-23 00:17:14 +00:00
Tenghui Zhu
f05765e3c4 Merge "Correctly report the transparent region" into nyc-mr1-dev 2016-08-22 21:56:37 +00:00
Adam Powell
64e1ba4398 Only dispatch window visibility aggregation for targetSdk >= N
Some existing apps treat drawable visibility notifications as a signal
to crossfade from a placeholder to the new image for the purposes of
scrolling onscreen via a recycling collection view or similar. Since
dispatchVisibilityAggregated is now called for window visibility
changes and ImageView informs its drawable of the visiblity change,
the extra call triggers a repeat fade-in in some existing apps when
you return them to visibility.

These apps should pay attention to the second parameter of
Drawable#setVisible, which signals that animations should not restart
in response to a visibility change. Updating to targetSdkVersion=24+
will enable the new behavior.

Bug 30216207

Change-Id: I27ce9f09bc7544863f7f7980c273650949db21cc
2016-08-22 17:47:09 +00:00
Phil Weaver
31f764496f Dispatch a11y events in separate thread. am: c34649411d
am: d4847f282d

Change-Id: I0e55dfc4563418ebe30a690fa2348a8093187fde
2016-08-19 23:08:51 +00:00
Phil Weaver
d4847f282d Dispatch a11y events in separate thread.
am: c34649411d

Change-Id: Ie19da4e16b9bc78574545bbba1d44f28ef065b3d
2016-08-19 22:46:13 +00:00
Ned Burns
a5b41c88ec DO NOT MERGE Cherry-Pick: Add ViewConfiguration.getScaledScrollFactor()
This value is used to convert ACTION_SCROLL axis values into raw
pixel distances.

CP of ag/1333603 from master to feldspar-dev. New method is @hide and
@SystemApi in this version. In master, it's part of the new public
API, but feldspar will launch before O.

Change-Id: I5ee73ebcd183c43939ae8aa157e88489e05d4760
2016-08-19 13:19:20 -04:00
Phil Weaver
c34649411d Dispatch a11y events in separate thread.
Moves the IPCs into a separate thread, where they should affect
jank a lot less.

Bug: 30183085
Change-Id: Ib76159d158e7a867e76cdd5c8ea3a318949fcc5b
2016-08-19 09:22:10 -07:00
Yohei Yukawa
8c8477d036 Make View#isTemporarilyDetached() less confusing am: ed841cbdd7
am: 6bc17c7320

Change-Id: Iec61193cd1d1902aa9aad1ad9ac1d6f4944c748b
2016-08-17 19:55:47 +00:00
Yohei Yukawa
6bc17c7320 Make View#isTemporarilyDetached() less confusing
am: ed841cbdd7

Change-Id: I2df97c1babb9fc515295c527a18d9f88546dfad7
2016-08-17 19:49:01 +00:00
Yohei Yukawa
4aa5325ba8 Merge "Make View#isTemporarilyDetached() less confusing" into nyc-mr1-dev 2016-08-17 19:41:40 +00:00
Chong Zhang
9391bc557c Add new window type TYPE_DRAWN_APPLICATION am: fea963edee
am: 5e09ceb641

Change-Id: I955b985c47ca10a17dec6921af0277d1d6a7431d
2016-08-17 18:22:10 +00:00
John Reck
28f4ee5f7b Fix maps resume being blank am: 03df0834e6
am: 08669fff33

Change-Id: If87b076b6c03b7018485ddd4438aeaac7abd1562
2016-08-17 18:04:21 +00:00
Chong Zhang
5e09ceb641 Add new window type TYPE_DRAWN_APPLICATION
am: fea963edee

Change-Id: If7acf1349b87d4be88a9b4f9fbd984bbd4aca8ad
2016-08-17 17:16:18 +00:00
John Reck
08669fff33 Fix maps resume being blank
am: 03df0834e6

Change-Id: Iad93e1b11e74acf2356d59c271892d6741b53fef
2016-08-17 17:14:23 +00:00
Teng-Hui Zhu
f8da30dc65 Correctly report the transparent region
First, we fix the transparent region computation to use the order as the
drawing. Previously, it is using the tree traverse order, not the draw order.

Second, add the y offset for any view with positive z value, this will allow
some space for shadow.

b/30124573

Change-Id: I98d38261ffd346b762651e087cb243e45fed6952
2016-08-16 15:43:47 -07:00
Chong Zhang
f925b8df92 Merge "Add new window type TYPE_DRAWN_APPLICATION" into nyc-mr1-dev 2016-08-16 19:49:29 +00:00
John Reck
03df0834e6 Fix maps resume being blank
Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

Change-Id: Ib75065d3d75e6141d6cd8f306584f6a569b9907c
2016-08-16 09:44:23 -07:00
Robert Carr
bdbc23bebe Introduce new constant for double tap gesture rotation hint. am: 57d9fbd17f
am: 5f684d92b6

Change-Id: Idf2bb8511e24732018ff59ffbf30f440cb7f9779
2016-08-16 01:44:07 +00:00
Robert Carr
5f684d92b6 Introduce new constant for double tap gesture rotation hint.
am: 57d9fbd17f

Change-Id: I994c15c692ec52160deb3d29b46396802562588a
2016-08-16 01:35:59 +00:00
TreeHugger Robot
b14543d9d8 Merge "Introduce new constant for double tap gesture rotation hint." into nyc-mr1-dev 2016-08-16 01:21:57 +00:00
Chong Zhang
fea963edee Add new window type TYPE_DRAWN_APPLICATION
This type behaves like a normal TYPE_APPLICATION, except that WM
will always wait for it to be drawn before starting a transition.

WM always waits for TYPE_BASE_APPLICATION (main window), but for
TYPE_APPLICATION, it only waits if the window relayouts to visible
and gets a surface before the main window is drawn. If main window
itself is ready very fast, transition could start without the other
window.

bug: 30830849
Change-Id: Ife71a9812db7c8eba6ee4ead10ce4f31d9e93b40
2016-08-15 17:36:40 -07:00
Robert Carr
57d9fbd17f Introduce new constant for double tap gesture rotation hint.
As discussed in ag/1192965/ we have a special case for rotation
animation selection in launch from double tap. This was set to
ROTATION_ANIMATION_CROSSFADE as the goal was just to avoid
ROTATION_ANIMATION_ROTATE on the viewfinder surface and
seamless rotation in launch scenarios was initially descoped. Now we
are aiming at fixing this though, and ROTATION_ANIMATION_CROSSFADE
does not quality for seamless rotation. ROTATION_ANIMATION_JUMPCUT
also would not be a good choice because in the situation that the
rotation occurs before the app starting window appears, then we would
jump cut from unrotated wallpaper to rotated app, I think we want
a crossfade in this scenario. To this end introduce and use a new @hide constant
ROTATION_ANIMATION_SEAMLESS which qualifies for seamless but falls back
to CROSSFADE if seamless can't occur.

Bug: 30171992
Change-Id: If1945b17b5159be4cd5ba0b139d6bea9f7fcca33
2016-08-15 12:25:37 -07:00
Hui Shu
68cee7e245 Fix documentation. am: bd042e666a
am: 440d84f99a

Change-Id: I1d0c75c6692557e1d66ca66036bceda6ca62c702
2016-08-12 23:19:41 +00:00
Hui Shu
440d84f99a Fix documentation.
am: bd042e666a

Change-Id: Ib749bd51c24a2012cd2b0d87ed70c034f410bc58
2016-08-12 21:29:47 +00:00
Hui Shu
caef4afe42 Merge "Fix documentation." into nyc-mr1-dev 2016-08-12 21:24:44 +00:00
Alison Cichowlas
f95418e0cb Add restart to GlobalActions. am: f8eca405c1
am: 091fc718d4

Change-Id: Ib0cc25ec7887366ee65a27aed7497cdbbac861b1
2016-08-12 20:35:27 +00:00
Alison Cichowlas
091fc718d4 Add restart to GlobalActions.
am: f8eca405c1

Change-Id: Ib9664d086e2ac57db905fbfa03329c1a990051fc
2016-08-12 20:18:41 +00:00
Alison Cichowlas
c7d6af6cd0 Merge "Add restart to GlobalActions." into nyc-mr1-dev 2016-08-12 20:12:38 +00:00
Aga Madurska
a78e8d6219 Avoid an NPE while checking view location on screen.
am: a56454645f

Change-Id: I052e1e3f18a1df3a4ef43b87a1709d14eef21df1
2016-08-12 18:18:01 +00:00
Agnieszka Madurska
5e933c1e43 Merge "Avoid an NPE while checking view location on screen." into cw-f-dev 2016-08-12 18:08:25 +00:00
Alison Cichowlas
f8eca405c1 Add restart to GlobalActions.
Update power icon in GlobalActions for consistency
with new restart icon.

Bug: 30395806
Change-Id: I5ab20c15c889384fb685fc678fbf9ed912fcde5d
2016-08-12 13:41:00 -04:00
Aga Madurska
a56454645f Avoid an NPE while checking view location on screen.
Bug:30483148

Change-Id: I115da4fefff5fecc04135e2b150e1e77445cb86e
2016-08-12 18:00:25 +01:00
John Reck
cdbdd46fb3 Fix NPE in TextureView am: 7e237189c2
am: ed1f1399d4

Change-Id: I1166edf4590e2846e6c115cbe9c9455ee46b64b5
2016-08-12 14:39:36 +00:00