Remove dead code from settings
Test: manually Change-Id: I1ef0bb2a20c6c6f020dd051407dda2de87f174ea
This commit is contained in:
@@ -15,9 +15,7 @@ package com.android.settings.location;
|
||||
|
||||
import static com.android.settingslib.RestrictedLockUtilsInternal.checkIfRestrictionEnforced;
|
||||
import static com.android.settingslib.Utils.updateLocationEnabled;
|
||||
import static com.android.settingslib.Utils.updateLocationMode;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -125,26 +123,6 @@ public class LocationEnabler implements LifecycleObserver, OnStart, OnStop {
|
||||
refreshLocationMode();
|
||||
}
|
||||
|
||||
void setLocationMode(int mode) {
|
||||
final int currentMode = Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
|
||||
if (isRestricted()) {
|
||||
// Location toggling disabled by user restriction. Read the current location mode to
|
||||
// update the location master switch.
|
||||
if (Log.isLoggable(TAG, Log.INFO)) {
|
||||
Log.i(TAG, "Restricted user, not setting location mode");
|
||||
}
|
||||
if (mListener != null) {
|
||||
mListener.onLocationModeChanged(currentMode, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
updateLocationMode(mContext, currentMode, mode, ActivityManager.getCurrentUser(),
|
||||
Settings.Secure.LOCATION_CHANGER_SYSTEM_SETTINGS);
|
||||
refreshLocationMode();
|
||||
}
|
||||
|
||||
boolean isEnabled(int mode) {
|
||||
return mode != Settings.Secure.LOCATION_MODE_OFF && !isRestricted();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user