|
|
|
@ -189,7 +189,7 @@ CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPa
|
|
|
|
|
m_javaService = env->NewGlobalRef(service);
|
|
|
|
|
|
|
|
|
|
jclass classService = env->GetObjectClass(m_javaService);
|
|
|
|
|
mRegisterHeartbeatMid = env->GetMethodID(classService, "registerHeartbeatTimer", "(I)V");
|
|
|
|
|
mRegisterHeartbeatMid = env->GetMethodID(classService, "registerHeartbeatTimer", "(IJ)V");
|
|
|
|
|
mUpdateTimeMid = env->GetMethodID(classService, "updateTime", "(J)Z");
|
|
|
|
|
mUpdateCaptureScheduleMid = env->GetMethodID(classService, "updateCaptureSchedule", "(J)Z");
|
|
|
|
|
mStartRecordingMid = env->GetMethodID(classService, "startRecording", "(IJIIIIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
|
|
|
|
@ -850,7 +850,7 @@ bool CPhoneDevice::ReleaseWakelock(unsigned long wakelock)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IDevice::timer_uid_t CPhoneDevice::RegisterHeartbeat(unsigned int timerType, unsigned int timeout)
|
|
|
|
|
IDevice::timer_uid_t CPhoneDevice::RegisterHeartbeat(unsigned int timerType, unsigned int timeout, time_t tsForNextPhoto)
|
|
|
|
|
{
|
|
|
|
|
mHeartbeatStartTime = time(NULL);
|
|
|
|
|
mHeartbeatDuration = timeout;
|
|
|
|
@ -866,7 +866,11 @@ IDevice::timer_uid_t CPhoneDevice::RegisterHeartbeat(unsigned int timerType, uns
|
|
|
|
|
ALOGE("Failed to get JNI Env");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
env->CallVoidMethod(m_javaService, mRegisterHeartbeatMid, (jint)timeout);
|
|
|
|
|
#ifdef ALIGN_HB_TIMER_TO_PHOTO
|
|
|
|
|
env->CallVoidMethod(m_javaService, mRegisterHeartbeatMid, (jint)timeout, (jlong)tsForNextPhoto);
|
|
|
|
|
#else
|
|
|
|
|
env->CallVoidMethod(m_javaService, mRegisterHeartbeatMid, (jint)timeout, 0);
|
|
|
|
|
#endif
|
|
|
|
|
if (didAttachThread)
|
|
|
|
|
{
|
|
|
|
|
m_vm->DetachCurrentThread();
|
|
|
|
@ -1232,8 +1236,6 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textSize = ft2->getTextSize(it->text, fontSize, thickness, &baseline);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline);
|
|
|
|
|
|
|
|
|
|