Merge "Remove newly added but deprecated master switch location setting methods." into klp-dev

This commit is contained in:
David Christie
2013-08-22 04:15:26 +00:00
committed by Android (Google) Code Review

View File

@@ -4343,22 +4343,6 @@ public final class Settings {
return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
}
/**
* Helper method for determining if the location master switch is enabled.
*
* TODO: worth retaining this method?
*
* @param cr the content resolver to use
* @return true if the master switch is enabled
* @deprecated use {@link #getLocationMode(ContentResolver)} != {@link #LOCATION_MODE_OFF}
* @hide
*/
@Deprecated
public static final boolean isLocationMasterSwitchEnabled(ContentResolver cr) {
int mode = getLocationMode(cr);
return mode != LOCATION_MODE_OFF;
}
/**
* Helper method for determining if a location provider is enabled.
* @param cr the content resolver to use
@@ -4388,26 +4372,6 @@ public final class Settings {
setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
}
/**
* Thread-safe method for enabling or disabling the location master switch.
*
* @param cr the content resolver to use
* @param enabled true if master switch should be enabled
* @deprecated use {@link #setLocationMode(ContentResolver, int)} with
* {@link #LOCATION_MODE_HIGH_ACCURACY}
* @hide
*/
@Deprecated
public static final void setLocationMasterSwitchEnabled(ContentResolver cr,
boolean enabled) {
int uid = UserHandle.myUserId();
synchronized (mLocationSettingsLock) {
setLocationProviderEnabledForUser(cr, LocationManager.GPS_PROVIDER, enabled, uid);
setLocationProviderEnabledForUser(cr, LocationManager.NETWORK_PROVIDER, enabled,
uid);
}
}
/**
* Thread-safe method for enabling or disabling a single location provider.
* @param cr the content resolver to use