@Override public void onLeftRightChoice(int whichHandle) { Log.d(THIS_FILE, "Call controls receive info from slider " + whichHandle); if (controlMode != MODE_LOCKER) { // Oups we are not in locker mode and we get a trigger from // locker... // Should not happen... but... to be sure return; } switch (whichHandle) { case LEFT_HANDLE: Log.d(THIS_FILE, "We take the call"); dispatchTriggerEvent(IOnCallActionTrigger.TAKE_CALL); break; case RIGHT_HANDLE: Log.d(THIS_FILE, "We clear the call"); dispatchTriggerEvent(IOnCallActionTrigger.DONT_TAKE_CALL); default: break; } }
@Override public void on_zrtp_show_sas(int callId, pj_str_t sas, int verified) { String sasString = PjSipService.pjStrToString(sas); Log.d(THIS_FILE, "ZRTP show SAS " + sasString + " verified : " + verified); if (verified != 1) { SipCallSession callInfo = pjService.getPublicCallInfo(callId); Intent zrtpIntent = new Intent(SipManager.ACTION_ZRTP_SHOW_SAS); zrtpIntent.putExtra(Intent.EXTRA_SUBJECT, sasString); zrtpIntent.putExtra(SipManager.EXTRA_CALL_INFO, callInfo); pjService.service.sendBroadcast(zrtpIntent, SipManager.PERMISSION_USE_SIP); } else { updateZrtpInfos(callId); } }
public VideoCaptureCapability(String preferenceValue) { if (!TextUtils.isEmpty(preferenceValue)) { String[] size_fps = preferenceValue.split("@"); if (size_fps.length == 2) { String[] width_height = size_fps[0].split("x"); if (width_height.length == 2) { try { width = Integer.parseInt(width_height[0]); height = Integer.parseInt(width_height[1]); fps = Integer.parseInt(size_fps[1]); } catch (NumberFormatException e) { Log.e(THIS_FILE, "Cannot parse the preference for video capture cap"); } } } } }
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { Log.d(THIS_FILE, "Hey you hit the key : " + keyCode); if (controlMode == MODE_LOCKER) { switch (keyCode) { case KeyEvent.KEYCODE_CALL: dispatchTriggerEvent(IOnCallActionTrigger.TAKE_CALL); return true; case KeyEvent.KEYCODE_ENDCALL: // case KeyEvent.KEYCODE_POWER: dispatchTriggerEvent(IOnCallActionTrigger.REJECT_CALL); return true; default: break; } } return super.onKeyDown(keyCode, event); }