public boolean isDestroyedCompatible() {
if (Build.VERSION.SDK_INT >= 17) {
return isDestroyedCompatible17();
} else {//destroyed 为activity中的记录属性,在onDestroy中设置为true。
return destroyed || super.isFinishing();
}
}
@TargetApi(17)
private boolean isDestroyedCompatible17() {
return super.isDestroyed();
}
转载于:https://my.oschina.net/shenwenze/blog/653529