move WifiStateChangeReceiver into ".nearby" package

This commit is contained in:
Hans-Christoph Steiner 2019-06-17 11:09:03 +02:00
parent 842db03d8a
commit 02669ea31f
3 changed files with 4 additions and 5 deletions

View File

@ -61,7 +61,7 @@
android:value=".views.main.MainActivity"/>
</activity>
<receiver android:name=".receiver.WifiStateChangeReceiver">
<receiver android:name=".nearby.WifiStateChangeReceiver">
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE"/>
</intent-filter>

View File

@ -1,11 +1,10 @@
package org.fdroid.fdroid.receiver;
package org.fdroid.fdroid.nearby;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.WifiManager;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.nearby.WifiStateChangeService;
public class WifiStateChangeReceiver extends BroadcastReceiver {
private static final String TAG = "WifiStateChangeReceiver";

View File

@ -37,7 +37,7 @@ import java.util.Locale;
* Handle state changes to the device's wifi, storing the required bits.
* The {@link Intent} that starts it either has no extras included,
* which is how it can be triggered by code, or it came in from the system
* via {@link org.fdroid.fdroid.receiver.WifiStateChangeReceiver}, in
* via {@link WifiStateChangeReceiver}, in
* which case an instance of {@link NetworkInfo} is included.
* <p>
* The work is done in a {@link Thread} so that new incoming {@code Intents}
@ -278,7 +278,7 @@ public class WifiStateChangeService extends IntentService {
while (networkInterfaces.hasMoreElements()) {
NetworkInterface netIf = networkInterfaces.nextElement();
for (Enumeration<InetAddress> inetAddresses = netIf.getInetAddresses(); inetAddresses.hasMoreElements();) {
for (Enumeration<InetAddress> inetAddresses = netIf.getInetAddresses(); inetAddresses.hasMoreElements(); ) {
InetAddress inetAddress = inetAddresses.nextElement();
if (inetAddress.isLoopbackAddress() || inetAddress instanceof Inet6Address) {
continue;