BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/146686
Change subject: Checkstyle: Category Design (some) + Sizes ...................................................................... Checkstyle: Category Design (some) + Sizes Also updated checkstyle.xml to allow for suppression of specific warnings since we can't do much about the generated static data methods being too long. Updated README to include steps how to install and configure the Checkstyle-IDEA plugin to use our checkstyle.xml file. Change-Id: Iedd809c857ebb6e49e1169ee25adfcfc3a2c9e62 --- M README.mediawiki M checkstyle.xml M scripts/templates/basichash.java.jinja M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java M wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java M wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java M wikipedia/src/main/java/org/wikipedia/savedpages/ImageUrlMap.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java M wikipedia/src/main/java/org/wikipedia/staticdata/FileAliasData.java M wikipedia/src/main/java/org/wikipedia/staticdata/MainPageNameData.java M wikipedia/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java M wikipedia/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java 14 files changed, 128 insertions(+), 103 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/86/146686/1 diff --git a/README.mediawiki b/README.mediawiki index 685f003..582d295 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -136,9 +136,16 @@ * Because the log level can be changed on the main interface, it may be helpful to leave the level set to "Verbose" * Select "OK" -17. Enjoy. +17. Checkstyle Configuration to see Checkstyle errors as you type -18. Help make it better! +In the IntelliJ preferences (settings), go to Plugins and install the Checkstyle-IDEA inspection plugin. +Then go to the Checkstyle setting and add a new configuration file: browse to the local file checkstyle.xml. +Make sure you check the new configuration file so our checkstyle inspections are enabled and show up as IntelliJ errors in the code editor. +Also check "Scan test classes" above. + +18. Enjoy. + +19. Help make it better! == Updating bundled JavaScript == diff --git a/checkstyle.xml b/checkstyle.xml index f0b21e4..2cd0fc3 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -51,6 +51,9 @@ <property name="file" value="suppressions.xml"/> </module> + <!-- Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation --> + <module name="SuppressWarningsFilter" /> + <module name="TreeWalker"> <!-- Checks for Javadoc comments. --> @@ -162,6 +165,9 @@ <!--<module name="FinalParameters"/>--> <module name="UpperEll"/> + <!-- Make the @SuppressWarnings annotations available to Checkstyle --> + <module name="SuppressWarningsHolder" /> + </module> </module> diff --git a/scripts/templates/basichash.java.jinja b/scripts/templates/basichash.java.jinja index fc20e36..bbb4440 100644 --- a/scripts/templates/basichash.java.jinja +++ b/scripts/templates/basichash.java.jinja @@ -5,13 +5,14 @@ import java.util.*; -public class {{ class_name }} { +public final class {{class_name}} { private static HashMap<String, String> DATA_MAP; + @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"}) private static void setupData() { - final int SIZE = {{wikis|length}}; - DATA_MAP = new HashMap<String, String>(SIZE); + final int size = {{wikis|length}}; + DATA_MAP = new HashMap<String, String>(size); {%- for wiki in wikis %} DATA_MAP.put("{{wiki.lang}}", "{{wiki.props[key]}}"); @@ -28,4 +29,7 @@ } return DATA_MAP.get("en"); } + + private {{class_name}}() { + } } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java index c04fb5f..a8da7f7 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java @@ -39,10 +39,10 @@ private CommunicationBridge bridge; - NightModeHandler nightModeHandler; + private NightModeHandler nightModeHandler; - List<EditSummaryTag> summaryTags; - EditSummaryTag otherTag; + private List<EditSummaryTag> summaryTags; + private EditSummaryTag otherTag; private ProgressDialog progressDialog; private EditFunnel funnel; diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index e26583a..8e6800b 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -277,64 +277,7 @@ return; } if (caught instanceof EditingException) { - EditingException ee = (EditingException) caught; - if (app.getUserInfoStorage().isLoggedIn() && ee.getCode().equals("badtoken")) { - // looks like our session expired. - app.getEditTokenStorage().clearAllTokens(); - app.getCookieManager().clearAllCookies(); - - User user = app.getUserInfoStorage().getUser(); - new LoginTask(app, app.getPrimarySite(), user.getUsername(), user.getPassword()) { - @Override - public void onFinish(LoginResult result) { - if (result.getCode().equals("Success")) { - doSave(); - } else { - progressDialog.dismiss(); - ViewAnimations.crossFade(sectionText, sectionError); - sectionError.setVisibility(View.VISIBLE); - } - } - }.execute(); - return; - } - - if (ee.getCode().equals("blocked") || ee.getCode().equals("wikimedia-globalblocking-ipblocked")) { - // User is blocked, locally or globally - // If they were anon, canedit does not catch this, so we can't show them the locked pencil - // If they not anon, this means they were blocked in the interim between opening the edit - // window and clicking save. Less common, but might as well handle it - progressDialog.dismiss(); - AlertDialog.Builder builder = new AlertDialog.Builder(EditSectionActivity.this); - builder.setTitle(R.string.user_blocked_from_editing_title); - if (app.getUserInfoStorage().isLoggedIn()) { - builder.setMessage(R.string.user_logged_in_blocked_from_editing); - builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - dialogInterface.dismiss(); - } - }); - } else { - builder.setMessage(R.string.user_anon_blocked_from_editing); - builder.setPositiveButton(R.string.nav_item_login, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - dialogInterface.dismiss(); - Intent loginIntent = new Intent(EditSectionActivity.this, LoginActivity.class); - loginIntent.putExtra(LoginActivity.LOGIN_REQUEST_SOURCE, LoginFunnel.SOURCE_BLOCKED); - startActivity(loginIntent); - } - }); - builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - dialogInterface.dismiss(); - } - }); - } - builder.show(); - } + handleEditingException((EditingException) caught); return; } if (!(caught instanceof HttpRequest.HttpRequestException)) { @@ -361,6 +304,63 @@ retryDialog.show(); } + private void handleEditingException(EditingException ee) { + if (app.getUserInfoStorage().isLoggedIn() && ee.getCode().equals("badtoken")) { + // looks like our session expired. + app.getEditTokenStorage().clearAllTokens(); + app.getCookieManager().clearAllCookies(); + + User user = app.getUserInfoStorage().getUser(); + new LoginTask(app, app.getPrimarySite(), user.getUsername(), user.getPassword()) { + @Override + public void onFinish(LoginResult result) { + if (result.getCode().equals("Success")) { + doSave(); + } else { + progressDialog.dismiss(); + ViewAnimations.crossFade(sectionText, sectionError); + sectionError.setVisibility(View.VISIBLE); + } + } + }.execute(); + } else if (ee.getCode().equals("blocked") || ee.getCode().equals("wikimedia-globalblocking-ipblocked")) { + // User is blocked, locally or globally + // If they were anon, canedit does not catch this, so we can't show them the locked pencil + // If they not anon, this means they were blocked in the interim between opening the edit + // window and clicking save. Less common, but might as well handle it + progressDialog.dismiss(); + AlertDialog.Builder builder = new AlertDialog.Builder(EditSectionActivity.this); + builder.setTitle(R.string.user_blocked_from_editing_title); + if (app.getUserInfoStorage().isLoggedIn()) { + builder.setMessage(R.string.user_logged_in_blocked_from_editing); + builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + dialogInterface.dismiss(); + } + }); + } else { + builder.setMessage(R.string.user_anon_blocked_from_editing); + builder.setPositiveButton(R.string.nav_item_login, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + dialogInterface.dismiss(); + Intent loginIntent = new Intent(EditSectionActivity.this, LoginActivity.class); + loginIntent.putExtra(LoginActivity.LOGIN_REQUEST_SOURCE, LoginFunnel.SOURCE_BLOCKED); + startActivity(loginIntent); + } + }); + builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + dialogInterface.dismiss(); + } + }); + } + builder.show(); + } + } + @Override public void onFinish(EditingResult result) { if (!progressDialog.isShowing()) { diff --git a/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java b/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java index 4df61e6..3becba5 100644 --- a/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java +++ b/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java @@ -11,7 +11,7 @@ import java.util.List; public class DataMigrator { - Context context; + private Context context; public DataMigrator(Context context) { super(); diff --git a/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java b/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java index 1179163..13f5827 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java +++ b/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java @@ -6,9 +6,9 @@ import org.wikipedia.history.HistoryEntry; public class BackStackItem implements Parcelable { - public final PageTitle title; - public final HistoryEntry historyEntry; - public final int scrollPosition; + final PageTitle title; + final HistoryEntry historyEntry; + final int scrollPosition; public BackStackItem(PageTitle title, HistoryEntry historyEntry, int scrollPosition) { this.title = title; @@ -44,5 +44,4 @@ return new BackStackItem[size]; } }; - } diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java index 7131ffc..f3705a4 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java @@ -156,7 +156,7 @@ return slidingPane.isDrawerOpen(); } - private class ToCAdapter extends BaseAdapter { + private final class ToCAdapter extends BaseAdapter { private final ArrayList<Section> sections; private ToCAdapter(Page page) { diff --git a/wikipedia/src/main/java/org/wikipedia/savedpages/ImageUrlMap.java b/wikipedia/src/main/java/org/wikipedia/savedpages/ImageUrlMap.java index c6887f8..4120d73 100644 --- a/wikipedia/src/main/java/org/wikipedia/savedpages/ImageUrlMap.java +++ b/wikipedia/src/main/java/org/wikipedia/savedpages/ImageUrlMap.java @@ -18,13 +18,12 @@ * Mappings of image source URLs to local file URLs. * A Map with entries {source URL, file path} of images to be downloaded. */ -public class ImageUrlMap { +public final class ImageUrlMap { private final Map<String, String> urlMap; private ImageUrlMap(Builder builder) { // Mostly since multiple threads can attempt to remove things at the same time - // in SavePageTasak, if multiple images fail. Easier than synchronizing - // just the removes. + // in SavePageTask, if multiple images fail. Easier than synchronizing just the removes. this.urlMap = Collections.synchronizedMap(builder.urlMap); } diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 66ae51d..a316b78 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -88,7 +88,7 @@ private DrawerLayout drawerLayout; - PageActionsHandler pageActionsHandler; + private PageActionsHandler pageActionsHandler; private PopupMenu pageActionsMenu; private SearchArticlesTask curSearchTask; diff --git a/wikipedia/src/main/java/org/wikipedia/staticdata/FileAliasData.java b/wikipedia/src/main/java/org/wikipedia/staticdata/FileAliasData.java index c510763..2ad4b11 100644 --- a/wikipedia/src/main/java/org/wikipedia/staticdata/FileAliasData.java +++ b/wikipedia/src/main/java/org/wikipedia/staticdata/FileAliasData.java @@ -5,13 +5,14 @@ import java.util.*; -public class FileAliasData { +public final class FileAliasData { private static HashMap<String, String> DATA_MAP; + @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"}) private static void setupData() { - final int SIZE = 287; - DATA_MAP = new HashMap<String, String>(SIZE); + final int size = 287; + DATA_MAP = new HashMap<String, String>(size); DATA_MAP.put("en", "File"); DATA_MAP.put("nl", "Bestand"); DATA_MAP.put("de", "Datei"); @@ -44,8 +45,8 @@ DATA_MAP.put("min", "Berkas"); DATA_MAP.put("kk", "Сурет"); DATA_MAP.put("eo", "Dosiero"); - DATA_MAP.put("sk", "Súbor"); DATA_MAP.put("sh", "Datoteka"); + DATA_MAP.put("sk", "Súbor"); DATA_MAP.put("da", "Fil"); DATA_MAP.put("eu", "Fitxategi"); DATA_MAP.put("lt", "Vaizdas"); @@ -96,8 +97,8 @@ DATA_MAP.put("my", "File"); DATA_MAP.put("zh-yue", "File"); DATA_MAP.put("ga", "Íomhá"); - DATA_MAP.put("lmo", "Archivi"); DATA_MAP.put("bn", "চিত্র"); + DATA_MAP.put("lmo", "Archivi"); DATA_MAP.put("yo", "Fáìlì"); DATA_MAP.put("fy", "Ofbyld"); DATA_MAP.put("an", "Imachen"); @@ -130,8 +131,8 @@ DATA_MAP.put("mn", "Файл"); DATA_MAP.put("arz", "ملف"); DATA_MAP.put("mzn", "پرونده"); - DATA_MAP.put("si", "ගොනුව"); DATA_MAP.put("pa", "ਤਸਵੀਰ"); + DATA_MAP.put("si", "ගොනුව"); DATA_MAP.put("zh-min-nan", "文件"); DATA_MAP.put("yi", "טעקע"); DATA_MAP.put("sah", "Билэ"); @@ -204,8 +205,8 @@ DATA_MAP.put("nov", "File"); DATA_MAP.put("szl", "Plik"); DATA_MAP.put("ang", "Biliþ"); - DATA_MAP.put("nv", "Eʼelyaaígíí"); DATA_MAP.put("ie", "File"); + DATA_MAP.put("nv", "Eʼelyaaígíí"); DATA_MAP.put("ace", "Beureukaih"); DATA_MAP.put("ext", "File"); DATA_MAP.put("frp", "Fichiér"); @@ -256,8 +257,8 @@ DATA_MAP.put("cu", "Дѣло"); DATA_MAP.put("tn", "File"); DATA_MAP.put("chr", "File"); - DATA_MAP.put("roa-rup", "File"); DATA_MAP.put("tw", "File"); + DATA_MAP.put("roa-rup", "File"); DATA_MAP.put("bi", "File"); DATA_MAP.put("pih", "File"); DATA_MAP.put("sm", "File"); @@ -311,4 +312,7 @@ } return DATA_MAP.get("en"); } + + private FileAliasData() { + } } \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/staticdata/MainPageNameData.java b/wikipedia/src/main/java/org/wikipedia/staticdata/MainPageNameData.java index 97c999c..5e59c84 100644 --- a/wikipedia/src/main/java/org/wikipedia/staticdata/MainPageNameData.java +++ b/wikipedia/src/main/java/org/wikipedia/staticdata/MainPageNameData.java @@ -5,13 +5,14 @@ import java.util.*; -public class MainPageNameData { +public final class MainPageNameData { private static HashMap<String, String> DATA_MAP; + @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"}) private static void setupData() { - final int SIZE = 287; - DATA_MAP = new HashMap<String, String>(SIZE); + final int size = 287; + DATA_MAP = new HashMap<String, String>(size); DATA_MAP.put("en", "Main Page"); DATA_MAP.put("nl", "Hoofdpagina"); DATA_MAP.put("de", "Wikipedia:Hauptseite"); @@ -44,8 +45,8 @@ DATA_MAP.put("min", "Laman Utamo"); DATA_MAP.put("kk", "Басты бет"); DATA_MAP.put("eo", "Project:Ĉefpaĝo"); - DATA_MAP.put("sk", "Hlavná stránka"); DATA_MAP.put("sh", "Glavna stranica / Главна страница"); + DATA_MAP.put("sk", "Hlavná stránka"); DATA_MAP.put("da", "Forside"); DATA_MAP.put("eu", "Azala"); DATA_MAP.put("lt", "Pagrindinis puslapis"); @@ -96,8 +97,8 @@ DATA_MAP.put("my", "ဗဟိုစာမျက်နှာ"); DATA_MAP.put("zh-yue", "頭版"); DATA_MAP.put("ga", "Príomhleathanach"); - DATA_MAP.put("lmo", "Pagina principala"); DATA_MAP.put("bn", "প্রধান পাতা"); + DATA_MAP.put("lmo", "Pagina principala"); DATA_MAP.put("yo", "Ojúewé Àkọ́kọ́"); DATA_MAP.put("fy", "Haadside"); DATA_MAP.put("an", "Portalada"); @@ -130,8 +131,8 @@ DATA_MAP.put("mn", "Нүүр хуудас"); DATA_MAP.put("arz", "الصفحه الرئيسيه"); DATA_MAP.put("mzn", "گت صفحه"); - DATA_MAP.put("si", "මුල් පිටුව"); DATA_MAP.put("pa", "ਮੁੱਖ ਸਫ਼ਾ"); + DATA_MAP.put("si", "මුල් පිටුව"); DATA_MAP.put("zh-min-nan", "Thâu-ia̍h"); DATA_MAP.put("yi", "הויפט זייט"); DATA_MAP.put("sah", "Сүрүн сирэй"); @@ -204,8 +205,8 @@ DATA_MAP.put("nov", "Chefi pagine"); DATA_MAP.put("szl", "Przodńo zajta"); DATA_MAP.put("ang", "Hēafodtramet"); - DATA_MAP.put("nv", "Íiyisíí Naaltsoos"); DATA_MAP.put("ie", "Principal págine"); + DATA_MAP.put("nv", "Íiyisíí Naaltsoos"); DATA_MAP.put("ace", "Ôn Keuë"); DATA_MAP.put("ext", "Página prencipal"); DATA_MAP.put("frp", "Reçua"); @@ -256,8 +257,8 @@ DATA_MAP.put("cu", "главьна страница"); DATA_MAP.put("tn", "Main Page"); DATA_MAP.put("chr", "ᎤᎵᎮᎵᏍᏗ"); - DATA_MAP.put("roa-rup", "Prota frãndzã"); DATA_MAP.put("tw", "Main Page"); + DATA_MAP.put("roa-rup", "Prota frãndzã"); DATA_MAP.put("bi", "Nambawan Pej"); DATA_MAP.put("pih", "Mien Paij"); DATA_MAP.put("sm", "Itūlau Muamua"); @@ -311,4 +312,7 @@ } return DATA_MAP.get("en"); } + + private MainPageNameData() { + } } \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java b/wikipedia/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java index ad27139..e266633 100644 --- a/wikipedia/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java +++ b/wikipedia/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java @@ -5,13 +5,14 @@ import java.util.*; -public class SpecialAliasData { +public final class SpecialAliasData { private static HashMap<String, String> DATA_MAP; + @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"}) private static void setupData() { - final int SIZE = 287; - DATA_MAP = new HashMap<String, String>(SIZE); + final int size = 287; + DATA_MAP = new HashMap<String, String>(size); DATA_MAP.put("en", "Special"); DATA_MAP.put("nl", "Speciaal"); DATA_MAP.put("de", "Spezial"); @@ -44,8 +45,8 @@ DATA_MAP.put("min", "Istimewa"); DATA_MAP.put("kk", "Арнайы"); DATA_MAP.put("eo", "Specialaĵo"); - DATA_MAP.put("sk", "Špeciálne"); DATA_MAP.put("sh", "Posebno"); + DATA_MAP.put("sk", "Špeciálne"); DATA_MAP.put("da", "Speciel"); DATA_MAP.put("eu", "Berezi"); DATA_MAP.put("lt", "Specialus"); @@ -96,8 +97,8 @@ DATA_MAP.put("my", "Special"); DATA_MAP.put("zh-yue", "Special"); DATA_MAP.put("ga", "Speisialta"); - DATA_MAP.put("lmo", "Special"); DATA_MAP.put("bn", "বিশেষ"); + DATA_MAP.put("lmo", "Special"); DATA_MAP.put("yo", "Pàtàkì"); DATA_MAP.put("fy", "Wiki"); DATA_MAP.put("an", "Especial"); @@ -130,8 +131,8 @@ DATA_MAP.put("mn", "Тусгай"); DATA_MAP.put("arz", "خاص"); DATA_MAP.put("mzn", "شا"); - DATA_MAP.put("si", "විශේෂ"); DATA_MAP.put("pa", "ਖ਼ਾਸ"); + DATA_MAP.put("si", "විශේෂ"); DATA_MAP.put("zh-min-nan", "特殊"); DATA_MAP.put("yi", "באַזונדער"); DATA_MAP.put("sah", "Аналлаах"); @@ -204,8 +205,8 @@ DATA_MAP.put("nov", "Special"); DATA_MAP.put("szl", "Szpecyjalna"); DATA_MAP.put("ang", "Syndrig"); - DATA_MAP.put("nv", "Special"); DATA_MAP.put("ie", "Special"); + DATA_MAP.put("nv", "Special"); DATA_MAP.put("ace", "Kusuih"); DATA_MAP.put("ext", "Special"); DATA_MAP.put("frp", "Spèciâl"); @@ -256,8 +257,8 @@ DATA_MAP.put("cu", "Нарочьна"); DATA_MAP.put("tn", "Special"); DATA_MAP.put("chr", "Special"); - DATA_MAP.put("roa-rup", "Special"); DATA_MAP.put("tw", "Special"); + DATA_MAP.put("roa-rup", "Special"); DATA_MAP.put("bi", "Special"); DATA_MAP.put("pih", "Special"); DATA_MAP.put("sm", "Special"); @@ -311,4 +312,7 @@ } return DATA_MAP.get("en"); } + + private SpecialAliasData() { + } } \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java b/wikipedia/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java index fb45e10..77ef138 100644 --- a/wikipedia/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java +++ b/wikipedia/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java @@ -9,9 +9,7 @@ import org.wikipedia.WikipediaApp; public class ThemeChooserDialog extends Dialog { - - WikipediaApp app; - + private WikipediaApp app; private Button buttonDefaultTextSize; private Button buttonDecreaseTextSize; private Button buttonIncreaseTextSize; -- To view, visit https://gerrit.wikimedia.org/r/146686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedd809c857ebb6e49e1169ee25adfcfc3a2c9e62 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND <bsitzm...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits