Android: Look at all the conditionals you'll save

This commit is contained in:
Ender's Games 2018-08-17 00:27:07 -04:00
parent 632a5eb065
commit def787b829
1 changed files with 0 additions and 22 deletions

View File

@ -379,38 +379,16 @@ public class MainActivity extends AppCompatActivity implements
@Override
protected void onPause() {
super.onPause();
InputFragment fragment = (InputFragment) getSupportFragmentManager()
.findFragmentByTag("INPUT_FRAG");
if (fragment != null && fragment.isVisible()) {
if (fragment.moga != null) {
fragment.moga.onPause();
}
}
}
@Override
protected void onDestroy() {
InputFragment fragment = (InputFragment) getSupportFragmentManager()
.findFragmentByTag("INPUT_FRAG");
if (fragment != null && fragment.isVisible()) {
if (fragment.moga != null) {
fragment.moga.onDestroy();
}
}
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
InputFragment fragment = (InputFragment) getSupportFragmentManager()
.findFragmentByTag("INPUT_FRAG");
if (fragment != null && fragment.isVisible()) {
if (fragment.moga != null) {
fragment.moga.onResume();
}
}
CloudFragment cloudfragment = (CloudFragment) getSupportFragmentManager()
.findFragmentByTag("CLOUD_FRAG");
if (cloudfragment != null && cloudfragment.isVisible()) {