Merge pull request #2162 from MilosKozak/adrian/NCRworkaround
ncr-workaround
This commit is contained in:
commit
c87c68f84c
2 changed files with 3 additions and 7 deletions
|
@ -20,7 +20,7 @@ class NsClientReceiverDelegate {
|
|||
|
||||
private final Context context;
|
||||
|
||||
private NetworkChangeReceiver networkChangeReceiver = NetworkChangeReceiver.instance;
|
||||
private NetworkChangeReceiver networkChangeReceiver = new NetworkChangeReceiver();
|
||||
private ChargingStateReceiver chargingStateReceiver = new ChargingStateReceiver();
|
||||
|
||||
private boolean allowedChargingState = true;
|
||||
|
|
|
@ -28,11 +28,7 @@ public class NetworkChangeReceiver extends BroadcastReceiver {
|
|||
|
||||
// TODO: Split NSClient into network state component that can be used by several plugins and logic for plugin
|
||||
public static void fetch() {
|
||||
NetworkChangeReceiver.instance.grabNetworkStatus(MainApp.instance().getApplicationContext());
|
||||
}
|
||||
|
||||
private NetworkChangeReceiver() {
|
||||
super();
|
||||
new NetworkChangeReceiver().grabNetworkStatus(MainApp.instance().getApplicationContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,4 +86,4 @@ public class NetworkChangeReceiver extends BroadcastReceiver {
|
|||
public static EventNetworkChange getLastEvent() {
|
||||
return lastEvent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue