Merge "Remove newly added but deprecated master switch location setting methods." into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8c128abe9c
@@ -4343,22 +4343,6 @@ public final class Settings {
|
|||||||
return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
|
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.
|
* Helper method for determining if a location provider is enabled.
|
||||||
* @param cr the content resolver to use
|
* @param cr the content resolver to use
|
||||||
@@ -4388,26 +4372,6 @@ public final class Settings {
|
|||||||
setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
|
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.
|
* Thread-safe method for enabling or disabling a single location provider.
|
||||||
* @param cr the content resolver to use
|
* @param cr the content resolver to use
|
||||||
|
|||||||
Reference in New Issue
Block a user