diff options
author | Makoto Onuki <omakoto@google.com> | 2023-01-10 11:02:35 -0800 |
---|---|---|
committer | Makoto Onuki <omakoto@google.com> | 2023-01-19 09:09:37 -0800 |
commit | 2105651296d1a0a4a7993324bbcc05efbf0c99e3 (patch) | |
tree | 2c078b613eaeeb8c8de81b5204021ac6956bfeff /AndroidManifest.xml | |
parent | 189e4b80b7510cd94864f769b321df9e73c130f0 (diff) | |
download | Contacts-2105651296d1a0a4a7993324bbcc05efbf0c99e3.tar.gz |
Set foreground service type to SIM contact import
Bug: 257270313
Test: Manual test, importing a sim contact
SIM contact can be created with:
$ adb shell content insert --uri content://icc/adn --bind 'tag:s:SimContact'-$RANDOM --bind number:s:1555555555
Make sure the following logs were printed:
I ActivityManager: Short FGS started: ServiceRecord{5d3dc75 u0 com.android.contacts/.vcard.VCardService}
I ActivityManager: Stop short FGS timeout: ServiceRecord{5d3dc75 u0 com.android.contacts/.vcard.VCardService}
Note they show up because ActiveServices.DEBUG_SHORT_SERVICE is true.
Then wait for two minutes and make sure the app wouldn't get ANRed.
Change-Id: I111760ca57e7b02ccc29c6a1081e704d8f610aec
Diffstat (limited to 'AndroidManifest.xml')
-rw-r--r-- | AndroidManifest.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0e5945850..e16155661 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -474,7 +474,8 @@ <!-- Service to import contacts from the SIM card --> <service android:name=".SimImportService" - android:exported="false"/> + android:exported="false" + android:foregroundServiceType="shortService" /> <!-- Attaches a photo to a contact. Started from external applications --> <activity |