背光之关闭(turnOff)

相关文件:

frameworks/base/services/java/com/android/server/PowerManagerService.java

frameworks/base/services/java/com/android/server/NotificationManagerService.java 

 

 

    private void updateLightsLocked()

对于mBatteryLow是mBatteryLow和mBatteryCharging的时候电池的指示是要显示的,否则关闭。android做成平板机,netbook的时候,一般是有电池指示灯的。
另外:
        // we only flash if screen is off and persistent pulsing is enabled
        // and we are not currently in a call
        if (mLedNotification == null || mScreenOn || mInCall) {
            mNotificationLight.turnOff();
        }

在电源管理的manager代码中,在函数中可见,灯在LCD关闭的时候是要关的。
private int setScreenStateLocked(boolean on) { int err = Power.setScreenState(on); if (err == 0) { mLastScreenOnTime = (on ? SystemClock.elapsedRealtime() : 0); if (mUseSoftwareAutoBrightness) { enableLightSensor(on); if (!on) { // make sure button and key backlights are off too mButtonLight.turnOff(); mKeyboardLight.turnOff(); // clear current value so we will update based on the new conditions // when the sensor is reenabled. mLightSensorValue = -1; // reset our highest light sensor value when the screen turns off mHighestLightSensorValue = -1; } } } return err;  
注意 mUseSoftwareAutoBrightness
很多光现象都与之相关,代码查查就好了。SCREEN_BRIGHTNESS也相关的。
  

 

你可能感兴趣的:(背光之关闭(turnOff))