project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/NetplayStateFragment.java
changeset 7476 2fb781bbdd51
parent 7461 38acbfdb484f
equal deleted inserted replaced
7473:45b9f25ff611 7476:2fb781bbdd51
     1 package org.hedgewars.hedgeroid.netplay;
     1 package org.hedgewars.hedgeroid.netplay;
     2 
     2 
     3 import org.hedgewars.hedgeroid.R;
     3 import org.hedgewars.hedgeroid.R;
       
     4 import org.hedgewars.hedgeroid.frontlib.Frontlib;
     4 import org.hedgewars.hedgeroid.netplay.Netplay.State;
     5 import org.hedgewars.hedgeroid.netplay.Netplay.State;
     5 
     6 
     6 import android.app.Activity;
     7 import android.app.Activity;
     7 import android.content.BroadcastReceiver;
     8 import android.content.BroadcastReceiver;
     8 import android.content.Context;
     9 import android.content.Context;
    99 	
   100 	
   100 	private final BroadcastReceiver leaveRoomReceiver = new BroadcastReceiver() {
   101 	private final BroadcastReceiver leaveRoomReceiver = new BroadcastReceiver() {
   101 		@Override
   102 		@Override
   102 		public void onReceive(Context context, Intent intent) {
   103 		public void onReceive(Context context, Intent intent) {
   103 			int reason = intent.getIntExtra(Netplay.EXTRA_REASON, -1);
   104 			int reason = intent.getIntExtra(Netplay.EXTRA_REASON, -1);
   104 			if(reason == JnaFrontlib.NETCONN_ROOMLEAVE_ABANDONED) {
   105 			if(reason == Frontlib.NETCONN_ROOMLEAVE_ABANDONED) {
   105 				Toast.makeText(appContext, R.string.toast_room_abandoned, Toast.LENGTH_LONG).show();
   106 				Toast.makeText(appContext, R.string.toast_room_abandoned, Toast.LENGTH_LONG).show();
   106 			} else if(reason == JnaFrontlib.NETCONN_ROOMLEAVE_KICKED) {
   107 			} else if(reason == Frontlib.NETCONN_ROOMLEAVE_KICKED) {
   107 				Toast.makeText(appContext, R.string.toast_kicked, Toast.LENGTH_LONG).show();
   108 				Toast.makeText(appContext, R.string.toast_kicked, Toast.LENGTH_LONG).show();
   108 			}
   109 			}
   109 		}
   110 		}
   110 	};
   111 	};
   111 	
   112