GPS is not enabled but isProviderEnabled() is returning true
<p>I can check if GPS is on or not using isProviderEnabled(). If it is not on, I am launching intent so that user can enable GPS. 
At the end I am again checking if GPS is enabled by user or not.
If user does not enable GPS and come out, still isProviderEnabled() is returning NULL.
What could be the issue ? Please guide me.</p>

<pre><code>    String provider = LocationManager.GPS_PROVIDER;
    // Check if GPS is enabled
    boolean enabled = myLocationManager.isProviderEnabled(provider);

    if (!enabled) {
                    // GPS not enabled
        Log.d("", "Provider " + provider + " is not enabled");
        Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
        startActivity(intent);
                    // Consider the case when user does not enable GPS and come out. 
    } else {
        Log.d("", "Provider is enabled");

    }       

            // Re-check if user has enabled or not. (Note: case: user has not enabled GPS)
    enabled = myLocationManager.isProviderEnabled(provider);
    if(!enabled)
    {

        Log.d("","provider not enabled");
    }
            else
            {
                    // Control is coming here though user has not enabled GPS in settings
                    Log.d("","GPS is enabled");
            }
</code></pre>

<p>Thanks,
Biplab</p>
