Some fixes

This commit is contained in:
Sylvain Berfini 2012-10-02 16:21:56 +02:00
parent a7449bb46b
commit 9ecd852a23
7 changed files with 24 additions and 14 deletions

View file

@ -29,6 +29,7 @@ import org.linphone.core.LinphoneCore;
import org.linphone.core.LinphoneCoreException;
import org.linphone.core.Log;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
import org.linphone.mediastream.video.capture.hwconf.Hacks;
import org.linphone.ui.Numpad;
import android.app.Activity;
@ -100,7 +101,7 @@ public class InCallActivity extends FragmentActivity implements
super.onCreate(savedInstanceState);
instance = this;
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
setContentView(R.layout.incall);
isVideoEnabled = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("VideoEnabled");
@ -870,12 +871,14 @@ public class InCallActivity extends FragmentActivity implements
switchVideo(isVideoEnabled);
} else {
//Hack to fix Galaxy S issue
if (isSpeakerEnabled) {
LinphoneManager.getInstance().routeAudioToSpeaker();
} else {
LinphoneManager.getInstance().routeAudioToReceiver();
if (Hacks.needGalaxySAudioHack()) {
if (isSpeakerEnabled) {
LinphoneManager.getInstance().routeAudioToSpeaker();
} else {
LinphoneManager.getInstance().routeAudioToReceiver();
}
LinphoneManager.getLc().enableSpeaker(isSpeakerEnabled);
}
LinphoneManager.getLc().enableSpeaker(isSpeakerEnabled);
}
isMicMuted = LinphoneManager.getLc().isMicMuted();

View file

@ -1125,7 +1125,9 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
}
}
} else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
statusFragment.openOrCloseStatusBar();
if (event.getRepeatCount() < 1) {
statusFragment.openOrCloseStatusBar();
}
}
return super.onKeyDown(keyCode, event);
}

View file

@ -608,7 +608,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
if (username != null && username.length() > 0) {
LinphoneAuthInfo lAuthInfo = LinphoneCoreFactory.instance().createAuthInfo(username, password, domain);
LinphoneAuthInfo lAuthInfo = LinphoneCoreFactory.instance().createAuthInfo(username, password, null);
mLc.addAuthInfo(lAuthInfo);
if (domain != null && domain.length() > 0) {

View file

@ -501,10 +501,10 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
public void onRegistrationStateChanged(final RegistrationState state,
final String message) {
if (instance == null) {
Log.i("Service not ready, discarding registration state change to ",state.toString());
return;
}
// if (instance == null) {
// Log.i("Service not ready, discarding registration state change to ",state.toString());
// return;
// }
if (state == RegistrationState.RegistrationOk && LinphoneManager.getLc().getDefaultProxyConfig().isRegistered()) {
sendNotification(IC_LEVEL_ORANGE, R.string.notification_registered);
}

View file

@ -23,7 +23,7 @@ class LinphoneAuthInfoImpl implements LinphoneAuthInfo {
private native long newLinphoneAuthInfo(String username, String userid, String passwd, String ha1,String realm);
private native void delete(long ptr);
protected LinphoneAuthInfoImpl(String username,String password, String realm) {
nativePtr = newLinphoneAuthInfo(username,null,password,null,realm);
nativePtr = newLinphoneAuthInfo(username,"",password,"","");
}
protected void finalize() throws Throwable {
delete(nativePtr);

View file

@ -29,6 +29,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
private native int getStatus(long nativePtr);
private native String getStartDate(long nativePtr);
private native int getCallDuration(long nativePtr);
private native int getCallId(long nativePtr);
LinphoneCallLogImpl(long aNativePtr) {
nativePtr = aNativePtr;
@ -60,4 +61,8 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
public int getCallDuration() {
return getCallDuration(nativePtr);
}
@Override
public int getCallId() {
return getCallId(nativePtr);
}
}

@ -1 +1 @@
Subproject commit 438a8f4f73e54aa53cd9ac349f354601704a5862
Subproject commit 61312092bbda523c8fa98c9804d123a5308d2e57