X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FLogcatActivity.kt;fp=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FLogcatActivity.kt;h=a0e5ad8ab831acbc7785089bf336b9eaf57cad6d;hp=214ebf2149aaa6d9bf931ce3d6bec7f1b256b181;hb=c8b11d2b76391db47bdd6d5289e2668147cf177a;hpb=5641898ccc58ebfb969ffcfcee76c00702051831 diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.kt b/app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.kt index 214ebf21..a0e5ad8a 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.kt @@ -246,7 +246,7 @@ class LogcatActivity : AppCompatActivity() { override fun onOptionsItemSelected(menuItem: MenuItem): Boolean { // Run the commands that correlate to the selected menu item. - return when (menuItem.itemId) { + when (menuItem.itemId) { R.id.search -> { // Search was selected. // Set the minimum height of the search linear layout to match the toolbar. searchLinearLayout.minimumHeight = toolbar.height @@ -273,7 +273,7 @@ class LogcatActivity : AppCompatActivity() { logcatWebView.resumeTimers() // Consume the event. - true + return true } R.id.copy -> { // Copy was selected. @@ -291,7 +291,7 @@ class LogcatActivity : AppCompatActivity() { Snackbar.make(logcatWebView, R.string.logcat_copied, Snackbar.LENGTH_SHORT).show() // Consume the event. - true + return true } R.id.save -> { // Save was selected. @@ -299,7 +299,7 @@ class LogcatActivity : AppCompatActivity() { saveLogcatActivityResultLauncher.launch(getString(R.string.privacy_browser_logcat_txt, BuildConfig.VERSION_NAME)) // Consume the event. - true + return true } R.id.clear -> { // Clear was selected. @@ -317,12 +317,12 @@ class LogcatActivity : AppCompatActivity() { } // Consume the event. - true + return true } - else -> { // The home button was pushed. + else -> { // The home button was selected. // Do not consume the event. The system will process the home command. - super.onOptionsItemSelected(menuItem) + return super.onOptionsItemSelected(menuItem) } } }