mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 15:19:09 +00:00
[Android] Simplify onAttach for CPUSettingsFragment and VideoSettingsFragment
This commit is contained in:
parent
76f20cca59
commit
4a863c88b4
2 changed files with 4 additions and 20 deletions
|
@ -57,17 +57,9 @@ public final class CPUSettingsFragment extends PreferenceFragment
|
||||||
{
|
{
|
||||||
super.onAttach(activity);
|
super.onAttach(activity);
|
||||||
|
|
||||||
// This makes sure that the container activity has implemented
|
// Cache the activity instance.
|
||||||
// the callback interface. If not, it throws an exception
|
|
||||||
try
|
|
||||||
{
|
|
||||||
m_activity = activity;
|
m_activity = activity;
|
||||||
}
|
}
|
||||||
catch (ClassCastException e)
|
|
||||||
{
|
|
||||||
throw new ClassCastException(activity.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy()
|
public void onDestroy()
|
||||||
|
|
|
@ -202,17 +202,9 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||||
{
|
{
|
||||||
super.onAttach(activity);
|
super.onAttach(activity);
|
||||||
|
|
||||||
// This makes sure that the container activity has implemented
|
// Cache the activity instance.
|
||||||
// the callback interface. If not, it throws an exception
|
|
||||||
try
|
|
||||||
{
|
|
||||||
m_activity = activity;
|
m_activity = activity;
|
||||||
}
|
}
|
||||||
catch (ClassCastException e)
|
|
||||||
{
|
|
||||||
throw new ClassCastException(activity.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy()
|
public void onDestroy()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue