diff --git a/res/layout-land/assistant_codec_downloader.xml b/res/layout-land/assistant_codec_downloader.xml
new file mode 100644
index 000000000..28579cae7
--- /dev/null
+++ b/res/layout-land/assistant_codec_downloader.xml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-sw533dp-land/assistant_codec_downloader.xml b/res/layout-sw533dp-land/assistant_codec_downloader.xml
new file mode 100644
index 000000000..237d61620
--- /dev/null
+++ b/res/layout-sw533dp-land/assistant_codec_downloader.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-sw533dp/assistant_codec_downloader.xml b/res/layout-sw533dp/assistant_codec_downloader.xml
new file mode 100644
index 000000000..d6ec0fca9
--- /dev/null
+++ b/res/layout-sw533dp/assistant_codec_downloader.xml
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-sw720dp-land/assistant_codec_downloader.xml b/res/layout-sw720dp-land/assistant_codec_downloader.xml
new file mode 100644
index 000000000..5c92115b0
--- /dev/null
+++ b/res/layout-sw720dp-land/assistant_codec_downloader.xml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/assistant_codec_downloader.xml b/res/layout/assistant_codec_downloader.xml
new file mode 100644
index 000000000..4f991e5b0
--- /dev/null
+++ b/res/layout/assistant_codec_downloader.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 82670b2bf..7d6534af1 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -77,6 +77,9 @@
Your account has not been validated yet.
Your account has been validated.
Incorrect username or password
+ Do you agree to download OpenH264 Video Codec provided by Cisco Systems, Inc.?
+ Downloading OpenH264 Video Codec provided by Cisco Systems, Inc.
+ OpenH264 Video Codec provided by Cisco Systems, Inc. downloaded.
An error occurred, try again later.
Server unreachable, verify your network connection.
This username is already in use.
diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java
index 2d5dda01c..9c3024809 100644
--- a/src/org/linphone/LinphoneManager.java
+++ b/src/org/linphone/LinphoneManager.java
@@ -38,6 +38,8 @@ import java.util.TimerTask;
import org.linphone.compatibility.Compatibility;
import org.linphone.core.CallDirection;
+import org.linphone.core.OpenH264DownloadHelperAction;
+import org.linphone.core.OpenH264DownloadHelperListener;
import org.linphone.core.LinphoneAddress;
import org.linphone.core.LinphoneBuffer;
import org.linphone.core.LinphoneCall;
@@ -55,6 +57,7 @@ import org.linphone.core.LinphoneCore.RegistrationState;
import org.linphone.core.LinphoneCore.RemoteProvisioningState;
import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneCoreFactory;
+import org.linphone.core.LinphoneCoreFactoryImpl;
import org.linphone.core.LinphoneCoreListener;
import org.linphone.core.LinphoneEvent;
import org.linphone.core.LinphoneFriend;
@@ -72,13 +75,17 @@ import org.linphone.mediastream.Version;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration.AndroidCamera;
import org.linphone.mediastream.video.capture.hwconf.Hacks;
+import org.linphone.tools.OpenH264DownloadHelper;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -97,6 +104,9 @@ import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.Vibrator;
+import android.preference.CheckBoxPreference;
+import android.provider.MediaStore;
+import android.provider.MediaStore.Images;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.telephony.TelephonyManager;
@@ -130,6 +140,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
private Resources mR;
private LinphonePreferences mPrefs;
private LinphoneCore mLc;
+ private OpenH264DownloadHelper mCodecDownloader;
+ private OpenH264DownloadHelperListener mCodecListener;
private String lastLcStatusMessage;
private String basePath;
private static boolean sExited;
@@ -207,6 +219,66 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
mLc.enableSpeaker(speakerOn);
}
+ public void initOpenH264Helper() {
+ mCodecDownloader = LinphoneCoreFactory.instance().createOpenH264DownloadHelper();
+ mCodecListener = new OpenH264DownloadHelperListener() {
+ ProgressDialog progress;
+ int box = 1;
+ int ctxt = 0;
+
+ @Override
+ public void OnProgress(final int current, final int max) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ OpenH264DownloadHelper ohcodec = LinphoneManager.getInstance().getOpenH264DownloadHelper();
+ if (progress == null) {
+ progress = new ProgressDialog((Context)ohcodec.getUserData(ctxt));
+ progress.setCanceledOnTouchOutside(false);
+ progress.setCancelable(false);
+ progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+ } else if (current <= max) {
+ progress.setMessage("Downloading OpenH264");
+ progress.setMax(max);
+ progress.setProgress(current);
+ progress.show();
+ } else {
+ progress.dismiss();
+ progress = null;
+ LinphoneManager.getLc().reloadMsPlugins(null);
+ if (ohcodec.getUserDataSize() > box && ohcodec.getUserData(box) != null)
+ ((CheckBoxPreference)ohcodec.getUserData(box)).setSummary(mCodecDownloader.getLicenseMessage());
+ }
+ }
+ });
+ }
+
+ @Override
+ public void OnError (final String error){
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (progress != null) progress.dismiss();
+ AlertDialog.Builder builder = new AlertDialog.Builder((Context)LinphoneManager.getInstance().getOpenH264DownloadHelper().getUserData(ctxt));
+ builder.setMessage("Sorry an error has occurred.");
+ builder.setCancelable(false);
+ builder.setNeutralButton("Ok", null);
+ builder.show();
+ }
+ });
+ }
+ };
+ mCodecDownloader.setOpenH264HelperListener(mCodecListener);
+ }
+
+ public OpenH264DownloadHelperListener getOpenH264HelperListener() {
+ return mCodecListener;
+ }
+
+ public OpenH264DownloadHelper getOpenH264DownloadHelper(){
+ return mCodecDownloader;
+ }
+
public void routeAudioToSpeaker() {
routeAudioToSpeakerHelper(true);
}
@@ -891,6 +963,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
if (state == GlobalState.GlobalOn){
try {
initLiblinphone(lc);
+ initOpenH264Helper();
+
} catch (LinphoneCoreException e) {
Log.e(e);
}
diff --git a/src/org/linphone/SettingsFragment.java b/src/org/linphone/SettingsFragment.java
index 46ea526f9..2bdd846c6 100644
--- a/src/org/linphone/SettingsFragment.java
+++ b/src/org/linphone/SettingsFragment.java
@@ -35,10 +35,13 @@ import org.linphone.core.PayloadType;
import org.linphone.mediastream.Log;
import org.linphone.mediastream.Version;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
+import org.linphone.tools.OpenH264DownloadHelper;
import org.linphone.purchase.InAppPurchaseActivity;
import org.linphone.ui.LedPreference;
import org.linphone.ui.PreferencesListFragment;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
@@ -639,8 +642,9 @@ public class SettingsFragment extends PreferencesListFragment {
codecs.removeAll();
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
+ final OpenH264DownloadHelper mCodecDownloader = LinphoneManager.getInstance().getOpenH264DownloadHelper();
for (final PayloadType pt : lc.getVideoCodecs()) {
- CheckBoxPreference codec = new CheckBoxPreference(getActivity());
+ final CheckBoxPreference codec = new CheckBoxPreference(getActivity());
codec.setTitle(pt.getMime());
if (!pt.getMime().equals("VP8")) {
@@ -655,6 +659,8 @@ public class SettingsFragment extends PreferencesListFragment {
}
}
}
+ if (pt.getMime().equals("H264") && mCodecDownloader.isCodecFound())
+ codec.setSummary(mCodecDownloader.getLicenseMessage());
codec.setChecked(lc.isPayloadTypeEnabled(pt));
codec.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@@ -662,6 +668,31 @@ public class SettingsFragment extends PreferencesListFragment {
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean enable = (Boolean) newValue;
try {
+ if (enable && Version.getCpuAbis().contains("armeabi-v7a") && !Version.getCpuAbis().contains("x86")
+ && pt.getMime().equals("H264") && !mCodecDownloader.isCodecFound()) {
+ LinphoneManager.getInstance().getOpenH264DownloadHelper().setOpenH264HelperListener(LinphoneManager.getInstance().getOpenH264HelperListener());
+ LinphoneManager.getInstance().getOpenH264DownloadHelper().setUserData(0,LinphoneManager.getInstance().getContext());
+ LinphoneManager.getInstance().getOpenH264DownloadHelper().setUserData(1,codec);
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(LinphoneManager.getInstance().getContext());
+ builder.setCancelable(false);
+ AlertDialog.Builder show = builder.setMessage("Do you agree to download "
+ + mCodecDownloader.getLicenseMessage()).setPositiveButton("Yes", new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE)
+ mCodecDownloader.downloadCodec();
+ }
+ });
+ builder.setNegativeButton("No", new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_NEGATIVE){
+ // Disable H264
+ }
+ }
+ }).show();
+ }
LinphoneManager.getLcIfManagerNotDestroyedOrNull().enablePayloadType(pt, enable);
} catch (LinphoneCoreException e) {
Log.e(e);
diff --git a/src/org/linphone/assistant/AssistantActivity.java b/src/org/linphone/assistant/AssistantActivity.java
index ade2afc5d..810587812 100644
--- a/src/org/linphone/assistant/AssistantActivity.java
+++ b/src/org/linphone/assistant/AssistantActivity.java
@@ -33,6 +33,8 @@ import org.linphone.core.LinphoneCoreFactory;
import org.linphone.core.LinphoneCoreListenerBase;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.mediastream.Log;
+import org.linphone.mediastream.Version;
+import org.linphone.tools.OpenH264DownloadHelper;
import android.Manifest;
import android.app.Activity;
@@ -75,6 +77,7 @@ private static AssistantActivity instance;
private ProgressDialog progress;
private Dialog dialog;
private boolean remoteProvisioningInProgress;
+ private boolean echoCancellerAlreadyDone;
private static final int PERMISSIONS_REQUEST_RECORD_AUDIO = 201;
protected void onCreate(Bundle savedInstanceState) {
@@ -95,6 +98,11 @@ private static AssistantActivity instance;
currentFragment = (AssistantFragmentsEnum) savedInstanceState.getSerializable("CurrentFragment");
}
}
+ if (savedInstanceState != null && savedInstanceState.containsKey("echoCanceller")) {
+ echoCancellerAlreadyDone = savedInstanceState.getBoolean("echoCanceller");
+ } else {
+ echoCancellerAlreadyDone = false;
+ }
mPrefs = LinphonePreferences.instance();
//if(mPrefs.isFirstLaunch()) {
status.enableSideMenu(false);
@@ -155,6 +163,7 @@ private static AssistantActivity instance;
@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putSerializable("CurrentFragment", currentFragment);
+ outState.putBoolean("echoCanceller", echoCancellerAlreadyDone);
super.onSaveInstanceState(outState);
}
@@ -180,6 +189,10 @@ private static AssistantActivity instance;
transaction.commitAllowingStateLoss();
}
+ public AssistantFragmentsEnum getCurrentFragment() {
+ return currentFragment;
+ }
+
@Override
public void onClick(View v) {
int id = v.getId();
@@ -254,10 +267,10 @@ private static AssistantActivity instance;
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
launchEchoCancellerCalibration(true);
} else {
- goToLinphoneActivity();
+ isEchoCalibrationFinished();
}
} else {
- goToLinphoneActivity();
+ isEchoCalibrationFinished();
}
}
@@ -363,6 +376,22 @@ private static AssistantActivity instance;
//LinphoneManager.getInstance().restartLinphoneCore();
}
+ private void launchDownloadCodec() {
+ OpenH264DownloadHelper downloadHelper = LinphoneCoreFactory.instance().createOpenH264DownloadHelper();
+ if (Version.getCpuAbis().contains("armeabi-v7a") && !Version.getCpuAbis().contains("x86") && !downloadHelper.isCodecFound()) {
+ CodecDownloaderFragment codecFragment = new CodecDownloaderFragment();
+ changeFragment(codecFragment);
+ currentFragment = AssistantFragmentsEnum.DOWNLOAD_CODEC;
+ back.setVisibility(View.VISIBLE);
+ cancel.setEnabled(false);
+ } else
+ goToLinphoneActivity();
+ }
+
+ public void endDownloadCodec() {
+ goToLinphoneActivity();
+ }
+
public void saveCreatedAccount(String username, String password, String displayName, String domain, TransportType transport) {
if (accountCreated)
return;
@@ -486,7 +515,7 @@ private static AssistantActivity instance;
}
public void isEchoCalibrationFinished() {
- goToLinphoneActivity();
+ launchDownloadCodec();
}
public Dialog createErrorDialog(LinphoneProxyConfig proxy, String message){
@@ -517,7 +546,7 @@ private static AssistantActivity instance;
if (needsEchoCalibration && mPrefs.isFirstLaunch()) {
launchEchoCancellerCalibration(true);
} else {
- goToLinphoneActivity();
+ launchDownloadCodec();
}
}
diff --git a/src/org/linphone/assistant/AssistantFragmentsEnum.java b/src/org/linphone/assistant/AssistantFragmentsEnum.java
index 64100511b..3f6cb5735 100644
--- a/src/org/linphone/assistant/AssistantFragmentsEnum.java
+++ b/src/org/linphone/assistant/AssistantFragmentsEnum.java
@@ -27,5 +27,6 @@ public enum AssistantFragmentsEnum {
LINPHONE_LOGIN,
LOGIN,
REMOTE_PROVISIONING,
- ECHO_CANCELLER_CALIBRATION;
+ ECHO_CANCELLER_CALIBRATION,
+ DOWNLOAD_CODEC;
}
diff --git a/src/org/linphone/assistant/CodecDownloaderFragment.java b/src/org/linphone/assistant/CodecDownloaderFragment.java
new file mode 100644
index 000000000..cb9d1d551
--- /dev/null
+++ b/src/org/linphone/assistant/CodecDownloaderFragment.java
@@ -0,0 +1,209 @@
+package org.linphone.assistant;
+
+/*
+CodecDownloaderFragment.java
+Copyright (C) 2016 Belledonne Communications, Grenoble, France
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import org.linphone.LinphoneActivity;
+import org.linphone.LinphoneManager;
+import org.linphone.R;
+import org.linphone.core.LinphoneCoreFactory;
+import org.linphone.core.OpenH264DownloadHelperListener;
+import org.linphone.core.LinphoneCoreException;
+import org.linphone.core.PayloadType;
+import org.linphone.tools.OpenH264DownloadHelper;
+
+/**
+ * @author Erwan CROZE
+ */
+public class CodecDownloaderFragment extends Fragment {
+ private Handler mHandler = new Handler();
+ private TextView question;
+ private TextView downloading;
+ private TextView downloaded;
+ private Button yes;
+ private Button no;
+ private Button ok;
+ private ProgressBar bar;
+ private TextView downloadingInfo;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ final View view = inflater.inflate(R.layout.assistant_codec_downloader, container, false);
+
+ question = (TextView) view.findViewById(R.id.question);
+ downloading = (TextView) view.findViewById(R.id.downloading);
+ downloaded = (TextView) view.findViewById(R.id.downloaded);
+ yes = (Button) view.findViewById(R.id.answerYes);
+ no = (Button) view.findViewById(R.id.answerNo);
+ ok = (Button) view.findViewById(R.id.answerOk);
+ bar = (ProgressBar) view.findViewById(R.id.progressBar);
+ downloadingInfo = (TextView) view.findViewById(R.id.downloadingInfo);
+
+ final OpenH264DownloadHelper codecDownloader = LinphoneManager.getInstance().getOpenH264DownloadHelper();
+ final OpenH264DownloadHelperListener codecListener = new OpenH264DownloadHelperListener() {
+
+ @Override
+ public void OnProgress(final int current, final int max) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (current <= max) {
+ hideAllItems();
+ downloadingInfo.setText(current + " / " + max);
+ downloadingInfo.setVisibility(View.VISIBLE);
+ downloading.setVisibility(View.VISIBLE);
+ bar.setMax(max);
+ bar.setProgress(current);
+ bar.setVisibility(View.VISIBLE);
+ } else {
+ hideAllItems();
+ LinphoneManager.getLc().reloadMsPlugins(null);
+ downloaded.setVisibility(View.VISIBLE);
+ enabledH264(true);
+ AssistantActivity.instance().endDownloadCodec();
+ }
+ }
+ });
+ }
+
+ @Override
+ public void OnError(final String error) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ hideAllItems();
+ downloaded.setText("Sorry an error has occurred.");
+ downloaded.setVisibility(View.VISIBLE);
+ ok.setVisibility(View.VISIBLE);
+ enabledH264(false);
+ AssistantActivity.instance().endDownloadCodec();
+ }
+ });
+ }
+ };
+
+ codecDownloader.setOpenH264HelperListener(codecListener);
+
+ yes.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ hideAllItems();
+ bar.setVisibility(View.VISIBLE);
+ codecDownloader.downloadCodec();
+ }
+ });
+
+ no.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ enabledH264(false);
+ AssistantActivity.instance().endDownloadCodec();
+ }
+ });
+ hideAllItems();
+
+ if (savedInstanceState != null) {
+ if (savedInstanceState.containsKey("question"))
+ question.setVisibility((Integer) savedInstanceState.getSerializable("question"));
+ else
+ question.setVisibility(View.VISIBLE);
+
+ if (savedInstanceState.containsKey("yes"))
+ yes.setVisibility((Integer) savedInstanceState.getSerializable("yes"));
+ else
+ yes.setVisibility(View.VISIBLE);
+
+ if (savedInstanceState.containsKey("no"))
+ no.setVisibility((Integer) savedInstanceState.getSerializable("no"));
+ else
+ no.setVisibility(View.VISIBLE);
+
+ if (savedInstanceState.containsKey("downloading"))
+ downloading.setVisibility((Integer) savedInstanceState.getSerializable("downloading"));
+
+ if (savedInstanceState.containsKey("downloaded"))
+ downloaded.setVisibility((Integer) savedInstanceState.getSerializable("downloaded"));
+
+ if (savedInstanceState.containsKey("bar"))
+ bar.setVisibility((Integer) savedInstanceState.getSerializable("bar"));
+
+ if (savedInstanceState.containsKey("downloadingInfo"))
+ downloadingInfo.setVisibility((Integer) savedInstanceState.getSerializable("downloadingInfo"));
+
+ if (savedInstanceState.containsKey("ok"))
+ ok.setVisibility((Integer) savedInstanceState.getSerializable("ok"));
+ } else {
+ yes.setVisibility(View.VISIBLE);
+ question.setVisibility(View.VISIBLE);
+ no.setVisibility(View.VISIBLE);
+ }
+
+ return view;
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ if (question != null) outState.putSerializable("question", question.getVisibility());
+ if (downloading != null) outState.putSerializable("downloading", downloading.getVisibility());
+ if (downloaded != null) outState.putSerializable("downloaded", downloaded.getVisibility());
+ if (yes != null) outState.putSerializable("yes", yes.getVisibility());
+ if (no != null) outState.putSerializable("no", no.getVisibility());
+ if (ok != null) outState.putSerializable("ok", ok.getVisibility());
+ if (bar != null) outState.putSerializable("bar", bar.getVisibility());
+ if (downloadingInfo != null) outState.putSerializable("downloadingInfo", downloadingInfo.getVisibility());
+ super.onSaveInstanceState(outState);
+ }
+
+ private void hideAllItems() {
+ if (question != null) question.setVisibility(View.INVISIBLE);
+ if (downloading != null) downloading.setVisibility(View.INVISIBLE);
+ if (downloaded != null) downloaded.setVisibility(View.INVISIBLE);
+ if (yes != null) yes.setVisibility(View.INVISIBLE);
+ if (no != null) no.setVisibility(View.INVISIBLE);
+ if (ok != null) ok.setVisibility(View.INVISIBLE);
+ if (bar != null) bar.setVisibility(View.INVISIBLE);
+ if (downloadingInfo != null) downloadingInfo.setVisibility(View.INVISIBLE);
+ }
+
+ private void enabledH264(boolean enable) {
+ PayloadType h264 = null;
+ for (PayloadType pt : LinphoneManager.getLc().getVideoCodecs()) {
+ if (pt.getMime().equals("H264")) h264 = pt;
+ }
+
+ if (h264 != null) {
+ try {
+ LinphoneManager.getLc().enablePayloadType(h264, enable);
+ } catch (LinphoneCoreException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
diff --git a/src/org/linphone/assistant/WelcomeFragment.java b/src/org/linphone/assistant/WelcomeFragment.java
index a03401a03..18a3d88ec 100644
--- a/src/org/linphone/assistant/WelcomeFragment.java
+++ b/src/org/linphone/assistant/WelcomeFragment.java
@@ -37,10 +37,10 @@ public class WelcomeFragment extends Fragment implements OnClickListener {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.assistant_welcome, container, false);
-
+
createAccount = (Button) view.findViewById(R.id.create_account);
createAccount.setOnClickListener(this);
-
+
logLinphoneAccount = (Button) view.findViewById(R.id.login_linphone);
if (getResources().getBoolean(R.bool.hide_linphone_accounts_wizard)) {
logLinphoneAccount.setVisibility(View.GONE);