Fix handling of unavailable network in call barring activity.

Also remove some duplicated code.

Change-Id: I98aacd8b8f99824e8b0bd71fa140a6db3e8f4f00