History log of /frameworks/base/core/java/android/app/ActivityOptions.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7e03e1a9e28e7f631509de4fe2c26f24b584af1 22-Aug-2017 Winson Chung <winsonc@google.com> Add API to disallow entering PiP when launching a new activity

- Use this API when launching the camera from a double tap gesture where
the user expects the camera to start for immediate use.
- Fix missing case of restoring the enter pip state.

Bug: 63916952
Test: Double tap to launch the camera, and ensure it does not trigger
the current activity to enter PiP (if it supports it)

Change-Id: I2acf44984bcc57dff75701d0e9cbd6b798a97cd8
/frameworks/base/core/java/android/app/ActivityOptions.java
06b50ab4b9d8b5ea9076ae71a08bfe8d90c4cdfc 16-Jun-2017 Winson Chung <winsonc@google.com> Fix backwards flag causing crash.

Bug: 62692677
Test: Use an activity options that requires the bitmap copy, ensure
that it does not crash.

Change-Id: I20bdab1b91dfe47f7fe134fd17fe104eb4b27ec1
/frameworks/base/core/java/android/app/ActivityOptions.java
f229ae55230427e8466790e99008bad1c2956ba6 02-Jun-2017 Winson Chung <winsonc@google.com> Handling cases with a null bitmap.

- This can happen either if an app creates an ActivityOptions without a
thumbnail, or if the call to create a hardware bitmap fails for any
reason. Just ignore the thumbnail for the transition in this case.

Bug: 62296016
Test: Have not been able to reproduce, but this is just a logical change
Change-Id: I30776b651df1f42118fe1d317fa4817261a6e977
/frameworks/base/core/java/android/app/ActivityOptions.java
aa7fa0135366b80d9bfdb7dffb6795b365a40607 25-May-2017 Winson Chung <winsonc@google.com> DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.

- This reduces the copy of the hardware bitmap when it is
parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke

Change-Id: I85a9a59a0a3699d1642158061d10fddef34393c3
Signed-off-by: Winson Chung <winsonc@google.com>
/frameworks/base/core/java/android/app/ActivityOptions.java
34795e31971b5495fcf91c1063dcb689957e2c9f 12-May-2017 Jorim Jaggi <jjaggi@google.com> Optimize hot launching recents

Rearrange how we generate the transition specs, which involves
creating a thumbnail on the mainthread (about 10ms on large
devices): First, we put launching the activity onto a handler
thread (with default priority), to free up the main thread. Then,
we immediately start generating the thumbnail such that when the
future calls us we have the generated spec already handy.

For that we need to be able to supply a specs future into
ActivityOptions, to avoid race conditions. Furthermore we need to
make sure not to call into WM while creating specs, to avoid WM
lock contention.

Test: App -> Recents -> Same app, inspect app transition logs
Test: Double tap recents for quick switching

Bug: 32668632
Change-Id: I6001e29145f8e56deb9c4ead46c53c87c9191436
Merged-In: Ic6ec65c2560f67cade3b5ddde9f79ee13e9ba32c
/frameworks/base/core/java/android/app/ActivityOptions.java
0606861de50995e997d7c117e3bab1eb5db06da8 06-Apr-2017 Chad Brubaker <cbrubaker@google.com> Allow apps to provide the Instant App installer extra information

Apps may want to provide additional context information to the instant
app installer in order to allow the installer to make smarter choices
about the context of the launch. This CL adds a bundle to
ActivityOptions that is sent to the Installer (if an Instant App is
launched) but not to any other application if something else on the
device handles the Intent instead.

Bug: 35180854
Test: manual
Change-Id: Ifc69a420a9c68041b39acd8a4b83db8a789822a6
/frameworks/base/core/java/android/app/ActivityOptions.java
b759bd3b4add402ac54e008de0d59bed94abefc7 18-Apr-2017 Ian Lake <ilake@google.com> Create a valid ActivityOptions Bundle even for default animations

The ActivityOptions bundle can hold additional information beyond the
animation details (such as the usage time report, launch, display id, etc). We
need to return a non-null Bundle even if we're using the default animations to
retain that information.

Test: Added in 8209c4bf

BUG: 34235073
Change-Id: If69edadb3f7ff937f07fc618bddbd10cf46666e6
/frameworks/base/core/java/android/app/ActivityOptions.java
1981f5fd17de4627201363ca57e90927a8a243fd 08-Apr-2017 Andrii Kulian <akulian@google.com> Use feature instead of hidden config for multi-display

Using a feature will allow app developers to find out if a
particular device supports running activities on secondary
screens before using the APIs.

