Merge "AOSP/Email and AOSP/UnfiedEmail - Added back call to uiaccounts. + Added android.permission.FOREGROUND_SERVICE for UnfiedEmail and changed the code accordingly to work with API level 28."
am: eb01557d85
Change-Id: I455cb68c9797c4c98402ff61686b191fb983d425
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e34a4fc..5dcd988 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -25,6 +25,7 @@
<uses-permission android:name="com.android.email.permission.ACCESS_PROVIDER"/>
<uses-permission android:name="com.android.email.permission.READ_ATTACHMENT"/>
<uses-permission android:name="android.permission.NFC" />
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- This needs to be present when we are doing unbundled releases. -->
<uses-sdk android:targetSdkVersion="28" android:minSdkVersion="14" />
diff --git a/src/com/android/mail/widget/BaseWidgetProvider.java b/src/com/android/mail/widget/BaseWidgetProvider.java
index bbed266..00eacd7 100644
--- a/src/com/android/mail/widget/BaseWidgetProvider.java
+++ b/src/com/android/mail/widget/BaseWidgetProvider.java
@@ -214,6 +214,10 @@
@Override
protected Void doInBackground(final Void... params) {
+ return null;
+ }
+
+ protected Void onPostExecute(Boolean result) {
for (int i = 0; i < mAppWidgetIds.length; ++i) {
// Get the account for this widget from preference
final String accountFolder = MailPrefs.get(mContext).getWidgetConfiguration(