Merge change 7701
* changes:
Clean up MP3Extractor code and fixes a bug that miscalculated the position of the header by a few bytes whenever we read in more data.
diff --git a/cmds/keystore/keystore_get.h b/cmds/keystore/keystore_get.h
index a7fd9a5..7665e81 100644
--- a/cmds/keystore/keystore_get.h
+++ b/cmds/keystore/keystore_get.h
@@ -29,7 +29,7 @@
* is returned. Otherwise it returns the value in dynamically allocated memory
* and sets the size if the pointer is not NULL. One can release the memory by
* calling free(). */
-static char *keystore_get(char *key, int *size)
+static char *keystore_get(const char *key, int *size)
{
char buffer[MAX_KEY_VALUE_LENGTH];
char *value;
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index 402bce2..59c9476 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -509,6 +509,20 @@
//fprintf(stderr, "could not get device name for %s, %s\n", deviceName, strerror(errno));
name[0] = '\0';
}
+
+ // check to see if the device is on our excluded list
+ List<String8>::iterator iter = mExcludedDevices.begin();
+ List<String8>::iterator end = mExcludedDevices.end();
+ for ( ; iter != end; iter++) {
+ const char* test = *iter;
+ if (strcmp(name, test) == 0) {
+ LOGI("ignoring event id %s driver %s\n", deviceName, test);
+ close(fd);
+ fd = -1;
+ return -1;
+ }
+ }
+
if(ioctl(fd, EVIOCGPHYS(sizeof(location) - 1), &location) < 1) {
//fprintf(stderr, "could not get location for %s, %s\n", deviceName, strerror(errno));
location[0] = '\0';
@@ -518,19 +532,6 @@
idstr[0] = '\0';
}
- // check to see if the device is on our excluded list
- List<String8>::iterator iter = mExcludedDevices.begin();
- List<String8>::iterator end = mExcludedDevices.end();
- for ( ; iter != end; iter++) {
- const char* name = *iter;
- if (strcmp(name, idstr) == 0) {
- LOGD("ignoring event id %s driver %s\n", deviceName, name);
- close(fd);
- fd = -1;
- return -1;
- }
- }
-
int devid = 0;
while (devid < mNumDevicesById) {
if (mDevicesById[devid].device == NULL) {
diff --git a/libs/utils/ZipUtils.cpp b/libs/utils/ZipUtils.cpp
index 5df94cb..9138878 100644
--- a/libs/utils/ZipUtils.cpp
+++ b/libs/utils/ZipUtils.cpp
@@ -210,7 +210,7 @@
LOGV("+++ reading %ld bytes (%ld left)\n",
getSize, compRemaining);
- int cc = fread(readBuf, getSize, 1, fp);
+ int cc = fread(readBuf, 1, getSize, fp);
if (cc != (int) getSize) {
LOGD("inflate read failed (%d vs %ld)\n",
cc, getSize);
@@ -341,4 +341,3 @@
return true;
}
-
diff --git a/opengl/libagl/primitives.cpp b/opengl/libagl/primitives.cpp
index f164c02..769ec40 100644
--- a/opengl/libagl/primitives.cpp
+++ b/opengl/libagl/primitives.cpp
@@ -369,7 +369,7 @@
int32_t c0, int32_t c1, int32_t c2) const
{
int64_t it64[3];
- iterators0032(it, c0, c1, c2);
+ iterators0032(it64, c0, c1, c2);
it[0] = it64[0];
it[1] = it64[1];
it[2] = it64[2];