From 6d47a5f1c76f3724b6dccaf71b672f57308f5012 Mon Sep 17 00:00:00 2001 From: taeyoung Date: Mon, 28 Nov 2016 11:14:00 +0900 Subject: [PATCH] usb: do not start/stop operations with emulator environtment - Emulator does not support mtp, rndis, and so on. And sdbd should not be stopped in emulator. Thus all operation start/stop routine need to be skipped with emulator environtment. Change-Id: Ia23842a880f7c4e2ca529929b28040780ce48b8d Signed-off-by: taeyoung --- src/usb/usb-operation.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/usb/usb-operation.c b/src/usb/usb-operation.c index 403de8b..1bc8efc 100644 --- a/src/usb/usb-operation.c +++ b/src/usb/usb-operation.c @@ -101,10 +101,14 @@ static int usb_execute_operation(unsigned int mode, operation_e type) int usb_operation_start(unsigned int mode) { + if (is_emulator()) + return 0; return usb_execute_operation(mode, OPERATION_START); } int usb_operation_stop(unsigned int mode) { + if (is_emulator()) + return 0; return usb_execute_operation(mode, OPERATION_STOP); } -- 2.7.4