0006-Bug-28051-Don-t-use-Orbot-s-LocaleHelper-for-locale-.patch 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. From 4b33256dc2f3f626cca70880069a94074e312132 Mon Sep 17 00:00:00 2001
  2. From: Matthew Finkel <Matthew.Finkel@gmail.com>
  3. Date: Sat, 24 Nov 2018 04:46:49 +0000
  4. Subject: [PATCH 06/13] Bug 28051 - Don't use Orbot's LocaleHelper for locale
  5. selection
  6. ---
  7. .../main/java/org/torproject/android/OrbotMainActivity.java | 6 ------
  8. .../torproject/android/settings/SettingsPreferences.java | 5 -----
  9. .../android/ui/hiddenservices/ClientCookiesActivity.java | 6 ------
  10. .../android/ui/hiddenservices/HiddenServicesActivity.java | 6 ------
  11. .../android/ui/onboarding/BridgeWizardActivity.java | 6 ------
  12. 5 files changed, 29 deletions(-)
  13. diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
  14. index ff5dd120..044b957f 100644
  15. --- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
  16. +++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
  17. @@ -24,7 +24,6 @@ import org.torproject.android.service.TorService;
  18. import org.torproject.android.service.TorServiceConstants;
  19. import org.torproject.android.service.util.TorServiceUtils;
  20. import org.torproject.android.settings.Languages;
  21. -import org.torproject.android.settings.LocaleHelper;
  22. import org.torproject.android.settings.SettingsPreferences;
  23. import org.torproject.android.ui.AppManagerActivity;
  24. import org.torproject.android.ui.Rotate3dAnimation;
  25. @@ -427,11 +426,6 @@ public class OrbotMainActivity extends AppCompatActivity
  26. }
  27. }
  28. - @Override
  29. - protected void attachBaseContext(Context base) {
  30. - super.attachBaseContext(LocaleHelper.onAttach(base));
  31. - }
  32. -
  33. /*
  34. * Create the UI Options Menu (non-Javadoc)
  35. * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
  36. diff --git a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  37. index c3b5189d..df85a9f6 100644
  38. --- a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  39. +++ b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  40. @@ -47,11 +47,6 @@ public class SettingsPreferences
  41. });
  42. }
  43. - @Override
  44. - protected void attachBaseContext(Context base) {
  45. - super.attachBaseContext(LocaleHelper.onAttach(base));
  46. - }
  47. -
  48. @Override
  49. protected void onPause() {
  50. //Language.setFromPreference(this, "pref_default_locale", true);
  51. diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
  52. index 933915d0..dd3a54e0 100644
  53. --- a/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
  54. +++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
  55. @@ -25,7 +25,6 @@ import com.google.zxing.integration.android.IntentResult;
  56. import org.json.JSONException;
  57. import org.json.JSONObject;
  58. import org.torproject.android.R;
  59. -import org.torproject.android.settings.LocaleHelper;
  60. import org.torproject.android.ui.hiddenservices.adapters.ClientCookiesAdapter;
  61. import org.torproject.android.ui.hiddenservices.dialogs.AddCookieDialog;
  62. import org.torproject.android.ui.hiddenservices.dialogs.CookieActionsDialog;
  63. @@ -103,11 +102,6 @@ public class ClientCookiesActivity extends AppCompatActivity {
  64. }
  65. - @Override
  66. - protected void attachBaseContext(Context base) {
  67. - super.attachBaseContext(LocaleHelper.onAttach(base));
  68. - }
  69. -
  70. @Override
  71. public boolean onCreateOptionsMenu(Menu menu) {
  72. getMenuInflater().inflate(R.menu.cookie_menu, menu);
  73. diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
  74. index 3e2d9c3c..75aefd14 100644
  75. --- a/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
  76. +++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
  77. @@ -22,7 +22,6 @@ import android.widget.Spinner;
  78. import android.widget.Toast;
  79. import org.torproject.android.R;
  80. -import org.torproject.android.settings.LocaleHelper;
  81. import org.torproject.android.ui.hiddenservices.adapters.OnionListAdapter;
  82. import org.torproject.android.ui.hiddenservices.dialogs.HSActionsDialog;
  83. import org.torproject.android.ui.hiddenservices.dialogs.HSDataDialog;
  84. @@ -108,11 +107,6 @@ public class HiddenServicesActivity extends AppCompatActivity {
  85. }
  86. - @Override
  87. - protected void attachBaseContext(Context base) {
  88. - super.attachBaseContext(LocaleHelper.onAttach(base));
  89. - }
  90. -
  91. @Override
  92. public boolean onCreateOptionsMenu(Menu menu) {
  93. getMenuInflater().inflate(R.menu.hs_menu, menu);
  94. diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  95. index e047e58f..47778a32 100644
  96. --- a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  97. +++ b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  98. @@ -19,7 +19,6 @@ import android.widget.TextView;
  99. import org.torproject.android.R;
  100. import org.torproject.android.service.OrbotConstants;
  101. import org.torproject.android.service.util.Prefs;
  102. -import org.torproject.android.settings.LocaleHelper;
  103. import java.io.IOException;
  104. import java.net.InetSocketAddress;
  105. @@ -92,11 +91,6 @@ public class BridgeWizardActivity extends AppCompatActivity {
  106. }
  107. - @Override
  108. - protected void attachBaseContext(Context base) {
  109. - super.attachBaseContext(LocaleHelper.onAttach(base));
  110. - }
  111. -
  112. @Override
  113. public boolean onOptionsItemSelected(MenuItem item) {
  114. if (item.getItemId() == android.R.id.home) {
  115. --
  116. 2.17.1