Menu

#353 [Samsung Transform] Screen lock engages at wrong times

NextRelease
nobody
None
Medium
Defect
driver
2011-05-07
2010-11-07
Anonymous
No

Originally created by: dan.harl...@gmail.com

What steps will reproduce the problem?
1. Place an incoming call to the phone.  Answer it, but don't hold the handset to your ear, just leave it on the desk.
2. The screen doesn't lock--so far, so good.
3. Pick up the phone and hold it to your ear for a while.  This is where the screen should lock, but it doesn't.
4. Move the phone away from your ear.  The screen locks immediately.
5. Unlock the screen and dial some digits on the numeric keypad, or just wait a while without holding the phone to your ear, and after a short while the screen locks again.

What is the expected output? What do you see instead?
If the slide unlocker is disabled, I expect it not to engage at all.
If it is enabled, I expect it to engage shortly after I put the phone to my ear, rather than wait until I take it away.  I also expect it not to engage while I am holding the handset in front of me, entering digits on the touch pad.

What version of the product are you using? On what operating system?
According to Android Market (on my Samsung Transform), I am using 0.00-15 of CSipSimple.

Please provide any additional information below.
It doesn't matter if "don't use slide unlocker" option is enabled or disabled.  FWIW, it looks like the app starts reading the "proximity sensor" backwards, starting with the first time you hold the phone to your ear.