Bug: 36776777
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I7121bdb782cac9df70121e9df5cbf3fcb76f4a93
/frameworks/base/core/java/android/app/ActivityOptions.java
6954fc9a7e6b2c6fc0b09448beac2eba7852ff18 25-Mar-2017 Winson Chung <winsonc@google.com> Fix issue with task overlay activities not finishing.

- The task overlay activity should only exist when there are activities
present in the task. When the last such activity is finished, we should
remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
/frameworks/base/core/java/android/app/ActivityOptions.java
995f4b5721e092478881b8929bdd235ec5855646 06-Feb-2017 Ben Weiss <benweiss@google.com> Merge "Extract and unhide TransitionListenerAdapter"
cbcadc981b927b13ccc6e76614f5cccc0c0fe402 13-Jan-2017 Winson Chung <winsonc@google.com> Ensure that we always resume task overlay activities if requested.

- Distinguish between task overlays that need to be resumed and
those that should not.

Bug: 34240533
Test: Open PiP, tap to show menu.
Change-Id: Ibdb54d544c501a492260f02cdc2de40c5c1a66d1
/frameworks/base/core/java/android/app/ActivityOptions.java
e0c37bdea37f78778f6c4f23f03604e59dfb0d55 26-Oct-2016 Ben Weiss <benweiss@google.com> Extract and unhide TransitionListenerAdapter

Test: CTS tested

Change-Id: I8db99d5f212b15db70ee5a6d6debf25d7ad7922d
/frameworks/base/core/java/android/app/ActivityOptions.java
16802aab212b3b070d361f092d78e850b69b18af 02-Nov-2016 Andrii Kulian <akulian@google.com> Add API to launch activities on secondary displays

displayId can be specified as a part of ActivityOptions.
We will look for a valid stack on the specified display, starting
from the topmost one. If no valid stack is found, new dynamic stack
can be created on external display.
Launch stack and display id can't be set at the same time, otherwise
exception will be thrown.

Test: ActivityManagerDisplayTests
Test: #testLaunchActivityOnSecondaryDisplay
Test: #testConsequentLaunchActivity
Test: #testConsequentLaunchActivityFromSecondaryDisplay
Test: #testLaunchActivityFromAppToSecondaryDisplay
Change-Id: I8a202bc076319e23948d81b99a2c68d7b733b5e4
/frameworks/base/core/java/android/app/ActivityOptions.java
fd10cd1989966d01011a0cf75f3282f3e12ca5a6 30-Jun-2016 Robert Carr <racarr@google.com> Force CROSSFADE rotation when launching from double tap gesture.

When activity transition triggers a rotation change, the starting
window will normally be the top window at the time we try
to select the window animation. However, these layout params won't
have the apps rotation animation set (as the client code will set that
on the real window, not the starting window). Eventually we would
like to add API to specify rotation animation via manifest to solve
this problem cleanly. In the mean time, we can force a specific rotation
animation from the double tap gesture, and clean up some camera
ugliness. We accomplish this by attaching an animation hint to
ActivityOptions.

Bug: 28838855
Change-Id: If052cd8cbae76651da43f3b4c590cd9dcc1afc0f
/frameworks/base/core/java/android/app/ActivityOptions.java
413739e8c62a7cd83ec519203a2628504b1b0d16 08-Jun-2016 George Mount <mount@google.com> Re-add Internal API for cross-task Activity used by assistant.

Bug: 29091742

This reverts commit 563df3b328f5488aaa33b894748029ed00d0e263.

This also fixes the problems experienced by b/29128683.

Change-Id: I8e3d485cb818ea9e03ca475cba88934f6f903f11
/frameworks/base/core/java/android/app/ActivityOptions.java
563df3b328f5488aaa33b894748029ed00d0e263 07-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Revert "Internal API for cross-task Activity used by assistant."

This reverts commit 04073dc5be4c8faad41f549617ed1c3ef999d6b2.

Bug: 29128683
Change-Id: I7d9bb7bb388f38e8e5ab159a211ee7f9f4fb7ab9
/frameworks/base/core/java/android/app/ActivityOptions.java
04073dc5be4c8faad41f549617ed1c3ef999d6b2 27-May-2016 George Mount <mount@google.com> 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
/frameworks/base/core/java/android/app/ActivityOptions.java
3b23239d6ec9ded858d75f272ca1a677c5c431f9 14-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed bugs with starting windows when displayng forcedResized activity

