OSDN Git Service

resource leakage in bluetooth MAP when empty message in phone.
authorZhihai Xu <zhihaixu@google.com>
Thu, 19 Sep 2013 23:20:52 +0000 (16:20 -0700)
committerZhihai Xu <zhihaixu@google.com>
Thu, 19 Sep 2013 23:20:52 +0000 (16:20 -0700)
bug:10844044
Change-Id: I60c1b0206d7ba4653d149bee2f9f0dd6da6a5afb

src/com/android/bluetooth/map/BluetoothMapContentObserver.java

index deadf84..96bf1ee 100644 (file)
@@ -1159,8 +1159,8 @@ public class BluetoothMapContentObserver {
                 Sms.moveMessageToFolder(mContext, msgInfo.uri,
                     Sms.MESSAGE_TYPE_FAILED, 0);
             } while (c.moveToNext());
-            c.close();
         }
+        if (c != null) c.close();
     }
 
     private void removeDeletedMessages() {