yy1717
2020-01-07 03e19b8cdea0ddd28da1a1738c5b62f7f97cd2e0
修改进程间接口,统一为foo(int, string)
7个文件已修改
24 ■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/app.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/aidl/com/anyun/exam/lib/IListenerInterface.aidl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/aidl/com/anyun/exam/lib/IRemoteInterface.aidl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/driver_test.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/java/com/anyun/exam/lib/IAYExamListener.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/java/com/anyun/exam/lib/RemoteService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/java/com/anyun/exam/lib/SvrManager.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/app.java
@@ -67,7 +67,7 @@
    }
    @Override
    public void callBackMsg(String json) {
    public void callBackMsg(int cmd, String json) {
        MyLog.d(TAG, "收到==" + json);
        CEventCenter.dispatchEvent("train",0,0,json);
    }
lib/src/main/aidl/com/anyun/exam/lib/IListenerInterface.aidl
@@ -9,5 +9,5 @@
     * Demonstrates some basic types that you can use as parameters
     * and return values in AIDL.
     */
    void onMessageArrived(String json);
    void onMessageArrived(int cmd, String json);
}
lib/src/main/aidl/com/anyun/exam/lib/IRemoteInterface.aidl
@@ -13,4 +13,5 @@
            void registListener(IListenerInterface i);
            void unRegistListener(IListenerInterface i);
            void add();
            void SendCmd(int cmd, String value);
}
lib/src/main/cpp/driver_test.cpp
@@ -57,7 +57,7 @@
static Polygon theTurn90Map;
static Polygon theSSMap;
#define CAR_COORD_STORE_SIZE        11
#define CAR_COORD_STORE_SIZE        10
struct car_coord_ {
    uint32_t uptime;
lib/src/main/java/com/anyun/exam/lib/IAYExamListener.java
@@ -9,5 +9,5 @@
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public interface IAYExamListener {
    void callBackMsg(String json);
    void callBackMsg(int cmd, String json);
}
lib/src/main/java/com/anyun/exam/lib/RemoteService.java
@@ -50,7 +50,10 @@
                Log.i(TAG,"客户端调用服务端方法");
        }
        @Override
        public void SendCmd(int cmd, String value) throws RemoteException {
        }
    };
    @Nullable
    @Override
@@ -78,7 +81,7 @@
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                onMessageArrived(String.format("消息ID:%d,请注意查收",msgId++));
                onMessageArrived(msgId, String.format("消息ID:%d,请注意查收",msgId++));
            }
        }
@@ -91,18 +94,16 @@
        mIsServiceDestroyed.set(true);
    }
    private void onMessageArrived(String json){
    private void onMessageArrived(int cmd, String json){
        int N = mListenerList.getRegisteredCallbackCount();
        Log.d(TAG, "getRegisteredCallbackCount = " + N);
        mListenerList.beginBroadcast();
        for (int i = 0; i < N; i++) {
            mListener  = mListenerList.getBroadcastItem(i);
            if (mListener != null){
                try {
                    mListener.onMessageArrived(json);
                    mListener.onMessageArrived(cmd, json);
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
lib/src/main/java/com/anyun/exam/lib/SvrManager.java
@@ -123,10 +123,10 @@
     */
    IListenerInterface RemoteCallback = new IListenerInterface.Stub(){
        @Override
        public void onMessageArrived(String json) throws RemoteException {
        public void onMessageArrived(int cmd, String json) throws RemoteException {
            if (mCallback != null){
                mCallback.callBackMsg(json);
                mCallback.callBackMsg(cmd, json);
            }
        }