[英]Android telecom Connection private function (supportedAudioRoutes)
Why google dont provide this function for normal use (android.telecom.Connection)?为什么google不提供这个功能供正常使用(android.telecom.Connection)?
I need this function for disable bluetooth selection for my call.我需要这个功能来为我的通话禁用蓝牙选择。 I think that in java we can use reflection for get this function, but im using Xamarin and its impossivel using reflection我认为在java中我们可以使用反射来获取这个功能,但我使用Xamarin和它使用反射的impossivel
/**
* Sets the supported audio routes.
*
* @param supportedAudioRoutes the supported audio routes as a bitmask.
* See {@link CallAudioState}
* @hide
*/
public final void setSupportedAudioRoutes(int supportedAudioRoutes) {
if ((supportedAudioRoutes
& (CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_SPEAKER)) == 0) {
throw new IllegalArgumentException(
"supported audio routes must include either speaker or earpiece");
}
if (mSupportedAudioRoutes != supportedAudioRoutes) {
mSupportedAudioRoutes = supportedAudioRoutes;
for (Listener l : mListeners) {
l.onSupportedAudioRoutesChanged(this, mSupportedAudioRoutes);
}
}
}
The answer ist simple and easy.答案很简单。 You are not supposed to use it.你不应该使用它。
Please read the specification and understand that Represents does not mean Controls .请阅读规范并理解Represents并不意味着Controls 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.