Loading android/app/src/com/android/bluetooth/Utils.java +12 −4 Original line number Diff line number Diff line Loading @@ -978,6 +978,9 @@ public final class Utils { return (int) (TimeUnit.MILLISECONDS.toMicros(milliseconds) / MICROS_PER_UNIT); } private static boolean sIsInstrumentationTestModeCacheSet = false; private static boolean sInstrumentationTestModeCache = false; /** * Check if we are running in BluetoothInstrumentationTest context by trying to load * com.android.bluetooth.FileSystemWriteTest. If we are not in Instrumentation test mode, this Loading @@ -988,11 +991,16 @@ public final class Utils { * @return true if in BluetoothInstrumentationTest, false otherwise */ public static boolean isInstrumentationTestMode() { if (!sIsInstrumentationTestModeCacheSet) { try { return Class.forName("com.android.bluetooth.FileSystemWriteTest") != null; sInstrumentationTestModeCache = Class.forName("com.android.bluetooth.FileSystemWriteTest") != null; } catch (ClassNotFoundException exception) { return false; sInstrumentationTestModeCache = false; } sIsInstrumentationTestModeCacheSet = true; } return sInstrumentationTestModeCache; } /** Loading Loading
android/app/src/com/android/bluetooth/Utils.java +12 −4 Original line number Diff line number Diff line Loading @@ -978,6 +978,9 @@ public final class Utils { return (int) (TimeUnit.MILLISECONDS.toMicros(milliseconds) / MICROS_PER_UNIT); } private static boolean sIsInstrumentationTestModeCacheSet = false; private static boolean sInstrumentationTestModeCache = false; /** * Check if we are running in BluetoothInstrumentationTest context by trying to load * com.android.bluetooth.FileSystemWriteTest. If we are not in Instrumentation test mode, this Loading @@ -988,11 +991,16 @@ public final class Utils { * @return true if in BluetoothInstrumentationTest, false otherwise */ public static boolean isInstrumentationTestMode() { if (!sIsInstrumentationTestModeCacheSet) { try { return Class.forName("com.android.bluetooth.FileSystemWriteTest") != null; sInstrumentationTestModeCache = Class.forName("com.android.bluetooth.FileSystemWriteTest") != null; } catch (ClassNotFoundException exception) { return false; sInstrumentationTestModeCache = false; } sIsInstrumentationTestModeCacheSet = true; } return sInstrumentationTestModeCache; } /** Loading