docs: Fix outdated sample code in Context#getExternalFilesDir. Test: make ds-docs am: f767eb4aa9 am: cc4b685d3e
am: 458535f402
Change-Id: I598109be9bb03349f93e9266e18372aa5e9f199e
This commit is contained in:
@@ -339,19 +339,14 @@ 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();
|
||||
}
|
||||
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;
|
||||
return file.exists();
|
||||
}
|
||||
// END_INCLUDE(private_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user