update linphone submodule (jni for LinphoneEvent)

This commit is contained in:
Simon Morlat 2013-06-18 22:13:10 +02:00
parent 4d630ae59d
commit 0a9d843c03
5 changed files with 6 additions and 41 deletions

View file

@ -38,6 +38,7 @@
<class name="org.linphone.core.PayloadTypeImpl" />
<class name="org.linphone.core.LpConfigImpl" />
<class name="org.linphone.core.LinphoneInfoMessageImpl" />
<class name="org.linphone.core.LinphoneEventImpl" />
</javah>
<javah outputfile="gen/xml2lpc_jni.h">
<classpath>

View file

@ -27,7 +27,6 @@ public class BandwidthManager {
public static final int LOW_RESOLUTION = 1;
public static final int LOW_BANDWIDTH = 2;
private static final int[][] bandwidthes = {{256,256}, {128,128}, {80,80}};
private static BandwidthManager instance;
private int currentProfile = HIGH_RESOLUTION;
@ -46,34 +45,6 @@ public class BandwidthManager {
// FIXME initially get those values
}
private boolean userRestriction;
public boolean isUserRestriction() {return userRestriction;}
public void setUserRestriction(boolean limit) {
userRestriction = limit;
computeNewProfile();
}
private void computeNewProfile() {
int newProfile = userRestriction ? LOW_RESOLUTION : HIGH_RESOLUTION;
if (newProfile != currentProfile) {
currentProfile = newProfile;
onProfileChanged(currentProfile);
}
}
private void onProfileChanged(int newProfile) {
LinphoneCore lc = LinphoneManager.getLc();
lc.setUploadBandwidth(bandwidthes[newProfile][0]);
lc.setDownloadBandwidth(bandwidthes[newProfile][1]);
if (lc.isIncall()) {
CallManager.getInstance().reinvite();
} else {
updateWithProfileSettings(lc, null);
}
}
public void updateWithProfileSettings(LinphoneCore lc, LinphoneCallParams callParams) {
if (callParams != null) { // in call

View file

@ -487,12 +487,6 @@ public class LinphoneManager implements LinphoneCoreListener {
getLc().playDtmf(dtmf, -1);
}
public void changeResolution() {
BandwidthManager manager = BandwidthManager.getInstance();
manager.setUserRestriction(!manager.isUserRestriction());
}
public void terminateCall() {
if (mLc.isIncall()) {
mLc.terminateCall(mLc.getCurrentCall());
@ -1737,13 +1731,12 @@ public class LinphoneManager implements LinphoneCoreListener {
@Override
public void subscriptionStateChanged(LinphoneCore lc, LinphoneEvent ev,
SubscriptionState state) {
// TODO Auto-generated method stub
Log.d("Subscription state changed to "+state+" event name is "+ev.getEventName());
}
@Override
public void notifyReceived(LinphoneCore lc, LinphoneEvent ev,
String eventName, LinphoneContent content) {
// TODO Auto-generated method stub
Log.d("Notify received for event "+eventName);
if (content!=null) Log.d("with content "+content.getType()+"/"+content.getSubtype()+" data:"+content.getDataAsString());
}
}

@ -1 +1 @@
Subproject commit 8b7546d3bebce04c9c67457bfe44805e0b87caee
Subproject commit 1341e9034174f390cb1eca76ceda09a86ecbea71

@ -1 +1 @@
Subproject commit 71c67a045b9124cc01025d405b913c30ab068804
Subproject commit ad406033c0f2043d2a3bf73f5b8c8204c48c35a5