Update submodule + add codec downloader to ui
This commit is contained in:
parent
23b4eb71d8
commit
43585944e9
4 changed files with 22 additions and 5 deletions
|
@ -24,7 +24,6 @@ import java.util.List;
|
|||
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.AdaptiveRateAlgorithm;
|
||||
import org.linphone.core.LinphoneCore.EcCalibratorStatus;
|
||||
import org.linphone.core.LinphoneCore.MediaEncryption;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
|
@ -34,9 +33,11 @@ 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.CodecDownloader;
|
||||
import org.linphone.ui.LedPreference;
|
||||
import org.linphone.ui.PreferencesListFragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.CheckBoxPreference;
|
||||
|
@ -539,6 +540,7 @@ public class SettingsFragment extends PreferencesListFragment {
|
|||
}
|
||||
|
||||
private void initVideoSettings() {
|
||||
final Context ctxt = LinphoneManager.getInstance().getContext();
|
||||
initializePreferredVideoSizePreferences((ListPreference) findPreference(getString(R.string.pref_preferred_video_size_key)));
|
||||
initializePreferredVideoFpsPreferences((ListPreference) findPreference(getString(R.string.pref_preferred_video_fps_key)));
|
||||
EditTextPreference bandwidth = (EditTextPreference) findPreference(getString(R.string.pref_bandwidth_limit_key));
|
||||
|
@ -577,6 +579,12 @@ public class SettingsFragment extends PreferencesListFragment {
|
|||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
boolean enable = (Boolean) newValue;
|
||||
try {
|
||||
if (Version.getCpuAbis().contains("armeabi-v7a") && !Version.getCpuAbis().contains("x86") && pt.getMime().equals("H264")) {
|
||||
if (enable && !CodecDownloader.codecExist(ctxt)) {
|
||||
CodecDownloader download = new CodecDownloader(ctxt);
|
||||
download.askPopUp("Do you want to download h264 codec?","No","Yes");
|
||||
}
|
||||
}
|
||||
LinphoneManager.getLcIfManagerNotDestroyedOrNull().enablePayloadType(pt, enable);
|
||||
} catch (LinphoneCoreException e) {
|
||||
Log.e(e);
|
||||
|
|
|
@ -17,7 +17,10 @@ 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 org.linphone.LinphonePreferences;
|
||||
import org.linphone.R;
|
||||
import org.linphone.mediastream.Version;
|
||||
import org.linphone.tools.CodecDownloader;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
|
@ -37,10 +40,16 @@ 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);
|
||||
|
||||
|
||||
if (LinphonePreferences.instance().isFirstLaunch() && Version.getCpuAbis().contains("armeabi-v7a")
|
||||
&& !Version.getCpuAbis().contains("x86") && !CodecDownloader.codecExist(getContext())) {
|
||||
CodecDownloader download = new CodecDownloader(getContext());
|
||||
download.askPopUp("Do you want to download h264 codec?","No","Yes");
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a4d728381cf3eabb8ed4114807cea6628b675ab5
|
||||
Subproject commit 4e6e419e08721cefdc5d30067b2794710f74e1e6
|
|
@ -1 +1 @@
|
|||
Subproject commit d8158669f356262a93034645f2bb14829127bba4
|
||||
Subproject commit 76074d2bc028b09fa1853486c75d2dd2c4c3bbaa
|
Loading…
Reference in a new issue