Add back hardware key settings.

Change-Id: I925fd9d9c02b86d8e93c8b9e25870433f7c20bde

Patchset: 7
http://review.cyanogenmod.org/#/c/54219/

Adjustments to code to remove stuffs that temasek rom already has

(cherry picked from commit d722f446a5fd6c8fd03acf5a5c35fddbf5ee1222)