Add ability to specify APN information in TextSecure settings.

1) Add configuration options for APN information in TextSecure settings.

2) Fall back to TextSecure settings if system settings are unavailable
while sending/receiving MMS.

3) Catch sqlite exception when devices randomly don't have the same
APN db or table structure.
This commit is contained in:
Moxie Marlinspike
2012-12-08 16:46:38 -08:00
parent 10885fa8db
commit 54fad30f9f
7 changed files with 126 additions and 19 deletions

View File

@@ -249,6 +249,14 @@
<string name="conversation_activity__send">Send</string>
<string name="conversation_activity__remove">Remove</string>
<!-- conversation_item_sent -->
<string name="conversation_item_sent__download">Download</string>
<string name="conversation_item_sent__downloading">Downloading</string>
<!-- conversation_item_received -->
<string name="conversation_item_received__download">Download</string>
<string name="conversation_item_received__downloading">Downloading</string>
<!-- conversation_fragment_cab -->
<string name="conversation_fragment_cab__batch_selection_mode">Batch Selection Mode</string>
@@ -362,6 +370,12 @@
<string name="preferences__normal">Normal</string>
<string name="preferences__slow">Slow</string>
<string name="preferences__custom">Custom</string>
<string name="preferences__advanced_mms_access_point_names">Advanced: MMS Access Point Names</string>
<string name="preferences__enable_local_apns">Enable local APNs</string>
<string name="preferences__use_apn_information_configured_here_when_system_apn_information_is_unavailable">Use APN information configured here when system APN information is unavailable.</string>
<string name="preferences__mmsc_url_required">MMSC URL (Required)</string>
<string name="preferences__mms_proxy_optional">MMS Proxy (Optional)</string>
<!-- **************************************** -->
<!-- menus -->
@@ -434,9 +448,5 @@
<string name="PlayStoreListing">TextSecure is a security enhanced text messaging application that serves as a full replacement for the default text messaging application. Messages to other TextSecure users are encrypted over the air, and all text messages are stored in an encrypted database on the device. If your phone is lost or stolen, your messages will be safe, and communication with other TextSecure users can\'t be monitored over the air.</string>
<!-- EOF -->
<string name="conversation_item_sent__download">Download</string>
<string name="conversation_item_sent__downloading">Downloading</string>
<string name="conversation_item_received__download">Download</string>
<string name="conversation_item_received__downloading">Downloading</string>
</resources>

View File

@@ -140,4 +140,20 @@
android:title="@string/preferences__vibrate"
android:summary="@string/preferences__also_vibrate_when_notified" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/preferences__advanced_mms_access_point_names">
<CheckBoxPreference android:key="pref_use_local_apns"
android:defaultValue="false"
android:title="@string/preferences__enable_local_apns"
android:summary="@string/preferences__use_apn_information_configured_here_when_system_apn_information_is_unavailable"/>
<EditTextPreference android:key="pref_apn_mmsc_host"
android:title="@string/preferences__mmsc_url_required"
android:dependency="pref_use_local_apns" />
<EditTextPreference android:key="pref_apn_mms_proxy"
android:title="@string/preferences__mms_proxy_optional"
android:dependency="pref_use_local_apns" />
</PreferenceCategory>
</PreferenceScreen>