From dca2ade8a058f06b5b5df9edbfef4fcd7613a723 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 10:51:32 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20WebUI=20=E2=80=94=20the=20keyboard?= =?UTF-8?q?=20shows=20for=20text=20fields=20of=20the=20camera's=20page=20(?= =?UTF-8?q?#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/openipc/decoder/MenuManager.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/app/src/main/java/com/openipc/decoder/MenuManager.java b/android/app/src/main/java/com/openipc/decoder/MenuManager.java index 2b5df23e..767e72ec 100644 --- a/android/app/src/main/java/com/openipc/decoder/MenuManager.java +++ b/android/app/src/main/java/com/openipc/decoder/MenuManager.java @@ -530,6 +530,18 @@ public void onReceivedHttpAuthRequest( }); mBrowserDialog = dialog; dialog.show(); + // AlertDialog marks its window "no input method" when its content has no EditText, + // and a WebView is not one: text fields of the camera's page then got no keyboard + // (#120). Clear that, and let the page take the focus for its fields + android.view.Window w = dialog.getWindow(); + if (w != null) { + w.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE + | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); + w.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); + } + view.setFocusable(true); + view.setFocusableInTouchMode(true); + view.requestFocus(View.FOCUS_DOWN); view.loadUrl(scheme + "://" + link); } From e818661ee8f682fe59575e0f20ea6f6c0f24caa5 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 12:13:24 +0000 Subject: [PATCH 2/2] test: tamper the sealed value for sure (the test failed when it already ended in 00) --- .../test/java/com/openipc/decoder/CredentialStoreTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/app/src/test/java/com/openipc/decoder/CredentialStoreTest.java b/android/app/src/test/java/com/openipc/decoder/CredentialStoreTest.java index 308a418f..aa16e328 100644 --- a/android/app/src/test/java/com/openipc/decoder/CredentialStoreTest.java +++ b/android/app/src/test/java/com/openipc/decoder/CredentialStoreTest.java @@ -83,7 +83,9 @@ public void undecryptableValueBecomesAnEmptySlot() throws Exception { // Another key (e.g. data restored on another device) assertNull(new CredentialStore(new TestCipher()).open(sealed)); // Tampered or truncated data - assertNull(store.open(sealed.substring(0, sealed.length() - 2) + "00")); + // Change the last two characters for sure: "00" could be the original ones (1 in 256) + String tail = sealed.endsWith("00") ? "ff" : "00"; + assertNull(store.open(sealed.substring(0, sealed.length() - 2) + tail)); assertNull(store.open(CredentialStore.PREFIX + "zz")); assertNull(store.open(CredentialStore.PREFIX + "abc")); }