From 656ce4afb239a58097bc639697427bb9f1d2f3ee Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Wed, 11 Jul 2018 12:41:00 -0500 Subject: [PATCH] Terminate Intro and License activities when starting the following activities to avoid memory leaks --- .../cy/agorise/crystalwallet/activities/IntroActivity.java | 4 +--- .../cy/agorise/crystalwallet/activities/LicenseActivity.java | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java index e95513e..d81e79f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java @@ -37,9 +37,6 @@ import cy.agorise.crystalwallet.views.TransactionListView; public class IntroActivity extends AppCompatActivity { - TransactionListViewModel transactionListViewModel; - TransactionListView transactionListView; - @BindView(R.id.surface_view) public SurfaceView mSurfaceView; @@ -96,6 +93,7 @@ public class IntroActivity extends AppCompatActivity { //Intent intent = new Intent(this, CreateSeedActivity.class); Intent intent = new Intent(this, BoardActivity.class); startActivity(intent); + finish(); } /*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext()); diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java index 8964738..fc52b6f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java @@ -37,6 +37,7 @@ public class LicenseActivity extends AppCompatActivity { if ((generalSettingLastLicenseRead != null) && (Integer.parseInt(generalSettingLastLicenseRead.getValue()) >= licenseVersion)) { Intent intent = new Intent(this, IntroActivity.class); startActivity(intent); + finish(); } } @@ -52,6 +53,7 @@ public class LicenseActivity extends AppCompatActivity { Intent intent = new Intent(this, IntroActivity.class); startActivity(intent); + finish(); } @OnClick(R.id.btnDisAgree)