Safeguard callback receiver to prevent crashes.

  Bug: 13765929

It is safe to add these checks here. The receiver is only set in
the constructor, and it's only created in one place, which is
onCreate. And the parameter is the Activity itself, so it can
never be null.
This means the NPE can only happen if onCameraOpened is called after
removeCallbackReceiver is called, which is in onDestroy of the activity.
In this case it's safe to exit.

Change-Id: Ibffd6d54679b564a11b3e83319896241f2e306ad
1 file changed