Skip to content

Commit

Permalink
Rename dev settings menu preferences file as it conflicts with fennec…
Browse files Browse the repository at this point in the history
…'s (facebook#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: facebook#23123

Differential Revision: D13781836

Pulled By: cpojer

fbshipit-source-id: f27483d4eca5aa4148759b94b601673985c5aa91
  • Loading branch information
Khaled Tantawy authored and facebook-github-bot committed Jan 23, 2019
1 parent c086ef5 commit c46b925
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit c46b925

Please sign in to comment.