title: Android crash on getActiveNetworkInfo()
body: <p>The error message says</p>
  
  <blockquote>
    <p>Neither user 10093 nor current process has android.permission.ACCESS_NETWORK_STATE</p>
  </blockquote>
  
  <p>And I have added "android.permission.ACCESS_NETWORK_STATE" to the manifest:</p>
  
  <blockquote>
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  </code></pre>
  </blockquote>
  
  <p>Why does this happen and How can I fix it? I'm emulating on Nexus One - 2.3.7. - API10</p>
  
  <p>Code cut:</p>
  
  <pre><code>ConnectivityManager cm =
          (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo netInfo = cm.getActiveNetworkInfo();
  if (netInfo != null &amp;&amp; netInfo.isConnectedOrConnecting()) {
      System.out.print("Debb: there is internet\n");
  }
  </code></pre>
  
  <p>Whole Error Log:</p>
  
  <blockquote>
    <p>04-27 22:26:13.781    1522-1522/com.example.nekitamo E/AndroidRuntime﹕
    FATAL EXCEPTION: main
        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nekitamo/com.example.nekitamo.MainActivity}:
    java.lang.SecurityException: ConnectivityService: Neither user 10024
    nor current process has android.permission.ACCESS_NETWORK_STATE.
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
                at android.app.ActivityThread.access$1500(ActivityThread.java:117)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
                at android.os.Handler.dispatchMessage(Handler.java:99)
                at android.os.Looper.loop(Looper.java:130)
                at android.app.ActivityThread.main(ActivityThread.java:3683)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:507)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
                at dalvik.system.NativeStart.main(Native Method)
         Caused by: java.lang.SecurityException: ConnectivityService: Neither user 10024 nor current process has
    android.permission.ACCESS_NETWORK_STATE.
                at android.os.Parcel.readException(Parcel.java:1322)
                at android.os.Parcel.readException(Parcel.java:1276)
                at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo(IConnectivityManager.java:345)
                at android.net.ConnectivityManager.getActiveNetworkInfo(ConnectivityManager.java:251)
                at com.example.nekitamo.MainActivity.onCreate(MainActivity.java:38)
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
                at android.app.ActivityThread.access$1500(ActivityThread.java:117)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
                at android.os.Handler.dispatchMessage(Handler.java:99)
                at android.os.Looper.loop(Looper.java:130)
                at android.app.ActivityThread.main(ActivityThread.java:3683)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:507)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
                at dalvik.system.NativeStart.main(Native Method)</p>
  </blockquote>