summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
diff options
context:
space:
mode:
authorDaichi Hirono <hirono@google.com>2015-04-17 16:19:15 +0900
committerDaichi Hirono <hirono@google.com>2015-04-20 20:01:49 +0900
commitcf0e9ace5eecc4457b9bd6e92a3c8391c09654d9 (patch)
tree8df9322911124ac6a36261e58f15d05d0d6b4001 /packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
parent65769551dfc5b9081b2423ffd521d19398b5808a (diff)
downloadframeworks_base-cf0e9ace5eecc4457b9bd6e92a3c8391c09654d9.zip
frameworks_base-cf0e9ace5eecc4457b9bd6e92a3c8391c09654d9.tar.gz
frameworks_base-cf0e9ace5eecc4457b9bd6e92a3c8391c09654d9.tar.bz2
DocumentsUI: Save source file list into BaseActivity.State.
This is needed so that the activity does not lost the list on screen rotation. BUG=20283251 Change-Id: I8f971bab0a0ce2066fd5fea29b98b355cb948ea6
Diffstat (limited to 'packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
index 66792da..8039b71 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
@@ -16,6 +16,7 @@
package com.android.documentsui;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -95,6 +96,9 @@ abstract class BaseActivity extends Activity {
/** Instance state for every shown directory */
public HashMap<String, SparseArray<Parcelable>> dirState = Maps.newHashMap();
+ /** Currently copying file */
+ public List<DocumentInfo> selectedDocumentsForCopy = new ArrayList<DocumentInfo>();
+
public static final int ACTION_OPEN = 1;
public static final int ACTION_CREATE = 2;
public static final int ACTION_GET_CONTENT = 3;
@@ -134,6 +138,7 @@ abstract class BaseActivity extends Activity {
DurableUtils.writeToParcel(out, stack);
out.writeString(currentSearch);
out.writeMap(dirState);
+ out.writeList(selectedDocumentsForCopy);
}
public static final Creator<State> CREATOR = new Creator<State>() {
@@ -154,6 +159,7 @@ abstract class BaseActivity extends Activity {
DurableUtils.readFromParcel(in, state.stack);
state.currentSearch = in.readString();
in.readMap(state.dirState, null);
+ in.readList(state.selectedDocumentsForCopy, null);
return state;
}