fix memory leak. fix sleep wake lock issue. grab some commits from CM.

Change-Id: I6cf08d8938d1c400b80ea440885a687dc60046c7