Some fixes
This commit is contained in:
parent
a7449bb46b
commit
9ecd852a23
7 changed files with 24 additions and 14 deletions
|
@ -29,6 +29,7 @@ import org.linphone.core.LinphoneCore;
|
||||||
import org.linphone.core.LinphoneCoreException;
|
import org.linphone.core.LinphoneCoreException;
|
||||||
import org.linphone.core.Log;
|
import org.linphone.core.Log;
|
||||||
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
|
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
|
||||||
|
import org.linphone.mediastream.video.capture.hwconf.Hacks;
|
||||||
import org.linphone.ui.Numpad;
|
import org.linphone.ui.Numpad;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -100,7 +101,7 @@ public class InCallActivity extends FragmentActivity implements
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
instance = this;
|
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);
|
setContentView(R.layout.incall);
|
||||||
|
|
||||||
isVideoEnabled = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("VideoEnabled");
|
isVideoEnabled = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("VideoEnabled");
|
||||||
|
@ -870,6 +871,7 @@ public class InCallActivity extends FragmentActivity implements
|
||||||
switchVideo(isVideoEnabled);
|
switchVideo(isVideoEnabled);
|
||||||
} else {
|
} else {
|
||||||
//Hack to fix Galaxy S issue
|
//Hack to fix Galaxy S issue
|
||||||
|
if (Hacks.needGalaxySAudioHack()) {
|
||||||
if (isSpeakerEnabled) {
|
if (isSpeakerEnabled) {
|
||||||
LinphoneManager.getInstance().routeAudioToSpeaker();
|
LinphoneManager.getInstance().routeAudioToSpeaker();
|
||||||
} else {
|
} else {
|
||||||
|
@ -877,6 +879,7 @@ public class InCallActivity extends FragmentActivity implements
|
||||||
}
|
}
|
||||||
LinphoneManager.getLc().enableSpeaker(isSpeakerEnabled);
|
LinphoneManager.getLc().enableSpeaker(isSpeakerEnabled);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
isMicMuted = LinphoneManager.getLc().isMicMuted();
|
isMicMuted = LinphoneManager.getLc().isMicMuted();
|
||||||
enableAndRefreshInCallActions();
|
enableAndRefreshInCallActions();
|
||||||
|
|
|
@ -1125,8 +1125,10 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
|
} else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
|
||||||
|
if (event.getRepeatCount() < 1) {
|
||||||
statusFragment.openOrCloseStatusBar();
|
statusFragment.openOrCloseStatusBar();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -608,7 +608,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
|
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
|
||||||
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
|
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
|
||||||
if (username != null && username.length() > 0) {
|
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);
|
mLc.addAuthInfo(lAuthInfo);
|
||||||
|
|
||||||
if (domain != null && domain.length() > 0) {
|
if (domain != null && domain.length() > 0) {
|
||||||
|
|
|
@ -501,10 +501,10 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
|
|
||||||
public void onRegistrationStateChanged(final RegistrationState state,
|
public void onRegistrationStateChanged(final RegistrationState state,
|
||||||
final String message) {
|
final String message) {
|
||||||
if (instance == null) {
|
// if (instance == null) {
|
||||||
Log.i("Service not ready, discarding registration state change to ",state.toString());
|
// Log.i("Service not ready, discarding registration state change to ",state.toString());
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (state == RegistrationState.RegistrationOk && LinphoneManager.getLc().getDefaultProxyConfig().isRegistered()) {
|
if (state == RegistrationState.RegistrationOk && LinphoneManager.getLc().getDefaultProxyConfig().isRegistered()) {
|
||||||
sendNotification(IC_LEVEL_ORANGE, R.string.notification_registered);
|
sendNotification(IC_LEVEL_ORANGE, R.string.notification_registered);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class LinphoneAuthInfoImpl implements LinphoneAuthInfo {
|
||||||
private native long newLinphoneAuthInfo(String username, String userid, String passwd, String ha1,String realm);
|
private native long newLinphoneAuthInfo(String username, String userid, String passwd, String ha1,String realm);
|
||||||
private native void delete(long ptr);
|
private native void delete(long ptr);
|
||||||
protected LinphoneAuthInfoImpl(String username,String password, String realm) {
|
protected LinphoneAuthInfoImpl(String username,String password, String realm) {
|
||||||
nativePtr = newLinphoneAuthInfo(username,null,password,null,realm);
|
nativePtr = newLinphoneAuthInfo(username,"",password,"","");
|
||||||
}
|
}
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
delete(nativePtr);
|
delete(nativePtr);
|
||||||
|
|
|
@ -29,6 +29,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
|
||||||
private native int getStatus(long nativePtr);
|
private native int getStatus(long nativePtr);
|
||||||
private native String getStartDate(long nativePtr);
|
private native String getStartDate(long nativePtr);
|
||||||
private native int getCallDuration(long nativePtr);
|
private native int getCallDuration(long nativePtr);
|
||||||
|
private native int getCallId(long nativePtr);
|
||||||
|
|
||||||
LinphoneCallLogImpl(long aNativePtr) {
|
LinphoneCallLogImpl(long aNativePtr) {
|
||||||
nativePtr = aNativePtr;
|
nativePtr = aNativePtr;
|
||||||
|
@ -60,4 +61,8 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
|
||||||
public int getCallDuration() {
|
public int getCallDuration() {
|
||||||
return getCallDuration(nativePtr);
|
return getCallDuration(nativePtr);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public int getCallId() {
|
||||||
|
return getCallId(nativePtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 438a8f4f73e54aa53cd9ac349f354601704a5862
|
Subproject commit 61312092bbda523c8fa98c9804d123a5308d2e57
|
Loading…
Reference in a new issue