562935844@qq.com
2022-06-28 a780f0b8d0ccec90d359c0c554f07d5afde9554c
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneReverseCallActivity.java
@@ -58,7 +58,7 @@
    private TextView tv_lp_calltime;
    //参数
    private boolean isAnswer;//是否已经接听了
    private boolean isAnswer = false;//是否已经接听了
    private int callTime;//通话时间
    //倒计时
    private CountDownTimer mCountDownTimer;
@@ -71,7 +71,6 @@
    private CoreListenerStub mCoreListener;
    private String deviceSipAccount;//设备SIP账号
    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -86,8 +85,7 @@
        initCallBack();
        initCountDownTimer();
        initLinphone();
        initVibrator();
//        initVibrator();
    }
    /**
@@ -111,13 +109,9 @@
            mCountDownTimer.cancel();
            mCountDownTimer = null;
        }
        //5.
        onDestroyLinphone();
        HDLLog.i(TAG, "onDestroy");
    }
    /**
     * initView
@@ -139,7 +133,8 @@
        tv_lp_calltime = findViewById(R.id.tv_lp_calltime);
        setWidthHeightWithRatio(ll_video_lp_rendering, 16, 9);
        iv_lp_screenshot.setEnabled(false);
        iv_lp_unlock.setEnabled(false);
    }
    /**
@@ -152,7 +147,6 @@
            if (!TextUtils.isEmpty(titleName)) {
                tv_lp_title.setText(titleName);
            }
            deviceSipAccount = extras.getString(HDLLinphoneKit.KEY_SIP_ACCOUNT);
        }
    }
@@ -213,7 +207,6 @@
            @Override
            public void onTick(long millisUntilFinished) {
                if (!HDLLinphoneReverseCallActivity.this.isFinishing()) {
                }
            }
@@ -317,6 +310,9 @@
        if (HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener() != null) {
            HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener().onAnswerAction();
        }
        iv_lp_screenshot.setEnabled(true);
        iv_lp_unlock.setEnabled(true);
    }
    /****************开锁成功********/
@@ -351,7 +347,6 @@
        int temp1 = Integer.parseInt(timer_lp_calltime.getText().toString().split(":")[1]);
        return temp0 * 60 + temp1;
    }
    /****************封装常用方法********/
    /**
@@ -423,7 +418,6 @@
        video_lp_rendering2 = null;
    }
    /**
     * 初始化震动器
     */
@@ -449,8 +443,8 @@
    /**
     * 关闭震动器
     */
    void cancelVibrator(){
        if(mVibrator != null){
    void cancelVibrator() {
        if (mVibrator != null) {
            mVibrator.cancel();
            mVibrator = null;
        }