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.27'
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Aug 28, 2019
2 parents 3b808f6 + e5f9d78 commit 037443f
Show file tree
Hide file tree
Showing 130 changed files with 978 additions and 265 deletions.
28 changes: 27 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
Changes to Matrix Android SDK in 0.9.27 (2018-08-28)
=======================================================

/!\ Security:
- The homeserver access token was incorrectly included in requests sent to the Identity Server, a separate service.
The client should prompt the user to logout and login again to renew the token, unless the user is happy to trust the Identity Server provider with their access token (e.g. if the homeserver and identity server are operated by the same provider).

Features:
- Allow Matrix SDK client to configure the filter used for pagination (vector-im/riot-android#3237)

Improvements:
- Add a TermsManager (vector-im/riot-android#3225)

Bugfix:
- Stop sending the access token of the homeserver to the identity server
- VoIP: Stop falling back to Google for STUN (vector-im/riot-android#3223).
- EventIDs: Add regex to match eventIDs for v4 and v5 rooms
- Failed to send a message in a new joined room (invited by email)

Others:
- Remove useless log (vector-im/riot-android#3236)

Build:
- Migrate to androidx (following https://developer.android.com/jetpack/androidx/migrate)
- WebRTC: upgrade webrtc library, using the one build along with Jitsi

Changes to Matrix Android SDK in 0.9.26 (2019-07-24)
=======================================================

Expand Down Expand Up @@ -1558,4 +1584,4 @@ Build:
-

Test:
-
-
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ allprojects {
includeGroupByRegex "org\\.matrix\\.gitlab\\.matrix-org"
}
}
// Jitsi repo
maven {
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/releases"
}
google()
jcenter()
mavenCentral()
maven {
url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
# SONAR_LOGIN=sonar_login

org.gradle.configureondemand=false
android.useAndroidX=true
android.enableJetifier=true
12 changes: 6 additions & 6 deletions matrix-sdk-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
Expand Down Expand Up @@ -42,13 +42,13 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

implementation "com.android.support:appcompat-v7:$support_lib_version"
implementation "com.android.support:preference-v7:$support_lib_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.0.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.matrix.androidsdk.core.interceptors;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import android.security.KeyPairGeneratorSpec;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v7.preference.PreferenceManager;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.preference.PreferenceManager;
import android.util.Base64;

import org.matrix.androidsdk.core.model.SecretKeyAndVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.matrix.androidsdk.core;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -55,6 +55,10 @@ private MXPatterns() {
private static final String MATRIX_EVENT_IDENTIFIER_V3_REGEX = "\\$[A-Z0-9/+]+";
public static final Pattern PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V3 = Pattern.compile(MATRIX_EVENT_IDENTIFIER_V3_REGEX, Pattern.CASE_INSENSITIVE);

// regex pattern to find message ids v4 in a string.
private static final String MATRIX_EVENT_IDENTIFIER_V4_REGEX = "\\$[A-Z0-9\\_\\-]+";
public static final Pattern PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V4 = Pattern.compile(MATRIX_EVENT_IDENTIFIER_V4_REGEX, Pattern.CASE_INSENSITIVE);

// regex pattern to find group ids in a string.
private static final String MATRIX_GROUP_IDENTIFIER_REGEX = "\\+[A-Z0-9=_\\-./]+" + DOMAIN_REGEX;
public static final Pattern PATTERN_CONTAIN_MATRIX_GROUP_IDENTIFIER = Pattern.compile(MATRIX_GROUP_IDENTIFIER_REGEX, Pattern.CASE_INSENSITIVE);
Expand Down Expand Up @@ -128,7 +132,8 @@ public static boolean isRoomAlias(@Nullable final String str) {
*/
public static boolean isEventId(@Nullable final String str) {
return str != null
&& (PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER.matcher(str).matches() || PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V3.matcher(str).matches());
&& (PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER.matcher(str).matches() || PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V3.matcher(str).matches()
|| PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V4.matcher(str).matches());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.matrix.androidsdk.core.model;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -55,6 +55,8 @@ public class MatrixError implements java.io.Serializable {
public static final String RESOURCE_LIMIT_EXCEEDED = "M_RESOURCE_LIMIT_EXCEEDED";
public static final String WRONG_ROOM_KEYS_VERSION = "M_WRONG_ROOM_KEYS_VERSION";

public static final String TERMS_NOT_SIGNED = "M_TERMS_NOT_SIGNED";

// The error codes related to the password policy
public static final String PASSWORD_TOO_SHORT = "M_PASSWORD_TOO_SHORT";
public static final String PASSWORD_NO_DIGIT = "M_PASSWORD_NO_DIGIT";
Expand Down Expand Up @@ -123,6 +125,8 @@ public String getLocalizedMessage() {
localizedMessage = error;
} else if (!TextUtils.isEmpty(errcode)) {
localizedMessage = errcode;
} else if (!TextUtils.isEmpty(mErrorBodyAsString)) {
localizedMessage = mErrorBodyAsString;
}

return localizedMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.matrix.androidsdk.core.interceptors;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import okhttp3.logging.HttpLoggingInterceptor;

Expand Down
12 changes: 6 additions & 6 deletions matrix-sdk-crypto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath "io.realm:realm-gradle-plugin:5.8.0"
classpath "io.realm:realm-gradle-plugin:5.12.0"
}
}

Expand All @@ -20,7 +20,7 @@ android {
minSdkVersion 16
targetSdkVersion 28

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
Expand Down Expand Up @@ -50,7 +50,7 @@ dependencies {
// olm lib is now hosted by jitpack: https://jitpack.io/#org.matrix.gitlab.matrix-org/olm
implementation 'org.matrix.gitlab.matrix-org:olm:3.1.2'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
Expand All @@ -60,8 +60,8 @@ dependencies {
// Database
kapt 'dk.ilios:realmfieldnameshelper:1.1.1'

implementation "com.android.support:appcompat-v7:$support_lib_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.matrix.androidsdk.crypto

import android.os.Handler
import android.support.annotation.VisibleForTesting
import androidx.annotation.VisibleForTesting
import com.google.gson.JsonElement
import org.matrix.androidsdk.core.callback.ApiCallback
import org.matrix.androidsdk.core.listeners.ProgressListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.matrix.androidsdk.crypto;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import com.google.gson.JsonParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.matrix.androidsdk.crypto.algorithms;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import org.matrix.androidsdk.crypto.IncomingRoomKeyRequest;
import org.matrix.androidsdk.crypto.MXDecryptionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.matrix.androidsdk.crypto.algorithms.megolm;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import org.matrix.androidsdk.core.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.matrix.androidsdk.crypto.cryptostore;

import android.content.Context;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import org.jetbrains.annotations.NotNull;
import org.matrix.androidsdk.crypto.IncomingRoomKeyRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import android.content.Context;
import android.os.Looper;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.matrix.androidsdk.crypto.data;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import org.matrix.androidsdk.core.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.text.TextUtils;

import com.google.gson.JsonElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.matrix.androidsdk.crypto.keysbackup

import android.support.annotation.UiThread
import android.support.annotation.VisibleForTesting
import android.support.annotation.WorkerThread
import androidx.annotation.UiThread
import androidx.annotation.VisibleForTesting
import androidx.annotation.WorkerThread
import org.matrix.androidsdk.core.JsonUtility
import org.matrix.androidsdk.core.Log
import org.matrix.androidsdk.core.callback.ApiCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package org.matrix.androidsdk.crypto.keysbackup

import android.support.annotation.WorkerThread
import androidx.annotation.WorkerThread
import org.matrix.androidsdk.core.Log
import org.matrix.androidsdk.core.listeners.ProgressListener
import java.util.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.matrix.androidsdk.crypto.model.rest;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import org.matrix.androidsdk.core.interfaces.DatedObject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.matrix.androidsdk.crypto.rest;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.text.TextUtils;

import com.google.gson.Gson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.matrix.androidsdk.crypto.verification

import android.support.annotation.StringRes
import androidx.annotation.StringRes
import org.matrix.androidsdk.crypto.R

object VerificationEmoji {
Expand Down
Loading

0 comments on commit 037443f

Please sign in to comment.