diff --git a/src/org/thoughtcrime/securesms/util/DynamicLanguage.java b/src/org/thoughtcrime/securesms/util/DynamicLanguage.java index b3702149a8..a2ad2b9fae 100644 --- a/src/org/thoughtcrime/securesms/util/DynamicLanguage.java +++ b/src/org/thoughtcrime/securesms/util/DynamicLanguage.java @@ -21,16 +21,13 @@ public class DynamicLanguage { public void onResume(Activity activity) { if (!currentLocale.equals(getSelectedLocale(activity))) { - Intent intent = activity.getIntent(); - intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); - - activity.startActivity(intent); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + activity.recreate(); + } else { + Intent intent = activity.getIntent(); + activity.finish(); OverridePendingTransition.invoke(activity); - } - - activity.finish(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { + activity.startActivity(intent); OverridePendingTransition.invoke(activity); } } diff --git a/src/org/thoughtcrime/securesms/util/DynamicTheme.java b/src/org/thoughtcrime/securesms/util/DynamicTheme.java index 2a1e3d0bce..f7646b9072 100644 --- a/src/org/thoughtcrime/securesms/util/DynamicTheme.java +++ b/src/org/thoughtcrime/securesms/util/DynamicTheme.java @@ -21,19 +21,15 @@ public class DynamicTheme { public void onResume(Activity activity) { if (currentTheme != getSelectedTheme(activity)) { - Intent intent = activity.getIntent(); - intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); - - activity.startActivity(intent); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + activity.recreate(); + } else { + Intent intent = activity.getIntent(); + activity.finish(); + OverridePendingTransition.invoke(activity); + activity.startActivity(intent); OverridePendingTransition.invoke(activity); } - - activity.finish(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { - OverridePendingTransition.invoke(activity); - } - } }