@@ -35,8 +35,8 @@ public ConfirmRunnableViewHolder(View itemView, SettingsAdapter adapter, Context
@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingDescription = (TextView) root.findViewById(R.id.text_setting_description);
mTextSettingName = root.findViewById(R.id.text_setting_name);
mTextSettingDescription = root.findViewById(R.id.text_setting_description);
}

@Override
@@ -78,9 +78,7 @@ public void onClick(View clicked)
mView.getActivity().finish();
})
.setNegativeButton("No", (dialog, whichButton) ->
{
dialog.dismiss();
});
dialog.dismiss());

builder.show();
}
@@ -8,7 +8,6 @@
import org.dolphinemu.dolphinemu.features.settings.model.view.FilePicker;
import org.dolphinemu.dolphinemu.features.settings.model.view.SettingsItem;
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter;
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
import org.dolphinemu.dolphinemu.ui.main.MainPresenter;

public final class FilePickerViewHolder extends SettingViewHolder
@@ -27,8 +26,8 @@ public FilePickerViewHolder(View itemView, SettingsAdapter adapter)
@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingDescription = (TextView) root.findViewById(R.id.text_setting_description);
mTextSettingName = root.findViewById(R.id.text_setting_name);
mTextSettingDescription = root.findViewById(R.id.text_setting_description);
}

@Override
@@ -20,7 +20,7 @@ public HeaderViewHolder(View itemView, SettingsAdapter adapter)
@Override
protected void findViews(View root)
{
mHeaderName = (TextView) root.findViewById(R.id.text_header_name);
mHeaderName = root.findViewById(R.id.text_header_name);
}

@Override
@@ -34,4 +34,4 @@ public void onClick(View clicked)
{
// no-op
}
}
}
@@ -30,8 +30,8 @@ public RumbleBindingViewHolder(View itemView, SettingsAdapter adapter, Context c
@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingDescription = (TextView) root.findViewById(R.id.text_setting_description);
mTextSettingName = root.findViewById(R.id.text_setting_name);
mTextSettingDescription = root.findViewById(R.id.text_setting_description);
}

@Override
@@ -26,8 +26,8 @@ public SingleChoiceViewHolder(View itemView, SettingsAdapter adapter)
@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingDescription = (TextView) root.findViewById(R.id.text_setting_description);
mTextSettingName = root.findViewById(R.id.text_setting_name);
mTextSettingDescription = root.findViewById(R.id.text_setting_description);
}

@Override
@@ -1,5 +1,6 @@
package org.dolphinemu.dolphinemu.features.settings.ui.viewholder;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

@@ -10,21 +11,25 @@

public final class SliderViewHolder extends SettingViewHolder
{
private Context mContext;

private SliderSetting mItem;

private TextView mTextSettingName;
private TextView mTextSettingDescription;

public SliderViewHolder(View itemView, SettingsAdapter adapter)
public SliderViewHolder(View itemView, SettingsAdapter adapter, Context context)
{
super(itemView, adapter);

mContext = context;
}

@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingDescription = (TextView) root.findViewById(R.id.text_setting_description);
mTextSettingName = root.findViewById(R.id.text_setting_name);
mTextSettingDescription = root.findViewById(R.id.text_setting_description);
}

@Override
@@ -40,7 +45,9 @@ public void bind(SettingsItem item)
}
else
{
mTextSettingDescription.setText(mItem.getSelectedValue() + mItem.getUnits());
mTextSettingDescription.setText(mContext
.getString(R.string.slider_setting_value, mItem.getSelectedValue(),
mItem.getUnits()));
}
}

@@ -22,7 +22,7 @@ public SubmenuViewHolder(View itemView, SettingsAdapter adapter)
@Override
protected void findViews(View root)
{
mTextSettingName = (TextView) root.findViewById(R.id.text_setting_name);
mTextSettingName = root.findViewById(R.id.text_setting_name);
}

@Override
@@ -432,10 +432,8 @@ public static void saveFile(final String fileName, TreeMap<String, SettingSectio
{
File ini = getSettingsFile(fileName);

PrintWriter writer = null;
try
try (PrintWriter writer = new PrintWriter(ini, "UTF-8"))
{
writer = new PrintWriter(ini, "UTF-8");

Set<String> keySet = sections.keySet();
Set<String> sortedKeySet = new TreeSet<>(keySet);
@@ -459,13 +457,6 @@ public static void saveFile(final String fileName, TreeMap<String, SettingSectio
if (view != null)
view.showToastMessage("Error saving " + fileName + ".ini: " + e.getMessage());
}
finally
{
if (writer != null)
{
writer.close();
}
}
}

public static void saveCustomGameSettings(final String gameId,
@@ -534,14 +525,14 @@ private static void saveCustomWiimoteSetting(final String gameId, final String k
DirectoryInitialization.copyFile(defautlWiiProfilePath, wiiConfigPath);

NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, "Device",
"Android/" + (Integer.valueOf(padId) + 4) + "/Touchscreen");
"Android/" + (Integer.parseInt(padId) + 4) + "/Touchscreen");
}

NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, key, value);

