[1/2] Base: recover last location state during on/off switch

Based on this SlimRoms commit:
https://gerrit.slimroms.net/#/c/1421