Checking some legacy code I've found this snippet:
@Override
public void onResume() {
if (!isFinishing()) {
...
}
super.onResume();
}
despite the super.onResume()
call at the end of the method, which is discouraged:
Note: Your implementation of these lifecycle methods must always call the superclass implementation before doing any work, as shown in the examples above http://developer.android.com/guide/components/activities.html
I'm concerned about the if (!isFinishing())
call, does this have sense? as I can see checking Activity code mFinished
variable is set to true only on finish()
and finishActivity()
, can, through the Android Lifecycle, to be resumed an activity which is being destroyed?
Thanks in advance.