make StartUI resistant against rotations and don't restart app when not necessary
This commit is contained in:
parent
232de4436c
commit
dd3b9084af
3 changed files with 8 additions and 1 deletions
src/main
|
@ -50,6 +50,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".ui.startUI"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
|
|
|
@ -126,7 +126,7 @@ public class ConversationActivity extends XmppActivity
|
|||
private AtomicBoolean mRedirected = new AtomicBoolean(false);
|
||||
private Pair<Integer, Intent> mPostponedActivityResult;
|
||||
|
||||
long FirstStartTime = 0;
|
||||
long FirstStartTime = -1;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private static List<Uri> extractUriFromIntent(final Intent intent) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
|
@ -100,6 +101,11 @@ public class startUI extends AppCompatActivity
|
|||
dialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
|
Reference in a new issue