Commit 5c3e4e7b authored by Ryan Landay's avatar Ryan Landay Committed by Commit Bot

Remove StackLayout#uiPreemptivelySelectTabModel()

StackLayout#uiPreemptivelySelectTabModel() is a one-line method that just calls
StackLayout#onTabModelSwitched(). I don't think there's really any extra clarity
added by the separate method name, so I'm removing this method so I don't have
to deal with it when splitting a base class off of StackLayout.

Bug: 648314
Change-Id: I187051e51e0593060808ef4f6824bf742df483f9
Reviewed-on: https://chromium-review.googlesource.com/957560Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542271}
parent 4e32317a
...@@ -453,7 +453,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper ...@@ -453,7 +453,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
startMarginAnimation(true); startMarginAnimation(true);
// Animate the stack to leave incognito mode. // Animate the stack to leave incognito mode.
if (!mStacks.get(1).isDisplayable()) uiPreemptivelySelectTabModel(false); if (!mStacks.get(1).isDisplayable()) onTabModelSwitched(false);
} }
@Override @Override
...@@ -464,7 +464,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper ...@@ -464,7 +464,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
// trigger the overlap animation. // trigger the overlap animation.
startMarginAnimation(true); startMarginAnimation(true);
// Animate the stack to leave incognito mode. // Animate the stack to leave incognito mode.
if (!mStacks.get(1).isDisplayable()) uiPreemptivelySelectTabModel(false); if (!mStacks.get(1).isDisplayable()) onTabModelSwitched(false);
} }
@Override @Override
...@@ -558,7 +558,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper ...@@ -558,7 +558,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
startMarginAnimation(false); startMarginAnimation(false);
} }
uiPreemptivelySelectTabModel(newIsIncognito); onTabModelSwitched(newIsIncognito);
} }
@Override @Override
...@@ -649,7 +649,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper ...@@ -649,7 +649,7 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
// Make sure we show/hide both stacks depending on which tab we're closing. // Make sure we show/hide both stacks depending on which tab we're closing.
startMarginAnimation(true, incognitoVisible); startMarginAnimation(true, incognitoVisible);
if (!incognitoVisible) uiPreemptivelySelectTabModel(false); if (!incognitoVisible) onTabModelSwitched(false);
} }
/** /**
...@@ -685,10 +685,6 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper ...@@ -685,10 +685,6 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
doneShowing(); doneShowing();
} }
private void uiPreemptivelySelectTabModel(boolean incognito) {
onTabModelSwitched(incognito);
}
/** /**
* Starts the animation for the opposite stack to slide in or out when entering * Starts the animation for the opposite stack to slide in or out when entering
* or leaving stack view. The animation should be super fast to match more or less * or leaving stack view. The animation should be super fast to match more or less
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment