handler remote call user name.
authorTrillGates <williamtrillgates@gmail.com>
Tue, 23 Mar 2021 06:25:32 +0000 (14:25 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Tue, 23 Mar 2021 06:25:32 +0000 (14:25 +0800)
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/provider/FZDMembersProvider.java
app/src/main/java/com/ic/protocols/protocolAPIHelper.java
app/src/main/java/com/ic/protocols/protocol_fzd.java

index 3860940..8ca7752 100644 (file)
@@ -1726,8 +1726,8 @@ public class CoreService extends Service {
         @Override
         public void test() {
             //触发测试
-            StringMessage MEMBERS = protocol_fzd.MEMBERS();
-            Deliver.sendLocationMSG(MEMBERS);
+           // StringMessage MEMBERS = protocol_fzd.MEMBERS();
+            //Deliver.sendLocationMSG(MEMBERS);
         }
 
         @Override
index 1cfb639..c8311ae 100644 (file)
@@ -12,7 +12,7 @@ import android.support.annotation.Nullable;
 public class FZDMembersProvider extends ContentProvider {
 
     private static UriMatcher sUriMatcher;
-    private static final int MATH_CODE = 1;
+    private static final int MATH_CODE_TABLE = 1;
 
     public static final String PATH = "members";
     public static final String AUTHORITY = "com.ic.fzd.video-call";
@@ -21,7 +21,7 @@ public class FZDMembersProvider extends ContentProvider {
 
     static {
         sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
-        sUriMatcher.addURI(AUTHORITY, PATH, MATH_CODE);
+        sUriMatcher.addURI(AUTHORITY, PATH, MATH_CODE_TABLE);
     }
 
     private FZDDatabaseHelper mDatabase;
@@ -51,8 +51,8 @@ public class FZDMembersProvider extends ContentProvider {
                         @Nullable String sortOrder) {
         //匹配规则
         int match = sUriMatcher.match(uri);
-        if (match == MATH_CODE) {
-            SQLiteDatabase readableDatabase = mDatabase.getReadableDatabase();
+        SQLiteDatabase readableDatabase = mDatabase.getReadableDatabase();
+        if (match == MATH_CODE_TABLE) {
             return readableDatabase.query(FZDDatabaseHelper.tMembers,
                     projection,
                     selection,
@@ -73,7 +73,7 @@ public class FZDMembersProvider extends ContentProvider {
     public Uri insert(@NonNull Uri uri,
                       @Nullable ContentValues values) {
         int match = sUriMatcher.match(uri);
-        if (match == MATH_CODE) {
+        if (match == MATH_CODE_TABLE) {
             SQLiteDatabase writableDatabase = mDatabase.getWritableDatabase();
             long insert = writableDatabase.insert(FZDDatabaseHelper.tMembers, null, values);
             writableDatabase.close();
@@ -88,7 +88,7 @@ public class FZDMembersProvider extends ContentProvider {
                       @Nullable String selection,
                       @Nullable String[] selectionArgs) {
         int match = sUriMatcher.match(uri);
-        if (match == MATH_CODE) {
+        if (match == MATH_CODE_TABLE) {
             SQLiteDatabase writableDatabase = mDatabase.getWritableDatabase();
             int delete = writableDatabase.delete(FZDDatabaseHelper.tMembers, selection, selectionArgs);
             writableDatabase.close();
@@ -103,7 +103,7 @@ public class FZDMembersProvider extends ContentProvider {
                       @Nullable String selection,
                       @Nullable String[] selectionArgs) {
         int match = sUriMatcher.match(uri);
-        if (match == MATH_CODE) {
+        if (match == MATH_CODE_TABLE) {
             SQLiteDatabase writableDatabase = mDatabase.getWritableDatabase();
             int update = writableDatabase.update(FZDDatabaseHelper.tMembers, values, selection, selectionArgs);
             writableDatabase.close();
index 590018d..47b49e3 100644 (file)
@@ -51,7 +51,6 @@ public class protocolAPIHelper {
 
         //只要服务器收到消息,就认为服务器是联通的,保存联通的时间
         Runtime.lastLinkReceiveStamp = System.currentTimeMillis();
-
         if (is_protocol_not_Initialled()) return false;
         switch (Config.protocol_no) {
             case Config.PROTOCOL_JIAI:
index 60b9020..58c93a3 100644 (file)
@@ -959,23 +959,18 @@ public class protocol_fzd {
             needResponseCalling = true;
             //1、准备数据:对方的id,来电类型
             String remoteId = split[0];
+            String sessionId = split[1];
             String type = split[2];
             ICLogger.d("remote id is == > " + remoteId);
             ICLogger.d("type is == > " + type);
-            //2、拉起来电界面
-            Intent intent = new Intent();
-            intent.setAction("com.ic.action.VIDEO_CALL");
-            intent.addCategory(Intent.CATEGORY_DEFAULT);
-            intent.putExtra("remoteId", remoteId);
-            intent.putExtra("type", type);
-            //3、来电界面去查询这个用户是谁
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            mRuntime.getContextProxy().context.startActivity(intent);
+            ICLogger.d("sessionId is == > " + sessionId);
+
             //4、环境是否有准备好
             int envState = sharedPreferences.getInt(STATE_ENV, -1);
             ICLogger.d("envState == > " + envState);
             //5、需要回复平台结果
             if (envState == 0) {
+                ICLogger.d("send calling result == > 0 means ok.");
                 mConnection.send(genFZDCMD(cmdMap.get(CMD_TYPE.CALLING), "0"));
                 needResponseCalling = false;
             }