Hi all!

I'm trying to control to turn screen off/on. I'm using device HTC G1
(1.6).
to turn off screen I write:
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 0f;
getWindow().setAttributes(lp);

but if i want to turn on screen

lp.screenBrightness = 1f;
getWindow().setAttributes(lp);

screen not turn on. if lp.screenBrightness = 0.02f; screen change
bright, but not turn off.

Which right way to control by screen? Could anyone help me?

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

Reply via email to