app/Gallery2/Gallery2.apk app - update the version to target P (28) or higher. Use JobIntentService to start the AsyncService.

Bug: 115499280
Bug: 119501125

Test: manual - Tested the Gallery UI manually on Pixel phone and ran the following Gallery CTS tests.

$ make -j 40
  -rw-r--r-- 1 rtenneti primarygroup 5505290 Jan 18 18:10 out/target/product/marlin/system/product/app/Gallery2/Gallery2.apk

$ adb install -r -d out/target/product/marlin/system/product/app/Gallery2/Gallery2.apk

$ forrest test \
  --test_location=remote \
  --test_bench_config=presubmit/avd-cf \
  --gerrit_hostname android th:cl:878181:aosp_cf_x86_phone-userdebug:aosp-master \
  atp:avd/avd_boot_test

   https://forrest.googleplex.com/request/L36600000251931014

CTS tests for Gallery2 app
--------------------------
$ make CtsWidgetTestCases -j
  -rw-r--r-- 1 rtenneti primarygroup 3308652 Jan 22 11:28 out/host/linux-x86/cts/android-cts/testcases/CtsWidgetTestCases.apk

./development/testrunner/runtest.py --path cts/tests/tests/widget/src/android/widget/cts/GalleryTest.java
  android.widget.cts.GalleryTest:................
  Time: 3.271
  OK (16 tests)

./development/testrunner/runtest.py --path cts/tests/tests/view/src/android/view/cts/ViewTest.java
  android.view.cts.ViewTest:...
  Time: 45.6
  OK (217 tests)

./development/testrunner/runtest.py --path cts/tests/tests/text/src/android/text/method/cts/CharacterPickerDialogTest.java
  android.text.method.cts.CharacterPickerDialogTest:....
  Time: 0.886
  OK (4 tests)

./development/testrunner/runtest.py --path cts/tests/tests/widget/src/android/widget/cts/Gallery_LayoutParamsTest.java
  android.widget.cts.Gallery_LayoutParamsTest:.
  Time: 0.059
  OK (1 test)

./development/testrunner/runtest.py --path cts/tests/tests/widget/src/android/widget/cts/AbsSpinnerTest.java
  android.widget.cts.AbsSpinnerTest:.........
  Time: 1.646
  OK (9 tests)



Change-Id: I9cd9ae3aac2fe09d9da91e859828ab9eec49ccab
3 files changed