From c9fe1adb77e4849990c59abf2e01b6107e2d1fad Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 11 Jul 2019 10:36:59 +0200 Subject: [PATCH] Add a debug button to test crash of the app --- .../im/vector/riotx/features/debug/DebugMenuActivity.kt | 5 +++++ vector/src/debug/res/layout/activity_debug_menu.xml | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/vector/src/debug/java/im/vector/riotx/features/debug/DebugMenuActivity.kt b/vector/src/debug/java/im/vector/riotx/features/debug/DebugMenuActivity.kt index dc81d566..30b01aa9 100644 --- a/vector/src/debug/java/im/vector/riotx/features/debug/DebugMenuActivity.kt +++ b/vector/src/debug/java/im/vector/riotx/features/debug/DebugMenuActivity.kt @@ -133,5 +133,10 @@ class DebugMenuActivity : VectorBaseActivity() { startActivity(Intent(this, DebugMaterialThemeDarkActivity::class.java)) } + @OnClick(R.id.debug_test_crash) + fun testCrash() { + throw RuntimeException("Application crashed from user demand") + } + } diff --git a/vector/src/debug/res/layout/activity_debug_menu.xml b/vector/src/debug/res/layout/activity_debug_menu.xml index af5362e8..a0acfe99 100644 --- a/vector/src/debug/res/layout/activity_debug_menu.xml +++ b/vector/src/debug/res/layout/activity_debug_menu.xml @@ -47,6 +47,13 @@ android:layout_height="wrap_content" android:text="Test Material theme Dark" /> + +