aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorpacien2018-08-06 13:29:22 +0200
committerpacien2018-08-06 13:29:22 +0200
commita99bf101c39eac02bf8464f1926d13ae21ab10d7 (patch)
tree32fbc10381fb0364c22215be0b35cbd5d69c4d65 /app/src
parent51c7b7cb443da7fa7dd1314881f309eea4aa7d10 (diff)
downloadtincapp-a99bf101c39eac02bf8464f1926d13ae21ab10d7.tar.gz
Display crash notice correctly
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt3
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt1
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/StatusActivity.kt1
3 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt
index 3d59cc0..4dc2381 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt
@@ -42,7 +42,6 @@ abstract class BaseActivity : AppCompatActivity() {
42 override fun onCreate(savedInstanceState: Bundle?) { 42 override fun onCreate(savedInstanceState: Bundle?) {
43 super.onCreate(savedInstanceState) 43 super.onCreate(savedInstanceState)
44 setContentView(R.layout.base) 44 setContentView(R.layout.base)
45 handleRecentCrash()
46 } 45 }
47 46
48 override fun onCreateOptionsMenu(m: Menu): Boolean { 47 override fun onCreateOptionsMenu(m: Menu): Boolean {
@@ -86,7 +85,7 @@ abstract class BaseActivity : AppCompatActivity() {
86 if (active) super.runOnUiThread(action) 85 if (active) super.runOnUiThread(action)
87 } 86 }
88 87
89 private fun handleRecentCrash() { 88 fun handleRecentCrash() {
90 if (!CrashRecorder.hasPreviouslyCrashed()) return 89 if (!CrashRecorder.hasPreviouslyCrashed()) return
91 CrashRecorder.dismissPreviousCrash() 90 CrashRecorder.dismissPreviousCrash()
92 91
diff --git a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
index 2faf3a6..1e267d6 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
@@ -166,6 +166,7 @@ class StartActivity : BaseActivity() {
166 super.onResume() 166 super.onResume()
167 if (TincVpnService.isConnected()) openStatusActivity(false) 167 if (TincVpnService.isConnected()) openStatusActivity(false)
168 broadcastMapper.register() 168 broadcastMapper.register()
169 handleRecentCrash()
169 } 170 }
170 171
171 override fun onPause() { 172 override fun onPause() {
diff --git a/app/src/main/java/org/pacien/tincapp/activities/StatusActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StatusActivity.kt
index a4b36dc..68e008e 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/StatusActivity.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/StatusActivity.kt
@@ -101,6 +101,7 @@ class StatusActivity : BaseActivity(), AdapterView.OnItemClickListener, SwipeRef
101 super.onResume() 101 super.onResume()
102 broadcastMapper.register() 102 broadcastMapper.register()
103 updateView() 103 updateView()
104 handleRecentCrash()
104 } 105 }
105 106
106 override fun onPause() { 107 override fun onPause() {