Merge changes Iccea764b,I624b559e into jb-mr1-dev

* changes:
  Improve the screen dim duration calculation.
  Implement screen on hack for wireless chargers.