Compare commits
175 Commits
2025.08.08
...
fix-ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62fb50e95c | ||
|
|
664a156cc6 | ||
|
|
08b773dfa8 | ||
|
|
c31d3b6926 | ||
|
|
7469b0ecb4 | ||
|
|
2b78118310 | ||
|
|
70622bdca0 | ||
|
|
5b3e327ff8 | ||
|
|
8395e8d9a9 | ||
|
|
b7971b5cc0 | ||
|
|
8fb8be6a00 | ||
|
|
273afe052a | ||
|
|
9b5419b6d4 | ||
|
|
835ee4ab8d | ||
|
|
5bc8aae623 | ||
|
|
72439bd6d7 | ||
|
|
a3db039232 | ||
|
|
ffcaf3640b | ||
|
|
289f4c4343 | ||
|
|
09de87fd29 | ||
|
|
1a241121c4 | ||
|
|
fdeeb1ae34 | ||
|
|
c2bd2b897a | ||
|
|
e39b5eb507 | ||
|
|
96ef33a401 | ||
|
|
c6dcfc71bf | ||
|
|
053fe3c143 | ||
|
|
c6439aaa82 | ||
|
|
e50a668feb | ||
|
|
5ce753bd5c | ||
|
|
8058183f72 | ||
|
|
07f745411f | ||
|
|
2004c9bfc1 | ||
|
|
1e7715d10f | ||
|
|
e884e32bb6 | ||
|
|
660694aee0 | ||
|
|
99fa3ec551 | ||
|
|
f26db1a79b | ||
|
|
1151f0fb75 | ||
|
|
bbb28107b8 | ||
|
|
9c7b39fd5b | ||
|
|
0d9514bee9 | ||
|
|
a036edc9c5 | ||
|
|
90492e95e6 | ||
|
|
fc199252eb | ||
|
|
327d302aae | ||
|
|
0b8bd42cb0 | ||
|
|
962ee67833 | ||
|
|
69e3fdca90 | ||
|
|
ac8f945455 | ||
|
|
c8a4726500 | ||
|
|
40adb0f860 | ||
|
|
c600a4fd5d | ||
|
|
07420a3f19 | ||
|
|
3920988ef4 | ||
|
|
6136abb33a | ||
|
|
a0e40c98d7 | ||
|
|
3bdaa44c3a | ||
|
|
945c6205a0 | ||
|
|
ef4fd85883 | ||
|
|
83db427c40 | ||
|
|
946fea1e07 | ||
|
|
bd80e9160d | ||
|
|
5333ad3597 | ||
|
|
65b5234396 | ||
|
|
969c805182 | ||
|
|
8b03e99035 | ||
|
|
3aabde338a | ||
|
|
d5d86ffd36 | ||
|
|
d4cef9385b | ||
|
|
9c495ca616 | ||
|
|
a08f3df3e6 | ||
|
|
bb5da20fec | ||
|
|
e112dc2ac4 | ||
|
|
3e2e6cb487 | ||
|
|
21020429cb | ||
|
|
07025ff696 | ||
|
|
c13da0f0a2 | ||
|
|
dd023b65c7 | ||
|
|
0c8648d1e3 | ||
|
|
760e050110 | ||
|
|
db4b46f8ad | ||
|
|
29ebd8b725 | ||
|
|
6b53d1fb91 | ||
|
|
d1da6c197e | ||
|
|
0dc8d69375 | ||
|
|
3352279d9d | ||
|
|
6da8b69a1b | ||
|
|
fe1c371b5f | ||
|
|
309eed2365 | ||
|
|
979c713436 | ||
|
|
5e8a8de646 | ||
|
|
b0bdd2c665 | ||
|
|
dd949925f6 | ||
|
|
b37572000f | ||
|
|
332ab819b2 | ||
|
|
860f58e60e | ||
|
|
0e7d8a65cc | ||
|
|
4c6207a8ce | ||
|
|
b96afc6fbb | ||
|
|
8174eac134 | ||
|
|
f4dd133872 | ||
|
|
feddb98a81 | ||
|
|
886938c0dc | ||
|
|
5014b4018d | ||
|
|
084357a68e | ||
|
|
c6c758d7af | ||
|
|
e80679eeb0 | ||
|
|
1fda519032 | ||
|
|
57f543a0dd | ||
|
|
2b173cebe6 | ||
|
|
10f154858c | ||
|
|
20e0b0ff95 | ||
|
|
4588703f71 | ||
|
|
11ee2b121b | ||
|
|
4e9efa63ff | ||
|
|
161123245e | ||
|
|
8f11eb876e | ||
|
|
47741282cf | ||
|
|
115dbbea79 | ||
|
|
088a2bfd22 | ||
|
|
d8cdfb8080 | ||
|
|
b465b95854 | ||
|
|
cee3f24cd9 | ||
|
|
c7133364c1 | ||
|
|
cc6958282b | ||
|
|
21cc2bbf52 | ||
|
|
1cf4ff21ec | ||
|
|
1fe8f1f0e6 | ||
|
|
f8bfdb898b | ||
|
|
898c940de0 | ||
|
|
eca0e91ec4 | ||
|
|
26567a2220 | ||
|
|
539e5cdfeb | ||
|
|
dde65a918b | ||
|
|
c0469ddef2 | ||
|
|
34af5e26d9 | ||
|
|
d89ef42acc | ||
|
|
fb1279ca5a | ||
|
|
128b0f3e2b | ||
|
|
3b46dd1dee | ||
|
|
767f27e00a | ||
|
|
ac50520ca8 | ||
|
|
4f6455d6f8 | ||
|
|
c2c68c4a76 | ||
|
|
2f2c3b042f | ||
|
|
a5e7922d37 | ||
|
|
c05b668e38 | ||
|
|
58ea819936 | ||
|
|
038746b698 | ||
|
|
11585e07bb | ||
|
|
a576f529a4 | ||
|
|
e298da740e | ||
|
|
68711cae06 | ||
|
|
a3bb0bed46 | ||
|
|
0c7e6300f5 | ||
|
|
2529d5bf5d | ||
|
|
0ef61252c6 | ||
|
|
530847285c | ||
|
|
cdc2b1b5b5 | ||
|
|
606a94c818 | ||
|
|
6bac0d5f65 | ||
|
|
9a609f638c | ||
|
|
cfb97a3db6 | ||
|
|
9ad94eb95c | ||
|
|
aa71668eab | ||
|
|
d649e46ef2 | ||
|
|
12dbfc6622 | ||
|
|
8393402c02 | ||
|
|
972bb21264 | ||
|
|
bab869db2b | ||
|
|
56f9990a7b | ||
|
|
bef136a094 | ||
|
|
c4c08fc410 | ||
|
|
1433b0e866 |
@@ -1,48 +1,59 @@
|
|||||||
# Configuration file for clang-format, based on docs/CPP_STYLE.md.
|
# Configuration file for clang-format, based on docs/CPP_STYLE.md.
|
||||||
|
|
||||||
---
|
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
|
|
||||||
AccessModifierOffset: -2
|
AccessModifierOffset: -2
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignArrayOfStructures: Right
|
||||||
|
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
|
||||||
|
AlignEscapedNewlines: LeftWithLastLine
|
||||||
AlignOperands: AlignAfterOperator
|
AlignOperands: AlignAfterOperator
|
||||||
AllowShortBlocksOnASingleLine: Empty
|
AllowShortBlocksOnASingleLine: Empty
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
AllowShortIfStatementsOnASingleLine: Never
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
AllowShortLoopsOnASingleLine: false
|
AllowShortLoopsOnASingleLine: false
|
||||||
AllowShortCaseLabelsOnASingleLine: true
|
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterCaseLabel: true
|
AfterCaseLabel: true
|
||||||
AfterClass: true
|
AfterClass: true
|
||||||
AfterControlStatement: Always
|
AfterControlStatement: Always
|
||||||
AfterEnum: true
|
AfterEnum: true
|
||||||
|
AfterExternBlock: true
|
||||||
AfterFunction: true
|
AfterFunction: true
|
||||||
AfterNamespace: true
|
AfterNamespace: true
|
||||||
AfterObjCDeclaration: true
|
AfterObjCDeclaration: true
|
||||||
AfterStruct: true
|
AfterStruct: true
|
||||||
AfterUnion: true
|
AfterUnion: true
|
||||||
AfterExternBlock: true
|
|
||||||
BeforeCatch: true
|
BeforeCatch: true
|
||||||
BeforeElse: true
|
BeforeElse: true
|
||||||
BeforeLambdaBody: true
|
BeforeLambdaBody: true
|
||||||
BeforeWhile: true
|
BeforeWhile: true
|
||||||
IndentBraces: false
|
|
||||||
SplitEmptyFunction: false
|
SplitEmptyFunction: false
|
||||||
SplitEmptyRecord: false
|
|
||||||
SplitEmptyNamespace: false
|
SplitEmptyNamespace: false
|
||||||
|
SplitEmptyRecord: false
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BreakAfterJavaFieldAnnotations: true
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BreakConstructorInitializers: BeforeComma
|
BreakConstructorInitializers: BeforeComma
|
||||||
BreakInheritanceList: BeforeComma
|
BreakInheritanceList: BeforeComma
|
||||||
ColumnLimit: 120
|
ColumnLimit: 120
|
||||||
ConstructorInitializerIndentWidth: 2
|
ConstructorInitializerIndentWidth: 2
|
||||||
ContinuationIndentWidth: 2
|
ContinuationIndentWidth: 4
|
||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
IncludeBlocks: Preserve
|
IncludeBlocks: Preserve
|
||||||
IndentCaseLabels: false
|
IndentAccessModifiers: false
|
||||||
IndentExternBlock: NoIndent
|
IndentExternBlock: NoIndent
|
||||||
|
InsertBraces: false
|
||||||
InsertNewlineAtEOF: true
|
InsertNewlineAtEOF: true
|
||||||
PackConstructorInitializers: Never
|
LambdaBodyIndentation: OuterScope
|
||||||
|
PackConstructorInitializers: CurrentLine
|
||||||
PointerAlignment: Middle
|
PointerAlignment: Middle
|
||||||
|
RemoveBracesLLVM: true
|
||||||
QualifierAlignment: Right
|
QualifierAlignment: Right
|
||||||
SpacesInContainerLiterals: false
|
SpacesInContainerLiterals: false
|
||||||
Standard: Latest
|
Standard: Latest
|
||||||
TabWidth: 2
|
TabWidth: 2
|
||||||
UseTab: Never
|
|
||||||
|
---
|
||||||
|
Language: Java
|
||||||
|
AllowShortFunctionsOnASingleLine: Empty
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
name: 🐞 Bug Report
|
name: 🐞 Bug Report
|
||||||
description: Report a problem you've encountered
|
description: Report a problem you've encountered
|
||||||
title: "bug: "
|
|
||||||
labels:
|
labels:
|
||||||
- bug
|
- bug
|
||||||
body:
|
body:
|
||||||
@@ -67,4 +66,4 @@ body:
|
|||||||
label: Additional context
|
label: Additional context
|
||||||
description: Add any other context or comments that may be useful.
|
description: Add any other context or comments that may be useful.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
name: "💡 Feature Request"
|
name: "💡 Feature Request"
|
||||||
description: "Suggest an idea or improvement for CoMaps"
|
description: "Suggest an idea or improvement for CoMaps"
|
||||||
title: "feat: "
|
|
||||||
labels:
|
labels:
|
||||||
- "enhancement"
|
- "enhancement"
|
||||||
body:
|
body:
|
||||||
@@ -44,4 +43,4 @@ body:
|
|||||||
label: "Additional context"
|
label: "Additional context"
|
||||||
description: "Any other context, comments, or screenshots to support your request."
|
description: "Any other context, comments, or screenshots to support your request."
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
- .forgejo/**
|
- .forgejo/**
|
||||||
@@ -32,9 +32,6 @@ on:
|
|||||||
- track_generator/**
|
- track_generator/**
|
||||||
- xcode/**
|
- xcode/**
|
||||||
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
android-google-beta:
|
android-google-beta:
|
||||||
name: Android Google Beta
|
name: Android Google Beta
|
||||||
@@ -44,11 +41,11 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
apt-get update -y
|
||||||
sudo apt-get install -y ninja-build
|
apt-get install -y cmake ninja-build
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -71,11 +68,9 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
@@ -34,16 +34,21 @@ on:
|
|||||||
- track_generator/**
|
- track_generator/**
|
||||||
- xcode/**
|
- xcode/**
|
||||||
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Android Lint
|
name: Android Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Node.JS
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
@@ -51,10 +56,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
@@ -63,6 +64,8 @@ jobs:
|
|||||||
android-check:
|
android-check:
|
||||||
name: Build Android Debug
|
name: Build Android Debug
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -81,11 +84,11 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
apt-get update -y
|
||||||
sudo apt-get install -y ninja-build
|
apt-get install -y cmake ninja-build nodejs
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: httpa://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 200 # enough to get all commits for the current day
|
fetch-depth: 200 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -93,12 +96,8 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
key: ${{ github.workflow }}-${{ matrix.flavor }}
|
key: ${{ github.workflow }}-${{ matrix.flavor }}
|
||||||
|
|
||||||
@@ -117,5 +116,5 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: android-${{ matrix.flavor }}
|
name: android-${{ matrix.flavor }}
|
||||||
path: android/app/build/outputs/apk/**/OrganicMaps-*.apk
|
path: android/app/build/outputs/apk/**/CoMaps-*.apk
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -4,16 +4,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * 0' # Once per week at 05:00 UTC
|
- cron: '0 5 * * 0' # Once per week at 05:00 UTC
|
||||||
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
precondition:
|
precondition:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check preconditions
|
name: Check preconditions
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1000 # fetch month or so
|
fetch-depth: 1000 # fetch month or so
|
||||||
|
|
||||||
@@ -34,6 +31,8 @@ jobs:
|
|||||||
android-google-beta:
|
android-google-beta:
|
||||||
name: Android Google Beta
|
name: Android Google Beta
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
needs: precondition
|
needs: precondition
|
||||||
if: ${{ needs.precondition.outputs.updated != '' }}
|
if: ${{ needs.precondition.outputs.updated != '' }}
|
||||||
environment: beta
|
environment: beta
|
||||||
@@ -41,14 +40,14 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
apt-get update -y
|
||||||
sudo apt-get install -y ninja-build
|
apt-get install -y ninja-build
|
||||||
|
|
||||||
- name: Install Google SDK
|
- name: Install Google SDK
|
||||||
uses: google-github-actions/setup-gcloud@v0
|
uses: google-github-actions/setup-gcloud@v0
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -73,10 +72,6 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
@@ -89,7 +84,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
gcloud auth activate-service-account --key-file android/app/firebase-test-lab.json
|
gcloud auth activate-service-account --key-file android/app/firebase-test-lab.json
|
||||||
gcloud config set project omapsapp
|
gcloud config set project omapsapp
|
||||||
gcloud firebase test android run --app ./android/app/build/outputs/apk/google/beta/OrganicMaps-*-google-beta.apk \
|
gcloud firebase test android run --app ./android/app/build/outputs/apk/google/beta/CoMaps-*-google-beta.apk \
|
||||||
--device model=husky,version=34 \
|
--device model=husky,version=34 \
|
||||||
--device model=tangorpro,version=33,orientation=landscape \
|
--device model=tangorpro,version=33,orientation=landscape \
|
||||||
--device model=bluejay,version=32 \
|
--device model=bluejay,version=32 \
|
||||||
|
|||||||
@@ -2,18 +2,17 @@ name: Android Release Metadata
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
android-release-metadata:
|
android-release-metadata:
|
||||||
name: Upload Google Play metadata
|
name: Upload Google Play metadata
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
environment: production
|
environment: production
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
# TODO: use shallow (and sparse?) checkout
|
# TODO: use shallow (and sparse?) checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
# - name: Parallel submodules checkout
|
# - name: Parallel submodules checkout
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ on:
|
|||||||
env:
|
env:
|
||||||
RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt
|
RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt
|
||||||
FDROID_VERSION: android/app/src/fdroid/play/version.yaml
|
FDROID_VERSION: android/app/src/fdroid/play/version.yaml
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tag:
|
tag:
|
||||||
@@ -14,7 +13,7 @@ jobs:
|
|||||||
environment: production
|
environment: production
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # Enough to get all commits for the last day.
|
fetch-depth: 100 # Enough to get all commits for the last day.
|
||||||
ssh-key: ${{ secrets.RELEASE_SSH_KEY }}
|
ssh-key: ${{ secrets.RELEASE_SSH_KEY }}
|
||||||
@@ -72,11 +71,11 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
apt-get update -y
|
||||||
sudo apt-get install -y ninja-build
|
apt-get install -y cmake ninja-build
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
ref: 'refs/tags/${{ needs.tag.outputs.tag }}'
|
ref: 'refs/tags/${{ needs.tag.outputs.tag }}'
|
||||||
@@ -93,7 +92,7 @@ jobs:
|
|||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Checkout screenshots
|
- name: Checkout screenshots
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
||||||
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
||||||
@@ -117,15 +116,13 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Set up SDK
|
- name: Set up SDK
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
|
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
|
||||||
|
|
||||||
- name: Compile and upload to Google Play
|
- name: Compile and upload to Google Play
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: |
|
run: |
|
||||||
@@ -133,6 +130,8 @@ jobs:
|
|||||||
if: ${{ matrix.flavor == 'google' }}
|
if: ${{ matrix.flavor == 'google' }}
|
||||||
|
|
||||||
- name: Compile and upload to Huawei AppGallery
|
- name: Compile and upload to Huawei AppGallery
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: |
|
run: |
|
||||||
@@ -141,6 +140,8 @@ jobs:
|
|||||||
if: ${{ matrix.flavor == 'huawei' }}
|
if: ${{ matrix.flavor == 'huawei' }}
|
||||||
|
|
||||||
- name: Compile universal APK
|
- name: Compile universal APK
|
||||||
|
container:
|
||||||
|
image: runmymind/docker-android-sdk:latest
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: |
|
run: |
|
||||||
@@ -151,16 +152,16 @@ jobs:
|
|||||||
if: ${{ matrix.flavor == 'web' }}
|
if: ${{ matrix.flavor == 'web' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
(cd ./android/app/build/outputs/apk/web/release/ && sha256sum OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk > OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum)
|
(cd ./android/app/build/outputs/apk/web/release/ && sha256sum CoMaps-${{ needs.tag.outputs.code }}-web-release.apk > CoMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum)
|
||||||
{
|
{
|
||||||
cat ${{ env.RELEASE_NOTES }}
|
cat ${{ env.RELEASE_NOTES }}
|
||||||
echo ""
|
echo ""
|
||||||
echo "See [a detailed announce](https://organicmaps.app/news/) on our website when app updates are published in all stores."
|
echo "See [a detailed announce](https://comaps.app/news/) on our website when app updates are published in all stores."
|
||||||
echo "You can get automatic app updates from Codeberg [using Obtainium](https://codeberg.org/comaps/comaps/wiki/Installing-Organic-Maps-from-GitHub-using-Obtainium)."
|
echo "You can get automatic app updates from Codeberg [using Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://codeberg.org/comaps/comaps)."
|
||||||
echo ""
|
echo ""
|
||||||
echo "sha256sum:"
|
echo "sha256sum:"
|
||||||
echo -e '\n```'
|
echo -e '\n```'
|
||||||
tr -d '\n' < ./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
tr -d '\n' < ./android/app/build/outputs/apk/web/release/CoMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
||||||
echo -e '\n```'
|
echo -e '\n```'
|
||||||
} > ${{ runner.temp }}/release-notes.txt
|
} > ${{ runner.temp }}/release-notes.txt
|
||||||
|
|
||||||
@@ -175,6 +176,6 @@ jobs:
|
|||||||
discussion_category_name: 'Announcements'
|
discussion_category_name: 'Announcements'
|
||||||
prerelease: true
|
prerelease: true
|
||||||
files: |
|
files: |
|
||||||
./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk
|
./android/app/build/outputs/apk/web/release/CoMaps-${{ needs.tag.outputs.code }}-web-release.apk
|
||||||
./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
./android/app/build/outputs/apk/web/release/CoMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
|
|||||||
@@ -3,34 +3,34 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packaging/app.organicmaps.desktop.metainfo.xml
|
- packaging/app.comaps.desktop.metainfo.xml
|
||||||
- .forgejo/workflows/appstream-check.yaml # Run check on self change
|
- .forgejo/workflows/appstream-check.yaml # Run check on self change
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-appstream:
|
validate-appstream:
|
||||||
name: Validate appstream metadata xml
|
name: Validate appstream metadata xml
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
packaging/app.organicmaps.desktop.metainfo.xml
|
packaging/app.comaps.desktop.metainfo.xml
|
||||||
|
|
||||||
- name: Install appstream validator and flatpak Builder
|
- name: Install appstream validator and flatpak Builder
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
apt update -y
|
||||||
sudo apt install -y \
|
apt install -y \
|
||||||
flatpak
|
flatpak
|
||||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
sudo flatpak install -y org.flatpak.Builder
|
flatpak install -y org.flatpak.Builder
|
||||||
|
|
||||||
- name: Lint appstream data with flatpak Builder
|
- name: Lint appstream data with flatpak Builder
|
||||||
shell: bash
|
shell: bash
|
||||||
run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.organicmaps.desktop.metainfo.xml
|
run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.comaps.desktop.metainfo.xml
|
||||||
|
|
||||||
- name: Run appstreamcli in pedantic mode
|
- name: Run appstreamcli in pedantic mode
|
||||||
shell: bash
|
shell: bash
|
||||||
run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.organicmaps.desktop.metainfo.xml
|
run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.comaps.desktop.metainfo.xml
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
should-run-check:
|
should-run-check:
|
||||||
name: Should run coverage
|
name: Should run coverage
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
run-from-pr: ${{ steps.run-from-pr.outputs.run-from-pr }}
|
run-from-pr: ${{ steps.run-from-pr.outputs.run-from-pr }}
|
||||||
manually-triggered: ${{ steps.manually-triggered.outputs.manually-triggered }}
|
manually-triggered: ${{ steps.manually-triggered.outputs.manually-triggered }}
|
||||||
@@ -59,16 +59,11 @@ jobs:
|
|||||||
coverage:
|
coverage:
|
||||||
needs: should-run-check
|
needs: should-run-check
|
||||||
name: Generate coverage report
|
name: Generate coverage report
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
if: ${{ needs.should-run-check.outputs.run-from-pr == 'true' || needs.should-run-check.outputs.manually-triggered == 'true'}}
|
if: ${{ needs.should-run-check.outputs.run-from-pr == 'true' || needs.should-run-check.outputs.manually-triggered == 'true'}}
|
||||||
steps:
|
steps:
|
||||||
- name: Free disk space by removing .NET, Android and Haskell
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -79,8 +74,8 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
apt update -y
|
||||||
sudo apt install -y \
|
apt install -y \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libgl1-mesa-dev \
|
libgl1-mesa-dev \
|
||||||
libglvnd-dev \
|
libglvnd-dev \
|
||||||
@@ -94,12 +89,8 @@ jobs:
|
|||||||
llvm \
|
llvm \
|
||||||
gcovr
|
gcovr
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
key: ${{ github.workflow }}-coverage
|
key: ${{ github.workflow }}-coverage
|
||||||
|
|
||||||
@@ -133,15 +124,15 @@ jobs:
|
|||||||
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||||
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
||||||
run: |
|
run: |
|
||||||
sudo locale-gen en_US
|
locale-gen en_US
|
||||||
sudo locale-gen en_US.UTF-8
|
locale-gen en_US.UTF-8
|
||||||
sudo locale-gen es_ES
|
locale-gen es_ES
|
||||||
sudo locale-gen es_ES.UTF-8
|
locale-gen es_ES.UTF-8
|
||||||
sudo locale-gen fr_FR
|
locale-gen fr_FR
|
||||||
sudo locale-gen fr_FR.UTF-8
|
locale-gen fr_FR.UTF-8
|
||||||
sudo locale-gen ru_RU
|
locale-gen ru_RU
|
||||||
sudo locale-gen ru_RU.UTF-8
|
locale-gen ru_RU.UTF-8
|
||||||
sudo update-locale
|
update-locale
|
||||||
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
||||||
|
|
||||||
- name: Run coverage report generation
|
- name: Run coverage report generation
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: codeberg-tiny
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/KineticCafe/actions-dco@v1
|
- uses: https://github.com/KineticCafe/actions-dco@v1
|
||||||
@@ -3,28 +3,28 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- qt/res/app.organicmaps.desktop.desktop
|
- qt/res/app.comaps.desktop.desktop
|
||||||
- .forgejo/workflows/desktop-file-check.yaml # Run check on self change
|
- .forgejo/workflows/desktop-file-check.yaml # Run check on self change
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-desktop-file:
|
validate-desktop-file:
|
||||||
name: Validate .desktop file
|
name: Validate .desktop file
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
qt/res/app.organicmaps.desktop.desktop
|
qt/res/app.comaps.desktop.desktop
|
||||||
|
|
||||||
- name: Install desktop-file-validate tool
|
- name: Install desktop-file-validate tool
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
apt update -y
|
||||||
sudo apt install -y \
|
apt install -y \
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
|
|
||||||
- name: Validate desktop file
|
- name: Validate desktop file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: desktop-file-validate qt/res/app.organicmaps.desktop.desktop && echo "Successfully validated .desktop file"
|
run: desktop-file-validate qt/res/app.comaps.desktop.desktop && echo "Successfully validated .desktop file"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
- .forgejo/**
|
- .forgejo/**
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -66,10 +66,6 @@ jobs:
|
|||||||
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
|
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
|
||||||
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
|
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile and upload to TestFlight
|
- name: Compile and upload to TestFlight
|
||||||
run: |
|
run: |
|
||||||
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"
|
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
@@ -53,16 +53,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Parallel submodules checkout
|
- name: Parallel submodules checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure XCode cache
|
- name: Configure XCode cache
|
||||||
uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
with:
|
with:
|
||||||
@@ -103,4 +99,4 @@ jobs:
|
|||||||
-destination 'generic/platform=iOS' \
|
-destination 'generic/platform=iOS' \
|
||||||
-quiet \
|
-quiet \
|
||||||
CODE_SIGNING_REQUIRED=NO \
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
CODE_SIGNING_ALLOWED=NO
|
CODE_SIGNING_ALLOWED=NO
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
environment: production
|
environment: production
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore release keys
|
- name: Restore release keys
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
APPSTORE_JSON: ${{ secrets.APPSTORE_JSON }}
|
APPSTORE_JSON: ${{ secrets.APPSTORE_JSON }}
|
||||||
|
|
||||||
- name: Checkout screenshots
|
- name: Checkout screenshots
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
||||||
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
path: screenshots
|
path: screenshots
|
||||||
|
|
||||||
- name: Checkout keywords
|
- name: Checkout keywords
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ secrets.KEYWORDS_REPO }}
|
repository: ${{ secrets.KEYWORDS_REPO }}
|
||||||
ssh-key: ${{ secrets.KEYWORDS_SSH_KEY }}
|
ssh-key: ${{ secrets.KEYWORDS_SSH_KEY }}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
@@ -31,20 +31,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
linux-no-unity:
|
linux-no-unity:
|
||||||
name: Linux no unity build
|
name: Linux no unity build
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
# Cancels previous jobs if the same branch or PR was updated again.
|
# Cancels previous jobs if the same branch or PR was updated again.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Free disk space by removing .NET, Android and Haskell
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100 # enough to get all commits for the current day
|
fetch-depth: 100 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -55,9 +50,10 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
apt update -y
|
||||||
sudo apt install -y \
|
apt install -y \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
|
cmake \
|
||||||
libgl1-mesa-dev \
|
libgl1-mesa-dev \
|
||||||
libglvnd-dev \
|
libglvnd-dev \
|
||||||
libharfbuzz-dev \
|
libharfbuzz-dev \
|
||||||
@@ -71,12 +67,8 @@ jobs:
|
|||||||
libqt6positioning6-plugins \
|
libqt6positioning6-plugins \
|
||||||
libqt6positioning6
|
libqt6positioning6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
key: ${{ github.workflow }}-no-unity
|
key: ${{ github.workflow }}-no-unity
|
||||||
|
|
||||||
@@ -99,7 +91,7 @@ jobs:
|
|||||||
|
|
||||||
linux-matrix:
|
linux-matrix:
|
||||||
name: Linux builds and tests
|
name: Linux builds and tests
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -111,13 +103,8 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Free disk space by removing .NET, Android and Haskell
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Parallel submodules checkout
|
- name: Parallel submodules checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -126,8 +113,8 @@ jobs:
|
|||||||
- name: Install build tools and dependencies
|
- name: Install build tools and dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
apt update -y
|
||||||
sudo apt install -y \
|
apt install -y \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libgl1-mesa-dev \
|
libgl1-mesa-dev \
|
||||||
libglvnd-dev \
|
libglvnd-dev \
|
||||||
@@ -142,12 +129,8 @@ jobs:
|
|||||||
libqt6positioning6-plugins \
|
libqt6positioning6-plugins \
|
||||||
libqt6positioning6
|
libqt6positioning6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
key: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}
|
key: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}
|
||||||
|
|
||||||
@@ -182,13 +165,13 @@ jobs:
|
|||||||
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||||
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
||||||
run: |
|
run: |
|
||||||
sudo locale-gen en_US
|
locale-gen en_US
|
||||||
sudo locale-gen en_US.UTF-8
|
locale-gen en_US.UTF-8
|
||||||
sudo locale-gen es_ES
|
locale-gen es_ES
|
||||||
sudo locale-gen es_ES.UTF-8
|
locale-gen es_ES.UTF-8
|
||||||
sudo locale-gen fr_FR
|
locale-gen fr_FR
|
||||||
sudo locale-gen fr_FR.UTF-8
|
locale-gen fr_FR.UTF-8
|
||||||
sudo locale-gen ru_RU
|
locale-gen ru_RU
|
||||||
sudo locale-gen ru_RU.UTF-8
|
locale-gen ru_RU.UTF-8
|
||||||
sudo update-locale
|
update-locale
|
||||||
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- fix-ci
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Parallel submodules checkout
|
- name: Parallel submodules checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -57,10 +57,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
9
.github/workflows/android-check.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||||
|
SKIP_MAP_DOWNLOAD: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -22,10 +23,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Init boost, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh --skip-map-download
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
@@ -76,10 +73,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Init boost, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh --skip-map-download
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
43
.github/workflows/clang-format.yaml
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: clang-format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'android/app/src/**.java'
|
||||||
|
- '.clang-format'
|
||||||
|
- '.github/workflows/clang-format.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'android/app/src/**.java'
|
||||||
|
- '.clang-format'
|
||||||
|
- '.github/workflows/clang-format.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-formatting:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true # TODO(AB): Remove this line when ready to enforce formatting.
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install clang-format
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang-format-19
|
||||||
|
clang-format-19 --version
|
||||||
|
|
||||||
|
- name: Check Java formatting
|
||||||
|
run: |
|
||||||
|
JAVA_FILES=($(find android/app/src -name '*.java'))
|
||||||
|
|
||||||
|
FORMATTING_ISSUES=$(clang-format-19 --dry-run --Werror $JAVA_FILES 2>&1 || true)
|
||||||
|
|
||||||
|
if [ -n "$FORMATTING_ISSUES" ]; then
|
||||||
|
echo "$FORMATTING_ISSUES"
|
||||||
|
echo ""
|
||||||
|
echo "To fix formatting, please run:"
|
||||||
|
echo " clang-format -i <file>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
4
.github/workflows/ios-check.yaml
vendored
@@ -37,10 +37,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||||
|
|
||||||
- name: Init boost, download World map, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure XCode cache
|
- name: Configure XCode cache
|
||||||
uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.gitignore
vendored
@@ -26,6 +26,8 @@ data/bookmarks
|
|||||||
data/edits.xml
|
data/edits.xml
|
||||||
data/World.mwm
|
data/World.mwm
|
||||||
data/WorldCoasts.mwm
|
data/WorldCoasts.mwm
|
||||||
|
data/world_mwm/*
|
||||||
|
data/*_hash
|
||||||
|
|
||||||
# Compiled Python
|
# Compiled Python
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ if (APPLE AND NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android))
|
|||||||
set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden)
|
set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
execute_process(COMMAND "./configure.sh" WORKING_DIRECTORY ${OMIM_ROOT})
|
||||||
|
|
||||||
message(STATUS "Using compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
message(STATUS "Using compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
|
||||||
if (CMAKE_UNITY_BUILD)
|
if (CMAKE_UNITY_BUILD)
|
||||||
@@ -103,12 +105,29 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|||||||
elseif (${CMAKE_BUILD_TYPE} MATCHES "Rel")
|
elseif (${CMAKE_BUILD_TYPE} MATCHES "Rel")
|
||||||
add_definitions(-DRELEASE)
|
add_definitions(-DRELEASE)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
add_compile_options(-Ofast) # Also enables -ffast-math
|
add_compile_options(-Ofast $<$<CXX_COMPILER_ID:GNU>:-flto=auto>) # Also enables -ffast-math
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unknown build type: " ${CMAKE_BUILD_TYPE})
|
message(FATAL_ERROR "Unknown build type: " ${CMAKE_BUILD_TYPE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||||
|
add_compile_options(-fno-omit-frame-pointer)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Linux GCC LTO plugin fix.
|
||||||
|
if (PLATFORM_LINUX AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE MATCHES "^Rel"))
|
||||||
|
# To force errors if LTO was not enabled.
|
||||||
|
add_compile_options(-fno-fat-lto-objects)
|
||||||
|
# To fix ar and ranlib "plugin needed to handle lto object".
|
||||||
|
string(REGEX MATCH "[0-9]+" GCC_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION})
|
||||||
|
file(GLOB_RECURSE plugin /usr/lib/gcc/*/${GCC_MAJOR_VERSION}/liblto_plugin.so)
|
||||||
|
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||||
|
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||||
|
|
||||||
if (PLATFORM_LINUX OR PLATFORM_ANDROID)
|
if (PLATFORM_LINUX OR PLATFORM_ANDROID)
|
||||||
@@ -242,11 +261,15 @@ if (PLATFORM_DESKTOP)
|
|||||||
add_subdirectory(qt)
|
add_subdirectory(qt)
|
||||||
omim_add_tool_subdirectory(skin_generator)
|
omim_add_tool_subdirectory(skin_generator)
|
||||||
endif()
|
endif()
|
||||||
|
if (GENERATOR_TOOL)
|
||||||
|
add_compile_options(-march=native -mtune=native)
|
||||||
|
message(STATUS "target CPU optimizations enabled, produced binaries will NOT work on a different CPU")
|
||||||
|
endif()
|
||||||
add_subdirectory(dev_sandbox)
|
add_subdirectory(dev_sandbox)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
omim_add_test_subdirectory(qt_tstfrm)
|
omim_add_test_subdirectory(qt_tstfrm)
|
||||||
|
|
||||||
if (PLATFORM_ANDROID)
|
if (PLATFORM_ANDROID)
|
||||||
add_subdirectory(android/app/src/main/cpp)
|
add_subdirectory(android/sdk/src/main/cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ A community-led free & open source maps app based on [OpenStreetMap](https://www
|
|||||||
<a href="https://f-droid.org/en/packages/app.comaps.fdroid/">
|
<a href="https://f-droid.org/en/packages/app.comaps.fdroid/">
|
||||||
<img src="docs/badges/fdroid.png" alt="F-Droid" width="160"/>
|
<img src="docs/badges/fdroid.png" alt="F-Droid" width="160"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://codeberg.org/comaps/comaps">
|
||||||
|
<img src="docs/badges/obtainium.png" alt="Obtainium" width="160"/>
|
||||||
|
</a>
|
||||||
<a href="https://codeberg.org/comaps/comaps/releases">
|
<a href="https://codeberg.org/comaps/comaps/releases">
|
||||||
<img src="docs/badges/codeberg.png" alt="Codeberg" width="160"/>
|
<img src="docs/badges/codeberg.png" alt="Codeberg" width="160"/>
|
||||||
</a>
|
</a>
|
||||||
@@ -160,4 +163,4 @@ MD5: 9cce0ffea281dc2f0e0a154d6d2e281e
|
|||||||
## ⚖️ License
|
## ⚖️ License
|
||||||
|
|
||||||
Licensed under the Apache License 2.0.
|
Licensed under the Apache License 2.0.
|
||||||
See [LICENSE](LICENSE), [NOTICE](NOTICE), and [data/copyright.html](data/copyright.html).
|
See [LICENSE](LICENSE), [NOTICE](NOTICE), and [data/copyright.html](data/copyright.html).
|
||||||
|
|||||||
@@ -18,5 +18,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
libxi-dev \
|
libxi-dev \
|
||||||
optipng
|
optipng
|
||||||
WORKDIR /root/comaps
|
WORKDIR /root/comaps
|
||||||
RUN ./configure.sh
|
|
||||||
CMD ./gradlew -Parm64 assembleFdroidDebug
|
CMD ./gradlew -Parm64 assembleFdroidDebug
|
||||||
|
|||||||
@@ -15,43 +15,17 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url 'https://www.jitpack.io' } // MPAndroidChart
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'com.github.triplet.play'
|
apply plugin: 'com.github.triplet.play'
|
||||||
apply plugin: 'ru.cian.huawei-publish-gradle-plugin'
|
apply plugin: 'ru.cian.huawei-publish-gradle-plugin'
|
||||||
|
|
||||||
def run(cmd) {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine = cmd
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
import com.github.triplet.gradle.androidpublisher.ReleaseStatus
|
import com.github.triplet.gradle.androidpublisher.ReleaseStatus
|
||||||
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
|
||||||
|
|
||||||
def getVersion() {
|
|
||||||
def isWindows = DefaultNativePlatform.getCurrentOperatingSystem().isWindows()
|
|
||||||
def bash = isWindows ? 'C:\\Program Files\\Git\\bin\\bash.exe' : 'bash'
|
|
||||||
def versionCode = Integer.parseInt(run([bash, '../../tools/unix/version.sh', 'android_code']).trim())
|
|
||||||
def versionName = run([bash, '../../tools/unix/version.sh', 'android_name']).trim()
|
|
||||||
return new Tuple2(versionCode, versionName)
|
|
||||||
}
|
|
||||||
|
|
||||||
def getCommitMessage() {
|
def getCommitMessage() {
|
||||||
return run(['git', '--no-pager', 'show', '-s', '--format=%s%n%n%b', 'HEAD']).trim()
|
return run(['git', '--no-pager', 'show', '-s', '--format=%s%n%n%b', 'HEAD']).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
def osName = System.properties['os.name'].toLowerCase()
|
|
||||||
|
|
||||||
project.ext.appId = 'app.comaps'
|
project.ext.appId = 'app.comaps'
|
||||||
project.ext.appName = 'CoMaps'
|
project.ext.appName = 'CoMaps'
|
||||||
|
|
||||||
@@ -63,7 +37,10 @@ project.ext.appName = 'CoMaps'
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'app.organicmaps'
|
namespace = 'app.organicmaps'
|
||||||
|
|
||||||
|
// TODO: it should not be here, but in sdk/build.gradle. But for some reason it should be specified here as well.
|
||||||
|
ndkVersion = '28.2.13676358'
|
||||||
|
|
||||||
dependenciesInfo {
|
dependenciesInfo {
|
||||||
// Disables dependency metadata when building APKs (for IzzyOnDroid/F-Droid)
|
// Disables dependency metadata when building APKs (for IzzyOnDroid/F-Droid)
|
||||||
@@ -76,80 +53,32 @@ android {
|
|||||||
dataBinding = true
|
dataBinding = true
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
}
|
}
|
||||||
// All properties are read from gradle.properties file
|
|
||||||
compileSdk propCompileSdkVersion.toInteger()
|
|
||||||
|
|
||||||
ndkVersion '27.2.12479018'
|
// Users are complaining that the app should be re-downloaded from the Play Store after changing the language.
|
||||||
|
bundle {
|
||||||
|
language {
|
||||||
|
enableSplit = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// All properties are read from gradle.properties file
|
||||||
|
compileSdk = propCompileSdkVersion.toInteger()
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// Default package name is taken from the manifest and should be app.comaps
|
versionCode = rootProject.ext.versionCode
|
||||||
def ver = getVersion()
|
versionName = rootProject.ext.versionName
|
||||||
versionCode = ver.V1
|
|
||||||
versionName = ver.V2
|
|
||||||
println('Version: ' + versionName)
|
println('Version: ' + versionName)
|
||||||
println('VersionCode: ' + versionCode)
|
println('VersionCode: ' + versionCode)
|
||||||
minSdk propMinSdkVersion.toInteger()
|
minSdk = propMinSdkVersion.toInteger()
|
||||||
targetSdk propTargetSdkVersion.toInteger()
|
targetSdk = propTargetSdkVersion.toInteger()
|
||||||
applicationId project.ext.appId
|
applicationId project.ext.appId
|
||||||
buildConfigField 'String', 'SUPPORT_MAIL', '"android@comaps.app"'
|
buildConfigField 'String', 'SUPPORT_MAIL', '"android@comaps.app"'
|
||||||
// Should be customized in flavors.
|
// Should be customized in flavors.
|
||||||
buildConfigField 'String', 'REVIEW_URL', '""'
|
buildConfigField 'String', 'REVIEW_URL', '""'
|
||||||
|
|
||||||
externalNativeBuild {
|
base.archivesName = appName.replaceAll('\\s','') + '-' + defaultConfig.versionCode
|
||||||
def pchFlag = 'OFF'
|
|
||||||
if (project.hasProperty('pch')) pchFlag = 'ON'
|
|
||||||
|
|
||||||
def njobs = ''
|
ndk.debugSymbolLevel = 'full'
|
||||||
if (project.hasProperty('njobs')) njobs = project.getProperty('njobs')
|
|
||||||
|
|
||||||
def enableVulkanDiagnostics = 'OFF'
|
|
||||||
if (project.hasProperty('enableVulkanDiagnostics')) {
|
|
||||||
enableVulkanDiagnostics = project.getProperty('enableVulkanDiagnostics')
|
|
||||||
}
|
|
||||||
|
|
||||||
def enableTrace = 'OFF'
|
|
||||||
if (project.hasProperty('enableTrace')) {
|
|
||||||
enableTrace = project.getProperty('enableTrace')
|
|
||||||
}
|
|
||||||
|
|
||||||
cmake {
|
|
||||||
cppFlags '-fexceptions', '-frtti'
|
|
||||||
// There is no sense to enable sections without gcc's --gc-sections flag.
|
|
||||||
cFlags '-fno-function-sections', '-fno-data-sections',
|
|
||||||
'-Wno-extern-c-compat'
|
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static',
|
|
||||||
"-DOS=$osName", '-DSKIP_TESTS=ON', '-DSKIP_TOOLS=ON', "-DUSE_PCH=$pchFlag",
|
|
||||||
"-DNJOBS=$njobs", "-DENABLE_VULKAN_DIAGNOSTICS=$enableVulkanDiagnostics",
|
|
||||||
"-DENABLE_TRACE=$enableTrace"
|
|
||||||
targets 'organicmaps'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use, for example, -Parm32 gradle parameter to build only for armeabi-v7a.
|
|
||||||
ndk {
|
|
||||||
abiFilters = new HashSet<>()
|
|
||||||
if (project.hasProperty('arm32') || project.hasProperty('armeabi-v7a')) {
|
|
||||||
abiFilters.add('armeabi-v7a')
|
|
||||||
}
|
|
||||||
if (project.hasProperty('arm64') || project.hasProperty('arm64-v8a')) {
|
|
||||||
abiFilters.add('arm64-v8a')
|
|
||||||
}
|
|
||||||
if (project.hasProperty('x86')) {
|
|
||||||
abiFilters.add('x86')
|
|
||||||
}
|
|
||||||
if (project.hasProperty('x86_64') || project.hasProperty('x64')) {
|
|
||||||
abiFilters.add('x86_64')
|
|
||||||
}
|
|
||||||
if (abiFilters.isEmpty()) {
|
|
||||||
abiFilters.add('armeabi-v7a')
|
|
||||||
abiFilters.add('arm64-v8a')
|
|
||||||
// For the emulator, chromebooks and some Intel Atom devices.
|
|
||||||
abiFilters.add('x86_64')
|
|
||||||
}
|
|
||||||
println('Building for ' + abiFilters + ' archs.')
|
|
||||||
}
|
|
||||||
|
|
||||||
setProperty('archivesBaseName', appName.replaceAll('\\s','') + '-' + defaultConfig.versionCode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions += 'default'
|
flavorDimensions += 'default'
|
||||||
@@ -199,10 +128,10 @@ android {
|
|||||||
splits.abi {
|
splits.abi {
|
||||||
boolean enabled = project.hasProperty('splitApk')
|
boolean enabled = project.hasProperty('splitApk')
|
||||||
println ('Create separate apks: ' + enabled)
|
println ('Create separate apks: ' + enabled)
|
||||||
enable enabled
|
enable = enabled
|
||||||
reset()
|
reset()
|
||||||
include 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
include 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
||||||
universalApk true
|
universalApk = true
|
||||||
}
|
}
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
@@ -215,7 +144,7 @@ android {
|
|||||||
disable 'CustomSplashScreen'
|
disable 'CustomSplashScreen'
|
||||||
// https://github.com/organicmaps/organicmaps/issues/3610
|
// https://github.com/organicmaps/organicmaps/issues/3610
|
||||||
disable 'InsecureBaseConfiguration'
|
disable 'InsecureBaseConfiguration'
|
||||||
abortOnError true
|
abortOnError = true
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
@@ -274,33 +203,29 @@ android {
|
|||||||
debug {
|
debug {
|
||||||
applicationIdSuffix '.debug' // Allows to install debug and release builds together
|
applicationIdSuffix '.debug' // Allows to install debug and release builds together
|
||||||
versionNameSuffix '-debug'
|
versionNameSuffix '-debug'
|
||||||
jniDebuggable true // Enable jni debug build
|
|
||||||
zipAlignEnabled true
|
zipAlignEnabled true
|
||||||
signingConfig signingConfigs.debug
|
signingConfig = signingConfigs.debug
|
||||||
resValue 'string', 'app_name', 'CoMaps Debug'
|
resValue 'string', 'app_name', 'CoMaps Debug'
|
||||||
// Do not generate separate debug symbols for debug apps, because we don't distribute them.
|
|
||||||
ndk.debugSymbolLevel = 'none'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
if (taskName.contains('release')) {
|
if (taskName.contains('release')) {
|
||||||
if (secureReleasePropertiesFileExists) {
|
if (secureReleasePropertiesFileExists) {
|
||||||
println('Using RELEASE signing keys from secure.properties.release')
|
println('Using RELEASE signing keys from secure.properties.release')
|
||||||
signingConfig signingConfigs.release
|
signingConfig = signingConfigs.release
|
||||||
} else {
|
} else {
|
||||||
println('NO RELEASE signing keys found')
|
println('NO RELEASE signing keys found')
|
||||||
println('Using DEBUG signing keys')
|
println('Using DEBUG signing keys')
|
||||||
signingConfig signingConfigs.debug
|
signingConfig = signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources = true
|
||||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||||
// To learn more, go to the documentation section about R8 configuration files.
|
// To learn more, go to the documentation section about R8 configuration files.
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
resValue 'string', 'app_name', project.ext.appName
|
resValue 'string', 'app_name', project.ext.appName
|
||||||
// Full size symbols are too big for Google, 217mb aab vs 95mb.
|
|
||||||
ndk.debugSymbolLevel = 'symbol_table'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
beta {
|
beta {
|
||||||
@@ -309,37 +234,27 @@ android {
|
|||||||
if (taskName.contains('beta')) {
|
if (taskName.contains('beta')) {
|
||||||
if (secureTestPropertiesFileExists) {
|
if (secureTestPropertiesFileExists) {
|
||||||
println('Using TEST signing keys from secure.properties.test')
|
println('Using TEST signing keys from secure.properties.test')
|
||||||
signingConfig signingConfigs.test
|
signingConfig = signingConfigs.test
|
||||||
} else {
|
} else {
|
||||||
println('NO TEST signing keys found')
|
println('NO TEST signing keys found')
|
||||||
println('Using DEBUG signing keys')
|
println('Using DEBUG signing keys')
|
||||||
signingConfig signingConfigs.debug
|
signingConfig = signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources = true
|
||||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||||
// To learn more, go to the documentation section about R8 configuration files.
|
// To learn more, go to the documentation section about R8 configuration files.
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
matchingFallbacks = ['release'] // use dependencies of "release" build type
|
matchingFallbacks = ['release'] // use dependencies of "release" build type
|
||||||
resValue 'string', 'app_name', 'CoMaps Test'
|
resValue 'string', 'app_name', 'CoMaps Test'
|
||||||
// Full size symbols are too big for Google, 217mb aab vs 95mb.
|
|
||||||
ndk.debugSymbolLevel = 'symbol_table'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
version '3.22.1+'
|
|
||||||
buildStagingDirectory './nativeOutputs'
|
|
||||||
path '../../CMakeLists.txt'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't compress these extensions in assets/ because our random FileReader can't read zip-compressed files from apk.
|
// We don't compress these extensions in assets/ because our random FileReader can't read zip-compressed files from apk.
|
||||||
// TODO: Load all minor files via separate call to ReadAsString which can correctly handle compressed files in zip containers.
|
// TODO: Load all minor files via separate call to ReadAsString which can correctly handle compressed files in zip containers.
|
||||||
androidResources {
|
androidResources {
|
||||||
ignoreAssetsPattern '!.svn:!.git:!.DS_Store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
ignoreAssetsPattern = '!.svn:!.git:!.DS_Store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||||
noCompress = ['txt', 'bin', 'html', 'png', 'json', 'mwm', 'ttf', 'sdf', 'ui', 'config', 'csv', 'spv', 'obj']
|
noCompress = ['txt', 'bin', 'html', 'png', 'json', 'mwm', 'ttf', 'sdf', 'ui', 'config', 'csv', 'spv', 'obj']
|
||||||
localeFilters += [
|
localeFilters += [
|
||||||
"af",
|
"af",
|
||||||
@@ -396,7 +311,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled = true
|
||||||
|
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
@@ -404,6 +319,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation project(':sdk')
|
||||||
|
|
||||||
coreLibraryDesugaring libs.android.tools.desugar
|
coreLibraryDesugaring libs.android.tools.desugar
|
||||||
|
|
||||||
// Google Play Location Services
|
// Google Play Location Services
|
||||||
@@ -449,10 +366,6 @@ dependencies {
|
|||||||
testImplementation libs.mockito.core
|
testImplementation libs.mockito.core
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
|
|
||||||
}
|
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
def authorityValue = variant.applicationId + ".provider"
|
def authorityValue = variant.applicationId + ".provider"
|
||||||
def authority = "\"" + authorityValue + "\""
|
def authority = "\"" + authorityValue + "\""
|
||||||
@@ -500,3 +413,7 @@ huaweiPublish {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
|
||||||
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 97 KiB |
@@ -1 +0,0 @@
|
|||||||
../../../../google/java/app/organicmaps/location
|
|
||||||
1
android/app/src/fdroid/java/app/organicmaps/sdk/location
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../../google/java/app/organicmaps/sdk/location
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
সহজ মানচিত্র নেভিগেশন - আপনার যাত্রা সম্পর্কে আরও জানুন - সম্প্রদায় কর্তৃক পরিচালিত
|
||||||
1
android/app/src/fdroid/play/listings/bn/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
কোম্যাপস - অফলাইনে হাইকিং, সাইকেলিং এবং ড্রাইভিং করুন গোপনীয়তা সহ
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Navegació intuïtiva - Descobreix el teu camí - El poder de la comunitat
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
Una aplicación de mapas gratuita y de código abierto liderada por la comunidad, basada en los datos de OpenStreetMap y reforzada con un compromiso con la transparencia, la privacidad y la ausencia de fines de lucro. CoMaps es un fork o derivado de Organic Maps, que a su vez es un fork de Maps.ME.
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Lee más sobre los motivos del proyecto y su dirección en <b><i>codeberg.org/comaps</i></b>.
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Únete allí a la comunidad y ayuda a crear la mejor app de mapas
|
||||||
|
|
||||||
|
• Usa la aplicación y corre la voz sobre ella
|
||||||
|
|
||||||
|
• Envía comentarios y reporta problemas
|
||||||
|
|
||||||
|
• Actualiza los datos del mapa en la app o en el sitio web de OpenStreetMap
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
‣ <b>Enfocada en el uso sin conexión</b>: Planifica y navega tus viajes sin necesidad de conexión móvil, busca puntos de paso en rutas remotas, etc. Todas las funciones están diseñadas para funcionar sin conexión.
|
||||||
|
|
||||||
|
‣ <b>Respeta tu Privacidad</b>: La app está diseñada pensando en tu privacidad: no identifica personas, no rastrea y no recoge datos personales. Sin publicidad.
|
||||||
|
|
||||||
|
‣ <b>Sencilla y Pulida</b>: funciones esenciales fáciles de usar que simplemente funcionan.
|
||||||
|
|
||||||
|
‣ <b>Ahorra Batería y Espacio</b>: No consume la batería como otras apps de navegación. Los mapas compactos ahorran espacio valioso en tu teléfono.
|
||||||
|
|
||||||
|
‣ <b>Gratuita y Creada por la Comunidad</b>: Personas como tú ayudaron a construir la app añadiendo lugares a OpenStreetMap, probando funciones, dando opiniones y contribuyendo con desarrollo o financiación.
|
||||||
|
|
||||||
|
‣ <b>Toma de decisiones y finanzas abiertas y transparentes, sin ánimo de lucro y completamente de código abierto.</b>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<b>Funciones Principales</b>:
|
||||||
|
|
||||||
|
• Mapas detallados descargables con lugares que no aparecen en Google Maps
|
||||||
|
|
||||||
|
• Modo exterior con rutas de senderismo destacadas, campings, fuentes de agua, picos, curvas de nivel, etc.
|
||||||
|
|
||||||
|
• Caminos peatonales y carriles bici
|
||||||
|
|
||||||
|
• Puntos de interés como restaurantes, gasolineras, hoteles, tiendas, lugares turísticos y muchos más
|
||||||
|
|
||||||
|
• Búsqueda por nombre, dirección o categoría de punto de interés
|
||||||
|
|
||||||
|
• Navegación con indicaciones por voz para caminar, ir en bici o conducir
|
||||||
|
|
||||||
|
• Guarda tus lugares favoritos con un solo toque
|
||||||
|
|
||||||
|
• Artículos de Wikipedia sin conexión
|
||||||
|
|
||||||
|
• Capa de transporte subterráneo y rutas
|
||||||
|
|
||||||
|
• Grabación de rutas
|
||||||
|
|
||||||
|
• Exporta e importa favoritos y rutas en formatos KML, KMZ y GPX
|
||||||
|
|
||||||
|
• Modo oscuro para usar de noche
|
||||||
|
|
||||||
|
• Mejora los datos del mapa para todos usando un editor básico integrado
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<b>La Libertad Está Aquí</b>
|
||||||
|
|
||||||
|
Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad.
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
• se muestra el estado de horarios de apertura al seleccionar un POI
|
• se muestra el estado de horarios de apertura al seleccionar un POI
|
||||||
• se dividen los humedales en tipos distintos
|
• se dividen los humedales en tipos distintos
|
||||||
• se actualiza la vegetación y otros colores del mapa, así como otros iconos
|
• se actualiza la vegetación y otros colores del mapa, así como otros iconos
|
||||||
• exteriores: líneas de contorno de altitud más gruesas
|
• exteriores: líneas de contorno de altitud más gruesas
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Navegación de mapa fácil - Descubre más en tu camino - Creado por la comunidad
|
||||||
1
android/app/src/fdroid/play/listings/es-ES/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Senderismo, ciclismo y conducción offline
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Navigation facile del mappa – Discoperi tu viage – Alimentate per le communitate
|
||||||
@@ -6,4 +6,4 @@ Apresentamos o logo do CoMaps!
|
|||||||
• Exibição de horário de funcionamento ao selecionar um ponto de interesse
|
• Exibição de horário de funcionamento ao selecionar um ponto de interesse
|
||||||
• Divididas áreas úmidas em vários tipos distintos
|
• Divididas áreas úmidas em vários tipos distintos
|
||||||
• Atualizada cores/ícones para vegetação e outros elementos
|
• Atualizada cores/ícones para vegetação e outros elementos
|
||||||
• Ar livre: curvas de nível de altitude mais destacadas
|
• Ar livre: curvas de nível de altitude mais destacadas
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Mapas com Privacidade
|
CoMaps - Mapas e Navegação Offline com Privacidade
|
||||||
|
|||||||
@@ -1,148 +0,0 @@
|
|||||||
package app.organicmaps.location;
|
|
||||||
|
|
||||||
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
|
|
||||||
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
|
|
||||||
import static app.organicmaps.util.concurrency.UiThread.runLater;
|
|
||||||
|
|
||||||
import android.app.PendingIntent;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.location.Location;
|
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.RequiresPermission;
|
|
||||||
|
|
||||||
import com.google.android.gms.common.api.ApiException;
|
|
||||||
import com.google.android.gms.common.api.ResolvableApiException;
|
|
||||||
import com.google.android.gms.location.FusedLocationProviderClient;
|
|
||||||
import com.google.android.gms.location.Granularity;
|
|
||||||
import com.google.android.gms.location.LocationAvailability;
|
|
||||||
import com.google.android.gms.location.LocationCallback;
|
|
||||||
import com.google.android.gms.location.LocationRequest;
|
|
||||||
import com.google.android.gms.location.LocationResult;
|
|
||||||
import com.google.android.gms.location.LocationServices;
|
|
||||||
import com.google.android.gms.location.LocationSettingsRequest;
|
|
||||||
import com.google.android.gms.location.LocationSettingsStatusCodes;
|
|
||||||
import com.google.android.gms.location.Priority;
|
|
||||||
import com.google.android.gms.location.SettingsClient;
|
|
||||||
|
|
||||||
import app.organicmaps.util.LocationUtils;
|
|
||||||
import app.organicmaps.util.log.Logger;
|
|
||||||
|
|
||||||
class GoogleFusedLocationProvider extends BaseLocationProvider
|
|
||||||
{
|
|
||||||
private static final String TAG = GoogleFusedLocationProvider.class.getSimpleName();
|
|
||||||
@NonNull
|
|
||||||
private final FusedLocationProviderClient mFusedLocationClient;
|
|
||||||
@NonNull
|
|
||||||
private final SettingsClient mSettingsClient;
|
|
||||||
@NonNull
|
|
||||||
private final Context mContext;
|
|
||||||
|
|
||||||
private class GoogleLocationCallback extends LocationCallback
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onLocationResult(@NonNull LocationResult result)
|
|
||||||
{
|
|
||||||
final Location location = result.getLastLocation();
|
|
||||||
if (location != null)
|
|
||||||
mListener.onLocationChanged(location);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLocationAvailability(@NonNull LocationAvailability availability)
|
|
||||||
{
|
|
||||||
Logger.w(TAG, "isLocationAvailable = " + availability.isLocationAvailable());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final GoogleLocationCallback mCallback = new GoogleLocationCallback();
|
|
||||||
|
|
||||||
GoogleFusedLocationProvider(@NonNull Context context, @NonNull BaseLocationProvider.Listener listener)
|
|
||||||
{
|
|
||||||
super(listener);
|
|
||||||
mFusedLocationClient = LocationServices.getFusedLocationProviderClient(context);
|
|
||||||
mSettingsClient = LocationServices.getSettingsClient(context);
|
|
||||||
mContext = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
|
||||||
public void start(long interval)
|
|
||||||
{
|
|
||||||
Logger.d(TAG);
|
|
||||||
|
|
||||||
final LocationRequest locationRequest = new LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, interval)
|
|
||||||
// Wait a few seconds for accurate locations initially, when accurate locations could not be computed on the device immediately.
|
|
||||||
// https://github.com/organicmaps/organicmaps/issues/2149
|
|
||||||
.setWaitForAccurateLocation(true)
|
|
||||||
// The desired location granularity should correspond to the client permission level. The client will be
|
|
||||||
// delivered fine locations while it has the Manifest.permission.ACCESS_FINE_LOCATION permission, coarse
|
|
||||||
// locations while it has only the Manifest.permission.ACCESS_COARSE_LOCATION permission, and no location
|
|
||||||
// if it lacks either.
|
|
||||||
.setGranularity(Granularity.GRANULARITY_PERMISSION_LEVEL)
|
|
||||||
// Sets the maximum age of an initial historical location delivered for this request.
|
|
||||||
.setMaxUpdateAgeMillis(60 * 60 * 1000L) // 1 hour
|
|
||||||
.build();
|
|
||||||
|
|
||||||
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
|
|
||||||
builder.addLocationRequest(locationRequest);
|
|
||||||
builder.setAlwaysShow(true); // improves the wording/appearance of the dialog
|
|
||||||
final LocationSettingsRequest locationSettingsRequest = builder.build();
|
|
||||||
|
|
||||||
mSettingsClient.checkLocationSettings(locationSettingsRequest).addOnSuccessListener(locationSettingsResponse -> {
|
|
||||||
Logger.d(TAG, "Service is available");
|
|
||||||
mFusedLocationClient.requestLocationUpdates(locationRequest, mCallback, Looper.myLooper());
|
|
||||||
}).addOnFailureListener(e -> {
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int statusCode = ((ApiException) e).getStatusCode();
|
|
||||||
if (statusCode == LocationSettingsStatusCodes.RESOLUTION_REQUIRED)
|
|
||||||
{
|
|
||||||
// This case happens if at least one of the following system settings is off:
|
|
||||||
// 1. Location Services a.k.a GPS;
|
|
||||||
// 2. Google Location Accuracy a.k.a High Accuracy;
|
|
||||||
// 3. Both Wi-Fi && Mobile Data together (needed for 2).
|
|
||||||
//
|
|
||||||
// PendingIntent below will show a special Google "For better experience... enable (1) and/or (2) and/or (3)"
|
|
||||||
// dialog. This system dialog can change system settings if "Yes" is pressed. We can't do it from our app.
|
|
||||||
// However, we don't want to annoy a user who disabled (2) or (3) intentionally. GPS (1) is mandatory to
|
|
||||||
// continue, while (2) and (3) are not dealbreakers here.
|
|
||||||
//
|
|
||||||
// See https://github.com/organicmaps/organicmaps/issues/3846
|
|
||||||
//
|
|
||||||
if (LocationUtils.areLocationServicesTurnedOn(mContext))
|
|
||||||
{
|
|
||||||
Logger.d(TAG, "Don't show 'location resolution' dialog because location services are already on");
|
|
||||||
mFusedLocationClient.requestLocationUpdates(locationRequest, mCallback, Looper.myLooper());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Logger.d(TAG, "Requesting 'location resolution' dialog");
|
|
||||||
final ResolvableApiException resolvable = (ResolvableApiException) e;
|
|
||||||
final PendingIntent pendingIntent = resolvable.getResolution();
|
|
||||||
// Call this callback in the next event loop to allow LocationHelper::start() to finish.
|
|
||||||
runLater(() -> mListener.onLocationResolutionRequired(pendingIntent));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ClassCastException ex)
|
|
||||||
{
|
|
||||||
// Ignore, should be an impossible error.
|
|
||||||
// https://developers.google.com/android/reference/com/google/android/gms/location/SettingsClient
|
|
||||||
Logger.e(TAG, "An error that should be impossible: " + ex);
|
|
||||||
}
|
|
||||||
// Location settings are not satisfied. However, we have no way to fix the
|
|
||||||
// settings so we won't show the dialog.
|
|
||||||
Logger.e(TAG, "Service is not available: " + e);
|
|
||||||
// Call this callback in the next event loop to allow LocationHelper::start() to finish.
|
|
||||||
runLater(mListener::onFusedLocationUnsupported);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void stop()
|
|
||||||
{
|
|
||||||
Logger.d(TAG);
|
|
||||||
mFusedLocationClient.removeLocationUpdates(mCallback);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
package app.organicmaps.sdk.location;
|
||||||
|
|
||||||
|
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
|
||||||
|
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
|
||||||
|
import static app.organicmaps.sdk.util.concurrency.UiThread.runLater;
|
||||||
|
|
||||||
|
import android.app.PendingIntent;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.location.Location;
|
||||||
|
import android.os.Looper;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.RequiresPermission;
|
||||||
|
import app.organicmaps.sdk.util.LocationUtils;
|
||||||
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
|
import com.google.android.gms.common.api.ApiException;
|
||||||
|
import com.google.android.gms.common.api.ResolvableApiException;
|
||||||
|
import com.google.android.gms.location.FusedLocationProviderClient;
|
||||||
|
import com.google.android.gms.location.Granularity;
|
||||||
|
import com.google.android.gms.location.LocationAvailability;
|
||||||
|
import com.google.android.gms.location.LocationCallback;
|
||||||
|
import com.google.android.gms.location.LocationRequest;
|
||||||
|
import com.google.android.gms.location.LocationResult;
|
||||||
|
import com.google.android.gms.location.LocationServices;
|
||||||
|
import com.google.android.gms.location.LocationSettingsRequest;
|
||||||
|
import com.google.android.gms.location.LocationSettingsStatusCodes;
|
||||||
|
import com.google.android.gms.location.Priority;
|
||||||
|
import com.google.android.gms.location.SettingsClient;
|
||||||
|
|
||||||
|
class GoogleFusedLocationProvider extends BaseLocationProvider
|
||||||
|
{
|
||||||
|
private static final String TAG = GoogleFusedLocationProvider.class.getSimpleName();
|
||||||
|
@NonNull
|
||||||
|
private final FusedLocationProviderClient mFusedLocationClient;
|
||||||
|
@NonNull
|
||||||
|
private final SettingsClient mSettingsClient;
|
||||||
|
@NonNull
|
||||||
|
private final Context mContext;
|
||||||
|
|
||||||
|
private class GoogleLocationCallback extends LocationCallback
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onLocationResult(@NonNull LocationResult result)
|
||||||
|
{
|
||||||
|
final Location location = result.getLastLocation();
|
||||||
|
if (location != null)
|
||||||
|
mListener.onLocationChanged(location);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocationAvailability(@NonNull LocationAvailability availability)
|
||||||
|
{
|
||||||
|
Logger.w(TAG, "isLocationAvailable = " + availability.isLocationAvailable());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private final GoogleLocationCallback mCallback = new GoogleLocationCallback();
|
||||||
|
|
||||||
|
GoogleFusedLocationProvider(@NonNull Context context, @NonNull BaseLocationProvider.Listener listener)
|
||||||
|
{
|
||||||
|
super(listener);
|
||||||
|
mFusedLocationClient = LocationServices.getFusedLocationProviderClient(context);
|
||||||
|
mSettingsClient = LocationServices.getSettingsClient(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||||
|
public void start(long interval)
|
||||||
|
{
|
||||||
|
Logger.d(TAG);
|
||||||
|
|
||||||
|
final LocationRequest locationRequest =
|
||||||
|
new LocationRequest
|
||||||
|
.Builder(Priority.PRIORITY_HIGH_ACCURACY, interval)
|
||||||
|
// Wait a few seconds for accurate locations initially, when accurate locations could not be computed on the
|
||||||
|
// device immediately. https://github.com/organicmaps/organicmaps/issues/2149
|
||||||
|
.setWaitForAccurateLocation(true)
|
||||||
|
// The desired location granularity should correspond to the client permission level. The client will be
|
||||||
|
// delivered fine locations while it has the Manifest.permission.ACCESS_FINE_LOCATION permission, coarse
|
||||||
|
// locations while it has only the Manifest.permission.ACCESS_COARSE_LOCATION permission, and no location
|
||||||
|
// if it lacks either.
|
||||||
|
.setGranularity(Granularity.GRANULARITY_PERMISSION_LEVEL)
|
||||||
|
// Sets the maximum age of an initial historical location delivered for this request.
|
||||||
|
.setMaxUpdateAgeMillis(60 * 60 * 1000L) // 1 hour
|
||||||
|
.build();
|
||||||
|
|
||||||
|
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
|
||||||
|
builder.addLocationRequest(locationRequest);
|
||||||
|
builder.setAlwaysShow(true); // improves the wording/appearance of the dialog
|
||||||
|
final LocationSettingsRequest locationSettingsRequest = builder.build();
|
||||||
|
|
||||||
|
mSettingsClient.checkLocationSettings(locationSettingsRequest)
|
||||||
|
.addOnSuccessListener(locationSettingsResponse -> {
|
||||||
|
Logger.d(TAG, "Service is available");
|
||||||
|
mFusedLocationClient.requestLocationUpdates(locationRequest, mCallback, Looper.myLooper());
|
||||||
|
})
|
||||||
|
.addOnFailureListener(e -> {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int statusCode = ((ApiException) e).getStatusCode();
|
||||||
|
if (statusCode == LocationSettingsStatusCodes.RESOLUTION_REQUIRED)
|
||||||
|
{
|
||||||
|
// This case happens if at least one of the following system settings is off:
|
||||||
|
// 1. Location Services a.k.a GPS;
|
||||||
|
// 2. Google Location Accuracy a.k.a High Accuracy;
|
||||||
|
// 3. Both Wi-Fi && Mobile Data together (needed for 2).
|
||||||
|
//
|
||||||
|
// PendingIntent below will show a special Google "For better experience... enable (1) and/or (2) and/or
|
||||||
|
// (3)" dialog. This system dialog can change system settings if "Yes" is pressed. We can't do it from our
|
||||||
|
// app. However, we don't want to annoy a user who disabled (2) or (3) intentionally. GPS (1) is mandatory
|
||||||
|
// to continue, while (2) and (3) are not dealbreakers here.
|
||||||
|
//
|
||||||
|
// See https://github.com/organicmaps/organicmaps/issues/3846
|
||||||
|
//
|
||||||
|
if (LocationUtils.areLocationServicesTurnedOn(mContext))
|
||||||
|
{
|
||||||
|
Logger.d(TAG, "Don't show 'location resolution' dialog because location services are already on");
|
||||||
|
mFusedLocationClient.requestLocationUpdates(locationRequest, mCallback, Looper.myLooper());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Logger.d(TAG, "Requesting 'location resolution' dialog");
|
||||||
|
final ResolvableApiException resolvable = (ResolvableApiException) e;
|
||||||
|
final PendingIntent pendingIntent = resolvable.getResolution();
|
||||||
|
// Call this callback in the next event loop to allow LocationHelper::start() to finish.
|
||||||
|
runLater(() -> mListener.onLocationResolutionRequired(pendingIntent));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ClassCastException ex)
|
||||||
|
{
|
||||||
|
// Ignore, should be an impossible error.
|
||||||
|
// https://developers.google.com/android/reference/com/google/android/gms/location/SettingsClient
|
||||||
|
Logger.e(TAG, "An error that should be impossible: " + ex);
|
||||||
|
}
|
||||||
|
// Location settings are not satisfied. However, we have no way to fix the
|
||||||
|
// settings so we won't show the dialog.
|
||||||
|
Logger.e(TAG, "Service is not available: " + e);
|
||||||
|
// Call this callback in the next event loop to allow LocationHelper::start() to finish.
|
||||||
|
runLater(mListener::onFusedLocationUnsupported);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void stop()
|
||||||
|
{
|
||||||
|
Logger.d(TAG);
|
||||||
|
mFusedLocationClient.removeLocationUpdates(mCallback);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
package app.organicmaps.location;
|
package app.organicmaps.sdk.location;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import app.organicmaps.sdk.util.Config;
|
||||||
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
import com.google.android.gms.common.ConnectionResult;
|
import com.google.android.gms.common.ConnectionResult;
|
||||||
import com.google.android.gms.common.GoogleApiAvailability;
|
import com.google.android.gms.common.GoogleApiAvailability;
|
||||||
import app.organicmaps.util.Config;
|
|
||||||
import app.organicmaps.util.log.Logger;
|
|
||||||
|
|
||||||
public class LocationProviderFactory
|
public class LocationProviderFactory
|
||||||
{
|
{
|
||||||
@@ -17,7 +16,8 @@ public class LocationProviderFactory
|
|||||||
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS;
|
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BaseLocationProvider getProvider(@NonNull Context context, @NonNull BaseLocationProvider.Listener listener)
|
public static BaseLocationProvider getProvider(@NonNull Context context,
|
||||||
|
@NonNull BaseLocationProvider.Listener listener)
|
||||||
{
|
{
|
||||||
if (isGoogleLocationAvailable(context) && Config.useGoogleServices())
|
if (isGoogleLocationAvailable(context) && Config.useGoogleServices())
|
||||||
{
|
{
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
সহজ মানচিত্র নেভিগেশন - আপনার যাত্রা সম্পর্কে আরও জানুন - সম্প্রদায় কর্তৃক পরিচালিত
|
||||||
1
android/app/src/google/play/listings/bn/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - গোপনীয়তা সহ যাতায়াত
|
||||||
36
android/app/src/google/play/listings/ca/full-description.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
CoMaps és una aplicació de mapes lliure i de codi obert a càrrec de la comunitat que es basa en les dades OpenStreetMap i es fonamenta en el compromís amb la transparència i la privadesa sense ànim de lucre.
|
||||||
|
|
||||||
|
Uneix-te a la comunitat i ajuda a crear la millor aplicació de mapes.
|
||||||
|
• Fes servir l'aplicació i recomana-la.
|
||||||
|
• Dona la teva opinió i comunica qualsevol problema.
|
||||||
|
• Actualitza les dades de mapes a l'aplicació o al web d'OpenStreetMap.
|
||||||
|
|
||||||
|
<i>Els teus comentaris i les valoracions de 5 estrelles són el que més ens ajuda.</i>
|
||||||
|
|
||||||
|
‣ <b>Disseny senzill i polit</b>: funcions bàsiques i fàcils de fer servir que funcionen i punt.
|
||||||
|
‣ <b>Centrada en l'ús sense connexió</b>: planifica viatges a l'estranger i navega sense haver d'accedir a les dades mòbils o cerca punts d'interès durant rutes d'excursionisme llargues. Totes les funcions de l'aplicació s'han dissenyat perquè funcionin sense connexió.
|
||||||
|
‣ <b>Respecte per la privadesa</b>: el disseny de l'aplicació prioritza la privadesa. No t'identifica, no fa cap seguiment i no recull dades personals. A més, no té anuncis.
|
||||||
|
‣ <b>Ús eficient de la bateria i l'espai</b>: consumeix menys bateria que altres aplicacions de navegació. Els mapes compactes ocupen molt poc espai al telèfon.
|
||||||
|
‣ <b>Lliure gràcies a la comunitat</b>: aquesta aplicació s'ha desenvolupat gràcies a persones com tu que han afegit llocs a OpenStreetMap, han provat funcions, n'han aportat comentaris i hi han contribuït amb diners i esforç.
|
||||||
|
‣ <b>És un projecte obert i transparent en les seves decisions i finances. No té cap ànim de lucre i és completament de codi obert.</b>
|
||||||
|
|
||||||
|
<b>Funcions principals</b>:
|
||||||
|
• Mapes detallats que es poden baixar i inclouen llocs que no apareixen a Google Maps
|
||||||
|
• Mode exterior en què es ressalten les rutes d'excursionisme, els llocs d'acampada, les fonts d'aigua, els pics i les línies de contorn, entre altres coses
|
||||||
|
• Zones per a vianants i carrils bici
|
||||||
|
• Punts d'interès, com ara restaurants, benzineres, hotels, botigues, atraccions turístiques i molt més
|
||||||
|
• Cerques per nom, adreça o categoria de punt d'interès
|
||||||
|
• Navegació amb indicacions per veu mentre camines, vas amb bicicleta o condueixes
|
||||||
|
• Adreces d'interès perquè desis els teus llocs preferits amb un toc
|
||||||
|
• Articles de Wikipedia sense connexió
|
||||||
|
• Capa de línies de metro amb direccions
|
||||||
|
• Enregistrament d'itineraris
|
||||||
|
• Exportació i importació d'adreces d'interès i itineraris en els formats KML, KMZ i GPX
|
||||||
|
• Mode fosc per fer servir l'aplicació a la nit
|
||||||
|
• Millora de les dades de mapes per a tothom amb un editor integrat bàsic
|
||||||
|
• Compatibilitat amb Android Auto
|
||||||
|
|
||||||
|
Pots informar de problemes a l'aplicació, suggerir idees i unir-te a la comunitat al web <b><i>comaps.app</i></b>.
|
||||||
|
|
||||||
|
<b>La llibertat ha arribat</b>
|
||||||
|
Descobreix el teu camí i explora el món amb la privadesa i la comunitat com a eix central!
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Navegació intuïtiva - Descobreix el teu camí - El poder de la comunitat
|
||||||
1
android/app/src/google/play/listings/ca/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps – Navega amb privadesa
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
En fællesskabsdrevet gratis og open source-kortapp baseret på OpenStreetMap-data og forstærket med en forpligtelse til gennemsigtighed, privatliv og non-profit.
|
||||||
|
|
||||||
|
Bliv en del af fællesskabet og vær med til at skabe den bedste kortapp
|
||||||
|
• Brug appen og fortæl andre om den
|
||||||
|
• Giv feedback og rapporter problemer
|
||||||
|
• Opdater kortdata i appen eller på OpenStreetMap-webstedet
|
||||||
|
|
||||||
|
<i>Din feedback og 5-stjernede anmeldelser er den bedste støtte for os!</i>
|
||||||
|
|
||||||
|
‣ <b>Enkel og poleret</b>: væsentlige, brugervenlige funktioner, der bare virker.
|
||||||
|
‣ <b>Offline-focused</b>: Planlæg og naviger på din rejse i udlandet uden behov for mobilfordbindelse, søg efter rutepunkter, mens du er på en lang vandretur osv. Alle app-funktioner er designet til at fungere offline..
|
||||||
|
‣ <b>Respekt for privatlivets fred</b>: Appen er designet med fokus på privatlivets fred – den identificerer ikke personer, sporer ikke og indsamler ikke personlige oplysninger. Annoncefri.
|
||||||
|
‣ <b>Sparer på batteriet og plads</b>: Dræner ikke dit batteri som andre navigationsapps. Kompakte kort sparer værdifuld plads på din telefon.
|
||||||
|
‣ <b>Gratis og udviklet af fællesskabet</b>: Folk som dig har været med til at udvikle appen ved at tilføje steder til OpenStreetMap, teste og give feedback på funktioner samt bidrage med deres udviklingskompetencer og penge.
|
||||||
|
‣ <b>Åben og gennemsigtig beslutningstagning og økonomi, non-profit og fuldstændig open source.</b>
|
||||||
|
|
||||||
|
<b>Vigtigste funktioner</b>:
|
||||||
|
• Detaljerede kort med steder, der ikke er tilgængelige på Google Maps, kan downloades.
|
||||||
|
• Udendørstilstand med fremhævede vandreruter, campingpladser, vandkilder, bjergtoppe, højdekurver osv.
|
||||||
|
• Gang- og cykelstier
|
||||||
|
• Interessepunkter som restauranter, tankstationer, hoteller, butikker, seværdigheder og meget mere
|
||||||
|
• Søg efter navn, adresse eller efter interessepunkt-kategori
|
||||||
|
• Navigation med stemmevejledning til gående, cyklende eller kørende
|
||||||
|
• Bogmærk dine yndlingssteder med ét enkelt tryk
|
||||||
|
• Offline Wikipedia-artikler
|
||||||
|
• Lag med metrolinjer og rutevejledning
|
||||||
|
• Sporoptagelse
|
||||||
|
• Eksportér og importér bogmærker og ruter i KML, KMZ, GPX-formater
|
||||||
|
• En mørk tilstand til brug om natten
|
||||||
|
• Forbedr kortdata for alle ved hjælp af en simpel, indbygget redigeringsfunktion
|
||||||
|
• Android Auto-understøttelse
|
||||||
|
|
||||||
|
Rapportér app-problemer, kom med forslag og bliv en del af vores fællesskab på <b><i>comaps.app</i></b> webstedet.
|
||||||
|
|
||||||
|
<b>Nu med frihed</b>
|
||||||
|
Udforsk din rejse, og navigér i verden med fokus på privatliv og fællesskab!
|
||||||
1
android/app/src/google/play/listings/da-DK/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Naviger med privatliv
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
Una aplicación de mapas gratuita y de código abierto liderada por la comunidad, basada en los datos de OpenStreetMap y reforzada con un compromiso con la transparencia, la privacidad y la ausencia de fines de lucro.
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Únete a la comunidad y ayuda a crear la mejor app de mapas
|
||||||
|
|
||||||
|
• Usa la aplicación y corre la voz sobre ella
|
||||||
|
|
||||||
|
• Envía comentarios y reporta problemas
|
||||||
|
|
||||||
|
• Actualiza los datos del mapa en la app o en el sitio web de OpenStreetMap
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<i>¡Tus comentarios y valoraciones de 5 estrellas son el mejor apoyo para nosotros!</i>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
‣ <b>Sencilla y Pulida</b>: funciones esenciales fáciles de usar que simplemente funcionan.
|
||||||
|
|
||||||
|
‣ <b>Enfocada en el uso sin conexión</b>: Planifica y navega tus viajes sin necesidad de conexión móvil, busca puntos de paso en rutas remotas, etc. Todas las funciones están diseñadas para funcionar sin conexión.
|
||||||
|
|
||||||
|
‣ <b>Respeta tu Privacidad</b>: La app está diseñada pensando en tu privacidad: no identifica personas, no rastrea y no recoge datos personales. Sin publicidad.
|
||||||
|
|
||||||
|
‣ <b>Ahorra Batería y Espacio</b>: No consume la batería como otras apps de navegación. Los mapas compactos ahorran espacio valioso en tu teléfono.
|
||||||
|
|
||||||
|
‣ <b>Gratuita y Creada por la Comunidad</b>: Personas como tú ayudaron a construir la app añadiendo lugares a OpenStreetMap, probando funciones, dando opiniones y contribuyendo con desarrollo o financiación.
|
||||||
|
|
||||||
|
‣ <b>Toma de decisiones y finanzas abiertas y transparentes, sin ánimo de lucro y completamente de código abierto.</b>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<b>Funciones Principales</b>:
|
||||||
|
|
||||||
|
• Mapas detallados descargables con lugares que no aparecen en Google Maps
|
||||||
|
|
||||||
|
• Modo exterior con rutas de senderismo destacadas, campings, fuentes de agua, picos, curvas de nivel, etc.
|
||||||
|
|
||||||
|
• Caminos peatonales y carriles bici
|
||||||
|
|
||||||
|
• Puntos de interés como restaurantes, gasolineras, hoteles, tiendas, lugares turísticos y muchos más
|
||||||
|
|
||||||
|
• Búsqueda por nombre, dirección o categoría de punto de interés
|
||||||
|
|
||||||
|
• Navegación con indicaciones por voz para caminar, ir en bici o conducir
|
||||||
|
|
||||||
|
• Guarda tus lugares favoritos con un solo toque
|
||||||
|
|
||||||
|
• Artículos de Wikipedia sin conexión
|
||||||
|
|
||||||
|
• Capa de transporte subterráneo y rutas
|
||||||
|
|
||||||
|
• Grabación de rutas
|
||||||
|
|
||||||
|
• Exporta e importa favoritos y rutas en formatos KML, KMZ y GPX
|
||||||
|
|
||||||
|
• Modo oscuro para usar de noche
|
||||||
|
|
||||||
|
• Mejora los datos del mapa para todos usando un editor básico integrado
|
||||||
|
|
||||||
|
• Compatibilidad con Android Auto
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
Por favor, informa de errores, sugiere ideas y únete a nuestra comunidad en el sitio web <b><i>comaps.app</i></b>.
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<b>La Libertad Está Aquí</b>
|
||||||
|
|
||||||
|
Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Navegación de mapa fácil - Descubre más en tu camino - Creado por la comunidad
|
||||||
1
android/app/src/google/play/listings/es-ES/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Navega con Privacidad
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
Komunitateak gidatutako doako eta kode irekiko aplikazioa OpenStreetMap datuetan oinarrituta, gardentasuna, pribatutasuna eta irabazi asmorik gabeko konpromisoarekin indartua.
|
||||||
|
|
||||||
|
Sartu komunitatean eta lagundu mapa aplikaziorik onena egiten
|
||||||
|
• Erabili aplikazioa eta horri buruzko iritsia zabaldu
|
||||||
|
• Eman feedbacka eta txostenetako gaiak
|
||||||
|
• Eguneratu maparen datuak aplikazioan edo OpenStreetMap webgunean
|
||||||
|
<i> Zure iritzia eta 5 izarreko berrikuspenak dira guretzako laguntza onena! </ i>
|
||||||
|
|
||||||
|
‣ <b>Sinplea</b>: oso erraza da ondo funtzionatzen duten funtzioak erabiltzea.
|
||||||
|
‣ <b> Lineaz kanpo erabiltzeko prest </ b> Planifikatu eta nabigatu atzerrira bidaiatzea, konexio beharrik gabe, bilatu bideak urruneko ibilaldi batean, etab. Aplikazioaren funtzio guztiak lineaz kanpo lan egiteko diseinatuta daude.
|
||||||
|
‣ <b> Pribatutasuna errespetatzea </ b>: aplikazioa pribatutasunarekin diseinatuta dago, ez du pertsonak identifikatzen, ez du jarraipena egiten, eta ez du informazio pertsonala biltzen. Iragarkirik gabe.
|
||||||
|
‣ <b> Zure bateria eta espazioa gordetzen ditu </ b>: ez du bateria xukatu beste nabigazio aplikazioak bezala. Mapa trinkoek espazioa aurrezten dute zure telefonoan.
|
||||||
|
‣ <b> Libre eta komunitateak eraikitakoa: Zu bezalako jendeak aplikazioa eraikitzen lagundu du tokiak gehituz OpenStreetMapen, probatuz eta funtzioei buruzko iritzia emanez eta iritsiz eta diruz lagunduz.
|
||||||
|
‣ <b> Erabakiak hartzea eta finantza gardenak, irabazi asmorik gabekoa eta guztiz iturburu irekikoa. </ B>
|
||||||
|
|
||||||
|
<b> Ezaugarri nagusiak </ b>:
|
||||||
|
• Deskargatu mapa zehatzak Google Maps-ekin eskuragarri ez dauden lekuekin
|
||||||
|
• Landa eremua moduan nabarmendutako mendi ibilbideak, kanpinak, ur iturriak, gailurrak, sestra-lerroak, etab
|
||||||
|
• Bideak eta bidegorriak
|
||||||
|
• Jatetxe, gasolindegiak, hotelak, dendak, bisitak eta bestelako interesguneak
|
||||||
|
• Bilatu izenaren edo helbide baten arabera, edo kategoriaren arabera
|
||||||
|
• Oinez, txirrindularitzarako edo gidatzeko ahots-oharrak dituen nabigazioa
|
||||||
|
• Markatu zure gogoko lekuak ikutu bakarrarekin
|
||||||
|
• Lineaz kanpoko Wikipedia artikuluak
|
||||||
|
• Metroaren garraio geruza eta jarraibideak
|
||||||
|
• Arrastoen grabazioa
|
||||||
|
• Laster-markak eta ibilbideak esportatu eta inportatu KML, KMZ, GPX formatuetan
|
||||||
|
• Gauean erabiltzeko modu iluna
|
||||||
|
• Hobetu mapako datuak oinarrizko editore integratua erabiliz
|
||||||
|
• Android Auto laguntza
|
||||||
|
|
||||||
|
Mesedez, jakinarazi aplikazioaren gorabeherak, ideiak proposatu eta sartu gure komunitatean <b> <i> comaps.app </ i> </ b> webgunean.
|
||||||
|
|
||||||
|
<b> Askatasuna hemen </ b> da
|
||||||
|
Ezagutu zure bidaia, nabigatu munduan pribatutasunarekin eta komunitatearen abangoardian!
|
||||||
1
android/app/src/google/play/listings/eu-ES/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Comaps - Pribatuki nabigatu
|
||||||
@@ -1 +1 @@
|
|||||||
Navigation cartographique facile - Propulsé par la communauté
|
Navigation cartographique facile - Découvrez davantage de votre voyage - Propulsé par la communauté
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Navigation facile del mappa – Discoperi tu viage – Alimentate per le communitate
|
||||||
1
android/app/src/google/play/listings/ia/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps – Naviga private
|
||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Navegue privadamente
|
CoMaps - Navegue Privadamente
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Оффлайн навигация
|
CoMaps - Приватная навигация
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../../../google/java/app/organicmaps/location
|
|
||||||
1
android/app/src/huawei/java/app/organicmaps/sdk/location
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../../google/java/app/organicmaps/sdk/location
|
||||||
@@ -75,6 +75,7 @@
|
|||||||
android:backupInForeground="true"
|
android:backupInForeground="true"
|
||||||
android:fullBackupContent="@xml/backup_content"
|
android:fullBackupContent="@xml/backup_content"
|
||||||
android:dataExtractionRules="@xml/backup_content_v31"
|
android:dataExtractionRules="@xml/backup_content_v31"
|
||||||
|
android:enableOnBackInvokedCallback="false"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:localeConfig="@xml/locales_config"
|
android:localeConfig="@xml/locales_config"
|
||||||
@@ -376,6 +377,7 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="app.organicmaps.downloader.DownloaderActivity"
|
android:name="app.organicmaps.downloader.DownloaderActivity"
|
||||||
|
android:enableOnBackInvokedCallback="true"
|
||||||
android:configChanges="orientation|screenLayout|screenSize"
|
android:configChanges="orientation|screenLayout|screenSize"
|
||||||
android:screenOrientation="fullUser"
|
android:screenOrientation="fullUser"
|
||||||
android:label="@string/download_maps"
|
android:label="@string/download_maps"
|
||||||
|
|||||||
@@ -1,135 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.22.1)
|
|
||||||
|
|
||||||
project(organicmaps C CXX)
|
|
||||||
|
|
||||||
set(SRC
|
|
||||||
# JNI headers
|
|
||||||
../../../../../private.h
|
|
||||||
app/organicmaps/core/jni_helper.hpp
|
|
||||||
app/organicmaps/core/jni_java_methods.hpp
|
|
||||||
app/organicmaps/core/logging.hpp
|
|
||||||
app/organicmaps/core/ScopedEnv.hpp
|
|
||||||
app/organicmaps/core/ScopedLocalRef.hpp
|
|
||||||
app/organicmaps/Framework.hpp
|
|
||||||
app/organicmaps/opengl/android_gl_utils.hpp
|
|
||||||
app/organicmaps/opengl/androidoglcontext.hpp
|
|
||||||
app/organicmaps/opengl/androidoglcontextfactory.hpp
|
|
||||||
app/organicmaps/opengl/gl3stub.h
|
|
||||||
app/organicmaps/platform/GuiThread.hpp
|
|
||||||
app/organicmaps/platform/AndroidPlatform.hpp
|
|
||||||
app/organicmaps/util/Distance.hpp
|
|
||||||
app/organicmaps/util/FeatureIdBuilder.hpp
|
|
||||||
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/sdk/routing/JunctionInfo.hpp
|
|
||||||
app/organicmaps/sdk/routing/RouteMarkData.hpp
|
|
||||||
app/organicmaps/sdk/routing/RouteMarkType.hpp
|
|
||||||
app/organicmaps/sdk/routing/RoutePointInfo.hpp
|
|
||||||
app/organicmaps/sdk/routing/RouteRecommendationType.hpp
|
|
||||||
app/organicmaps/sdk/routing/RoutingInfo.hpp
|
|
||||||
app/organicmaps/sdk/routing/RoutingOptions.cpp
|
|
||||||
app/organicmaps/sdk/routing/SingleLaneInfo.hpp
|
|
||||||
app/organicmaps/sdk/routing/TransitRouteInfo.hpp
|
|
||||||
app/organicmaps/sdk/routing/TransitStepInfo.hpp
|
|
||||||
app/organicmaps/sdk/ChoosePositionMode.cpp
|
|
||||||
app/organicmaps/sdk/MapStyle.cpp
|
|
||||||
app/organicmaps/sdk/OrganicMaps.cpp
|
|
||||||
app/organicmaps/sdk/Router.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/DownloadResourcesLegacyActivity.cpp
|
|
||||||
app/organicmaps/editor/Editor.cpp
|
|
||||||
app/organicmaps/editor/OpeningHours.cpp
|
|
||||||
app/organicmaps/editor/OsmOAuth.cpp
|
|
||||||
app/organicmaps/Framework.cpp
|
|
||||||
app/organicmaps/isolines/IsolinesManager.cpp
|
|
||||||
app/organicmaps/LocationState.cpp
|
|
||||||
app/organicmaps/Map.cpp
|
|
||||||
app/organicmaps/MapManager.cpp
|
|
||||||
app/organicmaps/settings/UnitLocale.cpp
|
|
||||||
app/organicmaps/settings/MapLanguageCode.cpp
|
|
||||||
app/organicmaps/sound/tts.cpp
|
|
||||||
app/organicmaps/subway/SubwayManager.cpp
|
|
||||||
app/organicmaps/TrackRecorder.cpp
|
|
||||||
app/organicmaps/TrafficState.cpp
|
|
||||||
app/organicmaps/UserMarkHelper.cpp
|
|
||||||
app/organicmaps/opengl/android_gl_utils.cpp
|
|
||||||
app/organicmaps/opengl/androidoglcontext.cpp
|
|
||||||
app/organicmaps/opengl/androidoglcontextfactory.cpp
|
|
||||||
app/organicmaps/opengl/gl3stub.cpp
|
|
||||||
app/organicmaps/platform/GuiThread.cpp
|
|
||||||
app/organicmaps/platform/HttpThread.cpp
|
|
||||||
app/organicmaps/platform/Language.cpp
|
|
||||||
app/organicmaps/platform/Localization.cpp
|
|
||||||
app/organicmaps/platform/AndroidPlatform.cpp
|
|
||||||
app/organicmaps/platform/PThreadImpl.cpp
|
|
||||||
app/organicmaps/platform/SecureStorage.cpp
|
|
||||||
app/organicmaps/platform/SocketImpl.cpp
|
|
||||||
app/organicmaps/util/Config.cpp
|
|
||||||
app/organicmaps/util/GeoUtils.cpp
|
|
||||||
app/organicmaps/util/HttpClient.cpp
|
|
||||||
app/organicmaps/util/Language.cpp
|
|
||||||
app/organicmaps/util/LogsManager.cpp
|
|
||||||
app/organicmaps/util/NetworkPolicy.cpp
|
|
||||||
app/organicmaps/util/StringUtils.cpp
|
|
||||||
app/organicmaps/util/UiThread.cpp
|
|
||||||
app/organicmaps/vulkan/android_vulkan_context_factory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
omim_add_library(${PROJECT_NAME} SHARED ${SRC})
|
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE .)
|
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
|
||||||
# CoMaps libs
|
|
||||||
map
|
|
||||||
# ge0
|
|
||||||
# tracking
|
|
||||||
# routing
|
|
||||||
# traffic
|
|
||||||
# routing_common
|
|
||||||
# drape_frontend
|
|
||||||
# shaders
|
|
||||||
# search
|
|
||||||
# storage
|
|
||||||
# descriptions
|
|
||||||
# drape
|
|
||||||
# kml
|
|
||||||
# editor
|
|
||||||
# transit
|
|
||||||
# indexer
|
|
||||||
# platform
|
|
||||||
# mwm_diff
|
|
||||||
# bsdiff
|
|
||||||
# geometry
|
|
||||||
# coding
|
|
||||||
# base
|
|
||||||
# opening_hours
|
|
||||||
# pugixml
|
|
||||||
# expat
|
|
||||||
# freetype
|
|
||||||
# minizip
|
|
||||||
# cppjansson
|
|
||||||
# protobuf
|
|
||||||
# succinct
|
|
||||||
# stb_image
|
|
||||||
# icu
|
|
||||||
# agg
|
|
||||||
# vulkan_wrapper
|
|
||||||
|
|
||||||
# Android libs
|
|
||||||
log
|
|
||||||
android
|
|
||||||
EGL
|
|
||||||
GLESv2
|
|
||||||
atomic
|
|
||||||
z
|
|
||||||
)
|
|
||||||
|
|
||||||
#target_link_options(${PROJECT_NAME} PRIVATE "-fuse-ld=gold")
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#include "app/organicmaps/Framework.hpp"
|
|
||||||
#include "app/organicmaps/core/jni_helper.hpp"
|
|
||||||
|
|
||||||
#include "search/displayed_categories.hpp"
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
JNIEXPORT jobjectArray JNICALL Java_app_organicmaps_sdk_search_DisplayedCategories_nativeGetKeys(JNIEnv * env, jclass)
|
|
||||||
{
|
|
||||||
::Framework * fr = g_framework->NativeFramework();
|
|
||||||
ASSERT(fr, ());
|
|
||||||
search::DisplayedCategories categories = fr->GetDisplayedCategories();
|
|
||||||
return jni::ToJavaStringArray(env, categories.GetKeys());
|
|
||||||
}
|
|
||||||
} // extern "C"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#include "app/organicmaps/Framework.hpp"
|
|
||||||
|
|
||||||
#include "platform/settings.hpp"
|
|
||||||
|
|
||||||
#include "app/organicmaps/core/jni_helper.hpp"
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
JNIEXPORT void JNICALL
|
|
||||||
Java_app_organicmaps_settings_MapLanguageCode_setMapLanguageCode(JNIEnv * env, jobject, jstring languageCode)
|
|
||||||
{
|
|
||||||
g_framework->SetMapLanguageCode(jni::ToNativeString(env, languageCode));
|
|
||||||
}
|
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL
|
|
||||||
Java_app_organicmaps_settings_MapLanguageCode_getMapLanguageCode(JNIEnv * env, jobject)
|
|
||||||
{
|
|
||||||
return jni::ToJavaString(env, g_framework->GetMapLanguageCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#include "app/organicmaps/core/jni_helper.hpp"
|
|
||||||
#include "app/organicmaps/platform/GuiThread.hpp"
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
// static void nativeProcessTask(long taskPointer);
|
|
||||||
JNIEXPORT void JNICALL
|
|
||||||
Java_app_organicmaps_util_concurrency_UiThread_nativeProcessTask(JNIEnv * env, jclass clazz, jlong taskPointer)
|
|
||||||
{
|
|
||||||
android::GuiThread::ProcessTask(taskPointer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,10 +5,16 @@ import android.content.res.Resources;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
import app.organicmaps.sdk.Framework;
|
||||||
|
import app.organicmaps.sdk.bookmarks.data.BookmarkManager;
|
||||||
|
import app.organicmaps.sdk.bookmarks.data.ElevationInfo;
|
||||||
|
import app.organicmaps.util.ThemeUtils;
|
||||||
|
import app.organicmaps.util.Utils;
|
||||||
|
import app.organicmaps.widget.placepage.AxisValueFormatter;
|
||||||
|
import app.organicmaps.widget.placepage.CurrentLocationMarkerView;
|
||||||
|
import app.organicmaps.widget.placepage.FloatingMarkerView;
|
||||||
import com.github.mikephil.charting.charts.LineChart;
|
import com.github.mikephil.charting.charts.LineChart;
|
||||||
import com.github.mikephil.charting.components.Legend;
|
import com.github.mikephil.charting.components.Legend;
|
||||||
import com.github.mikephil.charting.components.MarkerView;
|
import com.github.mikephil.charting.components.MarkerView;
|
||||||
@@ -20,15 +26,6 @@ import com.github.mikephil.charting.data.LineDataSet;
|
|||||||
import com.github.mikephil.charting.formatter.ValueFormatter;
|
import com.github.mikephil.charting.formatter.ValueFormatter;
|
||||||
import com.github.mikephil.charting.highlight.Highlight;
|
import com.github.mikephil.charting.highlight.Highlight;
|
||||||
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
||||||
|
|
||||||
import app.organicmaps.bookmarks.data.BookmarkManager;
|
|
||||||
import app.organicmaps.bookmarks.data.ElevationInfo;
|
|
||||||
import app.organicmaps.widget.placepage.AxisValueFormatter;
|
|
||||||
import app.organicmaps.widget.placepage.CurrentLocationMarkerView;
|
|
||||||
import app.organicmaps.widget.placepage.FloatingMarkerView;
|
|
||||||
import app.organicmaps.util.ThemeUtils;
|
|
||||||
import app.organicmaps.util.Utils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -150,7 +147,7 @@ public class ChartController implements OnChartValueSelectedListener,
|
|||||||
mTrackId = info.getId();
|
mTrackId = info.getId();
|
||||||
List<Entry> values = new ArrayList<>();
|
List<Entry> values = new ArrayList<>();
|
||||||
|
|
||||||
for (ElevationInfo.Point point: info.getPoints())
|
for (ElevationInfo.Point point : info.getPoints())
|
||||||
values.add(new Entry((float) point.getDistance(), point.getAltitude()));
|
values.add(new Entry((float) point.getDistance(), point.getAltitude()));
|
||||||
|
|
||||||
LineDataSet set = new LineDataSet(values, "Elevation_profile_points");
|
LineDataSet set = new LineDataSet(values, "Elevation_profile_points");
|
||||||
@@ -183,15 +180,15 @@ public class ChartController implements OnChartValueSelectedListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onValueSelected(Entry e, Highlight h) {
|
public void onValueSelected(Entry e, Highlight h)
|
||||||
|
{
|
||||||
mFloatingMarkerView.updateOffsets(e, h);
|
mFloatingMarkerView.updateOffsets(e, h);
|
||||||
Highlight curPos = getCurrentPosHighlight();
|
Highlight curPos = getCurrentPosHighlight();
|
||||||
|
|
||||||
if (mCurrentPositionOutOfTrack)
|
if (mCurrentPositionOutOfTrack)
|
||||||
mChart.highlightValues(Collections.singletonList(h), Collections.singletonList(mFloatingMarkerView));
|
mChart.highlightValues(Collections.singletonList(h), Collections.singletonList(mFloatingMarkerView));
|
||||||
else
|
else
|
||||||
mChart.highlightValues(Arrays.asList(curPos, h), Arrays.asList(mCurrentLocationMarkerView,
|
mChart.highlightValues(Arrays.asList(curPos, h), Arrays.asList(mCurrentLocationMarkerView, mFloatingMarkerView));
|
||||||
mFloatingMarkerView));
|
|
||||||
if (mTrackId == Utils.INVALID_ID)
|
if (mTrackId == Utils.INVALID_ID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
package app.organicmaps;
|
package app.organicmaps;
|
||||||
|
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_DISK_ERROR;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_DOWNLOAD_ERROR;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_DOWNLOAD_SUCCESS;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_NOT_ENOUGH_FREE_SPACE;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_NO_MORE_FILES;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.ERR_STORAGE_DISCONNECTED;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.nativeCancelCurrentFile;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.nativeGetBytesToDownload;
|
||||||
|
import static app.organicmaps.sdk.DownloadResourcesLegacyActivity.nativeStartNextFileDownload;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@@ -8,35 +18,31 @@ import android.location.Location;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
import androidx.annotation.Keep;
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||||
import app.organicmaps.downloader.CountryItem;
|
|
||||||
import app.organicmaps.downloader.MapManager;
|
|
||||||
import app.organicmaps.intent.Factory;
|
import app.organicmaps.intent.Factory;
|
||||||
import app.organicmaps.location.LocationHelper;
|
import app.organicmaps.sdk.Framework;
|
||||||
import app.organicmaps.location.LocationListener;
|
import app.organicmaps.sdk.downloader.CountryItem;
|
||||||
import app.organicmaps.util.Config;
|
import app.organicmaps.sdk.downloader.MapManager;
|
||||||
import app.organicmaps.util.ConnectionState;
|
import app.organicmaps.sdk.location.LocationListener;
|
||||||
import app.organicmaps.util.StringUtils;
|
import app.organicmaps.sdk.util.Config;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.sdk.util.ConnectionState;
|
||||||
|
import app.organicmaps.sdk.util.StringUtils;
|
||||||
|
import app.organicmaps.sdk.util.UiUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -45,15 +51,6 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
private static final String TAG = DownloadResourcesLegacyActivity.class.getSimpleName();
|
private static final String TAG = DownloadResourcesLegacyActivity.class.getSimpleName();
|
||||||
|
|
||||||
// Error codes, should match the same codes in JNI
|
|
||||||
private static final int ERR_DOWNLOAD_SUCCESS = 0;
|
|
||||||
private static final int ERR_DISK_ERROR = -1;
|
|
||||||
private static final int ERR_NOT_ENOUGH_FREE_SPACE = -2;
|
|
||||||
private static final int ERR_STORAGE_DISCONNECTED = -3;
|
|
||||||
private static final int ERR_DOWNLOAD_ERROR = -4;
|
|
||||||
private static final int ERR_NO_MORE_FILES = -5;
|
|
||||||
private static final int ERR_FILE_IN_PROGRESS = -6;
|
|
||||||
|
|
||||||
private MaterialTextView mTvMessage;
|
private MaterialTextView mTvMessage;
|
||||||
private LinearProgressIndicator mProgress;
|
private LinearProgressIndicator mProgress;
|
||||||
private MaterialButton mBtnDownload;
|
private MaterialButton mBtnDownload;
|
||||||
@@ -81,23 +78,9 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private int mCountryDownloadListenerSlot;
|
private int mCountryDownloadListenerSlot;
|
||||||
|
|
||||||
private interface Listener
|
private final LocationListener mLocationListener = new LocationListener() {
|
||||||
{
|
|
||||||
// Called by JNI.
|
|
||||||
@Keep
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
void onProgress(int percent);
|
|
||||||
|
|
||||||
// Called by JNI.
|
|
||||||
@Keep
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
void onFinish(int errorCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
private final LocationListener mLocationListener = new LocationListener()
|
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onLocationUpdated(Location location)
|
public void onLocationUpdated(@NonNull Location location)
|
||||||
{
|
{
|
||||||
if (mCurrentCountry != null)
|
if (mCurrentCountry != null)
|
||||||
return;
|
return;
|
||||||
@@ -126,38 +109,37 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
mChbDownloadCountry.setText(checkBoxText);
|
mChbDownloadCountry.setText(checkBoxText);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocationHelper.from(DownloadResourcesLegacyActivity.this).removeListener(this);
|
MwmApplication.from(DownloadResourcesLegacyActivity.this).getLocationHelper().removeListener(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private final Listener mResourcesDownloadListener = new Listener()
|
private final app.organicmaps.sdk.DownloadResourcesLegacyActivity.Listener mResourcesDownloadListener =
|
||||||
{
|
new app.organicmaps.sdk.DownloadResourcesLegacyActivity.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(final int percent)
|
public void onProgress(final int percent)
|
||||||
{
|
{
|
||||||
if (!isFinishing())
|
if (!isFinishing())
|
||||||
mProgress.setProgressCompat(percent, true);
|
mProgress.setProgressCompat(percent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(final int errorCode)
|
public void onFinish(final int errorCode)
|
||||||
{
|
{
|
||||||
if (isFinishing())
|
if (isFinishing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (errorCode == ERR_DOWNLOAD_SUCCESS)
|
if (errorCode == ERR_DOWNLOAD_SUCCESS)
|
||||||
{
|
{
|
||||||
final int res = nativeStartNextFileDownload(mResourcesDownloadListener);
|
final int res = nativeStartNextFileDownload(mResourcesDownloadListener);
|
||||||
if (res == ERR_NO_MORE_FILES)
|
if (res == ERR_NO_MORE_FILES)
|
||||||
finishFilesDownload(res);
|
finishFilesDownload(res);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
finishFilesDownload(errorCode);
|
finishFilesDownload(errorCode);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private final MapManager.StorageCallback mCountryDownloadListener = new MapManager.StorageCallback()
|
private final MapManager.StorageCallback mCountryDownloadListener = new MapManager.StorageCallback() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
||||||
{
|
{
|
||||||
@@ -168,14 +150,14 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
switch (item.newStatus)
|
switch (item.newStatus)
|
||||||
{
|
{
|
||||||
case CountryItem.STATUS_DONE:
|
case CountryItem.STATUS_DONE:
|
||||||
mAreResourcesDownloaded = true;
|
mAreResourcesDownloaded = true;
|
||||||
showMap();
|
showMap();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CountryItem.STATUS_FAILED:
|
case CountryItem.STATUS_FAILED:
|
||||||
MapManager.showError(DownloadResourcesLegacyActivity.this, item, null);
|
MapManager.showError(DownloadResourcesLegacyActivity.this, item, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,14 +217,14 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (!isFinishing())
|
if (!isFinishing())
|
||||||
LocationHelper.from(this).addListener(mLocationListener);
|
MwmApplication.from(this).getLocationHelper().addListener(mLocationListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause()
|
protected void onPause()
|
||||||
{
|
{
|
||||||
super.onPause();
|
super.onPause();
|
||||||
LocationHelper.from(this).removeListener(mLocationListener);
|
MwmApplication.from(this).getLocationHelper().removeListener(mLocationListener);
|
||||||
if (mAlertDialog != null && mAlertDialog.isShowing())
|
if (mAlertDialog != null && mAlertDialog.isShowing())
|
||||||
mAlertDialog.dismiss();
|
mAlertDialog.dismiss();
|
||||||
mAlertDialog = null;
|
mAlertDialog = null;
|
||||||
@@ -250,8 +232,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private void setDownloadMessage(int bytesToDownload)
|
private void setDownloadMessage(int bytesToDownload)
|
||||||
{
|
{
|
||||||
mTvMessage.setText(getString(R.string.download_resources,
|
mTvMessage.setText(getString(R.string.download_resources, StringUtils.getFileSizeString(this, bytesToDownload)));
|
||||||
StringUtils.getFileSizeString(this, bytesToDownload)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean prepareFilesDownload(boolean showMap)
|
private boolean prepareFilesDownload(boolean showMap)
|
||||||
@@ -388,7 +369,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
CountryItem item = CountryItem.fill(mCurrentCountry);
|
CountryItem item = CountryItem.fill(mCurrentCountry);
|
||||||
String fileSizeString = StringUtils.getFileSizeString(this, item.totalSize);
|
String fileSizeString = StringUtils.getFileSizeString(this, item.totalSize);
|
||||||
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
|
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
|
||||||
mProgress.setMax((int)item.totalSize);
|
mProgress.setMax((int) item.totalSize);
|
||||||
mProgress.setProgressCompat(0, true);
|
mProgress.setProgressCompat(0, true);
|
||||||
|
|
||||||
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
||||||
@@ -412,8 +393,10 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
if (mAlertDialog != null && mAlertDialog.isShowing())
|
if (mAlertDialog != null && mAlertDialog.isShowing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@StringRes final int titleId;
|
@StringRes
|
||||||
@StringRes final int messageId = switch (result)
|
final int titleId;
|
||||||
|
@StringRes
|
||||||
|
final int messageId = switch (result)
|
||||||
{
|
{
|
||||||
case ERR_NOT_ENOUGH_FREE_SPACE ->
|
case ERR_NOT_ENOUGH_FREE_SPACE ->
|
||||||
{
|
{
|
||||||
@@ -428,8 +411,8 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
case ERR_DOWNLOAD_ERROR ->
|
case ERR_DOWNLOAD_ERROR ->
|
||||||
{
|
{
|
||||||
titleId = R.string.connection_failure;
|
titleId = R.string.connection_failure;
|
||||||
yield (ConnectionState.INSTANCE.isConnected() ? R.string.download_has_failed
|
yield(ConnectionState.INSTANCE.isConnected() ? R.string.download_has_failed
|
||||||
: R.string.common_check_internet_connection_dialog);
|
: R.string.common_check_internet_connection_dialog);
|
||||||
}
|
}
|
||||||
case ERR_DISK_ERROR ->
|
case ERR_DISK_ERROR ->
|
||||||
{
|
{
|
||||||
@@ -439,17 +422,18 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||||
};
|
};
|
||||||
|
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||||
.setPositiveButton(R.string.try_again, (dialog, which) -> {
|
.setPositiveButton(R.string.try_again,
|
||||||
setAction(TRY_AGAIN);
|
(dialog, which) -> {
|
||||||
onTryAgainClicked();
|
setAction(TRY_AGAIN);
|
||||||
})
|
onTryAgainClicked();
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
})
|
||||||
.show();
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -458,8 +442,4 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
return R.style.MwmTheme_DownloadResourcesLegacy;
|
return R.style.MwmTheme_DownloadResourcesLegacy;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static native int nativeGetBytesToDownload();
|
|
||||||
private static native int nativeStartNextFileDownload(Listener listener);
|
|
||||||
private static native void nativeCancelCurrentFile();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,15 +10,14 @@ import android.view.SurfaceHolder;
|
|||||||
import android.view.SurfaceView;
|
import android.view.SurfaceView;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.res.ConfigurationHelper;
|
import androidx.core.content.res.ConfigurationHelper;
|
||||||
|
|
||||||
import app.organicmaps.base.BaseMwmFragment;
|
import app.organicmaps.base.BaseMwmFragment;
|
||||||
import app.organicmaps.display.DisplayType;
|
import app.organicmaps.sdk.Map;
|
||||||
import app.organicmaps.util.log.Logger;
|
import app.organicmaps.sdk.MapRenderingListener;
|
||||||
|
import app.organicmaps.sdk.display.DisplayType;
|
||||||
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
public class MapFragment extends BaseMwmFragment implements View.OnTouchListener, SurfaceHolder.Callback
|
public class MapFragment extends BaseMwmFragment implements View.OnTouchListener, SurfaceHolder.Callback
|
||||||
@@ -69,7 +68,8 @@ public class MapFragment extends BaseMwmFragment implements View.OnTouchListener
|
|||||||
public void surfaceChanged(SurfaceHolder surfaceHolder, int format, int width, int height)
|
public void surfaceChanged(SurfaceHolder surfaceHolder, int format, int width, int height)
|
||||||
{
|
{
|
||||||
Logger.d(TAG);
|
Logger.d(TAG);
|
||||||
mMap.onSurfaceChanged(requireContext(), surfaceHolder.getSurface(), surfaceHolder.getSurfaceFrame(), surfaceHolder.isCreating());
|
mMap.onSurfaceChanged(requireContext(), surfaceHolder.getSurface(), surfaceHolder.getSurfaceFrame(),
|
||||||
|
surfaceHolder.isCreating());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,14 +2,12 @@ package app.organicmaps;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||||
import app.organicmaps.display.DisplayChangedListener;
|
import app.organicmaps.sdk.display.DisplayChangedListener;
|
||||||
import app.organicmaps.display.DisplayManager;
|
import app.organicmaps.sdk.display.DisplayManager;
|
||||||
import app.organicmaps.display.DisplayType;
|
import app.organicmaps.sdk.display.DisplayType;
|
||||||
|
|
||||||
public class MapPlaceholderActivity extends BaseMwmFragmentActivity implements DisplayChangedListener
|
public class MapPlaceholderActivity extends BaseMwmFragmentActivity implements DisplayChangedListener
|
||||||
{
|
{
|
||||||
@@ -24,7 +22,7 @@ public class MapPlaceholderActivity extends BaseMwmFragmentActivity implements D
|
|||||||
super.onSafeCreate(savedInstanceState);
|
super.onSafeCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_map_placeholder);
|
setContentView(R.layout.activity_map_placeholder);
|
||||||
|
|
||||||
mDisplayManager = DisplayManager.from(this);
|
mDisplayManager = MwmApplication.from(this).getDisplayManager();
|
||||||
mDisplayManager.addListener(DisplayType.Device, this);
|
mDisplayManager.addListener(DisplayType.Device, this);
|
||||||
|
|
||||||
findViewById(R.id.btn_continue).setOnClickListener((unused) -> mDisplayManager.changeDisplay(DisplayType.Device));
|
findViewById(R.id.btn_continue).setOnClickListener((unused) -> mDisplayManager.changeDisplay(DisplayType.Device));
|
||||||
@@ -34,8 +32,7 @@ public class MapPlaceholderActivity extends BaseMwmFragmentActivity implements D
|
|||||||
public void onDisplayChangedToDevice(@NonNull Runnable onTaskFinishedCallback)
|
public void onDisplayChangedToDevice(@NonNull Runnable onTaskFinishedCallback)
|
||||||
{
|
{
|
||||||
mRemoveDisplayListener = false;
|
mRemoveDisplayListener = false;
|
||||||
startActivity(new Intent(this, MwmActivity.class)
|
startActivity(new Intent(this, MwmActivity.class).putExtra(MwmActivity.EXTRA_UPDATE_THEME, true));
|
||||||
.putExtra(MwmActivity.EXTRA_UPDATE_THEME, true));
|
|
||||||
finish();
|
finish();
|
||||||
onTaskFinishedCallback.run();
|
onTaskFinishedCallback.run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package app.organicmaps;
|
package app.organicmaps;
|
||||||
|
|
||||||
import static app.organicmaps.location.LocationState.LOCATION_TAG;
|
import static app.organicmaps.sdk.location.LocationState.LOCATION_TAG;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.UiThread;
|
import androidx.annotation.UiThread;
|
||||||
@@ -15,29 +14,26 @@ import androidx.lifecycle.DefaultLifecycleObserver;
|
|||||||
import androidx.lifecycle.LifecycleObserver;
|
import androidx.lifecycle.LifecycleObserver;
|
||||||
import androidx.lifecycle.LifecycleOwner;
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
|
|
||||||
import app.organicmaps.background.OsmUploadWork;
|
import app.organicmaps.background.OsmUploadWork;
|
||||||
import app.organicmaps.downloader.Android7RootCertificateWorkaround;
|
|
||||||
import app.organicmaps.downloader.DownloaderNotifier;
|
import app.organicmaps.downloader.DownloaderNotifier;
|
||||||
import app.organicmaps.display.DisplayManager;
|
|
||||||
import app.organicmaps.location.LocationHelper;
|
|
||||||
import app.organicmaps.location.LocationState;
|
|
||||||
import app.organicmaps.location.SensorHelper;
|
|
||||||
import app.organicmaps.location.TrackRecorder;
|
|
||||||
import app.organicmaps.location.TrackRecordingService;
|
import app.organicmaps.location.TrackRecordingService;
|
||||||
import app.organicmaps.maplayer.isolines.IsolinesManager;
|
|
||||||
import app.organicmaps.maplayer.subway.SubwayManager;
|
|
||||||
import app.organicmaps.routing.NavigationService;
|
import app.organicmaps.routing.NavigationService;
|
||||||
import app.organicmaps.routing.RoutingController;
|
import app.organicmaps.routing.RoutingController;
|
||||||
|
import app.organicmaps.sdk.Map;
|
||||||
import app.organicmaps.sdk.OrganicMaps;
|
import app.organicmaps.sdk.OrganicMaps;
|
||||||
import app.organicmaps.util.Config;
|
import app.organicmaps.sdk.display.DisplayManager;
|
||||||
import app.organicmaps.util.ConnectionState;
|
import app.organicmaps.sdk.location.LocationHelper;
|
||||||
|
import app.organicmaps.sdk.location.LocationState;
|
||||||
|
import app.organicmaps.sdk.location.SensorHelper;
|
||||||
|
import app.organicmaps.sdk.location.TrackRecorder;
|
||||||
|
import app.organicmaps.sdk.maplayer.isolines.IsolinesManager;
|
||||||
|
import app.organicmaps.sdk.maplayer.subway.SubwayManager;
|
||||||
|
import app.organicmaps.sdk.util.Config;
|
||||||
|
import app.organicmaps.sdk.util.ConnectionState;
|
||||||
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.log.Logger;
|
import java.io.IOException;
|
||||||
import app.organicmaps.util.log.LogsManager;
|
import java.lang.ref.WeakReference;
|
||||||
|
|
||||||
public class MwmApplication extends Application implements Application.ActivityLifecycleCallbacks
|
public class MwmApplication extends Application implements Application.ActivityLifecycleCallbacks
|
||||||
{
|
{
|
||||||
@@ -48,22 +44,6 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
@NonNull
|
@NonNull
|
||||||
private OrganicMaps mOrganicMaps;
|
private OrganicMaps mOrganicMaps;
|
||||||
|
|
||||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
|
||||||
@NonNull
|
|
||||||
private SubwayManager mSubwayManager;
|
|
||||||
|
|
||||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
|
||||||
@NonNull
|
|
||||||
private IsolinesManager mIsolinesManager;
|
|
||||||
|
|
||||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
|
||||||
@NonNull
|
|
||||||
private LocationHelper mLocationHelper;
|
|
||||||
|
|
||||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
|
||||||
@NonNull
|
|
||||||
private SensorHelper mSensorHelper;
|
|
||||||
|
|
||||||
@SuppressWarnings("NotNullFieldNotInitialized")
|
@SuppressWarnings("NotNullFieldNotInitialized")
|
||||||
@NonNull
|
@NonNull
|
||||||
private DisplayManager mDisplayManager;
|
private DisplayManager mDisplayManager;
|
||||||
@@ -71,6 +51,10 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
@Nullable
|
@Nullable
|
||||||
private WeakReference<Activity> mTopActivity;
|
private WeakReference<Activity> mTopActivity;
|
||||||
|
|
||||||
|
@SuppressWarnings("NotNullFieldNotInitialized")
|
||||||
|
@NonNull
|
||||||
|
public static MwmApplication sInstance;
|
||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
@Nullable
|
@Nullable
|
||||||
public Activity getTopActivity()
|
public Activity getTopActivity()
|
||||||
@@ -81,25 +65,25 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
@NonNull
|
@NonNull
|
||||||
public SubwayManager getSubwayManager()
|
public SubwayManager getSubwayManager()
|
||||||
{
|
{
|
||||||
return mSubwayManager;
|
return getOrganicMaps().getSubwayManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public IsolinesManager getIsolinesManager()
|
public IsolinesManager getIsolinesManager()
|
||||||
{
|
{
|
||||||
return mIsolinesManager;
|
return getOrganicMaps().getIsolinesManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public LocationHelper getLocationHelper()
|
public LocationHelper getLocationHelper()
|
||||||
{
|
{
|
||||||
return mLocationHelper;
|
return getOrganicMaps().getLocationHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public SensorHelper getSensorHelper()
|
public SensorHelper getSensorHelper()
|
||||||
{
|
{
|
||||||
return mSensorHelper;
|
return getOrganicMaps().getSensorHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -120,13 +104,10 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
return (MwmApplication) context.getApplicationContext();
|
return (MwmApplication) context.getApplicationContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
public static MwmApplication sInstance;
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static SharedPreferences prefs(@NonNull Context context)
|
public static SharedPreferences prefs(@NonNull Context context)
|
||||||
{
|
{
|
||||||
return context.getSharedPreferences(context.getString(R.string.pref_file_name), MODE_PRIVATE);
|
return from(context).getOrganicMaps().getPreferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -139,10 +120,6 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
|
|
||||||
mOrganicMaps = new OrganicMaps(getApplicationContext());
|
mOrganicMaps = new OrganicMaps(getApplicationContext());
|
||||||
|
|
||||||
LogsManager.INSTANCE.initFileLogging(this);
|
|
||||||
|
|
||||||
Android7RootCertificateWorkaround.initializeIfNeeded(this);
|
|
||||||
|
|
||||||
ConnectionState.INSTANCE.initialize(this);
|
ConnectionState.INSTANCE.initialize(this);
|
||||||
|
|
||||||
DownloaderNotifier.createNotificationChannel(this);
|
DownloaderNotifier.createNotificationChannel(this);
|
||||||
@@ -150,10 +127,6 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
TrackRecordingService.createNotificationChannel(this);
|
TrackRecordingService.createNotificationChannel(this);
|
||||||
|
|
||||||
registerActivityLifecycleCallbacks(this);
|
registerActivityLifecycleCallbacks(this);
|
||||||
mSubwayManager = new SubwayManager(this);
|
|
||||||
mIsolinesManager = new IsolinesManager(this);
|
|
||||||
mLocationHelper = new LocationHelper(this);
|
|
||||||
mSensorHelper = new SensorHelper(this);
|
|
||||||
mDisplayManager = new DisplayManager();
|
mDisplayManager = new DisplayManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,8 +138,7 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private final LifecycleObserver mProcessLifecycleObserver = new DefaultLifecycleObserver()
|
private final LifecycleObserver mProcessLifecycleObserver = new DefaultLifecycleObserver() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(@NonNull LifecycleOwner owner)
|
public void onStart(@NonNull LifecycleOwner owner)
|
||||||
{
|
{
|
||||||
@@ -193,7 +165,7 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
{
|
{
|
||||||
Logger.d(TAG, "activity = " + activity);
|
Logger.d(TAG, "activity = " + activity);
|
||||||
Utils.showOnLockScreen(Config.isShowOnLockScreenEnabled(), activity);
|
Utils.showOnLockScreen(Config.isShowOnLockScreenEnabled(), activity);
|
||||||
mSensorHelper.setRotation(activity.getWindowManager().getDefaultDisplay().getRotation());
|
getSensorHelper().setRotation(activity.getWindowManager().getDefaultDisplay().getRotation());
|
||||||
mTopActivity = new WeakReference<>(activity);
|
mTopActivity = new WeakReference<>(activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +196,7 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
{
|
{
|
||||||
Logger.d(TAG);
|
Logger.d(TAG);
|
||||||
|
|
||||||
mLocationHelper.resumeLocationInForeground();
|
getLocationHelper().resumeLocationInForeground();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBackground()
|
private void onBackground()
|
||||||
@@ -244,7 +216,7 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger.i(LOCATION_TAG, "Stopping location in the background");
|
Logger.i(LOCATION_TAG, "Stopping location in the background");
|
||||||
mLocationHelper.stop();
|
getLocationHelper().stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,21 +5,19 @@ import android.animation.ValueAnimator;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.animation.AccelerateInterpolator;
|
import android.view.animation.AccelerateInterpolator;
|
||||||
|
|
||||||
import androidx.annotation.IntegerRes;
|
import androidx.annotation.IntegerRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import app.organicmaps.sdk.util.UiUtils;
|
||||||
import org.chromium.base.ObserverList;
|
import org.chromium.base.ObserverList;
|
||||||
|
|
||||||
import app.organicmaps.util.UiUtils;
|
|
||||||
|
|
||||||
class PanelAnimator
|
class PanelAnimator
|
||||||
{
|
{
|
||||||
private final MwmActivity mActivity;
|
private final MwmActivity mActivity;
|
||||||
private final ObserverList<MwmActivity.LeftAnimationTrackListener> mAnimationTrackListeners = new ObserverList<>();
|
private final ObserverList<MwmActivity.LeftAnimationTrackListener> mAnimationTrackListeners = new ObserverList<>();
|
||||||
private final ObserverList.RewindableIterator<MwmActivity.LeftAnimationTrackListener> mAnimationTrackIterator = mAnimationTrackListeners.rewindableIterator();
|
private final ObserverList.RewindableIterator<MwmActivity.LeftAnimationTrackListener> mAnimationTrackIterator =
|
||||||
|
mAnimationTrackListeners.rewindableIterator();
|
||||||
private final View mPanel;
|
private final View mPanel;
|
||||||
private final int mWidth;
|
private final int mWidth;
|
||||||
@IntegerRes
|
@IntegerRes
|
||||||
@@ -50,7 +48,8 @@ class PanelAnimator
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @param completionListener will be called before the fragment becomes actually visible */
|
/** @param completionListener will be called before the fragment becomes actually visible */
|
||||||
public void show(final Class<? extends Fragment> clazz, final Bundle args, @Nullable final Runnable completionListener)
|
public void show(final Class<? extends Fragment> clazz, final Bundle args,
|
||||||
|
@Nullable final Runnable completionListener)
|
||||||
{
|
{
|
||||||
if (isVisible())
|
if (isVisible())
|
||||||
{
|
{
|
||||||
@@ -78,8 +77,7 @@ class PanelAnimator
|
|||||||
|
|
||||||
ValueAnimator animator = ValueAnimator.ofFloat(-mWidth, 0.0f);
|
ValueAnimator animator = ValueAnimator.ofFloat(-mWidth, 0.0f);
|
||||||
animator.addUpdateListener(this::track);
|
animator.addUpdateListener(this::track);
|
||||||
animator.addListener(new UiUtils.SimpleAnimatorListener()
|
animator.addListener(new UiUtils.SimpleAnimatorListener() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation)
|
public void onAnimationEnd(Animator animation)
|
||||||
{
|
{
|
||||||
@@ -109,8 +107,7 @@ class PanelAnimator
|
|||||||
|
|
||||||
ValueAnimator animator = ValueAnimator.ofFloat(0.0f, -mWidth);
|
ValueAnimator animator = ValueAnimator.ofFloat(0.0f, -mWidth);
|
||||||
animator.addUpdateListener(this::track);
|
animator.addUpdateListener(this::track);
|
||||||
animator.addListener(new UiUtils.SimpleAnimatorListener()
|
animator.addListener(new UiUtils.SimpleAnimatorListener() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation)
|
public void onAnimationEnd(Animator animation)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.annotation.Keep;
|
import androidx.annotation.Keep;
|
||||||
@@ -21,20 +20,18 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.OnApplyWindowInsetsListener;
|
import androidx.core.view.OnApplyWindowInsetsListener;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
import app.organicmaps.display.DisplayManager;
|
|
||||||
import app.organicmaps.downloader.DownloaderActivity;
|
import app.organicmaps.downloader.DownloaderActivity;
|
||||||
import app.organicmaps.intent.Factory;
|
import app.organicmaps.intent.Factory;
|
||||||
import app.organicmaps.location.LocationHelper;
|
import app.organicmaps.sdk.display.DisplayManager;
|
||||||
import app.organicmaps.util.Config;
|
import app.organicmaps.sdk.location.LocationHelper;
|
||||||
import app.organicmaps.util.LocationUtils;
|
import app.organicmaps.sdk.util.Config;
|
||||||
|
import app.organicmaps.sdk.util.LocationUtils;
|
||||||
|
import app.organicmaps.sdk.util.concurrency.UiThread;
|
||||||
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
import app.organicmaps.util.SharingUtils;
|
import app.organicmaps.util.SharingUtils;
|
||||||
import app.organicmaps.util.ThemeUtils;
|
import app.organicmaps.util.ThemeUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.concurrency.UiThread;
|
|
||||||
import app.organicmaps.util.log.Logger;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -86,14 +83,14 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
mPermissionRequest = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(),
|
mPermissionRequest = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(),
|
||||||
result -> Config.setLocationRequested());
|
result -> Config.setLocationRequested());
|
||||||
mApiRequest = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
mApiRequest = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||||
setResult(result.getResultCode(), result.getData());
|
setResult(result.getResultCode(), result.getData());
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
mShareLauncher = SharingUtils.RegisterLauncher(this);
|
mShareLauncher = SharingUtils.RegisterLauncher(this);
|
||||||
|
|
||||||
if (DisplayManager.from(this).isCarDisplayUsed())
|
if (MwmApplication.from(this).getDisplayManager().isCarDisplayUsed())
|
||||||
{
|
{
|
||||||
startActivity(new Intent(this, MapPlaceholderActivity.class));
|
startActivity(new Intent(this, MapPlaceholderActivity.class));
|
||||||
finish();
|
finish();
|
||||||
@@ -109,10 +106,7 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
if (!Config.isLocationRequested() && !LocationUtils.checkLocationPermission(this))
|
if (!Config.isLocationRequested() && !LocationUtils.checkLocationPermission(this))
|
||||||
{
|
{
|
||||||
Logger.d(TAG, "Requesting location permissions");
|
Logger.d(TAG, "Requesting location permissions");
|
||||||
mPermissionRequest.launch(new String[]{
|
mPermissionRequest.launch(new String[] {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION});
|
||||||
ACCESS_COARSE_LOCATION,
|
|
||||||
ACCESS_FINE_LOCATION
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,19 +134,13 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
{
|
{
|
||||||
mCanceled = true;
|
mCanceled = true;
|
||||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
R.string.report_a_bug,
|
R.string.report_a_bug,
|
||||||
(dialog, which) -> Utils.sendBugReport(
|
(dialog, which) -> Utils.sendBugReport(mShareLauncher, this, "Fatal Error", Log.getStackTraceString(error)))
|
||||||
mShareLauncher,
|
.setCancelable(false)
|
||||||
this,
|
.show();
|
||||||
"Fatal Error",
|
|
||||||
Log.getStackTraceString(error)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.setCancelable(false)
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
@@ -162,7 +150,8 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
asyncContinue = app.initOrganicMaps(this::processNavigation);
|
asyncContinue = app.initOrganicMaps(this::processNavigation);
|
||||||
} catch (IOException error)
|
}
|
||||||
|
catch (IOException error)
|
||||||
{
|
{
|
||||||
showFatalErrorDialog(R.string.dialog_error_storage_title, R.string.dialog_error_storage_message, error);
|
showFatalErrorDialog(R.string.dialog_error_storage_title, R.string.dialog_error_storage_message, error);
|
||||||
return;
|
return;
|
||||||
@@ -195,9 +184,12 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
// https://github.com/organicmaps/organicmaps/issues/6944
|
// https://github.com/organicmaps/organicmaps/issues/6944
|
||||||
final Intent intent = Objects.requireNonNull(getIntent());
|
final Intent intent = Objects.requireNonNull(getIntent());
|
||||||
|
|
||||||
if (isManageSpaceActivity(intent)) {
|
if (isManageSpaceActivity(intent))
|
||||||
|
{
|
||||||
intent.setComponent(new ComponentName(this, DownloaderActivity.class));
|
intent.setComponent(new ComponentName(this, DownloaderActivity.class));
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
intent.setComponent(new ComponentName(this, DownloadResourcesLegacyActivity.class));
|
intent.setComponent(new ComponentName(this, DownloadResourcesLegacyActivity.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,11 +211,14 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isManageSpaceActivity(Intent intent) {
|
private boolean isManageSpaceActivity(Intent intent)
|
||||||
|
{
|
||||||
var component = intent.getComponent();
|
var component = intent.getComponent();
|
||||||
|
|
||||||
if (!Intent.ACTION_VIEW.equals(intent.getAction())) return false;
|
if (!Intent.ACTION_VIEW.equals(intent.getAction()))
|
||||||
if (component == null) return false;
|
return false;
|
||||||
|
if (component == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
var manageSpaceActivityName = BuildConfig.APPLICATION_ID + ".ManageSpaceActivity";
|
var manageSpaceActivityName = BuildConfig.APPLICATION_ID + ".ManageSpaceActivity";
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,9 @@ import android.net.Uri;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import app.organicmaps.base.OnBackPressListener;
|
import app.organicmaps.base.OnBackPressListener;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.sdk.util.UiUtils;
|
||||||
|
|
||||||
public abstract class WebContainerDelegate implements OnBackPressListener
|
public abstract class WebContainerDelegate implements OnBackPressListener
|
||||||
{
|
{
|
||||||
@@ -21,8 +19,7 @@ public abstract class WebContainerDelegate implements OnBackPressListener
|
|||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
private void initWebView(String url)
|
private void initWebView(String url)
|
||||||
{
|
{
|
||||||
mWebView.setWebViewClient(new WebViewClient()
|
mWebView.setWebViewClient(new WebViewClient() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url)
|
public void onPageFinished(WebView view, String url)
|
||||||
{
|
{
|
||||||
@@ -37,7 +34,7 @@ public abstract class WebContainerDelegate implements OnBackPressListener
|
|||||||
{
|
{
|
||||||
MailTo parser = MailTo.parse(url);
|
MailTo parser = MailTo.parse(url);
|
||||||
doStartActivity(new Intent(Intent.ACTION_SEND)
|
doStartActivity(new Intent(Intent.ACTION_SEND)
|
||||||
.putExtra(Intent.EXTRA_EMAIL, new String[] { parser.getTo() })
|
.putExtra(Intent.EXTRA_EMAIL, new String[] {parser.getTo()})
|
||||||
.putExtra(Intent.EXTRA_TEXT, parser.getBody())
|
.putExtra(Intent.EXTRA_TEXT, parser.getBody())
|
||||||
.putExtra(Intent.EXTRA_SUBJECT, parser.getSubject())
|
.putExtra(Intent.EXTRA_SUBJECT, parser.getSubject())
|
||||||
.putExtra(Intent.EXTRA_CC, parser.getCc())
|
.putExtra(Intent.EXTRA_CC, parser.getCc())
|
||||||
@@ -46,8 +43,7 @@ public abstract class WebContainerDelegate implements OnBackPressListener
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
doStartActivity(new Intent(Intent.ACTION_VIEW)
|
doStartActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url)));
|
||||||
.setData(Uri.parse(url)));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,18 +4,23 @@ import android.content.Context;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.SimpleExpandableListAdapter;
|
import android.widget.SimpleExpandableListAdapter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables child selections, also fixes bug with SimpleExpandableListAdapter not switching expandedGroupLayout and collapsedGroupLayout correctly.
|
* Disables child selections, also fixes bug with SimpleExpandableListAdapter not switching expandedGroupLayout and
|
||||||
|
* collapsedGroupLayout correctly.
|
||||||
*/
|
*/
|
||||||
public class DisabledChildSimpleExpandableListAdapter extends SimpleExpandableListAdapter
|
public class DisabledChildSimpleExpandableListAdapter extends SimpleExpandableListAdapter
|
||||||
{
|
{
|
||||||
public DisabledChildSimpleExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout, String[] childFrom, int[] childTo)
|
public DisabledChildSimpleExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData,
|
||||||
|
int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom,
|
||||||
|
int[] groupTo,
|
||||||
|
List<? extends List<? extends Map<String, ?>>> childData,
|
||||||
|
int childLayout, String[] childFrom, int[] childTo)
|
||||||
{
|
{
|
||||||
super(context, groupData, expandedGroupLayout, collapsedGroupLayout, groupFrom, groupTo, childData, childLayout, childFrom, childTo);
|
super(context, groupData, expandedGroupLayout, collapsedGroupLayout, groupFrom, groupTo, childData, childLayout,
|
||||||
|
childFrom, childTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -29,8 +34,7 @@ public class DisabledChildSimpleExpandableListAdapter extends SimpleExpandableLi
|
|||||||
* See http://stackoverflow.com/questions/19520037/simpleexpandablelistadapter-and-expandedgrouplayout for details
|
* See http://stackoverflow.com/questions/19520037/simpleexpandablelistadapter-and-expandedgrouplayout for details
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
|
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
|
||||||
ViewGroup parent)
|
|
||||||
{
|
{
|
||||||
return super.getGroupView(groupPosition, isExpanded, null, parent);
|
return super.getGroupView(groupPosition, isExpanded, null, parent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package app.organicmaps.adapter;
|
package app.organicmaps.adapter;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public interface OnItemClickListener<T>
|
public interface OnItemClickListener<T>
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
package app.organicmaps.api;
|
|
||||||
|
|
||||||
|
|
||||||
import androidx.annotation.Keep;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents url_scheme::SearchRequest from core.
|
|
||||||
*/
|
|
||||||
// Used by JNI.
|
|
||||||
@Keep
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public final class ParsedSearchRequest
|
|
||||||
{
|
|
||||||
@NonNull
|
|
||||||
public final String mQuery;
|
|
||||||
@Nullable
|
|
||||||
public final String mLocale;
|
|
||||||
public final double mLat;
|
|
||||||
public final double mLon;
|
|
||||||
public final boolean mIsSearchOnMap;
|
|
||||||
|
|
||||||
public ParsedSearchRequest(@NonNull String query, @Nullable String locale, double lat, double lon, boolean isSearchOnMap) {
|
|
||||||
this.mQuery = query;
|
|
||||||
this.mLocale = locale;
|
|
||||||
this.mLat = lat;
|
|
||||||
this.mLon = lon;
|
|
||||||
this.mIsSearchOnMap = isSearchOnMap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +1,21 @@
|
|||||||
package app.organicmaps.background;
|
package app.organicmaps.background;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.work.Constraints;
|
import androidx.work.Constraints;
|
||||||
|
import androidx.work.ExistingWorkPolicy;
|
||||||
import androidx.work.NetworkType;
|
import androidx.work.NetworkType;
|
||||||
import androidx.work.OneTimeWorkRequest;
|
import androidx.work.OneTimeWorkRequest;
|
||||||
import androidx.work.WorkManager;
|
import androidx.work.WorkManager;
|
||||||
import androidx.work.WorkRequest;
|
|
||||||
import androidx.work.Worker;
|
import androidx.work.Worker;
|
||||||
import androidx.work.WorkerParameters;
|
import androidx.work.WorkerParameters;
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.editor.Editor;
|
import app.organicmaps.sdk.editor.Editor;
|
||||||
import app.organicmaps.editor.OsmOAuth;
|
import app.organicmaps.sdk.editor.OsmOAuth;
|
||||||
import app.organicmaps.util.log.Logger;
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
|
|
||||||
public class OsmUploadWork extends Worker
|
public class OsmUploadWork extends Worker
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final String TAG = OsmUploadWork.class.getSimpleName();
|
private static final String TAG = OsmUploadWork.class.getSimpleName();
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final WorkerParameters mWorkerParameters;
|
private final WorkerParameters mWorkerParameters;
|
||||||
@@ -34,11 +32,11 @@ public class OsmUploadWork extends Worker
|
|||||||
*/
|
*/
|
||||||
public static void startActionUploadOsmChanges(@NonNull Context context)
|
public static void startActionUploadOsmChanges(@NonNull Context context)
|
||||||
{
|
{
|
||||||
if (Editor.nativeHasSomethingToUpload() && OsmOAuth.isAuthorized(context))
|
if (Editor.nativeHasSomethingToUpload() && OsmOAuth.isAuthorized())
|
||||||
{
|
{
|
||||||
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
||||||
final WorkRequest wr = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c).build();
|
final OneTimeWorkRequest wr = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c).build();
|
||||||
WorkManager.getInstance(context).enqueue(wr);
|
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,13 +44,12 @@ public class OsmUploadWork extends Worker
|
|||||||
@Override
|
@Override
|
||||||
public Result doWork()
|
public Result doWork()
|
||||||
{
|
{
|
||||||
final MwmApplication app = MwmApplication.from(mContext);
|
if (!MwmApplication.from(mContext).getOrganicMaps().arePlatformAndCoreInitialized())
|
||||||
if (!app.getOrganicMaps().arePlatformAndCoreInitialized())
|
|
||||||
{
|
{
|
||||||
Logger.w(TAG, "Application is not initialized, ignoring " + mWorkerParameters);
|
Logger.w(TAG, "Application is not initialized, ignoring " + mWorkerParameters);
|
||||||
return Result.failure();
|
return Result.failure();
|
||||||
}
|
}
|
||||||
Editor.uploadChanges(mContext);
|
Editor.uploadChanges();
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package app.organicmaps.backup;
|
package app.organicmaps.backup;
|
||||||
|
|
||||||
|
import static app.organicmaps.sdk.util.StorageUtils.isFolderWritable;
|
||||||
import static app.organicmaps.settings.BackupSettingsFragment.MAX_BACKUPS_DEFAULT_COUNT;
|
import static app.organicmaps.settings.BackupSettingsFragment.MAX_BACKUPS_DEFAULT_COUNT;
|
||||||
import static app.organicmaps.settings.BackupSettingsFragment.MAX_BACKUPS_KEY;
|
import static app.organicmaps.settings.BackupSettingsFragment.MAX_BACKUPS_KEY;
|
||||||
import static app.organicmaps.util.StorageUtils.isFolderWritable;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -13,30 +12,23 @@ import android.text.SpannableStringBuilder;
|
|||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.style.AbsoluteSizeSpan;
|
import android.text.style.AbsoluteSizeSpan;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.documentfile.provider.DocumentFile;
|
import androidx.documentfile.provider.DocumentFile;
|
||||||
|
import app.organicmaps.R;
|
||||||
import java.io.File;
|
import app.organicmaps.sdk.util.UiUtils;
|
||||||
import java.io.FileInputStream;
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
|
||||||
import app.organicmaps.util.UiUtils;
|
|
||||||
import app.organicmaps.util.log.Logger;
|
|
||||||
|
|
||||||
public class BackupUtils
|
public class BackupUtils
|
||||||
{
|
{
|
||||||
private static final String BACKUP_PREFIX = "backup_";
|
private static final String BACKUP_PREFIX = "backup_";
|
||||||
private static final String BACKUP_EXTENSION = ".kmz";
|
private static final String BACKUP_EXTENSION = ".kmz";
|
||||||
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss").withLocale(Locale.US);
|
private static final DateTimeFormatter DATE_FORMATTER =
|
||||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss").withLocale(Locale.US);
|
||||||
private static final String TAG = BackupUtils.class.getSimpleName();
|
private static final String TAG = BackupUtils.class.getSimpleName();
|
||||||
|
|
||||||
public static CharSequence formatReadableFolderPath(Context context, @NonNull Uri uri)
|
public static CharSequence formatReadableFolderPath(Context context, @NonNull Uri uri)
|
||||||
@@ -63,8 +55,10 @@ public class BackupUtils
|
|||||||
volumeName = context.getString(R.string.maps_storage_removable);
|
volumeName = context.getString(R.string.maps_storage_removable);
|
||||||
|
|
||||||
SpannableStringBuilder sb = new SpannableStringBuilder();
|
SpannableStringBuilder sb = new SpannableStringBuilder();
|
||||||
sb.append(volumeName + ": \n", new AbsoluteSizeSpan(UiUtils.dimen(context, R.dimen.text_size_body_3)), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
sb.append(volumeName + ": \n", new AbsoluteSizeSpan(UiUtils.dimen(context, R.dimen.text_size_body_3)),
|
||||||
sb.append("/" + subPath, new AbsoluteSizeSpan(UiUtils.dimen(context, R.dimen.text_size_body_4)), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
sb.append("/" + subPath, new AbsoluteSizeSpan(UiUtils.dimen(context, R.dimen.text_size_body_4)),
|
||||||
|
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
return sb;
|
return sb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,12 +68,14 @@ public class BackupUtils
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Integer.parseInt(rawValue);
|
return Integer.parseInt(rawValue);
|
||||||
} catch (NumberFormatException e)
|
}
|
||||||
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
Logger.e(TAG, "Failed to parse max backups count, raw value: " + rawValue + " set to default: " + MAX_BACKUPS_DEFAULT_COUNT, e);
|
Logger.e(
|
||||||
prefs.edit()
|
TAG,
|
||||||
.putString(MAX_BACKUPS_KEY, String.valueOf(MAX_BACKUPS_DEFAULT_COUNT))
|
"Failed to parse max backups count, raw value: " + rawValue + " set to default: " + MAX_BACKUPS_DEFAULT_COUNT,
|
||||||
.apply();
|
e);
|
||||||
|
prefs.edit().putString(MAX_BACKUPS_KEY, String.valueOf(MAX_BACKUPS_DEFAULT_COUNT)).apply();
|
||||||
return MAX_BACKUPS_DEFAULT_COUNT;
|
return MAX_BACKUPS_DEFAULT_COUNT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||