Merge "Fix issue with Overview thumbnails appearing blank in certain situations" into tm-qpr-dev
This commit is contained in:
@@ -88,6 +88,11 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
|
||||
return;
|
||||
}
|
||||
setStateWithAnimationInternal(toState, config, builder);
|
||||
builder.addEndListener(success -> {
|
||||
if (!success) {
|
||||
mRecentsView.reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,6 +78,11 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
|
||||
}
|
||||
// While animating into recents, update the visible task data as needed
|
||||
setter.addOnFrameCallback(() -> mRecentsView.loadVisibleTaskData(FLAG_UPDATE_ALL));
|
||||
setter.addEndListener(success -> {
|
||||
if (!success) {
|
||||
mRecentsView.reset();
|
||||
}
|
||||
});
|
||||
mRecentsView.updateEmptyMessage();
|
||||
|
||||
setProperties(toState, config, setter);
|
||||
|
||||
@@ -231,11 +231,6 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
|
||||
setFreezeViewVisibility(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateTransitionFailed(RecentsState toState) {
|
||||
reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateTransitionComplete(RecentsState finalState) {
|
||||
if (finalState == HOME) {
|
||||
|
||||
@@ -119,11 +119,6 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
|
||||
setFreezeViewVisibility(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateTransitionFailed(LauncherState toState) {
|
||||
reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateTransitionComplete(LauncherState finalState) {
|
||||
if (finalState == NORMAL || finalState == SPRING_LOADED) {
|
||||
|
||||
@@ -343,11 +343,6 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
onStateTransitionEnd(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
super.onAnimationCancel(animation);
|
||||
onStateTransitionFailed(state);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -360,12 +355,6 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
}
|
||||
}
|
||||
|
||||
private void onStateTransitionFailed(STATE_TYPE state) {
|
||||
for (int i = mListeners.size() - 1; i >= 0; i--) {
|
||||
mListeners.get(i).onStateTransitionFailed(state);
|
||||
}
|
||||
}
|
||||
|
||||
private void onStateTransitionEnd(STATE_TYPE state) {
|
||||
// Only change the stable states after the transitions have finished
|
||||
if (state != mCurrentStableState) {
|
||||
@@ -600,11 +589,6 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
|
||||
default void onStateTransitionStart(STATE_TYPE toState) { }
|
||||
|
||||
/**
|
||||
* If the state transition animation fails (e.g. is canceled by the user), this fires.
|
||||
*/
|
||||
default void onStateTransitionFailed(STATE_TYPE toState) { }
|
||||
|
||||
default void onStateTransitionComplete(STATE_TYPE finalState) { }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user