OSDN Git Service

DO NOT MERGE: Allow regular ambient light sensor sampling in doze mode.
authorJulius D'souza <jdsouza@google.com>
Wed, 4 Jan 2017 23:05:42 +0000 (23:05 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 4 Jan 2017 23:05:42 +0000 (23:05 +0000)
am: bbfdf7ad23

Change-Id: Iafc7d24b276db9b145709e7af80e03292c1ce735

1  2 
core/res/res/values/config.xml
core/res/res/values/symbols.xml
services/core/java/com/android/server/display/AutomaticBrightnessController.java
services/core/java/com/android/server/display/DisplayPowerController.java

Simple merge
    <java-symbol type="array" name="config_testLocationProviders" />
    <java-symbol type="array" name="config_defaultNotificationVibePattern" />
    <java-symbol type="array" name="config_notificationFallbackVibePattern" />
 -  <java-symbol type="array" name="config_onlySingleDcAllowed" />
    <java-symbol type="bool" name="config_useNewSensorSamplesForDoze" />
+   <java-symbol type="bool" name="config_allowAutoBrightnessActiveDozeLightSensor" />
    <java-symbol type="bool" name="config_useAttentionLight" />
    <java-symbol type="bool" name="config_animateScreenLights" />
    <java-symbol type="bool" name="config_automatic_brightness_available" />
@@@ -327,9 -335,14 +336,12 @@@ class AutomaticBrightnessController 
              }
          } else {
              if (mLightSensorEnabled) {
+                 if (DEBUG) {
+                     Slog.d(TAG, "setLightSensorEnabled: sensor disabled");
+                 }
                  mLightSensorEnabled = false;
                  mRecentLightSamples = 0;
 -                if (mInitialLightSensorRate > 0) {
 -                    mCurrentLightSensorRate = mInitialLightSensorRate;
 -                }
 +                mCurrentLightSensorRate = -1;
                  mHandler.removeMessages(MSG_UPDATE_AMBIENT_LUX);
                  mSensorManager.unregisterListener(mLightSensorListener);
              }