From 371ba60266e32446a3f4fb673f260ad8ddbc7f14 Mon Sep 17 00:00:00 2001 From: CaiFeng <2397707574@qq.com> Date: Thu, 1 Feb 2024 21:20:33 +0800 Subject: [PATCH 1/5] support state --- README.md | 9 +++++++++ .../main/java/com/huawei/cloudphone/common/CasState.java | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index deb85fe..3cd61e6 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,15 @@ implementation 'org.bouncycastle:bcprov-jdk15to18:1.71' public interface CloudPhoneStateListener { void onNotify(int state, String msg); } + + 状态回调参考CasState类,结合业务自行处理,以下状态必须处理提示客户: + CasState.CAS_SERVER_UNREACHABLE = 0x0301; //网络不可达 + CasState.CAS_CONNECT_LOST = 0x0A00; //重连失败 + CasState.CAS_FIRST_FRAME = 0x1800; //首帧到达 + CasState.CAS_TRAIL_PLAY_TIMEOUT = 0x0E00; //试玩超时 + CasState.CAS_NOTOUCH_TIMEOUT = 0x0F00; //无触控超时 + CasState.CAS_BACKGROUND_TIMEOUT = 0x1000; //后台超时 + CasState.CAS_INVALID_CMD = 0xFFFF; //非法指令 ``` - 调用示例 diff --git a/cloudphone/src/main/java/com/huawei/cloudphone/common/CasState.java b/cloudphone/src/main/java/com/huawei/cloudphone/common/CasState.java index 6f5a6bf..62ca88c 100644 --- a/cloudphone/src/main/java/com/huawei/cloudphone/common/CasState.java +++ b/cloudphone/src/main/java/com/huawei/cloudphone/common/CasState.java @@ -32,6 +32,7 @@ public class CasState { static public final int CAS_VERIFY_AESKEY_INVALID = 0x0604; static public final int CAS_VERIFY_DECRYPT_FAILED = 0x0605; static public final int CAS_VERIFY_FAILED = 0x0606; + static public final int CAS_VERIFY_SESSION_ID_INVALID = 0x0607; static public final int CAS_START_SUCCESS = 0x0800; static public final int CAS_PARAMETER_MISSING = 0x0904; @@ -49,12 +50,19 @@ public class CasState { static public final int CAS_DECODE_ERROR = 0x1100; static public final int CAS_ENGINE_START_FAILED = 0x1101; + static public final int CAS_H265_NOT_SUPPORTED = 0x1102; static public final int CAS_SWITCH_BACKGROUND_SUCCESS = 0x1200; static public final int CAS_SWITCH_BACKGROUND_ERROR = 0x1301; static public final int CAS_SWITCH_FOREGROUND_SUCCESS = 0x1400; + static public final int CAS_SWITCH_FOREGROUND_ERROR = 0x1501; + static public final int CAS_ORIENTATION = 0x1600; static public final int CAS_EXIT = 0x1700; + static public final int CAS_FIRST_FRAME = 0x1800; + static public final int CAS_BACK_HOME = 0x1900; static public final int CAS_REQUEST_CAMERA_KEY_FRAME = 0x2000; + static public final int CAS_SET_MEDIA_CONFIG_SUCCESS = 0x2100; + static public final int CAS_SET_MEDIA_CONFIG_ERROR = 0x2201; static public final int CAS_INVALID_CMD = 0xFFFF; public static class CasStateMsg { -- Gitee From 743bb31482e29099a549f5d9d80d557ce3a7908e Mon Sep 17 00:00:00 2001 From: CaiFeng <2397707574@qq.com> Date: Thu, 1 Feb 2024 21:22:30 +0800 Subject: [PATCH 2/5] support state --- cloudphone/proguard-rules.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/cloudphone/proguard-rules.pro b/cloudphone/proguard-rules.pro index 1c1958c..7f31c16 100644 --- a/cloudphone/proguard-rules.pro +++ b/cloudphone/proguard-rules.pro @@ -28,6 +28,7 @@ -keep interface com.huawei.cloudphone.api.CloudAppDataListener {*;} -keep interface com.huawei.cloudphone.api.CloudPhoneOrientationChangeListener {*;} -keep interface com.huawei.cloudphone.api.CloudPhonePermissionRequestListener {*;} +-keep interface com.huawei.cloudphone.api.CloudPhoneClipboardListener {*;} -keep interface com.huawei.cloudphone.api.ICloudPhone {*;} -keep public enum com.huawei.cloudphone.api.CloudPhoneParas$* {*;} -keep interface com.huawei.cloudphone.service.CasInteractiveStateCallback {*;} -- Gitee From 35f1c35e3e0b433b17cf11b0f574e71a53d4174f Mon Sep 17 00:00:00 2001 From: CaiFeng <2397707574@qq.com> Date: Fri, 2 Feb 2024 09:21:42 +0800 Subject: [PATCH 3/5] support state --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3cd61e6..91549ff 100644 --- a/README.md +++ b/README.md @@ -285,17 +285,18 @@ implementation 'org.bouncycastle:bcprov-jdk15to18:1.71' public interface CloudPhoneStateListener { void onNotify(int state, String msg); } - - 状态回调参考CasState类,结合业务自行处理,以下状态必须处理提示客户: - CasState.CAS_SERVER_UNREACHABLE = 0x0301; //网络不可达 - CasState.CAS_CONNECT_LOST = 0x0A00; //重连失败 - CasState.CAS_FIRST_FRAME = 0x1800; //首帧到达 - CasState.CAS_TRAIL_PLAY_TIMEOUT = 0x0E00; //试玩超时 - CasState.CAS_NOTOUCH_TIMEOUT = 0x0F00; //无触控超时 - CasState.CAS_BACKGROUND_TIMEOUT = 0x1000; //后台超时 - CasState.CAS_INVALID_CMD = 0xFFFF; //非法指令 ``` + | state | code | msg | + | ---------------------- | ------ | ------------------------- | + | CAS_SERVER_UNREACHABLE | 0x0301 | Server unreachable | + | CAS_CONNECT_LOST | 0x0A00 | Connect lost | + | CAS_FIRST_FRAME | 0x1800 | First frame | + | CAS_TRAIL_PLAY_TIMEOUT | 0x0E00 | Available time usedup | + | CAS_NOTOUCH_TIMEOUT | 0x0F00 | Notouch timeout | + | CAS_BACKGROUND_TIMEOUT | 0x1000 | Switch background timeout | + | CAS_INVALID_CMD | 0xFFFF | Invalid Operation | + - 调用示例 ```java -- Gitee From aa62684892627554568f87bc57589af74e1bf8a2 Mon Sep 17 00:00:00 2001 From: CaiFeng <2397707574@qq.com> Date: Fri, 2 Feb 2024 10:54:06 +0800 Subject: [PATCH 4/5] support state --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 91549ff..e54510d 100644 --- a/README.md +++ b/README.md @@ -287,15 +287,15 @@ implementation 'org.bouncycastle:bcprov-jdk15to18:1.71' } ``` - | state | code | msg | - | ---------------------- | ------ | ------------------------- | - | CAS_SERVER_UNREACHABLE | 0x0301 | Server unreachable | - | CAS_CONNECT_LOST | 0x0A00 | Connect lost | - | CAS_FIRST_FRAME | 0x1800 | First frame | - | CAS_TRAIL_PLAY_TIMEOUT | 0x0E00 | Available time usedup | - | CAS_NOTOUCH_TIMEOUT | 0x0F00 | Notouch timeout | - | CAS_BACKGROUND_TIMEOUT | 0x1000 | Switch background timeout | - | CAS_INVALID_CMD | 0xFFFF | Invalid Operation | + | state | code | msg | description | + | ---------------------- | ------ | ------------------------- | ------------ | + | CAS_SERVER_UNREACHABLE | 0x0301 | Server unreachable | 网络不可达 | + | CAS_CONNECT_LOST | 0x0A00 | Connect lost | 重连失败 | + | CAS_FIRST_FRAME | 0x1800 | First frame | 首帧画面到达 | + | CAS_TRAIL_PLAY_TIMEOUT | 0x0E00 | Available time usedup | 试玩超时 | + | CAS_NOTOUCH_TIMEOUT | 0x0F00 | Notouch timeout | 无触控超时 | + | CAS_BACKGROUND_TIMEOUT | 0x1000 | Switch background timeout | 切后台超时 | + | CAS_INVALID_CMD | 0xFFFF | Invalid Operation | 非法指令 | - 调用示例 -- Gitee From d2760974fec1e2683a77e5e77cd8e006736b90a4 Mon Sep 17 00:00:00 2001 From: CaiFeng <2397707574@qq.com> Date: Fri, 2 Feb 2024 14:25:34 +0800 Subject: [PATCH 5/5] support state --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e54510d..bb1495f 100644 --- a/README.md +++ b/README.md @@ -295,8 +295,7 @@ implementation 'org.bouncycastle:bcprov-jdk15to18:1.71' | CAS_TRAIL_PLAY_TIMEOUT | 0x0E00 | Available time usedup | 试玩超时 | | CAS_NOTOUCH_TIMEOUT | 0x0F00 | Notouch timeout | 无触控超时 | | CAS_BACKGROUND_TIMEOUT | 0x1000 | Switch background timeout | 切后台超时 | - | CAS_INVALID_CMD | 0xFFFF | Invalid Operation | 非法指令 | - + - 调用示例 ```java -- Gitee