- Added ActivityOption to mark a starting activity as a taskOverlay
activity. That is the activity will always be the top activity of the
task and doesn't cause the task to be moved to the front when it is added.
- Only set the starting window state of the ActivityRecord to shown if
window manager actually showed the starting window for the activity.
Avoids incorrectly trying to remove starting window for an activity that
didn't show any.
- When starting additional activity in a task, transfer the starting
window from the top most activity with a starting window. It is possible
the top most window does have a starting window like in the case of the
forcedResized activity.
- Only ensure visiblity of an activity we are starting in a task whose top
activity is a task overlay. They need to start in the visible-paused state
and not the resumed state which just causes extra churn in the system.
- Always add additional starting activities in a task with an overlay
activity below the overlay activity.

Bug: 28751186
Change-Id: I3624a4313ae9c406d42c67a3537f67ad685791af
/frameworks/base/core/java/android/app/ActivityOptions.java
acf147e7e3c603c3c28c390c1d304f451193557a 05-May-2016 Vladislav Kaznacheev <kaznacheev@google.com> Add @TestApi to ActivityOptions.setLaunchStackId

Bug: 28506739
Change-Id: I20fe4d080c125b38a84d9832a497340f805e82e7
/frameworks/base/core/java/android/app/ActivityOptions.java
c875ae74ba4cfe255551d1b011866fcca3bbec88 27-Apr-2016 Jorim Jaggi <jjaggi@google.com> Don't move forced resizable info activity to the front

If we start the forced resizable activity with an existing task,
avoid moving that task to the front. This can cause that a previous
task that was moved to the back gets moved to the front again just
because we started that activity. That's not good.

Bug: 28223489
Change-Id: If8acf31b8be98b82665de1015d5621331c37fb64
/frameworks/base/core/java/android/app/ActivityOptions.java
2adba07d75419462873dfeef40d4c983d832ed99 03-Mar-2016 Jorim Jaggi <jjaggi@google.com> Show a scrim activity if task is not resizable

Add a callback to TaskStackChangeListener which gets fired when the system
might need to inform the user that a specific app might not work in
multi-window.

Use that callback in SysUI to show a translucent activity which scrims the
activity behind to inform that it might not be resizable.

Debounce the information to once per multi-window session, to not make it
annoying.

Introduce launchTaskId to start an activity in an existing task, and protect
that with START_TASKS_FROM_RECENTS permission.

Bug: 27327287
Bug: 27431869
Change-Id: I89e8d653872ab01ba3c1e252b426e5481da0e6ca
/frameworks/base/core/java/android/app/ActivityOptions.java
7f1bdd9f9180574c8b6b98cefe3c542b92477295 18-Mar-2016 George Mount <mount@google.com> Merge "Add @SafeVarargs for methods using typevar varargs." into nyc-dev
d136e51a99df5275eaafdde407e89e78c02b829b 10-Mar-2016 Jeff Sharkey <jsharkey@android.com> Defuse Bundles parsed by the system process.

It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException. If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.

This change mitigates this trouble by "defusing" any Bundles parsed by
the system server. That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.

Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable." For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination. Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.

Merges several Parcel boolean fields into a flags int. Add better
docs to several classes.

Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
/frameworks/base/core/java/android/app/ActivityOptions.java
8f1701d9dc5f61e81d7eabbaf7d1c055a432328e 11-Mar-2016 Andrii Kulian <akulian@google.com> Update ActivityOptions#setLaunchBounds() docs

Update docs to provide more info about parameter format.

Bug: 27364884
Change-Id: I04dd2e868d64d3f023fcaa4891b40b60a2f549d6
/frameworks/base/core/java/android/app/ActivityOptions.java
d98f4ba86c02714d94ec3b6f35345cb0b04f7778 14-Mar-2016 George Mount <mount@google.com> Add @SafeVarargs for methods using typevar varargs.

Bug 27142336
Using a type variable in a varargs leads to a javac warning
because type variables are treated as Object after compilation.
Because these uses do not require a specific typed array, we
can use @SafeVarargs to suppress the warning.

Change-Id: I860bcc79667a9c85c381c7994fd1d798209d7c66
/frameworks/base/core/java/android/app/ActivityOptions.java
5122df094bcb07cff81dac02c397fb6a7cb2e009 30-Jan-2016 Wale Ogunwale <ogunwale@google.com> API council recommended changes to bounds APIs in ActivityOptions

Bug: 26509660
Change-Id: Id90fbda0e15e83145ecc85c214b0ae5763fcc902
/frameworks/base/core/java/android/app/ActivityOptions.java
198dcbf5231761b7b644d9d7fbceb23e1f0f9aec 18-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Fix several small logging issues.

