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() {
|
private void destroyCore() {
|
||||||
Log.w("[Manager] Destroying Core");
|
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.stop();
|
||||||
mCore.removeListener(mCoreListener);
|
mCore.removeListener(mCoreListener);
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,6 +559,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
if (LinphoneContext.isReady()) {
|
if (LinphoneContext.isReady()) {
|
||||||
ContactsManager.getInstance().enableContactsAccess();
|
ContactsManager.getInstance().enableContactsAccess();
|
||||||
ContactsManager.getInstance().initializeContactManager();
|
ContactsManager.getInstance().initializeContactManager();
|
||||||
|
ContactsManager.getInstance().fetchContactsAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (permissions[i].equals(Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
} else if (permissions[i].equals(Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||||
|
|
|
@ -1122,7 +1122,8 @@ public class CallActivity extends LinphoneGenericActivity
|
||||||
if (mCore.isInConference()) {
|
if (mCore.isInConference()) {
|
||||||
displayConferenceCall(call);
|
displayConferenceCall(call);
|
||||||
conferenceDisplayed = true;
|
conferenceDisplayed = true;
|
||||||
} else if (!pausedConferenceDisplayed) {
|
} else if (!pausedConferenceDisplayed
|
||||||
|
&& mCore.getCallsNb() > 1) { // Workaround for temporary SDK issue
|
||||||
displayPausedConference();
|
displayPausedConference();
|
||||||
pausedConferenceDisplayed = true;
|
pausedConferenceDisplayed = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,7 @@ public class ContactsFragment extends Fragment
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
ContactsManager.getInstance().addContactsListener(this);
|
ContactsManager.getInstance().addContactsListener(this);
|
||||||
|
|
||||||
mOnlyDisplayLinphoneContacts =
|
mOnlyDisplayLinphoneContacts =
|
||||||
|
@ -224,6 +225,7 @@ public class ContactsFragment extends Fragment
|
||||||
|
|
||||||
changeContactsToggle();
|
changeContactsToggle();
|
||||||
invalidate();
|
invalidate();
|
||||||
|
onContactsUpdated();
|
||||||
|
|
||||||
((ContactsActivity) (getActivity())).showTabBar();
|
((ContactsActivity) (getActivity())).showTabBar();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,11 +107,6 @@ public final class LinphoneService extends Service {
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
core.terminateAllCalls();
|
core.terminateAllCalls();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If push is enabled, don't unregister account, otherwise do unregister
|
|
||||||
if (LinphonePreferences.instance().isPushNotificationEnabled()) {
|
|
||||||
if (core != null) core.setNetworkReachable(false);
|
|
||||||
}
|
|
||||||
stopSelf();
|
stopSelf();
|
||||||
}
|
}
|
||||||
super.onTaskRemoved(rootIntent);
|
super.onTaskRemoved(rootIntent);
|
||||||
|
|
Loading…
Reference in a new issue