Merge "Fix for startup NPE."

This commit is contained in:
Conley Owens
2011-04-27 11:40:46 -07:00
committed by Android Code Review

View File

@@ -128,6 +128,9 @@ class UsbObserver extends UEventObserver {
try {
File[] files = new File(USB_COMPOSITE_CLASS_PATH).listFiles();
if (files == null) {
return; // nothing to do
}
for (int i = 0; i < files.length; i++) {
File file = new File(files[i], "enable");
FileReader reader = new FileReader(file);