mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
Don't start service, if we are closing for some reason
This commit is contained in:
@@ -379,7 +379,11 @@ public class XashActivity extends Activity {
|
||||
{
|
||||
Log.v( TAG, "Everything is OK. Launching engine..." );
|
||||
|
||||
setupEnvironment();
|
||||
if( !setupEnvironment() )
|
||||
{
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
InstallReceiver.extractPAK( this, false );
|
||||
|
||||
// Set up the surface
|
||||
@@ -449,7 +453,7 @@ public class XashActivity extends Activity {
|
||||
mEngineReady = true;
|
||||
}
|
||||
|
||||
private void setupEnvironment()
|
||||
private boolean setupEnvironment()
|
||||
{
|
||||
Intent intent = getIntent();
|
||||
final String enginedir = getFilesDir().getParentFile().getPath() + "/lib";
|
||||
@@ -473,7 +477,7 @@ public class XashActivity extends Activity {
|
||||
CertCheck.dumbCertificateCheck( getContext(), allowed, null, true ) )
|
||||
{
|
||||
finish();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +514,8 @@ public class XashActivity extends Activity {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static native int nativeInit( Object arguments );
|
||||
|
||||
Reference in New Issue
Block a user