Commit Graph

201 Commits

Author SHA1 Message Date
Yuichi Araki
fb6ed353a6 Recycle TypedArrays in Fade and TransitionInflater
Test: Builds
Change-Id: I91e214eafc87850dca6986af2054e5edca46e724
2017-02-10 13:47:36 +09:00
Yuichi Araki
fd62c58ede Merge "Fix doc for setReparentWithOverlay" 2017-02-07 07:35:48 +00:00
Ben Weiss
995f4b5721 Merge "Extract and unhide TransitionListenerAdapter" 2017-02-06 10:16:50 +00:00
Yuichi Araki
3f23b30c63 Fix doc for setReparentWithOverlay
Test: Doc fix only
Change-Id: I8d89be7c87cf95fd2c7799fdd8286acc13102e46
2017-02-03 15:15:13 +09:00
Ben Weiss
5de23c5eb4 Make ArcMotion material spec compliant
Upwards and downwards paths are
now curved in the same direction,
applying "gravity" to objects as they move around.

Test: CTS I40a5df051711fd719806cd88d87eeed68565d73d

Change-Id: I9e5323655dc7901393f90bb1ea2f393ca64b77ff
2017-01-05 11:43:04 +00:00
Ben Weiss
e0c37bdea3 Extract and unhide TransitionListenerAdapter
Test: CTS tested

Change-Id: I8db99d5f212b15db70ee5a6d6debf25d7ad7922d
2016-11-17 10:50:34 +00:00
George Mount
f0b46b9540 Use safe access to OnPreDrawListener.
Bug 32472451

It is important to remove an OnPreDrawListener from the correct
ViewTreeObserver. When a View is added to the view hierarchy, the
initial ViewTreeObserver is not active. The listener must then be
removed from the current OnPreDrawListener. When a View has been
removed from the hierarchy, it is important to remove the listener
from the orignal ViewTreeObserver.

Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsUsageStatsTestCases
Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsFragmentTestCases

Change-Id: I735f71d2d9c84e86ef846aab0088a8651300fbe8
2016-11-15 15:00:53 -08:00
Aurimas Liutikas
67e2ae8639 Fix import statement in view|transition|animation packages.
This change also remove trailing whitespace.

Test: code still compiles
Change-Id: I7eff4546320d67d2bae58d31bad0625ea0791b8f
2016-10-12 09:09:52 -07:00
George Mount
d0549f2e90 Fix TransitionManager.go with null Transition.
Bug: 31529500

Test: I8e5a3285bc5e2b34a1eb32afd67e3184c6d8897e
Change-Id: Ibf273d5acab4e32420093adc395034b2246bd530
2016-09-20 15:19:03 -07:00
TreeHugger Robot
50b2c2444c Merge "Return proper values from ChangeScroll.getTransitionProperties" 2016-06-27 18:39:14 +00:00
George Mount
ae61b85cb5 Return proper values from ChangeScroll.getTransitionProperties
Bug 29644621

Change-Id: I9035e94582d05889a00df61f84de46d782baea17
2016-06-24 17:29:21 -07:00
George Mount
f239f99113 Make getTransition a @TestApi for CTS tests.
Bug 29570647

Change-Id: I85b2b215fbad2ca72e67b17a29cc9b122ae5945e
2016-06-24 11:53:42 -07:00
George Mount
25f98a4c01 Remove TransitionListener after transition completes.
Bug 22232371

Change-Id: I1ba6f8742792ff00996b7fdaa892d5e1388ef61c
2016-06-14 14:11:28 -07:00
George Mount
e6b23b6ab9 Merge \\"Re-add Internal API for cross-task Activity used by assistant.\\" into nyc-mr1-dev am: 174e41b1fd
am: dff1fa4bb9

Change-Id: I76afa8d89b2ac1624a36b3114bd3891c9c734cee
2016-06-08 20:39:54 +00:00
George Mount
413739e8c6 Re-add Internal API for cross-task Activity used by assistant.
Bug: 29091742

This reverts commit 563df3b328.

This also fixes the problems experienced by b/29128683.

Change-Id: I8e3d485cb818ea9e03ca475cba88934f6f903f11
2016-06-08 07:13:37 -07:00
Eino-Ville Talvala
d9a7b1e07b Merge "Revert "Internal API for cross-task Activity used by assistant."" into nyc-mr1-dev am: fe3ecdab1b
am: abb7488998

* commit 'abb74889982603f6070100033c8fa2b1eef3d8de':
  Revert "Internal API for cross-task Activity used by assistant."

Change-Id: Id397afe9221e2562e096befc1b105233618ca7ef
2016-06-06 23:55:58 +00:00
Eino-Ville Talvala
563df3b328 Revert "Internal API for cross-task Activity used by assistant."
This reverts commit 04073dc5be.

