Correctly cast parent activity.

Change-Id: I71fa2551375b050e8aa3bb7be01b4e9397bf80bc