Define 'BundleKeys' as 'const'

During the migration from Java to Kotlin this was not done and resulted
in

    BundleKeys.INSTANCE.getKEY_CALL_VOICE_ONLY()

instead of

    BundleKeys.KEY_CALL_VOICE_ONLY

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-09-21 10:49:48 +02:00
parent d0c86ec619
commit dda5a9e3da
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E
10 changed files with 111 additions and 101 deletions

View File

@ -2,6 +2,8 @@
* Nextcloud Talk application * Nextcloud Talk application
* *
* @author Mario Danic * @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com> * Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -90,7 +92,6 @@ import com.nextcloud.talk.utils.ApiUtils;
import com.nextcloud.talk.utils.DisplayUtils; import com.nextcloud.talk.utils.DisplayUtils;
import com.nextcloud.talk.utils.NotificationUtils; import com.nextcloud.talk.utils.NotificationUtils;
import com.nextcloud.talk.utils.animations.PulseAnimation; import com.nextcloud.talk.utils.animations.PulseAnimation;
import com.nextcloud.talk.utils.bundle.BundleKeys;
import com.nextcloud.talk.utils.permissions.PlatformPermissionUtil; import com.nextcloud.talk.utils.permissions.PlatformPermissionUtil;
import com.nextcloud.talk.utils.power.PowerManagerUtils; import com.nextcloud.talk.utils.power.PowerManagerUtils;
import com.nextcloud.talk.utils.preferences.AppPreferences; import com.nextcloud.talk.utils.preferences.AppPreferences;
@ -163,6 +164,15 @@ import okhttp3.Cache;
import pub.devrel.easypermissions.AfterPermissionGranted; import pub.devrel.easypermissions.AfterPermissionGranted;
import static android.app.PendingIntent.FLAG_IMMUTABLE; import static android.app.PendingIntent.FLAG_IMMUTABLE;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_CALL_VOICE_ONLY;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_CALL_WITHOUT_NOTIFICATION;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_CONVERSATION_NAME;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_CONVERSATION_PASSWORD;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_FROM_NOTIFICATION_START_CALL;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_MODIFIED_BASE_URL;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_ID;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN;
import static com.nextcloud.talk.utils.bundle.BundleKeys.KEY_USER_ENTITY;
import static com.nextcloud.talk.webrtc.Globals.JOB_ID; import static com.nextcloud.talk.webrtc.Globals.JOB_ID;
import static com.nextcloud.talk.webrtc.Globals.PARTICIPANTS_UPDATE; import static com.nextcloud.talk.webrtc.Globals.PARTICIPANTS_UPDATE;
import static com.nextcloud.talk.webrtc.Globals.ROOM_TOKEN; import static com.nextcloud.talk.webrtc.Globals.ROOM_TOKEN;
@ -297,21 +307,21 @@ public class CallActivity extends CallBaseActivity {
hideNavigationIfNoPipAvailable(); hideNavigationIfNoPipAvailable();
Bundle extras = getIntent().getExtras(); Bundle extras = getIntent().getExtras();
roomId = extras.getString(BundleKeys.INSTANCE.getKEY_ROOM_ID(), ""); roomId = extras.getString(KEY_ROOM_ID, "");
roomToken = extras.getString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), ""); roomToken = extras.getString(KEY_ROOM_TOKEN, "");
conversationUser = extras.getParcelable(BundleKeys.INSTANCE.getKEY_USER_ENTITY()); conversationUser = extras.getParcelable(KEY_USER_ENTITY);
conversationPassword = extras.getString(BundleKeys.INSTANCE.getKEY_CONVERSATION_PASSWORD(), ""); conversationPassword = extras.getString(KEY_CONVERSATION_PASSWORD, "");
conversationName = extras.getString(BundleKeys.INSTANCE.getKEY_CONVERSATION_NAME(), ""); conversationName = extras.getString(KEY_CONVERSATION_NAME, "");
isVoiceOnlyCall = extras.getBoolean(BundleKeys.INSTANCE.getKEY_CALL_VOICE_ONLY(), false); isVoiceOnlyCall = extras.getBoolean(KEY_CALL_VOICE_ONLY, false);
isCallWithoutNotification = extras.getBoolean(BundleKeys.INSTANCE.getKEY_CALL_WITHOUT_NOTIFICATION(), false); isCallWithoutNotification = extras.getBoolean(KEY_CALL_WITHOUT_NOTIFICATION, false);
if (extras.containsKey(BundleKeys.INSTANCE.getKEY_FROM_NOTIFICATION_START_CALL())) { if (extras.containsKey(KEY_FROM_NOTIFICATION_START_CALL)) {
isIncomingCallFromNotification = extras.getBoolean(BundleKeys.INSTANCE.getKEY_FROM_NOTIFICATION_START_CALL()); isIncomingCallFromNotification = extras.getBoolean(KEY_FROM_NOTIFICATION_START_CALL);
} }
credentials = ApiUtils.getCredentials(conversationUser.getUsername(), conversationUser.getToken()); credentials = ApiUtils.getCredentials(conversationUser.getUsername(), conversationUser.getToken());
baseUrl = extras.getString(BundleKeys.INSTANCE.getKEY_MODIFIED_BASE_URL(), ""); baseUrl = extras.getString(KEY_MODIFIED_BASE_URL, "");
if (TextUtils.isEmpty(baseUrl)) { if (TextUtils.isEmpty(baseUrl)) {
baseUrl = conversationUser.getBaseUrl(); baseUrl = conversationUser.getBaseUrl();
} }

