add support for android 1.5
This commit is contained in:
parent
cf93c422b5
commit
4749970d5c
12 changed files with 14 additions and 15 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.linphone"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
android:versionCode="104"
|
||||
android:versionName="1.04">
|
||||
<uses-sdk android:minSdkVersion="3" />
|
||||
<application android:icon="@drawable/linphone2" android:label="@string/app_name" android:debuggable = "true">
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-4
|
||||
target=android-3
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
|
@ -17,6 +17,7 @@
|
|||
<string name="wrong_username">wrong user name</string>
|
||||
<string name="wrong_passwd">wrong password</string>
|
||||
<string name="wrong_domain">Wrong domain</string>
|
||||
<string name="wrong_settings">Wrong settings</string>
|
||||
<string name="tab_dialer">Dialer</string>
|
||||
<string name="tab_contact">Contact</string>
|
||||
<string name="call_error">Cannot call %s</string>
|
||||
|
|
|
@ -404,7 +404,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
mWakeLock.release();
|
||||
}
|
||||
private void routeAudioToSpeaker() {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT) {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) <= 4 /*<donut*/) {
|
||||
mAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
||||
AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL);
|
||||
|
@ -414,7 +414,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
|
||||
}
|
||||
private void routeAudioToReceiver() {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT) {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) <=4 /*<donut*/) {
|
||||
mAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
||||
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
||||
AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL);
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.linphone.core.LinphoneCallLog.CallDirection;
|
|||
|
||||
import android.app.ListActivity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -115,7 +115,7 @@ public class LinphoneActivity extends TabActivity implements SensorEventListener
|
|||
super.onPause();
|
||||
if (isFinishing()) {
|
||||
//restaure audio settings
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT) {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) <=4 /*<donut*/) {
|
||||
mAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
||||
AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL);
|
||||
|
|
|
@ -221,7 +221,7 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
|
|||
try {
|
||||
if (lDefaultProxyConfig == null) {
|
||||
lDefaultProxyConfig = mLinphoneCore.createProxyConfig(lIdentity, lProxy, null,true);
|
||||
mLinphoneCore.addtProxyConfig(lDefaultProxyConfig);
|
||||
mLinphoneCore.addProxyConfig(lDefaultProxyConfig);
|
||||
mLinphoneCore.setDefaultProxyConfig(lDefaultProxyConfig);
|
||||
|
||||
} else {
|
||||
|
@ -246,10 +246,9 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
|
|||
ConnectivityManager lConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
mLinphoneCore.setNetworkStateReachable(lConnectivityManager.getActiveNetworkInfo().getState() ==NetworkInfo.State.CONNECTED);
|
||||
|
||||
}catch (LinphoneCoreException e) {
|
||||
throw new LinphoneException(e);
|
||||
} catch (LinphoneCoreException e) {
|
||||
throw new LinphoneConfigException(getString(R.string.wrong_settings));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public interface LinphoneCore {
|
|||
*/
|
||||
public void clearProxyConfigs();
|
||||
|
||||
public void addtProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException;
|
||||
public void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException;
|
||||
|
||||
public void setDefaultProxyConfig(LinphoneProxyConfig proxyCfg);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native long getDefaultProxyConfig(long nativePtr);
|
||||
|
||||
private native void setDefaultProxyConfig(long nativePtr,long proxyCfgNativePtr);
|
||||
private native int addProxyConfig(long nativePtr,long proxyCfgNativePtr);
|
||||
private native int addProxyConfig(LinphoneProxyConfig jprtoxyCfg,long nativePtr,long proxyCfgNativePtr);
|
||||
private native void clearAuthInfos(long nativePtr);
|
||||
|
||||
private native void clearProxyConfigs(long nativePtr);
|
||||
|
@ -100,9 +100,9 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
isValid();
|
||||
setDefaultProxyConfig(nativePtr,((LinphoneProxyConfigImpl)proxyCfg).nativePtr);
|
||||
}
|
||||
public synchronized void addtProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException{
|
||||
public synchronized void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException{
|
||||
isValid();
|
||||
if (addProxyConfig(nativePtr,((LinphoneProxyConfigImpl)proxyCfg).nativePtr) !=0) {
|
||||
if (addProxyConfig(proxyCfg,nativePtr,((LinphoneProxyConfigImpl)proxyCfg).nativePtr) !=0) {
|
||||
throw new LinphoneCoreException("bad proxy config");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue