Snap for 6439596 from 1ef9eacbe16a39470f6480d82448d480b0935df0 to qt-aml-tzdata-release

Change-Id: I9c7c38e1f915c75bcd7d493b754448559a04122f
diff --git a/Android.mk b/Android.mk
index ae10feb..b929cf9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -32,7 +32,8 @@
     androidx.appcompat_appcompat \
     androidx.gridlayout_gridlayout \
     androidx.legacy_legacy-support-v13 \
-    android-opt-bitmap
+    android-opt-bitmap \
+    android-opt-datetimepicker
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
     androidx.annotation_annotation \
@@ -50,12 +51,12 @@
 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
 
 LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
+ifeq (eng,$(TARGET_BUILD_VARIANT))
+  LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
+endif
 
 LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.mail.*,com.android.emailcommon.*,com.google.android.mail.*
 
-LOCAL_AAPT_FLAGS += --legacy
-
 include $(BUILD_PACKAGE)
 
 ##################################################
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5dcd988..721ba1b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -25,10 +25,9 @@
     <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" />
+    <uses-sdk android:targetSdkVersion="24" android:minSdkVersion="14" />
 
     <application
         android:icon="@mipmap/ic_launcher_mail"
@@ -176,9 +175,7 @@
                  android:permission="android.permission.BIND_REMOTEVIEWS"
                  android:exported="false" />
         <service android:name=".MailLogService"/>
-        <service android:name=".browse.EmlTempFileDeletionService"
-                 android:permission="android.permission.BIND_JOB_SERVICE"
-                 android:exported="true" />
+        <service android:name=".browse.EmlTempFileDeletionService" />
 
     </application>
 
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a8b7bfe..f2501c3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -77,7 +77,7 @@
     <!-- Compose screen, Prefix to forwarded message subject. Do not translate. -->
     <string name="forward_subject_label" translatable="false">Fwd:</string>
     <!-- Compose screen, displayed at the top of a message being replied to. Please preserve the HTML entities (surrounded by & and ;).  The two %s strings will be replaced by 1) the date 2) the person who wrote the email being responded to. [CHAR LIMIT=1000]-->
-    <string name="reply_attribution">On <xliff:g id="date">%1$s</xliff:g>, <xliff:g id="person">%2$s</xliff:g> wrote:</string>
+    <string name="reply_attribution">On <xliff:g id="date">%s</xliff:g>, <xliff:g id="person">%s</xliff:g> wrote:</string>
     <!-- Compose screen, displayed at the top of a message being forwarded. Please preserve the HTML entities (surrounded by & and ;). [CHAR LIMIT=1000] -->
     <string name="forward_attribution">---------- Forwarded message ----------&lt;br&gt;From: <xliff:g id="from">%1$s</xliff:g>&lt;br&gt;Date: <xliff:g id="date">%2$s</xliff:g>&lt;br&gt;Subject: <xliff:g id="subject">%3$s</xliff:g>&lt;br&gt;To: <xliff:g id="to">%4$s</xliff:g>&lt;br&gt;</string>
     <!-- Compose screen, displayed at the top of a message being forwarded. [CHAR LIMIT=100]-->
@@ -796,7 +796,7 @@
     <string name="veiled_summary_unknown_person"/>
 
     <!-- Notification ticker text for per-label notification [CHAR LIMIT=30]-->
-    <string name="label_notification_ticker">"<xliff:g id="label">%1$s</xliff:g>: <xliff:g id="notification">%2$s</xliff:g>"</string>
+    <string name="label_notification_ticker">"<xliff:g id="label">%s</xliff:g>: <xliff:g id="notification">%s</xliff:g>"</string>
 
     <!-- Notification message to the user upon new messages for a conversation. [CHAR LIMIT=120] -->
     <plurals name="new_messages">
