summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2012-09-17 17:17:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-17 17:17:57 -0700
commitbb04f3d9317bb2bfdd0bdf50b13ea06a130517ae (patch)
treebb319da1f3f99c6f634ce2c6ca9d5271faaf12e6 /src
parentbc7f97ae7d3661a44211d404fe4e187c35afadce (diff)
parent2d65e7eb956e60c058de876ddbfff504620ce7a3 (diff)
downloadMms-bb04f3d9317bb2bfdd0bdf50b13ea06a130517ae.tar.gz
Merge "Messaging notifications do not always come through" into jb-mr1-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/mms/transaction/MessagingNotification.java3
-rw-r--r--src/com/android/mms/ui/ComposeMessageActivity.java19
2 files changed, 19 insertions, 3 deletions
diff --git a/src/com/android/mms/transaction/MessagingNotification.java b/src/com/android/mms/transaction/MessagingNotification.java
index 8812e2c4..0dd7a785 100644
--- a/src/com/android/mms/transaction/MessagingNotification.java
+++ b/src/com/android/mms/transaction/MessagingNotification.java
@@ -204,6 +204,9 @@ public class MessagingNotification {
public static void setCurrentlyDisplayedThreadId(long threadId) {
synchronized (sCurrentlyDisplayedThreadLock) {
sCurrentlyDisplayedThreadId = threadId;
+ if (DEBUG) {
+ Log.d(TAG, "setCurrentlyDisplayedThreadId: " + sCurrentlyDisplayedThreadId);
+ }
}
}
diff --git a/src/com/android/mms/ui/ComposeMessageActivity.java b/src/com/android/mms/ui/ComposeMessageActivity.java
index d44015b2..2355a605 100644
--- a/src/com/android/mms/ui/ComposeMessageActivity.java
+++ b/src/com/android/mms/ui/ComposeMessageActivity.java
@@ -179,7 +179,7 @@ public class ComposeMessageActivity extends Activity
private static final String TAG = "Mms/compose";
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = true;
private static final boolean TRACE = false;
private static final boolean LOCAL_LOGV = false;
@@ -2176,6 +2176,12 @@ public class ComposeMessageActivity extends Activity
protected void onPause() {
super.onPause();
+ if (DEBUG) {
+ Log.v(TAG, "onPause: setCurrentlyDisplayedThreadId: " +
+ MessagingNotification.THREAD_NONE);
+ }
+ MessagingNotification.setCurrentlyDisplayedThreadId(MessagingNotification.THREAD_NONE);
+
// OLD: stop getting notified of presence updates to update the titlebar.
// NEW: we are using ContactHeaderWidget which displays presence, but updating presence
// there is out of our control.
@@ -2188,8 +2194,6 @@ public class ComposeMessageActivity extends Activity
mAsyncDialog.clearPendingProgressDialog();
}
- MessagingNotification.setCurrentlyDisplayedThreadId(MessagingNotification.THREAD_NONE);
-
// Remember whether the list is scrolled to the end when we're paused so we can rescroll
// to the end when resumed.
if (mMsgListAdapter != null &&
@@ -4190,7 +4194,16 @@ public class ComposeMessageActivity extends Activity
private void updateThreadIdIfRunning() {
if (mIsRunning && mConversation != null) {
+ if (DEBUG) {
+ Log.v(TAG, "updateThreadIdIfRunning: threadId: " +
+ mConversation.getThreadId());
+ }
MessagingNotification.setCurrentlyDisplayedThreadId(mConversation.getThreadId());
+ } else {
+ if (DEBUG) {
+ Log.v(TAG, "updateThreadIdIfRunning: mIsRunning: " + mIsRunning +
+ " mConversation: " + mConversation);
+ }
}
// If we're not running, but resume later, the current thread ID will be set in onResume()
}