From dd3b9084af4483d6c1d27313d0d582b4e502fb00 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Tue, 14 Jun 2016 21:23:09 +0200 Subject: make StartUI resistant against rotations and don't restart app when not necessary --- src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 2 +- src/main/java/eu/siacs/conversations/ui/startUI.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/eu') diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 16d49ccf7..b3a8b0141 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -126,7 +126,7 @@ public class ConversationActivity extends XmppActivity private AtomicBoolean mRedirected = new AtomicBoolean(false); private Pair mPostponedActivityResult; - long FirstStartTime = 0; + long FirstStartTime = -1; @SuppressLint("NewApi") private static List extractUriFromIntent(final Intent intent) { diff --git a/src/main/java/eu/siacs/conversations/ui/startUI.java b/src/main/java/eu/siacs/conversations/ui/startUI.java index 5b919dbad..c2758054b 100644 --- a/src/main/java/eu/siacs/conversations/ui/startUI.java +++ b/src/main/java/eu/siacs/conversations/ui/startUI.java @@ -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(); -- cgit v1.2.3