summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
authorTomasz Mikolajewski <mtomasz@google.com>2015-06-18 00:23:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-18 00:23:57 +0000
commit327dbb57c36026843ce0e8b8f1b98998b7cebec8 (patch)
tree3ce061f4b692db73414314c15d9f6c1523637811 /packages/DocumentsUI
parent353397d874b96098d0ce458afa5d14264870df40 (diff)
parent41ce003934c228f68e82645062665e0d2c443781 (diff)
downloadframeworks_base-327dbb57c36026843ce0e8b8f1b98998b7cebec8.zip
frameworks_base-327dbb57c36026843ce0e8b8f1b98998b7cebec8.tar.gz
frameworks_base-327dbb57c36026843ce0e8b8f1b98998b7cebec8.tar.bz2
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.
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index 4211406..fe148da 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -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 {