Fixes more issues
This commit is contained in:
parent
7e5b9c4648
commit
b63b23a8b3
5 changed files with 5 additions and 15 deletions
|
@ -314,15 +314,6 @@ public class LinphoneManager implements SensorEventListener {
|
|||
|
||||
private void destroyCore() {
|
||||
Log.w("[Manager] Destroying Core");
|
||||
if (LinphonePreferences.instance() != null) {
|
||||
// We set network reachable at false before destroying the Core
|
||||
// to not send a register with expires at 0
|
||||
if (LinphonePreferences.instance().isPushNotificationEnabled()) {
|
||||
Log.w(
|
||||
"[Manager] Setting network reachability to False to prevent unregister and allow incoming push notifications");
|
||||
mCore.setNetworkReachable(false);
|
||||
}
|
||||
}
|
||||
mCore.stop();
|
||||
mCore.removeListener(mCoreListener);
|
||||
}
|
||||
|
|
|
@ -559,6 +559,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
if (LinphoneContext.isReady()) {
|
||||
ContactsManager.getInstance().enableContactsAccess();
|
||||
ContactsManager.getInstance().initializeContactManager();
|
||||
ContactsManager.getInstance().fetchContactsAsync();
|
||||
}
|
||||
}
|
||||
} else if (permissions[i].equals(Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
|
|
|
@ -1122,7 +1122,8 @@ public class CallActivity extends LinphoneGenericActivity
|
|||
if (mCore.isInConference()) {
|
||||
displayConferenceCall(call);
|
||||
conferenceDisplayed = true;
|
||||
} else if (!pausedConferenceDisplayed) {
|
||||
} else if (!pausedConferenceDisplayed
|
||||
&& mCore.getCallsNb() > 1) { // Workaround for temporary SDK issue
|
||||
displayPausedConference();
|
||||
pausedConferenceDisplayed = true;
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ public class ContactsFragment extends Fragment
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
ContactsManager.getInstance().addContactsListener(this);
|
||||
|
||||
mOnlyDisplayLinphoneContacts =
|
||||
|
@ -224,6 +225,7 @@ public class ContactsFragment extends Fragment
|
|||
|
||||
changeContactsToggle();
|
||||
invalidate();
|
||||
onContactsUpdated();
|
||||
|
||||
((ContactsActivity) (getActivity())).showTabBar();
|
||||
}
|
||||
|
|
|
@ -107,11 +107,6 @@ public final class LinphoneService extends Service {
|
|||
if (core != null) {
|
||||
core.terminateAllCalls();
|
||||
}
|
||||
|
||||
// If push is enabled, don't unregister account, otherwise do unregister
|
||||
if (LinphonePreferences.instance().isPushNotificationEnabled()) {
|
||||
if (core != null) core.setNetworkReachable(false);
|
||||
}
|
||||
stopSelf();
|
||||
}
|
||||
super.onTaskRemoved(rootIntent);
|
||||
|
|
Loading…
Reference in a new issue