// Enable the profile
NativeLibrary.SetUserSetting(gameId, Settings.SECTION_CONTROLS,
KEY_WIIMOTE_PROFILE + (Integer.valueOf(padId) + 1), profile);
KEY_WIIMOTE_PROFILE + (Integer.parseInt(padId) + 1), profile);
}

private static String mapSectionNameFromIni(String generalSectionName)
@@ -6,6 +6,7 @@
import android.os.Bundle;
import android.preference.PreferenceManager;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;

@@ -54,7 +55,7 @@ public static EmulationFragment newInstance(String[] gamePaths)
}

@Override
public void onAttach(Context context)
public void onAttach(@NonNull Context context)
{
super.onAttach(context);

@@ -213,7 +214,7 @@ public void resetInputOverlay()
}

@Override
public void surfaceCreated(SurfaceHolder holder)
public void surfaceCreated(@NonNull SurfaceHolder holder)
{
// We purposely don't do anything here.
// All work is done in surfaceChanged, which we are guaranteed to get even for surface creation.
@@ -227,7 +228,7 @@ public void surfaceChanged(SurfaceHolder holder, int format, int width, int heig
}

@Override
public void surfaceDestroyed(SurfaceHolder holder)
public void surfaceDestroyed(@NonNull SurfaceHolder holder)
{
mEmulationState.clearSurface();
}
@@ -447,7 +448,10 @@ private static void deleteFile(String path)
try
{
File file = new File(path);
file.delete();
if (!file.delete())
{
Log.error("[EmulationFragment] Failed to delete " + file.getAbsolutePath());
}
}
catch (Exception ignored)
{
@@ -2,7 +2,6 @@

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.util.SparseIntArray;
@@ -58,13 +57,12 @@ public static MenuFragment newInstance(String title)
return fragment;
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.fragment_ingame_menu, container, false);

LinearLayout options = (LinearLayout) rootView.findViewById(R.id.layout_options);
LinearLayout options = rootView.findViewById(R.id.layout_options);

mPauseEmulation = options.findViewById(R.id.menu_pause_emulation);
mUnpauseEmulation = options.findViewById(R.id.menu_unpause_emulation);
@@ -80,13 +80,12 @@ public void onCreate(@Nullable Bundle savedInstanceState)
mSaveOrLoad = (SaveOrLoad) getArguments().getSerializable(KEY_SAVEORLOAD);
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.fragment_saveload_state, container, false);

GridLayout grid = (GridLayout) rootView.findViewById(R.id.grid_state_slots);
GridLayout grid = rootView.findViewById(R.id.grid_state_slots);
for (int childIndex = 0; childIndex < grid.getChildCount(); childIndex++)
{
Button button = (Button) grid.getChildAt(childIndex);
@@ -1,7 +1,6 @@
package org.dolphinemu.dolphinemu.model;

import android.content.Context;
import android.os.Environment;

public class GameFile
{
@@ -33,6 +33,12 @@ public static void addGameFolder(String path, Context context)
{
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
Set<String> folderPaths = preferences.getStringSet(GAME_FOLDER_PATHS_PREFERENCE, EMPTY_SET);

if (folderPaths == null)
{
return;
}

Set<String> newFolderPaths = new HashSet<>(folderPaths);
newFolderPaths.add(path);
SharedPreferences.Editor editor = preferences.edit();
@@ -44,6 +50,12 @@ private void removeNonExistentGameFolders(Context context)
{
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
Set<String> folderPaths = preferences.getStringSet(GAME_FOLDER_PATHS_PREFERENCE, EMPTY_SET);

if (folderPaths == null)
{
return;
}

Set<String> newFolderPaths = new HashSet<>();
for (String folderPath : folderPaths)
{
@@ -78,7 +90,13 @@ public boolean scanLibrary(Context context)

SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
Set<String> folderPathsSet = preferences.getStringSet(GAME_FOLDER_PATHS_PREFERENCE, EMPTY_SET);
String[] folderPaths = folderPathsSet.toArray(new String[folderPathsSet.size()]);

if (folderPathsSet == null)
{
return false;
}

String[] folderPaths = folderPathsSet.toArray(new String[0]);

boolean cacheChanged = update(folderPaths, recursiveScan);
cacheChanged |= updateAdditionalMetadata();
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -1075,14 +1075,13 @@ private static InputOverlayDrawableJoystick initializeOverlayJoystick(Context co
// Decide inner scale based on joystick ID
float innerScale;

switch (joystick)
if (joystick == ButtonType.STICK_C)
{
case ButtonType.STICK_C:
innerScale = 1.833f;
break;
default:
innerScale = 1.375f;
break;
innerScale = 1.833f;
}
else
{
innerScale = 1.375f;
}

// Now set the bounds for the InputOverlayDrawableJoystick.
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -70,7 +70,7 @@ public int getTrackId()
return mTrackId;
}

public boolean onConfigureTouch(MotionEvent event)
public void onConfigureTouch(MotionEvent event)
{
int pointerIndex = event.getActionIndex();
int fingerPositionX = (int) event.getX(pointerIndex);
@@ -89,9 +89,7 @@ public boolean onConfigureTouch(MotionEvent event)
mPreviousTouchX = fingerPositionX;
mPreviousTouchY = fingerPositionY;
break;

}
return true;
}

public void setPosition(int x, int y)
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2016 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -148,7 +148,7 @@ public int getTrackId()
return mTrackId;
}

public boolean onConfigureTouch(MotionEvent event)
public void onConfigureTouch(MotionEvent event)
{
int pointerIndex = event.getActionIndex();
int fingerPositionX = (int) event.getX(pointerIndex);
@@ -167,9 +167,7 @@ public boolean onConfigureTouch(MotionEvent event)
mPreviousTouchX = fingerPositionX;
mPreviousTouchY = fingerPositionY;
break;

}
return true;
}

public void setPosition(int x, int y)
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -165,7 +165,7 @@ public boolean TrackEvent(MotionEvent event)
return pressed;
}

public boolean onConfigureTouch(MotionEvent event)
public void onConfigureTouch(MotionEvent event)
{
int pointerIndex = event.getActionIndex();
int fingerPositionX = (int) event.getX(pointerIndex);
@@ -195,7 +195,6 @@ public boolean onConfigureTouch(MotionEvent event)
mPreviousTouchY = fingerPositionY;
break;
}
return true;
}


@@ -49,8 +49,8 @@ public InputOverlayPointer(Context context, int button)
Integer x = outMetrics.widthPixels;

// Adjusting for device's black bars.
Float deviceAR = (float) x / y;
Float gameAR = NativeLibrary.GetGameAspectRatio();
float deviceAR = (float) x / y;
float gameAR = NativeLibrary.GetGameAspectRatio();
aspectAdjusted = gameAR / deviceAR;

if (gameAR <= deviceAR) // Black bars on left/right
@@ -73,7 +73,7 @@ public InputOverlayPointer(Context context, int button)
}
}

public boolean onTouch(MotionEvent event)
public void onTouch(MotionEvent event)
{
int pointerIndex = event.getActionIndex();

@@ -92,7 +92,7 @@ public boolean onTouch(MotionEvent event)
}

if (trackId == -1)
return false;
return;

int x = (int) event.getX(event.findPointerIndex(trackId));
int y = (int) event.getY(event.findPointerIndex(trackId));
@@ -106,7 +106,6 @@ public boolean onTouch(MotionEvent event)
axes[0] = ((y * aspectAdjusted) - maxHeight) / maxHeight;
axes[1] = (x - maxWidth) / maxWidth;
}
return false;
}

private void touchPress()
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -53,7 +53,7 @@ public CustomTitleView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
View root = LayoutInflater.from(context).inflate(R.layout.tv_title, this);
mTitleView = (TextView) root.findViewById(R.id.title);
mTitleView = root.findViewById(R.id.title);
mBadgeView = root.findViewById(R.id.badge);
}

@@ -109,6 +109,10 @@ protected void onStart()
protected void onStop()
{
super.onStop();
if (isChangingConfigurations())
{
skipRescanningLibrary();
}
StartupHandler.setSessionTime(this);
}

@@ -174,36 +178,34 @@ public void launchInstallWAD()
protected void onActivityResult(int requestCode, int resultCode, Intent result)
{
super.onActivityResult(requestCode, resultCode, result);
switch (requestCode)

// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_DIRECTORY:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
switch (requestCode)
{
case MainPresenter.REQUEST_DIRECTORY:
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedPath(result));
}
break;
break;

case MainPresenter.REQUEST_GAME_FILE:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_GAME_FILE:
EmulationActivity.launchFile(this, FileBrowserHelper.getSelectedFiles(result));
}
break;
break;

case MainPresenter.REQUEST_WAD_FILE:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_WAD_FILE:
mPresenter.installWAD(FileBrowserHelper.getSelectedPath(result));
}
break;
break;
}
}
else
{
skipRescanningLibrary();
}
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults)
{
if (requestCode == PermissionsHandler.REQUEST_CODE_WRITE_PERMISSION)
{
@@ -43,8 +43,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView

private BrowseSupportFragment mBrowseFragment;

private ArrayObjectAdapter mRowsAdapter;

@Override
protected void onCreate(Bundle savedInstanceState)
{
@@ -95,6 +93,10 @@ protected void onStart()
protected void onStop()
{
super.onStop();
if (isChangingConfigurations())
{
skipRescanningLibrary();
}
StartupHandler.setSessionTime(this);
}

@@ -187,61 +189,57 @@ public void showGames()
protected void onActivityResult(int requestCode, int resultCode, Intent result)
{
super.onActivityResult(requestCode, resultCode, result);
switch (requestCode)

// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_DIRECTORY:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
switch (requestCode)
{
case MainPresenter.REQUEST_DIRECTORY:
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedPath(result));
}
break;
break;

case MainPresenter.REQUEST_GAME_FILE:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_GAME_FILE:
EmulationActivity.launchFile(this, FileBrowserHelper.getSelectedFiles(result));
}
break;
break;

case MainPresenter.REQUEST_WAD_FILE:
// If the user picked a file, as opposed to just backing out.
if (resultCode == MainActivity.RESULT_OK)
{
case MainPresenter.REQUEST_WAD_FILE:
mPresenter.installWAD(FileBrowserHelper.getSelectedPath(result));
}
break;
break;
}
}
else
{
skipRescanningLibrary();
}
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults)
{
switch (requestCode)
if (requestCode == PermissionsHandler.REQUEST_CODE_WRITE_PERMISSION)
{
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
{
DirectoryInitialization.start(this);
GameFileCacheService.startLoad(this);
}
else
{
Toast.makeText(this, R.string.write_permission_needed, Toast.LENGTH_SHORT)
.show();
}
}
else
{
case PermissionsHandler.REQUEST_CODE_WRITE_PERMISSION:
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
{
DirectoryInitialization.start(this);
GameFileCacheService.startLoad(this);
}
else
{
Toast.makeText(this, R.string.write_permission_needed, Toast.LENGTH_SHORT)
.show();
}
break;
default:
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
break;
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}

private void buildRowsAdapter()
{
mRowsAdapter = new ArrayObjectAdapter(new ListRowPresenter());
ArrayObjectAdapter rowsAdapter = new ArrayObjectAdapter(new ListRowPresenter());

if (PermissionsHandler.hasWriteAccess(this))
{
@@ -255,13 +253,13 @@ private void buildRowsAdapter()
// Add row to the adapter only if it is not empty.
if (row != null)
{
mRowsAdapter.add(row);
rowsAdapter.add(row);
}
}

mRowsAdapter.add(buildSettingsRow());
rowsAdapter.add(buildSettingsRow());

mBrowseFragment.setAdapter(mRowsAdapter);
mBrowseFragment.setAdapter(rowsAdapter);
}

private ListRow buildGamesRow(Platform platform, Collection<GameFile> gameFiles)
@@ -2,7 +2,7 @@

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -50,7 +50,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
}

@Override
public void onViewCreated(View view, Bundle savedInstanceState)
public void onViewCreated(@NonNull View view, Bundle savedInstanceState)
{
int columns = getResources().getInteger(R.integer.game_grid_columns);
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getActivity(), columns);
@@ -88,6 +88,6 @@ public void showGames()

private void findViews(View root)
{
mRecyclerView = (RecyclerView) root.findViewById(R.id.grid_games);
mRecyclerView = root.findViewById(R.id.grid_games);
}
}
@@ -80,7 +80,7 @@ private static String extractGameId(Uri uri)

private static long extractLong(Uri uri, int index)
{
return Long.valueOf(extract(uri, index));
return Long.parseLong(extract(uri, index));
}

