mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-07 20:46:17 +01:00
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:
parent
0aadec9380
commit
8562503cd9
1 changed files with 12 additions and 1 deletions
|
@ -29,6 +29,7 @@ import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.text.format.DateUtils;
|
import android.text.format.DateUtils;
|
||||||
import android.text.format.Time;
|
import android.text.format.Time;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
@ -468,9 +469,19 @@ public class ConnStatusHandler {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
switch( connType ) {
|
switch( connType ) {
|
||||||
case COMMS_CONN_SMS:
|
case COMMS_CONN_SMS:
|
||||||
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context );
|
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context )
|
||||||
|
&& !getAirplaneModeOn( context );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean getAirplaneModeOn( Context context )
|
||||||
|
{
|
||||||
|
boolean result =
|
||||||
|
0 != Settings.System.getInt( context.getContentResolver(),
|
||||||
|
Settings.System.AIRPLANE_MODE_ON, 0 );
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue