ANDROID: allow using network as a location provider

Bug: 72886046
Bug: 66366228
Test: ./android-cts/tools/cts-tradefed run cts -m CtsTelephonyTestCases
Change-Id: I658d0556dfb87ab463f02ec285879caf62c215df
Signed-off-by: Roman Kiryanov <rkir@google.com>
This commit is contained in:
Roman Kiryanov
2018-03-22 11:29:22 -07:00
parent 0ffeba64ad
commit 3431578839

View File

@@ -48,7 +48,10 @@ public class DefaultActivity extends Activity {
// Enable the GPS.
// Not needed since this SDK will contain the Settings app.
Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
LocationManager.GPS_PROVIDER);
LocationManager.GPS_PROVIDER + "," + LocationManager.NETWORK_PROVIDER);
Settings.Secure.putInt(getContentResolver(), Settings.Secure.LOCATION_MODE,
Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
// enable install from non market
Settings.Global.putInt(getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS, 1);