* commit '1ed64c65a7b4d33799ca42cb4422d8382929cac2': Make sure we clean up
This commit is contained in:
@@ -1185,6 +1185,7 @@ public class MediaScanner
|
||||
HashSet<String> existingFiles = new HashSet<String>();
|
||||
String directory = "/sdcard/DCIM/.thumbnails";
|
||||
String [] files = (new File(directory)).list();
|
||||
Cursor c = null;
|
||||
if (files == null)
|
||||
files = new String[0];
|
||||
|
||||
@@ -1194,7 +1195,7 @@ public class MediaScanner
|
||||
}
|
||||
|
||||
try {
|
||||
Cursor c = mMediaProvider.query(
|
||||
c = mMediaProvider.query(
|
||||
mPackageName,
|
||||
mThumbsUri,
|
||||
new String [] { "_data" },
|
||||
@@ -1219,11 +1220,12 @@ public class MediaScanner
|
||||
}
|
||||
|
||||
Log.v(TAG, "/pruneDeadThumbnailFiles... " + c);
|
||||
} catch (RemoteException e) {
|
||||
// We will soon be killed...
|
||||
} finally {
|
||||
if (c != null) {
|
||||
c.close();
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
// We will soon be killed...
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user