Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions android/app/src/main/java/com/openipc/decoder/MenuManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down
Loading