Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 04edbf9

Browse files
committed
Merge branch 'release/v0.8.13'
2 parents 07b004b + 3a934dc commit 04edbf9

File tree

167 files changed

+5669
-3038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+5669
-3038
lines changed

AUTHORS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ Safa AlFulaij <safa1996alfulaij at gmail.com>
4242

4343
Isa Cichon <isa4 at posteo.net>
4444
* Add spacing to device keys
45+
46+
Nathan van Beelen <nathan at vanbeelen.org>
47+
* PR #1742: Add a media previewer

CHANGES.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
Changes in Riot 0.8.13 (2018-08-09)
2+
===================================================
3+
4+
Features:
5+
- Resurrect performance metrics (#2391)
6+
- Telemetry to report incidence of UISIs (#2330)
7+
- Add a previewer for previewing media before sending it into the room (#1742|#2445)
8+
- Implements ReplyTo feature (#2390)
9+
- Add auto completion for slash commands (#2384)
10+
- Support Room Versioning (#2441)
11+
12+
Improvements:
13+
- Update matrix-sdk.aar lib (v0.9.7).
14+
- Piwik: Update the way how stats are reported (#2402)
15+
- Improve BugReport screen: display a preview of the screenshot (#2318)
16+
- In the settings, move theme settings just below "language" (#2439)
17+
- Improve the display of the sources of the message in the dialog (#2348)
18+
- Improve the display of the buttons and the reason in the room preview (#2352)
19+
- In the flair section on settings, notify the user when he has no flair (#2430)
20+
- Improve GDPR consent webview management (#2491)
21+
- Support external keyboard to send messages for recent devices (#220, #1279)
22+
- When user ignores or un-ignores someone, notify that the app will restart (#2437)
23+
24+
Other changes:
25+
- Remove dependency to `android-gif-drawable` lib and use Glide to animate logo on Splashscreen (#2421)
26+
- Keep only Room.getState() method and remove Room.getLiveState() because they are similar (matrix-org/matrix-android-sdk#310)
27+
28+
Bugfix:
29+
- Fix issue on incoming call screen when "Do not disturb mode" is active (#2417)
30+
- Fix issue when selecting sound for notifications in the settings
31+
- Fix issue when changing device name in the settings (#2416)
32+
- Fix issue on verifying device, update the wording of the description message (#1067)
33+
- Messages with code blocks show other HTML as plain text (#2280)
34+
- Message with <p> was sometimes not properly formatted (#2275)
35+
- Fix notification issue when Riot is not started (#2451)
36+
- Fix Unable to add Matrix apps (#2466)
37+
- Riot auto joined a public room (#2472)
38+
- Remove last traces of Firebase analytics (#2481)
39+
- code blocks are escaped and therefore hard readable (#2484)
40+
- Restore the navigation of the back button in the public rooms preview header (#2473)
41+
- Fix issue on preference screen: device lists was not displayed (#2409)
42+
- Ensure notification has a title (#2242)
43+
144
Changes in Riot 0.8.12 (2018-07-06)
245
===================================================
346

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ buildscript {
1919

2020
// global properties used in sub modules
2121
ext {
22-
versionCodeProp = 81200
23-
versionNameProp = "0.8.12"
22+
versionCodeProp = 81300
23+
versionNameProp = "0.8.13"
2424
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
2525
buildNumberProp = "${versionBuild}"
2626
}

vector/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ dependencies {
168168
// UI
169169
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
170170
implementation 'com.getbase:floatingactionbutton:1.10.1'
171+
implementation 'com.binaryfork:spanny:1.0.4'
171172

172173
// Network
173174
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
@@ -180,8 +181,6 @@ dependencies {
180181
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
181182
implementation 'com.squareup.okio:okio:1.13.0'
182183

183-
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'
184-
185184
// Use Glide library to display image (Gif supported)
186185
implementation 'com.github.bumptech.glide:glide:4.7.1'
187186
kapt 'com.github.bumptech.glide:compiler:4.7.1'

vector/libs/matrix-sdk.aar

16.1 KB
Binary file not shown.

vector/src/app/AndroidManifest.xml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,13 @@
1414
android:theme="@style/AppTheme"
1515
tools:replace="allowBackup,label">
1616

17-
<!-- google analytics -->
18-
<meta-data
19-
android:name="com.google.android.gms.version"
20-
android:value="@integer/google_play_services_version" />
2117

22-
<!-- Optionally, register AnalyticsReceiver and AnalyticsService to support background dispatching on non-Google Play devices -->
23-
<receiver
24-
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
25-
android:enabled="true">
26-
<intent-filter>
27-
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
28-
</intent-filter>
29-
</receiver>
18+
<!-- Firebase components -->
3019

31-
<service
32-
android:name="com.google.android.gms.analytics.AnalyticsService"
33-
android:enabled="true"
34-
android:exported="false" />
20+
<meta-data
21+
android:name="firebase_analytics_collection_deactivated"
22+
android:value="true" />
3523

36-
<!-- GCM components -->
3724
<service
3825
android:name="im.vector.gcm.MatrixGcmListenerService"
3926
android:exported="false">
Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
/*
1+
/*
22
* Copyright 2014 OpenMarket Ltd
33
* Copyright 2017 Vector Creations Ltd
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
8-
*
8+
*
99
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
10+
*
1111
* Unless required by applicable law or agreed to in writing, software
1212
* distributed under the License is distributed on an "AS IS" BASIS,
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,27 +27,11 @@ class GCMHelper {
2727
private static final String LOG_TAG = GCMHelper.class.getSimpleName();
2828

2929
/**
30-
* Retrieves the GCM registration token.
30+
* Retrieves the FCM registration token.
3131
*/
3232
public static String getRegistrationToken() {
33-
String registrationToken = null;
34-
35-
try {
36-
if (null == VectorApp.getInstance()) {
37-
Log.e(LOG_TAG, "## getRegistrationToken() : No active application");
38-
} else {
39-
if (null == FirebaseApp.initializeApp(VectorApp.getInstance())) {
40-
Log.e(LOG_TAG, "## getRegistrationToken() : cannot initialise FirebaseApp");
41-
}
42-
}
43-
// try to get the token anyway
44-
registrationToken = FirebaseInstanceId.getInstance().getToken();
45-
Log.d(LOG_TAG, "## getRegistrationToken(): " + registrationToken);
46-
} catch (Exception e) {
47-
Log.e(LOG_TAG, "## getRegistrationToken() : failed " + e.getMessage());
48-
}
49-
50-
33+
final String registrationToken = FirebaseInstanceId.getInstance().getToken();
34+
Log.d(LOG_TAG, "## getRegistrationToken(): " + registrationToken);
5135
return registrationToken;
5236
}
5337

@@ -58,7 +42,7 @@ public static void clearRegistrationToken() {
5842
try {
5943
FirebaseInstanceId.getInstance().deleteInstanceId();
6044
} catch (Exception e) {
61-
Log.e(LOG_TAG, "##clearRegistrationToken() failed " + e.getMessage());
45+
Log.e(LOG_TAG, "##clearRegistrationToken() failed " + e.getMessage(), e);
6246
}
6347
}
6448
}

vector/src/app/java/im/vector/gcm/MatrixGcmListenerService.java

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
package im.vector.gcm;
2020

21+
import android.support.annotation.Nullable;
22+
2123
import com.google.firebase.messaging.FirebaseMessagingService;
2224
import com.google.firebase.messaging.RemoteMessage;
2325
import com.google.gson.JsonParser;
@@ -54,6 +56,7 @@ public class MatrixGcmListenerService extends FirebaseMessagingService {
5456
* @param data the GCM data
5557
* @return the event
5658
*/
59+
@Nullable
5760
private Event parseEvent(Map<String, String> data) {
5861
// accept only event with room id.
5962
if ((null == data) || !data.containsKey("room_id") || !data.containsKey("event_id")) {
@@ -73,7 +76,7 @@ private Event parseEvent(Map<String, String> data) {
7376

7477
return event;
7578
} catch (Exception e) {
76-
Log.e(LOG_TAG, "buildEvent fails " + e.getLocalizedMessage());
79+
Log.e(LOG_TAG, "buildEvent fails " + e.getLocalizedMessage(), e);
7780
}
7881

7982
return null;
@@ -121,13 +124,14 @@ private void onMessageReceivedInternal(final Map<String, String> data) {
121124
Event event = parseEvent(data);
122125

123126
String roomName = data.get("room_name");
124-
if ((null == roomName) && (null != roomId)) {
127+
if (null == roomName && null != roomId) {
128+
// Try to get the room name from our store
125129
MXSession session = Matrix.getInstance(getApplicationContext()).getDefaultSession();
126130

127131
if ((null != session) && session.getDataHandler().getStore().isReady()) {
128132
Room room = session.getDataHandler().getStore().getRoom(roomId);
129133
if (null != room) {
130-
roomName = VectorUtils.getRoomDisplayName(MatrixGcmListenerService.this, session, room);
134+
roomName = VectorUtils.getRoomDisplayName(this, session, room);
131135
}
132136
}
133137
}
@@ -141,36 +145,36 @@ private void onMessageReceivedInternal(final Map<String, String> data) {
141145
// check if the application has been launched once
142146
// the first GCM event could have been triggered whereas the application is not yet launched.
143147
// so it is required to create the sessions and to start/resume event stream
144-
if (!mCheckLaunched && (null != Matrix.getInstance(getApplicationContext()).getDefaultSession())) {
145-
CommonActivityUtils.startEventStreamService(MatrixGcmListenerService.this);
148+
if (!mCheckLaunched && null != Matrix.getInstance(getApplicationContext()).getDefaultSession()) {
149+
CommonActivityUtils.startEventStreamService(this);
146150
mCheckLaunched = true;
147151
}
148152

149153
// check if the event was not yet received
150154
// a previous catchup might have already retrieved the notified event
151-
if ((null != eventId) && (null != roomId)) {
155+
if (null != eventId && null != roomId) {
152156
try {
153157
Collection<MXSession> sessions = Matrix.getInstance(getApplicationContext()).getSessions();
154158

155-
if ((null != sessions) && (sessions.size() > 0)) {
159+
if (null != sessions && !sessions.isEmpty()) {
156160
for (MXSession session : sessions) {
157161
if (session.getDataHandler().getStore().isReady()) {
158162
if (null != session.getDataHandler().getStore().getEvent(eventId, roomId)) {
159163
Log.e(LOG_TAG, "## onMessageReceivedInternal() : ignore the event " + eventId
160-
+ " in room " + roomId + "because it is already known");
164+
+ " in room " + roomId + " because it is already known");
161165
return;
162166
}
163167
}
164168
}
165169
}
166170
} catch (Exception e) {
167-
Log.e(LOG_TAG, "## onMessageReceivedInternal() : failed to check if the event was already defined " + e.getMessage());
171+
Log.e(LOG_TAG, "## onMessageReceivedInternal() : failed to check if the event was already defined " + e.getMessage(), e);
168172
}
169173
}
170174

171-
CommonActivityUtils.catchupEventStream(MatrixGcmListenerService.this);
175+
CommonActivityUtils.catchupEventStream(this);
172176
} catch (Exception e) {
173-
Log.d(LOG_TAG, "## onMessageReceivedInternal() failed : " + e.getMessage());
177+
Log.d(LOG_TAG, "## onMessageReceivedInternal() failed : " + e.getMessage(), e);
174178
}
175179
}
176180

@@ -181,6 +185,13 @@ private void onMessageReceivedInternal(final Map<String, String> data) {
181185
*/
182186
@Override
183187
public void onMessageReceived(RemoteMessage message) {
188+
Log.d(LOG_TAG, "## onMessageReceived() from FCM");
189+
190+
// Ensure event stream service is started
191+
if (EventStreamService.getInstance() == null) {
192+
CommonActivityUtils.startEventStreamService(this);
193+
}
194+
184195
final Map<String, String> data = message.getData();
185196

186197
if (null == mUIHandler) {

vector/src/main/AndroidManifest.xml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<uses-permission android:name="android.permission.READ_CONTACTS" />
1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1212
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
13-
<uses-permission android:name="android.permission.READ_LOGS" tools:ignore="ProtectedPermissions"/>
13+
<uses-permission
14+
android:name="android.permission.READ_LOGS"
15+
tools:ignore="ProtectedPermissions" />
1416

1517
<!-- universal links management -->
1618
<uses-permission android:name="android.permission.REORDER_TASKS" />
@@ -22,11 +24,15 @@
2224
<uses-permission android:name="android.permission.RECORD_AUDIO" />
2325
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
2426
<!-- required on android 6.0.0 devices -->
25-
<uses-permission android:name="android.permission.WRITE_SETTINGS" tools:ignore="ProtectedPermissions"/>
27+
<uses-permission
28+
android:name="android.permission.WRITE_SETTINGS"
29+
tools:ignore="ProtectedPermissions" />
2630
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
2731

2832
<!-- shared files from external application -->
29-
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" tools:ignore="ProtectedPermissions"/>
33+
<uses-permission
34+
android:name="android.permission.MANAGE_DOCUMENTS"
35+
tools:ignore="ProtectedPermissions" />
3036

3137
<!-- to be able to turn on display when a notification is received-->
3238
<uses-permission android:name="android.permission.WAKE_LOCK" />
@@ -35,7 +41,7 @@
3541
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
3642

3743
<!-- disable the battery optimisation on some devices to let the background sync works -->
38-
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
44+
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
3945

4046
<!-- videocall feature-->
4147
<!-- android.permission.CAMERA defines android.hardware.camera -->
@@ -47,7 +53,7 @@
4753
<uses-feature
4854
android:name="android.hardware.camera.any"
4955
android:required="false"
50-
tools:replace="required"/>
56+
tools:replace="required" />
5157

5258
<uses-feature
5359
android:name="android.hardware.camera.autofocus"
@@ -104,7 +110,7 @@
104110
<!-- No limit for screen ratio: avoid black strips -->
105111
<meta-data
106112
android:name="android.max_aspect"
107-
android:value="9.9"/>
113+
android:value="9.9" />
108114

109115
<!-- activities list starts here -->
110116
<activity
@@ -306,7 +312,7 @@
306312
android:label="@string/title_activity_group_details"
307313
android:launchMode="singleTop"
308314
android:theme="@style/GroupAppTheme"
309-
android:windowSoftInputMode="adjustResize"/>
315+
android:windowSoftInputMode="adjustResize" />
310316
<activity android:name=".activity.VectorUniversalLinkActivity">
311317
<intent-filter>
312318
<action android:name="android.intent.action.VIEW" />
@@ -385,7 +391,12 @@
385391
android:label="@string/settings_notification_privacy"
386392
android:theme="@style/CountryPickerTheme" />
387393
<activity
388-
android:name=".activity.SimpleWebViewActivity"
394+
android:name=".activity.VectorWebViewActivity"
395+
android:theme="@style/AppTheme.NoActionBar" />
396+
397+
<activity
398+
android:name="im.vector.activity.MediaPreviewerActivity"
399+
android:configChanges="orientation|screenSize"
389400
android:theme="@style/AppTheme.NoActionBar" />
390401

391402
<!-- broadcast receiver -->

0 commit comments

Comments
 (0)