Commit 4a1fc69e by Lee Munkyeong

Merge branch 'features/abcomm_sp6_42722_android6対応' into 'features/abcomm_sp6'

Android6以下バージョンでのLocale取得対応

See merge request !142
parents bc84c3d7 37e0eb1e
...@@ -1552,7 +1552,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1552,7 +1552,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
public String getLocaleFileName() { public String getLocaleFileName() {
Locale primaryLocale = mContext.getResources().getConfiguration().getLocales().get(0); Locale primaryLocale;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
primaryLocale = mContext.getResources().getConfiguration().getLocales().get(0);
} else {
primaryLocale = mContext.getResources().getConfiguration().locale;
}
String locale = primaryLocale.getDisplayName(); String locale = primaryLocale.getDisplayName();
String localeLanguage = "en"; String localeLanguage = "en";
if (primaryLocale.equals(Locale.JAPAN) || primaryLocale.equals(Locale.JAPANESE)) { if (primaryLocale.equals(Locale.JAPAN) || primaryLocale.equals(Locale.JAPANESE)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment