project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/LobbyChatFragment.java
changeset 7352 641f11cdd319
parent 7349 12fdfd2038d4
child 7355 5673e95ef647
equal deleted inserted replaced
7349:12fdfd2038d4 7352:641f11cdd319
    83 
    83 
    84     private ServiceConnection serviceConnection = new ServiceConnection() {
    84     private ServiceConnection serviceConnection = new ServiceConnection() {
    85         public void onServiceConnected(ComponentName className, IBinder binder) {
    85         public void onServiceConnected(ComponentName className, IBinder binder) {
    86         	Log.d("LobbyChatFragment", "netconn received");
    86         	Log.d("LobbyChatFragment", "netconn received");
    87         	netconn = ((NetplayBinder) binder).getNetconn();
    87         	netconn = ((NetplayBinder) binder).getNetconn();
    88         	adapter.setLog(netconn.lobbyLog.getLog());
    88         	adapter.setLog(netconn.lobbyChatlog.getLog());
    89         	netconn.lobbyLog.registerObserver(adapter);
    89         	netconn.lobbyChatlog.registerObserver(adapter);
    90         }
    90         }
    91 
    91 
    92         public void onServiceDisconnected(ComponentName className) {
    92         public void onServiceDisconnected(ComponentName className) {
    93         	// TODO navigate away
    93         	// TODO navigate away
    94         	netconn.lobbyLog.unregisterObserver(adapter);
    94         	netconn.lobbyChatlog.unregisterObserver(adapter);
    95         	netconn = null;
    95         	netconn = null;
    96         }
    96         }
    97     };
    97     };
    98 }
    98 }