AOSP/UnifiedEmail - Bumped the targetSdkVersion to 28 (maximum version). Used JobIntentservice API calls to replace context.startService.

+ Added android:permission="android.permission.BIND_JOB_SERVICE" for services that use JobIntentservice. This is to fix the previous CL's rollback (b/124915301)

Bug: 115499280
Bug: 119499886
Bug: 124915301

Test: manual - Ran the following tests on Pixel phone. Tested the email UI.

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

$ make UnifiedEmailTests -j
  -rw-r--r-- 1 rtenneti primarygroup 299415 Feb 20 15:37 out/target/product/marlin/testcases/UnifiedEmailTests/UnifiedEmailTests.apk

$ make EmailTests -j
  -rw-r--r-- 1 rtenneti primarygroup 365023 Feb 20 15:38 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
  Time: 2.748
  OK (157 tests)

Previous CL was rejected because of the following test failed. Verified the following test works ok via Forrest.

avd/avd_boot_health_check tests have passed Target: aosp_cf_x86_phone-userdebug, Branch: aosp-master

https://android-build.googleplex.com/builds/forrest/run/L96800000269361291

Change-Id: I5287e35cfe5d8a94cc6293661e73e7e3ce0e08fb
4 files changed