WIP: [android] Replace WorkManager with a foreground service #6119

Closed
rtsisyk wants to merge 2 commits from rt-android-remove-workmanager into master
Owner
  • Saves 383KB in the resulting APK
  • Removes android.permission.RECEIVE_BOOT_COMPLETED
  • Removes androidx.work.impl.background.systemalarm.SystemAlarmService
  • Removes androidx.work.impl.background.systemjob.SystemJobService
  • Removes androidx.work.impl.foreground.SystemForegroundService
  • Removes androidx.room.MultiInstanceInvalidationService
  • Removes androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver
  • Removes androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy
  • Removes androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy
  • Removes androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy
  • Removes androidx.work.impl.background.systemalarm.RescheduleReceiver
  • Removes androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver
  • Removes androidx.work.impl.diagnostics.DiagnosticsReceiver
  • Removes androidx.room ORM

Closes #6116

- Saves 383KB in the resulting APK - Removes android.permission.RECEIVE_BOOT_COMPLETED - Removes androidx.work.impl.background.systemalarm.SystemAlarmService - Removes androidx.work.impl.background.systemjob.SystemJobService - Removes androidx.work.impl.foreground.SystemForegroundService - Removes androidx.room.MultiInstanceInvalidationService - Removes androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver - Removes androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy - Removes androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy - Removes androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy - Removes androidx.work.impl.background.systemalarm.RescheduleReceiver - Removes androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver - Removes androidx.work.impl.diagnostics.DiagnosticsReceiver - Removes androidx.room ORM Closes #6116
vng (Migrated from github.com) reviewed 2023-09-24 12:03:09 +00:00
AndrewShkrob reviewed 2023-09-24 12:03:09 +00:00
biodranik (Migrated from github.com) reviewed 2023-09-24 12:59:57 +00:00
biodranik (Migrated from github.com) left a comment

@Jean-BaptisteC it would be great if you can help to test if OSM upload works here on different android versions even with the strictest power saving policies enabled...

@Jean-BaptisteC it would be great if you can help to test if OSM upload works here on different android versions even with the strictest power saving policies enabled...
Jean-BaptisteC (Migrated from github.com) approved these changes 2023-09-24 13:02:40 +00:00
Jean-BaptisteC (Migrated from github.com) left a comment

Pixel 6 - Android 13
Create a new POI
Update POI
Create notes
Update POI offline and upload later
@rtsisyk I don't have see upload notifications (Upload is instant)
@biodranik, yes I have planned to test with older devices (I know, I'm so fast 😁)

Pixel 6 - Android 13 ✅Create a new POI ✅ Update POI ✅ Create notes ✅Update POI offline and upload later @rtsisyk I don't have see upload notifications (Upload is instant) @biodranik, yes I have planned to test with older devices (I know, I'm so fast 😁)
Jean-BaptisteC (Migrated from github.com) reviewed 2023-09-24 13:04:32 +00:00
@ -21625,0 +21625,4 @@
[notification_channel_osm_uploader]
comment = this text will be shown in application notification preferences opposite checkbox which enable/disable OSM uploader notifications. Devices on Android 8+ are affected.
tags = android
en = OSM uploader
Jean-BaptisteC (Migrated from github.com) commented 2023-09-24 13:04:32 +00:00

fr= Envoi à OSM

`fr= Envoi à OSM`
Jean-BaptisteC (Migrated from github.com) reviewed 2023-09-24 13:04:53 +00:00
@ -21625,0 +21630,4 @@
[notification_osm_uploading]
comment = Text in notifcation displayed during uploading OSM changes to the server
tags = android
en = Submitting changes to OSM
Jean-BaptisteC (Migrated from github.com) commented 2023-09-24 13:04:53 +00:00

fr = Envoi des modifications à OSM

`fr = Envoi des modifications à OSM`
biodranik (Migrated from github.com) requested changes 2023-10-01 12:50:45 +00:00
biodranik (Migrated from github.com) left a comment

This PR removes the permission that helps users upload their offline OSM edits automatically, even if they do not launch OM manually.

It also changes the upload behavior and makes it less privacy-friendly by immediately uploading any change, creates a more significant load on the OSM servers due to not using batched changesets, and makes it harder for the OSM community to roll back bad edits when necessary.

As the upload on boot functionality was already broken when OM was forked, it may be OK to move in steps and remove the permission now, and then introduce it later in the separate change. But only if doing that will not break automatic app updates in Google Play and Huawei appgallery. Can someone check and confirm that it won't be an issue later? Because if the removal of the permission and publishing the app without it, and then adding it back and publishing again requires users to manually accept it before updating the app in Google Play, that would be a disaster.

Privacy-friendly batched uploading can be done "as it was before", when the app goes into the background. And then improved by either introducing a random delay, or even better, by introducing a "stricter privacy mode" setting that may also not keep the search/routes history, for example.

This PR removes the permission that helps users upload their offline OSM edits automatically, even if they do not launch OM manually. It also changes the upload behavior and makes it less privacy-friendly by immediately uploading any change, creates a more significant load on the OSM servers due to not using batched changesets, and makes it harder for the OSM community to roll back bad edits when necessary. As the upload on boot functionality was already broken when OM was forked, it may be OK to move in steps and remove the permission now, and then introduce it later in the separate change. But only if doing that will not break automatic app updates in Google Play and Huawei appgallery. Can someone check and confirm that it won't be an issue later? Because if the removal of the permission and publishing the app without it, and then adding it back and publishing again requires users to manually accept it before updating the app in Google Play, that would be a disaster. Privacy-friendly batched uploading can be done "as it was before", when the app goes into the background. And then improved by either introducing a random delay, or even better, by introducing a "stricter privacy mode" setting that may also not keep the search/routes history, for example.
This repo is archived. You cannot comment on pull requests.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#6119
No description provided.