Bladeren bron

适配腕表,调整通话界面,去掉震动提醒降低功耗,去掉语音留言等

weizhengliang 3 jaren geleden
bovenliggende
commit
dbdaa46c3e

+ 2 - 2
build.gradle

@@ -47,12 +47,12 @@ buildscript {
     /**
      * APP版本码
      */
-    ext.app_version_code = 119
+    ext.app_version_code = 1
 
     /**
      * APP版本号
      */
-    ext.app_version = "1.3.37"
+    ext.app_version = "1.1.1"
 
     /**
      * 项目依赖库

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchEventDetailActivity.kt

@@ -187,7 +187,7 @@ class WatchEventDetailActivity : BaseActivity<WatchHomeActivityPresenter, WatchA
         initCountDownTimer()
         //震动
         mVibrator = getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
-        if (boolVibrator){
+        /*if (boolVibrator){
             mVibrator.cancel()
             //开启振动后 等待0.1s振动 振动2s 等待1s 振动2s 等待1s
             val pattern = longArrayOf(100, 2000, 1000, 2000)
@@ -196,7 +196,7 @@ class WatchEventDetailActivity : BaseActivity<WatchHomeActivityPresenter, WatchA
             } else {
                 mVibrator.vibrate(pattern, -1)
             }
-        }
+        }*/
 
         Log.i(TAG, "参数 tcpModelStr : " + tcpModelStr)
         tcpModel = TcpModel.getModelByJson(tcpModelStr)

+ 4 - 4
home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt

@@ -301,12 +301,12 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
     }
 
     override fun handleAppVersion(appInfo: AppVersionDO) {
-        if (BuildConfig.VERSION_CODE < appInfo.versionNo && !AppUpdateActivity.opened) {
+        /*if (BuildConfig.VERSION_CODE < appInfo.versionNo && !AppUpdateActivity.opened) {
             showMessage("有新版本")
             val intent = Intent()
             intent.setClass(this, AppUpdateActivity::class.java)
             startActivity(intent)
-        }
+        }*/
     }
 
     /**
@@ -394,9 +394,9 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         }
 
         //获取频道列表
-        if (data.memberId != null) {
+        /*if (data.memberId != null) {
             presenter.getDeviceVoiceChannel(data.memberId)
-        }
+        }*/
 
         ll_clerk_list.setOnClickListener {
             var intent = Intent(this, TakeoverActivity().javaClass)

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/adapter/NewEventItemAdapter.kt

@@ -75,12 +75,12 @@ class NewEventItemAdapter(var data:ArrayList<InteractionVO>, val activity: Activ
             }
             binding.eliMemberName.text = showName
 
-            binding.eliVoiceRecorder.visibility = View.VISIBLE
+            /*binding.eliVoiceRecorder.visibility = View.VISIBLE
             binding.eliVoiceRecorder.setOnClickListener{
                 var intent = Intent(activity,VoiceMsgActivity::class.java)
                 intent.putExtra(VoiceMsgActivity.TO_DEVICE_ID,toDeviceId)
                 activity.startActivity(intent)
-            }
+            }*/
 
             when (itemData.actionType){
                 TcpType.EVENT.name->{

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/adapter/TakeoverItemAdapter.kt

@@ -137,12 +137,12 @@ class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val context: Context)
                     }
                 }
 
-                binding.tiVoiceRecorder.visibility = View.VISIBLE
+                /*binding.tiVoiceRecorder.visibility = View.VISIBLE
                 binding.tiVoiceRecorder.setOnClickListener{
                     var intent = Intent(context, VoiceMsgActivity::class.java)
                     intent.putExtra(VoiceMsgActivity.TO_DEVICE_ID,itemData.get("id").asInt)
                     context.startActivity(intent)
-                }
+                }*/
             }
         }
     }

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/adapter/WatchContactsItemAdapter.kt

@@ -74,11 +74,11 @@ class WatchContactsItemAdapter(val data:ArrayList<WatchContactsVO>, val context:
             binding.roomNumberTv.text = itemData.frameFullName
             binding.nameTv.text = itemData.customerNamed
 
-            binding.awciVoiceRecorder.setOnClickListener{
+            /*binding.awciVoiceRecorder.setOnClickListener{
                 var intent = Intent(context, VoiceMsgActivity::class.java)
                 intent.putExtra(VoiceMsgActivity.TO_DEVICE_ID,itemData.deviceId)
                 context.startActivity(intent)
-            }
+            }*/
 
             binding.awciBtnCallOut.setOnClickListener{
                 DeviceChannel.calling = true

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/service/WdKeepAliveService.kt

@@ -694,14 +694,14 @@ class WdKeepAliveService : AbsWorkService() {
     }
 
     private fun handleVibrator() {
-        mVibrator.cancel()
+        /*mVibrator.cancel()
         //开启振动后 等待0.1s振动 振动2s 等待1s 振动2s 等待1s
         val pattern = longArrayOf(100, 2000, 1000, 2000)
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
             mVibrator.vibrate(VibrationEffect.createWaveform(pattern, -1))
         } else {
             mVibrator.vibrate(pattern, -1)
-        }
+        }*/
     }
 
     private fun playVoiceMsg(interactionVO: InteractionVO) {

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/ui/CallSingleActivity.java

@@ -252,12 +252,12 @@ public class CallSingleActivity extends AppCompatActivity {
             janusClient.setCallState(EnumType.CallState.Incoming);
             //MediaPlayHelper.getInstance().playResMusic(R.raw.incoming_call, 1.0f, true);
             //RingPlayHelper.playRingTone(this, R.raw.incoming_call, true);
-            long[] pattern = new long[]{100L, 2000L, 1000L, 2000L, 1000L, 2000L};
+            /*long[] pattern = new long[]{100L, 2000L, 1000L, 2000L, 1000L, 2000L};
             if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
                 mVibrator.vibrate(VibrationEffect.createWaveform(pattern, 0));
             } else {
                 mVibrator.vibrate(pattern, 0);
-            }
+            }*/
         }
 
         // 6,处理 publishers,每个publisher 包含 id (feedId) 和 display,attach 到发布者的 handler 上,准备接收视频流,每个发布者都要 attach 一遍,然后协商 sdp, SFU,subscribeAttach 到发布者的 handle 上 [janusClient.subscribeAttach(feedId)]。将publisher 放到Room对象中的publishers, 在 janusClient.subscribeAttach(feedId) 中回调 videoRoomCallback.onSubscribeAttached

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

@@ -137,8 +137,9 @@ public class FragmentAudio extends SingleCallFragment implements View.OnClickLis
                     showName = interactionVO.getFromFrameFullName() + " " + interactionVO.getFromMemberName();
                     portraitImageView.setImageResource(R.drawable.face_customer);
 
-                    if (!isOutgoing && Constants.Companion.getUserRoleName().contains("护士") || Constants.Companion.getUserRoleName().contains("组长")) {
-                        transLinearLayout.setVisibility(View.VISIBLE);
+                    if (!isOutgoing /*&& Constants.Companion.getUserRoleName().contains("护士") || Constants.Companion.getUserRoleName().contains("组长")*/) {
+                        //transLinearLayout.setVisibility(View.VISIBLE);
+                        hangupLinearLayout.setVisibility(View.VISIBLE);
                     }
                 }
                 //是同事

+ 4 - 3
home/src/main/res/layout/adapter_watch_contacts_item.xml

@@ -21,7 +21,7 @@
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:layout_marginLeft="5dp"
-                android:text="玫瑰房"
+                android:text="-房"
                 android:textColor="@color/header"
                 android:textSize="12dp" />
 
@@ -32,7 +32,7 @@
                 android:layout_centerVertical="true"
                 android:layout_marginLeft="5dp"
                 android:layout_toRightOf="@+id/room_number_tv"
-                android:text="张女士"
+                android:text="张--"
                 android:textColor="#F78B8F"
                 android:textSize="16dp" />
 
@@ -43,7 +43,8 @@
                 android:layout_marginEnd="15dp"
                 android:layout_centerVertical="true"
                 android:layout_width="35dp"
-                android:layout_height="22dp"/>
+                android:layout_height="22dp"
+                android:visibility="gone"/>
             <Button
                 android:id="@+id/awci_btn_call_out"
                 android:layout_marginRight="15dp"

+ 10 - 10
home/src/main/res/layout/av_p2p_audio_incoming.xml

@@ -4,14 +4,14 @@
     android:layout_height="wrap_content"
     android:gravity="center_horizontal"
     android:orientation="vertical"
-    android:paddingLeft="5dp"
-    android:paddingRight="5dp"
-    android:paddingBottom="20dp">
+    android:paddingLeft="15dp"
+    android:paddingRight="15dp"
+    android:paddingBottom="10dp">
 
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="4dp"
         android:orientation="horizontal">
 
         <LinearLayout
@@ -25,8 +25,8 @@
 
             <ImageView
                 android:id="@+id/incomingTransImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/call_trans" />
 
             <TextView
@@ -49,8 +49,8 @@
 
             <ImageView
                 android:id="@+id/incomingHangupImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/av_hangup_selector" />
 
             <TextView
@@ -72,8 +72,8 @@
 
             <ImageView
                 android:id="@+id/acceptImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/av_audio_answer_selector" />
 
             <TextView

+ 8 - 8
home/src/main/res/layout/av_p2p_audio_outgoing.xml

@@ -5,7 +5,7 @@
     android:layout_height="wrap_content"
     android:gravity="center"
     android:orientation="vertical"
-    android:paddingBottom="30dp">
+    android:paddingBottom="10dp">
 
     <Chronometer
         android:id="@+id/durationTextView"
@@ -17,7 +17,7 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="4dp"
         android:orientation="horizontal">
 
         <LinearLayout
@@ -31,8 +31,8 @@
 
             <ImageView
                 android:id="@+id/muteImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/av_mute_selector" />
 
             <TextView
@@ -53,8 +53,8 @@
 
             <ImageView
                 android:id="@+id/outgoingHangupImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/av_hangup_selector" />
 
             <TextView
@@ -77,8 +77,8 @@
 
             <ImageView
                 android:id="@+id/speakerImageView"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
+                android:layout_width="54dp"
+                android:layout_height="54dp"
                 android:src="@drawable/av_speaker_selector" />
 
             <TextView

+ 5 - 6
home/src/main/res/layout/fragment_audio.xml

@@ -9,7 +9,7 @@
         android:id="@+id/minimizeImageView"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:padding="20dp"
+        android:padding="10dp"
         android:src="@drawable/av_minimize"
         android:visibility="gone"/>
 
@@ -23,16 +23,16 @@
 
         <ImageView
             android:id="@+id/portraitImageView"
-            android:layout_width="120dp"
-            android:layout_height="120dp"
-            android:layout_marginTop="80dp"
+            android:layout_width="60dp"
+            android:layout_height="60dp"
+            android:layout_marginTop="10dp"
             android:src="@drawable/av_default_header" />
 
         <TextView
             android:id="@+id/nameTextView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="20dp"
+            android:layout_marginTop="5dp"
             android:text=""
             android:textColor="@android:color/white" />
 
@@ -69,7 +69,6 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginBottom="130dp"
         android:textColor="#FFFFFF"
         android:textSize="16sp" />
 

+ 2 - 2
home/src/main/res/layout/user_setting_layout.xml

@@ -20,8 +20,8 @@
                 android:gravity="center_horizontal">
                 <ImageView
                     android:src="@mipmap/launcher"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"/>
             </LinearLayout>
 
             <LinearLayout

+ 6 - 4
home/src/main/res/layout/watch_activity_home2.xml

@@ -14,7 +14,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:orientation="vertical"
-            android:visibility="gone">
+            android:visibility="visible">
 
             <LinearLayout
                 android:layout_width="match_parent"
@@ -98,7 +98,8 @@
                         android:layout_height="134dp"
                         android:gravity="center"
                         android:layout_alignParentBottom="true"
-                        android:background="#F78B8F">
+                        android:background="#F78B8F"
+                        android:visibility="gone">
 
                         <TextView
                             android:layout_width="wrap_content"
@@ -136,7 +137,7 @@
                             android:singleLine="true"
                             android:ellipsize="marquee"
                             android:focusable="true"
-                            android:focusableInTouchMode="true"/>
+                            android:focusableInTouchMode="true" />
 
                         <TextView
                             android:id="@+id/watch_role_name_tv"
@@ -199,7 +200,8 @@
                             android:layout_weight="1"
                             android:background="#5C34A9"
                             android:orientation="vertical"
-                            android:gravity="center">
+                            android:gravity="center"
+                            android:visibility="gone">
 
                             <ImageView
                                 android:layout_width="18dp"