diff --git a/system/vold/G3Dev.cpp b/system/vold/G3Dev.cpp
2 index 6a7fb87..568a93b 100755
3 --- a/system/vold/G3Dev.cpp
4 +++ b/system/vold/G3Dev.cpp
5 @@ -58,6 +58,8 @@ G3Dev::~G3Dev() {
6
7 int G3Dev::handleUsbEvent(NetlinkEvent *evt) {
8 const char *devtype = evt->findParam("DEVTYPE");
9 + if(devtype==NULL)
10 + return 0;
11 if( strcmp(devtype, "usb_device") )
12 return 0;
13 pid_t status ;
2 index 6a7fb87..568a93b 100755
3 --- a/system/vold/G3Dev.cpp
4 +++ b/system/vold/G3Dev.cpp
5 @@ -58,6 +58,8 @@ G3Dev::~G3Dev() {
6
7 int G3Dev::handleUsbEvent(NetlinkEvent *evt) {
8 const char *devtype = evt->findParam("DEVTYPE");
9 + if(devtype==NULL)
10 + return 0;
11 if( strcmp(devtype, "usb_device") )
12 return 0;
13 pid_t status ;
G3Dev USB事件处理
本文介绍了G3Dev类中处理USB设备事件的方法。重点分析了如何通过NetlinkEvent对象获取设备类型,并针对usb_device类型的事件进行特定处理。

712

被折叠的 条评论
为什么被折叠?



