Don't start service, if we are closing for some reason
This commit is contained in:
parent
37a4c921a6
commit
2eb6fbbc42
1 changed files with 9 additions and 3 deletions
|
@ -379,7 +379,11 @@ public class XashActivity extends Activity {
|
||||||
{
|
{
|
||||||
Log.v( TAG, "Everything is OK. Launching engine..." );
|
Log.v( TAG, "Everything is OK. Launching engine..." );
|
||||||
|
|
||||||
setupEnvironment();
|
if( !setupEnvironment() )
|
||||||
|
{
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
InstallReceiver.extractPAK( this, false );
|
InstallReceiver.extractPAK( this, false );
|
||||||
|
|
||||||
// Set up the surface
|
// Set up the surface
|
||||||
|
@ -449,7 +453,7 @@ public class XashActivity extends Activity {
|
||||||
mEngineReady = true;
|
mEngineReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupEnvironment()
|
private boolean setupEnvironment()
|
||||||
{
|
{
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
final String enginedir = getFilesDir().getParentFile().getPath() + "/lib";
|
final String enginedir = getFilesDir().getParentFile().getPath() + "/lib";
|
||||||
|
@ -473,7 +477,7 @@ public class XashActivity extends Activity {
|
||||||
CertCheck.dumbCertificateCheck( getContext(), allowed, null, true ) )
|
CertCheck.dumbCertificateCheck( getContext(), allowed, null, true ) )
|
||||||
{
|
{
|
||||||
finish();
|
finish();
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,6 +514,8 @@ public class XashActivity extends Activity {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static native int nativeInit( Object arguments );
|
public static native int nativeInit( Object arguments );
|
||||||
|
|
Loading…
Add table
Reference in a new issue