Sfoglia il codice sorgente

海外智利项目增加金立手机版本兼容,增加呼叫转移开关,增加tts语速设置,其他优化等

weizhengliang 6 mesi fa
parent
commit
55b344c64f
22 ha cambiato i file con 274 aggiunte e 118 eliminazioni
  1. 1 1
      android_mobile/build.gradle
  2. 8 32
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt
  3. 64 0
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/activity/WatchUserSettingActivity.java
  4. 5 4
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt
  5. 20 0
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/settingconfig/SettingConfig.java
  6. 8 3
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/ui/FragmentAudio.java
  7. 11 10
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/ui/SingleCallFragment.java
  8. 15 0
      android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/util/SpeechUtil.java
  9. 4 4
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_room_item.xml
  10. 8 6
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_watch_call_records_item.xml
  11. 5 5
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_watch_contacts_item.xml
  12. 4 7
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/event_list_item.xml
  13. 3 3
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/password_dialog_lay.xml
  14. 3 3
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/server_config_dialog_lay.xml
  15. 7 9
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/takeover_item.xml
  16. 72 3
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/user_setting_layout.xml
  17. 2 2
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_call_records.xml
  18. 5 5
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_home2.xml
  19. 19 18
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_register.xml
  20. 2 2
      android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_contacts_lay.xml
  21. 1 1
      app/build.gradle
  22. 7 0
      build.gradle

+ 1 - 1
android_mobile/build.gradle

@@ -60,7 +60,7 @@ android {
             main.java.srcDirs += 'src/main/yd_w_xiaomi_2/aidl'
             main.res.srcDirs += 'src/main/yd_w_xiaomi_2/res'
             main.manifest.srcFile 'src/main/yd_w_xiaomi_2/AndroidManifest.xml'
-        } else if ("yd_w_xiaomi_2_chile" == app_device_type) {
+        } else if ("yd_w_xiaomi_2_chile" == app_device_type || "yd_w_gionee_2_chile" == app_device_type) {
             main.java.srcDirs += 'src/main/yd_w_xiaomi_2_chile/code'
             main.java.srcDirs += 'src/main/yd_w_xiaomi_2_chile/aidl'
             main.res.srcDirs += 'src/main/yd_w_xiaomi_2_chile/res'

+ 8 - 32
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt

@@ -123,6 +123,12 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
 
         initCountDownTimer()
 
+        if (DaemonEnv.app == null && !WdKeepAliveService.instanceCreated) {
+            DaemonEnv.init(this)
+            Log.d(TAG, "开始 WdKeepAliveService")
+            DaemonEnv.startServiceSafely(this, WdKeepAliveService::class.java)
+        }
+
         //网络强度监听
         teleManager = (applicationContext.getSystemService(Context.TELEPHONY_SERVICE)) as TelephonyManager
         netType = NetHelper.getInstance().getNetworkState(applicationContext)
@@ -210,12 +216,6 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         }
 
         tv_server_ip.text = CommonUtils.getUrl(BaseApplication.appContext)
-
-        /*if (DaemonEnv.app == null && !WdKeepAliveService.instanceCreated) {
-            DaemonEnv.init(this)
-            Log.d(TAG, "开始 WdKeepAliveService")
-            DaemonEnv.startServiceSafely(this, WdKeepAliveService::class.java)
-        }*/
     }
 
 
@@ -287,23 +287,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
      * 返回的tcp信息
      */
     override fun setTcpServerHost(tcpSeverDTO: TcpSeverDTO) {
-        /*Log.d(TAG, "获取服务器IP完成")
-        if (tcpSeverDTO.publicIp != null && tcpSeverDTO.tcpPort != null && tcpSeverDTO.readerIdleTime != null) {
-            Constants.tcpServer = tcpSeverDTO.publicIp
-            Constants.tcpPort = tcpSeverDTO.tcpPort
-            Constants.heartBeat = tcpSeverDTO.readerIdleTime
-            tv_server_ip.text = tcpSeverDTO.publicIp
-
-            //成功获取到数据后再启动keepService并连接tcp服务器
-            if (DaemonEnv.app == null && !Strings.isNullOrEmpty(Constants.tcpServer) && !WdKeepAliveService.instanceCreated) {
-                Log.d(TAG, "开始 WdKeepAliveService")
-                //保活守护进程
-                DaemonEnv.init(this)
-                DaemonEnv.startServiceSafely(this, WdKeepAliveService::class.java)
-            }
 
-            presenter.getDeviceVO(Constants.imei)
-        }*/
     }
 
     override fun setServerInfo(serverIpInfo: ServerIpInfo) {
@@ -317,14 +301,6 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
             JanusConstant.STUN_SERVER = arrayOf<String>(serverIpInfo.stunServer)
             //JanusConstant.TURN_SERVER = data.turnServer
 
-            //成功获取到数据后再启动keepService并连接tcp服务器
-            /*if (DaemonEnv.app == null && !Strings.isNullOrEmpty(Constants.tcpServer) && !WdKeepAliveService.instanceCreated) {
-                Log.d(TAG, "开始 WdKeepAliveService")
-                //保活守护进程
-                DaemonEnv.init(this)
-                DaemonEnv.startServiceSafely(this, WdKeepAliveService::class.java)
-            }*/
-
             presenter.getDeviceVO(Constants.imei)
         }
 
