DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master

Bug: 132622481
Change-Id: I1f21b113a03d07c486785cb095917854a9f615f2
diff --git a/Android.mk b/Android.mk
index 34d7cb4..9d0a90a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -26,6 +26,8 @@
 
 LOCAL_PACKAGE_NAME := Gallery2
 
+LOCAL_PRODUCT_MODULE := true
+
 LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D
 
 LOCAL_SDK_VERSION := current
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0263e6d..43439f9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -7,7 +7,7 @@
 
     <original-package android:name="com.android.gallery3d" />
 
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="24" />
+    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28" />
 
     <permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER"
             android:protectionLevel="signatureOrSystem" />
@@ -324,7 +324,9 @@
                 <data android:scheme="package"/>
             </intent-filter>
         </receiver>
-        <service android:name="com.android.gallery3d.app.PackagesMonitor$AsyncService"/>
+        <service android:name="com.android.gallery3d.app.PackagesMonitor$AsyncService"
+                 android:permission="android.permission.BIND_JOB_SERVICE"
+                 android:exported="true"/>
         <service android:name="com.android.gallery3d.gadget.WidgetService"
                 android:permission="android.permission.BIND_REMOTEVIEWS"/>
         <activity android:name="com.android.gallery3d.gadget.WidgetConfigure"
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 20db309..0576234 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -50,7 +50,10 @@
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Gallery*)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Gallery*)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Gallery*)
-
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Gallery2)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjni_jpegstream.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjni_eglfence.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjni_filtershow_filters.so)
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..ed1d60a
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,3 @@
+# Default code reviewers picked from top 3 or more developers.
+# Please update this list if you find better candidates.
+rtenneti@google.com
diff --git a/jni/Android.mk b/jni/Android.mk
index 55bb205..c08d7be 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -20,6 +20,8 @@
 
 LOCAL_MODULE := libjni_eglfence
 
+LOCAL_PRODUCT_MODULE := true
+
 LOCAL_LDLIBS := -llog -lEGL
 
 
@@ -32,6 +34,7 @@
 LOCAL_CPP_EXTENSION := .cc
 LOCAL_SDK_VERSION := 9
 LOCAL_MODULE    := libjni_filtershow_filters
+LOCAL_PRODUCT_MODULE := true
 LOCAL_SRC_FILES := filters/gradient.c \
                    filters/saturated.c \
                    filters/exposure.c \
diff --git a/jni_jpegstream/Android.mk b/jni_jpegstream/Android.mk
index 7b4d9a4..f1ea324 100644
--- a/jni_jpegstream/Android.mk
+++ b/jni_jpegstream/Android.mk
@@ -15,6 +15,7 @@
 
 LOCAL_SDK_VERSION   := 17
 LOCAL_ARM_MODE := arm
+LOCAL_PRODUCT_MODULE := true
 
 LOCAL_CFLAGS    += -ffast-math -O3 -funroll-loops
 LOCAL_CFLAGS += -Wall -Wextra -Werror
diff --git a/proguard.flags b/proguard.flags
index 72cba51..5fde2d3 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -47,6 +47,9 @@
 -keep interface com.actionbarsherlock.** { *; }
 -keepattributes *Annotation*
 
+# Required for JobIntentService
+-keep class androidx.core.app.CoreComponentFactory { *; }
+
 # Required for mp4parser
 -keep public class * implements com.coremedia.iso.boxes.Box
 
diff --git a/res/mipmap-anydpi/ic_launcher_gallery.xml b/res/mipmap-anydpi-v26/ic_launcher_gallery.xml
similarity index 100%
rename from res/mipmap-anydpi/ic_launcher_gallery.xml
rename to res/mipmap-anydpi-v26/ic_launcher_gallery.xml
diff --git a/res/values-bn/filtershow_strings.xml b/res/values-bn/filtershow_strings.xml
index b13645b..12156ba 100644
--- a/res/values-bn/filtershow_strings.xml
+++ b/res/values-bn/filtershow_strings.xml
@@ -103,13 +103,13 @@
     <string name="editor_chan_sat_cyan" msgid="1367634650172508288">"সবজে নীল"</string>
     <string name="editor_chan_sat_blue" msgid="384409736863387895">"নীল"</string>
     <string name="editor_chan_sat_magenta" msgid="6689215719351415546">"ম্যাজেন্টা"</string>
