Merge "Play over-keyguard transitions in default handler" into udc-dev
This commit is contained in:
@@ -121,21 +121,21 @@ public class KeyguardTransitionHandler implements Transitions.TransitionHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean hasOpeningOcclude = false;
|
boolean hasOpeningOcclude = false;
|
||||||
|
boolean hasClosingOcclude = false;
|
||||||
boolean hasOpeningDream = false;
|
boolean hasOpeningDream = false;
|
||||||
boolean hasClosingApp = false;
|
boolean hasClosingApp = false;
|
||||||
|
|
||||||
// Check for occluding/dream/closing apps
|
// Check for occluding/dream/closing apps
|
||||||
for (int i = info.getChanges().size() - 1; i >= 0; i--) {
|
for (int i = info.getChanges().size() - 1; i >= 0; i--) {
|
||||||
final TransitionInfo.Change change = info.getChanges().get(i);
|
final TransitionInfo.Change change = info.getChanges().get(i);
|
||||||
if (isOpeningType(change.getMode())) {
|
if ((change.getFlags() & TransitionInfo.FLAG_IS_WALLPAPER) != 0) {
|
||||||
if (change.hasFlags(FLAG_OCCLUDES_KEYGUARD)) {
|
continue;
|
||||||
hasOpeningOcclude = true;
|
} else if (isOpeningType(change.getMode())) {
|
||||||
}
|
hasOpeningOcclude |= change.hasFlags(FLAG_OCCLUDES_KEYGUARD);
|
||||||
if (change.getTaskInfo() != null
|
hasOpeningDream |= (change.getTaskInfo() != null
|
||||||
&& change.getTaskInfo().getActivityType() == ACTIVITY_TYPE_DREAM) {
|
&& change.getTaskInfo().getActivityType() == ACTIVITY_TYPE_DREAM);
|
||||||
hasOpeningDream = true;
|
|
||||||
}
|
|
||||||
} else if (isClosingType(change.getMode())) {
|
} else if (isClosingType(change.getMode())) {
|
||||||
|
hasClosingOcclude |= change.hasFlags(FLAG_OCCLUDES_KEYGUARD);
|
||||||
hasClosingApp = true;
|
hasClosingApp = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,6 +147,11 @@ public class KeyguardTransitionHandler implements Transitions.TransitionHandler
|
|||||||
transition, info, startTransaction, finishTransaction, finishCallback);
|
transition, info, startTransaction, finishTransaction, finishCallback);
|
||||||
}
|
}
|
||||||
if (hasOpeningOcclude || info.getType() == TRANSIT_KEYGUARD_OCCLUDE) {
|
if (hasOpeningOcclude || info.getType() == TRANSIT_KEYGUARD_OCCLUDE) {
|
||||||
|
if (hasClosingOcclude) {
|
||||||
|
// Transitions between apps on top of the keyguard can use the default handler.
|
||||||
|
// WM sends a final occlude status update after the transition is finished.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (hasOpeningDream) {
|
if (hasOpeningDream) {
|
||||||
return startAnimation(mOccludeByDreamTransition,
|
return startAnimation(mOccludeByDreamTransition,
|
||||||
"occlude-by-dream",
|
"occlude-by-dream",
|
||||||
|
|||||||
Reference in New Issue
Block a user