mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Testing to see if waiting for transition to end will fix flaky tests
Test: presubmit Bug: 202735477 Change-Id: Icf62003b9f422cf0e327365260c36f6d57b71aef
This commit is contained in:
@@ -84,7 +84,7 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
+ ", mCurrentStableState:" + mCurrentStableState
|
||||
+ ", mState:" + mState
|
||||
+ ", mRestState:" + mRestState
|
||||
+ ", isInTransition:" + (mConfig.currentAnimation != null) + ")";
|
||||
+ ", isInTransition:" + isInTransition() + ")";
|
||||
}
|
||||
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
@@ -93,7 +93,7 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
writer.println(prefix + "\tmCurrentStableState:" + mCurrentStableState);
|
||||
writer.println(prefix + "\tmState:" + mState);
|
||||
writer.println(prefix + "\tmRestState:" + mRestState);
|
||||
writer.println(prefix + "\tisInTransition:" + (mConfig.currentAnimation != null));
|
||||
writer.println(prefix + "\tisInTransition:" + isInTransition());
|
||||
}
|
||||
|
||||
public StateHandler[] getStateHandlers() {
|
||||
@@ -129,6 +129,13 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
||||
&& (mConfig.targetState == null || mConfig.targetState == state);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} If there is an active transition.
|
||||
*/
|
||||
public boolean isInTransition() {
|
||||
return mConfig.currentAnimation != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #goToState(STATE_TYPE, boolean, AnimatorListener)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user