print error message instead of (null), updated for 2.2 with lowest latency

This commit is contained in:
Simon Morlat 2010-07-06 12:51:39 +02:00
parent ba16e38516
commit 4e8477fbee
8 changed files with 6 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View file

@ -30,7 +30,6 @@ ringer_dev_id=ANDROID SND: Android Sound card
capture_dev_id=ANDROID SND: Android Sound card
remote_ring=/data/data/org.linphone/files/ringback.wav
local_ring=/data/data/org.linphone/files/oldphone_mono.wav
ec_delay=400
ec_tail_len=200

View file

@ -35,5 +35,4 @@ public class BootReceiver extends BroadcastReceiver {
}
}
}

View file

@ -361,7 +361,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
// TODO Auto-generated method stub
}
public void generalState(LinphoneCore lc, GeneralState state) {
public void generalState(LinphoneCore lc, GeneralState state, String message) {
if (state == GeneralState.GSTATE_POWER_ON) {
mCall.setEnabled(!lc.isIncall());
@ -413,7 +413,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
} else if (state == GeneralState.GSTATE_CALL_ERROR) {
if (mWakeLock.isHeld()) mWakeLock.release();
Toast toast = Toast.makeText(this
,String.format(getString(R.string.call_error),lc.getRemoteAddress())
,String.format(getString(R.string.call_error),message)
, Toast.LENGTH_LONG);
toast.show();
exitCallMode();

View file

@ -39,5 +39,4 @@ public class LinphoneException extends Exception {
super(detailMessage, throwable);
// TODO Auto-generated constructor stub
}
}

View file

@ -192,7 +192,7 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
// TODO Auto-generated method stub
}
public void generalState(final LinphoneCore lc, final LinphoneCore.GeneralState state) {
public void generalState(final LinphoneCore lc, final LinphoneCore.GeneralState state, final String message) {
Log.i(TAG, "new state ["+state+"]");
if (state == GeneralState.GSTATE_POWER_ON) {
mNotification.iconLevel=IC_LEVEL_OFFLINE;
@ -226,7 +226,7 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
if (DialerActivity.getDialer()!=null) {
mHandler.post(new Runnable() {
public void run() {
DialerActivity.getDialer().generalState(lc,state);
DialerActivity.getDialer().generalState(lc,state,message);
}
});
}
@ -389,5 +389,5 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
theLinphone=null;
mNotificationManager.cancel(NOTIFICATION_ID);
}
}
}

@ -1 +1 @@
Subproject commit ab5503fca8ef3932bb5211396893012c9ef4ef6d
Subproject commit 61677ff44a00aa7cf4760a6faa34177e4faf4387