mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix keyboard entry selection
This commit is contained in:
@@ -38,10 +38,6 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.AboutActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/menu_about" />
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.password.PasswordActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
@@ -100,6 +96,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Main Activity -->
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.GroupActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
@@ -125,6 +122,11 @@
|
||||
android:name="com.kunzisoft.keepass.activities.EntryEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<!-- About and Settings -->
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.AboutActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/menu_about" />
|
||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsActivity" />
|
||||
<activity android:name="com.kunzisoft.keepass.autofill.AutoFillLauncherActivity"
|
||||
android:configChanges="orientation|keyboardHidden" />
|
||||
|
||||
@@ -186,9 +186,8 @@ public class GroupActivity extends LockingActivity
|
||||
public static void launchForKeyboardSelection(Activity activity, PwGroup group, boolean readOnly) {
|
||||
// TODO implement pre search to directly open the direct group
|
||||
TimeoutHelper.INSTANCE.recordTime(activity);
|
||||
buildAndLaunchIntent(activity, group, readOnly, (intent) -> {
|
||||
KeyboardHelper.INSTANCE.startActivityForKeyboardSelection(activity, intent);
|
||||
});
|
||||
buildAndLaunchIntent(activity, group, readOnly,
|
||||
(intent) -> KeyboardHelper.INSTANCE.startActivityForKeyboardSelection(activity, intent));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -206,16 +205,15 @@ public class GroupActivity extends LockingActivity
|
||||
public static void launchForAutofillResult(Activity activity, PwGroup group, @NonNull AssistStructure assistStructure, boolean readOnly) {
|
||||
// TODO implement pre search to directly open the direct group
|
||||
TimeoutHelper.INSTANCE.recordTime(activity);
|
||||
buildAndLaunchIntent(activity, group, readOnly, (intent) -> {
|
||||
AutofillHelper.INSTANCE.startActivityForAutofillResult(activity, intent, assistStructure);
|
||||
});
|
||||
buildAndLaunchIntent(activity, group, readOnly,
|
||||
(intent) -> AutofillHelper.INSTANCE.startActivityForAutofillResult(activity, intent, assistStructure));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if ( isFinishing() ) {
|
||||
if (isFinishing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -510,10 +508,11 @@ public class GroupActivity extends LockingActivity
|
||||
MagikIME.setEntryKey(entry.getEntry());
|
||||
// Show the notification if allowed in Preferences
|
||||
if (PreferencesUtil.enableKeyboardNotificationEntry(GroupActivity.this)) {
|
||||
Intent notificationIntent = new Intent(GroupActivity.this, KeyboardEntryNotificationService.class);
|
||||
startService(notificationIntent);
|
||||
startService(new Intent(
|
||||
GroupActivity.this,
|
||||
KeyboardEntryNotificationService.class));
|
||||
}
|
||||
moveTaskToBack(true);
|
||||
finish();
|
||||
return null;
|
||||
},
|
||||
assistStructure -> {
|
||||
@@ -921,6 +920,7 @@ public class GroupActivity extends LockingActivity
|
||||
KeyboardHelper.INSTANCE.startActivityForKeyboardSelection(
|
||||
GroupActivity.this,
|
||||
searchIntent);
|
||||
finish();
|
||||
return null;
|
||||
},
|
||||
assistStructure -> {
|
||||
|
||||
@@ -261,6 +261,7 @@ public class FileSelectActivity extends StylishActivity implements
|
||||
try {
|
||||
PasswordActivity.launchForKeyboardResult(FileSelectActivity.this,
|
||||
fileName, keyFile);
|
||||
finish();
|
||||
} catch (FileNotFoundException e) {
|
||||
fileNoFoundAction(e);
|
||||
}
|
||||
|
||||
@@ -204,8 +204,12 @@ public class MagikIME extends InputMethodService
|
||||
// TODO Unlock key
|
||||
break;
|
||||
case KEY_ENTRY:
|
||||
deleteEntryKey(this);
|
||||
// Stop current service and reinit entry
|
||||
stopService(new Intent(this, KeyboardEntryNotificationService.class));
|
||||
entryKey = null;
|
||||
Intent intent = new Intent(this, KeyboardLauncherActivity.class);
|
||||
// New task needed because don't launch from an Activity context
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case KEY_LOCK:
|
||||
|
||||
@@ -952,6 +952,8 @@ public class PasswordActivity extends StylishActivity
|
||||
},
|
||||
() -> {
|
||||
GroupActivity.launchForKeyboardSelection(PasswordActivity.this, readOnly);
|
||||
// Do not keep history
|
||||
finish();
|
||||
return null;
|
||||
},
|
||||
assistStructure -> {
|
||||
|
||||
@@ -26,7 +26,7 @@ object EntrySelectionHelper {
|
||||
}
|
||||
if (assistStructure == null) {
|
||||
if (intent.getBooleanExtra(EXTRA_ENTRY_SELECTION_MODE, false)) {
|
||||
intent.putExtra(EXTRA_ENTRY_SELECTION_MODE, false)
|
||||
intent.removeExtra(EXTRA_ENTRY_SELECTION_MODE)
|
||||
keyboardAction.invoke()
|
||||
} else {
|
||||
standardAction.invoke()
|
||||
|
||||
Reference in New Issue
Block a user