docs: Fix outdated sample code in Context#getExternalFilesDir. Test: make ds-docs am: f767eb4aa9
am: cc4b685d3e
Change-Id: I183df0eaf62658dbf90c2e696144e1ef04e5b456
This commit is contained in:
@@ -339,20 +339,15 @@ public class ExternalStorage extends Activity {
|
||||
// Get path for the file on external storage. If external
|
||||
// storage is not currently mounted this will fail.
|
||||
File file = new File(getExternalFilesDir(null), "DemoFile.jpg");
|
||||
if (file != null) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
boolean hasExternalStoragePrivateFile() {
|
||||
// Get path for the file on external storage. If external
|
||||
// storage is not currently mounted this will fail.
|
||||
File file = new File(getExternalFilesDir(null), "DemoFile.jpg");
|
||||
if (file != null) {
|
||||
return file.exists();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// END_INCLUDE(private_file)
|
||||
|
||||
Item createStorageControls(CharSequence label, File path,
|
||||
|
||||
Reference in New Issue
Block a user