-    <string name="editor_grad_style" msgid="2168414479007745179">"স্টাইল"</string>
+    <string name="editor_grad_style" msgid="2168414479007745179">"শৈলী"</string>
     <string name="editor_grad_new" msgid="4857265951369377379">"নতুন"</string>
     <string name="curves_channel_rgb" msgid="7909209509638333690">"RGB"</string>
     <string name="curves_channel_red" msgid="4199710104162111357">"লাল"</string>
     <string name="curves_channel_green" msgid="3733003466905031016">"সবুজ"</string>
     <string name="curves_channel_blue" msgid="9129211507395079371">"নীল"</string>
-    <string name="draw_style" msgid="2036125061987325389">"স্টাইল"</string>
+    <string name="draw_style" msgid="2036125061987325389">"শৈলী"</string>
     <string name="draw_size" msgid="4360005386104151209">"আকার"</string>
     <string name="draw_hue" msgid="4975135843189267133">"রঙ বিন্যাস"</string>
     <string name="draw_saturation" msgid="5394395648014454882">"পরিপৃক্তি"</string>
diff --git a/res/values-bs/filtershow_strings.xml b/res/values-bs/filtershow_strings.xml
index c41962d..b260622 100644
--- a/res/values-bs/filtershow_strings.xml
+++ b/res/values-bs/filtershow_strings.xml
@@ -124,7 +124,7 @@
     <string name="color_border_color" msgid="8765458414425980711">"Boja"</string>
     <string name="color_border_clear" msgid="4418261191091091722">"Obriši"</string>
     <string name="color_pick_select" msgid="734312818059057394">"Izabrati prilagođenu boju"</string>
-    <string name="color_pick_title" msgid="6195567431995308876">"Odabrati boju"</string>
+    <string name="color_pick_title" msgid="6195567431995308876">"Izabrati boju"</string>
     <string name="draw_size_title" msgid="3121649039610273977">"Odabir veličine"</string>
     <string name="draw_size_accept" msgid="6781529716526190028">"UREDU"</string>
     <string name="state_panel_original" msgid="9069584409934164419">"Original"</string>
diff --git a/res/values-ca/filtershow_strings.xml b/res/values-ca/filtershow_strings.xml
index 2b621de..517886f 100644
--- a/res/values-ca/filtershow_strings.xml
+++ b/res/values-ca/filtershow_strings.xml
@@ -38,7 +38,7 @@
     <string name="size" msgid="4639404642236356037">"Mida"</string>
     <string name="x" msgid="6810256999024563662">"x"</string>
     <string name="menu_settings" msgid="6428291655769260831">"Configuració"</string>
-    <string name="unsaved" msgid="8704442449002374375">"Hi ha canvis no desats en aquesta imatge."</string>
+    <string name="unsaved" msgid="8704442449002374375">"Hi ha canvis sense desar en aquesta imatge."</string>
     <string name="save_before_exit" msgid="2680660633675916712">"Vols desar abans de sortir?"</string>
     <string name="save_and_exit" msgid="3628425023766687419">"Desa i surt"</string>
     <string name="save_and_processing" msgid="6371565035837463194">"S\'està processant la imatge en resolució completa..."</string>
