Merge "Update widgets on provider instantiation." into jb-ub-mail-ur10

This commit is contained in:
Tony Mantler 2013-10-09 20:27:41 +00:00 committed by Android (Google) Code Review
commit 4b32e54309
1 changed files with 8 additions and 0 deletions

View File

@ -868,6 +868,14 @@ public class EmailProvider extends ContentProvider {
init(context);
// Do this last, so that EmailContent/EmailProvider are initialized
MailActivityEmail.setServicesEnabledAsync(context);
// Update widgets
final Intent updateAllWidgetsIntent =
new Intent(com.android.mail.utils.Utils.ACTION_NOTIFY_DATASET_CHANGED);
updateAllWidgetsIntent.putExtra(BaseWidgetProvider.EXTRA_UPDATE_ALL_WIDGETS, true);
updateAllWidgetsIntent.setType(context.getString(R.string.application_mime_type));
context.sendBroadcast(updateAllWidgetsIntent);
return false;
}