Fix exceptions in ActivityRecognition platform stack.

b/16348349

Change-Id: I1f85283c86130b86389a1be7da49904658b0558c
7 files changed