AOSP/Email - Bump targetSdkVersion to 28.

+ Made the attachment service to start in foreground with ongoing notification
  for Android O+. The notification is no light, no sound, no vibration, and
  doesn't popup in the top bar nor lock screen. When all attachments are
  downloaded, it'll silently disappear.

+ EmailProivider calls AttachmentService.startWithoutSpecificAttachmentChange to start the service.

+ Added android:permission="android.permission.BIND_JOB_SERVICE" for service.AttachmentService.

+ Added new string name "notification_downloading_attachments_title".

These changes were based on google3's changes cl/154489077 and cl/155433892

Bug: 115499280
Bug: 119499886

Test: Tested manually by sending an attachment and checkin in webapp Gmail that the mail was delivered. Verified the mail is in the Sent folder. Ran the following tests on Pixel phone.

QA: Make sure attachment can be downloaded in non-gmail accounts. Please test the scenarios listed in cl/154489077 and cl/155433892.

$ make -j 40
  -rw-r--r-- 1 rtenneti primarygroup 6836038 Feb 26 16:40 out/target/product/marlin/system/product/app/Email/Email.apk

$ make UnifiedEmailTests -j
  -rw-r--r-- 1 rtenneti primarygroup 299415 Feb 26 17:16 out/target/product/marlin/testcases/UnifiedEmailTests/UnifiedEmailTests.apk

$ make EmailTests -j
  -rw-r--r-- 1 rtenneti primarygroup 365023 Feb 26 16:43 out/target/product/marlin/testcases/EmailTests/EmailTests.apk

$ adb install -r out/target/product/marlin/system/product/app/Email/Email.apk
$ adb install -r out/target/product/marlin/testcases/UnifiedEmailTests/UnifiedEmailTests.apk
$ adb install -r out/target/product/marlin/testcases/EmailTests/EmailTests.apk

$ adb shell am instrument -w com.android.email.tests
  com.android.email.DummyFlakyTest:.
  com.android.email.LegacyConversionsTest:......
  com.android.email.TestUtils:...
  com.android.email.ThrottleTest:...
  com.android.email.VendorPolicyLoaderTest:......
  com.android.email.activity.setup.AccountSettingsUtilsTests:...
  com.android.email.activity.setup.AccountSetupOutgoingTests:......
  com.android.email.mail.store.imap.ImapElementTest:.
  com.android.email.mail.store.imap.ImapListTest:.........
  com.android.email.mail.store.imap.ImapResponseParserTest:.............
  com.android.email.mail.store.imap.ImapResponseTest:......
  com.android.email.mail.store.imap.ImapStringTest:.......
  com.android.email.mail.store.imap.ImapUtilityTests:...
  com.android.email.mail.transport.DiscourseLoggerTest:.
  com.android.email.service.AttachmentServiceTests:.....................
  com.android.emailcommon.DeviceTests:.
  com.android.emailcommon.internet.MimeBodyPartTest:.
  com.android.emailcommon.internet.MimeHeaderUnitTests:.
  com.android.emailcommon.internet.MimeMessageTest:................
  com.android.emailcommon.internet.MimeUtilityTest:...............
  com.android.emailcommon.mail.FlagTests:.
  com.android.emailcommon.mail.PackedStringTests:...
  com.android.emailcommon.provider.AccountTest:..
  com.android.emailcommon.provider.HostAuthTests:.......
  com.android.emailcommon.utility.AttachmentUtilitiesTests:..
  com.android.emailcommon.utility.EmailAsyncTaskTests:...
  com.android.emailcommon.utility.SSLUtilsTest:...
  com.android.emailcommon.utility.TextUtilitiesTests:.......
  com.android.emailcommon.utility.UtilityTest:......

  Time: 2.334

Change-Id: Ib588703bc04b0b17bc80429116f9a1deb628ce22
5 files changed