Fix crash on device < lollipop in assistant
This commit is contained in:
parent
460391c5a5
commit
841f93cfc8
2 changed files with 9 additions and 3 deletions
|
@ -37,6 +37,7 @@ import android.accounts.AccountManager;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
@ -211,7 +212,9 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On
|
||||||
createAccount.setText(getResources().getString(R.string.link_account));
|
createAccount.setText(getResources().getString(R.string.link_account));
|
||||||
assisstantTitle.setText(getResources().getString(R.string.link_account));
|
assisstantTitle.setText(getResources().getString(R.string.link_account));
|
||||||
}
|
}
|
||||||
accountCreator.setLanguage(Locale.getDefault().toLanguageTag());
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
accountCreator.setLanguage(Locale.getDefault().toLanguageTag());
|
||||||
|
}
|
||||||
|
|
||||||
addUsernameHandler(usernameEdit, null);
|
addUsernameHandler(usernameEdit, null);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.linphone.core.LinphoneProxyConfig;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
@ -149,14 +150,16 @@ public class LinphoneLoginFragment extends Fragment implements CompoundButton.On
|
||||||
passwordLayout.setVisibility(View.VISIBLE);
|
passwordLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
accountCreator.setLanguage(Locale.getDefault().toLanguageTag());
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
accountCreator.setLanguage(Locale.getDefault().toLanguageTag());
|
||||||
|
}
|
||||||
|
|
||||||
addPhoneNumberHandler(dialCode, null);
|
addPhoneNumberHandler(dialCode, null);
|
||||||
addPhoneNumberHandler(phoneNumberEdit, null);
|
addPhoneNumberHandler(phoneNumberEdit, null);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void linphoneLogIn() {
|
public void linphoneLogIn() {
|
||||||
if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0) {
|
if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0) {
|
||||||
LinphoneUtils.displayErrorAlert(getString(R.string.first_launch_no_login_password), getContext());
|
LinphoneUtils.displayErrorAlert(getString(R.string.first_launch_no_login_password), getContext());
|
||||||
|
|
Loading…
Reference in a new issue