Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on About #39

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
import me.henneke.wearauthn.BuildConfig
import me.henneke.wearauthn.LogLevel
import me.henneke.wearauthn.Logging
import me.henneke.wearauthn.R
Expand Down Expand Up @@ -123,6 +124,10 @@ class AuthenticatorMainMenu : PreferenceFragment(), CoroutineScope, Logging {
findPreference(getString(R.string.preference_single_factor_mode_key)) as SwitchPreference
manageCredentialsPreference =
findPreference(getString(R.string.preference_credential_management_key))
with(findPreference(getString(R.string.preference_about_key))) {
intent = Intent(context, AboutActivity::class.java)
intent.`package` = BuildConfig.APPLICATION_ID
}
supportPreference = findPreference(getString(R.string.preference_support_key))
}

Expand Down
8 changes: 1 addition & 7 deletions authenticator/src/main/res/xml/preferences_authenticator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@
android:key="@string/preference_about_key"
android:order="@integer/order_device_list_about"
android:persistent="false"
android:title="@string/preference_about_title">
<!-- Inspection is unhappy about the package, but it's required for the intent to work -->
<!--suppress AndroidDomInspection -->
<intent
android:targetClass="me.henneke.wearauthn.ui.main.AboutActivity"
android:targetPackage="me.henneke.wearauthn.authenticator" />
</Preference>
android:title="@string/preference_about_title" />

<Preference
android:icon="@drawable/ic_launcher_outline"
Expand Down
Loading