show status icon as red when SMS game and airplane mode on. (Better

would be to track radio state in NetStateCache.)
This commit is contained in:
Eric House 2012-07-31 06:47:52 -07:00
parent 0aadec9380
commit 8562503cd9

View file

@ -29,6 +29,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.provider.Settings;
import android.text.format.DateUtils;
import android.text.format.Time;
import java.io.ByteArrayInputStream;
@ -468,9 +469,19 @@ public class ConnStatusHandler {
boolean result = true;
switch( connType ) {
case COMMS_CONN_SMS:
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context );
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context )
&& !getAirplaneModeOn( context );
break;
}
return result;
}
private static boolean getAirplaneModeOn( Context context )
{
boolean result =
0 != Settings.System.getInt( context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0 );
return result;
}
}