View File

@ -129,9 +129,9 @@ public class CallNotificationActivity extends CallBaseActivity {
eventBus.post(new CallNotificationClick()); eventBus.post(new CallNotificationClick());
Bundle extras = getIntent().getExtras(); Bundle extras = getIntent().getExtras();
this.roomId = extras.getString(BundleKeys.INSTANCE.getKEY_ROOM_ID(), ""); this.roomId = extras.getString(BundleKeys.KEY_ROOM_ID, "");
this.currentConversation = Parcels.unwrap(extras.getParcelable(BundleKeys.INSTANCE.getKEY_ROOM())); this.currentConversation = Parcels.unwrap(extras.getParcelable(BundleKeys.KEY_ROOM));
this.userBeingCalled = extras.getParcelable(BundleKeys.INSTANCE.getKEY_USER_ENTITY()); this.userBeingCalled = extras.getParcelable(BundleKeys.KEY_USER_ENTITY);
this.originalBundle = extras; this.originalBundle = extras;
credentials = ApiUtils.getCredentials(userBeingCalled.getUsername(), userBeingCalled.getToken()); credentials = ApiUtils.getCredentials(userBeingCalled.getUsername(), userBeingCalled.getToken());
@ -169,13 +169,13 @@ public class CallNotificationActivity extends CallBaseActivity {
private void initClickListeners() { private void initClickListeners() {
binding.callAnswerVoiceOnlyView.setOnClickListener(l -> { binding.callAnswerVoiceOnlyView.setOnClickListener(l -> {
Log.d(TAG, "accept call (voice only)"); Log.d(TAG, "accept call (voice only)");
originalBundle.putBoolean(BundleKeys.INSTANCE.getKEY_CALL_VOICE_ONLY(), true); originalBundle.putBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, true);
proceedToCall(); proceedToCall();
}); });
binding.callAnswerCameraView.setOnClickListener(l -> { binding.callAnswerCameraView.setOnClickListener(l -> {
Log.d(TAG, "accept call (with video)"); Log.d(TAG, "accept call (with video)");
originalBundle.putBoolean(BundleKeys.INSTANCE.getKEY_CALL_VOICE_ONLY(), false); originalBundle.putBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
proceedToCall(); proceedToCall();
}); });
@ -202,8 +202,8 @@ public class CallNotificationActivity extends CallBaseActivity {
} }
private void proceedToCall() { private void proceedToCall() {
originalBundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), currentConversation.getToken()); originalBundle.putString(BundleKeys.KEY_ROOM_TOKEN, currentConversation.getToken());
originalBundle.putString(BundleKeys.INSTANCE.getKEY_CONVERSATION_NAME(), currentConversation.getDisplayName()); originalBundle.putString(BundleKeys.KEY_CONVERSATION_NAME, currentConversation.getDisplayName());
Intent intent = new Intent(this, CallActivity.class); Intent intent = new Intent(this, CallActivity.class);
intent.putExtras(originalBundle); intent.putExtras(originalBundle);

View File

@ -63,18 +63,18 @@ public class AddParticipantsToConversation extends Worker {
@Override @Override
public Result doWork() { public Result doWork() {
Data data = getInputData(); Data data = getInputData();
String[] selectedUserIds = data.getStringArray(BundleKeys.INSTANCE.getKEY_SELECTED_USERS()); String[] selectedUserIds = data.getStringArray(BundleKeys.KEY_SELECTED_USERS);
String[] selectedGroupIds = data.getStringArray(BundleKeys.INSTANCE.getKEY_SELECTED_GROUPS()); String[] selectedGroupIds = data.getStringArray(BundleKeys.KEY_SELECTED_GROUPS);
String[] selectedCircleIds = data.getStringArray(BundleKeys.INSTANCE.getKEY_SELECTED_CIRCLES()); String[] selectedCircleIds = data.getStringArray(BundleKeys.KEY_SELECTED_CIRCLES);
String[] selectedEmails = data.getStringArray(BundleKeys.INSTANCE.getKEY_SELECTED_EMAILS()); String[] selectedEmails = data.getStringArray(BundleKeys.KEY_SELECTED_EMAILS);
User user = User user =
userManager.getUserWithInternalId( userManager.getUserWithInternalId(
data.getLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), -1)) data.getLong(BundleKeys.KEY_INTERNAL_USER_ID, -1))
.blockingGet(); .blockingGet();
int apiVersion = ApiUtils.getConversationApiVersion(user, new int[] {ApiUtils.APIv4, 1}); int apiVersion = ApiUtils.getConversationApiVersion(user, new int[] {ApiUtils.APIv4, 1});
String conversationToken = data.getString(BundleKeys.INSTANCE.getKEY_TOKEN()); String conversationToken = data.getString(BundleKeys.KEY_TOKEN);
String credentials = ApiUtils.getCredentials(user.getUsername(), user.getToken()); String credentials = ApiUtils.getCredentials(user.getUsername(), user.getToken());
RetrofitBucket retrofitBucket; RetrofitBucket retrofitBucket;

View File

@ -109,7 +109,7 @@ public class CapabilitiesWorker extends Worker {
Data data = getInputData(); Data data = getInputData();
long internalUserId = data.getLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), -1); long internalUserId = data.getLong(BundleKeys.KEY_INTERNAL_USER_ID, -1);
List<User> userEntityObjectList = new ArrayList<>(); List<User> userEntityObjectList = new ArrayList<>();
boolean userExists = userManager.getUserWithInternalId(internalUserId).isEmpty().blockingGet(); boolean userExists = userManager.getUserWithInternalId(internalUserId).isEmpty().blockingGet();

View File

@ -75,8 +75,8 @@ public class DeleteConversationWorker extends Worker {
@Override @Override
public Result doWork() { public Result doWork() {
Data data = getInputData(); Data data = getInputData();
long operationUserId = data.getLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), -1); long operationUserId = data.getLong(BundleKeys.KEY_INTERNAL_USER_ID, -1);
String conversationToken = data.getString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN()); String conversationToken = data.getString(BundleKeys.KEY_ROOM_TOKEN);
User operationUser = userManager.getUserWithId(operationUserId).blockingGet(); User operationUser = userManager.getUserWithId(operationUserId).blockingGet();
if (operationUser != null) { if (operationUser != null) {

View File

@ -79,8 +79,8 @@ public class LeaveConversationWorker extends Worker {
@Override @Override
public Result doWork() { public Result doWork() {
Data data = getInputData(); Data data = getInputData();
long operationUserId = data.getLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), -1); long operationUserId = data.getLong(BundleKeys.KEY_INTERNAL_USER_ID, -1);
String conversationToken = data.getString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN()); String conversationToken = data.getString(BundleKeys.KEY_ROOM_TOKEN);
User operationUser = userManager.getUserWithId(operationUserId).blockingGet(); User operationUser = userManager.getUserWithId(operationUserId).blockingGet();
if (operationUser != null) { if (operationUser != null) {

View File

@ -138,7 +138,7 @@ public class NotificationWorker extends Worker {
importantConversation = arbitraryStorageManager.getStorageSetting( importantConversation = arbitraryStorageManager.getStorageSetting(
UserIdUtils.INSTANCE.getIdForUser(user), UserIdUtils.INSTANCE.getIdForUser(user),
"important_conversation", "important_conversation",
intent.getExtras().getString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN())) intent.getExtras().getString(BundleKeys.KEY_ROOM_TOKEN))
.map(arbitraryStorage -> { .map(arbitraryStorage -> {
if (arbitraryStorage != null && arbitraryStorage.getValue() != null) { if (arbitraryStorage != null && arbitraryStorage.getValue() != null) {
return Boolean.parseBoolean(arbitraryStorage.getValue()); return Boolean.parseBoolean(arbitraryStorage.getValue());
@ -154,7 +154,7 @@ public class NotificationWorker extends Worker {
int apiVersion = ApiUtils.getConversationApiVersion(user, new int[] {ApiUtils.APIv4, 1}); int apiVersion = ApiUtils.getConversationApiVersion(user, new int[] {ApiUtils.APIv4, 1});
ncApi.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, user.getBaseUrl(), ncApi.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, user.getBaseUrl(),
intent.getExtras().getString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN()))) intent.getExtras().getString(BundleKeys.KEY_ROOM_TOKEN)))
.blockingSubscribe(new Observer<RoomOverall>() { .blockingSubscribe(new Observer<RoomOverall>() {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {
@ -165,7 +165,7 @@ public class NotificationWorker extends Worker {
public void onNext(RoomOverall roomOverall) { public void onNext(RoomOverall roomOverall) {
Conversation conversation = roomOverall.getOcs().getData(); Conversation conversation = roomOverall.getOcs().getData();
intent.putExtra(BundleKeys.INSTANCE.getKEY_ROOM(), Parcels.wrap(conversation)); intent.putExtra(BundleKeys.KEY_ROOM, Parcels.wrap(conversation));
if (conversation.getType().equals(Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL) || if (conversation.getType().equals(Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL) ||
(!TextUtils.isEmpty(conversation.getObjectType()) && "share:password".equals (!TextUtils.isEmpty(conversation.getObjectType()) && "share:password".equals
(conversation.getObjectType()))) { (conversation.getObjectType()))) {
@ -351,12 +351,12 @@ public class NotificationWorker extends Worker {
} }
Bundle notificationInfo = new Bundle(); Bundle notificationInfo = new Bundle();
notificationInfo.putLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), notificationInfo.putLong(BundleKeys.KEY_INTERNAL_USER_ID,
signatureVerification.getUser().getId()); signatureVerification.getUser().getId());
// could be an ID or a TOKEN // could be an ID or a TOKEN
notificationInfo.putString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), notificationInfo.putString(BundleKeys.KEY_ROOM_TOKEN,
decryptedPushMessage.getId()); decryptedPushMessage.getId());
notificationInfo.putLong(BundleKeys.INSTANCE.getKEY_NOTIFICATION_ID(), notificationInfo.putLong(BundleKeys.KEY_NOTIFICATION_ID,
decryptedPushMessage.getNotificationId()); decryptedPushMessage.getNotificationId());
notificationBuilder.setExtras(notificationInfo); notificationBuilder.setExtras(notificationInfo);
@ -442,10 +442,10 @@ public class NotificationWorker extends Worker {
// NOTE - systemNotificationId is an internal ID used on the device only. // NOTE - systemNotificationId is an internal ID used on the device only.
// It is NOT the same as the notification ID used in communication with the server. // It is NOT the same as the notification ID used in communication with the server.
actualIntent.putExtra(BundleKeys.INSTANCE.getKEY_SYSTEM_NOTIFICATION_ID(), systemNotificationId); actualIntent.putExtra(BundleKeys.KEY_SYSTEM_NOTIFICATION_ID, systemNotificationId);
actualIntent.putExtra(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), actualIntent.putExtra(BundleKeys.KEY_INTERNAL_USER_ID,
Objects.requireNonNull(signatureVerification.getUser()).getId()); Objects.requireNonNull(signatureVerification.getUser()).getId());
actualIntent.putExtra(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), decryptedPushMessage.getId()); actualIntent.putExtra(BundleKeys.KEY_ROOM_TOKEN, decryptedPushMessage.getId());
actualIntent.putExtra(BundleKeys.KEY_MESSAGE_ID, messageId); actualIntent.putExtra(BundleKeys.KEY_MESSAGE_ID, messageId);
int intentFlag; int intentFlag;
@ -583,8 +583,8 @@ public class NotificationWorker extends Worker {
context = getApplicationContext(); context = getApplicationContext();
Data data = getInputData(); Data data = getInputData();
String subject = data.getString(BundleKeys.INSTANCE.getKEY_NOTIFICATION_SUBJECT()); String subject = data.getString(BundleKeys.KEY_NOTIFICATION_SUBJECT);
String signature = data.getString(BundleKeys.INSTANCE.getKEY_NOTIFICATION_SIGNATURE()); String signature = data.getString(BundleKeys.KEY_NOTIFICATION_SIGNATURE);
try { try {
byte[] base64DecodedSubject = Base64.decode(subject, Base64.DEFAULT); byte[] base64DecodedSubject = Base64.decode(subject, Base64.DEFAULT);
@ -643,13 +643,13 @@ public class NotificationWorker extends Worker {
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
bundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), decryptedPushMessage.getId()); bundle.putString(BundleKeys.KEY_ROOM_TOKEN, decryptedPushMessage.getId());
bundle.putParcelable(BundleKeys.INSTANCE.getKEY_USER_ENTITY(), bundle.putParcelable(BundleKeys.KEY_USER_ENTITY,
signatureVerification.getUser()); signatureVerification.getUser());
bundle.putBoolean(BundleKeys.INSTANCE.getKEY_FROM_NOTIFICATION_START_CALL(), bundle.putBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL,
startACall); startACall);
intent.putExtras(bundle); intent.putExtras(bundle);
@ -657,12 +657,12 @@ public class NotificationWorker extends Worker {
switch (decryptedPushMessage.getType()) { switch (decryptedPushMessage.getType()) {
case "call": case "call":
if (bundle.containsKey(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN())) { if (bundle.containsKey(BundleKeys.KEY_ROOM_TOKEN)) {
showNotificationForCallWithNoPing(intent); showNotificationForCallWithNoPing(intent);
} }
break; break;
case "room": case "room":
if (bundle.containsKey(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN())) { if (bundle.containsKey(BundleKeys.KEY_ROOM_TOKEN)) {
showNotificationWithObjectData(intent); showNotificationWithObjectData(intent);
} }
break; break;

View File

@ -74,7 +74,7 @@ public class SignalingSettingsWorker extends Worker {
Data data = getInputData(); Data data = getInputData();
long internalUserId = data.getLong(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), -1); long internalUserId = data.getLong(BundleKeys.KEY_INTERNAL_USER_ID, -1);
List<User> userEntityObjectList = new ArrayList<>(); List<User> userEntityObjectList = new ArrayList<>();
boolean userExists = userManager.getUserWithInternalId(internalUserId).isEmpty().blockingGet(); boolean userExists = userManager.getUserWithInternalId(internalUserId).isEmpty().blockingGet();

View File

@ -2,6 +2,8 @@
* Nextcloud Talk application * Nextcloud Talk application
* *
* @author Mario Danic * @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017 Mario Danic * Copyright (C) 2017 Mario Danic
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -21,58 +23,56 @@
package com.nextcloud.talk.utils.bundle package com.nextcloud.talk.utils.bundle
object BundleKeys { object BundleKeys {
val KEY_SELECTED_USERS = "KEY_SELECTED_USERS" const val KEY_SELECTED_USERS = "KEY_SELECTED_USERS"
val KEY_SELECTED_GROUPS = "KEY_SELECTED_GROUPS" const val KEY_SELECTED_GROUPS = "KEY_SELECTED_GROUPS"
val KEY_SELECTED_CIRCLES = "KEY_SELECTED_CIRCLES" const val KEY_SELECTED_CIRCLES = "KEY_SELECTED_CIRCLES"
val KEY_SELECTED_EMAILS = "KEY_SELECTED_EMAILS" const val KEY_SELECTED_EMAILS = "KEY_SELECTED_EMAILS"
val KEY_USERNAME = "KEY_USERNAME" const val KEY_USERNAME = "KEY_USERNAME"
val KEY_TOKEN = "KEY_TOKEN" const val KEY_TOKEN = "KEY_TOKEN"
val KEY_BASE_URL = "KEY_BASE_URL" const val KEY_BASE_URL = "KEY_BASE_URL"
val KEY_IS_ACCOUNT_IMPORT = "KEY_IS_ACCOUNT_IMPORT" const val KEY_IS_ACCOUNT_IMPORT = "KEY_IS_ACCOUNT_IMPORT"
val KEY_ORIGINAL_PROTOCOL = "KEY_ORIGINAL_PROTOCOL" const val KEY_ORIGINAL_PROTOCOL = "KEY_ORIGINAL_PROTOCOL"
val KEY_ROOM = "KEY_CONVERSATION" const val KEY_ROOM = "KEY_CONVERSATION"
val KEY_OPERATION_CODE = "KEY_OPERATION_CODE" const val KEY_OPERATION_CODE = "KEY_OPERATION_CODE"
val KEY_MENU_TYPE = "KEY_MENU_TYPE" const val KEY_SHARE_INTENT = "KEY_SHARE_INTENT"
val KEY_SHARE_INTENT = "KEY_SHARE_INTENT" const val KEY_APP_ITEM_PACKAGE_NAME = "KEY_APP_ITEM_PACKAGE_NAME"
val KEY_APP_ITEM_PACKAGE_NAME = "KEY_APP_ITEM_PACKAGE_NAME" const val KEY_APP_ITEM_NAME = "KEY_APP_ITEM_NAME"
val KEY_APP_ITEM_NAME = "KEY_APP_ITEM_NAME" const val KEY_CONVERSATION_PASSWORD = "KEY_CONVERSATION_PASSWORD"
val KEY_CONVERSATION_PASSWORD = "KEY_CONVERSATION_PASSWORD" const val KEY_ROOM_TOKEN = "KEY_ROOM_TOKEN"
val KEY_ROOM_TOKEN = "KEY_ROOM_TOKEN" const val KEY_ROOM_ONE_TO_ONE = "KEY_ROOM_ONE_TO_ONE"
val KEY_ROOM_ONE_TO_ONE = "KEY_ROOM_ONE_TO_ONE" const val KEY_USER_ENTITY = "KEY_USER_ENTITY"
val KEY_USER_ENTITY = "KEY_USER_ENTITY" const val KEY_NEW_CONVERSATION = "KEY_NEW_CONVERSATION"
val KEY_NEW_CONVERSATION = "KEY_NEW_CONVERSATION" const val KEY_ADD_PARTICIPANTS = "KEY_ADD_PARTICIPANTS"
val KEY_ADD_PARTICIPANTS = "KEY_ADD_PARTICIPANTS" const val KEY_EXISTING_PARTICIPANTS = "KEY_EXISTING_PARTICIPANTS"
val KEY_EXISTING_PARTICIPANTS = "KEY_EXISTING_PARTICIPANTS" const val KEY_CALL_URL = "KEY_CALL_URL"
val KEY_CALL_URL = "KEY_CALL_URL" const val KEY_MODIFIED_BASE_URL = "KEY_MODIFIED_BASE_URL"
val KEY_MODIFIED_BASE_URL = "KEY_MODIFIED_BASE_URL" const val KEY_NOTIFICATION_SUBJECT = "KEY_NOTIFICATION_SUBJECT"
val KEY_NOTIFICATION_SUBJECT = "KEY_NOTIFICATION_SUBJECT" const val KEY_NOTIFICATION_SIGNATURE = "KEY_NOTIFICATION_SIGNATURE"
val KEY_NOTIFICATION_SIGNATURE = "KEY_NOTIFICATION_SIGNATURE" const val KEY_INTERNAL_USER_ID = "KEY_INTERNAL_USER_ID"
val KEY_INTERNAL_USER_ID = "KEY_INTERNAL_USER_ID" const val KEY_CONVERSATION_TYPE = "KEY_CONVERSATION_TYPE"
val KEY_CONVERSATION_TYPE = "KEY_CONVERSATION_TYPE" const val KEY_INVITED_PARTICIPANTS = "KEY_INVITED_PARTICIPANTS"
val KEY_INVITED_PARTICIPANTS = "KEY_INVITED_PARTICIPANTS" const val KEY_INVITED_CIRCLE = "KEY_INVITED_CIRCLE"
val KEY_INVITED_CIRCLE = "KEY_INVITED_CIRCLE" const val KEY_INVITED_GROUP = "KEY_INVITED_GROUP"
val KEY_INVITED_GROUP = "KEY_INVITED_GROUP" const val KEY_INVITED_EMAIL = "KEY_INVITED_EMAIL"
val KEY_INVITED_EMAIL = "KEY_INVITED_EMAIL" const val KEY_CONVERSATION_NAME = "KEY_CONVERSATION_NAME"
val KEY_CONVERSATION_NAME = "KEY_CONVERSATION_NAME" const val KEY_CALL_VOICE_ONLY = "KEY_CALL_VOICE_ONLY"
val KEY_CALL_VOICE_ONLY = "KEY_CALL_VOICE_ONLY" const val KEY_CALL_WITHOUT_NOTIFICATION = "KEY_CALL_WITHOUT_NOTIFICATION"
val KEY_CALL_WITHOUT_NOTIFICATION = "KEY_CALL_WITHOUT_NOTIFICATION" const val KEY_ACTIVE_CONVERSATION = "KEY_ACTIVE_CONVERSATION"
val KEY_ACTIVE_CONVERSATION = "KEY_ACTIVE_CONVERSATION" const val KEY_SERVER_CAPABILITIES = "KEY_SERVER_CAPABILITIES"
val KEY_SERVER_CAPABILITIES = "KEY_SERVER_CAPABILITIES" const val KEY_FROM_NOTIFICATION_START_CALL = "KEY_FROM_NOTIFICATION_START_CALL"
val KEY_FROM_NOTIFICATION_START_CALL = "KEY_FROM_NOTIFICATION_START_CALL" const val KEY_ROOM_ID = "KEY_ROOM_ID"
val KEY_ROOM_ID = "KEY_ROOM_ID" const val KEY_ARE_CALL_SOUNDS = "KEY_ARE_CALL_SOUNDS"
val KEY_ARE_CALL_SOUNDS = "KEY_ARE_CALL_SOUNDS" const val KEY_FILE_PATHS = "KEY_FILE_PATHS"
val KEY_BROWSER_TYPE = "KEY_BROWSER_TYPE" const val KEY_ACCOUNT = "KEY_ACCOUNT"
val KEY_FILE_PATHS = "KEY_FILE_PATHS" const val KEY_FILE_ID = "KEY_FILE_ID"
val KEY_ACCOUNT = "KEY_ACCOUNT" const val KEY_NOTIFICATION_ID = "KEY_NOTIFICATION_ID"
val KEY_FILE_ID = "KEY_FILE_ID" const val KEY_SHARED_TEXT = "KEY_SHARED_TEXT"
val KEY_NOTIFICATION_ID = "KEY_NOTIFICATION_ID" const val KEY_GEOCODING_QUERY = "KEY_GEOCODING_QUERY"
val KEY_SHARED_TEXT = "KEY_SHARED_TEXT" const val KEY_META_DATA = "KEY_META_DATA"
val KEY_GEOCODING_QUERY = "KEY_GEOCODING_QUERY" const val KEY_FORWARD_MSG_FLAG = "KEY_FORWARD_MSG_FLAG"
val KEY_META_DATA = "KEY_META_DATA" const val KEY_FORWARD_MSG_TEXT = "KEY_FORWARD_MSG_TEXT"
val KEY_FORWARD_MSG_FLAG = "KEY_FORWARD_MSG_FLAG" const val KEY_FORWARD_HIDE_SOURCE_ROOM = "KEY_FORWARD_HIDE_SOURCE_ROOM"
val KEY_FORWARD_MSG_TEXT = "KEY_FORWARD_MSG_TEXT" const val KEY_SYSTEM_NOTIFICATION_ID = "KEY_SYSTEM_NOTIFICATION_ID"
val KEY_FORWARD_HIDE_SOURCE_ROOM = "KEY_FORWARD_HIDE_SOURCE_ROOM"
val KEY_SYSTEM_NOTIFICATION_ID = "KEY_SYSTEM_NOTIFICATION_ID"
const val KEY_MESSAGE_ID = "KEY_MESSAGE_ID" const val KEY_MESSAGE_ID = "KEY_MESSAGE_ID"
const val KEY_MIME_TYPE_FILTER = "KEY_MIME_TYPE_FILTER" const val KEY_MIME_TYPE_FILTER = "KEY_MIME_TYPE_FILTER"
} }

View File

@ -244,8 +244,8 @@ public class MagicWebSocketInstance extends WebSocketListener {
shouldRefreshChat = (boolean) chatMap.get("refresh"); shouldRefreshChat = (boolean) chatMap.get("refresh");
if (shouldRefreshChat) { if (shouldRefreshChat) {
HashMap<String, String> refreshChatHashMap = new HashMap<>(); HashMap<String, String> refreshChatHashMap = new HashMap<>();
refreshChatHashMap.put(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), (String) messageHashMap.get("roomid")); refreshChatHashMap.put(BundleKeys.KEY_ROOM_TOKEN, (String) messageHashMap.get("roomid"));
refreshChatHashMap.put(BundleKeys.INSTANCE.getKEY_INTERNAL_USER_ID(), Long.toString(conversationUser.getId())); refreshChatHashMap.put(BundleKeys.KEY_INTERNAL_USER_ID, Long.toString(conversationUser.getId()));
eventBus.post(new WebSocketCommunicationEvent("refreshChat", refreshChatHashMap)); eventBus.post(new WebSocketCommunicationEvent("refreshChat", refreshChatHashMap));
} }
} }