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

Commit e5478fd

Browse files
committed
Merge branch 'release/0.8.15'
2 parents 101b429 + ffcc46b commit e5478fd

File tree

61 files changed

+1925
-1259
lines changed

Some content is hidden

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

61 files changed

+1925
-1259
lines changed

CHANGES.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
Changes in Riot 0.8.15 (2018-08-30)
2+
===================================================
3+
4+
MatrixSdk:
5+
- Upgrade to version 0.9.9.
6+
7+
Improvements:
8+
- Improve intent to open document (#2544)
9+
- Avoid useless dialog for permission (#2331)
10+
- Improve wording when exporting keys (#2289)
11+
12+
Other changes:
13+
- Upgrade lib libphonenumber from v8.0.1 to 8.9.12
14+
- Upgrade Google firebase libs
15+
16+
Bugfix:
17+
- Handle `\/` at the beginning of a message to send a message starting with `/` (#658)
18+
- Escape nicknames starting with a forward slash `/` in mentions (#2146)
19+
- Improve management of Push feature
20+
- MatrixError mResourceLimitExceededError is now managed in MxDataHandler (vector-im/riot-android#2547 point 2)
21+
122
Changes in Riot 0.8.14 (2018-08-27)
223
===================================================
324

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 = 81400
23-
versionNameProp = "0.8.14"
22+
versionCodeProp = 81500
23+
versionNameProp = "0.8.15"
2424
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
2525
buildNumberProp = "${versionBuild}"
2626
}

vector/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ dependencies {
185185
implementation 'com.github.bumptech.glide:glide:4.7.1'
186186
kapt 'com.github.bumptech.glide:compiler:4.7.1'
187187

188-
implementation 'com.googlecode.libphonenumber:libphonenumber:8.0.1'
188+
implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.12'
189189

190190
/************* Matrix SDK management **************/
191191
// update settings.gradle
@@ -223,8 +223,8 @@ dependencies {
223223
/************* flavors management **************/
224224

225225
// app flavor only
226-
appImplementation 'com.google.firebase:firebase-core:11.8.0'
227-
appImplementation 'com.google.firebase:firebase-messaging:11.8.0'
226+
appImplementation 'com.google.firebase:firebase-core:16.0.3'
227+
appImplementation 'com.google.firebase:firebase-messaging:17.3.0'
228228

229229
// fdroid flavor only
230230
}

vector/libs/matrix-sdk.aar

2.12 KB
Binary file not shown.

vector/src/app/AndroidManifest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@
2222
android:value="true" />
2323

2424
<service
25-
android:name="im.vector.gcm.MatrixGcmListenerService"
26-
android:exported="false">
25+
android:name="im.vector.gcm.MatrixGcmListenerService">
2726
<intent-filter>
2827
<action android:name="com.google.firebase.MESSAGING_EVENT" />
2928
</intent-filter>
3029
</service>
3130

3231
<service
33-
android:name="im.vector.gcm.MatrixInstanceIDListenerService"
34-
android:exported="false">
32+
android:name="im.vector.gcm.MatrixInstanceIDListenerService">
3533
<intent-filter>
3634
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
3735
</intent-filter>

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ private void onMessageReceivedInternal(final Map<String, String> data) {
185185
*/
186186
@Override
187187
public void onMessageReceived(RemoteMessage message) {
188-
Log.d(LOG_TAG, "## onMessageReceived() from FCM");
188+
Log.d(LOG_TAG, "## onMessageReceived() from FCM with priority " + message.getPriority()
189+
+ " from " + message.getFrom());
189190

190191
// Ensure event stream service is started
191192
if (EventStreamService.getInstance() == null) {
@@ -205,4 +206,9 @@ public void run() {
205206
}
206207
});
207208
}
209+
210+
@Override
211+
public void onDeletedMessages() {
212+
Log.d(LOG_TAG, "## onDeletedMessages()");
213+
}
208214
}

vector/src/main/java/im/vector/KeyRequestHandler.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,27 +334,22 @@ private void displayKeyShareDialog(final MXSession session, final MXDeviceInfo d
334334
.setNegativeButton(R.string.ignore_request, new DialogInterface.OnClickListener() {
335335
@Override
336336
public void onClick(DialogInterface dialog, int which) {
337-
dialog.dismiss();
338337
onDisplayKeyShareDialogClose(false, true);
339-
340338
}
341339
})
342340
.setNeutralButton(R.string.share_without_verifying,
343341
new DialogInterface.OnClickListener() {
344342
public void onClick(DialogInterface dialog, int id) {
345-
dialog.dismiss();
346343
onDisplayKeyShareDialogClose(true, false);
347344
}
348345
})
349346
.setPositiveButton(R.string.start_verification,
350347
new DialogInterface.OnClickListener() {
351348
public void onClick(final DialogInterface dialog, int id) {
352-
dialog.dismiss();
353349
CommonActivityUtils.displayDeviceVerificationDialog(deviceInfo, mCurrentUser, session, activity, new SimpleApiCallback<Void>() {
354350
@Override
355351
public void onSuccess(Void info) {
356352
if (deviceInfo.isVerified()) {
357-
dialog.dismiss();
358353
onDisplayKeyShareDialogClose(true, false);
359354
} else {
360355
displayKeyShareDialog(session, deviceInfo, wasNewDevice);

vector/src/main/java/im/vector/Matrix.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import im.vector.activity.CommonActivityUtils;
6363
import im.vector.activity.SplashActivity;
6464
import im.vector.analytics.MetricsListenerProxy;
65-
import im.vector.analytics.PiwikAnalytics;
6665
import im.vector.gcm.GcmRegistrationManager;
6766
import im.vector.services.EventStreamService;
6867
import im.vector.store.LoginStorage;
@@ -639,8 +638,11 @@ private MXSession createSession(final Context context, HomeServerConnectionConfi
639638
}*/
640639

641640
final MXDataHandler dataHandler = new MXDataHandler(store, credentials);
642-
final MXSession session = new MXSession(hsConfig, dataHandler, mAppContext);
643-
session.setMetricsListener(metricsListener);
641+
final MXSession session = new MXSession.Builder(hsConfig, dataHandler, context)
642+
.withPushServerUrl(context.getString(R.string.push_server_url))
643+
.withMetricsListener(metricsListener)
644+
.build();
645+
644646
dataHandler.setMetricsListener(metricsListener);
645647
dataHandler.setRequestNetworkErrorListener(new MXDataHandler.RequestNetworkErrorListener() {
646648

vector/src/main/java/im/vector/activity/CommonActivityUtils.java

Lines changed: 12 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -909,40 +909,17 @@ public static void setToggleDirectMessageRoom(final MXSession aSession,
909909
final String aRoomId,
910910
String aParticipantUserId,
911911
final Activity fromActivity,
912-
final ApiCallback<Void> callback) {
912+
@NonNull final ApiCallback<Void> callback) {
913913

914914
if ((null == aSession) || (null == fromActivity) || TextUtils.isEmpty(aRoomId)) {
915-
Log.d(LOG_TAG, "## setToggleDirectMessageRoom(): failure - invalid input parameters");
915+
Log.e(LOG_TAG, "## setToggleDirectMessageRoom(): failure - invalid input parameters");
916+
callback.onUnexpectedError(new Exception("## setToggleDirectMessageRoom(): failure - invalid input parameters"));
916917
} else {
917-
aSession.toggleDirectChatRoom(aRoomId, aParticipantUserId, new ApiCallback<Void>() {
918+
aSession.toggleDirectChatRoom(aRoomId, aParticipantUserId, new SimpleApiCallback<Void>(callback) {
918919
@Override
919920
public void onSuccess(Void info) {
920921
callback.onSuccess(null);
921922
}
922-
923-
@Override
924-
public void onNetworkError(Exception e) {
925-
Log.d(LOG_TAG, "## setToggleDirectMessageRoom(): invite() onNetworkError Msg=" + e.getLocalizedMessage());
926-
if (null != callback) {
927-
callback.onNetworkError(e);
928-
}
929-
}
930-
931-
@Override
932-
public void onMatrixError(MatrixError e) {
933-
Log.d(LOG_TAG, "## setToggleDirectMessageRoom(): invite() onMatrixError Msg=" + e.getLocalizedMessage());
934-
if (null != callback) {
935-
callback.onMatrixError(e);
936-
}
937-
}
938-
939-
@Override
940-
public void onUnexpectedError(Exception e) {
941-
Log.d(LOG_TAG, "## setToggleDirectMessageRoom(): invite() onUnexpectedError Msg=" + e.getLocalizedMessage());
942-
if (null != callback) {
943-
callback.onUnexpectedError(e);
944-
}
945-
}
946923
});
947924
}
948925
}
@@ -1012,19 +989,14 @@ public int compare(RoomSummary lhs, RoomSummary rhs) {
1012989

1013990
new AlertDialog.Builder(fromActivity)
1014991
.setTitle(R.string.send_files_in)
1015-
.setNegativeButton(R.string.cancel,
1016-
new DialogInterface.OnClickListener() {
1017-
@Override
1018-
public void onClick(DialogInterface dialog, int which) {
1019-
dialog.dismiss();
1020-
}
1021-
})
992+
.setNegativeButton(R.string.cancel, null)
1022993
.setAdapter(adapter,
1023994
new DialogInterface.OnClickListener() {
1024995

1025996
@Override
1026997
public void onClick(DialogInterface dialog, final int which) {
1027998
dialog.dismiss();
999+
10281000
fromActivity.runOnUiThread(new Runnable() {
10291001
@Override
10301002
public void run() {
@@ -1052,34 +1024,6 @@ public void run() {
10521024
// Media utils
10531025
//==============================================================================================================
10541026

1055-
/**
1056-
* Save a media in the downloads directory and offer to open it with a third party application.
1057-
*
1058-
* @param activity the activity
1059-
* @param savedMediaPath the media path
1060-
* @param mimeType the media mime type.
1061-
*/
1062-
public static void openMedia(final Activity activity, final String savedMediaPath, final String mimeType) {
1063-
if ((null != activity) && (null != savedMediaPath)) {
1064-
activity.runOnUiThread(new Runnable() {
1065-
@Override
1066-
public void run() {
1067-
try {
1068-
File file = new File(savedMediaPath);
1069-
Intent intent = new Intent();
1070-
intent.setAction(android.content.Intent.ACTION_VIEW);
1071-
intent.setDataAndType(Uri.fromFile(file), mimeType);
1072-
activity.startActivity(intent);
1073-
} catch (ActivityNotFoundException e) {
1074-
Toast.makeText(activity, e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
1075-
} catch (Exception e) {
1076-
Log.d(LOG_TAG, "## openMedia(): Exception Msg=" + e.getMessage(), e);
1077-
}
1078-
}
1079-
});
1080-
}
1081-
}
1082-
10831027
/**
10841028
* Copy a file into a dstPath directory.
10851029
* The output filename can be provided.
@@ -1189,11 +1133,11 @@ protected Pair<String, Exception> doInBackground(Void... params) {
11891133
protected void onPostExecute(Pair<String, Exception> result) {
11901134
if (null != callback) {
11911135
if (null == result) {
1192-
callback.onNetworkError(new Exception("Null parameters"));
1136+
callback.onUnexpectedError(new Exception("Null parameters"));
11931137
} else if (null != result.first) {
11941138
callback.onSuccess(result.first);
11951139
} else {
1196-
callback.onNetworkError(result.second);
1140+
callback.onUnexpectedError(result.second);
11971141
}
11981142
}
11991143
}
@@ -1513,9 +1457,7 @@ public void onClick(DialogInterface dialog, int which) {
15131457
/**
15141458
* Export the e2e keys for a dedicated session.
15151459
* {@link im.vector.util.PermissionsToolsKt#PERMISSIONS_FOR_WRITING_FILES} has to be granted
1516-
*
1517-
* TODO Export as a Share
1518-
*
1460+
* <p>
15191461
*
15201462
* @param session the session
15211463
* @param password the password
@@ -1532,7 +1474,7 @@ public static void exportKeys(final MXSession session, final String password, fi
15321474
return;
15331475
}
15341476

1535-
session.getCrypto().exportRoomKeys(password, new ApiCallback<byte[]>() {
1477+
session.getCrypto().exportRoomKeys(password, new SimpleApiCallback<byte[]>(callback) {
15361478
@Override
15371479
public void onSuccess(byte[] bytesArray) {
15381480
try {
@@ -1541,62 +1483,20 @@ public void onSuccess(byte[] bytesArray) {
15411483
stream.close();
15421484

15431485
saveMediaIntoDownloads(appContext,
1544-
new File(Uri.parse(url).getPath()), "riot-keys.txt", "text/plain", new SimpleApiCallback<String>() {
1486+
new File(Uri.parse(url).getPath()), "riot-keys.txt", "text/plain", new SimpleApiCallback<String>(callback) {
15451487
@Override
15461488
public void onSuccess(String path) {
15471489
if (null != callback) {
15481490
callback.onSuccess(path);
15491491
}
15501492
}
1551-
1552-
@Override
1553-
public void onNetworkError(Exception e) {
1554-
if (null != callback) {
1555-
callback.onNetworkError(e);
1556-
}
1557-
}
1558-
1559-
@Override
1560-
public void onMatrixError(MatrixError e) {
1561-
if (null != callback) {
1562-
callback.onMatrixError(e);
1563-
}
1564-
}
1565-
1566-
@Override
1567-
public void onUnexpectedError(Exception e) {
1568-
if (null != callback) {
1569-
callback.onUnexpectedError(e);
1570-
}
1571-
}
15721493
});
15731494
} catch (Exception e) {
15741495
if (null != callback) {
1575-
callback.onMatrixError(new MatrixError(null, e.getLocalizedMessage()));
1496+
callback.onUnexpectedError(e);
15761497
}
15771498
}
15781499
}
1579-
1580-
@Override
1581-
public void onNetworkError(Exception e) {
1582-
if (null != callback) {
1583-
callback.onNetworkError(e);
1584-
}
1585-
}
1586-
1587-
@Override
1588-
public void onMatrixError(MatrixError e) {
1589-
if (null != callback) {
1590-
callback.onMatrixError(e);
1591-
}
1592-
}
1593-
1594-
@Override
1595-
public void onUnexpectedError(Exception e) {
1596-
if (null != callback) {
1597-
callback.onUnexpectedError(e);
1598-
}
1599-
}
16001500
});
16011501
}
16021502

vector/src/main/java/im/vector/activity/HistoricalRoomsActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ public class HistoricalRoomsActivity extends VectorAppCompatActivity implements
8282
@BindView(R.id.historical_toolbar)
8383
Toolbar mToolbar;
8484

85-
@BindView(R.id.historical_waiting_view)
86-
View waitingView;
87-
8885
// historical adapter
8986
private HomeRoomAdapter mHistoricalAdapter;
9087

@@ -167,6 +164,9 @@ public void onStop() {
167164
*/
168165

169166
private void initViews() {
167+
// Waiting View
168+
setWaitingView(findViewById(R.id.historical_waiting_view));
169+
170170
// Toolbar
171171
setSupportActionBar(mToolbar);
172172
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

vector/src/main/java/im/vector/activity/JitsiCallActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ public class JitsiCallActivity extends VectorAppCompatActivity {
9595
@BindView(R.id.jsti_connecting_text_view)
9696
View mConnectingTextView;
9797

98-
@BindView(R.id.jitsi_progress_layout)
99-
View waitingView;
100-
10198
/**
10299
* Widget events listener
103100
*/
@@ -126,6 +123,9 @@ public int getLayoutRes() {
126123
@Override
127124
@SuppressLint("NewApi")
128125
public void initUiAndData() {
126+
// Waiting View
127+
setWaitingView(findViewById(R.id.jitsi_progress_layout));
128+
129129
mWidget = (Widget) getIntent().getSerializableExtra(EXTRA_WIDGET_ID);
130130
mIsVideoCall = getIntent().getBooleanExtra(EXTRA_ENABLE_VIDEO, true);
131131

0 commit comments

Comments
 (0)