OSDN Git Service

Only register key types with uinput that we can actually map
authorAndre Eisenbach <eisenbach@google.com>
Mon, 11 May 2015 18:49:59 +0000 (11:49 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 11 May 2015 18:49:59 +0000 (11:49 -0700)
Bug: 20641307
Change-Id: I40cb1e22c35963429481a2cc9da897b5b2f554fe

btif/src/btif_rc.c

index 07e0c2c..1d3e12b 100644 (file)
@@ -304,9 +304,6 @@ int uinput_create(char *name)
     for (x = 0; key_map[x].name != NULL; x++)
         ioctl(fd, UI_SET_KEYBIT, key_map[x].mapped_id);
 
-    for(x = 0; x < KEY_MAX; x++)
-        ioctl(fd, UI_SET_KEYBIT, x);
-
     if (ioctl(fd, UI_DEV_CREATE, NULL) < 0) {
         BTIF_TRACE_ERROR("%s Unable to create uinput device", __FUNCTION__);
         close(fd);