Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13f61a7a authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski Committed by Android Git Automerger
Browse files

am 41ce0039: Merge "Remove the action bar icon when there is no drawer enabled." into mnc-dev

* commit '41ce003934c228f68e82645062665e0d2c443781':
  Remove the action bar icon when there is no drawer enabled.
parents 876818ab 4ee258fa
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -408,15 +408,8 @@ public class DocumentsActivity extends BaseActivity {
            }
        }

        final RootInfo root = getCurrentRoot();
        final boolean showRootIcon = mShowAsDialog
                || (mState.action == ACTION_MANAGE || mState.action == ACTION_BROWSE);
        if (showRootIcon) {
            mToolbar.setNavigationIcon(
                    root != null ? root.loadToolbarIcon(mToolbar.getContext()) : null);
            mToolbar.setNavigationContentDescription(R.string.drawer_open);
            mToolbar.setNavigationOnClickListener(null);
        } else {
        if (!mShowAsDialog && mDrawerLayout.getDrawerLockMode(mRootsDrawer) ==
                DrawerLayout.LOCK_MODE_UNLOCKED) {
            mToolbar.setNavigationIcon(R.drawable.ic_hamburger);
            mToolbar.setNavigationContentDescription(R.string.drawer_open);
            mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@@ -425,6 +418,10 @@ public class DocumentsActivity extends BaseActivity {
                    setRootsDrawerOpen(true);
                }
            });
        } else {
            mToolbar.setNavigationIcon(null);
            mToolbar.setNavigationContentDescription(R.string.drawer_open);
            mToolbar.setNavigationOnClickListener(null);
        }

        if (mSearchManager.isExpanded()) {
@@ -433,7 +430,7 @@ public class DocumentsActivity extends BaseActivity {
            mToolbarStack.setAdapter(null);
        } else {
            if (mState.stack.size() <= 1) {
                mToolbar.setTitle(root.title);
                mToolbar.setTitle(getCurrentRoot().title);
                mToolbarStack.setVisibility(View.GONE);
                mToolbarStack.setAdapter(null);
            } else {