Permalink
Browse files

Merge "Fix bugs in Mms Appwidget"

  • Loading branch information...
2 parents 8f33ff2 + 1c55966 commit 455364fb534ce50fa8a49c1a748c56e2fb1d227a Tom Taylor committed with Gerrit Code Review Nov 15, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 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 @@ private int getConversationCount() {
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 @@ private RemoteViews getViewMoreConversationsView() {
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;
}

0 comments on commit 455364f

Please sign in to comment.