summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2012-11-15 11:46:46 -0800
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-11-15 11:46:46 -0800
commit455364fb534ce50fa8a49c1a748c56e2fb1d227a (patch)
tree14dd2ee73acab4ec27c0db6fbf0c81641cf5e881
parent8f33ff2f7dc236929ce45116b5560f96d494f7af (diff)
parent1c5596602dcc0ccbf04782333d0d61dbb090784c (diff)
downloadMms-455364fb534ce50fa8a49c1a748c56e2fb1d227a.tar.gz
Merge "Fix bugs in Mms Appwidget"
-rw-r--r--src/com/android/mms/widget/MmsWidgetService.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/mms/widget/MmsWidgetService.java b/src/com/android/mms/widget/MmsWidgetService.java
index 4497e670..a0644a86 100644
--- a/src/com/android/mms/widget/MmsWidgetService.java
+++ b/src/com/android/mms/widget/MmsWidgetService.java
@@ -16,6 +16,7 @@
package com.android.mms.widget;
+import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
@@ -183,9 +184,8 @@ public class MmsWidgetService extends RemoteViewsService {
if (Log.isLoggable(LogTag.WIDGET, Log.VERBOSE)) {
Log.v(TAG, "getConversationCount");
}
- synchronized (sWidgetLock) {
- return Math.min(mConversationCursor.getCount(), MAX_CONVERSATIONS_COUNT);
- }
+
+ return Math.min(mConversationCursor.getCount(), MAX_CONVERSATIONS_COUNT);
}
/*
@@ -301,8 +301,11 @@ public class MmsWidgetService extends RemoteViewsService {
RemoteViews view = new RemoteViews(mContext.getPackageName(), R.layout.widget_loading);
view.setTextViewText(
R.id.loading_text, mContext.getText(R.string.view_more_conversations));
- view.setOnClickFillInIntent(R.id.widget_loading,
- new Intent(mContext, ConversationList.class));
+ PendingIntent pendingIntent =
+ PendingIntent.getActivity(mContext, 0, new Intent(mContext,
+ ConversationList.class),
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ view.setOnClickPendingIntent(R.id.widget_loading, pendingIntent);
return view;
}