Merge "Undeprecate storage directory APIs" into sc-v2-dev
This commit is contained in:
@@ -31070,8 +31070,8 @@ package android.os {
|
|||||||
ctor public Environment();
|
ctor public Environment();
|
||||||
method public static java.io.File getDataDirectory();
|
method public static java.io.File getDataDirectory();
|
||||||
method public static java.io.File getDownloadCacheDirectory();
|
method public static java.io.File getDownloadCacheDirectory();
|
||||||
method @Deprecated public static java.io.File getExternalStorageDirectory();
|
method public static java.io.File getExternalStorageDirectory();
|
||||||
method @Deprecated public static java.io.File getExternalStoragePublicDirectory(String);
|
method public static java.io.File getExternalStoragePublicDirectory(String);
|
||||||
method public static String getExternalStorageState();
|
method public static String getExternalStorageState();
|
||||||
method public static String getExternalStorageState(java.io.File);
|
method public static String getExternalStorageState(java.io.File);
|
||||||
method @NonNull public static java.io.File getRootDirectory();
|
method @NonNull public static java.io.File getRootDirectory();
|
||||||
|
|||||||
@@ -189,13 +189,11 @@ public class Environment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
@Deprecated
|
|
||||||
public File getExternalStorageDirectory() {
|
public File getExternalStorageDirectory() {
|
||||||
return getExternalDirs()[0];
|
return getExternalDirs()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
@Deprecated
|
|
||||||
public File getExternalStoragePublicDirectory(String type) {
|
public File getExternalStoragePublicDirectory(String type) {
|
||||||
return buildExternalStoragePublicDirs(type)[0];
|
return buildExternalStoragePublicDirs(type)[0];
|
||||||
}
|
}
|
||||||
@@ -698,11 +696,7 @@ public class Environment {
|
|||||||
*
|
*
|
||||||
* @see #getExternalStorageState()
|
* @see #getExternalStorageState()
|
||||||
* @see #isExternalStorageRemovable()
|
* @see #isExternalStorageRemovable()
|
||||||
* @deprecated Alternatives such as {@link Context#getExternalFilesDir(String)},
|
|
||||||
* {@link MediaStore}, or {@link Intent#ACTION_OPEN_DOCUMENT} offer better
|
|
||||||
* performance.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static File getExternalStorageDirectory() {
|
public static File getExternalStorageDirectory() {
|
||||||
throwIfUserRequired();
|
throwIfUserRequired();
|
||||||
return sCurrentUser.getExternalDirs()[0];
|
return sCurrentUser.getExternalDirs()[0];
|
||||||
@@ -1009,11 +1003,7 @@ public class Environment {
|
|||||||
* @return Returns the File path for the directory. Note that this directory
|
* @return Returns the File path for the directory. Note that this directory
|
||||||
* may not yet exist, so you must make sure it exists before using
|
* may not yet exist, so you must make sure it exists before using
|
||||||
* it such as with {@link File#mkdirs File.mkdirs()}.
|
* it such as with {@link File#mkdirs File.mkdirs()}.
|
||||||
* @deprecated Alternatives such as {@link Context#getExternalFilesDir(String)},
|
|
||||||
* {@link MediaStore}, or {@link Intent#ACTION_OPEN_DOCUMENT} offer better
|
|
||||||
* performance.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static File getExternalStoragePublicDirectory(String type) {
|
public static File getExternalStoragePublicDirectory(String type) {
|
||||||
throwIfUserRequired();
|
throwIfUserRequired();
|
||||||
return sCurrentUser.buildExternalStoragePublicDirs(type)[0];
|
return sCurrentUser.buildExternalStoragePublicDirs(type)[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user