Discussion

  • Anonymous

    Anonymous - 2010-11-13

    Originally posted by: r3gis...@gmail.com

    Do you know whether the samsung transform has a 'true' proximity sensor?
    Some device / some ROM, use a light sensor to simulate screen-locking. And it require developers to change their approach about proximity sensor.

    For now screen locking is a little bit complicated. I'll try to explain it and tell me in which case your device seems to be :
    * If there is no proximity sensor (detected by the application) :
           -> Locking is based on timers. After making the call is established it waits 5 seconds before showing an overlay with a slide to unlock interface. Then if you unlock manually, you can press on dialpad for example and it will wait 10seconds after the last keypress to lock the screen again.

    * If there is a proximity sensor and device announce that I can use it to switch off the screen (excepted for HTC devices on Wifi were there is a bug from HTC, or if you activate keep awake while in call, which is the setting that allow workaround to the HTC problem) :
           -> I use exactly the same method than the telephony application to turn off the screen when proximity sensor is activated (here, no slide to unlock overlay, just screen off and on). It should be really reliable since it's the same method used by the telephony application if there is a 'proximity' sensor (not a light sensor)

    * If there is a proximity sensor but not in last case :
          -> I try to manually detect the proximity sensor values. Here I use same values than the one in the android opensource projects, but theses values can be changed by the manufacturer :/... When I detect that the ear is near of the phone I show the slide to unlock screen. And hide it when far from screen.
    You are maybe in this case. Unfortunately in this case, if manufacturer choose arbitrary values for proximity sensor (I mean values that are not the one advised by android OS), you can get a strange behavior... maybe like the one you are describing.

    So, first thing that I need to know is whether you are in case 1 or case 3.
    You are probably in case 3.
    In this case, ensure that keep awake while in call is not activated in settings... should not be the default.. but worth to check to be sure you are not using the deprecated method while the powerful method is available on your phone.
    Then if your phone actually announce a proximity sensor but doesn't announce that it could be used to switch off the screen.... That's problematic. It means that samsung (once again), has done things differently than others android OS makers.
    What could help me is you to install an android application that allow to debug proximity sensor values (For example ProxyLightSensor - it allow to list sensors and show a picture that grow and reduce according to the proximity).

    For information "don't use slide unlocker" has nothing to do with screen locker. Actually it's about the way you take or decline an incoming call (the label is maybe not really clever ;), I'll try to find another label for this setting ).

    Summary: [Samsung Transform] Screen lock engages at wrong times
    Labels: Manufacturer-driver
    Status: Accepted

     
  • Anonymous

    Anonymous - 2010-11-16

    Originally posted by: dcm...@gmail.com

    I'm really impressed with this app!

    I'm having the exact same issue with my Samsung Moment though. I'm almost certain it is using a proximity sensor rather than a light sensor.  I've been able to reproduce this issue simply by placing my thumb on or very close to the earpiece.  I'll install ProxyLightSensor and then post back on what I find as soon as I can.

     
  • Anonymous

    Anonymous - 2010-11-16

    Originally posted by: dcm...@gmail.com

    Okay, that didn't take long. :-)  I tried with a couple of different sensor apps and both produce the same results.  When nothing is near the earpiece the value is zero.  If I move my thumb close enough (like I were putting the phone to my ear) the value turns to one.  What other data could I provide to help?

     
  • Anonymous

    Anonymous - 2010-11-16

    Originally posted by: dan.harl...@gmail.com

    Hello,

    I don't know for certain, but the Transform does have a rear-facing
    camera, so I'd think it would use that.

    It definitely isn't timer-based.  If I place a call and never put it
    up to my ear, it never locks.  However, after the first time I put it
    to my ear during a call, the screen only locks the moment the phone is
    -removed- from the ear.  As long as it is being held to the ear, the
    screen remains active--exactly the opposite of how it is meant to
    behave.

    During a regular call, my phone turns off the screen when I hold the
    handset to my ear, and turns it back on again when I take it away.

    It sounds like the Transform is sending the opposite signal.

    "Keep awake while on call" was enabled.  After disabling it, the phone
    now works exactly as it does in a regular call!  The screen turns off
    when held to the ear, and turns back on again when moved away.  I
    think I'll be leaving it like this.  :-)

    That wouldn't surprise me.  BTW, I also noticed that the audio in a
    SIP call always comes through the speaker instead of the earpiece.  At
    best, the "speaker" button on the display makes no difference; at
    worst, it causes a force close.

    That makes sense, now that I am more familiar with the device.  It
    might be clearer to call it something like "Push button to answer",
    and in the text below it, "Instead of the slide control".

    Thanks for a great app, and for your quick response!

    Dan  <><
    dan.harling@gmail.com

     
  • Anonymous

    Anonymous - 2010-11-16

    Originally posted by: dcm...@gmail.com

    Okay, I just tried what Dan did (the keep screen awake) and that did not seem to work. That is I still seem to have the opposite behaviour. The screen locks when nothing is near the earpiece and unlocks if something is near the earpiece.

     
  • Anonymous

    Anonymous - 2010-11-16

    Originally posted by: r3gis...@gmail.com

    @dan : ok. Indeed if keep awake while in call was enabled the deprecated method was used.
    As for Speaker/Earpiece there is open issue about that on samsung.

    @dcmair : did you try to deactivate "keep awake while in call" setting? (Strange thing if that's automatically set to true on your phone too... I've to check that).
    As for the info you give about 0.0 / 1.0 thanks a lot for that, it absolutely explain what we observe ... samsung has implemented things just the opposite than others !
    Extract from android sdk :
    """
    Sensor.TYPE_PROXIMITY:
    values[0]: Proximity sensor distance measured in centimeters
    Note that some proximity sensors only support a binary "close" or "far" measurement. In this case, the sensor should report its maxRange value in the "far" state and a value less than maxRange in the "near" state.
    """

    ... So... 0 should be near (your thumb near to the earpiece) and 1 should be far (nothing in front of the earpiece) !!!
    Manufacturer made the life of android devs so hard sometimes.... If only they take care to read the docs of the platform their are implementing... (the issue about speaker/earpiece is the same kind of problem... samsung doesn't really respect the global SDK....).

    Fortunately I've developed ways to workaround this kind of ~adaptations~ made by manufacturers.... (Keep awake while in call is this kind of settings that allow workaround for some HTC issues, and should not be activated on other devices).
    So, @dcmair if you confirm that on your "keep awake while in call" is turned off, I'll try to code a workaround for you device.

    To do so, I'll need some infos about your device code name. The easier way to send it to me is to use one of the latest dev version (available on download section),
    then go in Help and click on record logs. And then go back again in help and stop record and send logs. (If you can just after starting a record to make a call and try to activate, deactivate proximity sensor several time it could be cool, but your first analysis using the sensor apps should be enough)

     
  • Anonymous

    Anonymous - 2010-11-17

    Originally posted by: dcm...@gmail.com

    r3gis.3R, yes I've tried turning the keep awake while on call off and on (it defaulted to off for me btw) and that does not seem to have had any effect at all. I'll try to download one of the dev versions later today and get you the information.  Many thanks for the quick responses on this issue!

     
  • Anonymous

    Anonymous - 2010-11-19

    Originally posted by: dcm...@gmail.com

    Okay I just sent the logs from my phone where I reproduced the locking/unlocking. I may have accidentally sent the logs twice so my apologies if I did.  Let me know what else I can do to help. Unfortunately I'm not a coder or I'd offer to help write a patch.

     
  • Anonymous

    Anonymous - 2011-05-07

    Originally posted by: r3gis...@gmail.com

    I forgot to update the issue :/. Sorry my bad.
    So there is now an option in csipsimple to "invert proximity sensor". That may solve things for moment that seems to has things implemented just the opposite way.
    To activate it (if not autodetected), you have to switch to ExpertModeSetting (see wiki page about this mode), and then in Settings > User interface > Activate "invert proximity sensor".

    Status: NextRelease

     

Log in to post a comment.