Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24607] Android: stop network connectivity change event firing at start #8981

Merged
merged 5 commits into from
May 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public NetInfo() {
type = -1;
reason = "";
}
};
}

private NetInfo lastNetInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class TiNetworkListener {

private IntentFilter connectivityIntentFilter;
private ConnectivityBroadcastReceiver receiver;
private boolean init;

private Handler messageHandler;
private Context context; // null on release, might need to be softRef.
Expand All @@ -44,6 +45,10 @@ private class ConnectivityBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent)
{
if (!init) {
init = true;
return;
}
String action = intent.getAction();

if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
Expand Down