disable video on non capable hardware
This commit is contained in:
parent
f1449c9897
commit
034e979b5f
4 changed files with 8 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.linphone"
|
package="org.linphone"
|
||||||
android:versionCode="1105" android:versionName="1.1.5" android:installLocation="auto">
|
android:versionCode="1106" android:versionName="1.1.6" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="3" />
|
<uses-sdk android:minSdkVersion="3" />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
||||||
detectAudioCodec(pref_codec_amr_key,"AMR",8000);
|
detectAudioCodec(pref_codec_amr_key,"AMR",8000);
|
||||||
|
|
||||||
// No video
|
// No video
|
||||||
if (Version.sdkStrictlyBelow(5) || !Version.hasNeon() || !Hacks.hasCamera()) {
|
if (!Version.isVideoCapable()) {
|
||||||
uncheckAndDisableCheckbox(pref_video_enable_key);
|
uncheckAndDisableCheckbox(pref_video_enable_key);
|
||||||
}
|
}
|
||||||
if (prefs().getBoolean(LinphoneActivity.PREF_FIRST_LAUNCH,true)) {
|
if (prefs().getBoolean(LinphoneActivity.PREF_FIRST_LAUNCH,true)) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.linphone.LinphoneManager.NewOutgoingCallUiListener;
|
||||||
import org.linphone.core.Hacks;
|
import org.linphone.core.Hacks;
|
||||||
import org.linphone.core.LinphoneCall;
|
import org.linphone.core.LinphoneCall;
|
||||||
import org.linphone.core.Log;
|
import org.linphone.core.Log;
|
||||||
|
import org.linphone.core.Version;
|
||||||
import org.linphone.core.LinphoneCall.State;
|
import org.linphone.core.LinphoneCall.State;
|
||||||
import org.linphone.core.LinphoneCore.GlobalState;
|
import org.linphone.core.LinphoneCore.GlobalState;
|
||||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||||
|
@ -234,8 +235,9 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
.setClass(this, LinphoneActivity.class)
|
.setClass(this, LinphoneActivity.class)
|
||||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
} else if (state == LinphoneCall.State.StreamsRunning) {
|
} else if (state == LinphoneCall.State.StreamsRunning) {
|
||||||
if (!VideoCallActivity.launched && LinphoneActivity.isInstanciated()
|
if (Version.isVideoCapable()
|
||||||
&& getResources().getBoolean(R.bool.use_video_activity)
|
&& getResources().getBoolean(R.bool.use_video_activity)
|
||||||
|
&& !VideoCallActivity.launched && LinphoneActivity.isInstanciated()
|
||||||
&& call.getCurrentParamsCopy().getVideoEnabled()) {
|
&& call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||||
// Do not call if video activity already launched as it would cause a pause() of the launched one
|
// Do not call if video activity already launched as it would cause a pause() of the launched one
|
||||||
// and a race condition with capture surfaceview leading to a crash
|
// and a race condition with capture surfaceview leading to a crash
|
||||||
|
|
|
@ -65,5 +65,8 @@ public class Version {
|
||||||
if (hasNeon == null) hasNeon = nativeHasNeon();
|
if (hasNeon == null) hasNeon = nativeHasNeon();
|
||||||
return hasNeon;
|
return hasNeon;
|
||||||
}
|
}
|
||||||
|
public static boolean isVideoCapable() {
|
||||||
|
return !Version.sdkStrictlyBelow(5) && Version.hasNeon() && Hacks.hasCamera();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue