Skip to content

AbstractAppFragment里面的getCurrentState函数逻辑是不是有点问题 #271

@hucaser

Description

@hucaser

在包org.qii.weiciyuan.ui.interfaces中的AbstractAppFragment类里面有一个getCurrentState函数,这个函数的逻辑是不是写的有点问题?函数代码如下

protected int getCurrentState(Bundle savedInstanceState) {
        if (savedInstanceState != null) {
            isFirstTimeStartFlag = false;
            return ACTIVITY_DESTROY_AND_CREATE;
        }

        if (!isFirstTimeStartFlag) {
            return SCREEN_ROTATE;
        }

        isFirstTimeStartFlag = false;
        return FIRST_TIME_START;
    }

savedInstanceState不为空就直接断定为ACTIVITY_DESTROY_AND_CREATE,感觉不对啊!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions