在遇到类似于这个问题的问题时,我开始想知道为什么我们setIntent在重写时明确地必须调用onNewIntent,以及为什么这个代码不会被执行super.onNewIntent.
@Override
public void onNewIntent(Intent intent)
{
super.onNewIntent(intent);
// Why isn't this performed by the framework in the line above?
setIntent(intent);
}
Run Code Online (Sandbox Code Playgroud)