mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 06:55:42 +03:00
Cleanups
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
035af9a385
commit
c4faf54772
1 changed files with 9 additions and 12 deletions
|
@ -141,12 +141,10 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||||
|
|
||||||
String usernameAndServerCrc32 = signatureVerification.getUserEntity().getUsername() +
|
|
||||||
"@" + signatureVerification.getUserEntity().getBaseUrl();
|
|
||||||
crc32.update(usernameAndServerCrc32.getBytes());
|
|
||||||
String groupName = String.format(getResources().getString(R.string
|
String groupName = String.format(getResources().getString(R.string
|
||||||
.nc_notification_channel), signatureVerification.getUserEntity()
|
.nc_notification_channel), signatureVerification.getUserEntity()
|
||||||
.getDisplayName(), signatureVerification.getUserEntity().getBaseUrl());
|
.getDisplayName(), signatureVerification.getUserEntity().getBaseUrl());
|
||||||
|
crc32.update(groupName.getBytes());
|
||||||
|
|
||||||
NotificationUtils.createNotificationChannelGroup(notificationManager,
|
NotificationUtils.createNotificationChannelGroup(notificationManager,
|
||||||
Long.toString(crc32.getValue()),
|
Long.toString(crc32.getValue()),
|
||||||
|
@ -175,7 +173,6 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
|
||||||
|
|
||||||
notificationBuilder.setContentIntent(pendingIntent);
|
notificationBuilder.setContentIntent(pendingIntent);
|
||||||
|
|
||||||
if (notificationManager != null) {
|
|
||||||
String stringForCrc = decryptedPushMessage.getSubject() + " " + signatureVerification
|
String stringForCrc = decryptedPushMessage.getSubject() + " " + signatureVerification
|
||||||
.getUserEntity().getDisplayName() + " " + signatureVerification.getUserEntity
|
.getUserEntity().getDisplayName() + " " + signatureVerification.getUserEntity
|
||||||
().getBaseUrl();
|
().getBaseUrl();
|
||||||
|
@ -185,7 +182,7 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
|
||||||
|
|
||||||
notificationManager.notify((int) crc32.getValue(), notificationBuilder.build());
|
notificationManager.notify((int) crc32.getValue(), notificationBuilder.build());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (NoSuchAlgorithmException e1) {
|
} catch (NoSuchAlgorithmException e1) {
|
||||||
Log.d(TAG, "No proper algorithm to decrypt the message " + e1.getLocalizedMessage());
|
Log.d(TAG, "No proper algorithm to decrypt the message " + e1.getLocalizedMessage());
|
||||||
|
|
Loading…
Reference in a new issue