Add https:// before signin url when it's missing
This commit is contained in:
parent
e018b91c28
commit
cec864a9b7
|
@ -21,11 +21,12 @@ public class WebSigninActivity extends AppCompatActivity {
|
||||||
setContentView(R.layout.activity_web_signin);
|
setContentView(R.layout.activity_web_signin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void startWebsignin(View view) {
|
public void startWebsignin(View view) {
|
||||||
EditText profileUrl = (EditText) findViewById(R.id.profileUrl);
|
EditText profileUrl = (EditText) findViewById(R.id.profileUrl);
|
||||||
String url = profileUrl.getText().toString();
|
String url = profileUrl.getText().toString();
|
||||||
|
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
||||||
|
url = "https://" + url;
|
||||||
|
}
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
AccountAuthenticatorResponse parcelable = intent.getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);
|
AccountAuthenticatorResponse parcelable = intent.getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);
|
||||||
new WebsigninTask(this, parcelable).execute(url);
|
new WebsigninTask(this, parcelable).execute(url);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user