mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-06 03:49:58 +02:00
avoid android.view.WindowManager$BadTokenException in maybeShowConfigurationError
This commit is contained in:
parent
529842ad60
commit
be4bc8259e
2 changed files with 3 additions and 17 deletions
|
@ -403,7 +403,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
|||
|
||||
private void progressError(String data2) {
|
||||
progressDialog.dismiss();
|
||||
maybeShowConfigurationError(this, data2);
|
||||
WelcomeActivity.maybeShowConfigurationError(this, data2);
|
||||
}
|
||||
|
||||
private void progressSuccess() {
|
||||
|
@ -416,22 +416,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
|||
finishAffinity();
|
||||
}
|
||||
|
||||
public static void maybeShowConfigurationError(Activity activity, String data2) {
|
||||
if (data2 != null && !data2.isEmpty()) {
|
||||
AlertDialog d = new AlertDialog.Builder(activity)
|
||||
.setMessage(data2)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.create();
|
||||
d.show();
|
||||
try {
|
||||
//noinspection ConstantConditions
|
||||
Linkify.addLinks((TextView) d.findViewById(android.R.id.message), Linkify.WEB_URLS | Linkify.EMAIL_ADDRESSES);
|
||||
} catch(NullPointerException e) {
|
||||
Log.e(TAG, "Linkify failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private void createProfile() {
|
||||
if (TextUtils.isEmpty(this.name.getText())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue