Added Telephony Provider account configuration item

Added support for Contact tel URIs
Show account's STUN configuration items only if needed
Avoid some lint warnings in baresip.c
This commit is contained in:
Juha Heinanen
2022-02-02 11:36:08 +02:00
parent c285719da1
commit d3a2282f03
12 changed files with 291 additions and 156 deletions
+83 -56
View File
@@ -178,69 +178,77 @@
android:paddingTop="8dp" >
</Spinner>
<TextView
android:id="@+id/StunServerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_server" >
</TextView>
<EditText
android:id="@+id/StunServer"
android:layout_height="wrap_content"
<LinearLayout
android:id="@+id/Stun"
android:layout_width="fill_parent"
android:textSize="18sp"
android:scrollHorizontally="true"
android:importantForAutofill="no"
android:hint="@string/stun_server_uri"
android:inputType="textEmailAddress" >
</EditText>
android:orientation="vertical"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/StunUserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_username" >
</TextView>
<TextView
android:id="@+id/StunServerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_server" >
</TextView>
<EditText
android:id="@+id/StunUser"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:hint="@string/user_id"
android:textSize="18sp"
android:inputType="textEmailAddress"
android:autofillHints="username" >
</EditText>
<EditText
android:id="@+id/StunServer"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:textSize="18sp"
android:scrollHorizontally="true"
android:importantForAutofill="no"
android:hint="@string/stun_server_uri"
android:inputType="textEmailAddress" >
</EditText>
<TextView
android:id="@+id/StunPassTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_password" >
</TextView>
<TextView
android:id="@+id/StunUserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_username" >
</TextView>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintEnabled="false"
app:endIconMode="password_toggle">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/StunPass"
<EditText
android:id="@+id/StunUser"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:hint="@string/user_id"
android:textSize="18sp"
android:inputType="textEmailAddress"
android:autofillHints="username" >
</EditText>
<TextView
android:id="@+id/StunPassTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/stun_password" >
</TextView>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:inputType="textPassword"
android:hint="@string/password"
android:maxLines="1">
</androidx.appcompat.widget.AppCompatEditText>
</com.google.android.material.textfield.TextInputLayout>
app:hintEnabled="false"
app:endIconMode="password_toggle">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/StunPass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:inputType="textPassword"
android:hint="@string/password"
android:maxLines="1">
</androidx.appcompat.widget.AppCompatEditText>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<TextView
android:id="@+id/DtmfModeTitle"
@@ -293,6 +301,25 @@
android:layout_width="fill_parent">
</EditText>
<TextView
android:id="@+id/TelephonyProviderTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:textSize="18sp"
android:text="@string/telephony_provider" >
</TextView>
<EditText
android:id="@+id/telephonyProvider"
android:layout_height="wrap_content"
android:hint="@string/telephony_provider_hint"
android:textSize="18sp"
android:inputType="textUri"
android:importantForAutofill="no"
android:layout_width="fill_parent">
</EditText>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+3 -3
View File
@@ -63,19 +63,19 @@
</EditText>
<TextView
android:id="@+id/SipUriTitle"
android:id="@+id/SipOrTelUriTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:paddingTop="10dp"
android:text="@string/sip_uri" >
android:text="@string/sip_or_tel_uri" >
</TextView>
<EditText
android:id="@+id/Uri"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/sip_uri"
android:hint="@string/user_domain_or_number"
android:inputType="textEmailAddress"
android:textSize="18sp"
android:importantForAutofill="no"
+13 -1
View File
@@ -182,6 +182,13 @@
messages (Message Waiting Indications) are not subscribed to.
</string>
<string name="invalid_voicemail_uri">Invalid Voicemail URI \'%1$s\'</string>
<string name="telephony_provider">Telephony Provider</string>
<string name="telephony_provider_help">SIP URI host part used in calls to telephone numbers.
Factory default is account\'s domain. If not given, this account cannot be used to call
telephone numbers.
</string>
<string name="telephony_provider_hint">SIP URI host part</string>
<string name="invalid_sip_uri_hostpart">Invalid SIP URI host part \'%1$s\'</string>
<string name="default_account">Default Account</string>
<string name="default_account_help">If checked, this account is selected when baresip is started.
</string>
@@ -247,7 +254,7 @@
<string name="today">Today</string>
<string name="you">You</string>
<string name="new_chat_peer">New Chat Peer</string>
<string name="invalid_chat_peer_uri">Invalid SIP URI</string>
<string name="invalid_chat_peer_uri">Invalid chat peer URI</string>
<string name="long_chat_question">Do you want to delete chat with peer \'%1$s\' or
add peer to contacts?</string>
<string name="short_chat_question">Do you want to delete chat with \'%1$s\'?</string>
@@ -341,6 +348,8 @@
<string name="contact">Contact</string>
<string name="new_contact">New Contact</string>
<string name="contact_name">Name</string>
<string name="sip_or_tel_uri">SIP or tel URI</string>
<string name="user_domain_or_number">user@domain or telephone number</string>
<string name="invalid_contact">Invalid contact name \'%1$s\'</string>
<string name="contact_already_exists">Contact \'%1$s\' already exists.</string>
<string name="invalid_contact_uri">Invalid SIP URI</string>
@@ -353,6 +362,7 @@
<string name="send_message">Send Message</string>
<string name="contact_delete_question">Do you want to delete contact \'%1$s\'?</string>
<string name="contacts_exceeded">Your maximum number of contacts %1$d has been exceeded.</string>
<string name="no_telephony_providers">Telephony provider has not been configured for any account.</string>
<!-- Generic -->
<string name="alert">Alert</string>
<string name="info">Info</string>
@@ -376,6 +386,7 @@
<string name="confirmation">Confirmation</string>
<string name="dots" translatable="false"></string>
<string name="bullet_item" translatable="false">\u2022 %1$s</string>
<string name="invalid_sip_or_tel_uri">Invalid SIP or tel URI \'%1$s\'</string>
<!-- Main Activity -->
<string name="backup">Backup</string>
<string name="restore">Restore</string>
@@ -386,6 +397,7 @@
<string name="incoming_call_from_dots">Call from …</string>
<string name="transferring_call_to_dots">Transferring call to …</string>
<string name="invalid_sip_uri">Invalid SIP URI \'%1$s\'</string>
<string name="no_telephony_provider">Telephony provider has not been configured for this acccount.</string>
<string name="callee">Callee</string>
<string name="hangup">Hangup</string>
<string name="video_call">Video call</string>