Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java |
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java |
index 63eb13be309b624c564bd4d955fac72a93ebdacd..420633d422fd3e7937c601f5c81e43751a941e00 100644 |
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java |
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java |
@@ -28,25 +28,23 @@ public final class WebRtcAudioUtils { |
// the low latency output mode in combination with OpenSL ES. |
// The device name is given by Build.MODEL. |
private static final String[] BLACKLISTED_OPEN_SL_ES_MODELS = new String[] { |
- // This list is currently empty ;-) |
+ // This list is currently empty ;-) |
}; |
// List of devices where it has been verified that the built-in effect |
// bad and where it makes sense to avoid using it and instead rely on the |
// native WebRTC version instead. The device name is given by Build.MODEL. |
private static final String[] BLACKLISTED_AEC_MODELS = new String[] { |
- "D6503", // Sony Xperia Z2 D6503 |
- "ONE A2005", // OnePlus 2 |
- "MotoG3", // Moto G (3rd Generation) |
+ "D6503", // Sony Xperia Z2 D6503 |
+ "ONE A2005", // OnePlus 2 |
+ "MotoG3", // Moto G (3rd Generation) |
}; |
private static final String[] BLACKLISTED_AGC_MODELS = new String[] { |
- "Nexus 10", |
- "Nexus 9", |
+ "Nexus 10", "Nexus 9", |
}; |
private static final String[] BLACKLISTED_NS_MODELS = new String[] { |
- "Nexus 10", |
- "Nexus 9", |
- "ONE A2005", // OnePlus 2 |
+ "Nexus 10", "Nexus 9", |
+ "ONE A2005", // OnePlus 2 |
}; |
// Use 16kHz as the default sample rate. A higher sample rate might prevent |
@@ -63,16 +61,13 @@ public final class WebRtcAudioUtils { |
// Call these methods if any hardware based effect shall be replaced by a |
// software based version provided by the WebRTC stack instead. |
- public static synchronized void setWebRtcBasedAcousticEchoCanceler( |
- boolean enable) { |
+ public static synchronized void setWebRtcBasedAcousticEchoCanceler(boolean enable) { |
useWebRtcBasedAcousticEchoCanceler = enable; |
} |
- public static synchronized void setWebRtcBasedAutomaticGainControl( |
- boolean enable) { |
+ public static synchronized void setWebRtcBasedAutomaticGainControl(boolean enable) { |
useWebRtcBasedAutomaticGainControl = enable; |
} |
- public static synchronized void setWebRtcBasedNoiseSuppressor( |
- boolean enable) { |
+ public static synchronized void setWebRtcBasedNoiseSuppressor(boolean enable) { |
useWebRtcBasedNoiseSuppressor = enable; |
} |
@@ -171,41 +166,37 @@ public final class WebRtcAudioUtils { |
// Helper method for building a string of thread information. |
public static String getThreadInfo() { |
- return "@[name=" + Thread.currentThread().getName() |
- + ", id=" + Thread.currentThread().getId() + "]"; |
+ return "@[name=" + Thread.currentThread().getName() + ", id=" + Thread.currentThread().getId() |
+ + "]"; |
} |
// Returns true if we're running on emulator. |
public static boolean runningOnEmulator() { |
- return Build.HARDWARE.equals("goldfish") && |
- Build.BRAND.startsWith("generic_"); |
+ return Build.HARDWARE.equals("goldfish") && Build.BRAND.startsWith("generic_"); |
} |
// Returns true if the device is blacklisted for OpenSL ES usage. |
public static boolean deviceIsBlacklistedForOpenSLESUsage() { |
- List<String> blackListedModels = |
- Arrays.asList(BLACKLISTED_OPEN_SL_ES_MODELS); |
+ List<String> blackListedModels = Arrays.asList(BLACKLISTED_OPEN_SL_ES_MODELS); |
return blackListedModels.contains(Build.MODEL); |
} |
// Information about the current build, taken from system properties. |
public static void logDeviceInfo(String tag) { |
Logging.d(tag, "Android SDK: " + Build.VERSION.SDK_INT + ", " |
- + "Release: " + Build.VERSION.RELEASE + ", " |
- + "Brand: " + Build.BRAND + ", " |
- + "Device: " + Build.DEVICE + ", " |
- + "Id: " + Build.ID + ", " |
- + "Hardware: " + Build.HARDWARE + ", " |
- + "Manufacturer: " + Build.MANUFACTURER + ", " |
- + "Model: " + Build.MODEL + ", " |
- + "Product: " + Build.PRODUCT); |
+ + "Release: " + Build.VERSION.RELEASE + ", " |
+ + "Brand: " + Build.BRAND + ", " |
+ + "Device: " + Build.DEVICE + ", " |
+ + "Id: " + Build.ID + ", " |
+ + "Hardware: " + Build.HARDWARE + ", " |
+ + "Manufacturer: " + Build.MANUFACTURER + ", " |
+ + "Model: " + Build.MODEL + ", " |
+ + "Product: " + Build.PRODUCT); |
} |
// Checks if the process has as specified permission or not. |
public static boolean hasPermission(Context context, String permission) { |
- return context.checkPermission( |
- permission, |
- Process.myPid(), |
- Process.myUid()) == PackageManager.PERMISSION_GRANTED; |
- } |
+ return context.checkPermission(permission, Process.myPid(), Process.myUid()) |
+ == PackageManager.PERMISSION_GRANTED; |
+ } |
} |