Guard NetworkCapabilities capability 38 via SDK 37 or U Extension 21 Calling addCapability(38) (NET_CAPABILITY_PRIORITIZE_UNIFIED_COMMUNICATIONS) on Android builds without the Mainline backport emits an error-level "addCapability is called with invalid capability: 38" log on API 35/36 and throws IllegalArgumentException on API <= 34. However, gating strictly on Build.VERSION.SDK_INT >= 37 disables Unified Communications slicing on Android 14-16 devices that support capability 38 via Mainline (U Extensions >= 21). Add isUnifiedCommunicationsSupported() returning true on SDK >= 37 or SDK >= UPSIDE_DOWN_CAKE with SdkExtensions.getExtensionVersion(UPSIDE_DOWN_CAKE) >= 21, make createUnifiedCommunicationsNetworkRequest() @Nullable (returning null instead of a wildcard new NetworkRequest.Builder().build() that registers a duplicate callback), skip registerNetworkCallback() when null, and keep getNetworkSlice() unguarded by SDK version with an explicit null check on capabilities. Bug: webrtc:466507512 Change-Id: I8098913647515b5921c77b917cd8e1120ae3aca2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/520841 Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Sameer Vijaykar <samvi@google.com> Reviewed-by: Denise Tell <dct@google.com> Commit-Queue: William Miranda <willmiranda@google.com> Cr-Commit-Position: refs/heads/main@{#49510}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.