Battery style: code optimization - step2

code sync with CM patchset 11
http://review.cyanogenmod.org/#/c/82420/11

Change-Id: Ie03ee041cd786be11cd700db5e15a8fe69df5cde