Android: Look at all the conditionals you'll save
This commit is contained in:
parent
632a5eb065
commit
def787b829
|
@ -379,38 +379,16 @@ public class MainActivity extends AppCompatActivity implements
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
InputFragment fragment = (InputFragment) getSupportFragmentManager()
|
|
||||||
.findFragmentByTag("INPUT_FRAG");
|
|
||||||
if (fragment != null && fragment.isVisible()) {
|
|
||||||
if (fragment.moga != null) {
|
|
||||||
fragment.moga.onPause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
InputFragment fragment = (InputFragment) getSupportFragmentManager()
|
|
||||||
.findFragmentByTag("INPUT_FRAG");
|
|
||||||
if (fragment != null && fragment.isVisible()) {
|
|
||||||
if (fragment.moga != null) {
|
|
||||||
fragment.moga.onDestroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.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()
|
CloudFragment cloudfragment = (CloudFragment) getSupportFragmentManager()
|
||||||
.findFragmentByTag("CLOUD_FRAG");
|
.findFragmentByTag("CLOUD_FRAG");
|
||||||
if (cloudfragment != null && cloudfragment.isVisible()) {
|
if (cloudfragment != null && cloudfragment.isVisible()) {
|
||||||
|
|
Loading…
Reference in New Issue