diff --git a/res/values-en-rXC/filtershow_strings.xml b/res/values-en-rXC/filtershow_strings.xml
new file mode 100644
index 0000000..6178981
--- /dev/null
+++ b/res/values-en-rXC/filtershow_strings.xml
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2012 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for title_activity_filter_show (2036539130684382763) -->
+    <skip />
+    <!-- no translation found for cannot_load_image (5023634941212959976) -->
+    <skip />
+    <!-- no translation found for cannot_edit_original (5890293845882609388) -->
+    <skip />
+    <!-- no translation found for original_picture_text (3076213290079909698) -->
+    <skip />
+    <!-- no translation found for setting_wallpaper (4679087092300036632) -->
+    <skip />
+    <!-- no translation found for download_failure (5923323939788582895) -->
+    <skip />
+    <!-- no translation found for original (3524493791230430897) -->
+    <skip />
+    <!-- no translation found for borders (2067345080568684614) -->
+    <!-- no translation found for borders (4461692156695893616) -->
+    <skip />
+    <!-- no translation found for custom_border (8679893731790931871) -->
+    <skip />
+    <!-- no translation found for filtershow_undo (6781743189243585101) -->
+    <skip />
+    <!-- no translation found for filtershow_redo (4219489910543059747) -->
+    <skip />
+    <!-- no translation found for show_imagestate_panel (281932769701043015) -->
+    <skip />
+    <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
+    <skip />
+    <!-- no translation found for export_image (3202835713172222134) -->
+    <skip />
+    <!-- no translation found for print_image (1942989216591621413) -->
+    <skip />
+    <!-- no translation found for export_flattened (9046192331465915411) -->
+    <skip />
+    <!-- no translation found for select_output_settings (1268532018080310748) -->
+    <skip />
+    <!-- no translation found for quality (179292110309050529) -->
+    <skip />
+    <!-- no translation found for size (4639404642236356037) -->
+    <skip />
+    <!-- no translation found for x (6810256999024563662) -->
+    <skip />
+    <!-- no translation found for menu_settings (6428291655769260831) -->
+    <skip />
+    <!-- no translation found for unsaved (8704442449002374375) -->
+    <skip />
+    <!-- no translation found for save_before_exit (2680660633675916712) -->
+    <skip />
+    <!-- no translation found for save_and_exit (3628425023766687419) -->
+    <skip />
+    <!-- no translation found for save_and_processing (6371565035837463194) -->
+    <skip />
+    <!-- no translation found for exit (242642957038770113) -->
+    <skip />
+    <!-- no translation found for history (455767361472692409) -->
+    <skip />
+    <!-- no translation found for reset (9013181350779592937) -->
+    <skip />
+    <!-- no translation found for history_original (150973253194312841) -->
+    <skip />
+    <!-- no translation found for imageState (8632586742752891968) -->
+    <skip />
+    <!-- no translation found for compare_original (8140838959007796977) -->
+    <skip />
+    <!-- no translation found for apply_effect (1218288221200568947) -->
+    <skip />
+    <!-- no translation found for reset_effect (7712605581024929564) -->
+    <skip />
+    <!-- no translation found for aspect (4025244950820813059) -->
+    <skip />
+    <!-- no translation found for aspect1to1_effect (1159104543795779123) -->
+    <skip />
+    <!-- no translation found for aspect4to3_effect (7968067847241223578) -->
+    <skip />
+    <!-- no translation found for aspect3to4_effect (7078163990979248864) -->
+    <skip />
+    <!-- no translation found for aspect4to6_effect (1410129351686165654) -->
+    <skip />
+    <!-- no translation found for aspect5to7_effect (5122395569059384741) -->
+    <skip />
+    <!-- no translation found for aspect7to5_effect (5780001758108328143) -->
+    <skip />
+    <!-- no translation found for aspect9to16_effect (7740468012919660728) -->
+    <skip />
+    <!-- no translation found for aspectNone_effect (6263330561046574134) -->
+    <skip />
+    <!-- no translation found for aspectOriginal_effect (5678516555493036594) -->
+    <skip />
+    <!-- no translation found for Fixed (8017376448916924565) -->
+    <skip />
+    <!-- no translation found for tinyplanet (2783694326474415761) -->
+    <skip />
+    <string name="exposure" msgid="6526397045949374905">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‎‏‎‎‏‎‏‏‏‏‎‏‏‎‎‎‏‎‎‎‎‏‏‏‎‏‎‎‏‏‏‎‏‏‎‏‎‎‎‎‏‏‏‎‎‎‏‎‎‏‎‏‏‏‎‏‏‎‎‎‏‎‏‏‎‎‎‎‏‏‎‏‏‎Exposure‎‏‎‎‏‎"</string>
+    <!-- no translation found for sharpness (6463103068318055412) -->
+    <skip />
+    <!-- no translation found for contrast (2310908487756769019) -->
+    <skip />
+    <!-- no translation found for vibrance (3326744578577835915) -->
+    <skip />
+    <!-- no translation found for saturation (7026791551032438585) -->
+    <skip />
+    <!-- no translation found for bwfilter (8927492494576933793) -->
+    <skip />
+    <!-- no translation found for wbalance (6346581563387083613) -->
+    <skip />
+    <!-- no translation found for hue (6231252147971086030) -->
+    <skip />
+    <!-- no translation found for shadow_recovery (3928572915300287152) -->
+    <skip />
+    <!-- no translation found for highlight_recovery (8262208470735204243) -->
+    <skip />
+    <!-- no translation found for curvesRGB (915010781090477550) -->
+    <skip />
+    <!-- no translation found for vignette (934721068851885390) -->
+    <skip />
+    <!-- no translation found for vignette_main (6046495605390665423) -->
+    <skip />
+    <!-- no translation found for vignette_exposure (6862058227309534094) -->
+    <skip />
+    <!-- no translation found for vignette_saturation (1617055207565719771) -->
+    <skip />
+    <!-- no translation found for vignette_contrast (955732121756799897) -->
+    <skip />
+    <!-- no translation found for vignette_falloff (690918055030064199) -->
+    <skip />
+    <!-- no translation found for redeye (4508883127049472069) -->
+    <skip />
+    <!-- no translation found for imageDraw (6918552177844486656) -->
+    <skip />
+    <!-- no translation found for straighten (26025591664983528) -->
+    <!-- no translation found for straighten (5217801513491493491) -->
+    <skip />
+    <!-- no translation found for crop (5781263790107850771) -->
+    <!-- no translation found for crop (5584000454518174632) -->
+    <skip />
+    <!-- no translation found for rotate (2796802553793795371) -->
+    <!-- no translation found for rotate (460017689320955494) -->
+    <skip />
+    <!-- no translation found for mirror (5482518108154883096) -->
+    <skip />
+    <!-- no translation found for negative (6998313764388022201) -->
+    <skip />
+    <!-- no translation found for none (6633966646410296520) -->
+    <!-- no translation found for none (3601545724573307541) -->
+    <skip />
+    <!-- no translation found for edge (7036064886242147551) -->
+    <skip />
+    <!-- no translation found for kmeans (2080952022674981541) -->
+    <skip />
+    <!-- no translation found for downsample (3552938534146980104) -->
+    <skip />
+    <!-- no translation found for grad (546774853424848655) -->
+    <skip />
+    <!-- no translation found for editor_grad_brightness (5937316734380235741) -->
+    <skip />
+    <!-- no translation found for editor_grad_contrast (3454456673401803360) -->
+    <skip />
+    <!-- no translation found for editor_grad_saturation (3760247354109521726) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_main (4427652337797121940) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_red (1699222266490540696) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_yellow (1488997071882154179) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_green (1514055896212975167) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_cyan (1367634650172508288) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_blue (384409736863387895) -->
+    <skip />
+    <!-- no translation found for editor_chan_sat_magenta (6689215719351415546) -->
+    <skip />
+    <!-- no translation found for editor_grad_style (2168414479007745179) -->
+    <skip />
+    <!-- no translation found for editor_grad_new (4857265951369377379) -->
+    <skip />
+    <!-- no translation found for curves_channel_rgb (7909209509638333690) -->
+    <skip />
+    <!-- no translation found for curves_channel_red (4199710104162111357) -->
+    <skip />
+    <!-- no translation found for curves_channel_green (3733003466905031016) -->
+    <skip />
+    <!-- no translation found for curves_channel_blue (9129211507395079371) -->
+    <skip />
+    <!-- no translation found for draw_style (2036125061987325389) -->
+    <skip />
+    <!-- no translation found for draw_size (4360005386104151209) -->
+    <skip />
+    <!-- no translation found for draw_hue (4975135843189267133) -->
+    <skip />
+    <!-- no translation found for draw_saturation (5394395648014454882) -->
+    <skip />
+    <!-- no translation found for draw_value (6571604055161538273) -->
+    <skip />
+    <!-- no translation found for draw_color (2119030386987211193) -->
+    <skip />
+    <!-- no translation found for draw_style_line (9216476853904429628) -->
+    <skip />
+    <!-- no translation found for draw_style_brush_spatter (7612691122932981554) -->
+    <skip />
+    <!-- no translation found for draw_style_brush_marker (8468302322165644292) -->
+    <skip />
+    <!-- no translation found for draw_clear (6728155515454921052) -->
+    <skip />
+    <!-- no translation found for color_border_size (1086895807615869290) -->
+    <skip />
+    <!-- no translation found for color_border_corner_size (7637235159438869979) -->
+    <skip />
+    <!-- no translation found for color_border_color (8765458414425980711) -->
+    <skip />
+    <!-- no translation found for color_border_clear (4418261191091091722) -->
+    <skip />
+    <!-- no translation found for color_pick_select (734312818059057394) -->
+    <skip />
+    <!-- no translation found for color_pick_title (6195567431995308876) -->
+    <skip />
+    <!-- no translation found for draw_size_title (3121649039610273977) -->
+    <skip />
+    <!-- no translation found for draw_size_accept (6781529716526190028) -->
+    <skip />
+    <!-- no translation found for state_panel_original (9069584409934164419) -->
+    <skip />
+    <!-- no translation found for state_panel_result (318640531123298676) -->
+    <skip />
+    <!-- no translation found for filtershow_notification_label (1653168445525855247) -->
+    <skip />
+    <!-- no translation found for filtershow_notification_message (2661871765484036286) -->
+    <skip />
+    <!-- no translation found for filtershow_save_preset (3933550455577927439) -->
+    <skip />
+    <!-- no translation found for filtershow_manage_preset (3872896753708921286) -->
+    <skip />
+    <!-- no translation found for filtershow_new_preset (8923930134923416617) -->
+    <skip />
+    <!-- no translation found for filtershow_preset_name (7015939727047649866) -->
+    <skip />
+    <!-- no translation found for filtershow_show_info_panel (5773036746043711115) -->
+    <skip />
+    <!-- no translation found for filtershow_show_info_panel_name (5908258517140549439) -->
+    <skip />
+    <!-- no translation found for filtershow_show_info_panel_size (1714666849204493017) -->
+    <skip />
+    <!-- no translation found for filtershow_show_info_panel_histogram (2669188469897955809) -->
+    <skip />
+    <!-- no translation found for filtershow_show_info_panel_exif (4965486882625125154) -->
+    <skip />
+    <!-- no translation found for filtershow_add_button_looks (8630823661416925426) -->
+    <skip />
+    <!-- no translation found for filtershow_add_button_versions (7620107266685809612) -->
+    <skip />
+    <!-- no translation found for filtershow_version_original (1413894292200912828) -->
+    <skip />
+    <!-- no translation found for filtershow_version_current (6609334422797468952) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_model (3543206476046267466) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_aperture (5076571522763604380) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_focal_length (5925151469731623706) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_iso (5822494416955625317) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_subject_distance (4920632253433906646) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_date (8882402253732028544) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_f_stop (6081797865604483139) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_exposure_time (4099067062781294115) -->
+    <skip />
+    <!-- no translation found for filtershow_exif_copyright (8801875918803737581) -->
+    <skip />
+</resources>
diff --git a/res/values-mr/filtershow_strings.xml b/res/values-mr/filtershow_strings.xml
index 13ed841..09b5991 100644
--- a/res/values-mr/filtershow_strings.xml
+++ b/res/values-mr/filtershow_strings.xml
@@ -30,16 +30,16 @@
     <string name="filtershow_redo" msgid="4219489910543059747">"पुन्हा करा"</string>
     <string name="show_imagestate_panel" msgid="281932769701043015">"लागू केलेले प्रभाव दर्शवा"</string>
     <string name="hide_imagestate_panel" msgid="7207643485811695257">"लागू केलेले प्रभाव लपवा"</string>
-    <string name="export_image" msgid="3202835713172222134">"एक्सपोर्ट"</string>
+    <string name="export_image" msgid="3202835713172222134">"निर्यात"</string>
     <string name="print_image" msgid="1942989216591621413">"प्रिंट करा"</string>
-    <string name="export_flattened" msgid="9046192331465915411">"सपाट केलेली इमेज एक्सपोर्ट करा"</string>
-    <string name="select_output_settings" msgid="1268532018080310748">"एक्सपोर्ट केलेली इमेज इतिहासाशिवाय एक प्रतिलिपी असेल."</string>
+    <string name="export_flattened" msgid="9046192331465915411">"सपाट केलेली इमेज निर्यात करा"</string>
+    <string name="select_output_settings" msgid="1268532018080310748">"निर्यात केलेली इमेज इतिहासाशिवाय एक प्रतिलिपी असेल."</string>
     <string name="quality" msgid="179292110309050529">"गुणवत्ता"</string>
     <string name="size" msgid="4639404642236356037">"आकार"</string>
     <string name="x" msgid="6810256999024563662">"x"</string>
     <string name="menu_settings" msgid="6428291655769260831">"सेटिंग्ज"</string>
-    <string name="unsaved" msgid="8704442449002374375">"या प्रतिमेवर सेव्ह न केलेले बदल आहेत."</string>
-    <string name="save_before_exit" msgid="2680660633675916712">"निर्गमन करण्यापूर्वी तुम्ही सेव्ह करु इच्छिता?"</string>
+    <string name="unsaved" msgid="8704442449002374375">"या प्रतिमेवर जतन न केलेले बदल आहेत."</string>
+    <string name="save_before_exit" msgid="2680660633675916712">"निर्गमन करण्यापूर्वी आपण जतन करु इच्छिता?"</string>
     <string name="save_and_exit" msgid="3628425023766687419">"सेव्ह करा आणि बाहेर पडा"</string>
     <string name="save_and_processing" msgid="6371565035837463194">"संपूर्ण रिजोल्यूशन प्रतिमेवर प्रक्रिया करत आहे..."</string>
     <string name="exit" msgid="242642957038770113">"निर्गमन करा"</string>
