make StartUI resistant against rotations and don't restart app when not necessary

This commit is contained in:
Christian Schneppe 2016-06-14 21:23:09 +02:00
parent 232de4436c
commit dd3b9084af
3 changed files with 8 additions and 1 deletions
src/main

View file

@ -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"

View file

@ -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) {

View file

@ -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();