title: onResultActivity is called immediately after startActivyForResult
body: <p>In my main activity i have this code:</p>
  
  <pre><code>noConnectionButton.setOnClickListener(new OnClickListener() {
  
  @Override
          public void onClick(View v) {
              startActivityForResult(new Intent(Settings.ACTION_WIRELESS_SETTINGS), SET_CONNECTION);
  
          }
      });
  </code></pre>
  
  <p>in the onCreate method. Then:</p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
      if(requestCode == SET_CONNECTION){
  
          checkConnection();
  
      }
  
  }
  </code></pre>
  
  <p>So what I want to do is to start the settings activity in a way that the user can switch on wireless or data connection.
  My problem is that the onActivityResult is called prematurely!!! so I want it to be called only after the user backs to my activity.
  any suggestion??</p>
  
  <p>here the manifest</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="it.polimi.metalnews"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="13"
      android:targetSdkVersion="19" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="it.polimi.metalnews.MainActivity"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="it.polimi.metalnews.HomeActivity"
          android:label="@string/title_activity_home" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="it.polimi.metalnews.NewsActivity"
          android:label="@string/title_activity_news" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="it.polimi.metalnews.AlbumActivity"
          android:label="@string/title_activity_album" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="it.polimi.metalnews.ContestActivity"
          android:label="@string/title_activity_contest" &gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>