diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-08-21 02:19:23 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-08-21 02:19:23 +0000 |
commit | b5e7307b8a76e9099d45ba275e0d6b62929f3edb (patch) | |
tree | 64228ce1e504bcdf09b0b94dbad413640fe1ec57 | |
parent | 1ed95b5d3df2d9619454ec95157465b0d87a5aa4 (diff) | |
parent | cc4b685d3efcb73eba2977900af2734c2bfc6daf (diff) | |
download | development-android10-c2f2-s1-release.tar.gz |
Snap for 5817401 from cc4b685d3efcb73eba2977900af2734c2bfc6daf to qt-c2f2-releaseandroid-10.0.0_r9android-10.0.0_r8android-10.0.0_r7android-10.0.0_r14android-10.0.0_r13android-10.0.0_r12android10-c2f2-s2-releaseandroid10-c2f2-s1-releaseandroid10-c2f2-release
Change-Id: I885afa1bd4ea33f63e74aab4db20014302e60c6f
-rw-r--r-- | samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java | 9 |
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) |