Giter VIP home page Giter VIP logo

Comments (12)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
so you're saying when you plugged in the charger, screen was NOT locked but 
brightness still wasn't set. does this happen if you have only one rule? 

Original comment by sv767%[email protected] on 6 Oct 2010 at 4:54

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
yes. I start the test with the screen unlocked. Plug in the charger. The screen 
brightness is not changed until after i click the lock button on the phone. 
When i do this the screen is turned of, by design, then i click the button on 
the phone again to unlock and the unlock screen comes up at the correct 
brightness. Currently i only have this rule and the reduce brightness rule 
running. 

Original comment by [email protected] on 6 Oct 2010 at 5:00

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Confirmed defect using "Power connected"->"Change Screen Brightness".  
Omnidroid said it did it in the logs, but no brightness actually changed.  Once 
I locked the screen though and then went to unlock it, the screen was dimmed.

It looks like we're changing the brightness by changing the system settings 
(from 
http://code.google.com/p/omnidroid/source/browse/trunk/omnidroid/src/edu/nyu/cs/
omnidroid/app/controller/external/actions/OmniActionService.java):

    int brightness = intent.getIntExtra(SetScreenBrightnessAction.PARAM_BRIGHTNESS, 200);
    Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, brightness);
    ResultProcessor.process(this, intent, ResultProcessor.RESULT_SUCCESS, null);


Which is good, we're specifying it in the settings, but I'm assuming this isn't 
activated immediately, just only once you go to unlock does it check this.

I found an example on the web that might help us do it immediately 
(http://www.tutorialforandroid.com/2009/01/changing-screen-brightness.html):
    try {
      IHardwareService hardware = IHardwareService.Stub.asInterface(
ServiceManager.getService("hardware"));
      if (hardware != null) {
        hardware.setScreenBacklight(brightness);
      }
    } catch (RemoteException doe) {
    } 

Original comment by [email protected] on 20 Oct 2010 at 7:52

  • Changed state: Accepted

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Salome points out this thread about it not being an API call and may change at 
Google's whim:

http://markmail.org/message/zpsh67wetmgims5b#query:+page:1+mid:42x4boeiboyoiyfg+
state:results

If it works though, it seems like the way to do it until a proper API call is 
available.

Original comment by [email protected] on 22 Oct 2010 at 2:33

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I don't quite understand the context here. I was just wondering, is it because 
one rule killed another. For example, the conditions of two rules are both met, 
then the adaptation is undeterministic.

Original comment by [email protected] on 31 May 2011 at 9:42

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
No.  It has to do with when android updates the screen brightness based on the 
data stored in the system settings.  It doesn't update the hardware 
immediately.  We're setting the system settings (see my first code block), but 
since it doesn't go into effect immediately the result isn't actually visible 
until android decides to update the hardware (after a lock sequeence).  If we 
use the IHardwareService we can issue the hardware to update immediately.

Original comment by [email protected] on 11 Jun 2011 at 1:20

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
why are you talking to yourself publicly? do you need a hug?

Original comment by [email protected] on 11 Jun 2011 at 11:50

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Sure who couldn't use a hug now and then, but "[email protected]" isn't 
actually me. :-)

Original comment by [email protected] on 13 Jun 2011 at 3:10

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
[deleted comment]

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
you guys are funny. I am your group member, just interested in this great 
project :-)

Original comment by [email protected] on 13 Jun 2011 at 3:16

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
:D:D yeah I see now. Actually I was saying the other day that andrew is the 
most comsci name.

Original comment by [email protected] on 13 Jun 2011 at 6:12

from omnidroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Oh, it's a different person, I also thought that Andrew was talking to himself!

Original comment by [email protected] on 13 Jun 2011 at 2:56

from omnidroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.