|
@@ -4,6 +4,7 @@ import android.bluetooth.BluetoothGatt
|
|
|
import android.bluetooth.BluetoothGattCharacteristic
|
|
|
import android.content.*
|
|
|
import android.content.pm.PackageManager
|
|
|
+import android.graphics.Color
|
|
|
import android.media.AudioManager
|
|
|
import android.net.ConnectivityManager
|
|
|
import android.net.Uri
|
|
@@ -218,6 +219,9 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
|
} else {
|
|
|
startService(serviceIntent)
|
|
|
}
|
|
|
+ view_title_layout_tv_sip.visibility = View.VISIBLE
|
|
|
+ } else {
|
|
|
+ view_title_layout_tv_sip.visibility = View.GONE
|
|
|
}
|
|
|
|
|
|
if (!Settings.System.canWrite(this)) {
|
|
@@ -827,7 +831,7 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
|
SoundPoolManager.getInstance().release()
|
|
|
|
|
|
//关闭通知
|
|
|
- if (singleDevice!!.getCharacteristic() != null) {
|
|
|
+ if (singleDevice?.getCharacteristic() != null) {
|
|
|
BleManager.getInstance().stopNotify(
|
|
|
singleDevice!!.getDevice(),
|
|
|
singleDevice!!.getCharacteristic().getService().getUuid().toString(),
|
|
@@ -1471,7 +1475,7 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
|
if (messageEvent.message is String) run {
|
|
|
val status = messageEvent.message as String
|
|
|
Log.d("sip", "sip regist status: " + status)
|
|
|
- updateStatus(status)
|
|
|
+ //updateStatus(status)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2097,12 +2101,15 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
|
private fun updateTcpState() {
|
|
|
if (Constant.TCP_CONNECTED) {
|
|
|
view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success)
|
|
|
- view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_b)
|
|
|
+ //view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_b)
|
|
|
+ view_title_layout_tv_sip.setTextColor(Color.DKGRAY)
|
|
|
} else {
|
|
|
- view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_fail)
|
|
|
- view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_h)
|
|
|
+ view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_nor)
|
|
|
+ //view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_h)
|
|
|
+ view_title_layout_tv_sip.setTextColor(Color.RED)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
private fun updateLeftBtState(state: String) {
|
|
|
menu_home.setBackgroundResource(R.drawable.shape_main_bt_bg)
|
|
|
menu_home.setTextColor(getResources().getColor(R.color.white))
|