This includes:
1) invert HIDE_STACK_CRAWLS to SHOW_STACK_CRAWLS so it's immediately
clear from the config file that something is enabled (if anything is
true).
2) Merge stack collection code into a method, so we can remove the
repeated code.
3) Remove copying of some constants in AppTransition and just import
them directly.

Change-Id: I3190ee0a5963720ac6285b4f48b2705e84f04ab5
/frameworks/base/core/java/android/app/ActivityOptions.java
854809c074aabebf5b6520c361d1d3c7c22066d2 28-Dec-2015 Wale Ogunwale <ogunwale@google.com> Added hidden API for specifying launch stack in ActivityOptions

Bug: 26273032
Change-Id: Ifb9c70e6783b0426613709693e11742d80ba2fc3
/frameworks/base/core/java/android/app/ActivityOptions.java
7a8fa60962110878ff4e5db67f3b2710189dffb9 19-Nov-2015 Wale Ogunwale <ogunwale@google.com> Allow apps to set launch bounds for activities.

unhide ActivityOptions APIs for setting launch bounds for
an activitiy so apps can use it. Only works on devices that
support PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT.

Bug: 25499677
Change-Id: I75424681f25cbb9fe92f2ed73e6afbab765dab29
/frameworks/base/core/java/android/app/ActivityOptions.java
280d332bd4dbf13bb05102f86c70b7ee299e0704 04-Nov-2015 Chong Zhang <chz@google.com> Construct ActivityOptions near top level

This saves some duplicate constructions of the ActivityOptions
object from Bundle.

Bug: 23755120
Change-Id: Ie8be54a2e4e84a6a1f3c51e4f2966f7fb0bf1c28
/frameworks/base/core/java/android/app/ActivityOptions.java
1a5203dfd5264104db018b8a09d50075b1af9b2d 30-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Hide recents during freeform to recents animation.

Bug: 24913782
Change-Id: I6a5d3a638640571a902e095c4c0650b88eea0fb6
/frameworks/base/core/java/android/app/ActivityOptions.java
d64ef3ef33c50a03b4be3b2baaa93aab7319fca8 28-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Freeform to recents app transition.

Bug: 24913782

Change-Id: I54fcbe38c51e5d75fa5ad2cb38de89d371b47bed
/frameworks/base/core/java/android/app/ActivityOptions.java
90186c6d6e7589835db183f602fb48e23a759a87 26-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Fix wrong task bounds when docking from recents.

When docking from recents we would move the task to the docked stack,
but we wouldn't run the resizing code that forces the task to be within
the stack bounds. We need to perform both operations and we can achieve
that using a more general method of moving tasks.

This also adds the passing of creation mode in the activity options, so
the task will be docked in the right spot.

Change-Id: Ia7f94a7e3677ed60ca2f4d889e548d80a3bc3df1
/frameworks/base/core/java/android/app/ActivityOptions.java
0fa656b95256b7ad6d3dce287107a79ace3abdb8 01-Sep-2015 Chong Zhang <chz@google.com> Allow apps to pass in launch bounds when moving/starting a task

Pass in bounds via ActivityOptions for moveTaskToFront and
startActivityFromRecents. Allow bounds to be overriden by rects
in starting intents.

Set bounds to null in RecentsView for full screen layout.

Change-Id: I0ff79fd75068f4ba82d5e2c0a21881fabebdadb8
/frameworks/base/core/java/android/app/ActivityOptions.java
a750a63d639f6936af456df904fa6b9ba941885e 17-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21814207 and issue #21814212 (alarm manager)

Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
/frameworks/base/core/java/android/app/ActivityOptions.java
67ba2c7fa25a635c640956ff3a5e64164cb23396 05-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21572679: API Review: ActivityOptions, usage time report

Change-Id: I62751e93e39f90d5d2ec725586880724f3edbbc7
/frameworks/base/core/java/android/app/ActivityOptions.java
b5a380d409a1431a38db978864b9d85b689e3cce 21-May-2015 Dianne Hackborn <hackbod@google.com> Add API to track usage time of apps.

This adds a new ActivityOption for the caller to ask the
system to track the time the user is in the app it launches,
delivering the result when they are done.

The time interval tracked is from when the app launches the
activity until the user leaves that app's flow. They are
considered to stay in the flow as long as new activities
are being launched or returned to from the original flow,
even if they cross package or task boundaries. For example,
if the originator starts an activity to view an image, and
while there the user selects to share, which launches gmail
in a new task, and they complete the share, the time during
that entire operation will be included.

