Fix destroy of ContactsManager in LinphoneManager

This commit is contained in:
Erwan Croze 2017-05-18 15:59:41 +02:00
parent ca572887b2
commit 8b719d2011
2 changed files with 4 additions and 5 deletions

View file

@ -1098,13 +1098,13 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
}
public static void ContactsManagerDestroy() {
if (ContactsManager.getInstance() != null)
ContactsManager.getInstance().destroy();
if (LinphoneManager.instance != null && LinphoneManager.instance.mServiceContext != null)
LinphoneManager.instance.mServiceContext.getContentResolver().unregisterContentObserver(ContactsManager.getInstance());
ContactsManager.getInstance().destroy();
}
public static void BluetoothManagerDestroy() {
if (BluetoothManager.getInstance() != null)
BluetoothManager.getInstance().destroy();
BluetoothManager.getInstance().destroy();
}
public static synchronized void destroy() {

View file

@ -799,7 +799,6 @@ public final class LinphoneService extends Service {
}
instance = null;
getContentResolver().unregisterContentObserver(ContactsManager.getInstance());
LinphoneManager.destroy();
// Make sure our notification is gone.