Merge "Remove "HOME" directory. Use "Documents" instead." into nyc-dev
am: 25a7ee08f6
* commit '25a7ee08f6eaa1c0e9e2b2a0ef9b6fe8ecf5da23':
Remove "HOME" directory. Use "Documents" instead.
This commit is contained in:
@@ -28574,7 +28574,6 @@ package android.os {
|
|||||||
field public static java.lang.String DIRECTORY_DCIM;
|
field public static java.lang.String DIRECTORY_DCIM;
|
||||||
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
||||||
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
||||||
field public static java.lang.String DIRECTORY_HOME;
|
|
||||||
field public static java.lang.String DIRECTORY_MOVIES;
|
field public static java.lang.String DIRECTORY_MOVIES;
|
||||||
field public static java.lang.String DIRECTORY_MUSIC;
|
field public static java.lang.String DIRECTORY_MUSIC;
|
||||||
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
||||||
|
|||||||
@@ -30858,7 +30858,6 @@ package android.os {
|
|||||||
field public static java.lang.String DIRECTORY_DCIM;
|
field public static java.lang.String DIRECTORY_DCIM;
|
||||||
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
||||||
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
||||||
field public static java.lang.String DIRECTORY_HOME;
|
|
||||||
field public static java.lang.String DIRECTORY_MOVIES;
|
field public static java.lang.String DIRECTORY_MOVIES;
|
||||||
field public static java.lang.String DIRECTORY_MUSIC;
|
field public static java.lang.String DIRECTORY_MUSIC;
|
||||||
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
||||||
|
|||||||
@@ -28583,7 +28583,6 @@ package android.os {
|
|||||||
field public static java.lang.String DIRECTORY_DCIM;
|
field public static java.lang.String DIRECTORY_DCIM;
|
||||||
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
field public static java.lang.String DIRECTORY_DOCUMENTS;
|
||||||
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
field public static java.lang.String DIRECTORY_DOWNLOADS;
|
||||||
field public static java.lang.String DIRECTORY_HOME;
|
|
||||||
field public static java.lang.String DIRECTORY_MOVIES;
|
field public static java.lang.String DIRECTORY_MOVIES;
|
||||||
field public static java.lang.String DIRECTORY_MUSIC;
|
field public static java.lang.String DIRECTORY_MUSIC;
|
||||||
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
field public static java.lang.String DIRECTORY_NOTIFICATIONS;
|
||||||
|
|||||||
@@ -475,11 +475,6 @@ public class Environment {
|
|||||||
*/
|
*/
|
||||||
public static String DIRECTORY_DOCUMENTS = "Documents";
|
public static String DIRECTORY_DOCUMENTS = "Documents";
|
||||||
|
|
||||||
/**
|
|
||||||
* Standard directory in which user managed files are stored.
|
|
||||||
*/
|
|
||||||
public static String DIRECTORY_HOME = "Home";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of standard storage directories.
|
* List of standard storage directories.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -495,7 +490,6 @@ public class Environment {
|
|||||||
* <li>{@link #DIRECTORY_DOWNLOADS}
|
* <li>{@link #DIRECTORY_DOWNLOADS}
|
||||||
* <li>{@link #DIRECTORY_DCIM}
|
* <li>{@link #DIRECTORY_DCIM}
|
||||||
* <li>{@link #DIRECTORY_DOCUMENTS}
|
* <li>{@link #DIRECTORY_DOCUMENTS}
|
||||||
* <li>{@link #DIRECTORY_HOME}
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@@ -509,8 +503,7 @@ public class Environment {
|
|||||||
DIRECTORY_MOVIES,
|
DIRECTORY_MOVIES,
|
||||||
DIRECTORY_DOWNLOADS,
|
DIRECTORY_DOWNLOADS,
|
||||||
DIRECTORY_DCIM,
|
DIRECTORY_DCIM,
|
||||||
DIRECTORY_DOCUMENTS,
|
DIRECTORY_DOCUMENTS
|
||||||
DIRECTORY_HOME
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,5 +20,5 @@ Copyright (C) 2015 The Android Open Source Project
|
|||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FF000000"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
android:pathData="M10 4H4c-1.1 0,-1.99.9,-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2,-.9 2,-2V8c0,-1.1,-.9,-2,-2,-2h-8l-2,-2z"/>
|
||||||
</vector>
|
</vector>
|
||||||
@@ -171,7 +171,7 @@ public class RootInfo implements Durable, Parcelable {
|
|||||||
|
|
||||||
// TODO: remove these special case icons
|
// TODO: remove these special case icons
|
||||||
if (isHome()) {
|
if (isHome()) {
|
||||||
derivedIcon = R.drawable.ic_root_home;
|
derivedIcon = R.drawable.ic_root_documents;
|
||||||
derivedType = TYPE_LOCAL;
|
derivedType = TYPE_LOCAL;
|
||||||
} else if (isExternalStorage()) {
|
} else if (isExternalStorage()) {
|
||||||
derivedIcon = R.drawable.ic_root_smartphone;
|
derivedIcon = R.drawable.ic_root_smartphone;
|
||||||
|
|||||||
@@ -20,6 +20,6 @@
|
|||||||
|
|
||||||
<!-- Title for documents backend that offers internal storage. [CHAR LIMIT=24] -->
|
<!-- Title for documents backend that offers internal storage. [CHAR LIMIT=24] -->
|
||||||
<string name="root_internal_storage">Internal storage</string>
|
<string name="root_internal_storage">Internal storage</string>
|
||||||
<!-- Title for user home dir. [CHAR LIMIT=24] -->
|
<!-- Title for directory in which a user may store their own documents and files. [CHAR LIMIT=24] -->
|
||||||
<string name="root_home">Home</string>
|
<string name="root_documents">Documents</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class ExternalStorageProvider extends DocumentsProvider {
|
|||||||
final RootInfo root = new RootInfo();
|
final RootInfo root = new RootInfo();
|
||||||
root.rootId = ROOT_ID_HOME;
|
root.rootId = ROOT_ID_HOME;
|
||||||
mRoots.put(root.rootId, root);
|
mRoots.put(root.rootId, root);
|
||||||
root.title = getContext().getString(R.string.root_home);
|
root.title = getContext().getString(R.string.root_documents);
|
||||||
|
|
||||||
// Only report bytes on *volumes*...as a matter of policy.
|
// Only report bytes on *volumes*...as a matter of policy.
|
||||||
root.reportAvailableBytes = false;
|
root.reportAvailableBytes = false;
|
||||||
@@ -214,9 +214,9 @@ public class ExternalStorageProvider extends DocumentsProvider {
|
|||||||
// Create the "Home" directory on disk, but don't the localized root.title
|
// Create the "Home" directory on disk, but don't the localized root.title
|
||||||
// since the directories shouldn't be localized.
|
// since the directories shouldn't be localized.
|
||||||
root.visiblePath = new File(
|
root.visiblePath = new File(
|
||||||
primaryVolume.getPathForUser(userId), Environment.DIRECTORY_HOME);
|
primaryVolume.getPathForUser(userId), Environment.DIRECTORY_DOCUMENTS);
|
||||||
root.path = new File(
|
root.path = new File(
|
||||||
primaryVolume.getInternalPathForUser(userId), root.rootId);
|
primaryVolume.getInternalPathForUser(userId), Environment.DIRECTORY_DOCUMENTS);
|
||||||
try {
|
try {
|
||||||
root.docId = getDocIdForFile(root.path);
|
root.docId = getDocIdForFile(root.path);
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user