diff --git a/doric-android/devkit/src/main/java/pub/doric/devkit/util/SimulatorUtil.java b/doric-android/devkit/src/main/java/pub/doric/devkit/util/SimulatorUtil.java index 72a63e0c..672f878c 100644 --- a/doric-android/devkit/src/main/java/pub/doric/devkit/util/SimulatorUtil.java +++ b/doric-android/devkit/src/main/java/pub/doric/devkit/util/SimulatorUtil.java @@ -30,11 +30,16 @@ import java.io.InputStreamReader; public class SimulatorUtil { public static boolean isSimulator(Context context) { - return notHasBlueTooth() - || notHasLightSensorManager(context) - || isFeatures() - || checkIsNotRealPhone() - || checkPipes(); + try { + return notHasBlueTooth() + || notHasLightSensorManager(context) + || isFeatures() + || checkIsNotRealPhone() + || checkPipes(); + } catch (Throwable e) { + e.printStackTrace(); + return false; + } } private static boolean notHasBlueTooth() {