Merge branch 'master' of git.linphone.org:linphone-android

Conflicts:
	src/org/linphone/core/Version.java

Add neon check on first launch
This commit is contained in:
Guillaume Beraudo 2011-04-19 11:48:28 +02:00
commit 7cb1c96304
4 changed files with 15 additions and 4 deletions

View file

@ -30,6 +30,7 @@ import static org.linphone.R.string.pref_codec_amr_key;
import static org.linphone.R.string.pref_codec_speex16_key;
import static org.linphone.R.string.pref_codec_speex32_key;
import static org.linphone.R.string.pref_echo_cancellation_key;
import static org.linphone.R.string.pref_video_enable_key;
import static org.linphone.core.LinphoneCall.State.CallEnd;
import static org.linphone.core.LinphoneCall.State.Error;
import static org.linphone.core.LinphoneCall.State.IncomingReceived;
@ -836,6 +837,10 @@ public final class LinphoneManager implements LinphoneCoreListener {
.findPayloadType("AMR", 8000)!=null;
e.putBoolean(getString(pref_codec_amr_key), amr);
if (Version.sdkStrictlyBelow(5) || !Version.hasNeon() || !LinphoneManager.getInstance().hasCamera()) {
e.putBoolean(getString(pref_video_enable_key), false);
}
e.commit();
}

View file

@ -96,7 +96,7 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
detectAudioCodec(pref_codec_amr_key,"AMR",8000);
// No video
if (Version.sdkStrictlyBelow(5) || !fastCpu || !LinphoneManager.getInstance().hasCamera()) {
if (Version.sdkStrictlyBelow(5) || !Version.hasNeon() || !LinphoneManager.getInstance().hasCamera()) {
uncheckAndDisableCheckbox(pref_video_enable_key);
}
if (prefs().getBoolean(LinphoneActivity.PREF_FIRST_LAUNCH,true)) {

View file

@ -28,6 +28,9 @@ public class Version {
public static final String TAG="Linphone";
private static native boolean nativeHasNeon();
private static Boolean hasNeon;
private static final int buildVersion =
Integer.parseInt(Build.VERSION.SDK);
// 8; // 2.2
@ -52,6 +55,9 @@ public class Version {
} catch (Throwable e) {}
return false;
}
public static boolean hasNeon(){
if (hasNeon == null) hasNeon = nativeHasNeon();
return hasNeon;
}
}

@ -1 +1 @@
Subproject commit 749c984e862a617146869cee5b1de5de3bfc6103
Subproject commit 0601440e03eae29ddc3f44ce079536f8156c48f4