Merge "Fix onPrepareActionMode() not being called" into nyc-dev

am: 9412176

* commit '94121762ff47728fd8080f45f04cafb55b92079d':
  Fix onPrepareActionMode() not being called

Change-Id: Ic6f51f65f9d82b490ef26c89725b228f0568bdd9
This commit is contained in:
Chris Banes
2016-04-26 19:26:57 +00:00
committed by android-build-merger

View File

@@ -505,6 +505,9 @@ public class WindowDecorActionBar extends ActionBar implements
mContextView.killMode();
ActionModeImpl mode = new ActionModeImpl(mContextView.getContext(), callback);
if (mode.dispatchOnCreate()) {
// This needs to be set before invalidate() so that it calls
// onPrepareActionMode()
mActionMode = mode;
mode.invalidate();
mContextView.initForMode(mode);
animateToMode(true);
@@ -518,7 +521,6 @@ public class WindowDecorActionBar extends ActionBar implements
}
}
mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
mActionMode = mode;
return mode;
}
return null;