Comment 69 for bug 604635

Revision history for this message
In , Chris Jones (jones-chris-g) wrote :

(In reply to Justin Lebar [:jlebar] from comment #37)
> How long after inactivity do you wait before dimming the screen?

Use a setting.

> How much do you dim the screen?

Maybe use a setting, but I'm not sure this needs to be configurable.

> Do you do it gradually, or do you do it stepwise? How many steps, and at what levels?

Maybe setting, maybe hard code.

> How does this interact with the phone's
> ambient light sensor? (For example, if an app requests a max-brightness
> lock but it's really dim inside, do you pin the screen to the true max
> brightness?)
>

Depends on how max-brightness is defined. How is it defined?

> I can imagine wake locks being transparent to at least some of this code,
> but it's not necessarily simple. For example, the screen.enabled code has
> to know whether the screen is actually enabled. If we allowed the code to
> disable the screen and then used a wake lock to keep the screen on, I'm not
> sure how we'd make this work.

That's something the wake lock should specify. Android says, "Makes sure the device is on at the level you asked when you created the wake lock.", which sounds like the request is "clipped" to the power level the device is at when the request is made. There's additionally a "ACQUIRE_CAUSES_WAKEUP : Normally wake locks don't actually wake the device, they just cause it to remain on once it's already on." flag, which makes it sound like clients have to explicitly request upping the power level. We should investigate that.