Merge changes 8935,8936

* changes:
  Fix the IOException in wallpaper restore -- the padding isn't required at the end.
  Fix bug 1982892 - batteryservice turns off device even while plugged in