Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/0.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Jul 18, 2019
2 parents 1cd7175 + 643fc61 commit 0e7c3aa
Show file tree
Hide file tree
Showing 233 changed files with 4,529 additions and 1,367 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ android:
# The SDK version used to compile your project
- android-28

# Travis is not happy with gradle cache (getting permission denied)
#before_cache:
# - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
before_cache:
- rm -fr $HOME/.gradle/caches

cache:
directories:
# Travis is not happy with gradle cache (getting permission denied)
# - $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache

# Build with the development SDK
before_script:
Expand Down
25 changes: 25 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
Changes in Riot 0.9.2 (2019-07-18)
===================================================

MatrixSdk:
- Upgrade MatrixSdk to version 0.9.24.
- Changelog: https://github.com/matrix-org/matrix-android-sdk/releases/tag/v0.9.24

Improvements:
- Room upgrade: Use the `server_name` parameter when joining the new room (#3204)

Other changes:
- Piwik SDK has been replaced by Matomo SDK (#3163)

Bugfix:
- Fix / Illegal States exceptions when starting event stream service X
- Fix / Keys Backup can be setup twice #9510
- Fix / Infinite logout screen when token invalidated
- Fix / Export keys not possible when no network (airplane)
- Fix / crash in logout success
- Fix / Crash when session store is null in event stream #3158

Build:
- Upgrade gradle version from 4.10.1 to 5.4.1
- Ensure MatrixSDK library is downloaded from the jitpack repository

Changes in Riot 0.9.1 (2019-05-03)
===================================================

Expand Down
48 changes: 40 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
Expand All @@ -23,29 +23,45 @@ buildscript {

// global properties used in sub modules
ext {
versionCodeProp = 90100
versionNameProp = "0.9.1"
versionCodeProp = 90200
versionNameProp = "0.9.2"
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
buildNumberProp = "${versionBuild}"
}

allprojects {
ext.support_lib_version = '28.0.0'
ext.gson_version = '2.8.5'
ext.okhttp_version = '3.14.1'

repositories {
google()
// For Matrix Android SDK.
// This has to be declared first, to ensure that Matrix Android SDK library is not downloaded from another repo
maven {
url "https://maven.google.com"
url 'https://jitpack.io'
content {
// Use this repo only for matrix SDK library
includeGroupByRegex "com\\.github\\.matrix-org"
// And Olm library
includeGroupByRegex "org\\.matrix\\.gitlab\\.matrix-org"
// And PhotoView
includeGroupByRegex "com\\.github\\.chrisbanes"
}
}
google()
maven {
url "https://jitpack.io"
url "https://maven.google.com"
}
jcenter()
// Jitsi repo
maven {
url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
}
// For Matrix Android SDK
maven {
url 'https://jitpack.io'
url "https://s3.amazonaws.com/repo.commonsware.com"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
}
Expand Down Expand Up @@ -85,3 +101,19 @@ if (findProject(':matrix-sdk') != null) {
}
}
}

if (findProject(':matrix-sdk-crypto') != null) {
project(":matrix-sdk-crypto") {
sonarqube {
skipProject = true
}
}
}

if (findProject(':matrix-sdk-core') != null) {
project(":matrix-sdk-core") {
sonarqube {
skipProject = true
}
}
}
4 changes: 2 additions & 2 deletions compile_with_sdk_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# See https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux

echo "replace step 1"
sed -i.bak "s/^include ':matrix-sdk'/\/\/include ':matrix-sdk'/" ./settings.gradle || true
sed -i.bak "s/^project(':matrix-sdk')/\/\/project(':matrix-sdk')/" ./settings.gradle || true
sed -i.bak "s/^include ':matrix-sdk/\/\/include ':matrix-sdk/" ./settings.gradle || true
sed -i.bak "s/^project(':matrix-sdk/\/\/project(':matrix-sdk/" ./settings.gradle || true

echo "replace step 2"
sed -i.bak "s/^ \/\/implementation 'com.github.matrix-org:matrix-android-sdk/ implementation 'com.github.matrix-org:matrix-android-sdk/" ./vector/build.gradle || true
Expand Down
4 changes: 2 additions & 2 deletions compile_with_sdk_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# See https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux

echo "replace step 1"
sed -i.bak "s/^\/\/include ':matrix-sdk'/include ':matrix-sdk'/" ./settings.gradle || true
sed -i.bak "s/^\/\/project(':matrix-sdk')/project(':matrix-sdk')/" ./settings.gradle || true
sed -i.bak "s/^\/\/include ':matrix-sdk/include ':matrix-sdk/" ./settings.gradle || true
sed -i.bak "s/^\/\/project(':matrix-sdk/project(':matrix-sdk/" ./settings.gradle || true

echo "replace step 2"
sed -i.bak "s/^ implementation 'com.github.matrix-org:matrix-android-sdk/ \/\/implementation 'com.github.matrix-org:matrix-android-sdk/" ./vector/build.gradle || true
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 21 12:13:00 CET 2019
#Tue May 28 10:53:50 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ include ':vector'
// see build.gradle section Matrix SDK management
//include ':matrix-sdk'
//project(':matrix-sdk').projectDir = new File(settingsDir, '../matrix-android-sdk/matrix-sdk')

//include ':matrix-sdk-crypto'
//project(':matrix-sdk-crypto').projectDir = new File(settingsDir, '../matrix-android-sdk/matrix-sdk-crypto')

//include ':matrix-sdk-core'
//project(':matrix-sdk-core').projectDir = new File(settingsDir, '../matrix-android-sdk/matrix-sdk-core')
3 changes: 3 additions & 0 deletions tools/debug_alter_auth_token.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

adb shell am broadcast -a im.vector.receiver.DEBUG_ACTION_ALTER_AUTH_TOKEN
34 changes: 11 additions & 23 deletions vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,6 @@ android {
lintConfig file("lint.xml")
}

repositories {
flatDir {
dir 'libs'
}

maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}

maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}

testOptions {
unitTests {
includeAndroidResources = true
Expand Down Expand Up @@ -177,12 +163,12 @@ dependencies {

implementation 'me.leolin:ShortcutBadger:1.1.2@aar'

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:preference-v14:28.0.0'
implementation "com.android.support:appcompat-v7:$support_lib_version"
implementation "com.android.support:design:$support_lib_version"
implementation "com.android.support:cardview-v7:$support_lib_version"
implementation "com.android.support:recyclerview-v7:$support_lib_version"
implementation "com.android.support:preference-v7:$support_lib_version"
implementation "com.android.support:preference-v14:$support_lib_version"
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'com.android.support:support-v4:28.0.0'
Expand All @@ -207,7 +193,7 @@ dependencies {
// Network
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation "com.google.code.gson:gson:$gson_version"
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
Expand All @@ -230,10 +216,12 @@ dependencies {
/************* Matrix SDK management **************/
// update settings.gradle
// use the matrix SDK as external dependency
implementation 'com.github.matrix-org:matrix-android-sdk:v0.9.23'
implementation 'com.github.matrix-org:matrix-android-sdk:v0.9.24'
// use the matrix SDK as a sub project
// you have to uncomment some lines in settings.gradle
//implementation project(':matrix-sdk')
//implementation project(':matrix-sdk-crypto')
//implementation project(':matrix-sdk-core')

/************* jitsi **************/
implementation('org.jitsi.react:jitsi-meet-sdk:2.0.0') {
Expand All @@ -243,7 +231,7 @@ dependencies {

/************* analytics **************/
// another tracking than GA
implementation 'org.piwik.sdk:piwik-sdk:2.0.0'
implementation 'org.matomo.sdk:tracker:4.0.2'

/************* flavors management **************/

Expand Down
4 changes: 4 additions & 0 deletions vector/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@
<ignore path="**/dropbox-core-sdk*.jar" />
</issue>

<!-- Ignore issue with gradle compatilility, because we can use core-ktx.
No other androidx library are used in this project (except the workmanager) -->
<issue id="GradleCompatible" severity="warning" />

</lint>
2 changes: 1 addition & 1 deletion vector/src/app/java/im/vector/push/fcm/FcmHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.InstanceIdResult;

import org.matrix.androidsdk.util.Log;
import org.matrix.androidsdk.core.Log;

import im.vector.R;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ import im.vector.BuildConfig
import im.vector.Matrix
import im.vector.R
import im.vector.VectorApp
import im.vector.activity.CommonActivityUtils
import im.vector.notifications.NotifiableEventResolver
import im.vector.notifications.NotifiableMessageEvent
import im.vector.notifications.SimpleNotifiableEvent
import im.vector.push.PushManager
import im.vector.services.EventStreamServiceX
import im.vector.ui.badge.BadgeProxy
import org.matrix.androidsdk.MXSession
import org.matrix.androidsdk.core.Log
import org.matrix.androidsdk.rest.model.Event
import org.matrix.androidsdk.rest.model.bingrules.BingRule
import org.matrix.androidsdk.util.Log

/**
* Class extending FirebaseMessagingService.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import im.vector.R
import im.vector.fragments.troubleshoot.NotificationTroubleshootTestManager
import im.vector.fragments.troubleshoot.TroubleshootTest
import im.vector.util.startAddGoogleAccountIntent
import org.matrix.androidsdk.util.Log
import org.matrix.androidsdk.core.Log

/*
* Test that app can successfully retrieve a token via firebase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability
import im.vector.R
import im.vector.fragments.troubleshoot.TroubleshootTest
import org.matrix.androidsdk.util.Log
import org.matrix.androidsdk.core.Log

/*
* Check that the play services APK is available an up-to-date. If needed provide quick fix to install it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import im.vector.Matrix
import im.vector.R
import im.vector.VectorApp
import im.vector.fragments.troubleshoot.TroubleshootTest
import org.matrix.androidsdk.rest.callback.ApiCallback
import org.matrix.androidsdk.rest.model.MatrixError
import org.matrix.androidsdk.core.callback.ApiCallback
import org.matrix.androidsdk.core.model.MatrixError

/**
* Force registration of the token to HomeServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import android.content.Context;
import android.content.Intent;

import org.matrix.androidsdk.util.Log;
import org.matrix.androidsdk.core.Log;

import im.vector.services.EventStreamServiceX;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,9 @@ abstract class MockMessageAdapterActionListener : IMessagesAdapterActionsListene
override fun onSelectedEventChange(currentSelectedEvent: Event?) {
TODO("not implemented")
}

override fun onTombstoneLinkClicked(roomId: String?, senderId: String?) {
TODO("not implemented")
}
}

26 changes: 24 additions & 2 deletions vector/src/debug/java/im/vector/receiver/DebugReceiver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class DebugReceiver : BroadcastReceiver() {
Log.d(LOG_TAG, "Received debug action: ${intent.action}")

when (intent.action) {
DEBUG_ACTION_DUMP_FILESYSTEM -> lsFiles(context)
DEBUG_ACTION_DUMP_PREFERENCES -> dumpPreferences(context)
DEBUG_ACTION_DUMP_FILESYSTEM -> lsFiles(context)
DEBUG_ACTION_DUMP_PREFERENCES -> dumpPreferences(context)
DEBUG_ACTION_ALTER_SCALAR_TOKEN -> alterScalarToken(context)
DEBUG_ACTION_ALTER_AUTH_TOKEN -> alterAuthToken(context)
}
}

Expand All @@ -60,17 +61,38 @@ class DebugReceiver : BroadcastReceiver() {
}
}

private fun alterAuthToken(context: Context) {
val session = Matrix.getInstance(context).defaultSession
val alteredAccessToken = session.credentials.accessToken + "-ALT343D"
session.credentials.accessToken = alteredAccessToken
// session.cryptoRestClient.credentials = session.credentials
session.accountDataRestClient.credentials = session.credentials
session.callRestClient.credentials = session.credentials
session.pushersRestClient.credentials = session.credentials
session.filterRestClient.credentials = session.credentials
session.mediaScanRestClient.credentials = session.credentials
// session.roomKeysRestClient.credentials = session.credentials
session.thirdPidRestClient.credentials = session.credentials


val loginStorage = Matrix.getInstance(context)!!.loginStorage
loginStorage.replaceCredentials(session.homeServerConfig)
}


companion object {
private const val LOG_TAG = "DebugReceiver"

private const val DEBUG_ACTION_DUMP_FILESYSTEM = "im.vector.receiver.DEBUG_ACTION_DUMP_FILESYSTEM"
private const val DEBUG_ACTION_DUMP_PREFERENCES = "im.vector.receiver.DEBUG_ACTION_DUMP_PREFERENCES"
private const val DEBUG_ACTION_ALTER_SCALAR_TOKEN = "im.vector.receiver.DEBUG_ACTION_ALTER_SCALAR_TOKEN"
private const val DEBUG_ACTION_ALTER_AUTH_TOKEN = "im.vector.receiver.DEBUG_ACTION_ALTER_AUTH_TOKEN"

fun getIntentFilter() = IntentFilter().apply {
addAction(DEBUG_ACTION_DUMP_FILESYSTEM)
addAction(DEBUG_ACTION_DUMP_PREFERENCES)
addAction(DEBUG_ACTION_ALTER_SCALAR_TOKEN)
addAction(DEBUG_ACTION_ALTER_AUTH_TOKEN)
}
}
}

0 comments on commit 0e7c3aa

Please sign in to comment.