Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard Backlight for D4 set to screen brightness #3

Open
wants to merge 2 commits into
base: cm-10.1
Choose a base branch
from
Open

Keyboard Backlight for D4 set to screen brightness #3

wants to merge 2 commits into from

Conversation

jsnweitzel
Copy link

modified: services/java/com/android/server/power/DisplayPowerController.java
modified: services/java/com/android/server/power/PowerManagerService.java

Change-Id: I0d7cacff6377c69522a2d2e90f115722c5ad662f

	modified:   services/java/com/android/server/power/DisplayPowerController.java
	modified:   services/java/com/android/server/power/PowerManagerService.java

Change-Id: I0d7cacff6377c69522a2d2e90f115722c5ad662f
@jsnweitzel
Copy link
Author

Ok your right this kills the razr...wouldn't even boot. The answer really needs to be in the device tree I suppose.

@Hashcode
Copy link
Member

Hashcode commented Jan 8, 2013

or possibly add a NULL check for mLightsService

@jsnweitzel
Copy link
Author

That thought occurred to me but i wasn't sure of the best location. Show me where to put it and I can try it out.

@Hashcode
Copy link
Member

Hashcode commented Jan 9, 2013

Maybe like this?

                if (mKeyboardLight != NULL) { // new check for NULL
                    if (now > mLastUserActivityTime + KEYBOARD_ON_DURATION) {  
                        mKeyboardLight.setBrightness(0);  
                    } else if (mContext.getResources().getConfiguration().hardKeyboardHidden != Configuration.HARDKEYBOARDHIDDEN_YES){  
                        mKeyboardLight.setBrightness(mDisplayPowerRequest.screenBrightness);  
                        nextTimeout = now + KEYBOARD_ON_DURATION;  
                    } else if (mContext.getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES){  
                        mKeyboardLight.setBrightness(0);  
                    }
                } // end of the NULL check block

@jsnweitzel
Copy link
Author

Tried what you suggested and a few variations. None worked. I will keep trying when I have some time.

dhacker29 pushed a commit that referenced this pull request Feb 7, 2013
patch #2 - fixed typos
patch #3 - some fixes and translated unintentionally untranslated
  strings

Change-Id: I288bf43a027286c4c08f2a7761fc2bc19b77f04c
@jsnweitzel
Copy link
Author

Check this out LiquidSmooth-Old/android_frameworks_base@a51ac16

You can remove the liblight hack in the d4 tree and keyboard light will go out when not used/closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants