summaryrefslogtreecommitdiff
path: root/core/java/android/transition/TransitionManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-1/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+1
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-1/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-071-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
* Remove transition listener in MultiListener and FragmentTransitionAndrey Kulikov2018-10-221-0/+1
| | | | | | | | | | Found two places where we forgot to remove TransitionListener in onTransitionEnd. I think it is important to clear it as if you reuse a transition object it will be leaked together with some views Test: n/a Bug: 64643817 Fixes in AndroidX: aosp/793641, aosp/795753 Change-Id: Iae0a9945a4158776f1a75c806c1f29efc049f96b
* Keep scene change code in framework transitions in sync with AndroidXAndrey Kulikov2018-09-281-11/+10
| | | | | | Bug: 65536124 Test: cts/TransitionManagerTest Change-Id: I976f07899c7d6ef68acbcc207ddb07ae5ac7f28f
* Call Scene's exit action when use TransitionManager.go() with null transitionAndrey Kulikov2018-09-271-5/+11
| | | | | | | | | Bug: 65536124 When we pass null for TransitionManager.go() there is a special logic where we forgot to call previousScene.exit(), only newscene.enter() is called. Test: added unit tests and tested manually Change-Id: Ibd4d5a2cc17bbfe4aaa586357446da28d4b355af
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-301-0/+4
| | | | | | | | | | | | | | | For all remaining unannotated code. This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
* Fix race condition with GC in TransitionManagerYuichi Araki2018-05-021-7/+9
| | | | | Test: Built Change-Id: I605b32dc7f86b63ba6ce539fcd13174558feb125
* Extract and unhide TransitionListenerAdapterBen Weiss2016-11-171-1/+1
| | | | | | Test: CTS tested Change-Id: I8db99d5f212b15db70ee5a6d6debf25d7ad7922d
* Use safe access to OnPreDrawListener.George Mount2016-11-151-1/+7
| | | | | | | | | | | | | | | | | | 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
* Fix TransitionManager.go with null Transition.George Mount2016-09-201-13/+13
| | | | | | | Bug: 31529500 Test: I8e5a3285bc5e2b34a1eb32afd67e3184c6d8897e Change-Id: Ibf273d5acab4e32420093adc395034b2246bd530
* Make getTransition a @TestApi for CTS tests.George Mount2016-06-241-1/+4
| | | | | | Bug 29570647 Change-Id: I85b2b215fbad2ca72e67b17a29cc9b122ae5945e
* Re-add Internal API for cross-task Activity used by assistant.George Mount2016-06-081-1/+1
| | | | | | | | | | Bug: 29091742 This reverts commit 563df3b328f5488aaa33b894748029ed00d0e263. This also fixes the problems experienced by b/29128683. Change-Id: I8e3d485cb818ea9e03ca475cba88934f6f903f11
* Revert "Internal API for cross-task Activity used by assistant."Eino-Ville Talvala2016-06-061-1/+1
| | | | | | | This reverts commit 04073dc5be4c8faad41f549617ed1c3ef999d6b2. Bug: 29128683 Change-Id: I7d9bb7bb388f38e8e5ab159a211ee7f9f4fb7ab9
* Internal API for cross-task Activity used by assistant.George Mount2016-06-031-1/+1
| | | | | | | | | | | | | | | | 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
* Fix endTransition index out of bounds exception.George Mount2015-06-251-4/+5
| | | | | | | | | Bug 22063111 When transition.end() is run, it removes itself from the list of running transitions and perturbs the list. Change-Id: I4feb7ebe19717a0e2302844d4e4e0d19a55ec57c
* Make TransitionManager.endTransitions() public.George Mount2015-04-081-1/+0
| | | | | | Bug 19231835 Change-Id: I151bae1d10aaab72f8fea73eaf0538f0aa5d810a
* Fix TransitionManager.go not running transition.George Mount2015-03-031-13/+16
| | | | | | Bug 19459362 Change-Id: I17595390c9fb289dec8de44447ca490c46570fb4
* Make popup transition animation play nicely with dismiss/show pairAlan Viverette2015-02-021-1/+26
| | | | | | | | | Previously it was okay to call dismiss/show in quick succession since the window was removed synchronously. Adding transitions introduced a delay between dismiss() and actually removing the window, which broke this behavior. Change-Id: I0de8ae0a551dcb2eb8b8a50356c308b654ebdc6f
* Fix TransitionManager.go() to allow null transitionsChet Haase2014-09-031-3/+7
| | | | | | | | | | The doc'd behavior of go() is that a null transition is equivalent to just switching to a scene with no transition. The actual behavior was an NPE crash. Issue #17342291 TransitionManager.go() with null Transition parameter throws NPE unlike documentation Change-Id: I9416aa6e307f80eefc201ca3264fd64f8587ac2f
* Split Activity Transitions out of PhoneWindow.George Mount2014-04-171-47/+0
| | | | | | | | Bug 13622834 Made it possible to use shared elements without making Views invisible. Change-Id: I1e85c6bc19e634a9af225ad7f0309b4f003ea462
* Fix problem with Animators pausing the wrong Window.George Mount2014-03-061-3/+3
| | | | | | | | | | | Bug 13347005 Because Windows can share a UI thread, pausing/resuming Animators in transitions can affect other Windows. This isolates the pause/resume to the Window being operated on. Change-Id: Iac84a0a2c838f30c309eea4931467ba758c6ba78
* Change Activity Scene Transitions to be more automatic redo.George Mount2014-02-261-121/+29
| | | | | | | | | This reverts commit 206e30cd93afe3eb72ec94178324417db5424ed2 along with removing the additional startActivity* methods and replaces them with ActivityOptions makeSceneTransitionAnimation methods. Change-Id: I52bec31ae3c4cea6d549810ae5a7acd8aea176d8
* Revert "Change Activity Scene Transitions to be more automatic."George Mount2014-02-261-29/+121
| | | | | | This reverts commit f10587faadb9080a7bf9991cbe04bac5525da482. Change-Id: I2785a3d2d6b667cad6d61dcbbc1c624161735fa4
* Change Activity Scene Transitions to be more automatic.George Mount2014-02-251-121/+29
| | | | | | | | | | | | Shared element transitions are enabled by default when the Window has a TransitionManager. Shared element location and size are captured and transferred to the target Activity. ActionBar is treated as a shared element. Change-Id: I0f22ea4e5cbe80254e848444e3f235cb742684f4
* Add support for cross-activity scenes and transitionsAdam Powell2013-12-051-1/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add theme attributes for specifying a top-level TransitionManager for an activity window. * Add window feature for automatic content transitions. This automatically assigns/creates a Scene for setContentView calls. * Add named transitions. This allows apps to define APIs for handshake-agreements about which exit/entrance transitions to play. * Add new transition type for ActivityOptions. This lets the system use ActivityOptions to communicate transition specifics and arguments to the called activity. * Have ActivityManager pass appropriate ActivityOptions through to the called Activity. Have the called activity call back into the caller to let it know which transition of a possible requested set was chosen. Still to do: * Define and pass arguments for transitions. This will require defining a Parcelable version of TransitionValues and deciding how much leeway apps should have for these things. * Determine how to appropriately filter the ActivityOptions bundle so that only appropriate data reaches the target. * Determine if generalizing the auto-Scenes functionality to ViewGroups is appropriate. Change-Id: I10684b926129ab2fbc1adec9ef31767237acae79
* Hide TransitionManager default transition methodsAdam Powell2013-10-241-4/+8
| | | | | | Pending future API consideration. Change-Id: Ia4b162392e1c96b485bc28781a199bc2979ec53f
* Fix leak with transitions when views get removedChet Haase2013-10-221-38/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Transitions, when started, add an OnPreDrawListener to the current ViewTreeObserver (which is global to the view hierarchy). This listener is removed when the listener is called. It is possible to add this listener and then remove the view from the hierarchy before the listener is called. This could result in either the listener not getting called at all (since there was no drawing event) or (in the case of this bug) the listener getting called when the sceneRoot had no AttachInfo (which is the case when that root has been removed from the hierarchy). This results in the listener trying to remove itself from a *different* ViewTreeObserver than the one it added itself to, leaving the actual listener still sitting on a list of listeners in that original VTO. This can result in a growing list of listeners and a growing amount of work that gets done on every frame. It can also lead to a serious memory leak, since the objects referred to by the transition may be non-trivial (as in the case of this bug). The fix is to add another mechanism for the listener to get removed. Specifically, we now listen for detach events on the sceneRoot. If that view gets detached before the listener is called, then we have a chance to remove it from the correct VTO before the AttachInfo becomes null. Issue #11307391 keyguard is slow after updating to krt16c and playing music Change-Id: I108413ea2f18f5351df0a11d4ae56fec0b4aa154
* Enable transitions in lockscreen media controllerChet Haase2013-10-041-6/+1
| | | | | | | | | | | | Media controller now fades between different states. The code for doing this was already there, but this CL enables them and changes the behavior of transition's OnPreDrawListener to do the right thing. Also, this CL fixes a bug in ChangeText found while testing this change. Issue #11083563 ChangeText transition crashes when KEEP transition type used Change-Id: I5e04c28e1b5faac017b0a4e49734d9faa7fe79cd
* Make fading transitions work betterChet Haase2013-09-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, a Fade transition would only affect a view if its parent hierarchy was not also affected between the start/end states. This caused problems for views which were removed from their parents between scenes when their parents' visibility also changed between those scenes. The effect would be that the transition would fade the parent... but the child would no longer be in that parent, so the user would just see the child view blink out. This fix ensure that views are faded appropriately by fading them regardless the parent hierarchy; if a view is removed from its parent, fade it out. Additionally, if that view has not been removed from its parent, but its parent is no longer parented *and* scene being transitioned from is based on a layout resource file (and thus the views are considered temporary after transitioning), then it is removed from its parent to be faded out in the overlay. Also, renamed TextChange to ChangeText to be more consistent with other transition class names. Change-Id: I4e0e7dfc9e9d95c7a4ca586534b6d204c4f3bae0
* Ensure that transitions animating alpha end on a reasonable valueChet Haase2013-09-161-18/+14
| | | | | | | | | | | | | | | | | | | | The Fade transition sets an initial alpha value of 0 when items are appearing. This makes items invisible to start with, and then they eventually fade in as part of the transition when the transition's animation runs. But if that animation/transition gets interrupted, or not started, then the alpha value would not be restored, and the value would stay 0, making the items invisible indefinitely. This is what was happening in the action bar of the People app when performing a search. The fix is to handle Transition and animation events to restore the alpha to its true value when the transition completes, whether that transition is canceled or not. Issue #10726905 ActionBar weirdness in People app Change-Id: Idb65fd8d471d2ac0a1ddc243fee00ae99f7e72d8
* Plug leaks in transitionsChet Haase2013-09-141-11/+18
| | | | | | | | | | | | | | | | Transitions were leaking views due to TransitionsValues holding references to views/parents. The references were fine, but the retention of the transition objects themselves were not. There were a few different places that needed to be plugged: - clones were not making new copies of some fields, leading to caching references in the original object (which was then cloned later to other clones) - Visibility was using a persistent field to cache temporary values. This transition, when cloned, would retain these instances, keeping references to views - ViewTreeObserver had a bug that would leak listeners Issue #10749071 Activity instance leak between TransitionManager and InputMethodManager Change-Id: I1d5d457dc5e020c7b9e8392a95e3b2c488461119
* Disable ActionBar transitionsChet Haase2013-09-131-14/+18
| | | | | | | | | | A problem with transitions is causing various ActionBar icons to go missing occasionally. This CL disables these transitions for now to allow ActionBar to work as expected. Issue #10726905 ActionBar weirdness in People app Change-Id: I0cb774840ae84cbb733d65865f8c1b4c6d7490fa
* Transition API changes from API council recommendationsChet Haase2013-09-041-0/+360
Issue #10460684 KLP API Review: android.view.transition and android.animation Issue #10570740 Transitions: inflate transition targets from xml Change-Id: I7a3f6d3aece2fcafc5efd555d033f79e86635c98