Bug: 29128683
Change-Id: I7d9bb7bb388f38e8e5ab159a211ee7f9f4fb7ab9
2016-06-06 22:04:54 +00:00
George Mount
a9e1ad04fb Merge "Merge "Internal API for cross-task Activity used by assistant." into nyc-mr1-dev am: 3af59ef42c" into nyc-mr1-dev-plus-aosp
am: 74babe679b

* commit '74babe679b0f8e17ed73280b18bc19153764c55e':
  Internal API for cross-task Activity used by assistant.

Change-Id: I985c67a465e88f74e66600709c187c3dfc9734e9
2016-06-04 00:10:35 +00:00
George Mount
04073dc5be Internal API for cross-task Activity used by assistant.
29091742

A new internal API has been created for use by assistant
to launch an Activity Transition from a non-Activity.

The ActivityOptions are also passed along when using
a spring board Activity so that the shared elements
can be properly synchronized.

This also fixes TransitionManager.endTransition so
that it forces Transitions to end the animations.

Change-Id: Id18d9765bfc0c7b438e17966455aa66d3fa3aeda
2016-06-03 14:08:06 -07:00
TreeHugger Robot
e1b53d7cab Merge "Add missing @Deprecated annotations." 2016-05-25 17:46:40 +00:00
Aurimas Liutikas
514c5ef8d5 Add missing @Deprecated annotations.
Add missing @Deprecated annotations for methods with @deprecated tag
in javadoc.

Change-Id: I35b78ccb97832d86b914c21a300444ba29e33844
2016-05-24 15:22:55 -07:00
Doris Liu
bbeafd1199 Fix blue channel gets updated incorrectly in ChangeText transition
Also fixed text's alpha channel gets incorrectly reset to fully
opaque.

Bug: 28919053
Bug: 28932357
Change-Id: Ib0ae6fe56ba4e09dea69534868e764e65e888e62
2016-05-24 14:56:08 -07:00
George Mount
1349bb9c33 Disable suppressLayout in Visibility Activity Transitoins.
Bug 27389255

In Idf21542464a13bac7b4d4a17f6b9303f68d550c3, I had removed
a suppressLayout check from forced visibility. Unfortunately,
when the transition ends, it calls layout if there was a
requestLayout during the transition. This prevents the
suppression at the level of the individual views so that it
can be handled at the decor View level as it was before.

Change-Id: I0f016e6356fd1ceff705b122a6b4ac3f3f09600d
2016-03-22 13:41:57 -07:00
George Mount
fdce57b6dc Merge "Fix ArcMotion path creation in some quadrants." into nyc-dev 2016-03-10 18:19:10 +00:00
George Mount
eddc8dbed6 Fix ArcMotion path creation in some quadrants.
Bug 27577177

When ArcMotion created paths in some quadrants, the control
points were placed in the wrong place, making a non-circular
arc instead of an arc of a circle.

Change-Id: Ie842524c09385038fb1f991b877b01ee5e740f20
2016-03-09 15:30:19 -08:00
George Mount
193b821829 Merge "Fix propagation delay not working with minimum value = 0" into nyc-dev 2016-03-08 21:03:16 +00:00
George Mount
23d57f30c5 Fix propagation delay not working with minimum value = 0
Bug 27545221

When the propagation delay had a minimum value of 0, no
propagation delay was happening.

Change-Id: Id28c2cac1c40d5c57f6b49fa11a60218ac1787a0
2016-03-08 09:32:07 -08:00
Tony Mantler
cfa15bd1d5 Add hidden slide fraction call to Slide
b/27460758

Change-Id: I936ce1c0ece24dd6a9e1c546f0bf261b37ba97c1
2016-03-07 14:48:16 -08:00
George Mount
c47738d8c2 Merge "Fix TransitionSet javadoc to use transitionOrdering attribute." into nyc-dev 2016-02-16 21:38:02 +00:00
George Mount
d6505566a9 Merge "Don't use forceVisibility for Activity Transitions." into nyc-dev 2016-02-16 21:37:39 +00:00
George Mount
93aaab034f Fix TransitionSet javadoc to use transitionOrdering attribute.
Bug 27056771

Change-Id: Idb00d7e49857f6aed88a898edd957b5202581a2f
2016-02-10 15:39:17 -08:00
George Mount
45feb95c4a Null check for fade start alpha value.
Bug 27105186
Fade previously hadn't had any values saved over those captured
by Visibility. If a Transition merged two Visibility transitions,
it could avoid calling captureStartValues for the Fade transition.
This change prevents an NPE in that case. The combined transition
won't get the intermediate alpha value, but at least it won't
crash.

Change-Id: I8e5720caafda56b017dfe1cc0b16ebdf246e90c4
2016-02-10 15:14:17 -08:00
George Mount
629767288a Don't use forceVisibility for Activity Transitions.
Bug 22291911

Forced visibility for transitions was introduced to make
Activity Transitions force going from INVISIBLE to VISIBLE
without triggering focus changes. setTransitionVisibility
was later introduced and now allows us to use visibility
without triggering focus changes.

Change-Id: Idf21542464a13bac7b4d4a17f6b9303f68d550c3
2016-02-10 22:12:14 +00:00
George Mount
5affef0773 Fix Fade transition interrupt.
Bug 26963113

When a Fade transition is interrupted and reversed, the
View started the animation from the beginning. This change
captures the previous transitionAlpha and starts the animation
from the previous alpha state.

Change-Id: I801fe9ade6af4cf8446838e231bdc71841668a18
(cherry picked from commit 3cf9fa3db0)
2016-02-08 20:33:49 +00:00
George Mount
7764b920f2 Add IntDefs for Animator and Transition classes.
Bug 23593341

Change-Id: Ifcb30322cb90efb32262c80f5d11c2d39efc5080
2016-01-13 15:21:51 -08:00
Neil Fuller
71fbb81b14 Fix @code escapes
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.

Bug: 25757239
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
2015-12-02 14:24:11 +00:00
George Mount
f2a3703696 Set the bounds on the drawable for ChangeBounds reparenting.
Bug 24993183

The bounds for the drawable weren't being set, so the
drawable was never drawn to the correct size.

Change-Id: I992951f28ee6fac2ce8752d2dc0e23f51d3cf584
2015-10-19 13:50:16 -07:00
George Mount
a7478ab9a7 Fix Fade out during Activity Transition.
Bug 22181705

The Fade Transition sets the transitionAlpha in onTransitionEnd.
I previously changed Visibility to only do it in onAnimationEnd,
so the onTransitionEnd overrides the Visibility's version. This
fixes that change.

Change-Id: I7df478897b6fcfec20999965e297925b65a1448b
2015-07-06 10:23:13 -07:00
George Mount
cb23ec418e Merge "Add missing addPauseListener." into mnc-dev 2015-07-01 14:10:11 +00:00
George Mount
0b056a0ac3 Add missing addPauseListener.
Bug 22112571

Change-Id: I0dd0d9a131f5630cbac6b404fb34c82073fa1a83
2015-06-30 07:24:30 -07:00
George Mount
3ebcd8654d Merge "Fix endTransition index out of bounds exception." into mnc-dev 2015-06-26 21:18:57 +00:00
George Mount
7a0f54b140 Merge "Fix addTarget not limiting to the given views." into mnc-dev 2015-06-26 21:18:39 +00:00
George Mount
e3a4cb5b38 Fix addTarget not limiting to the given views.
Bug 22086521

Views matched by instance, or appearing/disappearing, or
named views were not limited.

Change-Id: I70fd1497c58a3cde771f4eafe11d8ebe0889ab6c
2015-06-25 14:27:06 -07:00
George Mount
d9f3aa58d7 Merge "Fix removeTarget to remove by ID instead of index." into mnc-dev 2015-06-25 20:55:37 +00:00
George Mount
800320933e Fix endTransition index out of bounds exception.
Bug 22063111

When transition.end() is run, it removes itself from
the list of running transitions and perturbs the list.

Change-Id: I4feb7ebe19717a0e2302844d4e4e0d19a55ec57c
2015-06-25 12:52:18 -07:00
George Mount
5697c323a5 Fix removeTarget to remove by ID instead of index.
Bug 22043875

Change-Id: I47933343381df7c46580279a864ab03d44c992ec
2015-06-23 15:42:37 -07:00
George Mount
21290a62a5 Suppress Layout during Visibility transitions
Bug 21770464

Layout while a View is transitioning out can cause strange
behavior during the animation. This CL suppresses the
layout during the transition. It also invalidates
the parent when it has been removed rather than
requesting layout on it.

Change-Id: I471243f5beef44d3bbed9ce844e66195dbf4ae10
2015-06-22 17:19:29 -07:00
George Mount
209fb43376 Merge "Have the final setVisibility cause a requestLayout." into mnc-dev 2015-06-16 15:27:27 +00:00
George Mount
533d7a67d9 Have the final setVisibility cause a requestLayout.
Bug 21770464

Change-Id: I8c501e8a681634cb87857cf9286b888e61101f13
2015-06-15 16:17:04 -07:00
George Mount
727a6cf6ad Fix blink in Explode transition.
Bug 21785708

Change-Id: I1250d8e084601a6267906fdb2f3df46cbb8161fc
2015-06-15 14:12:26 -07:00