remove set_incall_mode fr sdk < donuts branches
This commit is contained in:
parent
5138d4b506
commit
0fa3d7bad2
5 changed files with 18 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.linphone"
|
package="org.linphone"
|
||||||
android:versionCode="1015" android:versionName="1.0.15">
|
android:versionCode="1016" android:versionName="1.0.16">
|
||||||
<uses-sdk android:minSdkVersion="3" />
|
<uses-sdk android:minSdkVersion="3" />
|
||||||
<application android:label="@string/app_name" android:debuggable = "true" android:icon="@drawable/logo_linphone_57x57">
|
<application android:label="@string/app_name" android:debuggable = "true" android:icon="@drawable/logo_linphone_57x57">
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,6 +41,7 @@ import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
import android.view.View.OnFocusChangeListener;
|
||||||
import android.view.View.OnLongClickListener;
|
import android.view.View.OnLongClickListener;
|
||||||
import android.view.View.OnTouchListener;
|
import android.view.View.OnTouchListener;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
@ -469,7 +470,6 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
private void routeAudioToSpeaker() {
|
private void routeAudioToSpeaker() {
|
||||||
if (Integer.parseInt(Build.VERSION.SDK) <= 4 /*<donut*/) {
|
if (Integer.parseInt(Build.VERSION.SDK) <= 4 /*<donut*/) {
|
||||||
mAudioManager.setMode(AudioManager.MODE_NORMAL);
|
|
||||||
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
||||||
AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL);
|
AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL);
|
||||||
} else {
|
} else {
|
||||||
|
@ -479,7 +479,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
private void routeAudioToReceiver() {
|
private void routeAudioToReceiver() {
|
||||||
if (Integer.parseInt(Build.VERSION.SDK) <=4 /*<donut*/) {
|
if (Integer.parseInt(Build.VERSION.SDK) <=4 /*<donut*/) {
|
||||||
mAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
|
||||||
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
mAudioManager.setRouting(AudioManager.MODE_NORMAL,
|
||||||
AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL);
|
AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL);
|
||||||
} else {
|
} else {
|
||||||
|
@ -528,7 +528,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void setDigitListener(Button aButton,char dtmf) {
|
private void setDigitListener(Button aButton,char dtmf) {
|
||||||
class DialKeyListener implements OnClickListener ,OnTouchListener{
|
class DialKeyListener implements OnClickListener ,OnTouchListener {
|
||||||
final String mKeyCode;
|
final String mKeyCode;
|
||||||
final TextView mAddressView;
|
final TextView mAddressView;
|
||||||
boolean mIsDtmfStarted=false;
|
boolean mIsDtmfStarted=false;
|
||||||
|
@ -538,8 +538,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
LinphoneCore lc = LinphoneService.instance().getLinphoneCore();
|
LinphoneCore lc = LinphoneService.instance().getLinphoneCore();
|
||||||
lc.stopDtmf();
|
//stopDtmf();
|
||||||
mIsDtmfStarted=false;
|
|
||||||
if (lc.isIncall()) {
|
if (lc.isIncall()) {
|
||||||
lc.sendDtmf(mKeyCode.charAt(0));
|
lc.sendDtmf(mKeyCode.charAt(0));
|
||||||
} else {
|
} else {
|
||||||
|
@ -554,17 +553,27 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
if (mIsDtmfStarted ==false) {
|
if (v.isPressed() && mIsDtmfStarted ==false) {
|
||||||
LinphoneCore lc = LinphoneService.instance().getLinphoneCore();
|
LinphoneCore lc = LinphoneService.instance().getLinphoneCore();
|
||||||
lc.playDtmf(mKeyCode.charAt(0), -1);
|
lc.playDtmf(mKeyCode.charAt(0), -1);
|
||||||
mIsDtmfStarted=true;
|
mIsDtmfStarted=true;
|
||||||
|
} else {
|
||||||
|
if (!v.isPressed())
|
||||||
|
stopDtmf();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void stopDtmf() {
|
||||||
|
LinphoneCore lc = LinphoneService.instance().getLinphoneCore();
|
||||||
|
lc.stopDtmf();
|
||||||
|
mIsDtmfStarted =false;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
DialKeyListener lListener = new DialKeyListener(mAddress,dtmf);
|
DialKeyListener lListener = new DialKeyListener(mAddress,dtmf);
|
||||||
aButton.setOnClickListener(lListener);
|
aButton.setOnClickListener(lListener);
|
||||||
aButton.setOnTouchListener(lListener);
|
aButton.setOnTouchListener(lListener);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 55aa245f04845e8d1353cc0ac95dbe8ce176890b
|
Subproject commit a0044d9a6a3bfb25618ac5bd28e8687ae73e8fd3
|
Loading…
Reference in a new issue