Fixes ClassCastException on Android in AbstractSystrayService.