public void quit()
{
this.q = true;
if (!this.i.e())
pause();
this.a.a();
try
{
this.a.join(4000L);
}
catch (InterruptedException localInterruptedException)
{
this.a.interrupt();
}
if (this.k != null)
this.m.unregisterReceiver(this.k);
this.k = null;
if (v.c())
removeAllViews();
if (q.e)
q.l.a(this.m);
if (q.d)
q.k.a();
kill();
h();
}
我们看源码可以知道由于unity调用了
protected void kill()
{
/**
* Kill the process with the given PID.
* Note that, though this API allows us to request to
* kill any process based on its PID, the kernel will
* still impose standard restrictions on which PIDs you
* are actually able to kill. Typically this means only
* the process running the caller's packages/application
* and any additional processes created by that app; packages
* sharing a common UID will also be able to kill each
* other's processes.
*/ Process.killProcess(Process.myPid());
}
所以会导致连续结束两个activity的原因,那我们就可以复写调用activity的finish方法,不去调用父类就不会导致一次会finish两次
|
|
|
|
|
|