diff options
author | Tomasz Mikolajewski <mtomasz@google.com> | 2015-06-17 23:51:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-17 23:51:07 +0000 |
commit | 9ce9ffec9e307e29c3d575854d4e357ecf06d2d8 (patch) | |
tree | 5edf3785419e6c84877daac6a2e038f2176c2395 /packages | |
parent | 802ece61399e94bbe98cafaa277c71bee73c03ba (diff) | |
parent | 0e591f95bd023fc153520efe0852180bb580a442 (diff) | |
download | frameworks_base-9ce9ffec9e307e29c3d575854d4e357ecf06d2d8.zip frameworks_base-9ce9ffec9e307e29c3d575854d4e357ecf06d2d8.tar.gz frameworks_base-9ce9ffec9e307e29c3d575854d4e357ecf06d2d8.tar.bz2 |
Merge "Allow to customize title of the dialog." into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index 90ccf91..4211406 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -393,13 +393,18 @@ public class DocumentsActivity extends BaseActivity { @Override public void updateActionBar() { if (mRootsToolbar != null) { - if (mState.action == ACTION_OPEN || - mState.action == ACTION_GET_CONTENT || - mState.action == ACTION_OPEN_TREE) { - mRootsToolbar.setTitle(R.string.title_open); - } else if (mState.action == ACTION_CREATE || - mState.action == ACTION_OPEN_COPY_DESTINATION) { - mRootsToolbar.setTitle(R.string.title_save); + final String prompt = getIntent().getStringExtra(DocumentsContract.EXTRA_PROMPT); + if (prompt != null) { + mRootsToolbar.setTitle(prompt); + } else { + if (mState.action == ACTION_OPEN || + mState.action == ACTION_GET_CONTENT || + mState.action == ACTION_OPEN_TREE) { + mRootsToolbar.setTitle(R.string.title_open); + } else if (mState.action == ACTION_CREATE || + mState.action == ACTION_OPEN_COPY_DESTINATION) { + mRootsToolbar.setTitle(R.string.title_save); + } } } |