Loading src/com/android/settings/password/ChooseLockPassword.java +3 −0 Original line number Diff line number Diff line Loading @@ -954,6 +954,9 @@ public class ChooseLockPassword extends SettingsActivity { return; } ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); mPasswordEntryInputDisabler.setInputEnabled(false); setNextEnabled(false); Loading src/com/android/settings/password/ConfirmDeviceCredentialUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ import android.content.Intent; import android.content.IntentSender; import android.os.RemoteException; import android.os.UserManager; import android.view.View; import android.view.WindowInsets; import android.view.WindowInsetsController; import androidx.annotation.NonNull; import com.android.internal.widget.LockPatternUtils; Loading Loading @@ -67,4 +72,16 @@ public class ConfirmDeviceCredentialUtils { utils.userPresent(userId); } } /** * Request hiding soft-keyboard before animating away credential UI, in case IME * insets animation get delayed by dismissing animation. * @param view used to get root {@link WindowInsets} and {@link WindowInsetsController}. */ public static void hideImeImmediately(@NonNull View view) { if (view.isAttachedToWindow() && view.getRootWindowInsets().isVisible(WindowInsets.Type.ime())) { view.getWindowInsetsController().hide(WindowInsets.Type.ime()); } } } src/com/android/settings/password/ConfirmLockPassword.java +3 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,9 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity { } private void startDisappearAnimation(final Intent intent) { ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); if (mDisappearing) { return; } Loading src/com/android/settings/password/SetupChooseLockPassword.java +2 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import androidx.annotation.Nullable; Loading Loading @@ -121,9 +120,8 @@ public class SetupChooseLockPassword extends ChooseLockPassword { forFace, forBiometrics); InputMethodManager imm = (InputMethodManager) getActivity().getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); dialog.show(getFragmentManager()); return; Loading Loading
src/com/android/settings/password/ChooseLockPassword.java +3 −0 Original line number Diff line number Diff line Loading @@ -954,6 +954,9 @@ public class ChooseLockPassword extends SettingsActivity { return; } ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); mPasswordEntryInputDisabler.setInputEnabled(false); setNextEnabled(false); Loading
src/com/android/settings/password/ConfirmDeviceCredentialUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ import android.content.Intent; import android.content.IntentSender; import android.os.RemoteException; import android.os.UserManager; import android.view.View; import android.view.WindowInsets; import android.view.WindowInsetsController; import androidx.annotation.NonNull; import com.android.internal.widget.LockPatternUtils; Loading Loading @@ -67,4 +72,16 @@ public class ConfirmDeviceCredentialUtils { utils.userPresent(userId); } } /** * Request hiding soft-keyboard before animating away credential UI, in case IME * insets animation get delayed by dismissing animation. * @param view used to get root {@link WindowInsets} and {@link WindowInsetsController}. */ public static void hideImeImmediately(@NonNull View view) { if (view.isAttachedToWindow() && view.getRootWindowInsets().isVisible(WindowInsets.Type.ime())) { view.getWindowInsetsController().hide(WindowInsets.Type.ime()); } } }
src/com/android/settings/password/ConfirmLockPassword.java +3 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,9 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity { } private void startDisappearAnimation(final Intent intent) { ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); if (mDisappearing) { return; } Loading
src/com/android/settings/password/SetupChooseLockPassword.java +2 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import androidx.annotation.Nullable; Loading Loading @@ -121,9 +120,8 @@ public class SetupChooseLockPassword extends ChooseLockPassword { forFace, forBiometrics); InputMethodManager imm = (InputMethodManager) getActivity().getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); ConfirmDeviceCredentialUtils.hideImeImmediately( getActivity().getWindow().getDecorView()); dialog.show(getFragmentManager()); return; Loading