The user is considered to complete the operation once they
switch to another activity that is not part of the tracked
flow. For example, use the notification shade, launcher, or
recents to launch or switch to another app. Simply going
in to these navigation elements does not break the flow
(although the launcher and recents stops time tracking of
the session), it is the act of going somewhere else that
completes the tracking.

The data is delivered to the app through a PendingIntent,
which includes the total time the app was in the flow along
with a time break-down by app package.

Change-Id: If1cf8892d422c52ec5042eba0e15a8e7e8f83abf
/frameworks/base/core/java/android/app/ActivityOptions.java
10e23ab61b820fb3149b2f89003753d98ebd6a80 12-Feb-2015 Chet Haase <chet@google.com> Add ClipReveal window transition for application launch

Issue #19362772 Better material launch animations

Change-Id: Ic94fde910b6b5554ee954dfbbf374949f9eb189d
/frameworks/base/core/java/android/app/ActivityOptions.java
e494c382c0caf35f225dfb55f0e3b992c14d79f5 17-Dec-2014 Winson Chung <winsonc@google.com> Bug 18784289: Fix issue with transition animation callback.

This is a regression where we changed the source view for the transition
to dummy view, but since it was not yet attached, it could not get the
handler implicitly to post the onAnimationCompleted callback. This CL
modifies these ActivityOption transitions to also take an explicit
handler to process the callback on.

Bug: 18784289

Change-Id: I73f745c33b9f8aed91f8d9cd975f37cf7e4128f1
/frameworks/base/core/java/android/app/ActivityOptions.java
044d52934e57a337665f707aa4be1d423ee3fb29 06-Nov-2014 Winson Chung <winsonc@google.com> Adding bounce animation for affiliated tasks. (Bug 16656169)

Change-Id: I39e4a57c4e6b707d15513dacde2d40c23bb05058
/frameworks/base/core/java/android/app/ActivityOptions.java
9826f636ad4fe3714d60972acd918e09eb44d971 11-Sep-2014 George Mount <mount@google.com> Have Activity Transitions activited by a new window attribute.

Bug 17006497

Window content transitions were being enabled by default in
the Material Theme so that Activity Transitions could be
enabled by default. Unfortunately, this gave the effect that
many applications did not want -- the default transition between
window content is a fade out/in. Here, a new attribute is
added: windowActivityTransitions that is enabled by default
in the Material theme and windowContentTransitions is disabled
by default in all themes.

Change-Id: Iab453d608f00a48ff7ab7f09ce84b52cf5f20294
/frameworks/base/core/java/android/app/ActivityOptions.java
345d4f4f14038c2225cd599f9c432b25e572dc2c 09-Sep-2014 Craig Mautner <cmautner@google.com> Merge "Remove deprecated (and now unused) API method." into lmp-dev
0321573fa7583cd2ac4ece015c2eb784e3b24eb8 09-Sep-2014 Craig Mautner <cmautner@google.com> Remove deprecated (and now unused) API method.

Removes ActivityOptions.makeLaunchTaskBehindAnimation().

Fixes bug 16958544.

Change-Id: I2d58f4235994fe01d55b3309d0ec6f8449c5d5b8
/frameworks/base/core/java/android/app/ActivityOptions.java
2e7f3bdcc9ec0b3e95b565b943ecee2210f4b937 05-Sep-2014 Winson Chung <winsonc@google.com> Removing unnecessary delays, ensuring transition thumbnail is the size of the header. (Bug. 16987565)

Change-Id: Ic104876c5fe16997eca00e0a2b3d8644c927120c
/frameworks/base/core/java/android/app/ActivityOptions.java
5c1b42e4f5d7307ad09d0d7ad094adf34650fb62 26-Aug-2014 Winson Chung <winsonc@google.com> Merge "Multiple performance changes to speed recents invocation/app launching time. (Bug 16987565)" into lmp-dev
a4ccb86ddc8f9f486aee25fb836f4aff97bf7679 23-Aug-2014 Winson Chung <winsonc@google.com> Multiple performance changes to speed recents invocation/app launching time. (Bug 16987565)

- Reverting changes to the existing thumbnail transition to prevent breaking applications
that currently depend on that transition. As a result, we need to create a new, hidden,
aspect-scaled thumbnail transition, and instead use that thumbnail to animate the
recents header so that we don't have to wait to do that inside the Recents activity.

