Merge "Remove prolonged animations" into pi-dev
am: 5bdf9530a0
Change-Id: Ie769ceea49d0e1cd877fb3fcb8d78ef08a9b635d
This commit is contained in:
@@ -128,7 +128,10 @@ interface IWindowManager
|
||||
void overridePendingAppTransitionRemote(in RemoteAnimationAdapter remoteAnimationAdapter);
|
||||
void executeAppTransition();
|
||||
|
||||
/** Used by system ui to report that recents has shown itself. */
|
||||
/**
|
||||
* Used by system ui to report that recents has shown itself.
|
||||
* @deprecated to be removed once prebuilts are updated
|
||||
*/
|
||||
void endProlongedAnimations();
|
||||
|
||||
// Re-evaluate the current orientation from the caller's state.
|
||||
|
||||
@@ -104,14 +104,6 @@ public class WindowManagerWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public void endProlongedAnimations() {
|
||||
try {
|
||||
WindowManagerGlobal.getWindowManagerService().endProlongedAnimations();
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed to end prolonged animations: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable haptic feedback on the navigation bar buttons.
|
||||
*/
|
||||
|
||||
@@ -835,9 +835,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
mRecentsView.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
// We post to make sure that this information is delivered after this traversals is
|
||||
// finished.
|
||||
mRecentsView.post(() -> WindowManagerWrapper.getInstance().endProlongedAnimations());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,6 @@ public class AppTransition implements Dump {
|
||||
|
||||
private int mLastClipRevealMaxTranslation;
|
||||
private boolean mLastHadClipReveal;
|
||||
private boolean mProlongedAnimationsEnded;
|
||||
|
||||
private final boolean mGridLayoutRecentsEnabled;
|
||||
private final boolean mLowRamRecentsEnabled;
|
||||
@@ -423,27 +422,12 @@ public class AppTransition implements Dump {
|
||||
mService.getDefaultDisplayContentLocked().getDockedDividerController()
|
||||
.notifyAppTransitionStarting(openingApps, transit);
|
||||
|
||||
// Prolong the start for the transition when docking a task from recents, unless recents
|
||||
// ended it already then we don't need to wait.
|
||||
if (transit == TRANSIT_DOCK_TASK_FROM_RECENTS && !mProlongedAnimationsEnded) {
|
||||
for (int i = openingApps.size() - 1; i >= 0; i--) {
|
||||
final AppWindowToken app = openingApps.valueAt(i);
|
||||
app.startDelayingAnimationStart();
|
||||
}
|
||||
}
|
||||
if (mRemoteAnimationController != null) {
|
||||
mRemoteAnimationController.goodToGo();
|
||||
}
|
||||
return redoLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Let the transitions manager know that the somebody wanted to end the prolonged animations.
|
||||
*/
|
||||
void notifyProlongedAnimationsEnded() {
|
||||
mProlongedAnimationsEnded = true;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
mNextAppTransitionType = NEXT_TRANSIT_TYPE_NONE;
|
||||
mNextAppTransitionPackage = null;
|
||||
@@ -452,7 +436,6 @@ public class AppTransition implements Dump {
|
||||
mNextAppTransitionAnimationsSpecsFuture = null;
|
||||
mDefaultNextAppTransitionAnimationSpec = null;
|
||||
mAnimationFinishedCallback = null;
|
||||
mProlongedAnimationsEnded = false;
|
||||
}
|
||||
|
||||
void freeze() {
|
||||
|
||||
@@ -2677,15 +2677,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
@Override
|
||||
public void endProlongedAnimations() {
|
||||
synchronized (mWindowMap) {
|
||||
for (final WindowState win : mWindowMap.values()) {
|
||||
final AppWindowToken appToken = win.mAppToken;
|
||||
if (appToken != null) {
|
||||
appToken.endDelayingAnimationStart();
|
||||
}
|
||||
}
|
||||
mAppTransition.notifyProlongedAnimationsEnded();
|
||||
}
|
||||
// TODO: Remove once clients are updated.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user