Fix outgoincall resuming and proximity sensor

This commit is contained in:
Margaux Clerc 2016-02-26 15:56:33 +01:00
parent b4266c94fe
commit 0302654fbd
3 changed files with 12 additions and 7 deletions

View file

@ -1416,6 +1416,8 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
mControls = null; mControls = null;
mControlsHandler = null; mControlsHandler = null;
mSensorManager.unregisterListener(this);
unbindDrawables(findViewById(R.id.topLayout)); unbindDrawables(findViewById(R.id.topLayout));
instance = null; instance = null;
super.onDestroy(); super.onDestroy();

View file

@ -119,6 +119,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private RelativeLayout sideMenuContent, quitLayout, defaultAccount; private RelativeLayout sideMenuContent, quitLayout, defaultAccount;
private ListView accountsList, sideMenuItemList; private ListView accountsList, sideMenuItemList;
private ImageView menu; private ImageView menu;
private Dialog authInfoPassword;
static final boolean isInstanciated() { static final boolean isInstanciated() {
return instance != null; return instance != null;
@ -196,6 +197,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} }
} }
@Override
public void authInfoRequested(LinphoneCore lc, String realm, String username, String domain) {
//authInfoPassword = displayWrongPasswordDialog(username, realm, domain);
//authInfoPassword.show();
}
@Override @Override
public void registrationState(LinphoneCore lc, LinphoneProxyConfig proxy, LinphoneCore.RegistrationState state, String smessage) { public void registrationState(LinphoneCore lc, LinphoneProxyConfig proxy, LinphoneCore.RegistrationState state, String smessage) {
if (state.equals(RegistrationState.RegistrationCleared)) { if (state.equals(RegistrationState.RegistrationCleared)) {
@ -211,7 +218,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
if(state.equals(RegistrationState.RegistrationFailed) && newProxyConfig) { if(state.equals(RegistrationState.RegistrationFailed) && newProxyConfig) {
newProxyConfig = false; newProxyConfig = false;
if (proxy.getError() == Reason.BadCredentials) { if (proxy.getError() == Reason.BadCredentials) {
displayCustomToast(getString(R.string.error_bad_credentials), Toast.LENGTH_LONG); //displayCustomToast(getString(R.string.error_bad_credentials), Toast.LENGTH_LONG);
} }
if (proxy.getError() == Reason.Unauthorized) { if (proxy.getError() == Reason.Unauthorized) {
displayCustomToast(getString(R.string.error_unauthorized), Toast.LENGTH_LONG); displayCustomToast(getString(R.string.error_unauthorized), Toast.LENGTH_LONG);
@ -827,7 +834,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("Account", accountNumber); bundle.putInt("Account", accountNumber);
changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle); changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle);
mTabBar.setVisibility(View.VISIBLE);
//settings.setSelected(true); //settings.setSelected(true);
} }
@ -1199,7 +1205,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
LinphoneCall.State callState = call.getState(); LinphoneCall.State callState = call.getState();
if (callState == State.IncomingReceived) { if (callState == State.IncomingReceived) {
startActivity(new Intent(this, CallIncomingActivity.class)); startActivity(new Intent(this, CallIncomingActivity.class));
} else if (callState == State.OutgoingInit) { } else if (callState == State.OutgoingInit || callState == State.OutgoingProgress || callState == State.OutgoingRinging) {
startActivity(new Intent(this, CallOutgoingActivity.class)); startActivity(new Intent(this, CallOutgoingActivity.class));
} else { } else {
if (call.getCurrentParamsCopy().getVideoEnabled()) { if (call.getCurrentParamsCopy().getVideoEnabled()) {

View file

@ -829,10 +829,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
public void displayWarning(LinphoneCore lc, String message) {} public void displayWarning(LinphoneCore lc, String message) {}
public void authInfoRequested(LinphoneCore lc, String realm, String username, String domain) { public void authInfoRequested(LinphoneCore lc, String realm, String username, String domain) {}
//Dialog authInfoPassword = LinphoneActivity.instance().displayPasswordDialog(username, realm, domain);
//authInfoPassword.show();
}
public void byeReceived(LinphoneCore lc, String from) {} public void byeReceived(LinphoneCore lc, String from) {}
public void displayMessage(LinphoneCore lc, String message) {} public void displayMessage(LinphoneCore lc, String message) {}
public void show(LinphoneCore lc) {} public void show(LinphoneCore lc) {}