Loading src/com/android/settings/location/LocationSettings.java +11 −2 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ public class LocationSettings extends LocationSettingsBase mGpsDownloadDataWifiOnly = (CheckBoxPreference) root.findPreference(KEY_GPS_DOWNLOAD_DATA_WIFI_ONLY); if (mGpsDownloadDataWifiOnly != null) { if (!LongTermOrbits.isSupported() || !checkGpsDownloadWiFiOnly(getActivity())) { if (!isLtoSupported() || !checkGpsDownloadWiFiOnly(getActivity())) { root.removePreference(mGpsDownloadDataWifiOnly); mGpsDownloadDataWifiOnly = null; } else { Loading Loading @@ -326,7 +326,7 @@ public class LocationSettings extends LocationSettingsBase * @param ctx A valid context */ public static void restore(final Context context) { if (LongTermOrbits.isSupported() && isLocationModeEnabled(context)) { if (isLtoSupported() && isLocationModeEnabled(context)) { // Check and adjust the value for Gps download data on wifi only checkGpsDownloadWiFiOnly(context); Loading @@ -340,4 +340,13 @@ public class LocationSettings extends LocationSettingsBase am.set(AlarmManager.RTC, nextLtoDownload, pi); } } private static boolean isLtoSupported() { try { return LongTermOrbits.isSupported(); } catch (NoClassDefFoundError e) { // Hardware abstraction framework isn't installed return false; } } } Loading
src/com/android/settings/location/LocationSettings.java +11 −2 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ public class LocationSettings extends LocationSettingsBase mGpsDownloadDataWifiOnly = (CheckBoxPreference) root.findPreference(KEY_GPS_DOWNLOAD_DATA_WIFI_ONLY); if (mGpsDownloadDataWifiOnly != null) { if (!LongTermOrbits.isSupported() || !checkGpsDownloadWiFiOnly(getActivity())) { if (!isLtoSupported() || !checkGpsDownloadWiFiOnly(getActivity())) { root.removePreference(mGpsDownloadDataWifiOnly); mGpsDownloadDataWifiOnly = null; } else { Loading Loading @@ -326,7 +326,7 @@ public class LocationSettings extends LocationSettingsBase * @param ctx A valid context */ public static void restore(final Context context) { if (LongTermOrbits.isSupported() && isLocationModeEnabled(context)) { if (isLtoSupported() && isLocationModeEnabled(context)) { // Check and adjust the value for Gps download data on wifi only checkGpsDownloadWiFiOnly(context); Loading @@ -340,4 +340,13 @@ public class LocationSettings extends LocationSettingsBase am.set(AlarmManager.RTC, nextLtoDownload, pi); } } private static boolean isLtoSupported() { try { return LongTermOrbits.isSupported(); } catch (NoClassDefFoundError e) { // Hardware abstraction framework isn't installed return false; } } }