@@ -129,7 +129,7 @@
     <string name="draw_size_accept" msgid="6781529716526190028">"ठीक आहे"</string>
     <string name="state_panel_original" msgid="9069584409934164419">"मूळ"</string>
     <string name="state_panel_result" msgid="318640531123298676">"परिणाम"</string>
-    <string name="filtershow_notification_label" msgid="1653168445525855247">"इमेज सेव्ह करत आहे"</string>
+    <string name="filtershow_notification_label" msgid="1653168445525855247">"इमेज जतन करत आहे"</string>
     <string name="filtershow_notification_message" msgid="2661871765484036286">"प्रक्रिया करत आहे..."</string>
     <string name="filtershow_save_preset" msgid="3933550455577927439">"वर्तमान प्रीसेट सेव्ह करा"</string>
     <string name="filtershow_manage_preset" msgid="3872896753708921286">"वापरकर्ता प्रीसेट व्यवस्थापित करा"</string>
diff --git a/res/values-ne/filtershow_strings.xml b/res/values-ne/filtershow_strings.xml
index c4d8097..ba40805 100644
--- a/res/values-ne/filtershow_strings.xml
+++ b/res/values-ne/filtershow_strings.xml
@@ -41,7 +41,7 @@
     <string name="unsaved" msgid="8704442449002374375">"यो तस्बिरमा बचत नगरिएका परिवर्तनहरू छन्।"</string>
     <string name="save_before_exit" msgid="2680660633675916712">"के तपाईं निस्कनुभन्दा पहिले बचत गर्न चाहनु हुन्छ?"</string>
     <string name="save_and_exit" msgid="3628425023766687419">"बचत गरेर निस्कनुहोस्"</string>
