Allow for the possibility of null ActivityContainer

When BinderProxy is passed in as the IBinder for
getEnclosingActivityContainer the activity manager cannot turn it into
an ActivityRecord. This causes NPE in ActivityThread which is Not Good
(tm).

Allowing null to be returned when requesting an ActivityContainer and
handling it appropriately fixes this bug.

Fixes bug 12473669.

Change-Id: I6937636042f8853b3ddc2df40be010e7391e41a5
2 files changed