mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix Autofill setting
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:label="@string/menu_about" />
|
android:label="@string/menu_about" />
|
||||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsActivity" />
|
<activity android:name="com.kunzisoft.keepass.settings.SettingsActivity" />
|
||||||
<activity android:name="com.kunzisoft.keepass.autofill.AutoFillLauncherActivity"
|
<activity android:name="com.kunzisoft.keepass.autofill.AutofillLauncherActivity"
|
||||||
android:configChanges="orientation|keyboardHidden" />
|
android:configChanges="orientation|keyboardHidden" />
|
||||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" />
|
<activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" />
|
||||||
<activity android:name="com.kunzisoft.keepass.magikeyboard.KeyboardLauncherActivity"
|
<activity android:name="com.kunzisoft.keepass.magikeyboard.KeyboardLauncherActivity"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
|||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
class AutoFillLauncherActivity : AppCompatActivity() {
|
class AutofillLauncherActivity : AppCompatActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// Pass extra for Autofill (EXTRA_ASSIST_STRUCTURE)
|
// Pass extra for Autofill (EXTRA_ASSIST_STRUCTURE)
|
||||||
@@ -61,7 +61,7 @@ class AutoFillLauncherActivity : AppCompatActivity() {
|
|||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
fun getAuthIntentSenderForResponse(context: Context): IntentSender {
|
fun getAuthIntentSenderForResponse(context: Context): IntentSender {
|
||||||
val intent = Intent(context, AutoFillLauncherActivity::class.java)
|
val intent = Intent(context, AutofillLauncherActivity::class.java)
|
||||||
return PendingIntent.getActivity(context, 0,
|
return PendingIntent.getActivity(context, 0,
|
||||||
intent, PendingIntent.FLAG_CANCEL_CURRENT).intentSender
|
intent, PendingIntent.FLAG_CANCEL_CURRENT).intentSender
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ class KeeAutofillService : AutofillService() {
|
|||||||
if (listOf(*autofillIds).isNotEmpty()) {
|
if (listOf(*autofillIds).isNotEmpty()) {
|
||||||
// If the entire Autofill Response is authenticated, AuthActivity is used
|
// If the entire Autofill Response is authenticated, AuthActivity is used
|
||||||
// to generate Response.
|
// to generate Response.
|
||||||
val sender = AutoFillLauncherActivity.getAuthIntentSenderForResponse(this)
|
val sender = AutofillLauncherActivity.getAuthIntentSenderForResponse(this)
|
||||||
val presentation = RemoteViews(packageName, R.layout.autofill_service_unlock)
|
val presentation = RemoteViews(packageName, R.layout.autofill_service_unlock)
|
||||||
responseBuilder.setAuthentication(autofillIds, sender, presentation)
|
responseBuilder.setAuthentication(autofillIds, sender, presentation)
|
||||||
callback.onSuccess(responseBuilder.build())
|
callback.onSuccess(responseBuilder.build())
|
||||||
|
|||||||
@@ -19,10 +19,16 @@
|
|||||||
*/
|
*/
|
||||||
package com.kunzisoft.keepass.settings
|
package com.kunzisoft.keepass.settings
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
import android.support.v4.app.Fragment
|
import android.support.v4.app.Fragment
|
||||||
|
|
||||||
class SettingsAutofillActivity : SettingsActivity() {
|
class SettingsAutofillActivity : SettingsActivity() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
timeoutEnable = false
|
||||||
|
}
|
||||||
|
|
||||||
override fun retrieveMainFragment(): Fragment {
|
override fun retrieveMainFragment(): Fragment {
|
||||||
return NestedSettingsFragment.newInstance(NestedSettingsFragment.Screen.FORM_FILLING)
|
return NestedSettingsFragment.newInstance(NestedSettingsFragment.Screen.FORM_FILLING)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Attributes for the AutoFill service that tell the framework what will act as the Autofill service's
|
Attributes for the Autofill service that tell the framework what will act as the Autofill service's
|
||||||
Settings Activity. This is pointed to in the service's meta-data in the application's manifest.
|
Settings Activity. This is pointed to in the service's meta-data in the application's manifest.
|
||||||
-->
|
-->
|
||||||
<autofill-service xmlns:android="http://schemas.android.com/apk/res/android"
|
<autofill-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
|||||||
Reference in New Issue
Block a user