Improve android secure handling

Change-Id: I9e1c7f4a8353b7be51e1a54bf5d506c9dce70da2
Merge "Improve android secure handling" into android-4.4