In order for this to work, we also have to ensure that the thumbnail surface destruction
is synchronized with the application that is currently closing (when going down to
recents) or opening (when coming back up). The current thumbnail is destroyed when the
animation ends, but that can be at least 1 frame before the surface for the animating
window is destroyed. We change this by deferring destruction of this thumbnail window
to the animation that is being closed.

Especially on the way up, not having to wait for us to hide the header before doing the
transition up can save us the duration of that first animation (> 100ms).

- Other optimizations:
* No longer creating a new stack view on each transition to calculate the target rect
* Removing unnecessary call to get the thumbnail when transitioning up/down (the actual
window does its own animation.
* We reduced numerous system calls per task by adding a flag to ignore home-stack tasks
and caching the activity label and icon (and task description icon). These caches
follow the same eviction schemes as the thumbnail and icon cache.

- Also tweaked the touch slop for the nav bar swiping gesture to prevent conflicting with
tapping on home (Bug 17109581)

Change-Id: Ica697aad788051a9203edd9351c583e1cb038a71
/frameworks/base/core/java/android/app/ActivityOptions.java
3b2cd1d59fd894ac67a044c6c540fa69360a34a2 25-Aug-2014 Craig Mautner <cmautner@google.com> Update API per council requests

launchTaskBehindBackgroundAnimation => launchTaskBehindTargetAnimation
visibilityMode => transitionVisiblityMode
makeLaunchTaskBehindAnimation => makeTaskLaunchBehind
launch_task_behind_background = launch_task_behind_target

Fixes bug 16958544.

Change-Id: I3b7c791fc0671b8071a5377cf6fa878bd5861f70
/frameworks/base/core/java/android/app/ActivityOptions.java
bb742462781a73bb25516067c8fe6311c1c8a93e 08-Jul-2014 Craig Mautner <cmautner@google.com> Launch activity behind launching task.

Use ActivityOptions.makeLaunchTaskBehindAnimation() to launch tasks
behind the current task. Includes animations for launching and
launched tasks.

Fixes bug 16157517.

Change-Id: I0a94af70b4748592e94673b958ee824cfb3d7ec0
/frameworks/base/core/java/android/app/ActivityOptions.java
00dde0bd469ba7a34369dcaaa701bd06fdf6c3ad 02-Jul-2014 George Mount <mount@google.com> Fix hang when there is no shared element in activity transition.

Bug 15990826

Change-Id: Id494a51baf8694abd6c5207389cd8334db485d1a
/frameworks/base/core/java/android/app/ActivityOptions.java
0b6f3e1afa78467cfe166c222295df1f7ed7d4c0 20-Jun-2014 George Mount <mount@google.com> Don't return null from ActivityOptions.makeSceneTransitionAnimation.

Change-Id: I77c331848eb5f05ac3010fa6ab85ad2a45760ebc
/frameworks/base/core/java/android/app/ActivityOptions.java
1fecfb2ddcdf4335ff543bdd549b8e4d36139da8 18-Jun-2014 George Mount <mount@google.com> Activity Transitions: don't require transitionName.

Bug 15585623
Bug 15607591

Exit transitions now run because exit transitions are executed
with startActivity.

Change-Id: Ie55793a9514c64d96e2cf1abdd2d39c4d2606a23
/frameworks/base/core/java/android/app/ActivityOptions.java
0a2ae002e60f7ea9b6bea282086b5eb0ae3c6e51 23-Jun-2014 George Mount <mount@google.com> Revert "Revert "API Review: Change View viewName attribute to transitionName.""

This reverts commit 1bdfbc68e22a64215ab8fa3e3d17676513546997.

Change-Id: Ie3fdf53b33cb2f61c1878055940f52ed9dfc8b08
/frameworks/base/core/java/android/app/ActivityOptions.java
a3c1025b80c910fd7c0e9b1c178de32cab83f6de 23-Jun-2014 John Reck <jreck@google.com> Revert "API Review: Change View viewName attribute to transitionName."

This reverts commit f1b1adf51b2a84e0ac83685812c7e8d86590af12.

Change-Id: I0e49aeed84f2a548e272a59f4e13c3fb74c2bfd9
/frameworks/base/core/java/android/app/ActivityOptions.java
125578a8637a9ad5e7430d16b9fc0096a8b596d7 18-Jun-2014 George Mount <mount@google.com> API Review: Change View viewName attribute to transitionName.

Bug 15548520

Change-Id: I4009458d83dbffb20ff0100aaa42eea44d943378
/frameworks/base/core/java/android/app/ActivityOptions.java
d5f9d735b7e48f2ac60773c9c76b4b5f19a0cc72 06-Jun-2014 George Mount <mount@google.com> Make more descriptive exception for null viewName.

Bug 15114583

Change-Id: I73db179e032947843e3f9a7f1cc5228cbf6fc22b
/frameworks/base/core/java/android/app/ActivityOptions.java
62ab9b78b77b7dd851c47115f4d8d7611d657585 02-May-2014 George Mount <mount@google.com> Support Activity Transitions when activity stopped.

Bug 14459812
Bug 14454812
Bug 14450295

A new transport was supported for Activity Transitions
in which convertToTranslucent can now take a Bundle
to transport to the calling Activity. This also allows
waking Activities to regain the communication between
the exiting Activity and the calling Activity.

Change-Id: I29aee14b7e56d9b8b9fb656f382b2c4172b02e14
/frameworks/base/core/java/android/app/ActivityOptions.java
5d1be5364412450afdbf7525f7431bdb4625f377 13-May-2014 George Mount <mount@google.com> Disallow makeSceneTransitionAnimation without FEATURE_CONTENT_TRANSITIONS

Bug 14655908

Change-Id: I60c38aca4a00410b792e2f7ce617ea78c162db55
/frameworks/base/core/java/android/app/ActivityOptions.java
caa03107d4322b0e30f92e6dc1eb1ea73b1bf747 15-Apr-2014 George Mount <mount@google.com> Transfer image of shared element to launched Activity.

First pass of the API will use a Bitmap. Future versions will use
more efficient mechanisms.

Change-Id: I111474dd031fef0b86de871017c85dc679166acf
/frameworks/base/core/java/android/app/ActivityOptions.java
31a217290cf376d0573fc36e21c8940987485019 25-Mar-2014 George Mount <mount@google.com> Split Activity Transitions out of PhoneWindow.

Bug 13622834
Made it possible to use shared elements without making
Views invisible.

Change-Id: I1e85c6bc19e634a9af225ad7f0309b4f003ea462
/frameworks/base/core/java/android/app/ActivityOptions.java
d6107a3170df61d9e776fcd5666acfc9135c6f16 11-Mar-2014 George Mount <mount@google.com> Add Transitions useful for Activity transitions.

Slide: transition in and out of the edge of the scene.
Explode: transition to the scene borders

Moved capability from Fade to Visibility.

Change-Id: Ibeb0d8f751c990edc467570d9665fbe251af2703
/frameworks/base/core/java/android/app/ActivityOptions.java
cb4b7d999e7bcba608726188421772e313e67163 25-Feb-2014 George Mount <mount@google.com> Implement "Back" for Activity Transitions.

Change-Id: Iceaf888f57f2c7598f9291687ac9ad76d55bd82c
/frameworks/base/core/java/android/app/ActivityOptions.java
e180337ee99b9155fe441ea55451f4d2167b5d9a 26-Feb-2014 George Mount <mount@google.com> Change Activity Scene Transitions to be more automatic redo.

This reverts commit 206e30cd93afe3eb72ec94178324417db5424ed2
along with removing the additional startActivity* methods
and replaces them with ActivityOptions makeSceneTransitionAnimation
methods.

Change-Id: I52bec31ae3c4cea6d549810ae5a7acd8aea176d8
/frameworks/base/core/java/android/app/ActivityOptions.java
206e30cd93afe3eb72ec94178324417db5424ed2 26-Feb-2014 George Mount <mount@google.com> Revert "Change Activity Scene Transitions to be more automatic."

This reverts commit f10587faadb9080a7bf9991cbe04bac5525da482.

Change-Id: I2785a3d2d6b667cad6d61dcbbc1c624161735fa4
/frameworks/base/core/java/android/app/ActivityOptions.java
f10587faadb9080a7bf9991cbe04bac5525da482 06-Feb-2014 George Mount <mount@google.com> Change Activity Scene Transitions to be more automatic.

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
/frameworks/base/core/java/android/app/ActivityOptions.java
0a778eda690a66173733a63622886e888d405c45 13-Dec-2013 George Mount <mount@google.com> Cross-Activity Scene transition API.

First pass at API for cross-Activity Scene transitions.
Remaining work:
Transition back
Automatically capture hero element info
Transfer of surface texture to synchronize between Activities
Possibly use scene names to indicate preferred transition

Change-Id: I59d07de1fae694a46b92b1c82525daa301ec1377
/frameworks/base/core/java/android/app/ActivityOptions.java
cfbe9be5b3b701d95fb24fa0f7c8d9be43eec776 06-Nov-2013 Adam Powell <adamp@google.com> Add support for cross-activity scenes and transitions

* 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
/frameworks/base/core/java/android/app/ActivityOptions.java
18e905f42d017c4721d33bd25d7d39ef8d64b5d5 24-Oct-2013 Adam Powell <adamp@google.com> Make Scenes and Transitions first-class in PhoneWindow/Themes

Add a window feature for content transitions. This implicitly creates
a Scene for each setContentView operation and runs the appropriate
transition. Applications can specify a TransitionManager XML in their
theme that will apply the appropriate transitions when these implicit
scene changes occur. Apps can specify a "to" with no "from" in a
transition to request an entrance transition for the given
content. This lays the groundwork for further full content
change/activity to activity transitions.

Change-Id: Ic815d9e0b9ce958152d70bf6ee01be075aa9fe88
/frameworks/base/core/java/android/app/ActivityOptions.java
832cb229cd748505c90f74ae8154fc3557d61a73 13-Apr-2012 Michael Jurka <mikejurka@google.com> Adding a thumbnail scale down animation

Recents animation will temporarily look a bit
wrong, but a subsequent change will fix this.
/frameworks/base/core/java/android/app/ActivityOptions.java
84375876fcef73c5fa9c3de205c7db908ee14e15 02-Jun-2012 Dianne Hackborn <hackbod@google.com> Work on issue #6579997: Mariner entrance animation

Add a new variation of ActivityOptions that allows you to
supply custom animation resources and get a callback when the
animation starts.

Use this in SearchPanelView to determine when to start hiding
the search panel instead of having a fixed delay.

Fix some issues in the activity manager where we would cancel
the options in cases where we should actually keep them to give
to the window manager for a transition. (Basically when the
activity being started is not actually ending up launched, but
just results in a shift in the activity stack.)

Note that this is not quite what the design calls for -- the
entire search UI is waiting and then disappearing when the
animation starts, instead of the ring first disappearing while
waiting for the time to fade out the circle.

Change-Id: Iee9a404ba530908d73cdbd4a9d0d2907ac03428f
/frameworks/base/core/java/android/app/ActivityOptions.java
21385cd83d7d7938b57a4acbaa236dd4c7804ed4 03-May-2012 Michael Jurka <mikejurka@google.com> Making transition out of recents look better

- Fading out recents first, then scaling up app
thumbnail
- Fade Recents out over 130ms
- Delay the window animation for 200ms first,
then animate for 200ms (previously we didn't delay
and then animated for 300ms)

Bug: 6390075

Change-Id: Ia8c753bf7ee03d2acef6eb2772b28d88fe10a682
/frameworks/base/core/java/android/app/ActivityOptions.java
d367ca88eeede24e7d9a51ae85996a9d08d734b2 08-May-2012 Dianne Hackborn <hackbod@google.com> Tweak anim API to automatically call Intent.setSourceBounds().

Also don't retain the source bounds in recent tasks, since it
has no meaning there and it would be better when relaunching an
activity to have a new bounds set based on wherever it is now
being launched from.

Change-Id: Ia90c04ee98a888a7f725b038abe23d71e2b12800
/frameworks/base/core/java/android/app/ActivityOptions.java
ddc52a80b5280d4a67180a6caae8c7dead00157f 04-May-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6426645: API REVIEW: android.app.ActivityOptions

Change-Id: If2f7b987e1825a8b0ebaf2c499924dfc1527274b
/frameworks/base/core/java/android/app/ActivityOptions.java
eabfb3a36e9469c5e219f92b39b7200104319185 17-Apr-2012 Dianne Hackborn <hackbod@google.com> Add new scale-up window manager animation.

Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
/frameworks/base/core/java/android/app/ActivityOptions.java
9944ecd28e1c56c4e9f0a50ed6e8be2110ba5c31 11-Apr-2012 Dianne Hackborn <hackbod@google.com> Hide the callback for activity animation options.

Not something I want to be stuck reporting forever.

Change-Id: Iab13fb7abb23d466492230242bfbae29f1fd01f3
/frameworks/base/core/java/android/app/ActivityOptions.java
8078d8c8a282ca81344febe7256f63b1e805e3aa 20-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new thumbnail animation.

Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
/frameworks/base/core/java/android/app/ActivityOptions.java
6de01a9b03ad6f8a1af4a0d893d952caa4b69d39 20-Mar-2012 Dianne Hackborn <hackbod@google.com> Fix build, forgot to add file.

Change-Id: Ia4b632170471649d1e1eceaad8fec41729008659
/frameworks/base/core/java/android/app/ActivityOptions.java