mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
parent
5de89d4f26
commit
ba849bce2c
@ -70,6 +70,12 @@
|
||||
<!-- BlockedContactsActivity -->
|
||||
<string name="BlockedContactsActivity_blocked_contacts">Blocked contacts</string>
|
||||
|
||||
<!-- BucketedThreadMedia -->
|
||||
<string name="BucketedThreadMedia_Today">Today</string>
|
||||
<string name="BucketedThreadMedia_Yesterday">Yesterday</string>
|
||||
<string name="BucketedThreadMedia_This_week">This week</string>
|
||||
<string name="BucketedThreadMedia_This_month">This month</string>
|
||||
|
||||
<!-- CallScreen -->
|
||||
<string name="CallScreen_Incoming_call">Incoming call</string>
|
||||
|
||||
@ -416,6 +422,10 @@
|
||||
<string name="MmsDownloader_error_connecting_to_mms_provider">Error connecting to MMS provider</string>
|
||||
<string name="MmsDownloader_error_reading_mms_settings">Error reading wireless provider MMS settings</string>
|
||||
|
||||
<!-- MediaOverviewActivity -->
|
||||
<string name="MediaOverviewActivity_Media">Media</string>
|
||||
<string name="MediaOverviewActivity_Documents">Documents</string>
|
||||
|
||||
<!--- NotificationBarManager -->
|
||||
<string name="NotificationBarManager_signal_call_in_progress">Signal call in progress</string>
|
||||
<string name="NotificationBarManager_missed_call_from_s">Missed call from %s</string>
|
||||
@ -591,6 +601,15 @@
|
||||
<string name="RegistrationService_registration_error">Registration error</string>
|
||||
<string name="RegistrationService_signal_registration_has_encountered_a_problem">Signal registration has encountered a problem.</string>
|
||||
|
||||
<!-- RingtonePreference -->
|
||||
<string name="RingtonePreference_ringtone_default">Default ringtone</string>
|
||||
<string name="RingtonePreference_ringtone_silent">None</string>
|
||||
<string name="RingtonePreference_ringtone_picker_title">Ringtones</string>
|
||||
<string name="RingtonePreference_notification_sound_default">Default notification sound</string>
|
||||
<string name="RingtonePreference_alarm_sound_default">Default alarm sound</string>
|
||||
<string name="RingtonePreference_add_ringtone_text">Add ringtone</string>
|
||||
<string name="RingtonePreference_unable_to_add_ringtone">Unable to add custom ringtone</string>
|
||||
|
||||
<!-- Slide -->
|
||||
<string name="Slide_image">Image</string>
|
||||
<string name="Slide_audio">Audio</string>
|
||||
@ -1269,6 +1288,10 @@
|
||||
<string name="preferences__submit_debug_log">Submit debug log</string>
|
||||
<string name="preferences__support_wifi_calling">\'WiFi Calling\' compatibility mode</string>
|
||||
<string name="preferences__enable_if_your_device_supports_sms_mms_delivery_over_wifi">Enable if your device uses SMS/MMS delivery over WiFi (only enable when \'WiFi Calling\' is enabled on your device)</string>
|
||||
<string name="preferences__incognito_keyboard">Incognito keyboard</string>
|
||||
<string name="preferences__use_keyboard_without_suggestions_or_auto_correct">Use keyboard without suggestions or auto-correct</string>
|
||||
<string name="preferences__read_receipts">Read receipts</string>
|
||||
<string name="preferences__if_read_receipts_are_disabled_you_wont_be_able_to_see_read_receipts">If read receipts are disabled, you won\'t be able to see read receipts from others.</string>
|
||||
<string name="preferences_app_protection__blocked_contacts">Blocked contacts</string>
|
||||
<string name="preferences_app_protection__safety_numbers_approval">Safety numbers approval</string>
|
||||
<string name="preferences_app_protecting__require_approval_of_new_safety_numbers_when_they_change">Require approval of new safety numbers when they change</string>
|
||||
@ -1459,22 +1482,7 @@
|
||||
<!-- transport_selection_list_item -->
|
||||
<string name="transport_selection_list_item__transport_icon">Transport icon</string>
|
||||
<string name="conversation_item_sent__message_read">Message read</string>
|
||||
<string name="preferences__read_receipts">Read receipts</string>
|
||||
<string name="preferences__if_read_receipts_are_disabled_you_wont_be_able_to_see_read_receipts">If read receipts are disabled, you won\'t be able to see read receipts from others.</string>
|
||||
|
||||
<string name="RingtonePreference_ringtone_default">Default ringtone</string>
|
||||
<string name="RingtonePreference_ringtone_silent">None</string>
|
||||
<string name="RingtonePreference_ringtone_picker_title">Ringtones</string>
|
||||
<string name="RingtonePreference_notification_sound_default">Default notification sound</string>
|
||||
<string name="RingtonePreference_alarm_sound_default">Default alarm sound</string>
|
||||
<string name="RingtonePreference_add_ringtone_text">Add ringtone</string>
|
||||
<string name="RingtonePreference_unable_to_add_ringtone">Unable to add custom ringtone</string>
|
||||
<string name="BucketedThreadMedia_Today">Today</string>
|
||||
<string name="BucketedThreadMedia_Yesterday">Yesterday</string>
|
||||
<string name="BucketedThreadMedia_This_week">This week</string>
|
||||
<string name="BucketedThreadMedia_This_month">This month</string>
|
||||
<string name="MediaOverviewActivity_Media">Media</string>
|
||||
<string name="MediaOverviewActivity_Documents">Documents</string>
|
||||
<string name="media_overview_documents_fragment__no_documents_found">No documents found</string>
|
||||
<string name="experience_upgrade_preference_fragment__read_receipts_are_here">Read receipts are here</string>
|
||||
<string name="experience_upgrade_preference_fragment__optionally_see_and_share_when_messages_have_been_read">Optionally see and share when messages have been read</string>
|
||||
|
@ -25,10 +25,16 @@
|
||||
android:dependency="pref_timeout_passphrase"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:defaultValue="false"
|
||||
android:key="pref_screen_security"
|
||||
android:title="@string/preferences__screen_security"
|
||||
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_incognito_keyboard"
|
||||
android:title="@string/preferences__incognito_keyboard"
|
||||
android:summary="@string/preferences_use_keyboard_without_suggestions_or_auto_correct"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
@ -44,6 +44,7 @@ import org.thoughtcrime.securesms.jobs.DirectoryRefreshJob;
|
||||
import org.thoughtcrime.securesms.jobs.PushDecryptJob;
|
||||
import org.thoughtcrime.securesms.jobs.RefreshAttributesJob;
|
||||
import org.thoughtcrime.securesms.notifications.MessageNotifier;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.VersionTracker;
|
||||
|
||||
@ -70,6 +71,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
public static final int REDPHONE_SUPPORT_VERSION = 157;
|
||||
public static final int NO_MORE_CANONICAL_DB_VERSION = 276;
|
||||
public static final int PROFILES = 289;
|
||||
public static final int SCREENSHOTS = 300;
|
||||
|
||||
private static final SortedSet<Integer> UPGRADE_VERSIONS = new TreeSet<Integer>() {{
|
||||
add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION);
|
||||
@ -84,6 +86,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
add(MEDIA_DOWNLOAD_CONTROLS_VERSION);
|
||||
add(REDPHONE_SUPPORT_VERSION);
|
||||
add(NO_MORE_CANONICAL_DB_VERSION);
|
||||
add(SCREENSHOTS);
|
||||
}};
|
||||
|
||||
private MasterSecret masterSecret;
|
||||
@ -240,6 +243,10 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
.add(new DirectoryRefreshJob(getApplicationContext()));
|
||||
}
|
||||
|
||||
if (params[0] < SCREENSHOTS) {
|
||||
TextSecurePreferences.setScreenSecurityEnabled(getApplicationContext(), true);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -37,14 +37,17 @@ public class ComposeText extends EmojiEditText {
|
||||
|
||||
public ComposeText(Context context) {
|
||||
super(context);
|
||||
initialize();
|
||||
}
|
||||
|
||||
public ComposeText(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initialize();
|
||||
}
|
||||
|
||||
public ComposeText(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initialize();
|
||||
}
|
||||
|
||||
public String getTextTrimmed(){
|
||||
@ -107,6 +110,7 @@ public class ComposeText extends EmojiEditText {
|
||||
|
||||
public void setTransport(TransportOption transport) {
|
||||
final boolean useSystemEmoji = TextSecurePreferences.isSystemEmojiPreferred(getContext());
|
||||
final boolean isIncognito = TextSecurePreferences.isIncognitoKeyboardEnabled(getContext());
|
||||
|
||||
int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
|
||||
int inputType = getInputType();
|
||||
@ -146,6 +150,11 @@ public class ComposeText extends EmojiEditText {
|
||||
this.mediaListener = mediaListener;
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
if (TextSecurePreferences.isIncognitoKeyboardEnabled(getContext())) {
|
||||
setImeOptions(getImeOptions() | 16777216);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB_MR2)
|
||||
private static class CommitContentListener implements InputConnectionCompat.OnCommitContentListener {
|
||||
|
@ -113,6 +113,11 @@ public class TextSecurePreferences {
|
||||
private static final String PROFILE_KEY_PREF = "pref_profile_key";
|
||||
private static final String PROFILE_NAME_PREF = "pref_profile_name";
|
||||
public static final String READ_RECEIPTS_PREF = "pref_read_receipts";
|
||||
public static final String INCOGNITO_KEYBORAD_PREF = "pref_incognito_keyboard";
|
||||
|
||||
public static boolean isIncognitoKeyboardEnabled(Context context) {
|
||||
return getBooleanPreference(context, INCOGNITO_KEYBORAD_PREF, false);
|
||||
}
|
||||
|
||||
public static boolean isReadReceiptsEnabled(Context context) {
|
||||
return getBooleanPreference(context, READ_RECEIPTS_PREF, false);
|
||||
@ -471,8 +476,12 @@ public class TextSecurePreferences {
|
||||
setStringPreference(context, IDENTITY_PREF, identityUri);
|
||||
}
|
||||
|
||||
public static void setScreenSecurityEnabled(Context context, boolean value) {
|
||||
setBooleanPreference(context, SCREEN_SECURITY_PREF, value);
|
||||
}
|
||||
|
||||
public static boolean isScreenSecurityEnabled(Context context) {
|
||||
return getBooleanPreference(context, SCREEN_SECURITY_PREF, true);
|
||||
return getBooleanPreference(context, SCREEN_SECURITY_PREF, false);
|
||||
}
|
||||
|
||||
public static boolean isLegacyUseLocalApnsEnabled(Context context) {
|
||||
|
Loading…
Reference in New Issue
Block a user