From: Soren Stoutner Date: Wed, 30 Nov 2022 18:11:57 +0000 (-0700) Subject: Remove unneeded `onBackPressed`. https://redmine.stoutner.com/issues/934 X-Git-Tag: v1.9~2 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=afa7f1956d0f93ebf10b21583a35cf1eb3422ca5;p=PrivacyCell.git Remove unneeded `onBackPressed`. https://redmine.stoutner.com/issues/934 --- diff --git a/app/src/main/java/com/stoutner/privacycell/activities/SettingsActivity.kt b/app/src/main/java/com/stoutner/privacycell/activities/SettingsActivity.kt index f1923b3..c9fe930 100644 --- a/app/src/main/java/com/stoutner/privacycell/activities/SettingsActivity.kt +++ b/app/src/main/java/com/stoutner/privacycell/activities/SettingsActivity.kt @@ -24,7 +24,6 @@ import android.content.Intent import android.content.pm.PackageManager import android.os.Build import android.os.Bundle -import android.view.MenuItem import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar @@ -83,14 +82,6 @@ class SettingsActivity : AppCompatActivity(), NotificationPermissionDialogListen } } - override fun onOptionsItemSelected(item: MenuItem): Boolean { - // As there is only one option, go back. - onBackPressed() - - // Consume the event. - return true - } - override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { // Run the default commands. super.onRequestPermissionsResult(requestCode, permissions, grantResults)