private static String extract(Uri uri, int index)
@@ -6,8 +6,8 @@
public class BiMap<K, V>
{

private Map<K, V> forward = new HashMap<K, V>();
private Map<V, K> backward = new HashMap<V, K>();
private Map<K, V> forward = new HashMap<>();
private Map<V, K> backward = new HashMap<>();

public synchronized void add(K key, V value)
{
@@ -24,4 +24,4 @@ public synchronized K getBackward(V key)
{
return backward.get(key);
}
}
}
@@ -8,10 +8,9 @@

public final class CoverHelper
{
private static String baseUrl = "https://art.gametdb.com/wii/cover/%s/%s.png";

public static String buildGameTDBUrl(GameFile game, String region)
{
String baseUrl = "https://art.gametdb.com/wii/cover/%s/%s.png";
return String.format(baseUrl, region, game.getGameTdbId());
}

@@ -1,4 +1,4 @@
/**
/*
* Copyright 2014 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -267,12 +267,23 @@ private static void copyAssetFolder(String assetFolder, File outputFolder, Boole

try
{
String[] assetList = context.getAssets().list(assetFolder);

if (assetList == null)
{
return;
}

boolean createdFolder = false;
for (String file : context.getAssets().list(assetFolder))
for (String file : assetList)
{
if (!createdFolder)
{
outputFolder.mkdir();
if (!outputFolder.mkdir())
{
Log.error("[DirectoryInitialization] Failed to create folder " +
outputFolder.getAbsolutePath());
}
createdFolder = true;
}
copyAssetFolder(assetFolder + File.separator + file, new File(outputFolder, file),
@@ -317,7 +328,10 @@ private static void createWiimoteProfileDirectory(String directory)
File wiiPath = new File(directory);
if (!wiiPath.isDirectory())
{
wiiPath.mkdirs();
if (!wiiPath.mkdirs())
{
Log.error("[DirectoryInitialization] Failed to create folder " + wiiPath.getAbsolutePath());
}
}
}

@@ -1,4 +1,4 @@
/**
/*
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
@@ -223,22 +223,22 @@ public EGLSurface getSurface()
}

// Detects the specific kind of GL modes that are supported
private boolean detect()
private void detect()
{
// Get total number of configs available.
int[] numConfigs = new int[1];
if (!mEGL.eglGetConfigs(mDisplay, null, 0, numConfigs))
{
Log.error("[EGLHelper] Error retrieving number of EGL configs available.");
return false;
return;
}

// Now get all the configurations
mEGLConfigs = new EGLConfig[numConfigs[0]];
if (!mEGL.eglGetConfigs(mDisplay, mEGLConfigs, mEGLConfigs.length, numConfigs))
{
Log.error("[EGLHelper] Error retrieving all EGL configs.");
return false;
return;
}

for (EGLConfig mEGLConfig : mEGLConfigs)
@@ -258,8 +258,6 @@ private boolean detect()
supportGLES3 = true;
}
}

return true;
}

// Creates the context and surface.
@@ -77,7 +77,7 @@ public static void checkSessionReset(Context context)
if (currentTime > (lastOpen + SESSION_TIMEOUT))
{
new AfterDirectoryInitializationRunner().run(context,
() -> NativeLibrary.ReportStartToAnalytics());
NativeLibrary::ReportStartToAnalytics);
}
}
}
@@ -123,11 +123,10 @@ public static Uri getUriToResource(Context context, @AnyRes int resId)
throws Resources.NotFoundException
{
Resources res = context.getResources();
Uri resUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE +
return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE +
"://" + res.getResourcePackageName(resId)
+ '/' + res.getResourceTypeName(resId)
+ '/' + res.getResourceEntryName(resId));
return resUri;
}

/**
@@ -255,9 +254,7 @@ private static int getJobIdForChannelId(long channelId)
*/
public static List<HomeScreenChannel> createUniversalSubscriptions()
{
//Leaving the subs local variable in case more channels are created other than platforms.
List<HomeScreenChannel> subs = new ArrayList<>(createPlatformSubscriptions());
return subs;
return new ArrayList<>(createPlatformSubscriptions());
}

private static List<HomeScreenChannel> createPlatformSubscriptions()
@@ -391,6 +391,7 @@
<string name="pitch">Total Pitch</string>
<string name="yaw">Total Yaw</string>
<string name="vertical_offset">Vertical Offset</string>
<string name="slider_setting_value">%1$d%2$s</string>
<string name="disc_number">Disc %1$d</string>
<string name="disabled_gc_overlay_notice">GameCube Controller 1 is set to \"None\"</string>