Making telephony support optional.

This commit is contained in:
Rodrigo Damazio
2010-11-15 22:04:48 -08:00
parent c143d774d4
commit 44d24b57c6
2 changed files with 4 additions and 2 deletions
@@ -261,7 +261,9 @@ public class StatusAnnouncerTask implements PeriodicTask {
protected void listenToPhoneState(PhoneStateListener listener, int events) {
TelephonyManager telephony =
(TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
telephony.listen(listener, events);
if (telephony != null) {
telephony.listen(listener, events);
}
}
/**