reset unmount vconfkey when unmount routine failed
[framework/system/system-server.git] / ss_usb_handler.c
index 13b51a0..815aca7 100644 (file)
@@ -1,18 +1,18 @@
 /*
- * Copyright 2012  Samsung Electronics Co., Ltd
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  *
- * Licensed under the Flora License, Version 1.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.tizenopensource.org/license
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 
 #include <pmapi.h>
@@ -20,7 +20,7 @@
 #include <sysman.h>
 
 #include "ss_log.h"
-#include "ss_device_plugin.h"
+#include "device-node.h"
 #include "ss_launch.h"
 #include "include/ss_data.h"
 
@@ -32,13 +32,12 @@ int ss_usb_init()
        int val = -1, i = 0, pid;
 
        PRT_TRACE("check usb connection");
-       if (plugin_intf->OEM_sys_get_jack_usb_online(&val) == 0) {
+       if (device_get_property(DEVICE_TYPE_EXTCON, PROP_EXTCON_USB_ONLINE, &val) == 0) {
                if (val==1) {
                        vconf_set_int(VCONFKEY_SYSMAN_USB_STATUS,
                                        VCONFKEY_SYSMAN_USB_AVAILABLE);
                        while (i < RETRY
-                                       && pm_lock_state(LCD_OFF, STAY_CUR_STATE,
-                                               0) == -1) {
+                                       && pm_lock_state(LCD_OFF, STAY_CUR_STATE, 0) == -1) {
                                i++;
                                sleep(1);
                        }