g3: configure offmode charging

* mercilessly kanged from oppo

Change-Id: I3e9756f298ae5cffa7b7710cec86ada49ce5e204
Merge remote-tracking branch 'cm/cm-12.0' into HEAD