Fixed
Status Update
Comments
je...@google.com <je...@google.com>
au...@google.com <au...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Seems that this issue will never be fixed as google has marked the multiple duplicates as `wont fix`.
jb...@google.com <jb...@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
Version used: 1.0.1
Devices/Android versions reproduced on: n/a
Right now, AFAICT, ActivityCompat.requestPermissions() performs no validation on the parameters. Ideally, it would at least check the String[] of permissions to confirm that the elements are sane (i.e., not null, not empty).
Otherwise, failures happen deep in the system. For example, if you pass null in one of the array elements, the eventual NullPointerException actually occurs in com.android.packageinstaller.permission.ui.GrantPermissionsActivity. See
Thanks for considering this!