Merge branch 'master' of git.linphone.org:linphone-android-private into video
+ some fixes. Conflicts: submodules/linphone
This commit is contained in:
commit
268ad9fa10
5 changed files with 41 additions and 15 deletions
|
@ -1,18 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
|
||||
<EditText android:layout_height="wrap_content" android:id="@+id/AddressId" android:hint="sip:user@host:port" android:layout_width="fill_parent" android:layout_weight="1" android:text="sip:[user@]host[:port]"></EditText>
|
||||
<Button android:layout_height="wrap_content" android:id="@+id/CallButton" android:text="Call" android:layout_width="wrap_content"></Button>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="fill_parent" android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText android:layout_height="wrap_content" android:id="@+id/AddressId"
|
||||
android:hint="sip:user@host:port" android:layout_width="fill_parent"
|
||||
android:layout_weight="1" android:text="sip:[user@]host[:port]"></EditText>
|
||||
<Button android:layout_height="wrap_content" android:id="@+id/CallButton"
|
||||
android:text="Call" android:layout_width="wrap_content"></Button>
|
||||
|
||||
</LinearLayout><EditText android:hint="password" android:id="@+id/Password" android:layout_width="fill_parent" android:layout_height="wrap_content" android:visibility="gone"></EditText>
|
||||
</LinearLayout>
|
||||
<EditText android:layout_height="wrap_content" android:id="@+id/MyAddressId"
|
||||
android:hint="enter my sip identity (sip:[user@]host)" android:layout_width="fill_parent"
|
||||
android:visibility="gone" android:text=""></EditText>
|
||||
<EditText android:hint="my password" android:id="@+id/Password"
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:visibility="gone"></EditText>
|
||||
|
||||
|
||||
|
||||
|
||||
<TextView android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/OutputText" android:text="Debug"></TextView>
|
||||
<TextView android:layout_weight="1" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:id="@+id/OutputText"
|
||||
android:text="Debug"></TextView>
|
||||
|
||||
<Button android:text="STOP" android:id="@+id/ButtonStop" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
|
||||
<Button android:text="STOP" android:id="@+id/ButtonStop"
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -31,6 +31,7 @@ public class BandwidthManager {
|
|||
public static final int HIGH_RESOLUTION = 0;
|
||||
public static final int LOW_RESOLUTION = 1;
|
||||
public static final int LOW_BANDWIDTH = 2;
|
||||
private static final boolean portraitMode = true; // FIXME: preference?
|
||||
|
||||
private static final int[][] bandwidthes = {{256,256}, {128,128}, {80,80}};
|
||||
private static BandwidthManager instance;
|
||||
|
@ -81,7 +82,7 @@ public class BandwidthManager {
|
|||
lc.setPreferredVideoSize(targetVideoSize);
|
||||
VideoSize actualVideoSize = lc.getPreferredVideoSize();
|
||||
if (!targetVideoSize.equals(actualVideoSize)) {
|
||||
lc.setPreferredVideoSize(VideoSize.createStandard(VideoSize.QCIF));
|
||||
lc.setPreferredVideoSize(VideoSize.createStandard(VideoSize.QCIF, portraitMode));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,9 +106,9 @@ public class BandwidthManager {
|
|||
private VideoSize getProfileVideoSize(int profile) {
|
||||
switch (profile) {
|
||||
case LOW_RESOLUTION:
|
||||
return closestVideoSize(VideoSize.createStandard(VideoSize.QCIF));
|
||||
return closestVideoSize(VideoSize.createStandard(VideoSize.QCIF, portraitMode));
|
||||
case HIGH_RESOLUTION:
|
||||
return closestVideoSize(VideoSize.createStandard(VideoSize.QVGA));
|
||||
return closestVideoSize(VideoSize.createStandard(VideoSize.QVGA, portraitMode));
|
||||
default:
|
||||
throw new RuntimeException("profile not managed : " + profile);
|
||||
}
|
||||
|
@ -124,6 +125,6 @@ public class BandwidthManager {
|
|||
}
|
||||
}
|
||||
|
||||
return VideoSize.createStandard(VideoSize.QCIF);
|
||||
return VideoSize.createStandard(VideoSize.QCIF, portraitMode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -521,6 +521,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
if (mWakeLock.isHeld())mWakeLock.release();
|
||||
mSpeaker.setChecked(false);
|
||||
routeAudioToReceiver();
|
||||
BandwidthManager.getInstance().setUserRestriction(false);
|
||||
}
|
||||
private void routeAudioToSpeaker() {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) <= 4 /*<donut*/) {
|
||||
|
|
|
@ -38,6 +38,9 @@ public class TutorialBuddyStatusActivity extends Activity {
|
|||
|
||||
private static final String defaultSipAddress = "sip:";
|
||||
private TextView sipAddressWidget;
|
||||
private TextView mySipAddressWidget;
|
||||
private TextView mySipPasswordWidget;
|
||||
|
||||
private TutorialBuddyStatus tutorial;
|
||||
private Handler mHandler = new Handler() ;
|
||||
private Button buttonCall;
|
||||
|
@ -49,6 +52,12 @@ public class TutorialBuddyStatusActivity extends Activity {
|
|||
sipAddressWidget = (TextView) findViewById(R.id.AddressId);
|
||||
sipAddressWidget.setText(defaultSipAddress);
|
||||
|
||||
mySipAddressWidget = (TextView) findViewById(R.id.MyAddressId);
|
||||
mySipAddressWidget.setVisibility(View.VISIBLE);
|
||||
mySipPasswordWidget = (TextView) findViewById(R.id.Password);
|
||||
mySipPasswordWidget.setVisibility(TextView.VISIBLE);
|
||||
|
||||
|
||||
// Output text to the outputText widget
|
||||
final TextView outputText = (TextView) findViewById(R.id.OutputText);
|
||||
final TutorialNotifier notifier = new AndroidTutorialNotifier(mHandler, outputText);
|
||||
|
@ -84,7 +93,9 @@ public class TutorialBuddyStatusActivity extends Activity {
|
|||
public void run() {
|
||||
super.run();
|
||||
try {
|
||||
tutorial.launchTutorial(sipAddressWidget.getText().toString());
|
||||
String myIdentity = mySipAddressWidget.getText().length()>0?mySipAddressWidget.getText().toString():null;
|
||||
String myPassword = mySipPasswordWidget.getText().length()>0?mySipPasswordWidget.getText().toString():null;
|
||||
tutorial.launchTutorial(sipAddressWidget.getText().toString(), myIdentity, myPassword);
|
||||
mHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
buttonCall.setEnabled(true);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cdba824dc5673de0250f46b909c4bcde1b3388ad
|
||||
Subproject commit b2e49a28c760f7b010ebf31b312edbac660f9894
|
Loading…
Reference in a new issue