Fix crash on Android 2.2 on call
This commit is contained in:
parent
82036f3e57
commit
360e437597
1 changed files with 10 additions and 3 deletions
|
@ -483,7 +483,10 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
stopForegroundCompat(NOTIF_ID);
|
stopForegroundCompat(NOTIF_ID);
|
||||||
mNM.cancel(INCALL_NOTIF_ID);
|
mNM.cancel(INCALL_NOTIF_ID);
|
||||||
mNM.cancel(MESSAGE_NOTIF_ID);
|
mNM.cancel(MESSAGE_NOTIF_ID);
|
||||||
|
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API12_HONEYCOMB_MR1_31X)) {
|
||||||
mWifiLock.release();
|
mWifiLock.release();
|
||||||
|
}
|
||||||
((AlarmManager) this.getSystemService(Context.ALARM_SERVICE)).cancel(mkeepAlivePendingIntent);
|
((AlarmManager) this.getSystemService(Context.ALARM_SERVICE)).cancel(mkeepAlivePendingIntent);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
@ -588,14 +591,18 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
// Workaround bug current call seems to be updated after state changed to streams running
|
// Workaround bug current call seems to be updated after state changed to streams running
|
||||||
if (getResources().getBoolean(R.bool.enable_call_notification))
|
if (getResources().getBoolean(R.bool.enable_call_notification))
|
||||||
refreshIncallIcon(call);
|
refreshIncallIcon(call);
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API12_HONEYCOMB_MR1_31X)) {
|
||||||
mWifiLock.acquire();
|
mWifiLock.acquire();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getResources().getBoolean(R.bool.enable_call_notification))
|
if (getResources().getBoolean(R.bool.enable_call_notification))
|
||||||
refreshIncallIcon(LinphoneManager.getLc().getCurrentCall());
|
refreshIncallIcon(LinphoneManager.getLc().getCurrentCall());
|
||||||
}
|
}
|
||||||
if ((state == State.CallEnd || state == State.Error) && LinphoneManager.getLc().getCallsNb() < 1) {
|
if ((state == State.CallEnd || state == State.Error) && LinphoneManager.getLc().getCallsNb() < 1) {
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API12_HONEYCOMB_MR1_31X)) {
|
||||||
mWifiLock.release();
|
mWifiLock.release();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mHandler.post(new Runnable() {
|
mHandler.post(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Reference in a new issue