Fixed few crashes and applied code formatting to all classes

Crashes: Notification API level, ActionID constants in all
actions, SensorService close crash from onDestroy and
few more