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

Commit f3475f8

Browse files
committed
Merge branch 'release/v0.9.29'
2 parents 3c0261b + db9824e commit f3475f8

File tree

5 files changed

+22
-17
lines changed

5 files changed

+22
-17
lines changed

CHANGES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Changes to Matrix Android SDK in 0.9.29 (2019-10-04)
2+
=======================================================
3+
4+
Corrective release
5+
6+
Bugfix:
7+
- Fix / Keysbackup not working (failed to get version)
8+
19
Changes to Matrix Android SDK in 0.9.28 (2019-10-03)
210
=======================================================
311

matrix-sdk-core/src/main/java/org/matrix/androidsdk/RestClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public enum EndPointServer {
100100
private OkHttpClient mOkHttpClient;
101101

102102
public RestClient(HomeServerConnectionConfig hsConfig, Class<T> type, String uriPrefix) {
103-
this(hsConfig, type, uriPrefix, GsonProvider.provideGson(), EndPointServer.HOME_SERVER);
103+
this(hsConfig, type, uriPrefix, GsonProvider.provideKotlinGson(), EndPointServer.HOME_SERVER);
104104
}
105105

106106
public RestClient(HomeServerConnectionConfig hsConfig, Class<T> type, String uriPrefix, Gson gson) {

matrix-sdk-core/src/main/java/org/matrix/androidsdk/core/json/GsonProvider.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,15 @@ public static Gson provideGson() {
3535
return gson;
3636
}
3737

38+
// Can serialize/deserialise kt objects without the need to add @JVMField
39+
private static final Gson kotlinGson = new GsonBuilder()
40+
.registerTypeAdapter(boolean.class, new BooleanDeserializer(false))
41+
.registerTypeAdapter(Boolean.class, new BooleanDeserializer(true))
42+
.create();
43+
44+
public static Gson provideKotlinGson() {
45+
return kotlinGson;
46+
}
47+
48+
3849
}

matrix-sdk/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ android {
2727
defaultConfig {
2828
minSdkVersion 16
2929
targetSdkVersion 28
30-
versionCode 928
31-
versionName "0.9.28"
30+
versionCode 929
31+
versionName "0.9.29"
3232
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3333

3434
// Enable multi dex for test

matrix-sdk/src/main/java/org/matrix/androidsdk/core/JsonUtils.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ public class JsonUtils {
7070

7171
private static final Gson basicGson = new Gson();
7272

73-
private static final Gson kotlinGson = new GsonBuilder()
74-
.registerTypeAdapter(boolean.class, new BooleanDeserializer(false))
75-
.registerTypeAdapter(Boolean.class, new BooleanDeserializer(true))
76-
.create();
77-
7873
private static final Gson gson = new GsonBuilder()
7974
.setFieldNamingStrategy(new MatrixFieldNamingStrategy())
8075
.excludeFieldsWithModifiers(Modifier.PRIVATE, Modifier.STATIC)
@@ -104,15 +99,6 @@ public static Gson getBasicGson() {
10499
return basicGson;
105100
}
106101

107-
/**
108-
* Provides the JSON parser for Kotlin.
109-
*
110-
* @return the kotlin JSON parser
111-
*/
112-
public static Gson getKotlinGson() {
113-
return kotlinGson;
114-
}
115-
116102
/**
117103
* Provides the JSON parser.
118104
*

0 commit comments

Comments
 (0)