linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Proximity sensor fix for Droid/Milestone


From: Henrique Grolli
Subject: [Linphone-developers] Proximity sensor fix for Droid/Milestone
Date: Thu, 12 Aug 2010 16:00:43 -0300

I downloaded linphone for my Brazilian Milestone and realize the proximity sensor wasnt doing anything on the softphone. After checking out the "Android Sensor Data" app source code (ref: http://code.google.com/p/abscideturasd/) and the linphone source code. I found a different kind of comparison of sensor data as fallows:

Android Sensor Data do the fallowing comparison:
if (event.values[0] <= 3) {

And linphone was doing:
if (LinphoneService.instance().getLinphoneCore().isIncall()  && event.values[0] != event.sensor.getMaximumRange() && event.values[0] < 3) {

So i changed to:
if (LinphoneService.instance().getLinphoneCore().isIncall() && event.values[0] <= 3.0) {

Built a test apk and it worked like a charm. I couldn't test it on other phones but since Android Sensor Data works on most phones it should be fine. The patch for LinphoneActivity.java is attached for review. Thanks for this great software, best softphone i found for android by far.
--
Henrique Grolli Bassotto

Attachment: proximity_sensor.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]