public int tether(String iface) {
try {
return mService.tether(iface);
} catch (RemoteException e) {
return TETHER_ERROR_SERVICE_UNAVAIL;
}
}
此方法只返回一个mService对象,该对象是IConnectivityMananger接口对象。 tether()方法在此接口中声明。但是,ConnectivityManager不实现IConnectivityManager接口。所以必须有一个实现此tether()方法的类,但我无法找到这样的类。欢迎提供这方面的任何帮助
答案 0 :(得分:0)
IConnectivityManager
是一个远程接口。它在IConnectivityManager.aidl
中定义。 tether()
方法是远程接口的一部分。调用mService.tether()
时,会调用连接管理器服务(在远程进程中运行)中的远程方法。