I have an application which exhibits two different behaviors, possible
related to Android 2.2 vs. Android 2.1 update 1.

The application uses the proximity sensor to determine when the phone
is "near" the ear. If a "near" condition is detected, I get the
applications window and set the LayoutParams to FLAG_NOT_TOUCHABLE and
FLAG_FULLSCREEN. In general, this has the desired effect of preventing
accidental screen touches by the ear from causing any unwanted action.
However...

With my Android V2.2 phones: If I am in the process of sliding open
the Status Bar at the time the proximity sensor detects a "near"
condition, the Status Bar immediately closes and all is good.

With my Android V2.1 phones: If I have the Status Bar partially open,
detect a "near" condition, and then simultaneously (more or less)
revert to a "far" condition while releasing the Status Bar, the Status
Bar is left in a partially opened state. Meanwhile, part of my
application remains visible, but not touchable. I can simulate this at
will with 2.1 phones, but can not do so at all with 2.2 phones.

My questions:

1) Does anyone know why this behavior is different, and if it is
indeed related to different Android versions?

2) Is there a way that an application (such as mine!) can detect if
the Status Bar is opened, or in the process of sliding open, and tell
it to close?

Thanks for any help you can offer.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to