-    <string name="save_and_processing" msgid="6371565035837463194">"पूर्ण रिजोलुसन चित्र प्रशोधन गर्दै"</string>
+    <string name="save_and_processing" msgid="6371565035837463194">"पूर्ण रिजोलुसन चित्र प्रसोधन गर्दै"</string>
     <string name="exit" msgid="242642957038770113">"निकास"</string>
     <string name="history" msgid="455767361472692409">"इतिहास"</string>
     <string name="reset" msgid="9013181350779592937">"पुनःसेट गर्नुहोस्"</string>
@@ -126,11 +126,11 @@
     <string name="color_pick_select" msgid="734312818059057394">"कस्टम रङ्ग छान्नुहोस्"</string>
     <string name="color_pick_title" msgid="6195567431995308876">"रङ्ग छान्नुहोस्"</string>
     <string name="draw_size_title" msgid="3121649039610273977">"साइज चयन गर्नुहोस्"</string>
-    <string name="draw_size_accept" msgid="6781529716526190028">"ठिक छ"</string>
+    <string name="draw_size_accept" msgid="6781529716526190028">"ठीक छ"</string>
     <string name="state_panel_original" msgid="9069584409934164419">"मूल"</string>
     <string name="state_panel_result" msgid="318640531123298676">"परिणाम"</string>
     <string name="filtershow_notification_label" msgid="1653168445525855247">"चित्र सुरक्षित गर्दै"</string>
-    <string name="filtershow_notification_message" msgid="2661871765484036286">"प्रशोधन गरिँदै ..."</string>
+    <string name="filtershow_notification_message" msgid="2661871765484036286">"प्रसोधन गरिँदै ..."</string>
     <string name="filtershow_save_preset" msgid="3933550455577927439">"वर्तमान पूर्वसेट सुरक्षित गर्नुहोस्"</string>
     <string name="filtershow_manage_preset" msgid="3872896753708921286">"प्रयोगकर्ता पूर्वसेटहरू प्रबन्ध गर्नुहोस्"</string>
     <string name="filtershow_new_preset" msgid="8923930134923416617">"नयाँ पूर्वसेट"</string>
diff --git a/res/values-zh-rTW/filtershow_strings.xml b/res/values-zh-rTW/filtershow_strings.xml
index f11b08e..f689a0f 100644
--- a/res/values-zh-rTW/filtershow_strings.xml
+++ b/res/values-zh-rTW/filtershow_strings.xml
@@ -33,7 +33,7 @@
     <string name="export_image" msgid="3202835713172222134">"匯出"</string>
     <string name="print_image" msgid="1942989216591621413">"列印"</string>
     <string name="export_flattened" msgid="9046192331465915411">"匯出壓平合併的圖片"</string>
-    <string name="select_output_settings" msgid="1268532018080310748">"匯出的項目是不含記錄的複製圖片。"</string>
+    <string name="select_output_settings" msgid="1268532018080310748">"匯出的項目是不含紀錄的複製圖片。"</string>
     <string name="quality" msgid="179292110309050529">"畫質"</string>
     <string name="size" msgid="4639404642236356037">"大小"</string>
     <string name="x" msgid="6810256999024563662">"x"</string>
@@ -43,7 +43,7 @@
     <string name="save_and_exit" msgid="3628425023766687419">"儲存並結束"</string>
     <string name="save_and_processing" msgid="6371565035837463194">"正在處理完整解析度圖片..."</string>
     <string name="exit" msgid="242642957038770113">"結束"</string>
-    <string name="history" msgid="455767361472692409">"記錄"</string>
+    <string name="history" msgid="455767361472692409">"紀錄"</string>
     <string name="reset" msgid="9013181350779592937">"重設"</string>
     <!-- no translation found for history_original (150973253194312841) -->
     <skip />
diff --git a/src/com/android/gallery3d/app/PackagesMonitor.java b/src/com/android/gallery3d/app/PackagesMonitor.java
index 9b2412f..be262fd 100644
--- a/src/com/android/gallery3d/app/PackagesMonitor.java
+++ b/src/com/android/gallery3d/app/PackagesMonitor.java
@@ -22,6 +22,7 @@
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
+import androidx.core.app.JobIntentService;
 
 import com.android.gallery3d.picasasource.PicasaSource;
 import com.android.gallery3d.util.LightCycleHelper;
@@ -37,16 +38,18 @@
     @Override
     public void onReceive(final Context context, final Intent intent) {
         intent.setClass(context, AsyncService.class);
-        context.startService(intent);
+        AsyncService.enqueueWork(context, intent);
     }
 
-    public static class AsyncService extends IntentService {
-        public AsyncService() {
-            super("GalleryPackagesMonitorAsync");
+    public static class AsyncService extends JobIntentService {
+        public static final int JOB_ID = 1;
+
+        public static void enqueueWork(Context context, Intent work) {
+            enqueueWork(context, AsyncService.class, JOB_ID, work);
         }
 
         @Override
-        protected void onHandleIntent(Intent intent) {
+        protected void onHandleWork(Intent intent) {
             onReceiveAsync(this, intent);
         }
     }