Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59330883 authored by Chris Göllner's avatar Chris Göllner Committed by Android (Google) Code Review
Browse files

Merge "Shortcut Helper - Go to physical keyboard settings when button clicked" into main

parents 759dcd64 333aba77
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -16,8 +16,11 @@

package com.android.systemui.keyboard.shortcut.ui.view

import android.content.ActivityNotFoundException
import android.content.Intent
import android.graphics.Insets
import android.os.Bundle
import android.provider.Settings
import android.view.View
import android.view.WindowInsets
import androidx.activity.BackEventCompat
@@ -83,7 +86,15 @@ constructor(
        }
    }

    private fun onKeyboardSettingsClicked() {}
    private fun onKeyboardSettingsClicked() {
        try {
            startActivity(Intent(Settings.ACTION_HARD_KEYBOARD_SETTINGS))
        } catch (e: ActivityNotFoundException) {
            // From the Settings docs: In some cases, a matching Activity may not exist, so ensure
            // you safeguard against this.
            e.printStackTrace()
        }
    }

    override fun onDestroy() {
        super.onDestroy()