Merge "Remove prolonged animations" into pi-dev

This commit is contained in:
Jorim Jaggi
2018-04-23 12:17:37 +00:00
committed by Android (Google) Code Review
5 changed files with 5 additions and 38 deletions

View File

@@ -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.

View File

@@ -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.
*/

View File

@@ -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;
}

View File

@@ -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() {

View File

@@ -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