Fixed
Status Update
Comments
ki...@google.com <ki...@google.com>
te...@google.com <te...@google.com> #2
Seems that this issue will never be fixed as google has marked the multiple duplicates as `wont fix`.
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #3
Adding the following block in Support4Demos.onCreate:
ViewCompat.addOnUnhandledKeyEventListener(getListView(),
new ViewCompat.OnUnhandledKeyEventListenerCompat() {
@Override
public boolean onUnhandledKeyEvent(View v, KeyEvent event) {
return false;
}
});
produces:
04-28 17:40:41.523 4608-4608/com.example.android.supportv4 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
04-28 17:40:41.524 4608-4608/com.example.android.supportv4 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
on a Nexus 6 API 23 emulator before the CL, and no such message with the CL
Description
Component used: AppCompat Version used: appcompat-1.2.0 Devices/Android versions reproduced on: Oreo, API level 26 & 27
To reproduce:
This arises from the fact that
AppCompatTextView.setCustomActionModeCallback
accepts nullables, but internally calls toTextViewCompat.wrapCustomSelectionActionModeCallback
, which requires a non-null callback.Offending lines:
To fix this, the OreoCallback wrapping should be skipped if the callback is null.