Added logs to help debug sharing issues
This commit is contained in:
parent
4211842f6f
commit
956f2da8a1
4 changed files with 19 additions and 4 deletions
|
@ -316,6 +316,7 @@ public class ChatMessagesFragment extends Fragment
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
String fileSharedUri = getArguments().getString("fileSharedUri");
|
String fileSharedUri = getArguments().getString("fileSharedUri");
|
||||||
if (fileSharedUri != null) {
|
if (fileSharedUri != null) {
|
||||||
|
Log.i("[ChatMessages] Found shared file(s): " + fileSharedUri);
|
||||||
if (fileSharedUri.contains(":")) {
|
if (fileSharedUri.contains(":")) {
|
||||||
String[] files = fileSharedUri.split(":");
|
String[] files = fileSharedUri.split(":");
|
||||||
for (String file : files) {
|
for (String file : files) {
|
||||||
|
@ -326,8 +327,11 @@ public class ChatMessagesFragment extends Fragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getArguments().getString("messageDraft") != null)
|
if (getArguments().getString("messageDraft") != null) {
|
||||||
mMessageTextToSend.setText(getArguments().getString("messageDraft"));
|
String sharedText = getArguments().getString("messageDraft");
|
||||||
|
mMessageTextToSend.setText(sharedText);
|
||||||
|
Log.i("[ChatMessages] Found shared text: " + sharedText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
|
|
|
@ -256,7 +256,10 @@ public class ChatRoomCreationFragment extends Fragment
|
||||||
String fileSharedUri = getArguments().getString("fileSharedUri");
|
String fileSharedUri = getArguments().getString("fileSharedUri");
|
||||||
String messageDraft = getArguments().getString("messageDraft");
|
String messageDraft = getArguments().getString("messageDraft");
|
||||||
|
|
||||||
if (fileSharedUri != null || messageDraft != null) mShareInfos = new Bundle();
|
if (fileSharedUri != null || messageDraft != null) {
|
||||||
|
Log.i("[ChatRoomCreation] Forwarding arguments to new chat room");
|
||||||
|
mShareInfos = new Bundle();
|
||||||
|
}
|
||||||
|
|
||||||
if (fileSharedUri != null) {
|
if (fileSharedUri != null) {
|
||||||
LinphoneActivity.instance().checkAndRequestPermissionsToSendImage();
|
LinphoneActivity.instance().checkAndRequestPermissionsToSendImage();
|
||||||
|
|
|
@ -51,6 +51,7 @@ import org.linphone.core.CoreListenerStub;
|
||||||
import org.linphone.core.EventLog;
|
import org.linphone.core.EventLog;
|
||||||
import org.linphone.core.ProxyConfig;
|
import org.linphone.core.ProxyConfig;
|
||||||
import org.linphone.fragments.FragmentsAvailable;
|
import org.linphone.fragments.FragmentsAvailable;
|
||||||
|
import org.linphone.mediastream.Log;
|
||||||
import org.linphone.utils.SelectableHelper;
|
import org.linphone.utils.SelectableHelper;
|
||||||
|
|
||||||
public class ChatRoomsFragment extends Fragment
|
public class ChatRoomsFragment extends Fragment
|
||||||
|
@ -118,6 +119,7 @@ public class ChatRoomsFragment extends Fragment
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Bundle extras = null;
|
Bundle extras = null;
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
|
Log.i("[ChatRooms] Forwarding arguments to new chat room");
|
||||||
extras = (Bundle) getArguments().clone();
|
extras = (Bundle) getArguments().clone();
|
||||||
getArguments().clear();
|
getArguments().clear();
|
||||||
}
|
}
|
||||||
|
@ -132,6 +134,7 @@ public class ChatRoomsFragment extends Fragment
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Bundle extras = null;
|
Bundle extras = null;
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
|
Log.i("[ChatRooms] Forwarding arguments to new group chat room");
|
||||||
extras = (Bundle) getArguments().clone();
|
extras = (Bundle) getArguments().clone();
|
||||||
getArguments().clear();
|
getArguments().clear();
|
||||||
}
|
}
|
||||||
|
@ -195,6 +198,7 @@ public class ChatRoomsFragment extends Fragment
|
||||||
Toast.LENGTH_SHORT)
|
Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
Log.i("[ChatRooms] Arguments found: " + messageSharedUri + " / " + fileSharedUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
|
@ -208,6 +212,7 @@ public class ChatRoomsFragment extends Fragment
|
||||||
ChatRoom room = (ChatRoom) mChatRoomsAdapter.getItem(position);
|
ChatRoom room = (ChatRoom) mChatRoomsAdapter.getItem(position);
|
||||||
Bundle extras = null;
|
Bundle extras = null;
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
|
Log.i("[ChatRooms] Forwarding arguments to existing chat room");
|
||||||
extras = (Bundle) getArguments().clone();
|
extras = (Bundle) getArguments().clone();
|
||||||
getArguments().clear();
|
getArguments().clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,10 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
String fileSharedUri = getArguments().getString("fileSharedUri");
|
String fileSharedUri = getArguments().getString("fileSharedUri");
|
||||||
String messageDraft = getArguments().getString("messageDraft");
|
String messageDraft = getArguments().getString("messageDraft");
|
||||||
|
|
||||||
if (fileSharedUri != null || messageDraft != null) mShareInfos = new Bundle();
|
if (fileSharedUri != null || messageDraft != null) {
|
||||||
|
Log.i("[GroupInfo] Forwarding arguments to group chat room");
|
||||||
|
mShareInfos = new Bundle();
|
||||||
|
}
|
||||||
|
|
||||||
if (fileSharedUri != null) mShareInfos.putString("fileSharedUri", fileSharedUri);
|
if (fileSharedUri != null) mShareInfos.putString("fileSharedUri", fileSharedUri);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue