Fix light settings dialog being unusable in landscape.
Fix dialog not opening for app-specific notification light settings.
Fix NullPointerException at RunningState

getServiceInfo returns null if you have a service defined in the
manifest as: <service android:name=".Xxx" android:exported="false" />
or and in an <application> with no label or icon.
Dont crash the Settings application because of that.
Check if the Activity is finishing before showDialog()

Check if the Activity is going through its finishing phase before
displaying the Dialog, because Showing dialog once the activity
is no longer in context will cause BadTokenException.