From c46b92578955f7974756820a0d11085a7e045151 Mon Sep 17 00:00:00 2001 From: Khaled Tantawy Date: Wed, 23 Jan 2019 04:11:32 -0800 Subject: [PATCH] Rename dev settings menu preferences file as it conflicts with fennec's (#23123) Summary: On Android, resources with the same name from different libraries conflict, so it's encouraged to have prefixes for resource names. This is one case where the settings menu preferences file in firefox for android is called `preferences.xml` so it conflicts with the dev support settings menu for react native. when integrating react-native to the firefox project, react native dev settings menu never shows, and the one from firefox shows up instead. This a link to a file from a fork project that I'm working on: https://github.com/ghostery/browser-android/blob/master/mozilla-release/mobile/android/app/src/main/res/xml/preferences.xml Please, let me know, if anything more needs to be changed Changelog: ----------- [Android] [Fixed] Rename dev settings menu preferences file with a RN prefix. Pull Request resolved: https://github.com/facebook/react-native/pull/23123 Differential Revision: D13781836 Pulled By: cpojer fbshipit-source-id: f27483d4eca5aa4148759b94b601673985c5aa91 --- .../java/com/facebook/react/devsupport/DevSettingsActivity.java | 2 +- .../devsupport/xml/{preferences.xml => rn_dev_preferences.xml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ReactAndroid/src/main/res/devsupport/xml/{preferences.xml => rn_dev_preferences.xml} (100%) diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java index 3e059df4e13a84..cc5ee193cda2dc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java @@ -23,6 +23,6 @@ public class DevSettingsActivity extends PreferenceActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(getApplication().getResources().getString(R.string.catalyst_settings_title)); - addPreferencesFromResource(R.xml.preferences); + addPreferencesFromResource(R.xml.rn_dev_preferences); } } diff --git a/ReactAndroid/src/main/res/devsupport/xml/preferences.xml b/ReactAndroid/src/main/res/devsupport/xml/rn_dev_preferences.xml similarity index 100% rename from ReactAndroid/src/main/res/devsupport/xml/preferences.xml rename to ReactAndroid/src/main/res/devsupport/xml/rn_dev_preferences.xml