summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-08-21 02:19:23 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-08-21 02:19:23 +0000
commitb5e7307b8a76e9099d45ba275e0d6b62929f3edb (patch)
tree64228ce1e504bcdf09b0b94dbad413640fe1ec57
parent1ed95b5d3df2d9619454ec95157465b0d87a5aa4 (diff)
parentcc4b685d3efcb73eba2977900af2734c2bfc6daf (diff)
downloaddevelopment-android10-c2f2-s1-release.tar.gz
Change-Id: I885afa1bd4ea33f63e74aab4db20014302e60c6f
-rw-r--r--samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java b/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
index 534a1c822..b76d1b42a 100644
--- a/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
+++ b/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
@@ -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)