SetupWizard: Update Location services page

* Remove usage of deprecated setLocationProviderEnabled and
  isLocationProviderEnabled
* Use BroadcastReceiver to listen for changes to mode
* Replace GPS option with Battery Saving option (there is no longer a
  mode available in Android which disables GPS)

TODO: Create CMStats entry for ENABLE_BATTERY_SAVING_LOCATION

Change-Id: I2efe69125518637ae9b7d0dce285c39dae654d4c
This commit is contained in:
Matt Mower
2015-11-10 18:37:09 -06:00
parent b64d5e7676
commit ea2d42d654
3 changed files with 132 additions and 88 deletions

View File

@@ -118,7 +118,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/gps"
android:id="@+id/battery_saving"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -128,7 +128,7 @@
android:clickable="true">
<CheckBox
android:id="@+id/gps_checkbox"
android:id="@+id/battery_saving_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
@@ -138,7 +138,7 @@
<TextView
android:id="@+id/gps_summary"
android:id="@+id/battery_saving_summary"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -148,7 +148,7 @@
android:layout_marginLeft="@dimen/location_text_margin_left"
android:layout_marginRight="@dimen/location_text_margin_right"
android:paddingBottom="@dimen/content_margin_bottom"
android:text="@string/location_gps"
android:text="@string/location_battery_saving"
android:maxLines="5" />
</LinearLayout>