am fbbdbc2d: Merge "Fix setting action bar home-as-up from AB style" into jb-dev

* commit 'fbbdbc2d2326e96ce31950baccddd2f295fe594c':
  Fix setting action bar home-as-up from AB style
This commit is contained in:
Adam Powell
2012-05-02 15:44:45 -07:00
committed by Android Git Automerger

View File

@@ -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());
}