File tree 1 file changed +16
-20
lines changed
src/src/org/renpy/android
1 file changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -235,33 +235,15 @@ public static String scanWifi() {
235
235
}
236
236
237
237
/**
238
- * network state, coarse
238
+ * network state
239
239
*/
240
240
241
241
public static boolean network_state = false ;
242
242
243
- /**
244
- * To recieve network state changes
245
- */
246
- public static void registerNetworkCheck ()
247
- {
248
- IntentFilter i = new IntentFilter ();
249
- i .addAction (ConnectivityManager .CONNECTIVITY_ACTION );
250
- context .registerReceiver (new BroadcastReceiver () {
251
-
252
- @ Override
253
- public void onReceive (Context c , Intent i ) {
254
- checkNetwork ();
255
- }
256
-
257
- }, i );
258
- }
259
-
260
-
261
243
/**
262
244
* Check network state directly
263
245
*
264
- * (only one connection can be active at a given moment, detects al type of networks )
246
+ * (only one connection can be active at a given moment, detects all network type )
265
247
*
266
248
*/
267
249
public static boolean checkNetwork ()
@@ -279,7 +261,21 @@ public static boolean checkNetwork()
279
261
return state ;
280
262
}
281
263
264
+ /**
265
+ * To recieve network state changes
266
+ */
267
+ public static void registerNetworkCheck ()
268
+ {
269
+ IntentFilter i = new IntentFilter ();
270
+ i .addAction (ConnectivityManager .CONNECTIVITY_ACTION );
271
+ context .registerReceiver (new BroadcastReceiver () {
282
272
273
+ @ Override
274
+ public void onReceive (Context c , Intent i ) {
275
+ checkNetwork ();
276
+ }
283
277
278
+ }, i );
279
+ }
284
280
285
281
}
You can’t perform that action at this time.
0 commit comments