Compare commits
3 commits
master
...
release/20
Author | SHA1 | Date | |
---|---|---|---|
|
4545b574ef | ||
06db9732f6 | |||
05094bdb77 |
967 changed files with 278372 additions and 163336 deletions
101
.github/CODEOWNERS
vendored
101
.github/CODEOWNERS
vendored
|
@ -1,69 +1,66 @@
|
|||
# All non-assigned.
|
||||
* @organicmaps/mergers
|
||||
# Visual design.
|
||||
/android/app/src/main/res/drawable*/ @organicmaps/design
|
||||
/android/app/src/main/res/font/ @organicmaps/design
|
||||
/android/app/src/main/res/mipmap*/ @organicmaps/design
|
||||
/data/*.ttf @organicmaps/design
|
||||
/data/resources-svg/ @organicmaps/design
|
||||
/data/search-icons/ @organicmaps/design
|
||||
/iphone/Maps/Images.xcassets/ @organicmaps/design
|
||||
android/app/src/main/res/drawable*/ @organicmaps/design
|
||||
android/app/src/main/res/font/ @organicmaps/design
|
||||
android/app/src/main/res/mipmap*/ @organicmaps/design
|
||||
data/*.ttf @organicmaps/design
|
||||
data/resources*/ @organicmaps/design
|
||||
data/search-icons/ @organicmaps/design
|
||||
data/styles/default/light/**/*.png @organicmaps/design
|
||||
data/styles/default/light/**/*.svg @organicmaps/design
|
||||
data/styles/default/dark/**/*.png @organicmaps/design
|
||||
data/styles/default/dark/**/*.svg @organicmaps/design
|
||||
iphone/Maps/Images.xcassets/ @organicmaps/design
|
||||
# Android.
|
||||
/android/ @organicmaps/android
|
||||
/android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
||||
/docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
||||
/docs/JAVA_STYLE.md @organicmaps/android
|
||||
# no owner for translation changes
|
||||
/android/app/src/main/res/values*/strings.xml
|
||||
android/ @organicmaps/android
|
||||
android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
||||
docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
||||
docs/JAVA_STYLE.md @organicmaps/android
|
||||
# iOS.
|
||||
/iphone/ @organicmaps/ios
|
||||
/xcode/ @organicmaps/ios
|
||||
/docs/OBJC_STYLE.md @organicmaps/ios
|
||||
# no owner for translation changes
|
||||
/iphone/plist.txt
|
||||
/iphone/Maps/LocalizedStrings/
|
||||
iphone/ @organicmaps/ios
|
||||
xcode/ @organicmaps/ios
|
||||
docs/OBJC_STYLE.md @organicmaps/ios
|
||||
# Qt
|
||||
/qt/ @organicmaps/qt
|
||||
qt/ @organicmaps/qt
|
||||
# Rendering
|
||||
/drape/ @organicmaps/rendering
|
||||
/drape_frontend/ @organicmaps/rendering
|
||||
drape/ @organicmaps/rendering
|
||||
drape_frontend/ @organicmaps/rendering
|
||||
# Map Data.
|
||||
/tools/python/maps_generator/ @organicmaps/data
|
||||
/generator/ @organicmaps/data
|
||||
/topography_generator/ @organicmaps/data
|
||||
/data/borders/ @organicmaps/data
|
||||
/data/conf/isolines/ @organicmaps/data
|
||||
/docs/SUBWAY_GENERATION.md @organicmaps/data
|
||||
/docs/MAPS.md @organicmaps/data
|
||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
||||
# no owner (changed often to add a new POI)
|
||||
/generator/generator_tests/osm_type_test.cpp
|
||||
tools/python/maps_generator/ @organicmaps/data
|
||||
generator/ @organicmaps/data
|
||||
topography_generator/ @organicmaps/data
|
||||
data/borders/ @organicmaps/data
|
||||
data/conf/isolines/ @organicmaps/data
|
||||
docs/SUBWAY_GENERATION.md @organicmaps/data
|
||||
docs/MAPS.md @organicmaps/data
|
||||
docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
||||
# Map Styles.
|
||||
/data/styles/ @organicmaps/styles
|
||||
/data/types.txt @organicmaps/styles
|
||||
/data/visibility.txt @organicmaps/styles
|
||||
/data/mapcss-mapping.csv @organicmaps/styles
|
||||
/data/replaced_tags.txt @organicmaps/styles
|
||||
/data/classificator.txt @organicmaps/styles
|
||||
/data/drules_* @organicmaps/styles
|
||||
/docs/STYLES.md
|
||||
/tools/kothic/ @organicmaps/styles
|
||||
data/styles/ @organicmaps/styles
|
||||
data/types.txt @organicmaps/styles
|
||||
data/visibility.txt @organicmaps/styles
|
||||
data/mapcss-mapping.csv @organicmaps/styles
|
||||
data/replaced_tags.txt @organicmaps/styles
|
||||
data/classificator.txt @organicmaps/styles
|
||||
data/drules_* @organicmaps/styles
|
||||
docs/STYLES.md
|
||||
tools/kothic/ @organicmaps/styles
|
||||
# DevOps.
|
||||
/.github/workflows @organicmaps/devops
|
||||
/android/*gradle* @organicmaps/devops
|
||||
/docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
||||
/xcode/fastlane/ @organicmaps/devops
|
||||
.github/workflows @organicmaps/devops
|
||||
android/*gradle* @organicmaps/devops
|
||||
docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
||||
xcode/fastlane/ @organicmaps/devops
|
||||
# Growth.
|
||||
README.md @organicmaps/growth
|
||||
/.github/FUNDING.yml @organicmaps/growth
|
||||
/android/app/src/fdroid/play/ @organicmaps/growth
|
||||
/android/app/src/google/play/ @organicmaps/growth
|
||||
/iphone/metadata/ @organicmaps/growth
|
||||
.github/FUNDING.yml @organicmaps/growth
|
||||
android/app/src/fdroid/play/ @organicmaps/growth
|
||||
android/app/src/google/play/ @organicmaps/growth
|
||||
iphone/metadata/ @organicmaps/growth
|
||||
# Legal.
|
||||
LEGAL @organicmaps/legal
|
||||
LICENSE @organicmaps/legal
|
||||
NOTICE @organicmaps/legal
|
||||
CONTRIBUTORS @organicmaps/legal
|
||||
/docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
||||
/docs/DCO.md @organicmaps/legal
|
||||
/docs/GOVERNANCE.md @organicmaps/legal
|
||||
docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
||||
docs/DCO.md @organicmaps/legal
|
||||
docs/GOVERNANCE.md @organicmaps/legal
|
||||
|
|
8
.github/workflows/linux-check.yaml
vendored
8
.github/workflows/linux-check.yaml
vendored
|
@ -61,10 +61,6 @@ jobs:
|
|||
libgl1-mesa-dev \
|
||||
libglvnd-dev \
|
||||
libharfbuzz-dev \
|
||||
libxrandr-dev \
|
||||
libxinerama-dev \
|
||||
libxcursor-dev \
|
||||
libxi-dev \
|
||||
qt6-base-dev \
|
||||
libqt6svg6-dev \
|
||||
qt6-positioning-dev \
|
||||
|
@ -132,10 +128,6 @@ jobs:
|
|||
libgl1-mesa-dev \
|
||||
libglvnd-dev \
|
||||
libharfbuzz-dev \
|
||||
libxrandr-dev \
|
||||
libxinerama-dev \
|
||||
libxcursor-dev \
|
||||
libxi-dev \
|
||||
qt6-base-dev \
|
||||
libqt6svg6-dev \
|
||||
qt6-positioning-dev \
|
||||
|
|
22
.github/workflows/stale.yml
vendored
22
.github/workflows/stale.yml
vendored
|
@ -1,22 +0,0 @@
|
|||
name: Close stale PRs
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Runs every day at midnight
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-pr-stale: 180 # 6 months before warning
|
||||
days-before-pr-close: 365 # Closed after 12 months
|
||||
stale-pr-label: "stale"
|
||||
stale-pr-message: "Hi! This PR has been inactive for 6 months. If it's still relevant, please update it to let us know you’d like to keep it open 😊"
|
||||
close-pr-message: "This PR has been automatically closed after 12 months of inactivity."
|
||||
days-before-issue-stale: -1 # Issues are never stale
|
||||
days-before-issue-close: -1 # Issues are never closed
|
||||
remove-stale-when-updated: true
|
31
.github/workflows/strings-check.yaml
vendored
Normal file
31
.github/workflows/strings-check.yaml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Validate translation strings
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/strings-check.yaml # Run check on self change
|
||||
- data/strings/strings.txt
|
||||
- data/strings/types_strings.txt
|
||||
- data/strings/sound.txt
|
||||
- data/countries_names.txt
|
||||
- iphone/plist.txt
|
||||
- tools/python/strings_utils.py
|
||||
|
||||
jobs:
|
||||
validate-translation-strings:
|
||||
name: Validate translation strings
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3'
|
||||
|
||||
- name: Validate string files
|
||||
shell: bash
|
||||
run: |
|
||||
for f in data/strings/strings.txt data/strings/types_strings.txt data/strings/sound.txt data/countries_names.txt iphone/plist.txt; do
|
||||
./tools/python/strings_utils.py --validate $f -o
|
||||
done;
|
||||
git diff --exit-code
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -20,7 +20,6 @@ data/drules_proto_default_design.bin
|
|||
data/colors_design.txt
|
||||
data/patterns_design.txt
|
||||
data/bookmarks
|
||||
data/edits.xml
|
||||
|
||||
# Compiled Python
|
||||
*.pyc
|
||||
|
|
12
.gitmodules
vendored
12
.gitmodules
vendored
|
@ -7,6 +7,9 @@
|
|||
[submodule "3party/protobuf/protobuf"]
|
||||
path = 3party/protobuf/protobuf
|
||||
url = https://github.com/organicmaps/protobuf.git
|
||||
[submodule "tools/twine"]
|
||||
path = tools/twine
|
||||
url = https://github.com/organicmaps/twine.git
|
||||
[submodule "3party/Vulkan-Headers"]
|
||||
path = 3party/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
|
@ -56,12 +59,3 @@
|
|||
[submodule "3party/utfcpp"]
|
||||
path = 3party/utfcpp
|
||||
url = https://github.com/nemtrif/utfcpp.git
|
||||
[submodule "3party/glfw"]
|
||||
path = 3party/glfw
|
||||
url = https://github.com/glfw/glfw.git
|
||||
[submodule "3party/CMake-MetalShaderSupport"]
|
||||
path = 3party/CMake-MetalShaderSupport
|
||||
url = https://github.com/dpogue/CMake-MetalShaderSupport.git
|
||||
[submodule "3party/imgui/imgui"]
|
||||
path = 3party/imgui/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 989857d2e5e54869c35ad06fb21a67d12a2dbc67
|
|
@ -66,19 +66,4 @@ add_subdirectory(vulkan_wrapper)
|
|||
|
||||
if (PLATFORM_DESKTOP)
|
||||
add_subdirectory(libtess2)
|
||||
|
||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
|
||||
set(GLFW_INSTALL OFF CACHE BOOL "")
|
||||
set(GLFW_VULKAN_STATIC OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_WAYLAND OFF CACHE BOOL "")
|
||||
# Disable ARC for glfw and re-enable after it because it's globally set in the root CMakeLists.txt
|
||||
set(CMAKE_OBJC_FLAGS "")
|
||||
add_subdirectory(glfw)
|
||||
set_target_properties(glfw PROPERTIES UNITY_BUILD OFF)
|
||||
set_target_properties(glfw PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC NO)
|
||||
set(CMAKE_OBJC_FLAGS -fobjc-arc)
|
||||
|
||||
add_subdirectory(imgui)
|
||||
endif()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 21fea01161e0d6b70c0c5c1f52dc8e7a7df14a50
|
|
@ -1,16 +0,0 @@
|
|||
project(imgui)
|
||||
|
||||
set(SRC
|
||||
imgui/imgui_draw.cpp
|
||||
imgui/imgui_tables.cpp
|
||||
imgui/imgui_widgets.cpp
|
||||
imgui/imgui.cpp
|
||||
imgui/backends/imgui_impl_glfw.cpp
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE ${OMIM_ROOT}/3party/glfw/include
|
||||
PUBLIC ${OMIM_ROOT}/3party/imgui/imgui
|
||||
PUBLIC .
|
||||
)
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 6982ce43f5b143c5dce5fab0ce07dd4867b705ae
|
|
@ -90,19 +90,6 @@ else()
|
|||
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
|
||||
endif()
|
||||
|
||||
if(${PLATFORM_MAC})
|
||||
set(XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
|
||||
# Metal language support
|
||||
list(APPEND CMAKE_MODULE_PATH ${OMIM_ROOT}/3party/CMake-MetalShaderSupport/cmake)
|
||||
include(CheckLanguage)
|
||||
include(MetalShaderSupport)
|
||||
check_language(Metal)
|
||||
if(CMAKE_Metal_COMPILER)
|
||||
enable_language(Metal)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Sanitizer
|
||||
if (PLATFORM_DESKTOP)
|
||||
# https://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
|
||||
|
@ -278,6 +265,16 @@ find_package(Threads REQUIRED)
|
|||
|
||||
# Scripts
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
execute_process(
|
||||
COMMAND "${OMIM_ROOT}/tools/unix/check_cert.sh"
|
||||
RESULT_VARIABLE CheckCertResult
|
||||
)
|
||||
if (CheckCertResult)
|
||||
message(FATAL_ERROR "Certificate check failed")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
|
||||
list(APPEND qt_components Core Network)
|
||||
if (NOT SKIP_QT_GUI OR NOT SKIP_TESTS OR PYBINDINGS)
|
||||
|
@ -397,7 +394,6 @@ if (PLATFORM_DESKTOP)
|
|||
add_subdirectory(qt)
|
||||
omim_add_tool_subdirectory(skin_generator)
|
||||
endif()
|
||||
add_subdirectory(dev_sandbox)
|
||||
endif()
|
||||
|
||||
omim_add_test_subdirectory(qt_tstfrm)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div align="center">
|
||||
<img src="qt/res/logo.png" height="100"/>
|
||||
<img src="/qt/res/logo.png" height="100"/>
|
||||
</div>
|
||||
<h1 align="center"">Organic Maps</h1>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ buildscript {
|
|||
googleFirebaseServicesDefault
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.7.3'
|
||||
classpath 'com.android.tools.build:gradle:8.7.2'
|
||||
|
||||
if (googleFirebaseServicesEnabled) {
|
||||
println('Building with Google Firebase Services')
|
||||
|
@ -100,7 +100,7 @@ android {
|
|||
// All properties are read from gradle.properties file
|
||||
compileSdk propCompileSdkVersion.toInteger()
|
||||
|
||||
ndkVersion '27.2.12479018'
|
||||
ndkVersion '27.1.12297006'
|
||||
|
||||
defaultConfig {
|
||||
// Default package name is taken from the manifest and should be app.organicmaps
|
||||
|
@ -363,7 +363,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3'
|
||||
|
||||
// Google Play Location Services
|
||||
//
|
||||
|
@ -379,7 +379,7 @@ dependencies {
|
|||
huaweiImplementation 'com.google.android.gms:play-services-location:21.3.0'
|
||||
// This is the microG project's re-implementation which is permissible on
|
||||
// F-droid because it's Apache-2.0.
|
||||
fdroidImplementation 'org.microg.gms:play-services-location:0.3.6.244735'
|
||||
fdroidImplementation 'org.microg.gms:play-services-location:0.3.4.240913'
|
||||
|
||||
// Google Firebase Services
|
||||
if (googleFirebaseServicesEnabled) {
|
||||
|
@ -396,11 +396,11 @@ dependencies {
|
|||
// We don't use Kotlin, but some dependencies are actively using it.
|
||||
// See https://stackoverflow.com/a/75719642
|
||||
implementation 'androidx.core:core:1.15.0'
|
||||
implementation(platform('org.jetbrains.kotlin:kotlin-bom:2.1.10'))
|
||||
implementation(platform('org.jetbrains.kotlin:kotlin-bom:2.0.21'))
|
||||
implementation 'androidx.annotation:annotation:1.9.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.car.app:app:1.7.0-rc01'
|
||||
implementation 'androidx.car.app:app-projected:1.7.0-rc01'
|
||||
implementation 'androidx.car.app:app:1.7.0-beta03'
|
||||
implementation 'androidx.car.app:app-projected:1.7.0-beta03'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||
implementation 'androidx.fragment:fragment:1.8.5'
|
||||
implementation 'androidx.preference:preference:1.2.1'
|
||||
|
@ -417,7 +417,7 @@ dependencies {
|
|||
// Test Dependencies
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:5.15.2'
|
||||
testImplementation 'org.mockito:mockito-core:5.12.0'
|
||||
testImplementation 'org.mockito:mockito-inline:5.2.0'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Новыя дадзеныя OpenStreetMap ад 21 студзеня
|
||||
• Новыя дадзеныя OpenStreetMap ад 13 лютага
|
||||
• Адлюстраванне абмежавання хуткасці ў рэжыме навігацыі
|
||||
• Android Auto: сартаванне метак, палепшаны запыты на дазвол месцазнаходжання
|
||||
• На карту дададзены вежы
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Nuevos datos de OpenStreetMap del 21 de enero
|
||||
• Nuevos datos de OpenStreetMap del 13 de febrero
|
||||
• Límite de velocidad en el modo de navegación
|
||||
• Añadidos idiomas serbio (cirílico) y letón
|
||||
• Android Auto: opción de ordenar marcadores, mejorada la experiencia al solicitar ubicación
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Nouvelles données OpenStreetMap du 21 janvier
|
||||
• Nouvelles données OpenStreetMap du 13 février
|
||||
• Afficher un panneau de limitation de vitesse en mode navigation
|
||||
• Ajout des langues serbe (cyrillique) et lettone
|
||||
• Android Auto : trier les signets, expérience de demande d'autorisation de localisation améliorée
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Nowe dane OpenStreetMap z 21 stycznia
|
||||
• Nowe dane OpenStreetMap z 13 lutego
|
||||
• Wyświetlanie znaku ograniczenia prędkości w trybie nawigacji
|
||||
• Dodano języki serbski (cyrylica) i łotewski
|
||||
• Android Auto: sortowanie zakładek, ulepszono prośbę o pozwolenie na lokalizację
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Novos dados do OpenStreetMap de 21 de janeiro
|
||||
• Novos dados do OpenStreetMap de 13 de fevereiro
|
||||
• Exibe um sinal de limite de velocidade no modo de navegação
|
||||
• Adicionados os idiomas sérvio (cirílico) e letão
|
||||
• Android Auto: classificar favoritos, experiência aprimorada de solicitação de permissão de localização
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Novos dados do OpenStreetMap a 21 de janeiro
|
||||
• Novos dados do OpenStreetMap a 13 de fevereiro
|
||||
• Exibir um sinal de limite de velocidade no modo de navegação
|
||||
• Adicionados os idiomas sérvio (cirílico) e letão
|
||||
• Android Auto: classificar favoritos, experiência melhorada de pedido de permissão de localização
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Новые данные OpenStreetMap от 21 января
|
||||
• Новые данные OpenStreetMap от 13 февраля
|
||||
• Отображение ограничения скорости в режиме навигации
|
||||
• Android Auto: сортировка меток, улучшены запросы на разрешение местоположения
|
||||
• На карту добавлены башни
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• Нові дані OpenStreetMap від 21 січня
|
||||
• Нові дані OpenStreetMap від 13 лютого
|
||||
• Знак перевищення швидкості підчас навігації
|
||||
• Додано перклади сербською (кирилиця) та латиською мовами
|
||||
• Android Auto: сортування міток, покращено процес запиту на отримання дозволу на розміщення
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
• New OpenStreetMap data as of January 21
|
||||
• New OpenStreetMap data as of February 13
|
||||
• Dispay a speed limit sign in the navigation mode
|
||||
• Added Serbian (Cyrillic) and Latvian languages
|
||||
• Android Auto: sort bookmarks, improved location permission request experience
|
||||
|
|
|
@ -1 +1 @@
|
|||
version: 2025.01.26-9-FDroid+25012609
|
||||
version: 2025.02.17-3-FDroid+25021703
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
|
||||
<!--
|
||||
Android 13 (API level 33) and higher supports a runtime permission for sending non-exempt (including Foreground
|
||||
|
@ -87,7 +86,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.SplashActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|uiMode|keyboard|keyboardHidden|navigation"
|
||||
android:screenOrientation="fullUser"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
@ -122,7 +120,7 @@
|
|||
<data android:scheme="https"/>
|
||||
<data android:host="omaps.app"/>
|
||||
</intent-filter>
|
||||
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
|
@ -346,8 +344,7 @@
|
|||
|
||||
<activity
|
||||
android:name="app.organicmaps.DownloadResourcesLegacyActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"/>
|
||||
android:configChanges="orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity-alias
|
||||
android:name="app.organicmaps.DownloadResourcesActivity"
|
||||
|
@ -364,7 +361,6 @@
|
|||
android:name="app.organicmaps.MwmActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="uiMode"
|
||||
android:screenOrientation="fullUser"
|
||||
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/>
|
||||
|
||||
<activity-alias
|
||||
|
@ -375,7 +371,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.downloader.DownloaderActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/download_maps"
|
||||
android:parentActivityName="app.organicmaps.MwmActivity"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
|
@ -383,7 +378,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.search.SearchActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/search_map"
|
||||
android:parentActivityName="app.organicmaps.MwmActivity"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize" />
|
||||
|
@ -391,7 +385,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.settings.SettingsActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/settings"
|
||||
android:parentActivityName="app.organicmaps.MwmActivity" />
|
||||
|
||||
|
@ -409,7 +402,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.bookmarks.BookmarkCategoriesActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/bookmarks_and_tracks"
|
||||
android:parentActivityName="app.organicmaps.MwmActivity"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
|
@ -417,7 +409,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.bookmarks.BookmarkListActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/bookmarks"
|
||||
android:parentActivityName="app.organicmaps.bookmarks.BookmarkCategoriesActivity"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
|
@ -425,7 +416,6 @@
|
|||
<activity
|
||||
android:name="app.organicmaps.editor.EditorActivity"
|
||||
android:configChanges="orientation|screenLayout|screenSize"
|
||||
android:screenOrientation="fullUser"
|
||||
android:label="@string/edit_place"
|
||||
android:parentActivityName="app.organicmaps.MwmActivity"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
|
@ -490,13 +480,6 @@
|
|||
android:stopWithTask="false"
|
||||
/>
|
||||
|
||||
<service
|
||||
android:name=".downloader.DownloaderService"
|
||||
android:foregroundServiceType="dataSync"
|
||||
android:exported="false"
|
||||
android:enabled="true"
|
||||
android:stopWithTask="false"/>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${FILE_PROVIDER_PLACEHOLDER}"
|
||||
|
@ -512,8 +495,8 @@
|
|||
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" android:value="false" />
|
||||
<!-- Disable Google's anonymous stats collection -->
|
||||
<meta-data android:name="android.webkit.WebView.MetricsOptOut" android:value="true" />
|
||||
|
||||
<!-- Version >= 3.0. Dex Dual Mode support for compatible Samsung devices.
|
||||
|
||||
<!-- Version >= 3.0. Dex Dual Mode support for compatible Samsung devices.
|
||||
See the documentation: https://developer.samsung.com/samsung-dex/modify-optimizing.html //-->
|
||||
<meta-data android:name="com.samsung.android.multidisplay.keep_process_alive" android:value="true" />
|
||||
|
||||
|
|
|
@ -22,13 +22,11 @@ set(SRC
|
|||
app/organicmaps/vulkan/android_vulkan_context_factory.hpp
|
||||
|
||||
# JNI sources
|
||||
app/organicmaps/sdk/search/DisplayedCategories.cpp
|
||||
app/organicmaps/sdk/search/SearchEngine.cpp
|
||||
app/organicmaps/sdk/search/SearchRecents.cpp
|
||||
app/organicmaps/core/jni_helper.cpp
|
||||
app/organicmaps/core/jni_java_methods.cpp
|
||||
app/organicmaps/core/logging.cpp
|
||||
app/organicmaps/bookmarks/data/BookmarkManager.cpp
|
||||
app/organicmaps/DisplayedCategories.cpp
|
||||
app/organicmaps/DownloadResourcesLegacyActivity.cpp
|
||||
app/organicmaps/editor/Editor.cpp
|
||||
app/organicmaps/editor/OpeningHours.cpp
|
||||
|
@ -40,6 +38,8 @@ set(SRC
|
|||
app/organicmaps/MapManager.cpp
|
||||
app/organicmaps/MwmApplication.cpp
|
||||
app/organicmaps/routing/RoutingOptions.cpp
|
||||
app/organicmaps/SearchEngine.cpp
|
||||
app/organicmaps/SearchRecents.cpp
|
||||
app/organicmaps/settings/UnitLocale.cpp
|
||||
app/organicmaps/settings/MapLanguageCode.cpp
|
||||
app/organicmaps/sound/tts.cpp
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
extern "C"
|
||||
{
|
||||
JNIEXPORT jobjectArray JNICALL Java_app_organicmaps_sdk_search_DisplayedCategories_nativeGetKeys(JNIEnv * env, jclass)
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_app_organicmaps_search_DisplayedCategories_nativeGetKeys(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
::Framework * fr = g_framework->NativeFramework();
|
||||
ASSERT(fr, ());
|
|
@ -1578,12 +1578,6 @@ Java_app_organicmaps_Framework_nativeAddRoutePoint(JNIEnv * env, jclass, jstring
|
|||
frm()->GetRoutingManager().AddRoutePoint(std::move(data));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_Framework_nativeRemoveRoutePoints(JNIEnv * env, jclass)
|
||||
{
|
||||
frm()->GetRoutingManager().RemoveRoutePoints();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_Framework_nativeRemoveRoutePoint(JNIEnv * env, jclass,
|
||||
jint markType, jint intermediateIndex)
|
||||
|
@ -1633,13 +1627,6 @@ Java_app_organicmaps_Framework_nativeGetRoutePoints(JNIEnv * env, jclass)
|
|||
});
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_Framework_nativeMoveRoutePoint(JNIEnv * env, jclass,
|
||||
jint currentIndex, jint targetIndex)
|
||||
{
|
||||
frm()->GetRoutingManager().MoveRoutePoint(currentIndex, targetIndex);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_app_organicmaps_Framework_nativeGetTransitRouteInfo(JNIEnv * env, jclass)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ Results g_results;
|
|||
|
||||
// Timestamp of last search query. Results with older stamps are ignored.
|
||||
jlong g_queryTimestamp;
|
||||
// Implements 'SearchListener' java interface.
|
||||
// Implements 'NativeSearchListener' java interface.
|
||||
jobject g_javaListener;
|
||||
jmethodID g_updateResultsId;
|
||||
jmethodID g_endResultsId;
|
||||
|
@ -52,7 +52,7 @@ jmethodID g_descriptionConstructor;
|
|||
jclass g_popularityClass;
|
||||
jmethodID g_popularityConstructor;
|
||||
|
||||
// Implements 'MapSearchListener' java interface.
|
||||
// Implements 'NativeMapSearchListener' java interface.
|
||||
jmethodID g_mapResultsMethod;
|
||||
jclass g_mapResultClass;
|
||||
jmethodID g_mapResultCtor;
|
||||
|
@ -232,21 +232,21 @@ void OnBookmarksSearchResults(search::BookmarksSearchParams::Results results,
|
|||
extern "C"
|
||||
{
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_sdk_search_SearchEngine_nativeInit(JNIEnv * env, jobject thiz)
|
||||
Java_app_organicmaps_search_SearchEngine_nativeInit(JNIEnv * env, jobject thiz)
|
||||
{
|
||||
g_javaListener = env->NewGlobalRef(thiz);
|
||||
// public void onResultsUpdate(@NonNull SearchResult[] results, long timestamp)
|
||||
g_updateResultsId = jni::GetMethodID(env, g_javaListener, "onResultsUpdate",
|
||||
"([Lapp/organicmaps/sdk/search/SearchResult;J)V");
|
||||
"([Lapp/organicmaps/search/SearchResult;J)V");
|
||||
// public void onResultsEnd(long timestamp)
|
||||
g_endResultsId = jni::GetMethodID(env, g_javaListener, "onResultsEnd", "(J)V");
|
||||
g_resultClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/search/SearchResult");
|
||||
g_resultClass = jni::GetGlobalClassRef(env, "app/organicmaps/search/SearchResult");
|
||||
g_resultConstructor = jni::GetConstructorID(
|
||||
env, g_resultClass,
|
||||
"(Ljava/lang/String;Lapp/organicmaps/sdk/search/SearchResult$Description;DD[I[I"
|
||||
"Lapp/organicmaps/sdk/search/Popularity;)V");
|
||||
"(Ljava/lang/String;Lapp/organicmaps/search/SearchResult$Description;DD[I[I"
|
||||
"Lapp/organicmaps/search/Popularity;)V");
|
||||
g_suggestConstructor = jni::GetConstructorID(env, g_resultClass, "(Ljava/lang/String;Ljava/lang/String;DD[I[I)V");
|
||||
g_descriptionClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/search/SearchResult$Description");
|
||||
g_descriptionClass = jni::GetGlobalClassRef(env, "app/organicmaps/search/SearchResult$Description");
|
||||
/*
|
||||
Description(FeatureId featureId, String featureType, String region, Distance distance,
|
||||
String description, int openNow, int minutesUntilOpen, int minutesUntilClosed,
|
||||
|
@ -257,12 +257,12 @@ extern "C"
|
|||
"Ljava/lang/String;Ljava/lang/String;Lapp/organicmaps/util/Distance;"
|
||||
"Ljava/lang/String;IIIZ)V");
|
||||
|
||||
g_popularityClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/search/Popularity");
|
||||
g_popularityClass = jni::GetGlobalClassRef(env, "app/organicmaps/search/Popularity");
|
||||
g_popularityConstructor = jni::GetConstructorID(env, g_popularityClass, "(I)V");
|
||||
|
||||
g_mapResultsMethod = jni::GetMethodID(env, g_javaListener, "onMapSearchResults",
|
||||
"([Lapp/organicmaps/sdk/search/MapSearchListener$Result;JZ)V");
|
||||
g_mapResultClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/search/MapSearchListener$Result");
|
||||
"([Lapp/organicmaps/search/NativeMapSearchListener$Result;JZ)V");
|
||||
g_mapResultClass = jni::GetGlobalClassRef(env, "app/organicmaps/search/NativeMapSearchListener$Result");
|
||||
g_mapResultCtor = jni::GetConstructorID(env, g_mapResultClass, "(Ljava/lang/String;Ljava/lang/String;)V");
|
||||
|
||||
g_updateBookmarksResultsId =
|
||||
|
@ -271,7 +271,7 @@ extern "C"
|
|||
jni::GetMethodID(env, g_javaListener, "onBookmarkSearchResultsEnd", "([JJ)V");
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_search_SearchEngine_nativeRunSearch(
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_search_SearchEngine_nativeRunSearch(
|
||||
JNIEnv * env, jclass clazz, jbyteArray bytes, jboolean isCategory,
|
||||
jstring lang, jlong timestamp, jboolean hasPosition, jdouble lat, jdouble lon)
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ extern "C"
|
|||
return searchStarted;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_search_SearchEngine_nativeRunInteractiveSearch(
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_search_SearchEngine_nativeRunInteractiveSearch(
|
||||
JNIEnv * env, jclass clazz, jbyteArray bytes, jboolean isCategory,
|
||||
jstring lang, jlong timestamp, jboolean isMapAndTable, jboolean hasPosition, jdouble lat, jdouble lon)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ extern "C"
|
|||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_search_SearchEngine_nativeRunSearchMaps(
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_search_SearchEngine_nativeRunSearchMaps(
|
||||
JNIEnv * env, jclass clazz, jbyteArray bytes, jstring lang, jlong timestamp)
|
||||
{
|
||||
storage::DownloaderSearchParams params{
|
||||
|
@ -334,7 +334,7 @@ extern "C"
|
|||
g_queryTimestamp = timestamp;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_search_SearchEngine_nativeRunSearchInBookmarks(
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_search_SearchEngine_nativeRunSearchInBookmarks(
|
||||
JNIEnv * env, jclass clazz, jbyteArray query, jlong catId, jlong timestamp)
|
||||
{
|
||||
search::BookmarksSearchParams params{
|
||||
|
@ -350,25 +350,25 @@ extern "C"
|
|||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_sdk_search_SearchEngine_nativeShowResult(JNIEnv * env, jclass clazz, jint index)
|
||||
Java_app_organicmaps_search_SearchEngine_nativeShowResult(JNIEnv * env, jclass clazz, jint index)
|
||||
{
|
||||
g_framework->NativeFramework()->ShowSearchResult(g_results[index]);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_sdk_search_SearchEngine_nativeCancelInteractiveSearch(JNIEnv * env, jclass clazz)
|
||||
Java_app_organicmaps_search_SearchEngine_nativeCancelInteractiveSearch(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
g_framework->NativeFramework()->GetSearchAPI().CancelSearch(search::Mode::Viewport);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_sdk_search_SearchEngine_nativeCancelEverywhereSearch(JNIEnv * env, jclass clazz)
|
||||
Java_app_organicmaps_search_SearchEngine_nativeCancelEverywhereSearch(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
g_framework->NativeFramework()->GetSearchAPI().CancelSearch(search::Mode::Everywhere);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_sdk_search_SearchEngine_nativeCancelAllSearches(JNIEnv * env, jclass clazz)
|
||||
Java_app_organicmaps_search_SearchEngine_nativeCancelAllSearches(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
g_framework->NativeFramework()->GetSearchAPI().CancelAllSearches();
|
||||
}
|
40
android/app/src/main/cpp/app/organicmaps/SearchRecents.cpp
Normal file
40
android/app/src/main/cpp/app/organicmaps/SearchRecents.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include "Framework.hpp"
|
||||
|
||||
#include "search/result.hpp"
|
||||
|
||||
#include "app/organicmaps/core/jni_helper.hpp"
|
||||
#include "app/organicmaps/core/jni_java_methods.hpp"
|
||||
|
||||
using SearchRequest = search::QuerySaver::SearchRequest;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_search_SearchRecents_nativeGetList(JNIEnv * env, jclass thiz, jobject result)
|
||||
{
|
||||
auto const & items = g_framework->NativeFramework()->GetSearchAPI().GetLastSearchQueries();
|
||||
if (items.empty())
|
||||
return;
|
||||
|
||||
auto const listAddMethod = jni::ListBuilder::Instance(env).m_add;
|
||||
|
||||
for (SearchRequest const & item : items)
|
||||
{
|
||||
jni::TScopedLocalRef str(env, jni::ToJavaString(env, item.second));
|
||||
env->CallBooleanMethod(result, listAddMethod, str.get());
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_search_SearchRecents_nativeAdd(JNIEnv * env, jclass thiz, jstring locale, jstring query)
|
||||
{
|
||||
SearchRequest const sr(jni::ToNativeString(env, locale), jni::ToNativeString(env, query));
|
||||
g_framework->NativeFramework()->GetSearchAPI().SaveSearchQuery(sr);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_search_SearchRecents_nativeClear(JNIEnv * env, jclass thiz)
|
||||
{
|
||||
g_framework->NativeFramework()->GetSearchAPI().ClearSearchHistory();
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ void InjectMetadata(JNIEnv * env, jclass const clazz, jobject const mapObject, o
|
|||
//jobject CreatePopularity(JNIEnv * env, place_page::Info const & info)
|
||||
//{
|
||||
// static jclass const popularityClass =
|
||||
// jni::GetGlobalClassRef(env, "app/organicmaps/sdk/search/Popularity");
|
||||
// jni::GetGlobalClassRef(env, "app/organicmaps/search/Popularity");
|
||||
// static jmethodID const popularityConstructor =
|
||||
// jni::GetConstructorID(env, popularityClass, "(I)V");
|
||||
// auto const popularityValue = info.GetPopularity();
|
||||
|
@ -57,7 +57,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info, int mapObje
|
|||
"Ljava/lang/String;" // appId
|
||||
"Lapp/organicmaps/routing/RoutePointInfo;" // routePointInfo
|
||||
"I" // openingMode
|
||||
"Lapp/organicmaps/sdk/search/Popularity;" // popularity
|
||||
"Lapp/organicmaps/search/Popularity;" // popularity
|
||||
"Ljava/lang/String;" // description
|
||||
"I" // roadWarnType
|
||||
"[Ljava/lang/String;" // rawTypes
|
||||
|
@ -105,7 +105,7 @@ jobject CreateBookmark(JNIEnv *env, const place_page::Info &info,
|
|||
"(Lapp/organicmaps/bookmarks/data/FeatureId;JJLjava/lang/String;"
|
||||
"Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;"
|
||||
"Lapp/organicmaps/routing/RoutePointInfo;"
|
||||
"ILapp/organicmaps/sdk/search/Popularity;Ljava/lang/String;"
|
||||
"ILapp/organicmaps/search/Popularity;Ljava/lang/String;"
|
||||
"[Ljava/lang/String;)V");
|
||||
static jmethodID const featureCtorId =
|
||||
jni::GetConstructorID(env, g_featureIdClazz, "(Ljava/lang/String;JI)V");
|
||||
|
@ -165,13 +165,12 @@ jobject CreateElevationInfo(JNIEnv * env, ElevationInfo const & info)
|
|||
"[Lapp/organicmaps/bookmarks/data/ElevationInfo$Point;"
|
||||
"IIIIIJ)V");
|
||||
jni::TScopedLocalObjectArrayRef jPoints(env, ToElevationPointArray(env, info.GetPoints()));
|
||||
// TODO (KK): elevation info should have only the elevation data - see the https://github.com/organicmaps/organicmaps/pull/10063
|
||||
return env->NewObject(g_elevationInfoClazz, ctorId,
|
||||
jPoints.get(),
|
||||
// static_cast<jint>(info.GetAscent()),
|
||||
// static_cast<jint>(info.GetDescent()),
|
||||
// static_cast<jint>(info.GetMinAltitude()),
|
||||
// static_cast<jint>(info.GetMaxAltitude()),
|
||||
static_cast<jint>(info.GetAscent()),
|
||||
static_cast<jint>(info.GetDescent()),
|
||||
static_cast<jint>(info.GetMinAltitude()),
|
||||
static_cast<jint>(info.GetMaxAltitude()),
|
||||
static_cast<jint>(info.GetDifficulty()));
|
||||
}
|
||||
|
||||
|
|
|
@ -591,15 +591,6 @@ Java_app_organicmaps_bookmarks_data_BookmarkManager_nativeSetAllCategoriesVisibi
|
|||
frm()->GetBookmarkManager().SetAllCategoriesVisibility(static_cast<bool>(visible));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_bookmarks_data_BookmarkManager_nativePrepareTrackFileForSharing(JNIEnv * env, jclass, jlong trackId, jint kmlFileType)
|
||||
{
|
||||
frm()->GetBookmarkManager().PrepareTrackFileForSharing(static_cast<kml::TrackId>(trackId), [env](BookmarkManager::SharingResult const & result)
|
||||
{
|
||||
OnPreparedFileForSharing(env, result);
|
||||
}, static_cast<KmlFileType>(kmlFileType));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_bookmarks_data_BookmarkManager_nativePrepareFileForSharing(JNIEnv * env, jclass, jlongArray catIds, jint kmlFileType)
|
||||
{
|
||||
|
|
|
@ -149,8 +149,7 @@ Java_app_organicmaps_editor_Editor_nativeHasWifi(JNIEnv *, jclass)
|
|||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_editor_Editor_nativeSetHasWifi(JNIEnv *, jclass, jboolean hasWifi)
|
||||
{
|
||||
if (hasWifi != (g_editableMapObject.GetInternet() == feature::Internet::Wlan))
|
||||
g_editableMapObject.SetInternet(hasWifi ? feature::Internet::Wlan : feature::Internet::Unknown);
|
||||
g_editableMapObject.SetInternet(hasWifi ? feature::Internet::Wlan : feature::Internet::Unknown);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
|
@ -363,11 +362,7 @@ Java_app_organicmaps_editor_Editor_nativeStartEdit(JNIEnv *, jclass)
|
|||
{
|
||||
::Framework * frm = g_framework->NativeFramework();
|
||||
if (!frm->HasPlacePageInfo())
|
||||
{
|
||||
ASSERT(g_editableMapObject.GetEditingLifecycle() == osm::EditingLifecycle::CREATED,
|
||||
("PlacePageInfo should only be empty for new features."));
|
||||
return;
|
||||
}
|
||||
|
||||
place_page::Info const & info = g_framework->GetPlacePageInfo();
|
||||
CHECK(frm->GetEditableMapObject(info.GetID(), g_editableMapObject), ("Invalid feature in the place page."));
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#include "app/organicmaps/Framework.hpp"
|
||||
#include "app/organicmaps/core/jni_helper.hpp"
|
||||
#include "app/organicmaps/core/jni_java_methods.hpp"
|
||||
|
||||
#include "search/result.hpp"
|
||||
|
||||
using SearchRequest = search::QuerySaver::SearchRequest;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_search_SearchRecents_nativeGetList(JNIEnv * env, jclass, jobject result)
|
||||
{
|
||||
auto const & items = g_framework->NativeFramework()->GetSearchAPI().GetLastSearchQueries();
|
||||
if (items.empty())
|
||||
return;
|
||||
|
||||
auto const listAddMethod = jni::ListBuilder::Instance(env).m_add;
|
||||
|
||||
for (SearchRequest const & item : items)
|
||||
{
|
||||
jni::TScopedLocalRef str(env, jni::ToJavaString(env, item.second));
|
||||
env->CallBooleanMethod(result, listAddMethod, str.get());
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_search_SearchRecents_nativeAdd(JNIEnv * env, jclass, jstring locale,
|
||||
jstring query)
|
||||
{
|
||||
SearchRequest const sr(jni::ToNativeString(env, locale), jni::ToNativeString(env, query));
|
||||
g_framework->NativeFramework()->GetSearchAPI().SaveSearchQuery(sr);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_search_SearchRecents_nativeClear(JNIEnv * env, jclass)
|
||||
{
|
||||
g_framework->NativeFramework()->GetSearchAPI().ClearSearchHistory();
|
||||
}
|
||||
}
|
|
@ -49,12 +49,6 @@ Java_app_organicmaps_util_StringUtils_nativeFilterContainsNormalized(JNIEnv * en
|
|||
return jni::ToJavaStringArray(env, filtered);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_app_organicmaps_util_StringUtils_nativeFormatSpeed(
|
||||
JNIEnv * env, jclass thiz, jdouble metersPerSecond)
|
||||
{
|
||||
return measurement_utils::FormatSpeed(metersPerSecond, measurement_utils::GetMeasurementUnits());
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_app_organicmaps_util_StringUtils_nativeFormatSpeedAndUnits(
|
||||
JNIEnv * env, jclass thiz, jdouble metersPerSecond)
|
||||
{
|
||||
|
|
|
@ -390,7 +390,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||
mProgress.setProgressCompat(0, true);
|
||||
|
||||
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
||||
MapManager.startDownload(mCurrentCountry);
|
||||
MapManager.nativeDownload(mCurrentCountry);
|
||||
setAction(PROCEED_TO_MAP);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -333,20 +333,11 @@ public class Framework
|
|||
public static native int nativeGetBestRouter(double srcLat, double srcLon,
|
||||
double dstLat, double dstLon);
|
||||
|
||||
public static void addRoutePoint(RouteMarkData point)
|
||||
{
|
||||
Framework.nativeAddRoutePoint(point.mTitle, point.mSubtitle, point.mPointType,
|
||||
point.mIntermediateIndex, point.mIsMyPosition,
|
||||
point.mLat, point.mLon);
|
||||
}
|
||||
|
||||
public static native void nativeAddRoutePoint(String title, String subtitle,
|
||||
@RoutePointInfo.RouteMarkType int markType,
|
||||
int intermediateIndex, boolean isMyPosition,
|
||||
double lat, double lon);
|
||||
|
||||
public static native void nativeRemoveRoutePoints();
|
||||
|
||||
public static native void nativeRemoveRoutePoint(@RoutePointInfo.RouteMarkType int markType,
|
||||
int intermediateIndex);
|
||||
|
||||
|
@ -355,9 +346,6 @@ public class Framework
|
|||
public static native boolean nativeCouldAddIntermediatePoint();
|
||||
@NonNull
|
||||
public static native RouteMarkData[] nativeGetRoutePoints();
|
||||
|
||||
public static native void nativeMoveRoutePoint(int currentIndex, int targetIndex);
|
||||
|
||||
@NonNull
|
||||
public static native TransitRouteInfo nativeGetTransitRouteInfo();
|
||||
/**
|
||||
|
|
|
@ -77,7 +77,7 @@ import app.organicmaps.maplayer.MapButtonsViewModel;
|
|||
import app.organicmaps.maplayer.ToggleMapLayerFragment;
|
||||
import app.organicmaps.maplayer.isolines.IsolinesManager;
|
||||
import app.organicmaps.maplayer.isolines.IsolinesState;
|
||||
import app.organicmaps.routing.ManageRouteBottomSheet;
|
||||
import app.organicmaps.maplayer.subway.SubwayManager;
|
||||
import app.organicmaps.routing.NavigationController;
|
||||
import app.organicmaps.routing.NavigationService;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
|
@ -89,7 +89,7 @@ import app.organicmaps.routing.RoutingPlanFragment;
|
|||
import app.organicmaps.routing.RoutingPlanInplaceController;
|
||||
import app.organicmaps.search.FloatingSearchToolbarController;
|
||||
import app.organicmaps.search.SearchActivity;
|
||||
import app.organicmaps.sdk.search.SearchEngine;
|
||||
import app.organicmaps.search.SearchEngine;
|
||||
import app.organicmaps.search.SearchFragment;
|
||||
import app.organicmaps.settings.DrivingOptionsActivity;
|
||||
import app.organicmaps.settings.RoadType;
|
||||
|
@ -150,7 +150,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
public static final String EXTRA_TRACK_ID = "track_id";
|
||||
public static final String EXTRA_UPDATE_THEME = "update_theme";
|
||||
private static final String EXTRA_CONSUMED = "mwm.extra.intent.processed";
|
||||
private boolean mPreciseLocationDialogShown = false;
|
||||
|
||||
private static final String[] DOCKED_FRAGMENTS = { SearchFragment.class.getName(),
|
||||
DownloaderFragment.class.getName(),
|
||||
|
@ -158,11 +157,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
EditorHostFragment.class.getName(),
|
||||
ReportFragment.class.getName() };
|
||||
|
||||
public final ActivityResultLauncher<Intent> startDrivingOptionsForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult ->
|
||||
{
|
||||
if( activityResult.getResultCode() == Activity.RESULT_OK)
|
||||
rebuildLastRoute();
|
||||
});
|
||||
public static final int REQ_CODE_DRIVING_OPTIONS = 6;
|
||||
|
||||
private static final String MAIN_MENU_ID = "MAIN_MENU_BOTTOM_SHEET";
|
||||
private static final String LAYERS_MENU_ID = "LAYERS_MENU_BOTTOM_SHEET";
|
||||
|
@ -234,8 +229,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
@NonNull
|
||||
private DisplayManager mDisplayManager;
|
||||
|
||||
ManageRouteBottomSheet mManageRouteBottomSheet;
|
||||
|
||||
private boolean mRemoveDisplayListener = true;
|
||||
private int mLastUiMode = Configuration.UI_MODE_TYPE_UNDEFINED;
|
||||
|
||||
|
@ -593,14 +586,14 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
ViewCompat.setOnApplyWindowInsetsListener(mPointChooser, (view, windowInsets) -> {
|
||||
UiUtils.setViewInsetsPaddingBottom(mPointChooser, windowInsets);
|
||||
UiUtils.setViewInsetsPaddingNoBottom(mPointChooserToolbar, windowInsets);
|
||||
final int trackRecorderOffset = TrackRecorder.nativeIsTrackRecordingEnabled() ? UiUtils.dimen(this, R.dimen.map_button_size) : 0;
|
||||
|
||||
mNavBarHeight = isFullscreen() ? 0 : windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom;
|
||||
// For the first loading, set compass top margin to status bar size
|
||||
// The top inset will be then be updated by the routing controller
|
||||
if (mCurrentWindowInsets == null)
|
||||
{
|
||||
updateCompassOffset(trackRecorderOffset + windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top, windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).right);
|
||||
}
|
||||
updateCompassOffset(windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top, windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).right);
|
||||
else
|
||||
updateCompassOffset(-1, windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).right);
|
||||
refreshLightStatusBar();
|
||||
updateBottomWidgetsOffset(windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).left);
|
||||
mCurrentWindowInsets = windowInsets;
|
||||
|
@ -621,7 +614,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
if (!mIsTabletLayout)
|
||||
{
|
||||
mRoutingPlanInplaceController = new RoutingPlanInplaceController(this, startDrivingOptionsForResult, this, this);
|
||||
mRoutingPlanInplaceController = new RoutingPlanInplaceController(this, this, this);
|
||||
removeCurrentFragment(false);
|
||||
}
|
||||
|
||||
|
@ -698,16 +691,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
}
|
||||
|
||||
/** Hides/shows UI while keeping state
|
||||
* @param isUiHidden True to hide the UI
|
||||
**/
|
||||
public void hideOrShowUIWithoutClosingPlacePage(boolean isUiHidden)
|
||||
{
|
||||
// Used instead of closeBottomSheet to preserve state and hide instantly
|
||||
UiUtils.showIf(!isUiHidden, findViewById(R.id.place_page_container_fragment));
|
||||
mMapButtonsViewModel.setButtonsHidden(isUiHidden);
|
||||
}
|
||||
|
||||
private void showSearchToolbar()
|
||||
{
|
||||
mSearchController.show();
|
||||
|
@ -817,7 +800,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
showBottomSheet(MAIN_MENU_ID);
|
||||
}
|
||||
case help -> showHelp();
|
||||
case trackRecordingStatus -> showTrackSaveDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1036,6 +1018,18 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mPowerSaveDisclaimerShown = savedInstanceState.getBoolean(POWER_SAVE_DISCLAIMER_SHOWN, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data)
|
||||
{
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (resultCode != Activity.RESULT_OK)
|
||||
return;
|
||||
|
||||
if (requestCode == REQ_CODE_DRIVING_OPTIONS)
|
||||
rebuildLastRoute();
|
||||
}
|
||||
|
||||
private void rebuildLastRoute()
|
||||
{
|
||||
RoutingController.get().attach(this);
|
||||
|
@ -1317,16 +1311,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
Framework.nativeGetChoosePositionMode() == Framework.ChoosePositionMode.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchGenericMotionEvent(MotionEvent event) {
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) {
|
||||
int exponent = event.getAxisValue(MotionEvent.AXIS_VSCROLL) < 0 ? -1 : 1;
|
||||
Map.onScale(Math.pow(1.7f, exponent), event.getX(), event.getY(), true);
|
||||
return true;
|
||||
}
|
||||
return super.onGenericMotionEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent event)
|
||||
{
|
||||
|
@ -1504,30 +1488,14 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
if (mCurrentWindowInsets == null) {
|
||||
return;
|
||||
}
|
||||
int offsetY = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top;
|
||||
int offsetX = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).right;
|
||||
int offset = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top;
|
||||
if (show && mRoutingPlanInplaceController != null)
|
||||
{
|
||||
final int height = mRoutingPlanInplaceController.calcHeight();
|
||||
if (height != 0)
|
||||
offsetY = height;
|
||||
offset = height;
|
||||
}
|
||||
final int orientation = getResources().getConfiguration().orientation;
|
||||
final boolean isTrackRecordingEnabled = TrackRecorder.nativeIsTrackRecordingEnabled();
|
||||
if (isTrackRecordingEnabled && (orientation != Configuration.ORIENTATION_LANDSCAPE))
|
||||
offsetY += UiUtils.dimen(this, R.dimen.map_button_size);
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
final boolean isSmallScreen = UiUtils.getDisplayTotalHeight(this) < UiUtils.dimen(this, R.dimen.dp_400);
|
||||
if (!isSmallScreen || TrackRecorder.nativeIsTrackRecordingEnabled())
|
||||
offsetX += UiUtils.dimen(this, R.dimen.map_button_size);
|
||||
}
|
||||
else if (isTrackRecordingEnabled)
|
||||
offsetY += UiUtils.dimen(this, R.dimen.map_button_size);
|
||||
}
|
||||
updateCompassOffset(offsetY, offsetX);
|
||||
updateCompassOffset(offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1694,6 +1662,12 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mRoutingPlanInplaceController.showDrivingOptionView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSubwayEnabled()
|
||||
{
|
||||
return SubwayManager.from(this).isEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCommonBuildError(int lastResultCode, @NonNull String[] lastMissingMaps)
|
||||
{
|
||||
|
@ -1709,7 +1683,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.unable_to_calc_alert_title)
|
||||
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
||||
.setPositiveButton(R.string.settings, (dialog, which) -> DrivingOptionsActivity.start(this, startDrivingOptionsForResult))
|
||||
.setPositiveButton(R.string.settings, (dialog, which) -> DrivingOptionsActivity.start(this))
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
.show();
|
||||
|
@ -1822,7 +1796,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
|
||||
// Check for any location permissions.
|
||||
if (!LocationUtils.checkLocationPermission(this))
|
||||
if (!LocationUtils.checkCoarseLocationPermission(this))
|
||||
{
|
||||
Logger.w(LOCATION_TAG, "Permissions ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION are not granted");
|
||||
// Calls onMyPositionModeChanged(NOT_FOLLOW_NO_POSITION).
|
||||
|
@ -1960,50 +1934,12 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mLocationPermissionRequestedForRecording = false;
|
||||
if (LocationUtils.checkLocationPermission(this))
|
||||
{
|
||||
final boolean hasFineLocationPermission = LocationUtils.checkFineLocationPermission(this);
|
||||
|
||||
if (LocationState.getMode() == LocationState.NOT_FOLLOW_NO_POSITION)
|
||||
LocationState.nativeSwitchToNextMode();
|
||||
|
||||
if (requestedForRecording && hasFineLocationPermission)
|
||||
if (requestedForRecording && LocationUtils.checkFineLocationPermission(this))
|
||||
startTrackRecording();
|
||||
|
||||
if (hasFineLocationPermission)
|
||||
{
|
||||
Logger.i(LOCATION_TAG, "ACCESS_FINE_LOCATION permission granted");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.w(LOCATION_TAG, "Only ACCESS_COARSE_LOCATION permission granted");
|
||||
if (mLocationErrorDialog != null && mLocationErrorDialog.isShowing())
|
||||
{
|
||||
Logger.w(LOCATION_TAG, "Don't show 'Precise Location denied' dialog because another dialog is in progress");
|
||||
return;
|
||||
}
|
||||
if (!mPreciseLocationDialogShown)
|
||||
{
|
||||
mPreciseLocationDialogShown = true;
|
||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
||||
.setMessage(R.string.precise_location_is_disabled_long_text)
|
||||
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
||||
.setCancelable(true)
|
||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null);
|
||||
final Intent intent = Utils.makeSystemLocationSettingIntent(this);
|
||||
if (intent != null)
|
||||
{
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||
builder.setPositiveButton(R.string.location_settings, (dialog, which) -> startActivity(intent));
|
||||
}
|
||||
mLocationErrorDialog = builder.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(this, R.string.precise_location_is_disabled_long_text, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2154,15 +2090,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
RoutingController.get().start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onManageRouteOpen()
|
||||
{
|
||||
// Create and show 'Manage Route' Bottom Sheet panel.
|
||||
mManageRouteBottomSheet = new ManageRouteBottomSheet();
|
||||
mManageRouteBottomSheet.setCancelable(false);
|
||||
mManageRouteBottomSheet.show(getSupportFragmentManager(), "ManageRouteBottomSheet");
|
||||
}
|
||||
|
||||
private boolean requestBatterySaverPermission()
|
||||
{
|
||||
if (!PowerManagment.isSystemPowerSaveMode(this))
|
||||
|
@ -2340,11 +2267,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
requestPostNotificationsPermission();
|
||||
|
||||
if (mCurrentWindowInsets != null)
|
||||
{
|
||||
final int offset = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top;
|
||||
updateCompassOffset(offset + UiUtils.dimen(this, R.dimen.map_button_size));
|
||||
}
|
||||
Toast.makeText(this, R.string.track_recording, Toast.LENGTH_SHORT).show();
|
||||
TrackRecordingService.startForegroundService(getApplicationContext());
|
||||
mMapButtonsViewModel.setTrackRecorderState(true);
|
||||
|
@ -2353,18 +2275,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
private void stopTrackRecording()
|
||||
{
|
||||
if (mCurrentWindowInsets != null)
|
||||
{
|
||||
int offsetY = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).top;
|
||||
final int offsetX = mCurrentWindowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).right;
|
||||
if (RoutingController.get().isPlanning() && mRoutingPlanInplaceController != null)
|
||||
{
|
||||
final int height = mRoutingPlanInplaceController.calcHeight();
|
||||
if (height != 0)
|
||||
offsetY = height;
|
||||
}
|
||||
updateCompassOffset(offsetY, offsetX);
|
||||
}
|
||||
TrackRecordingService.stopService(getApplicationContext());
|
||||
mMapButtonsViewModel.setTrackRecorderState(false);
|
||||
}
|
||||
|
@ -2399,15 +2309,15 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mAlertDialog = new StackedButtonsDialog.Builder(this)
|
||||
.setTitle(R.string.track_recording_alert_title)
|
||||
.setCancelable(false)
|
||||
// Negative/Positive/Neutral do not have their usual meaning here.
|
||||
.setNegativeButton(R.string.continue_recording, (dialog, which) -> {
|
||||
// Negative/Positive/Neutral doesn't do not have the usual meaning here.
|
||||
.setPositiveButton(R.string.continue_recording, (dialog, which) -> {
|
||||
mAlertDialog = null;
|
||||
})
|
||||
.setNeutralButton(R.string.stop_without_saving, (dialog, which) -> {
|
||||
stopTrackRecording();
|
||||
mAlertDialog = null;
|
||||
})
|
||||
.setPositiveButton(R.string.save, (dialog, which) -> {
|
||||
.setNegativeButton(R.string.save, (dialog, which) -> {
|
||||
saveAndStopTrackRecording();
|
||||
mAlertDialog = null;
|
||||
})
|
||||
|
|
|
@ -16,14 +16,13 @@ import androidx.lifecycle.LifecycleObserver;
|
|||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import app.organicmaps.background.OsmUploadWork;
|
||||
import app.organicmaps.bookmarks.data.BookmarkManager;
|
||||
import app.organicmaps.display.DisplayManager;
|
||||
import app.organicmaps.downloader.Android7RootCertificateWorkaround;
|
||||
import app.organicmaps.downloader.DownloaderNotifier;
|
||||
import app.organicmaps.bookmarks.data.BookmarkManager;
|
||||
import app.organicmaps.display.DisplayManager;
|
||||
import app.organicmaps.downloader.CountryItem;
|
||||
import app.organicmaps.downloader.MapManager;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.location.LocationState;
|
||||
import app.organicmaps.location.SensorHelper;
|
||||
|
@ -34,7 +33,7 @@ import app.organicmaps.maplayer.subway.SubwayManager;
|
|||
import app.organicmaps.maplayer.traffic.TrafficManager;
|
||||
import app.organicmaps.routing.NavigationService;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.sdk.search.SearchEngine;
|
||||
import app.organicmaps.search.SearchEngine;
|
||||
import app.organicmaps.settings.StoragePathManager;
|
||||
import app.organicmaps.sound.TtsPlayer;
|
||||
import app.organicmaps.util.Config;
|
||||
|
@ -47,6 +46,10 @@ import app.organicmaps.util.Utils;
|
|||
import app.organicmaps.util.log.Logger;
|
||||
import app.organicmaps.util.log.LogsManager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
public class MwmApplication extends Application implements Application.ActivityLifecycleCallbacks
|
||||
{
|
||||
@NonNull
|
||||
|
@ -75,6 +78,9 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
private volatile boolean mFrameworkInitialized;
|
||||
private volatile boolean mPlatformInitialized;
|
||||
|
||||
@NonNull
|
||||
private final MapManager.StorageCallback mStorageCallbacks = new StorageCallbackImpl();
|
||||
|
||||
@Nullable
|
||||
private WeakReference<Activity> mTopActivity;
|
||||
|
||||
|
@ -121,9 +127,6 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
return (MwmApplication) context.getApplicationContext();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static MwmApplication sInstance;
|
||||
|
||||
@NonNull
|
||||
public static SharedPreferences prefs(@NonNull Context context)
|
||||
{
|
||||
|
@ -135,9 +138,6 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
{
|
||||
super.onCreate();
|
||||
Logger.i(TAG, "Initializing application");
|
||||
|
||||
sInstance = this;
|
||||
|
||||
LogsManager.INSTANCE.initFileLogging(this);
|
||||
|
||||
Android7RootCertificateWorkaround.initializeIfNeeded(this);
|
||||
|
@ -230,6 +230,8 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
|
||||
nativeInitFramework(onComplete);
|
||||
|
||||
MapManager.nativeSubscribe(mStorageCallbacks);
|
||||
|
||||
initNativeStrings();
|
||||
ThemeSwitcher.INSTANCE.initialize(this);
|
||||
SearchEngine.INSTANCE.initialize();
|
||||
|
@ -361,4 +363,25 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
mLocationHelper.stop();
|
||||
}
|
||||
}
|
||||
|
||||
private class StorageCallbackImpl implements MapManager.StorageCallback
|
||||
{
|
||||
@Override
|
||||
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
||||
{
|
||||
for (MapManager.StorageCallbackData item : data)
|
||||
if (item.isLeafNode && item.newStatus == CountryItem.STATUS_FAILED)
|
||||
{
|
||||
if (MapManager.nativeIsAutoretryFailed())
|
||||
{
|
||||
DownloaderNotifier.notifyDownloadFailed(MwmApplication.this, item.countryId);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(String countryId, long localSize, long remoteSize) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public class SplashActivity extends AppCompatActivity
|
|||
super.onResume();
|
||||
if (mCanceled)
|
||||
return;
|
||||
if (!Config.isLocationRequested() && !LocationUtils.checkLocationPermission(this))
|
||||
if (!Config.isLocationRequested() && !LocationUtils.checkCoarseLocationPermission(this))
|
||||
{
|
||||
Logger.d(TAG, "Requesting location permissions");
|
||||
mPermissionRequest.launch(new String[]{
|
||||
|
|
|
@ -142,7 +142,7 @@ public class BookmarkCategoriesAdapter extends BaseBookmarkCategoryAdapter<Recyc
|
|||
case TYPE_ACTION_ADD ->
|
||||
{
|
||||
Holders.GeneralViewHolder generalViewHolder = (Holders.GeneralViewHolder) holder;
|
||||
generalViewHolder.getImage().setImageResource(R.drawable.ic_add_list);
|
||||
generalViewHolder.getImage().setImageResource(R.drawable.ic_import);
|
||||
generalViewHolder.getText().setText(R.string.bookmarks_create_new_group);
|
||||
}
|
||||
case TYPE_ACTION_IMPORT ->
|
||||
|
|
|
@ -15,7 +15,6 @@ import android.view.View;
|
|||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -58,6 +57,9 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||
{
|
||||
private static final String TAG = BookmarkCategoriesFragment.class.getSimpleName();
|
||||
|
||||
static final int REQ_CODE_DELETE_CATEGORY = 102;
|
||||
static final int REQ_CODE_IMPORT_DIRECTORY = 103;
|
||||
|
||||
private static final int MAX_CATEGORY_NAME_LENGTH = 60;
|
||||
|
||||
public static final String BOOKMARKS_CATEGORIES_MENU_ID = "BOOKMARKS_CATEGORIES_BOTTOM_SHEET";
|
||||
|
@ -73,22 +75,6 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||
@NonNull
|
||||
private DataChangedListener mCategoriesAdapterObserver;
|
||||
|
||||
private final ActivityResultLauncher<Intent> startBookmarkListForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult -> {
|
||||
if( activityResult.getResultCode() == Activity.RESULT_OK)
|
||||
onDeleteActionSelected(getSelectedCategory());
|
||||
});
|
||||
|
||||
private final ActivityResultLauncher<Intent> startImportDirectoryForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult ->
|
||||
{
|
||||
if( activityResult.getResultCode() == Activity.RESULT_OK)
|
||||
onImportDirectoryResult(activityResult.getData());
|
||||
});
|
||||
|
||||
private final ActivityResultLauncher<Intent> startBookmarkSettingsForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult -> {
|
||||
// not handled at the moment
|
||||
});
|
||||
|
||||
|
||||
@Override
|
||||
@LayoutRes
|
||||
protected int getLayoutRes()
|
||||
|
@ -273,7 +259,7 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||
|
||||
PackageManager packageManager = requireActivity().getPackageManager();
|
||||
if (intent.resolveActivity(packageManager) != null)
|
||||
startImportDirectoryForResult.launch(intent);
|
||||
startActivityForResult(intent, REQ_CODE_IMPORT_DIRECTORY);
|
||||
else
|
||||
showNoFileManagerError();
|
||||
}
|
||||
|
@ -289,7 +275,7 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||
public void onItemClick(@NonNull View v, @NonNull BookmarkCategory category)
|
||||
{
|
||||
mSelectedCategory = category;
|
||||
BookmarkListActivity.startForResult(this, startBookmarkListForResult, category);
|
||||
BookmarkListActivity.startForResult(this, category);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -317,42 +303,54 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||
|
||||
private void onSettingsActionSelected(@NonNull BookmarkCategory category)
|
||||
{
|
||||
BookmarkCategorySettingsActivity.startForResult(this, startBookmarkSettingsForResult, category);
|
||||
BookmarkCategorySettingsActivity.startForResult(this, category);
|
||||
}
|
||||
|
||||
private void onImportDirectoryResult(Intent data)
|
||||
@Override
|
||||
public final void onActivityResult(int requestCode, int resultCode, Intent data)
|
||||
{
|
||||
if (data == null)
|
||||
throw new AssertionError("Data is null");
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode != Activity.RESULT_OK)
|
||||
return;
|
||||
switch (requestCode)
|
||||
{
|
||||
case REQ_CODE_DELETE_CATEGORY -> onDeleteActionSelected(getSelectedCategory());
|
||||
case REQ_CODE_IMPORT_DIRECTORY ->
|
||||
{
|
||||
if (data == null)
|
||||
throw new AssertionError("Data is null");
|
||||
|
||||
final Context context = requireActivity();
|
||||
final Uri rootUri = data.getData();
|
||||
final ProgressDialog dialog = new ProgressDialog(context, R.style.MwmTheme_ProgressDialog);
|
||||
dialog.setMessage(getString(R.string.wait_several_minutes));
|
||||
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
dialog.setIndeterminate(true);
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
Logger.d(TAG, "Importing bookmarks from " + rootUri);
|
||||
MwmApplication app = MwmApplication.from(context);
|
||||
final File tempDir = new File(StorageUtils.getTempPath(app));
|
||||
final ContentResolver resolver = context.getContentResolver();
|
||||
ThreadPool.getStorage().execute(() -> {
|
||||
AtomicInteger found = new AtomicInteger(0);
|
||||
StorageUtils.listContentProviderFilesRecursively(
|
||||
final Context context = requireActivity();
|
||||
final Uri rootUri = data.getData();
|
||||
final ProgressDialog dialog = new ProgressDialog(context, R.style.MwmTheme_ProgressDialog);
|
||||
dialog.setMessage(getString(R.string.wait_several_minutes));
|
||||
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
dialog.setIndeterminate(true);
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
Logger.d(TAG, "Importing bookmarks from " + rootUri);
|
||||
MwmApplication app = MwmApplication.from(context);
|
||||
final File tempDir = new File(StorageUtils.getTempPath(app));
|
||||
final ContentResolver resolver = context.getContentResolver();
|
||||
ThreadPool.getStorage().execute(() -> {
|
||||
AtomicInteger found = new AtomicInteger(0);
|
||||
StorageUtils.listContentProviderFilesRecursively(
|
||||
resolver, rootUri, uri -> {
|
||||
if (BookmarkManager.INSTANCE.importBookmarksFile(resolver, uri, tempDir))
|
||||
found.incrementAndGet();
|
||||
});
|
||||
UiThread.run(() -> {
|
||||
if (dialog.isShowing())
|
||||
dialog.dismiss();
|
||||
int found_val = found.get();
|
||||
String message = context.getResources().getQuantityString(
|
||||
UiThread.run(() -> {
|
||||
if (dialog.isShowing())
|
||||
dialog.dismiss();
|
||||
int found_val = found.get();
|
||||
String message = context.getResources().getQuantityString(
|
||||
R.plurals.bookmarks_detect_message, found_val, found_val);
|
||||
Toast.makeText(requireContext(), message, Toast.LENGTH_LONG).show();
|
||||
});
|
||||
});
|
||||
Toast.makeText(requireContext(), message, Toast.LENGTH_LONG).show();
|
||||
});
|
||||
});
|
||||
}
|
||||
default -> throw new AssertionError("Invalid requestCode: " + requestCode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,6 @@ package app.organicmaps.bookmarks;
|
|||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
|
@ -12,6 +11,7 @@ import app.organicmaps.bookmarks.data.BookmarkCategory;
|
|||
|
||||
public class BookmarkCategorySettingsActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
public static final int REQUEST_CODE = 107;
|
||||
public static final String EXTRA_BOOKMARK_CATEGORY = "bookmark_category";
|
||||
|
||||
@Override
|
||||
|
@ -32,11 +32,11 @@ public class BookmarkCategorySettingsActivity extends BaseMwmFragmentActivity
|
|||
return BookmarkCategorySettingsFragment.class;
|
||||
}
|
||||
|
||||
public static void startForResult(@NonNull Fragment fragment, ActivityResultLauncher<Intent> startBookmarkSettingsForResult,
|
||||
public static void startForResult(@NonNull Fragment fragment,
|
||||
@NonNull BookmarkCategory category)
|
||||
{
|
||||
android.content.Intent intent = new Intent(fragment.requireActivity(), BookmarkCategorySettingsActivity.class)
|
||||
.putExtra(EXTRA_BOOKMARK_CATEGORY, category);
|
||||
startBookmarkSettingsForResult.launch(intent);
|
||||
fragment.startActivityForResult(intent, REQUEST_CODE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package app.organicmaps.bookmarks;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StyleRes;
|
||||
|
@ -58,11 +57,11 @@ public class BookmarkListActivity extends BaseToolbarActivity
|
|||
return R.layout.bookmarks_activity;
|
||||
}
|
||||
|
||||
static void startForResult(@NonNull Fragment fragment, ActivityResultLauncher<Intent> startBookmarkListForResult, @NonNull BookmarkCategory category)
|
||||
static void startForResult(@NonNull Fragment fragment, @NonNull BookmarkCategory category)
|
||||
{
|
||||
Bundle args = new Bundle();
|
||||
Intent intent = new Intent(fragment.requireActivity(), BookmarkListActivity.class);
|
||||
intent.putExtra(BookmarksListFragment.EXTRA_CATEGORY, category);
|
||||
startBookmarkListForResult.launch(intent);
|
||||
fragment.startActivityForResult(intent, BookmarkCategoriesFragment.REQ_CODE_DELETE_CATEGORY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -39,8 +38,8 @@ import app.organicmaps.bookmarks.data.KmlFileType;
|
|||
import app.organicmaps.bookmarks.data.SortedBlock;
|
||||
import app.organicmaps.bookmarks.data.Track;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.sdk.search.BookmarkSearchListener;
|
||||
import app.organicmaps.sdk.search.SearchEngine;
|
||||
import app.organicmaps.search.NativeBookmarkSearchListener;
|
||||
import app.organicmaps.search.SearchEngine;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.SharingUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
|
@ -62,7 +61,7 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||
implements BookmarkManager.BookmarksSharingListener,
|
||||
BookmarkManager.BookmarksSortingListener,
|
||||
BookmarkManager.BookmarksLoadingListener,
|
||||
BookmarkSearchListener,
|
||||
NativeBookmarkSearchListener,
|
||||
ChooseBookmarksSortingTypeFragment.ChooseSortingTypeListener,
|
||||
MenuBottomSheetFragment.MenuBottomSheetInterface
|
||||
{
|
||||
|
@ -75,15 +74,6 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||
private static final String OPTIONS_MENU_ID = "OPTIONS_MENU_BOTTOM_SHEET";
|
||||
|
||||
private ActivityResultLauncher<SharingUtils.SharingIntent> shareLauncher;
|
||||
private final ActivityResultLauncher<Intent> startBookmarkListForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult -> {
|
||||
System.out.println("resultCode: " + activityResult.getResultCode());
|
||||
handleActivityResult();
|
||||
});
|
||||
|
||||
private final ActivityResultLauncher<Intent> startBookmarkSettingsForResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), activityResult -> {
|
||||
System.out.println("resultCode: " + activityResult.getResultCode());
|
||||
handleActivityResult();
|
||||
});
|
||||
|
||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
||||
@NonNull
|
||||
|
@ -150,9 +140,7 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||
|
||||
BookmarkCollectionAdapter adapter = new BookmarkCollectionAdapter(getCategoryOrThrow(),
|
||||
mCategoryItems);
|
||||
adapter.setOnClickListener((v, item) -> {
|
||||
BookmarkListActivity.startForResult(this, startBookmarkListForResult, item);
|
||||
});
|
||||
adapter.setOnClickListener((v, item) -> BookmarkListActivity.startForResult(this, item));
|
||||
|
||||
return adapter;
|
||||
}
|
||||
|
@ -768,7 +756,7 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||
|
||||
private void onSettingsOptionSelected()
|
||||
{
|
||||
BookmarkCategorySettingsActivity.startForResult(this, startBookmarkSettingsForResult, mCategoryDataSource.getData());
|
||||
BookmarkCategorySettingsActivity.startForResult(this, mCategoryDataSource.getData());
|
||||
}
|
||||
|
||||
private void onDeleteOptionSelected()
|
||||
|
@ -807,25 +795,21 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||
{
|
||||
ArrayList<MenuBottomSheetItem> items = new ArrayList<>();
|
||||
items.add(new MenuBottomSheetItem(R.string.edit, R.drawable.ic_edit, this::onTrackEditActionSelected));
|
||||
items.add(new MenuBottomSheetItem(R.string.export_file, R.drawable.ic_file_kmz, () -> onShareTrackSelected(track.getTrackId(), KmlFileType.Text)));
|
||||
items.add(new MenuBottomSheetItem(R.string.export_file_gpx, R.drawable.ic_file_gpx, () -> onShareTrackSelected(track.getTrackId(), KmlFileType.Gpx)));
|
||||
items.add(new MenuBottomSheetItem(R.string.delete, R.drawable.ic_delete, () -> onDeleteTrackSelected(track.getTrackId())));
|
||||
return items;
|
||||
}
|
||||
|
||||
private void onShareTrackSelected(long trackId, KmlFileType kmlFileType)
|
||||
{
|
||||
BookmarksSharingHelper.INSTANCE.prepareTrackForSharing(requireActivity(), trackId, kmlFileType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreparedFileForSharing(@NonNull BookmarkSharingResult result)
|
||||
{
|
||||
BookmarksSharingHelper.INSTANCE.onPreparedFileForSharing(requireActivity(), shareLauncher, result);
|
||||
}
|
||||
|
||||
private void handleActivityResult()
|
||||
@Override
|
||||
@SuppressWarnings("deprecation") // https://github.com/organicmaps/organicmaps/issues/3630
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data)
|
||||
{
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
getBookmarkListAdapter().notifyDataSetChanged();
|
||||
ActionBar actionBar = ((AppCompatActivity) requireActivity()).getSupportActionBar();
|
||||
actionBar.setTitle(mCategoryDataSource.getData().getName());
|
||||
|
|
|
@ -36,12 +36,6 @@ public enum BookmarksSharingHelper
|
|||
BookmarkManager.INSTANCE.prepareCategoriesForSharing(new long[]{catId}, kmlFileType);
|
||||
}
|
||||
|
||||
public void prepareTrackForSharing(@NonNull Activity context, long trackId, KmlFileType kmlFileType)
|
||||
{
|
||||
showProgressDialog(context);
|
||||
BookmarkManager.INSTANCE.prepareTrackForSharing(trackId, kmlFileType);
|
||||
}
|
||||
|
||||
private void showProgressDialog(@NonNull Activity context)
|
||||
{
|
||||
mProgressDialog = new ProgressDialog(context, R.style.MwmTheme_ProgressDialog);
|
||||
|
|
|
@ -11,7 +11,7 @@ import androidx.core.os.ParcelCompat;
|
|||
|
||||
import app.organicmaps.Framework;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.search.Popularity;
|
||||
import app.organicmaps.search.Popularity;
|
||||
import app.organicmaps.util.Constants;
|
||||
|
||||
// TODO consider refactoring to remove hack with MapObject unmarshalling itself and Bookmark at the same time.
|
||||
|
|
|
@ -527,11 +527,6 @@ public enum BookmarkManager
|
|||
nativePrepareFileForSharing(catIds, kmlFileType.ordinal());
|
||||
}
|
||||
|
||||
public void prepareTrackForSharing(long trackId, KmlFileType kmlFileType)
|
||||
{
|
||||
nativePrepareTrackFileForSharing(trackId, kmlFileType.ordinal());
|
||||
}
|
||||
|
||||
public void setNotificationsEnabled(boolean enabled)
|
||||
{
|
||||
nativeSetNotificationsEnabled(enabled);
|
||||
|
@ -811,8 +806,6 @@ public enum BookmarkManager
|
|||
|
||||
private static native void nativePrepareFileForSharing(long[] catIds, int kmlFileType);
|
||||
|
||||
private static native void nativePrepareTrackFileForSharing(long trackId, int kmlFileType);
|
||||
|
||||
private static native boolean nativeIsCategoryEmpty(long catId);
|
||||
|
||||
private static native void nativeSetNotificationsEnabled(boolean enabled);
|
||||
|
|
|
@ -12,7 +12,7 @@ import androidx.core.os.ParcelCompat;
|
|||
|
||||
import app.organicmaps.Framework;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.search.Popularity;
|
||||
import app.organicmaps.search.Popularity;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.placepage.PlacePageData;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class DownloaderScreen extends BaseScreen
|
|||
for (final var item : mMissingMaps.entrySet())
|
||||
{
|
||||
item.getValue().update();
|
||||
MapManager.startDownload(item.getKey());
|
||||
MapManager.nativeDownload(item.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,11 +150,12 @@ class DownloaderScreen extends BaseScreen
|
|||
return getCarContext().getString(R.string.downloader_loading_ios);
|
||||
|
||||
final long downloadedSize = getDownloadedSize();
|
||||
final String progressPercent = StringUtils.formatPercent((double) downloadedSize / mTotalSize);
|
||||
final float progress = (float) downloadedSize / mTotalSize * 100;
|
||||
final String totalSizeStr = StringUtils.getFileSizeString(getCarContext(), mTotalSize);
|
||||
final String downloadedSizeStr = StringUtils.getFileSizeString(getCarContext(), downloadedSize);
|
||||
|
||||
return progressPercent + "\n" + downloadedSizeStr + " / " + totalSizeStr;
|
||||
return StringUtils.formatUsingSystemLocale("%.2f%%\n%s",
|
||||
progress, downloadedSizeStr + " / " + totalSizeStr);
|
||||
}
|
||||
|
||||
private long getDownloadedSize()
|
||||
|
|
|
@ -113,7 +113,7 @@ public class RequestPermissionsScreenWithNotification extends BaseScreen impleme
|
|||
.setOngoing(true)
|
||||
.setShowWhen(false)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setSmallIcon(R.drawable.ic_location_crosshair)
|
||||
.setSmallIcon(R.drawable.ic_my_location)
|
||||
.setColor(ContextCompat.getColor(getCarContext(), R.color.notification))
|
||||
.setContentTitle(getCarContext().getString(R.string.aa_request_permission_notification))
|
||||
.setContentIntent(pendingIntent);
|
||||
|
|
|
@ -23,13 +23,13 @@ import app.organicmaps.car.SurfaceRenderer;
|
|||
import app.organicmaps.car.screens.base.BaseMapScreen;
|
||||
import app.organicmaps.car.util.UiHelpers;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.sdk.search.SearchListener;
|
||||
import app.organicmaps.sdk.search.SearchEngine;
|
||||
import app.organicmaps.sdk.search.SearchRecents;
|
||||
import app.organicmaps.sdk.search.SearchResult;
|
||||
import app.organicmaps.search.NativeSearchListener;
|
||||
import app.organicmaps.search.SearchEngine;
|
||||
import app.organicmaps.search.SearchRecents;
|
||||
import app.organicmaps.search.SearchResult;
|
||||
import app.organicmaps.util.Language;
|
||||
|
||||
public class SearchOnMapScreen extends BaseMapScreen implements SearchListener
|
||||
public class SearchOnMapScreen extends BaseMapScreen implements NativeSearchListener
|
||||
{
|
||||
private final int MAX_RESULTS_SIZE;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue