Skip to content

Commit 725f423

Browse files
committed
code formatting
1 parent 4f0363d commit 725f423

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

src/src/org/renpy/android/Hardware.java

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -235,33 +235,15 @@ public static String scanWifi() {
235235
}
236236

237237
/**
238-
* network state, coarse
238+
* network state
239239
*/
240240

241241
public static boolean network_state = false;
242242

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-
261243
/**
262244
* Check network state directly
263245
*
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)
265247
*
266248
*/
267249
public static boolean checkNetwork()
@@ -279,7 +261,21 @@ public static boolean checkNetwork()
279261
return state;
280262
}
281263

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() {
282272

273+
@Override
274+
public void onReceive(Context c, Intent i) {
275+
checkNetwork();
276+
}
283277

278+
}, i);
279+
}
284280

285281
}

0 commit comments

Comments
 (0)