Merge "Fix onPrepareActionMode() not being called" into nyc-dev am: 9412176
am: 6ade4d1
* commit '6ade4d106717fbeefaf011253abae1bb37a4425a':
Fix onPrepareActionMode() not being called
Change-Id: I90d3586dd041776e0dafc2880a321169a8561dbf
This commit is contained in:
@@ -505,6 +505,9 @@ public class WindowDecorActionBar extends ActionBar implements
|
|||||||
mContextView.killMode();
|
mContextView.killMode();
|
||||||
ActionModeImpl mode = new ActionModeImpl(mContextView.getContext(), callback);
|
ActionModeImpl mode = new ActionModeImpl(mContextView.getContext(), callback);
|
||||||
if (mode.dispatchOnCreate()) {
|
if (mode.dispatchOnCreate()) {
|
||||||
|
// This needs to be set before invalidate() so that it calls
|
||||||
|
// onPrepareActionMode()
|
||||||
|
mActionMode = mode;
|
||||||
mode.invalidate();
|
mode.invalidate();
|
||||||
mContextView.initForMode(mode);
|
mContextView.initForMode(mode);
|
||||||
animateToMode(true);
|
animateToMode(true);
|
||||||
@@ -518,7 +521,6 @@ public class WindowDecorActionBar extends ActionBar implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
|
mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
|
||||||
mActionMode = mode;
|
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user