Merge \\\\"Fix memory leak in MediaScannerConnection\\\\" am: e40ab18590 am: 0d5bcda101 am: fd743b4d56
am: c737306bf9
Change-Id: I6ac82941cb1d5facab286d3ece9966908f6996a9
This commit is contained in:
@@ -133,6 +133,10 @@ public class MediaScannerConnection implements ServiceConnection {
|
||||
}
|
||||
try {
|
||||
mContext.unbindService(this);
|
||||
if (mClient instanceof ClientProxy) {
|
||||
mClient = null;
|
||||
}
|
||||
mService = null;
|
||||
} catch (IllegalArgumentException ex) {
|
||||
if (false) {
|
||||
Log.v(TAG, "disconnect failed: " + ex);
|
||||
@@ -205,6 +209,7 @@ public class MediaScannerConnection implements ServiceConnection {
|
||||
void scanNextPath() {
|
||||
if (mNextPath >= mPaths.length) {
|
||||
mConnection.disconnect();
|
||||
mConnection = null;
|
||||
return;
|
||||
}
|
||||
String mimeType = mMimeTypes != null ? mMimeTypes[mNextPath] : null;
|
||||
|
||||
Reference in New Issue
Block a user