0007-Bug-28051-Rename-Orbot-s-preferences-so-they-don-t-c.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From a700bbe8356b4ab0a56460018e82cff1ded66c0b Mon Sep 17 00:00:00 2001
  2. From: Matthew Finkel <Matthew.Finkel@gmail.com>
  3. Date: Sat, 24 Nov 2018 04:48:27 +0000
  4. Subject: [PATCH 07/13] Bug 28051 - Rename Orbot's preferences so they don't
  5. conflict with Fennec's
  6. ---
  7. .../org/torproject/android/settings/SettingsPreferences.java | 3 ++-
  8. .../main/res/xml-fa/{preferences.xml => orbot_preferences.xml} | 0
  9. .../main/res/xml/{preferences.xml => orbot_preferences.xml} | 0
  10. docs/WALKTHROUGH | 2 +-
  11. 4 files changed, 3 insertions(+), 2 deletions(-)
  12. rename app/src/main/res/xml-fa/{preferences.xml => orbot_preferences.xml} (100%)
  13. rename app/src/main/res/xml/{preferences.xml => orbot_preferences.xml} (100%)
  14. diff --git a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  15. index df85a9f6..0e7edcd8 100644
  16. --- a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  17. +++ b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
  18. @@ -24,7 +24,8 @@ public class SettingsPreferences
  19. protected void onCreate(Bundle savedInstanceState) {
  20. super.onCreate(savedInstanceState);
  21. - addPreferencesFromResource(R.xml.preferences);
  22. + // Rename preferences so it doesn't conflict with Fennec
  23. + addPreferencesFromResource(R.xml.orbot_preferences);
  24. getPreferenceManager().setSharedPreferencesMode(Context.MODE_MULTI_PROCESS);
  25. prefLocale = (ListPreference) findPreference("pref_default_locale");
  26. diff --git a/app/src/main/res/xml-fa/preferences.xml b/app/src/main/res/xml-fa/orbot_preferences.xml
  27. similarity index 100%
  28. rename from app/src/main/res/xml-fa/preferences.xml
  29. rename to app/src/main/res/xml-fa/orbot_preferences.xml
  30. diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/orbot_preferences.xml
  31. similarity index 100%
  32. rename from app/src/main/res/xml/preferences.xml
  33. rename to app/src/main/res/xml/orbot_preferences.xml
  34. diff --git a/docs/WALKTHROUGH b/docs/WALKTHROUGH
  35. index 55a356b5..8e432b04 100644
  36. --- a/docs/WALKTHROUGH
  37. +++ b/docs/WALKTHROUGH
  38. @@ -30,7 +30,7 @@
  39. //for this type of non-time critical function you just want to happen in the background at some point soon-ish
  40. ├── SettingsPreferences.java
  41. - // Settings activity that loads the res/xml/preferences.xml resource up
  42. + // Settings activity that loads the res/xml/orbot_preferences.xml resource up
  43. // has some custom event handlng, onActivityResult callback result code's as well
  44. // basically meant to tell Orbot activity if critical settings have been modified and whether
  45. // those new settings should be applied (like iptables/transproxy changes)
  46. --
  47. 2.17.1