add dependency on pkgconfig in REAME

This commit is contained in:
Jehan Monnier 2011-11-22 19:12:51 +01:00
parent f189a52570
commit 983e36fabc
4 changed files with 15 additions and 54 deletions

2
README
View file

@ -3,7 +3,7 @@
To build liblinphone for Android, you must: To build liblinphone for Android, you must:
1) download the Android ndk (>=r5c) from google. 1) download the Android ndk (>=r5c) from google.
2) install the autotools: autoconf, automake, aclocal, libtoolize 2) install the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
3) run the ./prepare_sources.sh script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project. 3) run the ./prepare_sources.sh script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ ./prepare_sources.sh $ ./prepare_sources.sh

View file

@ -75,8 +75,6 @@ public class LinphoneActivity extends TabActivity implements
private static LinphoneActivity instance; private static LinphoneActivity instance;
private PowerManager.WakeLock mWakeLock;
private SensorManager mSensorManager; private SensorManager mSensorManager;
private Sensor mAccelerometer; private Sensor mAccelerometer;
private int previousRotation = -1; private int previousRotation = -1;
@ -111,7 +109,6 @@ public class LinphoneActivity extends TabActivity implements
checkAccount = !useFirstLoginActivity; checkAccount = !useFirstLoginActivity;
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG+"#"+getClass().getName());
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
@ -451,16 +448,11 @@ public class LinphoneActivity extends TabActivity implements
if (IncallActivity.active) { if (IncallActivity.active) {
return; return;
} }
mHandler.post(new Runnable() {
public void run() {
startActivityForResult(new Intent().setClass( startActivityForResult(new Intent().setClass(
LinphoneActivity.this, LinphoneActivity.this,
IncallActivity.class), IncallActivity.class),
incall_activity); incall_activity);
} }
});
}
public void startIncomingCallActivity(LinphoneCall pendingCall) { public void startIncomingCallActivity(LinphoneCall pendingCall) {
Intent intent = new Intent() Intent intent = new Intent()
@ -469,13 +461,6 @@ public class LinphoneActivity extends TabActivity implements
startActivityForResult(intent, INCOMING_CALL_ACTIVITY); startActivityForResult(intent, INCOMING_CALL_ACTIVITY);
} }
public void finishVideoActivity() {
mHandler.post(new Runnable() {
public void run() {
finishActivity(video_activity);
}
});
}
@Override @Override
public void onCallStateChanged(LinphoneCall call, State state, public void onCallStateChanged(LinphoneCall call, State state,
@ -494,7 +479,6 @@ public class LinphoneActivity extends TabActivity implements
} }
if (state==State.OutgoingInit || state==State.IncomingReceived) { if (state==State.OutgoingInit || state==State.IncomingReceived) {
startOrientationSensor(); startOrientationSensor();
enterIncallMode();
} else if (state==State.Error || state==State.CallEnd){ } else if (state==State.Error || state==State.CallEnd){
stopOrientationSensor(); stopOrientationSensor();
finishActivity(INCOMING_CALL_ACTIVITY); finishActivity(INCOMING_CALL_ACTIVITY);
@ -502,7 +486,6 @@ public class LinphoneActivity extends TabActivity implements
if (state==State.Connected) { if (state==State.Connected) {
if (call.getDirection() == CallDirection.Incoming) { if (call.getDirection() == CallDirection.Incoming) {
startIncallActivity(); startIncallActivity();
enterIncallMode();
} }
} }
if (state == LinphoneCall.State.StreamsRunning && Version.isVideoCapable()) { if (state == LinphoneCall.State.StreamsRunning && Version.isVideoCapable()) {
@ -510,25 +493,24 @@ public class LinphoneActivity extends TabActivity implements
if (videoEnabled) { if (videoEnabled) {
startVideoActivity(call, 1000); startVideoActivity(call, 1000);
} else { } else {
finishVideoActivity(); finishActivity(video_activity);
} }
} }
if (state == LinphoneCall.State.CallUpdatedByRemote && Version.isVideoCapable()) { if (state == LinphoneCall.State.CallUpdatedByRemote && Version.isVideoCapable()) {
if (VideoCallActivity.launched && !call.getCurrentParamsCopy().getVideoEnabled()) { if (VideoCallActivity.launched && !call.getCurrentParamsCopy().getVideoEnabled()) {
finishVideoActivity(); finishActivity(video_activity);
} }
} }
if (state==State.Error){ if (state==State.Error){
showToast(R.string.call_error, message); showToast(R.string.call_error, message);
if (lc.getCallsNb() == 0){ if (lc.getCallsNb() == 0){
if (mWakeLock.isHeld()) mWakeLock.release(); exitIncallActivity();
exitCallMode();
} }
}else if (state==State.CallEnd){ }else if (state==State.CallEnd){
if (lc.getCallsNb() == 0){ if (lc.getCallsNb() == 0){
exitCallMode(); exitIncallActivity();
} }
} }
} }
@ -542,30 +524,16 @@ public class LinphoneActivity extends TabActivity implements
}); });
} }
private void enterIncallMode() {
LinphoneManager.startProximitySensorForActivity(this);
if (!mWakeLock.isHeld()) mWakeLock.acquire();
}
private void exitCallMode() {
private void exitIncallActivity() {
finishActivity(incall_activity); finishActivity(incall_activity);
if (mWakeLock.isHeld()) mWakeLock.release();
mHandler.post(new Runnable() {
@Override
public void run() {
LinphoneManager.stopProximitySensorForActivity(LinphoneActivity.this);
}
});
setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE);
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
if (mWakeLock.isHeld()) mWakeLock.release();
super.onDestroy(); super.onDestroy();
} }
@ -576,13 +544,6 @@ public class LinphoneActivity extends TabActivity implements
LinphoneCall pendingCall = LinphoneManager.getInstance().getPendingIncomingCall(); LinphoneCall pendingCall = LinphoneManager.getInstance().getPendingIncomingCall();
if (pendingCall != null) { if (pendingCall != null) {
LinphoneActivity.instance().startIncomingCallActivity(pendingCall); LinphoneActivity.instance().startIncomingCallActivity(pendingCall);
} else if (LinphoneManager.getLc().isIncall()) {
enterIncallMode();
}
if (LinphoneManager.getLc().getCallsNb() > 0) {
LinphoneManager.startProximitySensorForActivity(this);
// removing is done directly in LinphoneActivity.onPause()
} }
} }

@ -1 +1 @@
Subproject commit 7657e404191ce939f79fc571008272b411b52089 Subproject commit a6d05eb5ff9d5062852cdf7df574bec728921ef9

@ -1 +1 @@
Subproject commit 50d784112932f7bcdfe2e7fb69dcfc5c27546d0a Subproject commit ce510f9d1fa8d66aabcca308f0d2a9174f68acd4