|
|
|
|
@ -18,6 +18,7 @@ package org.thoughtcrime.securesms;
|
|
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
|
import android.os.Build.VERSION;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.preference.Preference;
|
|
|
|
|
import android.support.annotation.NonNull;
|
|
|
|
|
@ -70,7 +71,10 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
|
|
|
|
|
@Override
|
|
|
|
|
protected void onCreate(Bundle icicle, @NonNull MasterSecret masterSecret) {
|
|
|
|
|
this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
|
|
|
initFragment(android.R.id.content, new ApplicationPreferenceFragment(), masterSecret);
|
|
|
|
|
|
|
|
|
|
if (icicle == null) {
|
|
|
|
|
initFragment(android.R.id.content, new ApplicationPreferenceFragment(), masterSecret);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@ -105,9 +109,11 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
|
|
|
|
|
@Override
|
|
|
|
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
|
|
|
|
if (key.equals(TextSecurePreferences.THEME_PREF)) {
|
|
|
|
|
dynamicTheme.onResume(this);
|
|
|
|
|
if (VERSION.SDK_INT >= 11) recreate();
|
|
|
|
|
else dynamicTheme.onResume(this);
|
|
|
|
|
} else if (key.equals(TextSecurePreferences.LANGUAGE_PREF)) {
|
|
|
|
|
dynamicLanguage.onResume(this);
|
|
|
|
|
if (VERSION.SDK_INT >= 11) recreate();
|
|
|
|
|
else dynamicLanguage.onResume(this);
|
|
|
|
|
|
|
|
|
|
Intent intent = new Intent(this, KeyCachingService.class);
|
|
|
|
|
intent.setAction(KeyCachingService.LOCALE_CHANGE_EVENT);
|
|
|
|
|
|