mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #4119 from deltachat/adb/issue-4118
avoid NPE in InstantOnboardingActivity.onCreate
This commit is contained in:
@@ -110,12 +110,16 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
||||
if (DcHelper.getContext(this).isConfigured() == 1) {
|
||||
// if account is configured it means we didn't come from Welcome screen nor from QR scanner,
|
||||
// instead, user clicked a dcaccount:// URI directly, so we need to just offer to add a new relay
|
||||
Intent intent = new Intent(this, RelayListActivity.class);
|
||||
String qrData = getIntent().getData().toString();
|
||||
intent.putExtra(RelayListActivity.EXTRA_QR_DATA, qrData);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return;
|
||||
Uri uri = getIntent().getData();
|
||||
if (uri != null) {
|
||||
Intent intent = new Intent(this, RelayListActivity.class);
|
||||
intent.putExtra(RelayListActivity.EXTRA_QR_DATA, uri.toString());
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
// if URI is unexpectedly null, then fallback to new profile creation
|
||||
AccountManager.getInstance().beginAccountCreation(this);
|
||||
}
|
||||
|
||||
getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(!fromWelcome) {
|
||||
|
||||
Reference in New Issue
Block a user