android: name all four permissions WorkManager adds, not one
The note added with the previous commit said RECEIVE_BOOT_COMPLETED arrives in the merged manifest via WorkManager. True, and incomplete — it brings four: RECEIVE_BOOT_COMPLETED, ACCESS_NETWORK_STATE, WAKE_LOCK and FOREGROUND_SERVICE. A comment whose whole job is "here is why the permission list has entries this file does not declare" fails at that job if it accounts for one of them. Each now says what it is for, checked against the built APK's merged manifest rather than the library's — which is the version a person actually sees.
This commit is contained in:
@@ -9,11 +9,22 @@
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<!--
|
||||
RECEIVE_BOOT_COMPLETED is NOT declared here and still ends up in the merged
|
||||
manifest: WorkManager contributes it, so the periodic sync survives a
|
||||
restart instead of silently stopping until the app is next opened. Noted
|
||||
because it shows in the app's permission list and there is otherwise
|
||||
nothing in this file to explain where it came from.
|
||||
Four more permissions are NOT declared here and still reach the merged
|
||||
manifest, contributed by WorkManager for the automatic sync:
|
||||
|
||||
RECEIVE_BOOT_COMPLETED reschedules the periodic sync after a restart,
|
||||
instead of it silently stopping until the app is
|
||||
next opened by hand
|
||||
ACCESS_NETWORK_STATE evaluates the "needs a network" constraint, so a
|
||||
run is not attempted with no route to the server
|
||||
WAKE_LOCK holds the device awake for the seconds a sync
|
||||
takes, so it is not suspended mid-request
|
||||
FOREGROUND_SERVICE used only for expedited work; nothing here asks
|
||||
for it, and it arrives with the library
|
||||
|
||||
Verified against the built APK's merged manifest, not assumed. Noted here
|
||||
because all four appear in the app's permission list and nothing else in
|
||||
this file would explain where they came from.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user