So doing the above does remove GPS support as far as I can tell (the low
level drivers and the Orion service are not longer running), but I've been
going round and round in the location_provider logic in the settings
providers.
I removed gos from the list of default location providers (removed gps in
the string below)
<!-- Comma-separated list of location providers.
> Network location is off by default because it requires
> user opt-in via Setup Wizard or Settings.
> -->
> <string name="def_location_providers_allowed"
> translatable="false">gps</string>
>
from monitoring logcats of the SettingsProvider tag, it appears that
something repopulates it though.
The location menu also shows the GPS, and from the XML below,
unconditionnally, so I guess I need to remove the middle block?
<PreferenceCategory
> android:key="location_sources"
> android:title="@string/location_sources_heading" />
>
> <CheckBoxPreference
> android:key="location_gps"
> android:title="@string/location_gps"
> android:summary="@string/location_street_level"
> android:dependency="location_toggle"
> android:persistent="false" />
>
> <com.android.settings.WrappingCheckBoxPreference
> android:key="location_network"
> android:title="@string/location_network_based"
> android:summary="@string/location_neighborhood_level"
> android:dependency="location_toggle"
> android:persistent="false" />
>
There is code that seems to unconditionally enable GPS when the switch to
enable location is turned on:
(in packages/apps/Settings/.../LocationSettings.java)
/** Enable or disable all providers when the master toggle is changed.
> */
> private void onToggleLocationAccess(boolean checked) {
> final ContentResolver cr = getContentResolver();
> Settings.Secure.setLocationProviderEnabled(cr,
> LocationManager.GPS_PROVIDER, checked);
> Settings.Secure.setLocationProviderEnabled(cr,
> LocationManager.NETWORK_PROVIDER, checked);
> updateLocationToggles();
> }
>
so I can keep turning things off in the code: turn off the menu, turn off
the automatic settings when the master switch is enabled, and continue
chasing down other places that enable the GPS, but is it the right way to
do this? every other piece of hardware I turned off (camera, GSM...) I was
able to do mostly at the makefile level and Android dynamically stopped
presenting irrelevant menus.
Can't the same thing be done for GPS?
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.