Fix setting action bar home-as-up from AB style
Bug 6427860 Change-Id: I0052417a2c97560ade768509781b27b5e064660d
This commit is contained in:
@ -184,8 +184,15 @@ public class ActionBarImpl extends ActionBar {
|
||||
mContextDisplayMode = mActionView.isSplitActionBar() ?
|
||||
CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
|
||||
|
||||
// This was initially read from the action bar style
|
||||
final int current = mActionView.getDisplayOptions();
|
||||
final boolean homeAsUp = (current & DISPLAY_HOME_AS_UP) != 0;
|
||||
if (homeAsUp) {
|
||||
mDisplayHomeAsUpSet = true;
|
||||
}
|
||||
|
||||
ActionBarPolicy abp = ActionBarPolicy.get(mContext);
|
||||
setHomeButtonEnabled(abp.enableHomeButtonByDefault());
|
||||
setHomeButtonEnabled(abp.enableHomeButtonByDefault() || homeAsUp);
|
||||
setHasEmbeddedTabs(abp.hasEmbeddedTabs());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user