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

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

am 9223788e: am 327dbb57: am 41ce0039: Merge "Remove the action bar icon when...

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

* commit '9223788e655784417e1cf0023d78b5d850dd0d1e':
  Remove the action bar icon when there is no drawer enabled.
parents b3223141 57ad1d78
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -402,15 +402,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() {
@@ -419,6 +412,10 @@ public class DocumentsActivity extends BaseActivity {
                    setRootsDrawerOpen(true);
                }
            });
        } else {
            mToolbar.setNavigationIcon(null);
            mToolbar.setNavigationContentDescription(R.string.drawer_open);
            mToolbar.setNavigationOnClickListener(null);
        }

        if (mSearchManager.isExpanded()) {
@@ -427,7 +424,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 {