0
我不明白ITelephony.aidl如何定义或使用。ITelephony.aidl无法正常工作
例如,以下路径下将其设置为ITelephony.aidl:
让我在下面的代码中的错误:
TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
Method m = null;
try {
Class c = Class.forName(tm.getClass().getName());
m = c.getDeclaredMethod("getITelephony");
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
m.setAccessible(true);
ITelephony telephonyService;
的抱怨是解决不了符号'ITelephony'
但是,将ITelephony.aidl重命名为Itelephonyjava似乎解决了编译错误,但是d实际上没有提供必要的功能。
我在这里做错了什么?