aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java6
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java8
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 52b993582..0934d967a 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -469,7 +469,8 @@ public class ConversationActivity extends XmppActivity implements OnConversation
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
- savedInstanceState.putParcelable("intent", getIntent());
+ Intent pendingIntent = pendingViewIntent.pop();
+ savedInstanceState.putParcelable("intent", pendingIntent == null ? pendingIntent : getIntent());
super.onSaveInstanceState(savedInstanceState);
}
@@ -477,7 +478,10 @@ public class ConversationActivity extends XmppActivity implements OnConversation
protected void onStart() {
final int theme = findTheme();
if (this.mTheme != theme) {
+ this.mSkipBackgroundBinding = true;
recreate();
+ } else {
+ this.mSkipBackgroundBinding = false;
}
mRedirectInProcess.set(false);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index c6f9a70ca..d124b580b 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -162,6 +162,8 @@ public abstract class XmppActivity extends AppCompatActivity {
}
};
+ public boolean mSkipBackgroundBinding = false;
+
public static boolean cancelPotentialWork(Message message, ImageView imageView) {
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
@@ -221,7 +223,11 @@ public abstract class XmppActivity extends AppCompatActivity {
protected void onStart() {
super.onStart();
if (!xmppConnectionServiceBound) {
- connectToBackend();
+ if (this.mSkipBackgroundBinding) {
+ Log.d(Config.LOGTAG, "skipping background binding");
+ } else {
+ connectToBackend();
+ }
} else {
if (!registeredListeners) {
this.registerListeners();