Remove location mode menu from location settings

Location modes were introduced in KitKat. It has made location settings over complicated. In P we are removing location modes to provide simple, meaningful and transparent controls for users.

Bug: 63818349
Bug: 70350519
Test: Robo
Test: Manual
Change-Id: Ic8a168b8eeb3cd2c8b1536c378c92a5f377d3bba
This commit is contained in:
Maggie
2018-01-24 12:05:45 -08:00
parent eb4dceea7f
commit 5a86cd6545
19 changed files with 9 additions and 984 deletions

View File

@@ -105,26 +105,11 @@ public class LocationPreferenceController extends AbstractPreferenceController
int mode = Secure.getInt(context.getContentResolver(),
Secure.LOCATION_MODE, Secure.LOCATION_MODE_OFF);
if (mode != Secure.LOCATION_MODE_OFF) {
return context.getString(R.string.location_on_summary,
context.getString(getLocationString(mode)));
return context.getString(R.string.location_on_summary);
}
return context.getString(R.string.location_off_summary);
}
public static int getLocationString(int mode) {
switch (mode) {
case Secure.LOCATION_MODE_OFF:
return R.string.location_mode_location_off_title;
case Secure.LOCATION_MODE_SENSORS_ONLY:
return R.string.location_mode_sensors_only_title;
case Secure.LOCATION_MODE_BATTERY_SAVING:
return R.string.location_mode_battery_saving_title;
case Secure.LOCATION_MODE_HIGH_ACCURACY:
return R.string.location_mode_high_accuracy_title;
}
return 0;
}
@Override
public ResultPayload getResultPayload() {
final Intent intent = DatabaseIndexingUtils.buildSearchResultPageIntent(mContext,