@@ -457,11 +433,11 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         Constants.sipId = data.sipId
         Constants.deviceType = data.deviceType
 
-        if (DaemonEnv.app == null && !WdKeepAliveService.instanceCreated) {
+        /*if (DaemonEnv.app == null && !WdKeepAliveService.instanceCreated) {
             DaemonEnv.init(this)
             Log.d(TAG, "开始 WdKeepAliveService")
             DaemonEnv.startServiceSafely(this, WdKeepAliveService::class.java)
-        }
+        }*/
 
         loadingDialog.dismiss()
         watch_activity_register_layout.visibility = View.GONE

+ 64 - 0
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/activity/WatchUserSettingActivity.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
+import android.widget.ImageView;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.Spinner;
@@ -49,6 +50,12 @@ public class WatchUserSettingActivity extends Activity {
     private RadioButton callYes, callNo;
     private RadioGroup imChannelGroup;
     private RadioButton imChannelYes, imChannelNo;
+    private RadioGroup callTransGroup;
+    private RadioButton transferOn, transferOff;
+
+    private TextView tvTtsRate;
+    private ImageView ttsRateDecrease, ttsRateIncrease;
+    private int ttsRate;
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -80,6 +87,10 @@ public class WatchUserSettingActivity extends Activity {
         imChannelYes = findViewById(R.id.rb_im_channel_yes);
         imChannelNo = findViewById(R.id.rb_im_channel_no);
 
+        callTransGroup = findViewById(R.id.group_call_transfer);
+        transferOn = findViewById(R.id.rb_call_transfer_on);
+        transferOff = findViewById(R.id.rb_call_transfer_off);
+
         tvAppVersion.setText(CommonUtils.getAppVersionName(BaseApplication.appContext) + "_" + BuildConfig.BUILD_TIME);
         tvDeviceId.setText("" + Constants.Companion.getDeviceId());
         tvDeviceImei.setText(Constants.Companion.getImei());
@@ -88,6 +99,42 @@ public class WatchUserSettingActivity extends Activity {
         String type = getString(R.string.phone_type, Constants.Companion.getPhoneType(), Constants.Companion.getBedPhoneType(), Constants.Companion.getNursePhoneType());
         tvPhoneType.setText(type);
 
+        ttsRate = SettingConfig.getTtsSpeechRate(BaseApplication.appContext);
+        tvTtsRate = findViewById(R.id.tv_speech_rate_value);
+        tvTtsRate.setText("" + ttsRate);
+        ttsRateIncrease = findViewById(R.id.speech_rate_increase);
+        ttsRateDecrease = findViewById(R.id.speech_rate_decrease);
+        ttsRateIncrease.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (ttsRate < 10) {
+                    ttsRate++;
+                } else {
+                    ttsRate = 10;
+                }
+                tvTtsRate.setText("" + ttsRate);
+                SettingConfig.setTtsSpeechRate(BaseApplication.appContext, ttsRate);
+            }
+        });
+        ttsRateDecrease.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (ttsRate > 1) {
+                    ttsRate--;
+                } else {
+                    ttsRate = 1;
+                }
+                tvTtsRate.setText("" + ttsRate);
+                SettingConfig.setTtsSpeechRate(BaseApplication.appContext, ttsRate);
+            }
+        });
+
+
+        if ("com.google.android.tts".equalsIgnoreCase(SpeechUtil.getInstance().getSpeechEngine())) {
+            findViewById(R.id.ll_speech_rate).setVisibility(View.VISIBLE);
+            findViewById(R.id.tv_speech_rate).setVisibility(View.VISIBLE);
+        }
+
         if (SettingConfig.getVoiceCallType(BaseApplication.appContext) == SettingConfig.PHONE_CALL) {
             callYes.setChecked(true);
         } else {
@@ -100,6 +147,12 @@ public class WatchUserSettingActivity extends Activity {
             imChannelNo.setChecked(true);
         }
 
+        if (SettingConfig.getCallTransfer(BaseApplication.appContext)) {
+            transferOn.setChecked(true);
+        } else {
+            transferOff.setChecked(true);
+        }
+
         int mode = SettingConfig.getLanguageMode(BaseApplication.appContext);
         RadioGroup languageMode = findViewById(R.id.group_language_mode);
         RadioButton languageYes = findViewById(R.id.rb_language_yes);
@@ -232,6 +285,17 @@ public class WatchUserSettingActivity extends Activity {
             }
         });
 
