mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
Merge tag 'v1.4.27-RC2' into merge-v1.4.27
Change-Id: I6fba3a97a37a4e0a908289272ea9dec2efc85d00 Conflicts: .gitignore matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/util/MatrixItem.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ChunkEntityHelper.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ReadQueries.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryDataSource.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryUpdater.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TokenChunkEventPersistor.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/RoomSyncAccountDataHandler.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/AccountDataAPI.kt matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/database/RealmMigrator.kt tmp_sc_fastlane/README.md vector-config/src/main/res/values/config.xml vector/build.gradle vector/src/fdroid/AndroidManifest.xml vector/src/fdroid/java/im/vector/app/push/fcm/FcmHelper.kt vector/src/fdroid/java/im/vector/app/push/fcm/NotificationTroubleshootTestManagerFactory.kt vector/src/gplay/AndroidManifest.xml vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestFirebaseToken.kt vector/src/gplay/java/im/vector/app/push/fcm/FcmHelper.kt vector/src/gplay/java/im/vector/app/push/fcm/NotificationTroubleshootTestManagerFactory.kt vector/src/main/java/im/vector/app/AppStateHandler.kt vector/src/main/java/im/vector/app/VectorApplication.kt vector/src/main/java/im/vector/app/core/pushers/PushersManager.kt vector/src/main/java/im/vector/app/core/pushers/VectorMessagingReceiver.kt vector/src/main/java/im/vector/app/core/receiver/KeepInternalDistributor.kt vector/src/main/java/im/vector/app/core/receiver/OnApplicationUpgradeOrRebootReceiver.kt vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiPresenter.kt vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCallManager.kt vector/src/main/java/im/vector/app/features/home/HomeActivity.kt vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt vector/src/main/java/im/vector/app/features/home/HomeDetailViewModel.kt vector/src/main/java/im/vector/app/features/home/HomeDetailViewState.kt vector/src/main/java/im/vector/app/features/home/UnreadMessagesSharedViewModel.kt vector/src/main/java/im/vector/app/features/home/room/detail/ScrollOnNewMessageCallback.kt vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MergedHeaderItemFactory.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MatrixItemColorProvider.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/reactions/ViewReactionsEpoxyController.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt vector/src/main/java/im/vector/app/features/home/room/detail/timeline/url/PreviewUrlView.kt vector/src/main/java/im/vector/app/features/home/room/list/ChronologicalRoomComparator.kt vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt vector/src/main/java/im/vector/app/features/html/PillImageSpan.kt vector/src/main/java/im/vector/app/features/link/LinkHandlerActivity.kt vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt vector/src/main/java/im/vector/app/features/navigation/Navigator.kt vector/src/main/java/im/vector/app/features/permalink/PermalinkHandler.kt vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewState.kt vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushFromPushGateway.kt vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestTokenRegistration.kt vector/src/main/java/im/vector/app/features/themes/ActivityOtherThemes.kt vector/src/main/java/im/vector/app/features/themes/ThemeUtils.kt vector/src/main/java/im/vector/app/features/ui/SharedPreferencesUiStateRepository.kt vector/src/main/res/xml/vector_settings_notifications.xml
This commit is contained in:
commit
204e111c1c
1484 changed files with 29860 additions and 11491 deletions
|
@ -764,7 +764,7 @@ ij_groovy_while_on_new_line = false
|
|||
ij_groovy_wrap_long_lines = false
|
||||
|
||||
[{*.gradle.kts,*.kt,*.kts,*.main.kts}]
|
||||
ij_kotlin_align_in_columns_case_branch = true
|
||||
ij_kotlin_align_in_columns_case_branch = false
|
||||
ij_kotlin_align_multiline_binary_operation = false
|
||||
ij_kotlin_align_multiline_extends_list = false
|
||||
ij_kotlin_align_multiline_method_parentheses = false
|
||||
|
@ -810,8 +810,8 @@ ij_kotlin_line_comment_add_space = false
|
|||
ij_kotlin_line_comment_at_first_column = true
|
||||
ij_kotlin_method_annotation_wrap = split_into_lines
|
||||
ij_kotlin_method_call_chain_wrap = off
|
||||
ij_kotlin_method_parameters_new_line_after_left_paren = false
|
||||
ij_kotlin_method_parameters_right_paren_on_new_line = false
|
||||
ij_kotlin_method_parameters_new_line_after_left_paren = true
|
||||
ij_kotlin_method_parameters_right_paren_on_new_line = true
|
||||
ij_kotlin_method_parameters_wrap = off
|
||||
ij_kotlin_name_count_to_use_star_import = 2147483647
|
||||
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
|
||||
|
|
11
.github/ISSUE_TEMPLATE/bug.yml
vendored
11
.github/ISSUE_TEMPLATE/bug.yml
vendored
|
@ -73,3 +73,14 @@ body:
|
|||
- 'No'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: pr
|
||||
attributes:
|
||||
label: Are you willing to provide a PR?
|
||||
description: |
|
||||
Providing a PR can drastically speed up the process of fixing this bug. Don't worry, it's still OK to answer 'No' :).
|
||||
options:
|
||||
- 'Yes'
|
||||
- 'No'
|
||||
validations:
|
||||
required: true
|
||||
|
|
11
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
11
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
|
@ -34,3 +34,14 @@ body:
|
|||
placeholder: Is there anything else you'd like to add?
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
id: pr
|
||||
attributes:
|
||||
label: Are you willing to provide a PR?
|
||||
description: |
|
||||
Don't worry, it's still OK to answer 'No' :).
|
||||
options:
|
||||
- 'Yes'
|
||||
- 'No'
|
||||
validations:
|
||||
required: true
|
||||
|
|
34
.github/ISSUE_TEMPLATE/release.yml
vendored
34
.github/ISSUE_TEMPLATE/release.yml
vendored
|
@ -49,24 +49,34 @@ body:
|
|||
|
||||
### Once tested and validated internally
|
||||
|
||||
- [ ] Create a new beta release on the GooglePlay console and upload the 4 signed Apks.
|
||||
- [ ] Create a new open testing release on the GooglePlay console and upload the 4 signed Apks.
|
||||
- [ ] Check that the version codes are correct
|
||||
- [ ] Copy the fastlane change to the GooglePlay console in the section en-GB.
|
||||
- [ ] Push to beta release to 100% of the users
|
||||
- [ ] Notify the F-Droid team so that they can schedule the publication on F-Droid
|
||||
- [ ] Push the open testing release to 100% of the users
|
||||
- [ ] Notify the F-Droid team [here](https://matrix.to/#/!LAAuJLQXYHjMNWKrCK:matrix.org?via=matrix.org&via=bubu1.eu&via=lant.uk) so that they can schedule the publication on F-Droid
|
||||
- [ ] The application is available to the PlayStore testers (live). Google can take between 1 hour and up to 7 days to approve the release.
|
||||
- [ ] The application is available to the F-Droid users.
|
||||
|
||||
### Once Live on PlayStore
|
||||
### Once open testing is live on PlayStore
|
||||
|
||||
- [ ] Ping the Android public room and update its topic
|
||||
- [ ] Add an entry in the internal diary
|
||||
|
||||
### After at least 2 days
|
||||
### Once Live on F-Droid
|
||||
|
||||
- [ ] Update the Android public room topic
|
||||
|
||||
### After at least 2 days (generally next Monday)
|
||||
|
||||
- [ ] Check the [rageshakes](https://github.com/matrix-org/element-android-rageshakes/issues)
|
||||
- [ ] Check the crash reports on the GooglePlay console
|
||||
- [ ] Check the Android Element room for any reported issues on the new version
|
||||
- [ ] If all is OK, push to production and notify Markus (Bubu) to release the F-Droid version
|
||||
- [ ] Ping the Android public room and update its topic with the new available version
|
||||
- [ ] If all is OK, promote the open testing release to production. Generally using a 100% roll out, but can be a smaller value depending on the release content.
|
||||
- [ ] The application is available to the PlayStore users (live). Google can take (again!) between 1 hour and up to 7 days to approve the release.
|
||||
|
||||
### Once production is live on PlayStore
|
||||
|
||||
- [ ] Ping the Android public room and update its topic
|
||||
- [ ] Add an entry in the internal diary
|
||||
|
||||
### Android SDK2
|
||||
|
||||
|
@ -90,12 +100,20 @@ body:
|
|||
|
||||
##### Release on MavenCentral
|
||||
|
||||
- [ ] Checkout the branch `main`
|
||||
- [ ] Run the command `./gradlew publish --no-daemon --no-parallel`. You'll need some non-public element to do so
|
||||
- [ ] Run the command `./gradlew closeAndReleaseRepository`. If it is working well, you can jump directly to the final step of this section.
|
||||
|
||||
If `./gradlew closeAndReleaseRepository` fails (for instance, several repositories are waiting to be handled), you have to close and release the repository manually. Do the following steps:
|
||||
|
||||
- [ ] Connect to https://s01.oss.sonatype.org
|
||||
- [ ] Click on Staging Repositories and check the the files have been uploaded
|
||||
- [ ] Click on close
|
||||
- [ ] Wait (check Activity tab until step "Repository closed" is displayed)
|
||||
- [ ] Click on release. The staging repository will disappear
|
||||
|
||||
Final step
|
||||
|
||||
- [ ] Check that the release is available in https://repo1.maven.org/maven2/org/matrix/android/matrix-android-sdk2/ (it can take a few minutes)
|
||||
|
||||
##### Release on GitHub
|
||||
|
|
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
|
@ -8,8 +8,9 @@ on:
|
|||
# Enrich gradle.properties for CI/CD
|
||||
env:
|
||||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx2g
|
||||
-Porg.gradle.jvmargs=-Xmx4g
|
||||
-Porg.gradle.parallel=false
|
||||
--no-daemon
|
||||
|
||||
jobs:
|
||||
debug:
|
||||
|
@ -46,8 +47,9 @@ jobs:
|
|||
release:
|
||||
name: Build unsigned GPlay APKs
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
# Only runs on main, no concurrency.
|
||||
concurrency:
|
||||
group: ${{ github.ref == 'refs/head/main' && format('build-release-apk-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('build-release-apk-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/head/main' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
|
@ -59,7 +61,7 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Assemble GPlay unsigned apk
|
||||
run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace
|
||||
run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace
|
||||
- name: Upload Gplay unsigned APKs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -67,4 +69,26 @@ jobs:
|
|||
path: |
|
||||
vector/build/outputs/apk/*/release/*.apk
|
||||
|
||||
# TODO add exodus checks
|
||||
exodus:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
steps:
|
||||
- name: Obtain apk from artifact
|
||||
id: download
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: vector-gplay-release-unsigned
|
||||
- name: Show apks in artifact
|
||||
run: ls -R ${{steps.download.outputs.download-path}}
|
||||
- name: Execute exodus-standalone
|
||||
uses: docker://exodusprivacy/exodus-standalone:latest
|
||||
with:
|
||||
args: /github/workspace/gplay/release/vector-gplay-universal-release-unsigned.apk -j -o /github/workspace/exodus.json
|
||||
- name: Upload exodus json report
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: exodus.json
|
||||
path: |
|
||||
exodus.json
|
||||
- name: Check for trackers
|
||||
run: "jq -e '.trackers == []' exodus.json > /dev/null || { echo '::error static analysis identified user tracking library' ; exit 1; }"
|
||||
|
|
226
.github/workflows/post-pr.yml
vendored
226
.github/workflows/post-pr.yml
vendored
|
@ -13,6 +13,7 @@ env:
|
|||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx4g
|
||||
-Porg.gradle.parallel=false
|
||||
--no-daemon
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -29,200 +30,6 @@ jobs:
|
|||
steps:
|
||||
- run: echo "Run those tests!" # no-op success
|
||||
|
||||
# Run Android Tests
|
||||
integration-tests:
|
||||
name: Matrix SDK - Running Integration Tests
|
||||
needs: should-i-run
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
api-level: [ 28 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.8
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Start synapse server
|
||||
uses: michaelkaye/setup-matrix-synapse@v1.0.3
|
||||
with:
|
||||
uploadLogs: true
|
||||
httpPort: 8080
|
||||
disableRateLimiting: true
|
||||
public_baseurl: "http://10.0.2.2:8080/"
|
||||
# package: org.matrix.android.sdk.session
|
||||
- name: Run integration tests for Matrix SDK [org.matrix.android.sdk.session] API[${{ matrix.api-level }}]
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
adb root
|
||||
adb logcat -c
|
||||
touch emulator-session.log
|
||||
chmod 777 emulator-session.log
|
||||
adb logcat >> emulator-session.log &
|
||||
./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.session' matrix-sdk-android:connectedDebugAndroidTest
|
||||
- name: Read Results [org.matrix.android.sdk.session]
|
||||
if: always()
|
||||
id: get-comment-body-session
|
||||
run: python3 ./tools/ci/render_test_output.py session ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml
|
||||
- name: Remove adb logcat
|
||||
if: always()
|
||||
run: pkill -9 adb
|
||||
- name: Run integration tests for Matrix SDK [org.matrix.android.sdk.account] API[${{ matrix.api-level }}]
|
||||
if: always()
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
adb root
|
||||
adb logcat -c
|
||||
touch emulator-account.log
|
||||
chmod 777 emulator-account.log
|
||||
adb logcat >> emulator-account.log &
|
||||
./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.account' matrix-sdk-android:connectedDebugAndroidTest
|
||||
- name: Read Results [org.matrix.android.sdk.account]
|
||||
if: always()
|
||||
id: get-comment-body-account
|
||||
run: python3 ./tools/ci/render_test_output.py account ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml
|
||||
- name: Remove adb logcat
|
||||
if: always()
|
||||
run: pkill -9 adb
|
||||
# package: org.matrix.android.sdk.internal
|
||||
- name: Run integration tests for Matrix SDK [org.matrix.android.sdk.internal] API[${{ matrix.api-level }}]
|
||||
if: always()
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
adb root
|
||||
adb logcat -c
|
||||
touch emulator-internal.log
|
||||
chmod 777 emulator-internal.log
|
||||
adb logcat >> emulator-internal.log &
|
||||
./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.internal' matrix-sdk-android:connectedDebugAndroidTest
|
||||
- name: Read Results [org.matrix.android.sdk.internal]
|
||||
if: always()
|
||||
id: get-comment-body-internal
|
||||
run: python3 ./tools/ci/render_test_output.py internal ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml
|
||||
- name: Remove adb logcat
|
||||
if: always()
|
||||
run: pkill -9 adb
|
||||
# package: org.matrix.android.sdk.ordering
|
||||
- name: Run integration tests for Matrix SDK [org.matrix.android.sdk.ordering] API[${{ matrix.api-level }}]
|
||||
if: always()
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
adb root
|
||||
adb logcat -c
|
||||
touch emulator-ordering.log
|
||||
chmod 777 emulator-ordering.log
|
||||
adb logcat >> emulator-ordering.log &
|
||||
./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.ordering' matrix-sdk-android:connectedDebugAndroidTest
|
||||
- name: Read Results [org.matrix.android.sdk.ordering]
|
||||
if: always()
|
||||
id: get-comment-body-ordering
|
||||
run: python3 ./tools/ci/render_test_output.py ordering ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml
|
||||
- name: Remove adb logcat
|
||||
if: always()
|
||||
run: pkill -9 adb
|
||||
# package: class PermalinkParserTest
|
||||
- name: Run integration tests for Matrix SDK class [org.matrix.android.sdk.PermalinkParserTest] API[${{ matrix.api-level }}]
|
||||
if: always()
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
adb root
|
||||
adb logcat -c
|
||||
touch emulator-permalink.log
|
||||
chmod 777 emulator-permalink.log
|
||||
adb logcat >> emulator-permalink.log &
|
||||
./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.class='org.matrix.android.sdk.PermalinkParserTest' matrix-sdk-android:connectedDebugAndroidTest
|
||||
- name: Read Results [org.matrix.android.sdk.PermalinkParserTest]
|
||||
if: always()
|
||||
id: get-comment-body-permalink
|
||||
run: python3 ./tools/ci/render_test_output.py permalink ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml
|
||||
- name: Remove adb logcat
|
||||
if: always()
|
||||
run: pkill -9 adb
|
||||
# package: class PermalinkParserTest
|
||||
- name: Find Comment
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
uses: peter-evans/find-comment@v2
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: 'github-actions[bot]'
|
||||
body-includes: Integration Tests Results
|
||||
- name: Publish results to PR
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
### Matrix SDK
|
||||
## Integration Tests Results:
|
||||
- `[org.matrix.android.sdk.session]`<br>${{ steps.get-comment-body-session.outputs.session }}
|
||||
- `[org.matrix.android.sdk.account]`<br>${{ steps.get-comment-body-account.outputs.account }}
|
||||
- `[org.matrix.android.sdk.internal]`<br>${{ steps.get-comment-body-internal.outputs.internal }}
|
||||
- `[org.matrix.android.sdk.ordering]`<br>${{ steps.get-comment-body-ordering.outputs.ordering }}
|
||||
- `[org.matrix.android.sdk.PermalinkParserTest]`<br>${{ steps.get-comment-body-permalink.outputs.permalink }}
|
||||
edit-mode: replace
|
||||
- name: Upload Test Report Log
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: integrationtest-error-results
|
||||
path: |
|
||||
emulator-permalink.log
|
||||
emulator-internal.log
|
||||
emulator-ordering.log
|
||||
emulator-account.log
|
||||
emulator-session.log
|
||||
|
||||
ui-tests:
|
||||
name: UI Tests (Synapse)
|
||||
needs: should-i-run
|
||||
|
@ -235,7 +42,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
- uses: actions/cache@v3
|
||||
|
@ -282,42 +89,13 @@ jobs:
|
|||
emulator.log
|
||||
failure_screenshots/
|
||||
|
||||
codecov-units:
|
||||
name: Unit tests with code coverage
|
||||
needs: should-i-run
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- run: ./gradlew allCodeCoverageReport $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload Codecov data
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: codecov-xml
|
||||
path: |
|
||||
build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|
||||
|
||||
# Notify the channel about delayed failures
|
||||
notify:
|
||||
name: Notify matrix
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- should-i-run
|
||||
- integration-tests
|
||||
- ui-tests
|
||||
- codecov-units
|
||||
if: always() && (needs.should-i-run.result == 'success' ) && ((needs.codecov-units.result != 'success' ) || (needs.ui-tests.result != 'success') || (needs.integration-tests.result != 'success'))
|
||||
# No concurrency required, runs every time on a schedule.
|
||||
steps:
|
||||
|
|
12
.github/workflows/quality.yml
vendored
12
.github/workflows/quality.yml
vendored
|
@ -9,6 +9,8 @@ on:
|
|||
env:
|
||||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx4g
|
||||
-Porg.gradle.parallel=false
|
||||
--no-daemon
|
||||
|
||||
jobs:
|
||||
check:
|
||||
|
@ -113,13 +115,13 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Dependency analysis
|
||||
run: ./gradlew buildHealth $CI_GRADLE_ARG_PROPERTIES
|
||||
run: ./gradlew dependencyCheckAnalyze $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload dependency analysis
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dependency-analysis
|
||||
path: build/reports/dependency-analysis/build-health-report.txt
|
||||
path: build/reports/dependency-check-report.html
|
||||
|
||||
# Lint for main module
|
||||
android-lint:
|
||||
|
@ -140,7 +142,7 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Lint analysis
|
||||
run: ./gradlew clean :vector:lint --stacktrace
|
||||
run: ./gradlew clean :vector:lint --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -173,7 +175,7 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Lint ${{ matrix.target }} release
|
||||
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace
|
||||
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload ${{ matrix.target }} linting report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -193,7 +195,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- name: Run detekt
|
||||
run: |
|
||||
./gradlew detekt
|
||||
./gradlew detekt $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
81
.github/workflows/sonarqube.yml
vendored
81
.github/workflows/sonarqube.yml
vendored
|
@ -1,81 +0,0 @@
|
|||
name: Sonarqube nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 20 * * *'
|
||||
|
||||
# Enrich gradle.properties for CI/CD
|
||||
env:
|
||||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx4g
|
||||
-Porg.gradle.parallel=false
|
||||
jobs:
|
||||
codecov-units:
|
||||
name: Unit tests with code coverage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- run: ./gradlew allCodeCoverageReport $CI_GRADLE_ARG_PROPERTIES
|
||||
- name: Upload Codecov data
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: codecov-xml
|
||||
path: |
|
||||
build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|
||||
|
||||
sonarqube:
|
||||
name: Sonarqube upload
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- codecov-units
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: codecov-xml # will restore to allCodeCoverageReport.xml by default; we restore to the same location in following tasks
|
||||
- run: mkdir -p build/reports/jacoco/allCodeCoverageReport/
|
||||
- run: mv allCodeCoverageReport.xml build/reports/jacoco/allCodeCoverageReport/
|
||||
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
# Notify the channel about sonarqube failures
|
||||
notify:
|
||||
name: Notify matrix
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- sonarqube
|
||||
- codecov-units
|
||||
if: always() && (needs.sonarqube.result != 'success' || needs.codecov-units.result != 'success')
|
||||
steps:
|
||||
- uses: michaelkaye/matrix-hookshot-action@v1.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
hookshot_url: ${{ secrets.ELEMENT_ANDROID_HOOKSHOT_URL }}
|
||||
text_template: "Sonarqube run (on ${{ github.ref }}): {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}"
|
||||
html_template: "Sonarqube run (on ${{ github.ref }}): {{#each job_statuses }}{{#with this }}{{#if completed }}<br />{{icon conclusion}} {{name}} <font color='{{color conclusion}}'>{{conclusion}} at {{completed_at}} <a href=\"{{html_url}}\">[details]</a></font>{{/if}}{{/with}}{{/each}}"
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Prerequisite dependencies
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Prerequisite dependencies
|
||||
|
|
152
.github/workflows/tests.yml
vendored
152
.github/workflows/tests.yml
vendored
|
@ -8,77 +8,111 @@ on:
|
|||
# Enrich gradle.properties for CI/CD
|
||||
env:
|
||||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx2g
|
||||
-Porg.gradle.jvmargs=-Xmx4g
|
||||
-Porg.gradle.parallel=false
|
||||
--no-daemon
|
||||
|
||||
jobs:
|
||||
# Build Android Tests
|
||||
build-android-tests:
|
||||
name: Build Android Tests
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('build-android-tests-{0}', github.ref) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Build Android Tests
|
||||
run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace
|
||||
|
||||
unit-tests:
|
||||
name: Run Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
tests:
|
||||
name: Runs all tests
|
||||
runs-on: macos-latest # for the emulator
|
||||
# Allow all jobs on main and develop. Just one per PR.
|
||||
concurrency:
|
||||
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Run unit tests
|
||||
run: ./gradlew clean test $CI_GRADLE_ARG_PROPERTIES --stacktrace
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
- uses: michaelkaye/setup-matrix-synapse@v1.0.3
|
||||
with:
|
||||
uploadLogs: true
|
||||
httpPort: 8080
|
||||
disableRateLimiting: true
|
||||
public_baseurl: "http://10.0.2.2:8080/"
|
||||
- name: Run all the codecoverage tests at once
|
||||
id: tests
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
api-level: 28
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
disable-animations: true
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
# NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure'
|
||||
- name: Run all the codecoverage tests at once (retry if emulator failed)
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
if: always() && steps.tests.outcome == 'failure' # don't run if previous step succeeded.
|
||||
with:
|
||||
api-level: 28
|
||||
arch: x86
|
||||
profile: Nexus 5X
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
disable-animations: true
|
||||
emulator-build: 7425822
|
||||
script: |
|
||||
./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
|
||||
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
|
||||
if: always() # we may have failed a previous step and retried, that's OK
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
- name: Format unit test results
|
||||
if: always()
|
||||
run: python3 ./tools/ci/render_test_output.py unit ./**/build/test-results/**/*.xml
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
if: always() &&
|
||||
github.event.sender.login != 'dependabot[bot]' &&
|
||||
( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
|
||||
with:
|
||||
files: ./**/build/test-results/**/*.xml
|
||||
|
||||
# Notify the channel about runs against develop or main that have failures, as PRs should have caught these first.
|
||||
notify:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- unit-tests
|
||||
- build-android-tests
|
||||
if: ${{ (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' ) && failure() }}
|
||||
steps:
|
||||
- uses: michaelkaye/matrix-hookshot-action@v0.3.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
matrix_access_token: ${{ secrets.ELEMENT_ANDROID_NOTIFICATION_ACCESS_TOKEN }}
|
||||
matrix_room_id: ${{ secrets.ELEMENT_ANDROID_INTERNAL_ROOM_ID }}
|
||||
text_template: "Build is broken for ${{ github.ref }}: {{#each job_statuses }}{{#with this }}{{#if completed }}{{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}"
|
||||
html_template: "Build is broken for ${{ github.ref }}: {{#each job_statuses }}{{#with this }}{{#if completed }}<br />{{icon conclusion }} {{name}} <font color='{{color conclusion }}'>{{conclusion}} at {{completed_at}} <a href=\"{{html_url}}\">[details]</a></font>{{/if}}{{/with}}{{/each}}"
|
||||
# can't be run on macos due to containers.
|
||||
# - name: Publish Unit Test Results
|
||||
# uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
# if: always() &&
|
||||
# github.event.sender.login != 'dependabot[bot]' &&
|
||||
# ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
|
||||
# with:
|
||||
# files: ./**/build/test-results/**/*.xml
|
||||
|
||||
# Unneeded as part of the test suite above, kept around in case we want to re-enable them.
|
||||
#
|
||||
# # Build Android Tests
|
||||
# build-android-tests:
|
||||
# name: Build Android Tests
|
||||
# runs-on: ubuntu-latest
|
||||
# concurrency:
|
||||
# group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('build-android-tests-{0}', github.ref) }}
|
||||
# cancel-in-progress: true
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/setup-java@v3
|
||||
# with:
|
||||
# distribution: 'adopt'
|
||||
# java-version: 11
|
||||
# - uses: actions/cache@v3
|
||||
# with:
|
||||
# path: |
|
||||
# ~/.gradle/caches
|
||||
# ~/.gradle/wrapper
|
||||
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-gradle-
|
||||
# - name: Build Android Tests
|
||||
# run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace
|
||||
|
||||
|
|
25
.github/workflows/triage-labelled.yml
vendored
25
.github/workflows/triage-labelled.yml
vendored
|
@ -9,15 +9,15 @@ jobs:
|
|||
name: Add Z-Labs label for features behind labs flags
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
contains(github.event.issue.labels.*.name, 'A-Maths') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Message-Pinning') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Polls') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Location-Sharing') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') ||
|
||||
contains(github.event.issue.labels.*.name, 'Z-IA') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Themes-Custom') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Tags')
|
||||
contains(github.event.issue.labels.*.name, 'A-Maths') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Message-Pinning') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Polls') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Location-Sharing') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') ||
|
||||
contains(github.event.issue.labels.*.name, 'Z-IA') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Themes-Custom') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Tags')
|
||||
steps:
|
||||
- uses: actions/github-script@v5
|
||||
with:
|
||||
|
@ -79,7 +79,7 @@ jobs:
|
|||
name: X-Needs-Product to Design project board
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
contains(github.event.issue.labels.*.name, 'X-Needs-Product')
|
||||
contains(github.event.issue.labels.*.name, 'X-Needs-Product')
|
||||
steps:
|
||||
- uses: octokit/graphql-action@v2.x
|
||||
id: add_to_project
|
||||
|
@ -105,10 +105,7 @@ jobs:
|
|||
# Skip in forks
|
||||
if: >
|
||||
github.repository == 'vector-im/element-android' &&
|
||||
(contains(github.event.issue.labels.*.name, 'A-Spaces') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Space-Settings') ||
|
||||
contains(github.event.issue.labels.*.name, 'A-Subspaces') ||
|
||||
contains(github.event.issue.labels.*.name, 'Z-IA'))
|
||||
(contains(github.event.issue.labels.*.name, 'Team: Delight'))
|
||||
steps:
|
||||
- uses: octokit/graphql-action@v2.x
|
||||
with:
|
||||
|
|
5
.github/workflows/triage-priority-bugs.yml
vendored
5
.github/workflows/triage-priority-bugs.yml
vendored
|
@ -14,10 +14,7 @@ jobs:
|
|||
!contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-Spaces') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-Spaces-Settings') &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-Subspaces')) &&
|
||||
!contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification')) &&
|
||||
(contains(github.event.issue.labels.*.name, 'T-Defect') &&
|
||||
contains(github.event.issue.labels.*.name, 'S-Critical') &&
|
||||
(contains(github.event.issue.labels.*.name, 'O-Frequent') ||
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,7 +17,7 @@
|
|||
/fastlane/report.xml
|
||||
/fastlane/README.md
|
||||
|
||||
/library/build
|
||||
/**/build
|
||||
|
||||
.tmp_unpatched_strings
|
||||
.tmp_new_patched_strings
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<w>sygnal</w>
|
||||
<w>threepid</w>
|
||||
<w>uisi</w>
|
||||
<w>unifiedpush</w>
|
||||
<w>unpublish</w>
|
||||
<w>unwedging</w>
|
||||
<w>vctr</w>
|
||||
|
|
129
CHANGES.md
129
CHANGES.md
|
@ -1,3 +1,132 @@
|
|||
Changes in Element v1.4.27 (2022-07-06)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Fixes crash when sharing plain text, such as a url ([#6451](https://github.com/vector-im/element-android/issues/6451))
|
||||
- Fix crashes on Timeline [Thread] due to range validation ([#6461](https://github.com/vector-im/element-android/issues/6461))
|
||||
- Fix crashes when opening Thread ([#6463](https://github.com/vector-im/element-android/issues/6463))
|
||||
- Fix ConcurrentModificationException on BackgroundDetectionObserver ([#6469](https://github.com/vector-im/element-android/issues/6469))
|
||||
|
||||
|
||||
Changes in Element v1.4.26 (2022-06-30)
|
||||
=======================================
|
||||
|
||||
Features ✨
|
||||
----------
|
||||
- Use UnifiedPush and allows user to have push without FCM. ([#3448](https://github.com/vector-im/element-android/issues/3448))
|
||||
- Replace ffmpeg-kit with libopus and libopusenc. ([#6203](https://github.com/vector-im/element-android/issues/6203))
|
||||
- Improve lock screen implementation. ([#6217](https://github.com/vector-im/element-android/issues/6217))
|
||||
- Allow sharing text based content via android's share menu (eg .ics files) ([#6285](https://github.com/vector-im/element-android/issues/6285))
|
||||
- Promote live location labs flag ([#6350](https://github.com/vector-im/element-android/issues/6350))
|
||||
- [Location sharing] - Stop any active live before starting a new one ([#6364](https://github.com/vector-im/element-android/issues/6364))
|
||||
- Expose pusher profile tag in advanced settings ([#6369](https://github.com/vector-im/element-android/issues/6369))
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Fixes concurrent modification crash when signing out or launching the app ([#5821](https://github.com/vector-im/element-android/issues/5821))
|
||||
- Refactor - better naming, return native user id and not sip user id and create a dm with the native user instead of with the sip user. ([#6101](https://github.com/vector-im/element-android/issues/6101))
|
||||
- Fixed /upgraderoom command not doing anything ([#6154](https://github.com/vector-im/element-android/issues/6154))
|
||||
- Fixed crash when opening large images in the timeline ([#6290](https://github.com/vector-im/element-android/issues/6290))
|
||||
- [Location sharing] Fix crash when starting/stopping a live when offline ([#6315](https://github.com/vector-im/element-android/issues/6315))
|
||||
- Fix loop in timeline and simplify management of chunks and timeline events. ([#6318](https://github.com/vector-im/element-android/issues/6318))
|
||||
- Update design and behaviour on widget permission bottom sheet ([#6326](https://github.com/vector-im/element-android/issues/6326))
|
||||
- Fix | Some user verification requests couldn't be accepted/declined ([#6328](https://github.com/vector-im/element-android/issues/6328))
|
||||
- [Location sharing] Fix stop of a live not possible from another device ([#6349](https://github.com/vector-im/element-android/issues/6349))
|
||||
- Fix backslash escapes in formatted messages ([#6357](https://github.com/vector-im/element-android/issues/6357))
|
||||
- Fixes wrong error message when signing in with wrong credentials ([#6371](https://github.com/vector-im/element-android/issues/6371))
|
||||
- [Location Share] - Adding missing prefix "u=" for uncertainty in geo URI ([#6375](https://github.com/vector-im/element-android/issues/6375))
|
||||
|
||||
In development 🚧
|
||||
----------------
|
||||
- FTUE - Adds automatic homeserver selection when typing a full matrix id during registration or login ([#6162](https://github.com/vector-im/element-android/issues/6162))
|
||||
|
||||
Improved Documentation 📚
|
||||
------------------------
|
||||
- Update the PR process doc to come back to one reviewer with optional additional reviewers. ([#6396](https://github.com/vector-im/element-android/issues/6396))
|
||||
|
||||
SDK API changes ⚠️
|
||||
------------------
|
||||
- Group all location sharing related API into LocationSharingService ([#5864](https://github.com/vector-im/element-android/issues/5864))
|
||||
- Add support for MSC2457 - opting in or out of logging out all devices when changing password ([#6191](https://github.com/vector-im/element-android/issues/6191))
|
||||
- Create `QueryStateEventValue` to do query on `stateKey` for State Event. Also remove the default parameter values for those type. ([#6319](https://github.com/vector-im/element-android/issues/6319))
|
||||
|
||||
Other changes
|
||||
-------------
|
||||
- - Notify of the latest known location in LocationTracker to avoid multiple locations at start
|
||||
- Debounce location updates
|
||||
- Improve location providers access ([#5913](https://github.com/vector-im/element-android/issues/5913))
|
||||
- Add unit tests for LiveLocationAggregationProcessor code ([#6155](https://github.com/vector-im/element-android/issues/6155))
|
||||
- Making screenshots in bug reports opt in instead of opt out ([#6261](https://github.com/vector-im/element-android/issues/6261))
|
||||
- Setup [Flipper](https://fbflipper.com/) ([#6300](https://github.com/vector-im/element-android/issues/6300))
|
||||
- CreatePollViewModel unit tests ([#6320](https://github.com/vector-im/element-android/issues/6320))
|
||||
- Fix flaky test in voice recording feature. ([#6329](https://github.com/vector-im/element-android/issues/6329))
|
||||
- Poll view state unit tests ([#6366](https://github.com/vector-im/element-android/issues/6366))
|
||||
- Let LoadRoomMembersTask insert by chunk to release db. ([#6394](https://github.com/vector-im/element-android/issues/6394))
|
||||
|
||||
|
||||
Changes in Element v1.4.25 (2022-06-27)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Second attempt to fix session database migration to version 30.
|
||||
|
||||
Changes in Element v1.4.24 (2022-06-22)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- First attempt to fix session database migration to version 30.
|
||||
|
||||
Changes in Element v1.4.23 (2022-06-21)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Fix loop in timeline and simplify management of chunks and timeline events. ([#6318](https://github.com/vector-im/element-android/issues/6318))
|
||||
|
||||
|
||||
Changes in Element v1.4.22 (2022-06-14)
|
||||
=======================================
|
||||
|
||||
Features ✨
|
||||
----------
|
||||
- Make read receipt avatar list more compact ([#5970](https://github.com/vector-im/element-android/issues/5970))
|
||||
- Allow .well-known configuration to override key sharing mode ([#6147](https://github.com/vector-im/element-android/issues/6147))
|
||||
- Re-organize location settings flags ([#6244](https://github.com/vector-im/element-android/issues/6244))
|
||||
- Add report action for live location messages ([#6280](https://github.com/vector-im/element-android/issues/6280))
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Fix cases of missing, swapped, or duplicated messages ([#5528](https://github.com/vector-im/element-android/issues/5528))
|
||||
- Fix wrong status of live location sharing in timeline ([#6209](https://github.com/vector-im/element-android/issues/6209))
|
||||
- Fix StackOverflowError while recording voice message ([#6222](https://github.com/vector-im/element-android/issues/6222))
|
||||
- Text cropped: "Secure backup" ([#6232](https://github.com/vector-im/element-android/issues/6232))
|
||||
- Fix copyright attributions of map views ([#6247](https://github.com/vector-im/element-android/issues/6247))
|
||||
- Fix flickering bottom bar of live location item ([#6264](https://github.com/vector-im/element-android/issues/6264))
|
||||
|
||||
In development 🚧
|
||||
----------------
|
||||
- FTUE - Adds Sign Up tracking ([#5285](https://github.com/vector-im/element-android/issues/5285))
|
||||
|
||||
SDK API changes ⚠️
|
||||
------------------
|
||||
- Some methods from `Session` have been moved to a new `SyncService`, that you can retrieve from a `Session`.
|
||||
- `SyncStatusService` method has been moved to the new `SyncService`
|
||||
- `InitSyncStep` have been moved and renamed to `InitialSyncStep`
|
||||
- `SyncStatusService.Status` has been renamed to `SyncRequestState`
|
||||
- The existing `SyncService` has been renamed to `SyncAndroidService` because of name clash with the new SDK Service ([#6029](https://github.com/vector-im/element-android/issues/6029))
|
||||
- Allows `AuthenticationService.getLoginFlow` to fail without resetting state from previously successful calls ([#6093](https://github.com/vector-im/element-android/issues/6093))
|
||||
- Allows new passwords to be passed at the point of confirmation when resetting a password ([#6169](https://github.com/vector-im/element-android/issues/6169))
|
||||
|
||||
Other changes
|
||||
-------------
|
||||
- Adds support for parsing homeserver versions without a patch number ([#6017](https://github.com/vector-im/element-android/issues/6017))
|
||||
- Updating exit onboarding dialog copy formatting to match iOS ([#6087](https://github.com/vector-im/element-android/issues/6087))
|
||||
- Disables when arrow alignment in code style ([#6126](https://github.com/vector-im/element-android/issues/6126))
|
||||
|
||||
|
||||
Changes in Element 1.4.20 (2022-06-13)
|
||||
======================================
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[![Buildkite](https://badge.buildkite.com/ad0065c1b70f557cd3b1d3d68f9c2154010f83c4d6f71706a9.svg?branch=develop)](https://buildkite.com/matrix-dot-org/element-android/builds?branch=develop)
|
||||
[![Weblate](https://translate.element.io/widgets/element-android/-/svg-badge.svg)](https://translate.element.io/engage/element-android/?utm_source=widget)
|
||||
[![Element Android Matrix room #element-android:matrix.org](https://img.shields.io/matrix/element-android:matrix.org.svg?label=%23element-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-android:matrix.org)
|
||||
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=alert_status)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
|
||||
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
|
||||
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=bugs)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
|
||||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-android&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vector-im_element-android)
|
||||
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-android&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=vector-im_element-android)
|
||||
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-android&metric=bugs)](https://sonarcloud.io/summary/new_code?id=vector-im_element-android)
|
||||
|
||||
# Element Android
|
||||
|
||||
|
|
24
build.gradle
24
build.gradle
|
@ -25,11 +25,11 @@ buildscript {
|
|||
classpath libs.gradle.kotlinPlugin
|
||||
classpath libs.gradle.hiltPlugin
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
|
||||
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513'
|
||||
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'
|
||||
classpath "com.likethesalad.android:stem-plugin:2.1.1"
|
||||
classpath 'org.owasp:dependency-check-gradle:7.1.0.1'
|
||||
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.6.21"
|
||||
classpath 'org.owasp:dependency-check-gradle:7.1.1'
|
||||
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.0"
|
||||
classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0"
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -43,7 +43,7 @@ plugins {
|
|||
id "io.gitlab.arturbosch.detekt" version "1.20.0"
|
||||
|
||||
// Dependency Analysis
|
||||
id 'com.autonomousapps.dependency-analysis' version "1.4.0"
|
||||
id 'com.autonomousapps.dependency-analysis' version "1.9.0"
|
||||
}
|
||||
|
||||
// https://github.com/jeremylong/DependencyCheck
|
||||
|
@ -168,7 +168,7 @@ def launchTask = getGradle()
|
|||
.toString()
|
||||
.toLowerCase()
|
||||
|
||||
if (launchTask.contains("codeCoverageReport".toLowerCase())) {
|
||||
if (launchTask.contains("coverage".toLowerCase())) {
|
||||
apply from: 'coverage.gradle'
|
||||
}
|
||||
|
||||
|
@ -180,8 +180,8 @@ apply plugin: 'org.sonarqube'
|
|||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.projectName", "Element-Android"
|
||||
property "sonar.projectKey", "im.vector.app.android"
|
||||
property "sonar.projectName", "element-android"
|
||||
property "sonar.projectKey", "vector-im_element-android"
|
||||
property "sonar.host.url", "https://sonarcloud.io"
|
||||
property "sonar.projectVersion", project(":vector").android.defaultConfig.versionName
|
||||
property "sonar.sourceEncoding", "UTF-8"
|
||||
|
@ -191,7 +191,7 @@ sonarqube {
|
|||
property "sonar.links.issue", "https://github.com/vector-im/element-android/issues"
|
||||
property "sonar.organization", "new_vector_ltd_organization"
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml"
|
||||
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/generateCoverageReport/generateCoverageReport.xml"
|
||||
property "sonar.login", project.hasProperty("SONAR_LOGIN") ? SONAR_LOGIN : "invalid"
|
||||
}
|
||||
}
|
||||
|
@ -252,11 +252,7 @@ dependencyAnalysis {
|
|||
exclude("org.json:json") // Used in unit tests, overwrites the one bundled into Android
|
||||
}
|
||||
}
|
||||
project(":library:ui-styles") {
|
||||
onUnusedDependencies {
|
||||
exclude("com.github.vector-im:PFLockScreen-Android") // False positive
|
||||
}
|
||||
}
|
||||
project(":library:ui-styles")
|
||||
project(":matrix-sdk-android") {
|
||||
onUnusedDependencies {
|
||||
exclude("io.reactivex.rxjava2:rxkotlin") // Transitively required for mocking realm as monarchy doesn't expose Rx
|
||||
|
@ -271,6 +267,8 @@ dependencyAnalysis {
|
|||
onUnusedDependencies {
|
||||
// False positives
|
||||
exclude(
|
||||
"androidx.fragment:fragment-testing",
|
||||
"com.facebook.soloader:soloader",
|
||||
"com.vanniktech:emoji-google",
|
||||
"com.vanniktech:emoji-material",
|
||||
"org.maplibre.gl:android-plugin-annotation-v9",
|
||||
|
|
|
@ -1,9 +1,36 @@
|
|||
def excludes = [ ]
|
||||
def excludes = [
|
||||
// dependency injection graph
|
||||
'**/*Module.*',
|
||||
'**/*Module*.*',
|
||||
|
||||
// Framework entry points
|
||||
'**/*Activity*',
|
||||
'**/*Fragment*',
|
||||
'**/*Application*',
|
||||
|
||||
// We would like to exclude android widgets as well but our naming is inconsistent
|
||||
|
||||
// Proof of concept
|
||||
'**/*Login2*',
|
||||
|
||||
// Generated
|
||||
'**/*JsonAdapter*',
|
||||
'**/*Item.*',
|
||||
'**/*$Holder.*',
|
||||
'**/*ViewHolder.*',
|
||||
'**/*View.*',
|
||||
'**/*BottomSheet.*'
|
||||
]
|
||||
|
||||
def initializeReport(report, projects, classExcludes) {
|
||||
projects.each { project -> project.apply plugin: 'jacoco' }
|
||||
report.executionData { fileTree(rootProject.rootDir.absolutePath).include("**/build/jacoco/*.exec") }
|
||||
|
||||
report.executionData {
|
||||
fileTree(rootProject.rootDir.absolutePath).include(
|
||||
"**/build/**/*.exec",
|
||||
"**/build/outputs/code_coverage/**/coverage.ec",
|
||||
)
|
||||
}
|
||||
report.reports {
|
||||
xml.enabled true
|
||||
html.enabled true
|
||||
|
@ -43,13 +70,21 @@ def collectProjects(predicate) {
|
|||
return subprojects.findAll { it.buildFile.isFile() && predicate(it) }
|
||||
}
|
||||
|
||||
task allCodeCoverageReport(type: JacocoReport) {
|
||||
task generateCoverageReport(type: JacocoReport) {
|
||||
outputs.upToDateWhen { false }
|
||||
rootProject.apply plugin: 'jacoco'
|
||||
// to limit projects in a specific report, add
|
||||
// def excludedProjects = [ ... ]
|
||||
// def projects = collectProjects { !excludedProjects.contains(it.name) }
|
||||
def projects = collectProjects { true }
|
||||
dependsOn { projects*.test }
|
||||
def projects = collectProjects { ['vector', 'matrix-sdk-android'].contains(it.name) }
|
||||
initializeReport(it, projects, excludes)
|
||||
}
|
||||
|
||||
task unitTestsWithCoverage(type: GradleBuild) {
|
||||
// the 7.1.3 android gradle plugin has a bug where enableTestCoverage generates invalid coverage
|
||||
startParameter.projectProperties.coverage = [enableTestCoverage: false]
|
||||
tasks = [':vector:testGplayDebugUnitTest', ':matrix-sdk-android:testDebugUnitTest']
|
||||
}
|
||||
|
||||
task instrumentationTestsWithCoverage(type: GradleBuild) {
|
||||
startParameter.projectProperties.coverage = [enableTestCoverage: true]
|
||||
startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui'
|
||||
tasks = [':vector:connectedGplayDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest']
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ ext.versions = [
|
|||
def gradle = "7.1.3"
|
||||
// Ref: https://kotlinlang.org/releases.html
|
||||
def kotlin = "1.6.21"
|
||||
def kotlinCoroutines = "1.6.2"
|
||||
def kotlinCoroutines = "1.6.3"
|
||||
def dagger = "2.42"
|
||||
def retrofit = "2.9.0"
|
||||
def arrow = "0.8.2"
|
||||
|
@ -21,20 +21,21 @@ def markwon = "4.6.2"
|
|||
def moshi = "1.13.0"
|
||||
def lifecycle = "2.4.1"
|
||||
def flowBinding = "1.2.0"
|
||||
def flipper = "0.151.1"
|
||||
def epoxy = "4.6.2"
|
||||
def mavericks = "2.6.1"
|
||||
def mavericks = "2.7.0"
|
||||
def glide = "4.13.2"
|
||||
def bigImageViewer = "1.8.1"
|
||||
def jjwt = "0.11.5"
|
||||
def vanniktechEmoji = "0.15.0"
|
||||
|
||||
def fragment = "1.4.1"
|
||||
|
||||
// Testing
|
||||
def mockk = "1.12.4"
|
||||
def mockk = "1.12.3" // We need to use 1.12.3 to have mocking in androidTest until a new version is released: https://github.com/mockk/mockk/issues/819
|
||||
def espresso = "3.4.0"
|
||||
def androidxTest = "1.4.0"
|
||||
def androidxOrchestrator = "1.4.1"
|
||||
|
||||
|
||||
ext.libs = [
|
||||
gradle : [
|
||||
'gradlePlugin' : "com.android.tools.build:gradle:$gradle",
|
||||
|
@ -49,12 +50,16 @@ ext.libs = [
|
|||
'coroutinesTest' : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutines"
|
||||
],
|
||||
androidx : [
|
||||
'annotation' : "androidx.annotation:annotation:1.4.0",
|
||||
'activity' : "androidx.activity:activity:1.4.0",
|
||||
'appCompat' : "androidx.appcompat:appcompat:1.4.1",
|
||||
'core' : "androidx.core:core-ktx:1.7.0",
|
||||
'annotations' : "androidx.annotation:annotation:1.3.0",
|
||||
'appCompat' : "androidx.appcompat:appcompat:1.4.2",
|
||||
'biometric' : "androidx.biometric:biometric:1.1.0",
|
||||
'core' : "androidx.core:core-ktx:1.8.0",
|
||||
'recyclerview' : "androidx.recyclerview:recyclerview:1.2.1",
|
||||
'exifinterface' : "androidx.exifinterface:exifinterface:1.3.3",
|
||||
'fragmentKtx' : "androidx.fragment:fragment-ktx:1.4.1",
|
||||
'fragmentKtx' : "androidx.fragment:fragment-ktx:$fragment",
|
||||
'fragmentTesting' : "androidx.fragment:fragment-testing:$fragment",
|
||||
'constraintLayout' : "androidx.constraintlayout:constraintlayout:2.1.4",
|
||||
'work' : "androidx.work:work-runtime-ktx:2.7.1",
|
||||
'autoFill' : "androidx.autofill:autofill:1.1.0",
|
||||
|
@ -79,14 +84,19 @@ ext.libs = [
|
|||
'transition' : "androidx.transition:transition:1.2.0",
|
||||
],
|
||||
google : [
|
||||
'material' : "com.google.android.material:material:1.6.0"
|
||||
'material' : "com.google.android.material:material:1.6.1"
|
||||
],
|
||||
dagger : [
|
||||
'dagger' : "com.google.dagger:dagger:$dagger",
|
||||
'daggerCompiler' : "com.google.dagger:dagger-compiler:$dagger",
|
||||
'hilt' : "com.google.dagger:hilt-android:$dagger",
|
||||
'hiltAndroidTesting' : "com.google.dagger:hilt-android-testing:$dagger",
|
||||
'hiltCompiler' : "com.google.dagger:hilt-compiler:$dagger"
|
||||
],
|
||||
flipper : [
|
||||
'flipper' : "com.facebook.flipper:flipper:$flipper",
|
||||
'flipperNetworkPlugin' : "com.facebook.flipper:flipper-network-plugin:$flipper",
|
||||
],
|
||||
squareup : [
|
||||
'moshi' : "com.squareup.moshi:moshi:$moshi",
|
||||
'moshiKt' : "com.squareup.moshi:moshi-kotlin:$moshi",
|
||||
|
@ -156,3 +166,5 @@ ext.libs = [
|
|||
'junit' : "junit:junit:4.13.2"
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ ext.groups = [
|
|||
],
|
||||
group: [
|
||||
'com.android',
|
||||
'com.android.ndk.thirdparty',
|
||||
'com.android.tools',
|
||||
'com.google.firebase',
|
||||
'com.google.testing.platform',
|
||||
|
@ -54,6 +55,7 @@ ext.groups = [
|
|||
'com.dropbox.core',
|
||||
'com.soywiz.korlibs.korte',
|
||||
'com.facebook.fbjni',
|
||||
'com.facebook.flipper',
|
||||
'com.facebook.fresco',
|
||||
'com.facebook.infer.annotation',
|
||||
'com.facebook.soloader',
|
||||
|
@ -95,6 +97,7 @@ ext.groups = [
|
|||
'com.ibm.icu',
|
||||
'com.jakewharton.android.repackaged',
|
||||
'com.jakewharton.timber',
|
||||
'com.kgurgul.flipper',
|
||||
'com.linkedin.dexmaker',
|
||||
'com.mapbox.mapboxsdk',
|
||||
'com.nulab-inc',
|
||||
|
@ -170,6 +173,7 @@ ext.groups = [
|
|||
'org.glassfish.jaxb',
|
||||
'org.hamcrest',
|
||||
'org.jacoco',
|
||||
'org.java-websocket',
|
||||
'org.jetbrains',
|
||||
'org.jetbrains.dokka',
|
||||
'org.jetbrains.intellij.deps',
|
||||
|
|
58
docs/flipper.md
Normal file
58
docs/flipper.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Flipper
|
||||
|
||||
<!--- TOC -->
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Setup](#setup)
|
||||
* [Troubleshoot](#troubleshoot)
|
||||
* [No device found issue](#no-device-found-issue)
|
||||
* [Diagnostic Activity](#diagnostic-activity)
|
||||
* [Other](#other)
|
||||
* [Links](#links)
|
||||
|
||||
<!--- END -->
|
||||
|
||||
## Introduction
|
||||
|
||||
[Flipper](https://fbflipper.com) is a powerful tool from Meta, which allow to inspect the running application details and states from your computer.
|
||||
|
||||
Flipper is configured in the Element Android project to let the developers be able to:
|
||||
- inspect all the Realm databases content;
|
||||
- do layout inspection;
|
||||
- see the crash logs;
|
||||
- see the logcat;
|
||||
- see all the network requests;
|
||||
- see all the SharedPreferences;
|
||||
- take screenshots and record videos of the device;
|
||||
- and more!
|
||||
|
||||
## Setup
|
||||
|
||||
- Install Flipper on your computer. Follow instructions here: https://fbflipper.com/docs/getting-started/index/
|
||||
- Run the debug version of Element on an emulator or on a real device.
|
||||
|
||||
### Troubleshoot
|
||||
|
||||
#### No device found issue
|
||||
|
||||
The configuration of the Flipper application has to be updated. The issue has been asked and answered here: https://stackoverflow.com/questions/71744103/android-emulator-unable-to-connect-to-flipper/72608113#72608113
|
||||
|
||||
#### Diagnostic Activity
|
||||
|
||||
Flipper comes with a Diagnostic Activity that you can start from command line using:
|
||||
|
||||
```shell
|
||||
adb shell am start -n im.vector.app.debug/com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity
|
||||
```
|
||||
|
||||
It provides some log which can help to figure out what's going on client side.
|
||||
|
||||
#### Other
|
||||
|
||||
https://fbflipper.com/docs/getting-started/troubleshooting/android/ may help.
|
||||
|
||||
## Links
|
||||
|
||||
- Official Flipper website: https://fbflipper.com
|
||||
- Realm Plugin for Flipper: https://github.com/kamgurgul/Flipper-Realm
|
||||
- Dedicated Matrix room: https://matrix.to/#/#unifiedpush:matrix.org
|
|
@ -83,15 +83,16 @@ Exceptions can occur:
|
|||
|
||||
##### PR Review Assignment
|
||||
|
||||
We use automatic assignment for PR reviews. A PR is automatically routed by GitHub to 2 team members using the round robin algorithm. The process is the following:
|
||||
We use automatic assignment for PR reviews. **A PR is automatically routed by GitHub to one team member** using the round robin algorithm. Additional reviewers can be used for complex changes or when the first reviewer is not confident enough on the changes.
|
||||
The process is the following:
|
||||
|
||||
- The PR creator can assign specific people if they have another Android developer in their team or they think a specific reviewer should take a look at the PR.
|
||||
- If there are missing reviewers, the PR creator assigns the [element-android-reviewers](https://github.com/orgs/vector-im/teams/element-android-reviewers) team as a reviewer.
|
||||
- GitHub automatically assigns other reviewers. If one of the chosen reviewers is not available (holiday, etc.), remove them and set again the team, GitHub will select another reviewer.
|
||||
- The PR creator selects the [element-android-reviewers](https://github.com/orgs/vector-im/teams/element-android-reviewers) team as a reviewer.
|
||||
- GitHub automatically assign the reviewer. If the reviewer is not available (holiday, etc.), remove them and set again the team, GitHub will select another reviewer.
|
||||
- Alternatively, the PR creator can directly assign specific people if they have another Android developer in their team or they think a specific reviewer should take a look at their PR.
|
||||
- Reviewers get a notification to make the review: they review the code following the good practice (see the rest of this document).
|
||||
- After making their own review, if they feel not confident enough, they can ask another person for a full review, or they can tag someone within a PR comment to check specific lines.
|
||||
|
||||
For PRs coming from the community, the issue wrangler can assign either the team [element-android-reviewers](https://github.com/orgs/vector-im/teams/element-android-reviewers) or any members directly.
|
||||
For PRs coming from the community, the issue wrangler can assign either the team [element-android-reviewers](https://github.com/orgs/vector-im/teams/element-android-reviewers) or any member directly.
|
||||
|
||||
##### PR review time
|
||||
|
||||
|
@ -102,6 +103,7 @@ Some tips to achieve it:
|
|||
- Set up your GH notifications correctly
|
||||
- Check your pulls page: [https://github.com/pulls](https://github.com/pulls)
|
||||
- Check your pending assigned PRs before starting or resuming your day to day tasks
|
||||
- If you are busy with high priority tasks, inform the author. They will find another developer
|
||||
|
||||
It is hard to define a deadline for a review. It depends on the PR size and the complexity. Let's start with a goal of 24h (working day!) for a PR smaller than 500 lines. If bigger, the submitter and the reviewer should discuss.
|
||||
|
||||
|
|
58
docs/unifiedpush.md
Normal file
58
docs/unifiedpush.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
# UnifiedPush
|
||||
|
||||
<!--- TOC -->
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Configuration in Element-Android and their forks](#configuration-in-element-android-and-their-forks)
|
||||
* [Enabling and disabling the feature](#enabling-and-disabling-the-feature)
|
||||
* [Override the configuration at runtime](#override-the-configuration-at-runtime)
|
||||
* [Enabling the feature](#enabling-the-feature)
|
||||
* [Disabling the feature](#disabling-the-feature)
|
||||
* [Useful links](#useful-links)
|
||||
|
||||
<!--- END -->
|
||||
|
||||
## Introduction
|
||||
|
||||
The recently started UnifiedPush project is an Android protocol and library for apps to be able to receive distributor-agnostic push notifications.
|
||||
|
||||
The *F-Droid* and *Gplay* flavors of Element Android support UnifiedPush, so the user can use any distributor installed on their devices. This would make it possible to have push notifications without depending on Google services or libraries. Currently, the main distributors are [ntfy](https://ntfy.sh) which does not require any setup (like manual registration) to use the public server and [NextPush](https://github.com/UP-NextPush/android), available as a nextcloud application.
|
||||
|
||||
The *Gplay* variant uses a UnifiedPush library which basically embed a FCM distributor built into the application (so a user doesn't need to do anything other than install the app to get FCM notifications). This variant uses Google Services to receive notifications if the user has not installed any distributor.
|
||||
|
||||
The *F-Droid* variant does not use this library to avoid any proprietary blob. It will use a polling service if the user has not installed any distributor.
|
||||
|
||||
In all cases, if there are other distributors available, the user will have to opt-in to one of them in the preferences.
|
||||
|
||||
## Configuration in Element-Android and their forks
|
||||
|
||||
### Enabling and disabling the feature
|
||||
|
||||
Allowing the user to use an alternative distributor can be changed in [Config](../vector-config/src/main/java/im/vector/app/config/Config.kt). The flag is named `ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS`. Default value is `true`.
|
||||
|
||||
#### Override the configuration at runtime
|
||||
|
||||
On debug version, it is possible to override this configuration at runtime, using the `Feature` screen. The Feature is named `Allow external UnifiedPush distributors`.
|
||||
|
||||
#### Enabling the feature
|
||||
|
||||
This is the default behavior of Element Android.
|
||||
|
||||
If `ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS` is set to true, it allows any available external UnifiedPush distributor to be chosen by the user.
|
||||
- For Gplay variant it means that FCM will be used by default, but user can choose another UnifiedPush distributor;
|
||||
- For F-Droid variant, it means that background polling will be used by default, but user can choose another UnifiedPush distributor.
|
||||
- On the UI, the setting to choose an alternative distributor will be visible to the user, and some tests in the notification troubleshoot screen will shown.
|
||||
- For F-Droid, if the user has chosen a distributor, the settings to configure the background polling will be hidden.
|
||||
|
||||
#### Disabling the feature
|
||||
|
||||
If `ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS` is set to false, it prevents the usage of external UnifiedPush distributors.
|
||||
- For Gplay variant it means that only FCM will be used;
|
||||
- For F-Droid variant, it means that only background polling will be used.
|
||||
- On the UI, the setting to choose an alternative distributor will be hidden to the user, and some tests in the notification troubleshoot screen will be hidden.
|
||||
|
||||
### Useful links
|
||||
|
||||
- UnifiedPush official website: [https://unifiedpush.org/](https://unifiedpush.org/)
|
||||
- List of available distributors can be retrieved here: [https://unifiedpush.org/users/distributors/](https://unifiedpush.org/users/distributors/)
|
||||
- UnifiedPush project discussion can occurs here: [#unifiedpush:matrix.org](https://matrix.to/#/#unifiedpush:matrix.org)
|
2
fastlane/metadata/android/cs-CZ/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/cs-CZ/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavní změny v této verzi: Vylepšena správa šifrovaných zpráv. Opravy různých chyb a vylepšení stability.
|
||||
Úplný seznam změn: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/cs-CZ/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/cs-CZ/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability.
|
||||
Úplný seznam změn: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/cs-CZ/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/cs-CZ/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability.
|
||||
Úplný seznam změn: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/cs-CZ/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/cs-CZ/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability.
|
||||
Úplný seznam změn: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104220.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104220.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Various bug fixes and stability improvements.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104230.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104230.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Various bug fixes and stability improvements.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104240.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104240.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Various bug fixes and stability improvements.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104250.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104250.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Various bug fixes and stability improvements.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104260.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104260.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Use UnifiedPush and allows user to have push without FCM.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/en-US/changelogs/40104270.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104270.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Main changes in this version: Various bug fixes and stability improvements.
|
||||
Full changelog: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/et/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/et/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Põhilised muutused selles versioonis: krüptitud sõnumite parem haldus, lisaks pisiparandused ja stabiilsust parandavad kohendused.
|
||||
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/et/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/et/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Põhilised muutused selles versioonis: erinevate vigade parandused ja stabiilsust edendavad kohendused.
|
||||
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/et/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/et/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Põhilised muutused selles versioonis: erinevate vigade parandused ja stabiilsust edendavad kohendused.
|
||||
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/et/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/et/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Põhilised muutused selles versioonis: erinevate vigade parandused ja stabiilsust edendavad kohendused.
|
||||
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fa/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/fa/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
تغییرات عمده در این نگارش: مدیریت بهتر پیامهای رمزگذاشته. رفع اشکالهای مختلف و بهبودهای پایداری.
|
||||
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fa/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/fa/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
تغییرات عمده در این نگارش: رفع اشکالهای مختلف و بهبودهای پایداری.
|
||||
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fa/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/fa/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
تغییرات عمده در این نگارش: رفع اشکالهای مختلف و بهبودهای پایداری.
|
||||
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fa/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/fa/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
تغییرات عمده در این نگارش: رفع اشکالهای مختلف و بهبودهای پایداری.
|
||||
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fr-FR/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principaux changements pour cette version : Meilleure gestion des messages chiffrés. Plusieurs corrections de bogues et d’améliorations de stabilité.
|
||||
Intégralité des changements : https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fr-FR/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principaux changements pour cette version : Plusieurs corrections de bogues et d’améliorations de stabilité.
|
||||
Intégralité des changements : https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fr-FR/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principaux changements pour cette version : Plusieurs corrections de bogues et d’améliorations de stabilité.
|
||||
Intégralité des changements : https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/fr-FR/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principaux changements pour cette version : Plusieurs corrections de bogues et d’améliorations de stabilité.
|
||||
Intégralité des changements : https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/id/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/id/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Perubahan utama dalam versi ini: Pengelolaan pesan terenkripsi lebih baik. Banyak perbaikan kutu dan perbaikan stabilitas.
|
||||
Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/id/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/id/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas.
|
||||
Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/id/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/id/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas.
|
||||
Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/id/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/id/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas.
|
||||
Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/it-IT/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/it-IT/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Modifiche principali in questa versione: migliorata la gestione dei messaggi cifrati. Varie correzioni e miglioramenti della stabilità.
|
||||
Cronologia completa: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/it-IT/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/it-IT/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità.
|
||||
Cronologia completa: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/it-IT/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/it-IT/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità.
|
||||
Cronologia completa: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/it-IT/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/it-IT/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità.
|
||||
Cronologia completa: https://github.com/vector-im/element-android/releases
|
|
@ -1 +1 @@
|
|||
אלמנט (בעבר Riot.im)
|
||||
אלמנט - התכתבות מאובטחת
|
||||
|
|
2
fastlane/metadata/android/pl-PL/changelogs/40101060.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101060.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wesji: poprawki dla wesji 1.1.5
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.1.6
|
2
fastlane/metadata/android/pl-PL/changelogs/40101070.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101070.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Eksperymentalne wsparcie dla przestrzeni, Kompresowanie video przed wysłaniem.
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.1.7
|
2
fastlane/metadata/android/pl-PL/changelogs/40101080.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101080.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Poprawki w przestrzeniach
|
||||
Pełna lista zmian https://github.com/vector-im/element-android/releases/tag/v1.1.8
|
2
fastlane/metadata/android/pl-PL/changelogs/40101090.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101090.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Dodano wsparcie dla sieci gitter.im .
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.1.9
|
2
fastlane/metadata/android/pl-PL/changelogs/40101100.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101100.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Nowe funkcje dla przestrzeni i aktualizacja motywu i stylu.
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.1.10
|
2
fastlane/metadata/android/pl-PL/changelogs/40101110.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40101110.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Dodano nowe funkcje do przestrzeni i zaktualizowano motyw i styl aplikacji. (poprawki błędóœ dla wesji 1.1.10)
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.1.11
|
2
fastlane/metadata/android/pl-PL/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Główne zmiany w tej wersji: Lepsze zarządzanie zaszyfrowanymi wiadomościami. , Poprawki błędów i stabilności.
|
||||
Pełna lista zmian: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/pt-BR/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/pt-BR/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principais mudanças nesta versão: Melhor gerenciamento de mensagens encriptadas. Vários consertos de bugs e melhorias de estabilidade.
|
||||
Changelog completo: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/pt-BR/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/pt-BR/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principais mudanças nesta versão: Vários consertos de bugs e melhorias de estabilidade.
|
||||
Changelog completo: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/pt-BR/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/pt-BR/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principais mudanças nesta versão: Vários consertos de bugs e melhorias de estabilidade.
|
||||
Changelog completo: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/pt-BR/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/pt-BR/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Principais mudanças nesta versão: Vários consertos de bugs e melhorias de estabilidade.
|
||||
Changelog completo: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sk/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/sk/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavné zmeny v tejto verzii: Lepšia spravovanie zašifrovaných správ. Rôzne opravy chýb a vylepšenia stability.
|
||||
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sk/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/sk/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability.
|
||||
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sk/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/sk/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability.
|
||||
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sk/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/sk/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability.
|
||||
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sv-SE/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/sv-SE/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Huvudsakliga ändringar i den här versionen: Bättre hantering av krypterade meddelanden. Diverse buggfixar och stabilitetsförbättringar.
|
||||
Full ändringslogg: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sv-SE/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/sv-SE/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Huvudsakliga ändringar i den här versionen: Diverse buggfixar och stabilitetsförbättringar.
|
||||
Full ändringslogg: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sv-SE/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/sv-SE/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Huvudsakliga ändringar i den här versionen: Diverse buggfixar och stabilitetsförbättringar.
|
||||
Full ändringslogg: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/sv-SE/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/sv-SE/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Huvudsakliga ändringar i den här versionen: Diverse buggfixar och stabilitetsförbättringar.
|
||||
Full ändringslogg: https://github.com/vector-im/element-android/releases
|
|
@ -1,2 +1,2 @@
|
|||
Основні зміни в цій версії: Початкова реалізація тредів повідомлень. Повідомлення бульбашки.
|
||||
Основні зміни в цій версії: Початкова реалізація гілок повідомлень. Повідомлення бульбашки.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.4.0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Основні зміни в цій версії: Хронологія тредів працює наживо і швидше. Усунуто різні вади й поліпшено стабільність.
|
||||
Основні зміни в цій версії: Хронологія гілок працює наживо і швидше. Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.4.6
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Основні зміни в цій версії: Хронологія тредів працює наживо і швидше. Усунуто різні вади й поліпшено стабільність.
|
||||
Основні зміни в цій версії: Хронологія гілок працює наживо і швидше. Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases
|
||||
|
|
2
fastlane/metadata/android/uk/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/uk/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Основні зміни в цій версії: Поліпшено керування зашифрованими повідомленнями. Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/uk/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/uk/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/uk/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/uk/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/uk/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/uk/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність.
|
||||
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/zh-TW/changelogs/40104160.txt
Normal file
2
fastlane/metadata/android/zh-TW/changelogs/40104160.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
此版本中的主要變動:對於被加密的訊息有更好的管理方式。多個臭蟲修復與穩定性改善。
|
||||
完整的變更紀錄:https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/zh-TW/changelogs/40104180.txt
Normal file
2
fastlane/metadata/android/zh-TW/changelogs/40104180.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
此版本中的主要變動:多個臭蟲修復與穩定性改善。
|
||||
完整的變更紀錄:https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/zh-TW/changelogs/40104190.txt
Normal file
2
fastlane/metadata/android/zh-TW/changelogs/40104190.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
此版本中的主要變動:多個臭蟲修復與穩定性改善。
|
||||
完整的變更紀錄:https://github.com/vector-im/element-android/releases
|
2
fastlane/metadata/android/zh-TW/changelogs/40104200.txt
Normal file
2
fastlane/metadata/android/zh-TW/changelogs/40104200.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
此版本中的主要變動:多個臭蟲修復與穩定性改善。
|
||||
完整的變更紀錄:https://github.com/vector-im/element-android/releases
|
|
@ -271,7 +271,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
|
|||
directionDetector.handleTouchEvent(event)
|
||||
|
||||
return when (swipeDirection) {
|
||||
SwipeDirection.Up, SwipeDirection.Down -> {
|
||||
SwipeDirection.Up, SwipeDirection.Down -> {
|
||||
if (isSwipeToDismissAllowed && !wasScaled && isImagePagerIdle) {
|
||||
swipeDismissHandler.onTouch(views.rootContainer, event)
|
||||
} else true
|
||||
|
@ -279,7 +279,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
|
|||
SwipeDirection.Left, SwipeDirection.Right -> {
|
||||
views.attachmentPager.dispatchTouchEvent(event)
|
||||
}
|
||||
else -> true
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,18 +42,18 @@ class AttachmentsAdapter : RecyclerView.Adapter<BaseViewHolder>() {
|
|||
val inflater = LayoutInflater.from(parent.context)
|
||||
val itemView = inflater.inflate(viewType, parent, false)
|
||||
return when (viewType) {
|
||||
R.layout.item_image_attachment -> ZoomableImageViewHolder(itemView)
|
||||
R.layout.item_image_attachment -> ZoomableImageViewHolder(itemView)
|
||||
R.layout.item_animated_image_attachment -> AnimatedImageViewHolder(itemView)
|
||||
R.layout.item_video_attachment -> VideoViewHolder(itemView)
|
||||
else -> UnsupportedViewHolder(itemView)
|
||||
R.layout.item_video_attachment -> VideoViewHolder(itemView)
|
||||
else -> UnsupportedViewHolder(itemView)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
val info = attachmentSourceProvider!!.getAttachmentInfoAt(position)
|
||||
return when (info) {
|
||||
is AttachmentInfo.Image -> R.layout.item_image_attachment
|
||||
is AttachmentInfo.Video -> R.layout.item_video_attachment
|
||||
is AttachmentInfo.Image -> R.layout.item_image_attachment
|
||||
is AttachmentInfo.Video -> R.layout.item_video_attachment
|
||||
is AttachmentInfo.AnimatedImage -> R.layout.item_animated_image_attachment
|
||||
// is AttachmentInfo.Audio -> TODO()
|
||||
// is AttachmentInfo.File -> TODO()
|
||||
|
@ -68,13 +68,13 @@ class AttachmentsAdapter : RecyclerView.Adapter<BaseViewHolder>() {
|
|||
attachmentSourceProvider?.getAttachmentInfoAt(position)?.let {
|
||||
holder.bind(it)
|
||||
when (it) {
|
||||
is AttachmentInfo.Image -> {
|
||||
is AttachmentInfo.Image -> {
|
||||
attachmentSourceProvider?.loadImage((holder as ZoomableImageViewHolder).target, it)
|
||||
}
|
||||
is AttachmentInfo.AnimatedImage -> {
|
||||
attachmentSourceProvider?.loadImage((holder as AnimatedImageViewHolder).target, it)
|
||||
}
|
||||
is AttachmentInfo.Video -> {
|
||||
is AttachmentInfo.Video -> {
|
||||
attachmentSourceProvider?.loadVideo((holder as VideoViewHolder).target, it)
|
||||
}
|
||||
// else -> {
|
||||
|
|
|
@ -27,12 +27,12 @@ sealed class SwipeDirection {
|
|||
companion object {
|
||||
fun fromAngle(angle: Double): SwipeDirection {
|
||||
return when (angle) {
|
||||
in 0.0..45.0 -> Right
|
||||
in 45.0..135.0 -> Up
|
||||
in 0.0..45.0 -> Right
|
||||
in 45.0..135.0 -> Up
|
||||
in 135.0..225.0 -> Left
|
||||
in 225.0..315.0 -> Down
|
||||
in 315.0..360.0 -> Right
|
||||
else -> NotDetected
|
||||
else -> NotDetected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class SwipeDirectionDetector(
|
|||
|
||||
fun handleTouchEvent(event: MotionEvent) {
|
||||
when (event.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
startX = event.x
|
||||
startY = event.y
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class SwipeDirectionDetector(
|
|||
startX = startY
|
||||
isDetected = false
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> if (!isDetected && getEventDistance(event) > touchSlop) {
|
||||
MotionEvent.ACTION_MOVE -> if (!isDetected && getEventDistance(event) > touchSlop) {
|
||||
isDetected = true
|
||||
onDirectionDetected(getDirection(startX, startY, event.x, event.y))
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class SwipeToDismissHandler(
|
|||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onTouch(v: View, event: MotionEvent): Boolean {
|
||||
when (event.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
if (swipeView.hitRect.contains(event.x.toInt(), event.y.toInt())) {
|
||||
isTracking = true
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class SwipeToDismissHandler(
|
|||
}
|
||||
return true
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
if (isTracking) {
|
||||
val translationY = event.y - startY
|
||||
swipeView.translationY = translationY
|
||||
|
@ -66,7 +66,7 @@ class SwipeToDismissHandler(
|
|||
}
|
||||
return true
|
||||
}
|
||||
else -> {
|
||||
else -> {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -79,8 +79,8 @@ class SwipeToDismissHandler(
|
|||
private fun onTrackingEnd(parentHeight: Int) {
|
||||
val animateTo = when {
|
||||
swipeView.translationY < -translationLimit -> -parentHeight.toFloat()
|
||||
swipeView.translationY > translationLimit -> parentHeight.toFloat()
|
||||
else -> 0f
|
||||
swipeView.translationY > translationLimit -> parentHeight.toFloat()
|
||||
else -> 0f
|
||||
}
|
||||
|
||||
if (animateTo != 0f && !shouldAnimateDismiss()) {
|
||||
|
|
|
@ -146,7 +146,7 @@ class VideoViewHolder constructor(itemView: View) :
|
|||
wasPaused = true
|
||||
views.videoView.pause()
|
||||
}
|
||||
is AttachmentCommands.SeekTo -> {
|
||||
is AttachmentCommands.SeekTo -> {
|
||||
val duration = views.videoView.duration
|
||||
if (duration > 0) {
|
||||
val seekDuration = duration * (commands.percentProgress / 100f)
|
||||
|
|
|
@ -43,7 +43,7 @@ internal class JSonViewerEpoxyController(private val context: Context) :
|
|||
text(async.error.localizedMessage?.toEpoxyCharSequence())
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
else -> {
|
||||
async.invoke()?.let {
|
||||
buildRec(it, 0, "")
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ internal class JSonViewerEpoxyController(private val context: Context) :
|
|||
}
|
||||
}
|
||||
}
|
||||
is JSonViewerArray -> {
|
||||
is JSonViewerArray -> {
|
||||
if (model.isExpanded) {
|
||||
open(id, model.key, model.index, depth, false, model)
|
||||
model.items.forEach {
|
||||
|
@ -137,7 +137,7 @@ internal class JSonViewerEpoxyController(private val context: Context) :
|
|||
}
|
||||
}
|
||||
}
|
||||
is JSonViewerLeaf -> {
|
||||
is JSonViewerLeaf -> {
|
||||
valueItem {
|
||||
id(id)
|
||||
depth(depth)
|
||||
|
@ -172,12 +172,12 @@ internal class JSonViewerEpoxyController(private val context: Context) :
|
|||
private fun valueToSpan(leaf: JSonViewerLeaf): Span {
|
||||
val host = this
|
||||
return when (leaf.type) {
|
||||
JSONType.STRING -> {
|
||||
JSONType.STRING -> {
|
||||
span("\"${leaf.stringRes}\"") {
|
||||
textColor = host.styleProvider.stringColor
|
||||
}
|
||||
}
|
||||
JSONType.NUMBER -> {
|
||||
JSONType.NUMBER -> {
|
||||
span(leaf.stringRes) {
|
||||
textColor = host.styleProvider.numberColor
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ internal class JSonViewerEpoxyController(private val context: Context) :
|
|||
textColor = host.styleProvider.booleanColor
|
||||
}
|
||||
}
|
||||
JSONType.NULL -> {
|
||||
JSONType.NULL -> {
|
||||
span("null") {
|
||||
textColor = host.styleProvider.booleanColor
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ internal object ModelParser {
|
|||
}
|
||||
parent.addChild(objectComposed)
|
||||
}
|
||||
is JSONArray -> {
|
||||
is JSONArray -> {
|
||||
val objectComposed = JSonViewerArray(key, index, obj)
|
||||
.apply { isExpanded = initialOpenDepth == -1 || depth <= initialOpenDepth }
|
||||
objectComposed.depth = depth
|
||||
|
@ -91,25 +91,25 @@ internal object ModelParser {
|
|||
}
|
||||
parent.addChild(objectComposed)
|
||||
}
|
||||
is String -> {
|
||||
is String -> {
|
||||
JSonViewerLeaf(key, index, obj, JSONType.STRING).let {
|
||||
it.depth = depth
|
||||
parent.addChild(it)
|
||||
}
|
||||
}
|
||||
is Number -> {
|
||||
is Number -> {
|
||||
JSonViewerLeaf(key, index, obj.toString(), JSONType.NUMBER).let {
|
||||
it.depth = depth
|
||||
parent.addChild(it)
|
||||
}
|
||||
}
|
||||
is Boolean -> {
|
||||
is Boolean -> {
|
||||
JSonViewerLeaf(key, index, obj.toString(), JSONType.BOOLEAN).let {
|
||||
it.depth = depth
|
||||
parent.addChild(it)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
else -> {
|
||||
if (obj == JSONObject.NULL) {
|
||||
JSonViewerLeaf(key, index, "null", JSONType.NULL).let {
|
||||
it.depth = depth
|
||||
|
|
|
@ -48,7 +48,7 @@ class FilePicker : Picker<MultiPickerBaseType>() {
|
|||
type.isMimeTypeVideo() -> selectedUri.toMultiPickerVideoType(context)
|
||||
type.isMimeTypeImage() -> selectedUri.toMultiPickerImageType(context)
|
||||
type.isMimeTypeAudio() -> selectedUri.toMultiPickerAudioType(context)
|
||||
else -> {
|
||||
else -> {
|
||||
// Other files
|
||||
context.contentResolver.query(selectedUri, null, null, null, null)
|
||||
?.use { cursor ->
|
||||
|
|
|
@ -31,15 +31,15 @@ class MultiPicker<T> private constructor() {
|
|||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T> get(type: MultiPicker<T>): T {
|
||||
return when (type) {
|
||||
IMAGE -> ImagePicker() as T
|
||||
VIDEO -> VideoPicker() as T
|
||||
MEDIA -> MediaPicker() as T
|
||||
FILE -> FilePicker() as T
|
||||
AUDIO -> AudioPicker() as T
|
||||
CONTACT -> ContactPicker() as T
|
||||
CAMERA -> CameraPicker() as T
|
||||
IMAGE -> ImagePicker() as T
|
||||
VIDEO -> VideoPicker() as T
|
||||
MEDIA -> MediaPicker() as T
|
||||
FILE -> FilePicker() as T
|
||||
AUDIO -> AudioPicker() as T
|
||||
CONTACT -> ContactPicker() as T
|
||||
CAMERA -> CameraPicker() as T
|
||||
CAMERA_VIDEO -> CameraVideoPicker() as T
|
||||
else -> throw IllegalArgumentException("Unsupported type $type")
|
||||
else -> throw IllegalArgumentException("Unsupported type $type")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
10
library/opusencoder/.gitignore
vendored
Normal file
10
library/opusencoder/.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
*.cxx
|
||||
app/.cxx/*
|
||||
.externalNativeBuild
|
40
library/opusencoder/build.gradle
Normal file
40
library/opusencoder/build.gradle
Normal file
|
@ -0,0 +1,40 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
ndkVersion "21.3.6528147"
|
||||
|
||||
compileSdkVersion 31
|
||||
|
||||
buildToolsVersion "31.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 18
|
||||
targetSdkVersion 31
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "src/main/cpp/CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.androidx.annotation
|
||||
}
|
2
library/opusencoder/src/main/AndroidManifest.xml
Normal file
2
library/opusencoder/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="im.vector.opusencoder" xmlns:android="http://schemas.android.com/apk/res/android"/>
|
61
library/opusencoder/src/main/cpp/CMakeLists.txt
Normal file
61
library/opusencoder/src/main/cpp/CMakeLists.txt
Normal file
|
@ -0,0 +1,61 @@
|
|||
# For more information about using CMake with Android Studio, read the
|
||||
# documentation: https://d.android.com/studio/projects/add-native-code.html
|
||||
|
||||
# Sets the minimum version of CMake required to build the native library.
|
||||
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
# Creates and names a library, sets it as either STATIC
|
||||
# or SHARED, and provides the relative paths to its source code.
|
||||
# You can define multiple libraries, and CMake builds them for you.
|
||||
# Gradle automatically packages shared libraries with your APK.
|
||||
|
||||
set(distribution_OPUS_DIR ${CMAKE_SOURCE_DIR}/opus)
|
||||
|
||||
add_library(lib_opus SHARED IMPORTED)
|
||||
set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_OPUS_DIR}/libs/${ANDROID_ABI}/libopus.so)
|
||||
|
||||
add_library(lib_opusenc SHARED IMPORTED)
|
||||
set_target_properties(lib_opusenc PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_OPUS_DIR}/libs/${ANDROID_ABI}/libopusenc.so)
|
||||
|
||||
add_library( # Sets the name of the library.
|
||||
opuscodec
|
||||
|
||||
# Sets the library as a shared library.
|
||||
SHARED
|
||||
|
||||
# Provides a relative path to your source file(s).
|
||||
codec/CodecOggOpus.cpp
|
||||
opuscodec.cpp)
|
||||
|
||||
target_include_directories(opuscodec PRIVATE
|
||||
${distribution_OPUS_DIR}/include)
|
||||
|
||||
# Searches for a specified prebuilt library and stores the path as a
|
||||
# variable. Because CMake includes system libraries in the search path by
|
||||
# default, you only need to specify the name of the public NDK library
|
||||
# you want to add. CMake verifies that the library exists before
|
||||
# completing its build.
|
||||
|
||||
find_library( # Sets the name of the path variable.
|
||||
log-lib
|
||||
|
||||
# Specifies the name of the NDK library that
|
||||
# you want CMake to locate.
|
||||
log )
|
||||
|
||||
# Specifies libraries CMake should link to your target library. You
|
||||
# can link multiple libraries, such as libraries you define in this
|
||||
# build script, prebuilt third-party libraries, or system libraries.
|
||||
|
||||
target_link_libraries( # Specifies the target library.
|
||||
opuscodec
|
||||
android
|
||||
lib_opusenc
|
||||
lib_opus
|
||||
# Links the target library to the log library
|
||||
# included in the NDK.
|
||||
${log-lib} )
|
63
library/opusencoder/src/main/cpp/codec/CodecOggOpus.cpp
Normal file
63
library/opusencoder/src/main/cpp/codec/CodecOggOpus.cpp
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 2022 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "CodecOggOpus.h"
|
||||
#include "../utils/Logger.h"
|
||||
|
||||
int ret;
|
||||
|
||||
int CodecOggOpus::encoderInit(char* filePath, int sampleRate) {
|
||||
// Create default, empty comment header
|
||||
comments = ope_comments_create();
|
||||
// Mono audio
|
||||
int numChannels = 1;
|
||||
// Channel Mapping Family 0, used for mono/stereo streams
|
||||
int family = 0;
|
||||
// Create encoder to encode PCM chunks and write the result to a file with the OggOpus framing
|
||||
encoder = ope_encoder_create_file(filePath, comments, sampleRate, numChannels, family, &ret);
|
||||
if (ret != OPE_OK) {
|
||||
LOGE(TAG, "Creation of OggOpusEnc failed.");
|
||||
return ret;
|
||||
}
|
||||
return OPE_OK;
|
||||
}
|
||||
|
||||
int CodecOggOpus::setBitrate(int bitrate) {
|
||||
ret = ope_encoder_ctl(encoder, OPUS_SET_BITRATE_REQUEST, bitrate);
|
||||
if (ret != OPE_OK) {
|
||||
LOGE(TAG, "Could not set bitrate.");
|
||||
return ret;
|
||||
}
|
||||
return OPE_OK;
|
||||
}
|
||||
|
||||
int CodecOggOpus::writeFrame(short* frame, int samplesPerChannel) {
|
||||
// Encode the raw PCM-16 buffer to Opus and write it to the ogg file
|
||||
return ope_encoder_write(encoder, frame, samplesPerChannel);
|
||||
}
|
||||
|
||||
void CodecOggOpus::encoderRelease() {
|
||||
// Finish any pending encode/write operations
|
||||
ope_encoder_drain(encoder);
|
||||
// De-init the encoder instance
|
||||
ope_encoder_destroy(encoder);
|
||||
// De-init the comment header struct
|
||||
ope_comments_destroy(comments);
|
||||
}
|
||||
|
||||
CodecOggOpus::~CodecOggOpus() {
|
||||
encoderRelease();
|
||||
}
|
52
library/opusencoder/src/main/cpp/codec/CodecOggOpus.h
Normal file
52
library/opusencoder/src/main/cpp/codec/CodecOggOpus.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2022 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ELEMENT_ANDROID_CODECOGGOPUS_H
|
||||
#define ELEMENT_ANDROID_CODECOGGOPUS_H
|
||||
|
||||
#include <opusenc.h>
|
||||
/**
|
||||
* This class is a wrapper around libopusenc, used to encode and write Opus frames into an Ogg file.
|
||||
*
|
||||
* The usual flow would be:
|
||||
*
|
||||
* 1. Use encoderInit to initialize the internal encoder with the sample rate and the path to write the encoded frames to.
|
||||
* 2. (Optional) set the bitrate to use.
|
||||
* 3. While recording, read PCM-16 chunks from the recorder, feed them to the encoder using writeFrame.
|
||||
* 4. When finished, call encoderRelease to free some resources.
|
||||
*/
|
||||
class CodecOggOpus {
|
||||
|
||||
private:
|
||||
const char *TAG = "CodecOggOpus";
|
||||
|
||||
OggOpusEnc* encoder;
|
||||
OggOpusComments* comments;
|
||||
|
||||
public:
|
||||
int encoderInit(char* filePath, int sampleRate);
|
||||
|
||||
int setBitrate(int bitrate);
|
||||
|
||||
int writeFrame(short *frame, int samplesPerChannel);
|
||||
|
||||
void encoderRelease();
|
||||
|
||||
~CodecOggOpus();
|
||||
};
|
||||
|
||||
|
||||
#endif //ELEMENT_ANDROID_CODECOGGOPUS_H
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue