summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author George Mount <mount@google.com> 2014-09-05 14:14:52 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-09-05 14:14:53 +0000
commitffd09aed4e31cc52d273ce0280488c38547866b2 (patch)
tree6ec2de0ca5503fbef6e15aa2a643b5efaf8f4597
parentc2d66a0282854fc80ec9525e54d2335e6b055923 (diff)
parentc6186bffe477b996e388046e8761908b813fd07f (diff)
Merge "Fix selection of epicenter in Activity Transitions." into lmp-dev
-rw-r--r--core/java/android/app/ActivityTransitionCoordinator.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index 5e0ea17ec8bf..9e80a4b0ec1b 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -251,9 +251,11 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
*/
protected void setEpicenter() {
View epicenter = null;
- if (!mAllSharedElementNames.isEmpty() && !mSharedElementNames.isEmpty() &&
- mAllSharedElementNames.get(0).equals(mSharedElementNames.get(0))) {
- epicenter = mSharedElements.get(0);
+ if (!mAllSharedElementNames.isEmpty() && !mSharedElementNames.isEmpty()) {
+ int index = mSharedElementNames.indexOf(mAllSharedElementNames.get(0));
+ if (index >= 0) {
+ epicenter = mSharedElements.get(index);
+ }
}
setEpicenter(epicenter);
}