mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-14 08:01:38 +01:00
add, but comment out because it requires user permission, code to
notice when cellular data becomes available and notify relay of dead games then. Must be a way to notice a network interface cellular or not without permission since I already have permission to use it.
This commit is contained in:
parent
c3f43dd26c
commit
7c96048ba2
1 changed files with 28 additions and 1 deletions
|
@ -42,6 +42,8 @@ import android.widget.Button;
|
|||
import android.view.MenuInflater;
|
||||
import java.io.File;
|
||||
import android.preference.PreferenceManager;
|
||||
// import android.telephony.PhoneStateListener;
|
||||
// import android.telephony.TelephonyManager;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
@ -59,6 +61,18 @@ public class GamesList extends XWListActivity
|
|||
private String m_missingDictName;
|
||||
private int m_missingDictLang;
|
||||
|
||||
// private XWPhoneStateListener m_phoneStateListener;
|
||||
// private class XWPhoneStateListener extends PhoneStateListener {
|
||||
// @Override
|
||||
// public void onDataConnectionStateChanged( int state )
|
||||
// {
|
||||
// Utils.logf( "onDataConnectionStateChanged(%d)", state );
|
||||
// if ( TelephonyManager.DATA_CONNECTED == state ) {
|
||||
// NetUtils.informOfDeaths( GamesList.this );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog( int id )
|
||||
{
|
||||
|
@ -143,6 +157,7 @@ public class GamesList extends XWListActivity
|
|||
setListAdapter( m_adapter );
|
||||
|
||||
RelayReceiver.RestartTimer( this );
|
||||
NetUtils.informOfDeaths( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,13 +165,25 @@ public class GamesList extends XWListActivity
|
|||
{
|
||||
super.onStart();
|
||||
DispatchNotify.SetRelayIDsHandler( this );
|
||||
|
||||
// TelephonyManager mgr =
|
||||
// (TelephonyManager)getSystemService( Context.TELEPHONY_SERVICE );
|
||||
// m_phoneStateListener = new XWPhoneStateListener();
|
||||
// mgr.listen( m_phoneStateListener,
|
||||
// PhoneStateListener.LISTEN_DATA_CONNECTION_STATE );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop()
|
||||
{
|
||||
super.onStop();
|
||||
// TelephonyManager mgr =
|
||||
// (TelephonyManager)getSystemService( Context.TELEPHONY_SERVICE );
|
||||
// mgr.listen( m_phoneStateListener, PhoneStateListener.LISTEN_NONE );
|
||||
// m_phoneStateListener = null;
|
||||
|
||||
DispatchNotify.SetRelayIDsHandler( null );
|
||||
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
// DispatchNotify.HandleRelaysIface interface
|
||||
|
|
Loading…
Reference in a new issue