+        callTransGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                if (checkedId == R.id.rb_call_transfer_on) {
+                    SettingConfig.setCallTransfer(BaseApplication.appContext, true);
+                } else {
+                    SettingConfig.setCallTransfer(BaseApplication.appContext, false);
+                }
+            }
+        });
+
 
         Button update = findViewById(R.id.btn_update_contact);
         update.setOnClickListener(new View.OnClickListener() {

+ 5 - 4
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt

@@ -11,6 +11,7 @@ import com.wdkl.ncs.android.component.home.databinding.AdapterWatchCallRecordsIt
 import com.wdkl.ncs.android.middleware.common.Constants
 import com.wdkl.ncs.android.component.home.util.TimeTransition
 import com.wdkl.ncs.android.lib.adapter.BaseDelegateAdapter
+import com.wdkl.ncs.android.lib.base.BaseApplication
 import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
 import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
 import com.wdkl.ncs.android.middleware.tcp.enums.DeviceTypeEnum
@@ -73,15 +74,15 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
             binding.callStatusImagev.visibility = View.INVISIBLE
 
             if (!TextUtils.isEmpty(itemData.fromMemberName)) {
-                binding.sickbedTv.text = "From: " + itemData.fromMemberName
+                binding.sickbedTv.text = BaseApplication.appContext.getString(R.string.record_from, itemData.fromMemberName)
             } else {
-                binding.sickbedTv.text = "From: " + itemData.fromFrameFullName
+                binding.sickbedTv.text = BaseApplication.appContext.getString(R.string.record_from, itemData.fromFrameFullName)
             }
 
             if (!TextUtils.isEmpty(itemData.toMemberName)) {
-                binding.nameTv.text = "To: " + itemData.toMemberName
+                binding.nameTv.text = BaseApplication.appContext.getString(R.string.record_to, itemData.toMemberName)
             } else {
-                binding.nameTv.text = "To: " + itemData.toFrameFullName
+                binding.nameTv.text = BaseApplication.appContext.getString(R.string.record_to, itemData.toFrameFullName)
             }
 
             if (itemData.actionType == TcpType.EVENT.name) {

+ 20 - 0
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/settingconfig/SettingConfig.java

@@ -24,6 +24,9 @@ public class SettingConfig {
     public static final int IM_CHANNEL_ON = 1;
     public static final int IM_CHANNEL_OFF = 2;
 
+    //呼叫转移
+    private static final String KEY_SP_CALL_TRANSFER = "KEY_SP_CALL_TRANSFER";
+
     //默认语言
     private static final String KEY_LANGUAGE_ID = "KEY_LANGUAGE_ID";
     private static final String KEY_LANGUAGE_MODE = "KEY_LANGUAGE_MODE";
@@ -31,6 +34,8 @@ public class SettingConfig {
     //是否使用sip通话
     private static final String KEY_SP_SIP_ENABLE = "KEY_SP_SIP_ENABLE";
 
+    private static final String KEY_TTS_SPEECH_RATE = "KEY_TTS_SPEECH_RATE";
+
     public static int getLanguageId(Context context) {
         //0--auto, 1--English, 2--中文, 3--西班牙语, 4--俄语
         return getSP(context).getInt(KEY_LANGUAGE_ID, 3);
@@ -56,6 +61,21 @@ public class SettingConfig {
         getEditor(context).putBoolean(KEY_SP_SIP_ENABLE, enable).apply();
     }
 
+    public static boolean getCallTransfer(Context context) {
+        return getSP(context).getBoolean(KEY_SP_CALL_TRANSFER, true);
+    }
+
+    public static void setCallTransfer(Context context, boolean on) {
+        getEditor(context).putBoolean(KEY_SP_CALL_TRANSFER, on).apply();
+    }
+
+    public static int getTtsSpeechRate(Context context) {
+        return getSP(context).getInt(KEY_TTS_SPEECH_RATE, 8);
+    }
+
+    public static void setTtsSpeechRate(Context context, int rate) {
+        getEditor(context).putInt(KEY_TTS_SPEECH_RATE, rate).apply();
+    }
 
     /**
      * 获取转发时间

+ 8 - 3
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/ui/FragmentAudio.java

@@ -25,6 +25,7 @@ import com.wdkl.ncs.android.component.home.util.MediaPlayHelper;
 import com.wdkl.ncs.android.component.home.util.RingPlayHelper;
 import com.wdkl.ncs.android.component.home.util.SpeechUtil;
 import com.wdkl.ncs.android.component.home.util.Util;
+import com.wdkl.ncs.android.lib.base.BaseApplication;
 import com.wdkl.ncs.android.lib.utils.ExtendMethodsKt;
 import com.wdkl.ncs.android.middleware.common.Constants;
 import com.wdkl.ncs.android.middleware.model.vo.InteractionVO;
@@ -94,7 +95,9 @@ public class FragmentAudio extends SingleCallFragment implements View.OnClickLis
         }
         transHandler = new TransHandler();
         //是来电,且是客户来电进入延时转接
-        if (!isOutgoing && interactionVO.getFromClerkId()==null) {
+        if (SettingConfig.getCallTransfer(BaseApplication.appContext)
+                && !isOutgoing
+                && interactionVO != null && interactionVO.getFromClerkId()==null) {
             int transSeconds = SettingConfig.getCountdownTime(this.getContext());
             transHandler.sendEmptyMessageDelayed(TRANS, transSeconds * 1000);
         }
@@ -131,8 +134,10 @@ public class FragmentAudio extends SingleCallFragment implements View.OnClickLis
                         frameName = getShowName();
                     }
 
-                    String text = frameName + getString(R.string.call_incoming) + frameName + getString(R.string.call_incoming)
-                            + frameName + getString(R.string.call_incoming) + frameName + getString(R.string.call_incoming);
+                    String text = frameName + ", " + getString(R.string.call_incoming) + ", "
+                            + frameName + ", " + getString(R.string.call_incoming)  + ", "
+                            + frameName + ", " + getString(R.string.call_incoming)  + ", "
+                            + frameName + ", " + getString(R.string.call_incoming);
                     SpeechUtil.getInstance().startSpeak(text);
                 }
             }

+ 11 - 10
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/ui/SingleCallFragment.java

@@ -518,6 +518,17 @@ public abstract class SingleCallFragment extends Fragment {
 
             TcpModel tcpModel = (TcpModel) messageEvent.getMessage();
             Log.i(TAG, "收到数据222: " + tcpModel.toJson());
+
+            if (tcpModel.getAction() == TcpAction.VoiceAction.FAILED) {
+                handler.sendEmptyMessageDelayed(FINISH_CURRENT, 1000);
+                runOnUiThread(new Runnable() {
+                    @Override
+                    public void run() {
+                        Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_failed, Toast.LENGTH_SHORT).show();
+                    }
+                });
+            }
+
             int curInteractionId = -1;
             if (tcpModel.getData() != null) {
                 InteractionVO interactionVO = new Gson().fromJson(tcpModel.getData().toString(), InteractionVO.class);
@@ -567,16 +578,6 @@ public abstract class SingleCallFragment extends Fragment {
                         }
                     });
                 }
-            } else if (tcpModel.getAction() == TcpAction.VoiceAction.FAILED) {
-                //if (curInteractionId == interactionId) {
-                    handler.sendEmptyMessageDelayed(FINISH_CURRENT, 1000);
-                    runOnUiThread(new Runnable() {
-                        @Override
-                        public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_failed, Toast.LENGTH_SHORT).show();
-                        }
-                    });
-                //}
             } else if (tcpModel.getAction() == TcpAction.VoiceAction.CANCEL || tcpModel.getAction() == TcpAction.VoiceAction.VOICE_OFF) {
                 if (curInteractionId == Constants.Companion.getInteractionId()) {
                     handler.sendEmptyMessageDelayed(FINISH_CURRENT, 100);

+ 15 - 0
android_mobile/src/main/yd_w_xiaomi_2_chile/code/com/wdkl/ncs/android/component/home/util/SpeechUtil.java

@@ -10,6 +10,7 @@ import android.text.TextUtils;
 import android.util.Log;
 
 
+import com.wdkl.ncs.android.component.home.settingconfig.SettingConfig;
 import com.wdkl.ncs.android.middleware.common.Constants;
 import com.wdkl.ncs.android.lib.base.BaseApplication;
 import com.wdkl.ncs.android.middleware.tcp.enums.CommunicationEnum;
@@ -145,6 +146,14 @@ public class SpeechUtil {
         SpeechUtil.getInstance().init(BaseApplication.appContext, speechCallback);
     }
 
+    public String getSpeechEngine() {
+        if (textToSpeech != null) {
+            return textToSpeech.getDefaultEngine();
+        }
+
+        return "";
+    }
+
     public void newSpeech(String text, boolean emergency) {
         synchronized (lockObject) {
             if (Constants.Companion.getTtsState() == 2) {
@@ -164,6 +173,12 @@ public class SpeechUtil {
                 return;
             }
 
+            if ("com.google.android.tts".equalsIgnoreCase(textToSpeech.getDefaultEngine())) {
+                float rate = (float) SettingConfig.getTtsSpeechRate(BaseApplication.appContext)/10;
+                textToSpeech.setSpeechRate(rate);
+                Log.e(TAG, "set speech rate: " + rate);
+            }
+
             params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_MUSIC);
             int speakStatus = textToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, params, "uniqueId");
             Log.d(TAG, "startSpeak status: " + speakStatus + ", text: " + text);

+ 4 - 4
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_room_item.xml

@@ -4,7 +4,7 @@
     <RelativeLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
-        android:layout_height="60dp"
+        android:layout_height="68dp"
         android:layout_marginBottom="1dp"
         android:background="#FFFFFF">
 
@@ -26,15 +26,15 @@
 
             <Button
                 android:id="@+id/btn_call_out"
-                android:layout_width="50dp"
-                android:layout_height="22dp"
+                android:layout_width="56dp"
+                android:layout_height="24dp"
                 android:layout_marginRight="10dp"
                 android:layout_alignParentRight="true"
                 android:layout_centerVertical="true"
                 android:textColor="@color/grgray"
                 android:background="@drawable/javashop_btn_balck_line_bg"
                 android:text="@string/str_call"
-                android:textSize="12sp"
+                android:textSize="10sp"
                 android:singleLine="true"/>
 
         </RelativeLayout>

+ 8 - 6
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_watch_call_records_item.xml

@@ -3,7 +3,7 @@
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="70dp"
+        android:layout_height="80dp"
         android:background="@drawable/item_selector"
         android:layout_marginTop="2dp">
 
@@ -26,8 +26,8 @@
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginTop="4dp"
-            android:layout_marginEnd="9dp"
+            android:layout_marginEnd="8dp"
+            android:gravity="center_vertical"
             android:layout_toEndOf="@+id/tab_linyout">
 
             <RelativeLayout
@@ -40,7 +40,8 @@
                     android:id="@+id/sickbed_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="14sp" />
+                    android:textSize="12sp"
+                    android:textColor="#07689f" />
 
                 <TextView
                     android:id="@+id/call_time_tv"
@@ -64,7 +65,8 @@
                     android:id="@+id/name_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="14sp" />
+                    android:textSize="12sp"
+                    android:textColor="#11999e" />
 
                 <LinearLayout
                     android:id="@+id/incident_linlyou"
@@ -83,7 +85,7 @@
                     <TextView
                         android:id="@+id/project_tv"
                         android:layout_width="wrap_content"
-                        android:layout_height="20dp"
+                        android:layout_height="22dp"
                         android:paddingLeft="5dp"
                         android:paddingRight="5dp"
                         android:gravity="center"

+ 5 - 5
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/adapter_watch_contacts_item.xml

@@ -4,7 +4,7 @@
     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/item_relayout"
         android:layout_width="match_parent"
-        android:layout_height="60dp"
+        android:layout_height="68dp"
         android:layout_marginBottom="1dp"
         android:background="@drawable/item_selector">
 
@@ -29,7 +29,7 @@
                 android:layout_marginTop="4dp"
                 android:text="--"
                 android:textColor="#F78B8F"
-                android:textSize="16sp" />
+                android:textSize="14sp" />
         </LinearLayout>
 
         <ImageView
@@ -44,8 +44,8 @@
 
         <Button
             android:id="@+id/awci_btn_call_out"
-            android:layout_width="50dp"
-            android:layout_height="22dp"
+            android:layout_width="56dp"
+            android:layout_height="24dp"
             android:layout_marginRight="10dp"
             android:layout_centerVertical="true"
             android:layout_toLeftOf="@+id/right_arrow"
@@ -53,7 +53,7 @@
             android:singleLine="true"
             android:text="@string/str_call"
             android:textColor="@color/grgray"
-            android:textSize="12sp" />
+            android:textSize="10sp" />
 
         <ImageView
             android:id="@+id/right_arrow"

+ 4 - 7
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/event_list_item.xml

@@ -14,7 +14,6 @@
             android:layout_height="wrap_content"
             android:orientation="horizontal">
 
-
             <LinearLayout
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -57,11 +56,10 @@
             </LinearLayout>
 
             <LinearLayout
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:orientation="horizontal"
                 android:layout_marginEnd="10dp"
-                android:gravity="right"
+                android:gravity="end"
                 android:layout_weight="1">
 
                 <TextView
@@ -71,7 +69,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginStart="5dp"
                     android:textColor="@color/warn_orange"
-                    android:textSize="20sp"/>
+                    android:textSize="16sp"/>
 
             </LinearLayout>
 
@@ -88,8 +86,7 @@
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
                 android:layout_marginEnd="5dp"
-                android:gravity="end"
-                android:layout_weight="1">
+                android:gravity="end">
 
                 <ImageView
                     android:visibility="gone"

+ 3 - 3
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/password_dialog_lay.xml

@@ -40,7 +40,7 @@
             android:padding="4dp"
             android:text="@string/str_delete"
             android:textColor="@color/main_color"
-            android:textSize="16sp" />
+            android:textSize="14sp" />
 
         <TextView
             android:id="@+id/btn_cancel"
@@ -51,7 +51,7 @@
             android:padding="4dp"
             android:text="@string/str_cancel"
             android:textColor="@color/main_color"
-            android:textSize="16sp" />
+            android:textSize="14sp" />
 
         <TextView
             android:id="@+id/btn_confirm"
@@ -62,7 +62,7 @@
             android:padding="4dp"
             android:text="@string/str_confirm"
             android:textColor="@color/main_color"
-            android:textSize="16sp" />
+            android:textSize="14sp" />
     </LinearLayout>
 
 </LinearLayout>

+ 3 - 3
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/server_config_dialog_lay.xml

@@ -43,7 +43,7 @@
                 android:padding="4dp"
                 android:gravity="center_horizontal"
                 android:text="@string/str_delete"
-                android:textSize="16sp"
+                android:textSize="14sp"
                 android:textColor="@color/main_color"/>
 
             <TextView
@@ -54,7 +54,7 @@
                 android:padding="4dp"
                 android:gravity="center_horizontal"
                 android:text="@string/str_cancel"
-                android:textSize="16sp"
+                android:textSize="14sp"
                 android:textColor="@color/main_color"/>
             <TextView
                 android:id="@+id/btn_confirm"
@@ -64,7 +64,7 @@
                 android:padding="4dp"
                 android:gravity="center_horizontal"
                 android:text="@string/str_confirm"
-                android:textSize="16sp"
+                android:textSize="14sp"
                 android:textColor="@color/main_color"/>
         </LinearLayout>
     </LinearLayout>

+ 7 - 9
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/takeover_item.xml

@@ -17,7 +17,6 @@
                 android:id="@+id/clerk_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
                 android:layout_marginLeft="10dp"
                 android:textColor="#F78B8F"
                 android:textSize="16sp" />
@@ -27,7 +26,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="10dp"
-                android:text="@string/str_empty"
                 android:textSize="12sp" />
         </LinearLayout>
 
@@ -36,7 +34,7 @@
             android:layout_height="match_parent"
             android:layout_marginRight="10dp"
             android:layout_weight="1"
-            android:gravity="right|center_vertical">
+            android:gravity="end|center_vertical">
 
             <ImageView
                 android:id="@+id/ti_voice_recorder"
@@ -48,23 +46,23 @@
 
             <Button
                 android:id="@id/btn_user_change"
-                android:layout_width="54dp"
-                android:layout_height="22dp"
+                android:layout_width="56dp"
+                android:layout_height="24dp"
                 android:background="@drawable/javashop_btn_balck_line_bg"
                 android:text="@string/str_replace"
                 android:textColor="@color/grgray"
-                android:textSize="12sp"
+                android:textSize="10sp"
                 android:singleLine="true"/>
 
             <Button
                 android:id="@+id/btn_call_out"
-                android:layout_width="54dp"
-                android:layout_height="22dp"
+                android:layout_width="56dp"
+                android:layout_height="24dp"
                 android:layout_marginLeft="5dp"
                 android:background="@drawable/javashop_btn_balck_line_bg"
                 android:text="@string/str_call"
                 android:textColor="@color/grgray"
-                android:textSize="12sp"
+                android:textSize="10sp"
                 android:singleLine="true"/>
 
         </LinearLayout>

+ 72 - 3
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/user_setting_layout.xml

@@ -297,7 +297,7 @@
                     android:id="@+id/group_call"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@id/btn_check_update"
+                    android:layout_below="@id/tv_call_title"
                     android:layout_toRightOf="@id/tv_call_title"
                     android:layout_marginTop="10dp"
                     android:layout_marginLeft="4dp"
@@ -317,11 +317,40 @@
                 </RadioGroup>
 
                 <TextView
-                    android:id="@+id/tv_im_channel_title"
+                    android:id="@+id/tv_call_transfer"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_below="@id/tv_call_title"
                     android:layout_marginTop="16dp"
+                    android:text="@string/str_call_transfer_title"
+                    android:textSize="16sp" />
+
+                <RadioGroup
+                    android:id="@+id/group_call_transfer"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_call_transfer"
+                    android:layout_marginTop="10dp"
+                    android:orientation="horizontal">
+                    <RadioButton
+                        android:id="@+id/rb_call_transfer_on"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/str_yes"/>
+                    <RadioButton
+                        android:id="@+id/rb_call_transfer_off"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:text="@string/str_no"/>
+                </RadioGroup>
+
+                <TextView
+                    android:id="@+id/tv_im_channel_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/group_call_transfer"
+                    android:layout_marginTop="16dp"
                     android:text="@string/media_button_message"
                     android:textSize="16sp" />
 
@@ -346,11 +375,51 @@
                 </RadioGroup>
 
                 <TextView
-                    android:id="@+id/tv_language_title"
+                    android:id="@+id/tv_speech_rate"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_below="@id/group_im_channel"
                     android:layout_marginTop="10dp"
+                    android:text="@string/speech_rate_text"
+                    android:textSize="16sp"
+                    android:visibility="gone"/>
+
+                <LinearLayout
+                    android:id="@+id/ll_speech_rate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_speech_rate"
+                    android:layout_marginTop="10dp"
+                    android:gravity="center_vertical"
+                    android:paddingLeft="4dp"
+                    android:paddingRight="4dp"
+                    android:visibility="gone">
+                    <ImageView
+                        android:id="@+id/speech_rate_decrease"
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:src="@drawable/ic_arrow_left"/>
+                    <TextView
+                        android:id="@+id/tv_speech_rate_value"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="10dp"
+                        android:layout_marginRight="10dp"
+                        android:text="8"
+                        android:textSize="16sp" />
+                    <ImageView
+                        android:id="@+id/speech_rate_increase"
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:src="@drawable/ic_arrow_right"/>
+                </LinearLayout>
+
+                <TextView
+                    android:id="@+id/tv_language_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/ll_speech_rate"
+                    android:layout_marginTop="10dp"
                     android:text="@string/language_set_mode"
                     android:textSize="16sp" />
 

+ 2 - 2
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_call_records.xml

@@ -10,8 +10,8 @@
             android:id="@+id/refresh"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginLeft="6px"
-            android:layout_marginRight="6px"
+            android:layout_marginLeft="6dp"
+            android:layout_marginRight="6dp"
             bind:srlEnableLoadMore="true"
             bind:srlEnableRefresh="true">
 

+ 5 - 5
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_home2.xml

@@ -44,7 +44,7 @@
                         android:layout_marginTop="10dp"
                         android:text="@string/custom_title"
                         android:textColor="#ffffff"
-                        android:textSize="16dp" />
+                        android:textSize="16sp" />
 
                 </LinearLayout>
 
@@ -70,7 +70,7 @@
                         android:layout_marginTop="10dp"
                         android:text="@string/call_list"
                         android:textColor="#ffffff"
-                        android:textSize="16dp" />
+                        android:textSize="16sp" />
 
                 </LinearLayout>
 
@@ -156,7 +156,7 @@
                             android:paddingStart="5dp"
                             android:paddingEnd="5dp"
                             android:textColor="#ffffff"
-                            android:textSize="16sp"
+                            android:textSize="14sp"
                             android:singleLine="true"
                             android:ellipsize="marquee"
                             android:focusable="true"
@@ -168,7 +168,7 @@
                             android:layout_height="wrap_content"
                             android:layout_marginTop="2dp"
                             android:textColor="#ffffff"
-                            android:textSize="16sp"
+                            android:textSize="14sp"
                             android:visibility="gone"/>
 
                         <TextView
@@ -177,7 +177,7 @@
                             android:layout_height="wrap_content"
                             android:layout_marginTop="2dp"
                             android:textColor="#ffffff"
-                            android:textSize="14sp"
+                            android:textSize="12sp"
                             android:visibility="gone"/>
                     </LinearLayout>
                 </RelativeLayout>

+ 19 - 18
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_activity_register.xml

@@ -60,67 +60,68 @@
             <TextView
                 android:id="@+id/tv_register_ok"
                 android:layout_width="match_parent"
-                android:layout_height="40dp"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
                 android:layout_marginLeft="30dp"
                 android:layout_marginTop="20dp"
                 android:layout_marginRight="30dp"
-                android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
                 android:text="@string/register_done"
-                android:textSize="18sp" />
+                android:textSize="14sp" />
 
             <TextView
                 android:id="@+id/tv_restart_app"
                 android:layout_width="match_parent"
-                android:layout_height="40dp"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
                 android:layout_marginLeft="30dp"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="30dp"
                 android:layout_marginRight="30dp"
-                android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
                 android:text="@string/register_restart"
-                android:textSize="18sp" />
+                android:textSize="14sp" />
 
             <TextView
                 android:id="@+id/tv_config_server"
                 android:layout_width="match_parent"
-                android:layout_height="40dp"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
                 android:layout_marginLeft="30dp"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="30dp"
                 android:layout_marginRight="30dp"
-                android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
                 android:text="@string/register_config_server"
-                android:textSize="18sp" />
+                android:textSize="14sp" />
 
             <TextView
                 android:id="@+id/tv_language_settings"
                 android:layout_width="match_parent"
-                android:layout_height="40dp"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
                 android:layout_marginLeft="30dp"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="30dp"
                 android:layout_marginRight="30dp"
-                android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
                 android:text="@string/str_language_settings"
-                android:textSize="18sp" />
+                android:textSize="14sp" />
 
             <TextView
                 android:id="@+id/tv_system_settings"
                 android:layout_width="match_parent"
-                android:layout_height="40dp"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
                 android:layout_marginLeft="30dp"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="30dp"
                 android:layout_marginRight="30dp"
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
                 android:text="@string/str_system_settings"
-                android:textSize="18sp" />
+                android:textSize="14sp" />
         </LinearLayout>
     </ScrollView>
 </LinearLayout>

+ 2 - 2
android_mobile/src/main/yd_w_xiaomi_2_chile/res/layout/watch_contacts_lay.xml

@@ -24,7 +24,7 @@
                 android:button="@null"
                 android:gravity="center"
                 android:text="@string/str_bed"
-                android:textSize="20sp"/>
+                android:textSize="18sp"/>
 
             <RadioButton
                 android:id="@+id/rb_tab_room"
@@ -37,7 +37,7 @@
                 android:button="@null"
                 android:gravity="center"
                 android:text="@string/str_room"
-                android:textSize="20sp"/>
+                android:textSize="18sp"/>
         </RadioGroup>
 
         <TextView

+ 1 - 1
app/build.gradle

@@ -98,7 +98,7 @@ android {
             } else {
                 main.manifest.srcFile 'src/main/AndroidManifest.xml'
             }
-        } else if ("yd_w_gionee_2" == app_device_type) {
+        } else if ("yd_w_gionee_2" == app_device_type || "yd_w_gionee_2_chile" == app_device_type) {
             main.manifest.srcFile 'src/main/gionee/AndroidManifest.xml'
         } else {
             main.manifest.srcFile 'src/main/AndroidManifest.xml'

+ 7 - 0
build.gradle

@@ -80,6 +80,13 @@ buildscript {
         //金立手机
         ext.app_version_code = 170
         ext.app_version = "1.4.20_gn"
+    } else if (app_device_type == "yd_w_gionee_2_chile") {
+        ext.build_tools_version = "30.0.2"
+        ext.support_library_version = "28.0.0"
+
+        //金立手机
+        ext.app_version_code = 160
+        ext.app_version = "1.4.10_rm"
     } else if (app_device_type == "yd_watch_2") {
         ext.build_tools_version = "26.0.2"
         ext.support_library_version = "26.1.0"