diff options
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); + } } } |