diff --git a/src/com/android/mail/MailIntentService.java b/src/com/android/mail/MailIntentService.java
index db7b99b..8151dfc 100644
--- a/src/com/android/mail/MailIntentService.java
+++ b/src/com/android/mail/MailIntentService.java
@@ -15,12 +15,11 @@
  */
 package com.android.mail;
 
+import android.app.IntentService;
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 
-import androidx.core.app.JobIntentService;
-
 import com.android.mail.analytics.Analytics;
 import com.android.mail.photo.ContactFetcher;
 import com.android.mail.providers.Account;
@@ -35,7 +34,7 @@
 /**
  * A service to handle various intents asynchronously.
  */
-public class MailIntentService extends JobIntentService {
+public class MailIntentService extends IntentService {
     private static final String LOG_TAG = LogTag.getLogTag();
 
     public static final String ACTION_RESEND_NOTIFICATIONS =
@@ -57,18 +56,16 @@
 
     public static final String CONVERSATION_EXTRA = "conversation";
 
-    public static final int JOB_ID = 100;
-
     public MailIntentService() {
-        super();
+        super("MailIntentService");
     }
 
-    public static void enqueueWork(Context context, Intent work) {
-        enqueueWork(context, MailIntentService.class, JOB_ID, work);
+    protected MailIntentService(final String name) {
+        super(name);
     }
 
     @Override
-    protected void onHandleWork(final Intent intent) {
+    protected void onHandleIntent(final Intent intent) {
         // UnifiedEmail does not handle all Intents
 
         LogUtils.v(LOG_TAG, "Handling intent %s", intent);
diff --git a/src/com/android/mail/browse/EmlMessageLoader.java b/src/com/android/mail/browse/EmlMessageLoader.java
index acf7716..82fa98f 100644
--- a/src/com/android/mail/browse/EmlMessageLoader.java
+++ b/src/com/android/mail/browse/EmlMessageLoader.java
@@ -105,7 +105,7 @@
             intent.setClass(getContext(), EmlTempFileDeletionService.class);
             intent.setData(message.attachmentListUri);
 
-            EmlTempFileDeletionService.enqueueWork(getContext(), intent);
+            getContext().startService(intent);
         }
     }
 }
diff --git a/src/com/android/mail/browse/EmlTempFileDeletionService.java b/src/com/android/mail/browse/EmlTempFileDeletionService.java
index 8a772c3..71a915c 100644
--- a/src/com/android/mail/browse/EmlTempFileDeletionService.java
+++ b/src/com/android/mail/browse/EmlTempFileDeletionService.java
@@ -17,33 +17,25 @@
 
 package com.android.mail.browse;
 
-import android.content.Context;
+import android.app.IntentService;
 import android.content.Intent;
 import android.net.Uri;
 
-import androidx.core.app.JobIntentService;
-
 /**
  * {@link IntentService} that cleans up temporary files in the cache for the eml viewer.
  */
-public class EmlTempFileDeletionService extends JobIntentService {
-
-    public static final int JOB_ID = 101;
+public class EmlTempFileDeletionService extends IntentService {
 
     public EmlTempFileDeletionService() {
-        super();
+        super("EmlTempFileDeletionService");
     }
 
     public EmlTempFileDeletionService(String name) {
-        super();
-    }
-
-    public static void enqueueWork(Context context, Intent work) {
-        enqueueWork(context, EmlTempFileDeletionService.class, JOB_ID, work);
+        super(name);
     }
 
     @Override
-    protected void onHandleWork(Intent intent) {
+    protected void onHandleIntent(Intent intent) {
         final String action = intent.getAction();
         if (Intent.ACTION_DELETE.equals(action)) {
             final Uri uri = intent.getData();
diff --git a/src/com/android/mail/widget/BaseWidgetProvider.java b/src/com/android/mail/widget/BaseWidgetProvider.java
index 42d1ae6..4866782 100644
--- a/src/com/android/mail/widget/BaseWidgetProvider.java
+++ b/src/com/android/mail/widget/BaseWidgetProvider.java
@@ -214,10 +214,6 @@
 
         @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(