am 375b6d98: Merge "Force closed at settings application when delete Misc files"

* commit '375b6d985be9203fb221eb42810e586e196c34f8':
  Force closed at settings application when delete Misc files
This commit is contained in:
Elliott Hughes
2013-01-22 07:58:42 -08:00
committed by Android Git Automerger

View File

@@ -144,8 +144,8 @@ public class MiscFilesHandler extends ListActivity {
// Returns true if all deletions were successful. // Returns true if all deletions were successful.
// If a deletion fails, the method stops attempting to delete and returns false. // If a deletion fails, the method stops attempting to delete and returns false.
private boolean deleteDir(File dir) { private boolean deleteDir(File dir) {
if (dir.isDirectory()) { String[] children = dir.list();
String[] children = dir.list(); if (children != null) {
for (int i=0; i < children.length; i++) { for (int i=0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i])); boolean success = deleteDir(new File(dir, children[i]));
if (!success) { if (!success) {