forked from organicmaps/organicmaps
Organic Maps drains the battery like crazy with default settings. **Steps to reproduce:** 1. Install and run the app. 2. Lock your device and put it on a flat surface, with the screen facing up. 3. Pick up the device OR just tap on the screen. 4. The screen will automatically turn on, this is an Android feature. 5. Organic Maps will never allow the screen to go off after that. Now, imaging this case happens while the phone is in a pocket. The battery may The battery will completely drain before the user even notice that screen is on. I see Organic Maps draining battery and burning screens on my devices regulary. The problem is caused by two options which are enabled by default - "Show on the lock screen" and "Allow the screen to sleep". The first option adds the app to the lock screen (which is weird on its own). The second option doesn't allow the phone's screen to go off. This patch does the following: - Inverts "Allow the screen to sleep" option to "Keep the screen on". - Sets the default value of the option to OFF (=allow screen to sleep). - Applies the option only in FOLLOW & FOLLOW_ROTATE location modes. - Forces the screen to keep on during navigation no matter of the option. To summarize, with enabled "Keep the screen on" the screen will be kept on in the following cases: - During navigation. - FOLLOW and FOLLOW_ROTATE location modes. Without the option, the screen will be kept on only during navigation. Signed-off-by: Roman Tsisyk <roman@tsisyk.com> |
||
---|---|---|
.. | ||
benchmarks | ||
borders | ||
conf/isolines | ||
countries-strings | ||
gpx_test_data | ||
kml_test_data | ||
resources-6plus_clear | ||
resources-6plus_dark | ||
resources-default | ||
resources-hdpi_clear | ||
resources-hdpi_dark | ||
resources-mdpi_clear | ||
resources-mdpi_dark | ||
resources-svg | ||
resources-xhdpi_clear | ||
resources-xhdpi_dark | ||
resources-xxhdpi_clear | ||
resources-xxhdpi_dark | ||
resources-xxxhdpi_clear | ||
resources-xxxhdpi_dark | ||
search-icons/svg | ||
sound-strings | ||
strings | ||
styles | ||
vulkan_shaders | ||
00_NotoNaskhArabic-Regular.ttf | ||
00_NotoSansThai-Regular.ttf | ||
00_NotoSerifDevanagari-Regular.ttf | ||
01_dejavusans.ttf | ||
02_droidsans-fallback.ttf | ||
03_jomolhari-id-a3d.ttf | ||
04_padauk.ttf | ||
05_khmeros.ttf | ||
06_code2000.ttf | ||
07_roboto_medium.ttf | ||
borders_vs_osm.csv | ||
broken_bookmarks.kmb.test | ||
CaseFolding.test | ||
categories.txt | ||
categories_brands.txt | ||
categories_cuisines.txt | ||
classificator.txt | ||
colors.txt | ||
config.xsd | ||
copyright.html | ||
countries.txt | ||
countries_meta.txt | ||
countries_names.txt | ||
countries_synonyms.csv | ||
dictionary.slf | ||
drules_proto-bw.bin | ||
drules_proto.bin | ||
drules_proto.txt | ||
drules_proto_clear.bin | ||
drules_proto_clear.txt | ||
drules_proto_dark.bin | ||
drules_proto_dark.txt | ||
drules_proto_outdoors_clear.bin | ||
drules_proto_outdoors_clear.txt | ||
drules_proto_outdoors_dark.bin | ||
drules_proto_outdoors_dark.txt | ||
drules_proto_vehicle_clear.bin | ||
drules_proto_vehicle_clear.txt | ||
drules_proto_vehicle_dark.bin | ||
drules_proto_vehicle_dark.txt | ||
editor.config | ||
faq.html | ||
fonts_blacklist.txt | ||
fonts_whitelist.txt | ||
hardcoded_categories.txt | ||
hierarchy.txt | ||
icudt73l.dat | ||
languages.txt | ||
mapcss-dynamic.txt | ||
mapcss-mapping.csv | ||
minsk-pass.mwm | ||
minsk-pass.osm.bz2 | ||
mixed_nodes.txt | ||
mixed_tags.txt | ||
mwm_names_en.txt | ||
old_vs_new.csv | ||
opening_hours_how_to_edit.html | ||
packed_polygons.bin | ||
patterns.txt | ||
replaced_tags.txt | ||
routing_statistics.log | ||
skipped_elements.json | ||
synonyms.txt | ||
transit_colors.txt | ||
types.txt | ||
unicode_blocks.txt | ||
visibility.txt | ||
welcome.html | ||
World.mwm | ||
WorldCoasts.mwm |