updated Keyman standard header and added comment to the onWindowFocusChanged

This commit is contained in:
Mengchou97 2026-06-10 13:49:28 +07:00
parent 2c6f211d4c
commit 00e0967fa1
2 changed files with 17 additions and 2 deletions

View file

@ -177,6 +177,17 @@ public class GetStartedActivity extends BaseActivity {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
if (openDefaultKeyboardPickerOnly) {
// When the user taps 'Set Default Keyboard' from the drawer,
// GetStartedActivity is launched in picker-only mode. But you
// can't open the system keyboard picker directly from a menu
// tap it requires a window with focus. So we use
// onWindowFocusChanged as the trigger point: first focus opens
// the picker, and when the user dismisses it and focus returns
// to this activity, we call finish() to close it. The activity
// is essentially just a invisible bridge to show the system
// picker.
if (!didAutoOpenDefaultKeyboardPicker) {
didAutoOpenDefaultKeyboardPicker = true;
InputMethodManager imManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

View file

@ -1,5 +1,9 @@
/**
* Copyright (C) 2017 SIL International. All rights reserved.
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Created by MengchouChey on 2026-06-10
*
* (These are the keys used for KeymanSettingsActivity and KeymanSettingsFragment)
*/
package com.tavultesoft.kmapro;