mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
Subtle rebase conflicts...
This commit is contained in:
parent
f10d6a7b0b
commit
fde8d32848
7 changed files with 23 additions and 62 deletions
|
@ -76,48 +76,9 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
|
|||
private static final int PICK_IDENTITY_CONTACT = 1;
|
||||
private static final int ENABLE_PASSPHRASE_ACTIVITY = 2;
|
||||
|
||||
<<<<<<< HEAD
|
||||
public static final String RINGTONE_PREF = "pref_key_ringtone";
|
||||
public static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
public static final String VIBRATE_PREF = "pref_key_vibrate";
|
||||
public static final String NOTIFICATION_PREF = "pref_key_enable_notifications";
|
||||
public static final String LED_COLOR_PREF = "pref_led_color";
|
||||
public static final String LED_BLINK_PREF = "pref_led_blink";
|
||||
public static final String LED_BLINK_PREF_CUSTOM = "pref_led_blink_custom";
|
||||
public static final String IDENTITY_PREF = "pref_choose_identity";
|
||||
public static final String ALL_SMS_PREF = "pref_all_sms";
|
||||
public static final String ALL_MMS_PERF = "pref_all_mms";
|
||||
public static final String KITKAT_DEFAULT_PREF = "pref_set_default";
|
||||
public static final String PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval";
|
||||
public static final String PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase";
|
||||
public static final String AUTO_KEY_EXCHANGE_PREF = "pref_auto_complete_key_exchange";
|
||||
public static final String THEME_PREF = "pref_theme";
|
||||
public static final String LANGUAGE_PREF = "pref_language";
|
||||
public static final String ENTER_SENDS_PREF = "pref_enter_sends";
|
||||
public static final String ENTER_PRESENT_PREF = "pref_enter_key";
|
||||
|
||||
private static final String DISPLAY_CATEGORY_PREF = "pref_display_category";
|
||||
private static final String PUSH_MESSAGING_PREF = "pref_toggle_push_messaging";
|
||||
|
||||
private static final String CHANGE_PASSPHRASE_PREF = "pref_change_passphrase";
|
||||
public static final String DISABLE_PASSPHRASE_PREF = "pref_disable_passphrase";
|
||||
|
||||
public static final String MMS_PREF = "pref_mms_preferences";
|
||||
public static final String ENABLE_MANUAL_MMS_PREF = "pref_enable_manual_mms";
|
||||
public static final String MMSC_HOST_PREF = "pref_apn_mmsc_host";
|
||||
public static final String MMSC_PROXY_HOST_PREF = "pref_apn_mms_proxy";
|
||||
public static final String MMSC_PROXY_PORT_PREF = "pref_apn_mms_proxy_port";
|
||||
|
||||
public static final String SMS_DELIVERY_REPORT_PREF = "pref_delivery_report_sms";
|
||||
|
||||
public static final String THREAD_TRIM_ENABLED = "pref_trim_threads";
|
||||
public static final String THREAD_TRIM_LENGTH = "pref_trim_length";
|
||||
public static final String THREAD_TRIM_NOW = "pref_trim_now";
|
||||
|
||||
public static final String LOCAL_NUMBER_PREF = "pref_local_number";
|
||||
public static final String VERIFYING_STATE_PREF = "pref_verifying";
|
||||
public static final String REGISTERED_GCM_PREF = "pref_gcm_registered";
|
||||
public static final String GCM_PASSWORD_PREF = "pref_gcm_password";
|
||||
private static final String DISPLAY_CATEGORY_PREF = "pref_display_category";
|
||||
private static final String PUSH_MESSAGING_PREF = "pref_toggle_push_messaging";
|
||||
private static final String MMS_PREF = "pref_mms_preferences";
|
||||
|
||||
private final DynamicTheme dynamicTheme = new DynamicTheme();
|
||||
private final DynamicLanguage dynamicLanguage = new DynamicLanguage();
|
||||
|
|
|
@ -24,12 +24,13 @@ import android.preference.PreferenceManager;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.mms.MmsDownloadHelper;
|
||||
import org.thoughtcrime.securesms.service.SendReceiveService;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.textsecure.crypto.MasterSecret;
|
||||
|
||||
public class MmsPreferencesActivity extends PassphraseRequiredSherlockPreferenceActivity {
|
||||
|
||||
|
@ -87,9 +88,9 @@ public class MmsPreferencesActivity extends PassphraseRequiredSherlockPreference
|
|||
private void initializePreferences() {
|
||||
if (!MmsDownloadHelper.isMmsConnectionParametersAvailable(this, null, false)) {
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit()
|
||||
.putBoolean(ApplicationPreferencesActivity.ENABLE_MANUAL_MMS_PREF, true).commit();
|
||||
.putBoolean(TextSecurePreferences.ENABLE_MANUAL_MMS_PREF, true).commit();
|
||||
addPreferencesFromResource(R.xml.mms_preferences);
|
||||
this.findPreference(ApplicationPreferencesActivity.ENABLE_MANUAL_MMS_PREF).setOnPreferenceChangeListener(new OverrideMmsChangeListener());
|
||||
this.findPreference(TextSecurePreferences.ENABLE_MANUAL_MMS_PREF).setOnPreferenceChangeListener(new OverrideMmsChangeListener());
|
||||
} else {
|
||||
addPreferencesFromResource(R.xml.mms_preferences);
|
||||
}
|
||||
|
@ -112,9 +113,9 @@ public class MmsPreferencesActivity extends PassphraseRequiredSherlockPreference
|
|||
}
|
||||
|
||||
private void initializeEditTextSummaries() {
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(ApplicationPreferencesActivity.MMSC_HOST_PREF));
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(ApplicationPreferencesActivity.MMSC_PROXY_HOST_PREF));
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(ApplicationPreferencesActivity.MMSC_PROXY_PORT_PREF));
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(TextSecurePreferences.MMSC_HOST_PREF));
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(TextSecurePreferences.MMSC_PROXY_HOST_PREF));
|
||||
initializeEditTextSummary((EditTextPreference)this.findPreference(TextSecurePreferences.MMSC_PROXY_PORT_PREF));
|
||||
}
|
||||
|
||||
private void handleDownloadMmsPendingApn() {
|
||||
|
@ -127,7 +128,7 @@ public class MmsPreferencesActivity extends PassphraseRequiredSherlockPreference
|
|||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object o) {
|
||||
PreferenceManager.getDefaultSharedPreferences(MmsPreferencesActivity.this).edit()
|
||||
.putBoolean(ApplicationPreferencesActivity.ENABLE_MANUAL_MMS_PREF, true).commit();
|
||||
.putBoolean(TextSecurePreferences.ENABLE_MANUAL_MMS_PREF, true).commit();
|
||||
Toast.makeText(MmsPreferencesActivity.this, R.string.mms_preferences_activity__manual_mms_settings_are_required, Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -237,11 +237,6 @@ public class MmsDatabase extends Database implements MmsSmsColumns {
|
|||
notifyConversationListeners(getThreadIdForMessage(messageId));
|
||||
}
|
||||
|
||||
public void markAsSending(long messageId) {
|
||||
updateMailboxBitmask(messageId, Types.BASE_TYPE_MASK, Types.BASE_SENDING_TYPE);
|
||||
notifyConversationListeners(getThreadIdForMessage(messageId));
|
||||
}
|
||||
|
||||
public void markAsSent(long messageId, byte[] mmsId, long status) {
|
||||
SQLiteDatabase database = databaseHelper.getWritableDatabase();
|
||||
ContentValues contentValues = new ContentValues();
|
||||
|
|
|
@ -241,12 +241,10 @@ public class MessageNotifier {
|
|||
|
||||
private static void sendInThreadNotification(Context context) {
|
||||
try {
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
if (!sp.getBoolean(ApplicationPreferencesActivity.IN_THREAD_NOTIFICATION_PREF, true)) {
|
||||
return;
|
||||
if (!TextSecurePreferences.isInThreadNotifications(context)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String ringtone = TextSecurePreferences.getNotificationRingtone(context);
|
||||
|
||||
if (ringtone == null)
|
||||
|
|
|
@ -27,6 +27,7 @@ import android.os.Binder;
|
|||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.SystemClock;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ public class MmsDownloader {
|
|||
private void retrieveAndStore(MasterSecret masterSecret, long messageId, long threadId,
|
||||
String contentLocation, byte[] transactionId,
|
||||
boolean radioEnabled, boolean useProxy)
|
||||
throws IOException, MmsException
|
||||
throws IOException, MmsException, ApnUnavailableException
|
||||
{
|
||||
RetrieveConf retrieved = MmsDownloadHelper.retrieveMms(context, contentLocation,
|
||||
radio.getApnInformation(),
|
||||
|
|
|
@ -16,7 +16,7 @@ public class TextSecurePreferences {
|
|||
public static final String MMSC_PROXY_PORT_PREF = "pref_apn_mms_proxy_port";
|
||||
public static final String THREAD_TRIM_LENGTH = "pref_trim_length";
|
||||
public static final String THREAD_TRIM_NOW = "pref_trim_now";
|
||||
public static final String USE_LOCAL_MMS_APNS_PREF = "pref_use_local_apns";
|
||||
public static final String ENABLE_MANUAL_MMS_PREF = "pref_enable_manual_mms";
|
||||
|
||||
private static final String RINGTONE_PREF = "pref_key_ringtone";
|
||||
private static final String VIBRATE_PREF = "pref_key_vibrate";
|
||||
|
@ -39,6 +39,11 @@ public class TextSecurePreferences {
|
|||
private static final String PROMPTED_PUSH_REGISTRATION_PREF = "pref_prompted_push_registration";
|
||||
private static final String SIGNALING_KEY_PREF = "pref_signaling_key";
|
||||
private static final String DIRECTORY_FRESH_TIME_PREF = "pref_directory_refresh_time";
|
||||
private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
|
||||
public static boolean isInThreadNotifications(Context context) {
|
||||
return getBooleanPreference(context, IN_THREAD_NOTIFICATION_PREF, true);
|
||||
}
|
||||
|
||||
public static long getDirectoryRefreshTime(Context context) {
|
||||
return getLongPreference(context, DIRECTORY_FRESH_TIME_PREF, 0L);
|
||||
|
@ -113,7 +118,7 @@ public class TextSecurePreferences {
|
|||
}
|
||||
|
||||
public static boolean isUseLocalApnsEnabled(Context context) {
|
||||
return getBooleanPreference(context, USE_LOCAL_MMS_APNS_PREF, false);
|
||||
return getBooleanPreference(context, ENABLE_MANUAL_MMS_PREF, false);
|
||||
}
|
||||
|
||||
public static String getTheme(Context context) {
|
||||
|
|
Loading…
Reference in a new issue