Fixed various issues
This commit is contained in:
parent
f1d887e7be
commit
7e5b9c4648
11 changed files with 62 additions and 35 deletions
|
@ -100,7 +100,7 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 4317
|
versionCode 4318
|
||||||
versionName "${project.version}"
|
versionName "${project.version}"
|
||||||
applicationId getPackageName()
|
applicationId getPackageName()
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
|
@ -189,6 +189,7 @@ public class AndroidAudioManager {
|
||||||
if (currentCall == null) currentCall = LinphoneManager.getCore().getCalls()[0];
|
if (currentCall == null) currentCall = LinphoneManager.getCore().getCalls()[0];
|
||||||
if (currentCall == null) return false;
|
if (currentCall == null) return false;
|
||||||
AudioDevice audioDevice = currentCall.getOutputAudioDevice();
|
AudioDevice audioDevice = currentCall.getOutputAudioDevice();
|
||||||
|
if (audioDevice == null) return false;
|
||||||
Log.i("[Audio Manager] Currently used audio device: ", audioDevice.getDeviceName());
|
Log.i("[Audio Manager] Currently used audio device: ", audioDevice.getDeviceName());
|
||||||
return audioDevice.getType() == AudioDevice.Type.Bluetooth;
|
return audioDevice.getType() == AudioDevice.Type.Bluetooth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,6 +409,13 @@ public class CallActivity extends LinphoneGenericActivity
|
||||||
|
|
||||||
setCurrentCallContactInformation();
|
setCurrentCallContactInformation();
|
||||||
updateInterfaceDependingOnVideo();
|
updateInterfaceDependingOnVideo();
|
||||||
|
} else if (state == Call.State.Updating) {
|
||||||
|
if (call.getCurrentParams().videoEnabled()) {
|
||||||
|
if (!LinphoneManager.getAudioManager()
|
||||||
|
.isUsingBluetoothAudioRoute()) {
|
||||||
|
LinphoneManager.getAudioManager().routeAudioToSpeaker();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (state == Call.State.UpdatedByRemote) {
|
} else if (state == Call.State.UpdatedByRemote) {
|
||||||
// If the correspondent asks for video while in audio call
|
// If the correspondent asks for video while in audio call
|
||||||
boolean videoEnabled = LinphonePreferences.instance().isVideoEnabled();
|
boolean videoEnabled = LinphonePreferences.instance().isVideoEnabled();
|
||||||
|
|
|
@ -144,6 +144,10 @@ public class CallManager {
|
||||||
params.enableVideo(true);
|
params.enableVideo(true);
|
||||||
core.enableVideoCapture(true);
|
core.enableVideoCapture(true);
|
||||||
core.enableVideoDisplay(true);
|
core.enableVideoDisplay(true);
|
||||||
|
|
||||||
|
if (!LinphoneManager.getAudioManager().isUsingBluetoothAudioRoute()) {
|
||||||
|
LinphoneManager.getAudioManager().routeAudioToSpeaker();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
params.enableVideo(false);
|
params.enableVideo(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,8 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
|
||||||
final TextView fileName = content.findViewById(R.id.file);
|
final TextView fileName = content.findViewById(R.id.file);
|
||||||
fileName.setVisibility(View.GONE);
|
fileName.setVisibility(View.GONE);
|
||||||
|
|
||||||
if (c.isFile() || (c.isFileTransfer() && !c.getFilePath().isEmpty())) {
|
if (c.isFile()
|
||||||
|
|| (c.isFileTransfer() && message.isOutgoing() && !c.getFilePath().isEmpty())) {
|
||||||
// If message is outgoing, even if content
|
// If message is outgoing, even if content
|
||||||
// is file transfer we have the file available
|
// is file transfer we have the file available
|
||||||
final String filePath = c.getFilePath();
|
final String filePath = c.getFilePath();
|
||||||
|
|
|
@ -668,10 +668,15 @@ public class ChatMessagesFragment extends Fragment
|
||||||
}
|
}
|
||||||
|
|
||||||
/** View initialization */
|
/** View initialization */
|
||||||
private void setReadOnly() {
|
private void setReadOnly(boolean readOnly) {
|
||||||
mMessageTextToSend.setEnabled(false);
|
if (readOnly) {
|
||||||
mAttachImageButton.setEnabled(false);
|
mMessageTextToSend.setText("");
|
||||||
mSendMessageButton.setEnabled(false);
|
mFilesUploadLayout.removeAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
|
mMessageTextToSend.setEnabled(!readOnly);
|
||||||
|
mAttachImageButton.setEnabled(!readOnly);
|
||||||
|
mSendMessageButton.setEnabled(!readOnly);
|
||||||
mSendEphemeralIcon.setEnabled(mSendMessageButton.isEnabled());
|
mSendEphemeralIcon.setEnabled(mSendMessageButton.isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -801,7 +806,7 @@ public class ChatMessagesFragment extends Fragment
|
||||||
|
|
||||||
mSendEphemeralIcon.setVisibility(mChatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE);
|
mSendEphemeralIcon.setVisibility(mChatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE);
|
||||||
if (mChatRoom.hasBeenLeft()) {
|
if (mChatRoom.hasBeenLeft()) {
|
||||||
setReadOnly();
|
setReadOnly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSecurityLevelIcon();
|
updateSecurityLevelIcon();
|
||||||
|
@ -1084,17 +1089,20 @@ public class ChatMessagesFragment extends Fragment
|
||||||
|
|
||||||
boolean split =
|
boolean split =
|
||||||
isBasicChatRoom; // Always split contents in basic chat rooms for compatibility
|
isBasicChatRoom; // Always split contents in basic chat rooms for compatibility
|
||||||
|
if (!split) {
|
||||||
if (hasText && sendImageAndTextAsDifferentMessages) {
|
if (hasText && sendImageAndTextAsDifferentMessages) {
|
||||||
split = true;
|
split = true;
|
||||||
} else if (mFilesUploadLayout.getChildCount() > 1
|
} else if (mFilesUploadLayout.getChildCount() > 1
|
||||||
&& sendMultipleImagesAsDifferentMessages) {
|
&& sendMultipleImagesAsDifferentMessages) {
|
||||||
split = true;
|
split = true;
|
||||||
|
|
||||||
// Allow the last image to be sent with text if image and text at the same time OK
|
// Allow the last image to be sent with text if image and text at the same time
|
||||||
|
// OK
|
||||||
if (hasText && i == filesCount - 1) {
|
if (hasText && i == filesCount - 1) {
|
||||||
split = false;
|
split = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (split) {
|
if (split) {
|
||||||
ChatMessage fileMessage = mChatRoom.createFileTransferMessage(content);
|
ChatMessage fileMessage = mChatRoom.createFileTransferMessage(content);
|
||||||
|
@ -1450,9 +1458,7 @@ public class ChatMessagesFragment extends Fragment
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(ChatRoom cr, ChatRoom.State newState) {
|
public void onStateChanged(ChatRoom cr, ChatRoom.State newState) {
|
||||||
if (mChatRoom.hasBeenLeft()) {
|
setReadOnly(mChatRoom.hasBeenLeft());
|
||||||
setReadOnly();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -500,9 +500,8 @@ public class ContactEditorFragment extends Fragment {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e("[Contact Editor] Failed to get Exif rotation, error is ", e);
|
Log.e("[Contact Editor] Failed to get Exif rotation, error is ", e);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image == null) {
|
if (image == null) {
|
||||||
Log.e(
|
Log.e(
|
||||||
"[Contact Editor] Couldn't get bitmap from either filePath [",
|
"[Contact Editor] Couldn't get bitmap from either filePath [",
|
||||||
|
|
|
@ -106,6 +106,9 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
@Override
|
@Override
|
||||||
public void onCallStateChanged(
|
public void onCallStateChanged(
|
||||||
Core core, Call call, Call.State state, String message) {
|
Core core, Call call, Call.State state, String message) {
|
||||||
|
if (state == Call.State.OutgoingInit) {
|
||||||
|
if (mAddress != null) mAddress.setText("");
|
||||||
|
}
|
||||||
updateLayout();
|
updateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,10 +169,6 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
};
|
};
|
||||||
|
|
||||||
mIsTransfer = false;
|
mIsTransfer = false;
|
||||||
if (getIntent() != null) {
|
|
||||||
mIsTransfer = getIntent().getBooleanExtra("isTransfer", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleIntentParams(getIntent());
|
handleIntentParams(getIntent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,13 +177,6 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
|
|
||||||
handleIntentParams(intent);
|
handleIntentParams(intent);
|
||||||
|
|
||||||
if (intent != null) {
|
|
||||||
mIsTransfer = intent.getBooleanExtra("isTransfer", mIsTransfer);
|
|
||||||
if (mAddress != null && intent.getStringExtra("SipUri") != null) {
|
|
||||||
mAddress.setText(intent.getStringExtra("SipUri"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -207,7 +199,6 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
enableVideoPreviewIfTablet(false);
|
enableVideoPreviewIfTablet(false);
|
||||||
if (mAddress != null) mAddress.setText("");
|
|
||||||
Core core = LinphoneManager.getCore();
|
Core core = LinphoneManager.getCore();
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
core.removeListener(mListener);
|
core.removeListener(mListener);
|
||||||
|
@ -219,6 +210,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
if (mInterfaceLoaded) {
|
if (mInterfaceLoaded) {
|
||||||
|
if (mAddress != null) mAddress.setText("");
|
||||||
mAddress = null;
|
mAddress = null;
|
||||||
mStartCall = null;
|
mStartCall = null;
|
||||||
mAddCall = null;
|
mAddCall = null;
|
||||||
|
@ -280,6 +272,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
intent.putExtra("EditOnClick", true);
|
intent.putExtra("EditOnClick", true);
|
||||||
intent.putExtra("SipAddress", mAddress.getText().toString());
|
intent.putExtra("SipAddress", mAddress.getText().toString());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
if (mAddress != null) mAddress.setText("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -289,6 +282,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
goBackToCall();
|
goBackToCall();
|
||||||
|
if (mAddress != null) mAddress.setText("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -334,6 +328,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
@Override
|
@Override
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
|
outState.putSerializable("address", mAddress.getText().toString());
|
||||||
outState.putSerializable("isTransfer", mIsTransfer);
|
outState.putSerializable("isTransfer", mIsTransfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,6 +336,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||||
super.onRestoreInstanceState(savedInstanceState);
|
super.onRestoreInstanceState(savedInstanceState);
|
||||||
mIsTransfer = savedInstanceState.getBoolean("isTransfer");
|
mIsTransfer = savedInstanceState.getBoolean("isTransfer");
|
||||||
|
mAddress.setText(savedInstanceState.getString("address"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -375,6 +371,8 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
private void handleIntentParams(Intent intent) {
|
private void handleIntentParams(Intent intent) {
|
||||||
if (intent == null) return;
|
if (intent == null) return;
|
||||||
|
|
||||||
|
mIsTransfer = intent.getBooleanExtra("isTransfer", mIsTransfer);
|
||||||
|
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
String addressToCall = null;
|
String addressToCall = null;
|
||||||
if (ACTION_CALL_LINPHONE.equals(action)
|
if (ACTION_CALL_LINPHONE.equals(action)
|
||||||
|
@ -408,10 +406,16 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
.getAddressOrNumberForAndroidContact(getContentResolver(), uri);
|
.getAddressOrNumberForAndroidContact(getContentResolver(), uri);
|
||||||
Log.i("[Dialer] " + action + " with number: " + addressToCall);
|
Log.i("[Dialer] " + action + " with number: " + addressToCall);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
String sipUri = intent.getStringExtra("SipUri");
|
||||||
|
if (sipUri != null) {
|
||||||
|
Log.i("[Dialer] Found extra SIP URI: " + sipUri);
|
||||||
|
addressToCall = sipUri;
|
||||||
} else {
|
} else {
|
||||||
Log.w("[Dialer] Intent data is null for action " + action);
|
Log.w("[Dialer] Intent data is null for action " + action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (addressToCall != null) {
|
if (addressToCall != null) {
|
||||||
if (mAddress != null) {
|
if (mAddress != null) {
|
||||||
|
|
|
@ -45,11 +45,12 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/inviteFriend"
|
android:id="@+id/inviteFriend"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:text="@string/invite_friend"
|
android:text="@string/invite_friend"
|
||||||
|
android:padding="10dp"
|
||||||
android:textAppearance="@style/contact_invite_font"
|
android:textAppearance="@style/contact_invite_font"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,9 @@
|
||||||
<string name="phone_number_link_info_content_already_account">A telefonszámát csak egy Linphone-fiókkal használhatja.\n\nHa már összekapcsolta telefonszámát egy másik fiókkal, de inkább ezt használja, egyszerűen kapcsolja össze, és a telefonszám önműködően átkerül ebbe a fiókba.</string>
|
<string name="phone_number_link_info_content_already_account">A telefonszámát csak egy Linphone-fiókkal használhatja.\n\nHa már összekapcsolta telefonszámát egy másik fiókkal, de inkább ezt használja, egyszerűen kapcsolja össze, és a telefonszám önműködően átkerül ebbe a fiókba.</string>
|
||||||
<string name="phone_number_overuse">Túl sok SMS-t küldtek erre a számra rövid idő alatt. Kérjük, várjon 24 órát, mielőtt újra megpróbálja.</string>
|
<string name="phone_number_overuse">Túl sok SMS-t küldtek erre a számra rövid idő alatt. Kérjük, várjon 24 órát, mielőtt újra megpróbálja.</string>
|
||||||
<string name="account_doesnt_exist">Fiók nem létezik</string>
|
<string name="account_doesnt_exist">Fiók nem létezik</string>
|
||||||
|
<string name="assistant_general_terms">használati feltételek</string>
|
||||||
|
<string name="assistant_privacy_policy">adatvédelmi szabályzat</string>
|
||||||
|
<string name="assistant_read_and_agree_terms">Elfogadom a Belledonne Communications %1$s és %2$s</string>
|
||||||
<!--Status-->
|
<!--Status-->
|
||||||
<string name="invalid_email">Érvénytelen e-mail</string>
|
<string name="invalid_email">Érvénytelen e-mail</string>
|
||||||
<string name="account_already_exist">Fiók már létezik</string>
|
<string name="account_already_exist">Fiók már létezik</string>
|
||||||
|
@ -613,6 +616,7 @@
|
||||||
<string name="content_description_exit_conference">Konferencia elhagyása</string>
|
<string name="content_description_exit_conference">Konferencia elhagyása</string>
|
||||||
<string name="content_title_notification_service">Linphone szolgáltatás-értesítés</string>
|
<string name="content_title_notification_service">Linphone szolgáltatás-értesítés</string>
|
||||||
<string name="content_title_notification">Linphone csevegőüzenetek értesítések</string>
|
<string name="content_title_notification">Linphone csevegőüzenetek értesítések</string>
|
||||||
|
<string name="content_title_notification_missed_call">Linphone nem fogadott hívások értesítései</string>
|
||||||
<string name="content_description_conversation_subject">Csoportos csevegőszoba tárgya</string>
|
<string name="content_description_conversation_subject">Csoportos csevegőszoba tárgya</string>
|
||||||
<string name="content_description_conversation_infos">Csoportos csevegőszoba tájékoztatás</string>
|
<string name="content_description_conversation_infos">Csoportos csevegőszoba tájékoztatás</string>
|
||||||
<string name="content_description_record_call">Hívás felvétele</string>
|
<string name="content_description_record_call">Hívás felvétele</string>
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
<bool name="hide_non_linphone_contacts">false</bool>
|
<bool name="hide_non_linphone_contacts">false</bool>
|
||||||
<bool name="hide_invite_contact">false</bool>
|
<bool name="hide_invite_contact">false</bool>
|
||||||
<bool name="generate_text_avatar">true</bool>
|
<bool name="generate_text_avatar">true</bool>
|
||||||
<bool name="only_show_address_username_if_matches_default_domain">true</bool>
|
<bool name="only_show_address_username_if_matches_default_domain">false</bool>
|
||||||
<bool name="fetch_contacts_from_default_directory">true</bool> <!-- Recommended -->
|
<bool name="fetch_contacts_from_default_directory">true</bool> <!-- Recommended -->
|
||||||
<bool name="forbid_pure_linphone_contacts_edition">true</bool>
|
<bool name="forbid_pure_linphone_contacts_edition">true</bool>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue