NetworkManager.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:12306-android-Decompile 作者:
public void initialize(CordovaInterface paramCordovaInterface, CordovaWebView paramCordovaWebView)
{
  super.initialize(paramCordovaInterface, paramCordovaWebView);
  this.sockMan = ((ConnectivityManager)paramCordovaInterface.getActivity().getSystemService("connectivity"));
  this.connectionCallbackContext = null;
  IntentFilter localIntentFilter = new IntentFilter();
  localIntentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
  if (this.receiver == null)
  {
    this.receiver = new BroadcastReceiver()
    {
      public void onReceive(Context paramContext, Intent paramIntent)
      {
        if (NetworkManager.this.webView != null)
          NetworkManager.this.updateConnectionInfo(NetworkManager.this.sockMan.getActiveNetworkInfo());
      }
    };
    paramCordovaInterface.getActivity().registerReceiver(this.receiver, localIntentFilter);
    this.registered = true;
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号