Use context.getString() shorthand instead of context.getResources().getString()
This commit is contained in:
parent
8e32e7a4b4
commit
4360c1b873
@ -141,11 +141,11 @@ public final class PlayerHelper {
|
||||
@ResizeMode final int resizeMode) {
|
||||
switch (resizeMode) {
|
||||
case AspectRatioFrameLayout.RESIZE_MODE_FIT:
|
||||
return context.getResources().getString(R.string.resize_fit);
|
||||
return context.getString(R.string.resize_fit);
|
||||
case AspectRatioFrameLayout.RESIZE_MODE_FILL:
|
||||
return context.getResources().getString(R.string.resize_fill);
|
||||
return context.getString(R.string.resize_fill);
|
||||
case AspectRatioFrameLayout.RESIZE_MODE_ZOOM:
|
||||
return context.getResources().getString(R.string.resize_zoom);
|
||||
return context.getString(R.string.resize_zoom);
|
||||
case AspectRatioFrameLayout.RESIZE_MODE_FIXED_HEIGHT:
|
||||
case AspectRatioFrameLayout.RESIZE_MODE_FIXED_WIDTH:
|
||||
default:
|
||||
|
||||
@ -194,9 +194,9 @@ public final class Localization {
|
||||
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
|
||||
return "";
|
||||
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
||||
return context.getResources().getString(R.string.infinite_videos);
|
||||
return context.getString(R.string.infinite_videos);
|
||||
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
||||
return context.getResources().getString(R.string.more_than_100_videos);
|
||||
return context.getString(R.string.more_than_100_videos);
|
||||
default:
|
||||
return getQuantity(context, R.plurals.videos, R.string.no_videos, streamCount,
|
||||
localizeNumber(streamCount));
|
||||
@ -209,9 +209,9 @@ public final class Localization {
|
||||
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
|
||||
return "";
|
||||
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
||||
return context.getResources().getString(R.string.infinite_videos_mini);
|
||||
return context.getString(R.string.infinite_videos_mini);
|
||||
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
||||
return context.getResources().getString(R.string.more_than_100_videos_mini);
|
||||
return context.getString(R.string.more_than_100_videos_mini);
|
||||
default:
|
||||
return String.valueOf(streamCount);
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ public final class ThemeHelper {
|
||||
|
||||
private static String getSelectedThemeKey(final Context context) {
|
||||
final String themeKey = context.getString(R.string.theme_key);
|
||||
final String defaultTheme = context.getResources().getString(R.string.default_theme_value);
|
||||
final String defaultTheme = context.getString(R.string.default_theme_value);
|
||||
return PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getString(themeKey, defaultTheme);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user