Fix crash if no external storage.
Change-Id: If5b0386b686d65cf9026a3c00459db371ab81b3a
This commit is contained in:
@@ -425,7 +425,7 @@ public class MemoryMeasurement {
|
|||||||
File top = Environment.getExternalStorageDirectory();
|
File top = Environment.getExternalStorageDirectory();
|
||||||
mFileInfoForMisc = new ArrayList<FileInfo>();
|
mFileInfoForMisc = new ArrayList<FileInfo>();
|
||||||
File[] files = top.listFiles();
|
File[] files = top.listFiles();
|
||||||
int len = files.length;
|
int len = files != null ? files.length : 0;
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user