OSDN Git Service

hardware: look in /vendor for default.so
authorColin Cross <ccross@android.com>
Mon, 30 Sep 2013 21:23:01 +0000 (14:23 -0700)
committerColin Cross <ccross@android.com>
Mon, 30 Sep 2013 21:23:01 +0000 (14:23 -0700)
Some vendors have their own HAL modules, which may need their
default implementation stored in /vendor.

Change-Id: I5337a61875023404a85029bbc59b984056b3e441

hardware.c

index 1f831cb..9651f4c 100644 (file)
@@ -154,6 +154,10 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
             if (access(path, R_OK) == 0) break;
         } else {
             snprintf(path, sizeof(path), "%s/%s.default.so",
+                     HAL_LIBRARY_PATH2, name);
+            if (access(path, R_OK) == 0) break;
+
+            snprintf(path, sizeof(path), "%s/%s.default.so",
                      HAL_LIBRARY_PATH1, name);
             if (access(path, R_OK) == 0) break;
         }