Catch exception where SwipeDismissLayout cannot monitor screen off.

Monitoring screen off uses a BroadcastReceiver. However, there are
occasionally uses where SwipeDismissLayout is used in a context where
it cannot use a BroadcastReceiver, notably when used inside of one,
therefore we need to catch and handle the case where it is not applicable.

Bug: 36034260
Change-Id: I253875623a28532dbc8a2dc96fc9468221b0b781
1 file changed