Fix NP when activity detaches from fragment

Change-Id: I9cffdd137683b5a9fa45e21a22e859919a23cd8a
Merge "Fix NP when activity detaches from fragment" into cm-11.0