Terminate Intro and License activities when starting the following activities to avoid memory leaks

This commit is contained in:
Severiano Jaramillo 2018-07-11 12:41:00 -05:00
parent 99a4dc254d
commit 656ce4afb2
2 changed files with 3 additions and 3 deletions

View file

@ -37,9 +37,6 @@ import cy.agorise.crystalwallet.views.TransactionListView;
public class IntroActivity extends AppCompatActivity { public class IntroActivity extends AppCompatActivity {
TransactionListViewModel transactionListViewModel;
TransactionListView transactionListView;
@BindView(R.id.surface_view) @BindView(R.id.surface_view)
public SurfaceView mSurfaceView; public SurfaceView mSurfaceView;
@ -96,6 +93,7 @@ public class IntroActivity extends AppCompatActivity {
//Intent intent = new Intent(this, CreateSeedActivity.class); //Intent intent = new Intent(this, CreateSeedActivity.class);
Intent intent = new Intent(this, BoardActivity.class); Intent intent = new Intent(this, BoardActivity.class);
startActivity(intent); startActivity(intent);
finish();
} }
/*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext()); /*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext());

View file

@ -37,6 +37,7 @@ public class LicenseActivity extends AppCompatActivity {
if ((generalSettingLastLicenseRead != null) && (Integer.parseInt(generalSettingLastLicenseRead.getValue()) >= licenseVersion)) { if ((generalSettingLastLicenseRead != null) && (Integer.parseInt(generalSettingLastLicenseRead.getValue()) >= licenseVersion)) {
Intent intent = new Intent(this, IntroActivity.class); Intent intent = new Intent(this, IntroActivity.class);
startActivity(intent); startActivity(intent);
finish();
} }
} }
@ -52,6 +53,7 @@ public class LicenseActivity extends AppCompatActivity {
Intent intent = new Intent(this, IntroActivity.class); Intent intent = new Intent(this, IntroActivity.class);
startActivity(intent); startActivity(intent);
finish();
} }
@OnClick(R.id.btnDisAgree) @OnClick(R.id.btnDisAgree)