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
+1 -1
View File
@@ -108,13 +108,13 @@
<!-- Features required -->
<uses-feature android:name="android.hardware.location" android:required="true"/>
<uses-feature android:name="android.hardware.location.gps" android:required="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="true"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="true"/>
<!-- Features optional -->
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
<uses-feature android:name="android.hardware.sensor.compass" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
<uses-feature android:name="android.hardware.telephony.gsm" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
@@ -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);
}
}
/**