[new downloader][android] del: Remove autodownload settings.

This commit is contained in:
Alexander Marchuk 2016-03-16 14:29:01 +03:00 committed by Sergey Yershov
parent 320392c89e
commit 84f9751b6f
6 changed files with 8 additions and 46 deletions

View file

@ -40,7 +40,6 @@
<string name="pref_map_style" translatable="false">MapStyle</string>
<string name="pref_tts_enabled" translatable="false">TtsEnabled</string>
<string name="pref_tts_language" translatable="false">TtsLanguage</string>
<string name="pref_autodownload" translatable="false">AutoDownloadMap</string>
<string name="pref_3d" translatable="false">3D</string>
<string name="pref_3d_buildings" translatable="false">3DBuildings</string>
<string name="pref_track_record" translatable="false">TrackRecord</string>

View file

@ -30,30 +30,23 @@
android:entryValues="@array/map_style_values"
android:order="4"/>
<SwitchPreference
android:key="@string/pref_autodownload"
android:title="@string/autodownload"
android:switchTextOn=""
android:switchTextOff=""
android:order="5"/>
<SwitchPreference
android:key="@string/pref_3d_buildings"
android:title="@string/pref_map_3d_buildings_title"
android:switchTextOn=""
android:switchTextOff=""
android:order="6"/>
android:order="5"/>
<Preference
android:key="@string/pref_yota"
android:title="@string/yopme_pref_title"
android:summary="@string/yopme_pref_summary"
android:order="7"/>
android:order="6"/>
<ListPreference
android:key="@string/pref_track_record"
android:title="@string/pref_track_record_title"
android:entries="@array/track_length"
android:entryValues="@array/track_length_values"
android:order="8"/>
android:order="7"/>
</PreferenceScreen>

View file

@ -28,26 +28,21 @@
android:entryValues="@array/map_style_values"
android:order="4"/>
<CheckBoxPreference
android:key="@string/pref_autodownload"
android:title="@string/autodownload"
android:order="5"/>
<CheckBoxPreference
android:key="@string/pref_3d_buildings"
android:title="@string/pref_map_3d_buildings_title"
android:order="6"/>
android:order="5"/>
<Preference
android:key="@string/pref_yota"
android:title="@string/yopme_pref_title"
android:summary="@string/yopme_pref_summary"
android:order="7"/>
android:order="6"/>
<ListPreference
android:key="@string/pref_track_record"
android:title="@string/pref_track_record_title"
android:entries="@array/track_length"
android:entryValues="@array/track_length_values"
android:order="8"/>
android:order="7"/>
</PreferenceScreen>

View file

@ -15,7 +15,6 @@ import com.mapswithme.maps.background.Notifier;
import com.mapswithme.maps.location.LocationHelper;
import com.mapswithme.maps.routing.RoutingController;
import com.mapswithme.maps.widget.WheelProgressView;
import com.mapswithme.util.Config;
import com.mapswithme.util.ConnectionState;
import com.mapswithme.util.StringUtils;
import com.mapswithme.util.UiUtils;
@ -87,12 +86,12 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
public void updateState(boolean shouldAutoDownload)
{
boolean showFrame = (mCurrentCountry != null &&
!mCurrentCountry.present &&
!RoutingController.get().isNavigating());
if (showFrame)
{
boolean enqueued = (mCurrentCountry.status == CountryItem.STATUS_ENQUEUED);
boolean progress = (mCurrentCountry.status == CountryItem.STATUS_PROGRESS &&
!mCurrentCountry.present);
boolean progress = (mCurrentCountry.status == CountryItem.STATUS_PROGRESS);
boolean failed = (mCurrentCountry.status == CountryItem.STATUS_FAILED);
showFrame = (enqueued || progress || failed ||
@ -128,7 +127,6 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
!sAutodownloadLocked &&
!failed &&
!MapManager.nativeIsLegacyMode() &&
Config.isAutodownloadMaps() &&
ConnectionState.isWifiConnected())
{
Location loc = LocationHelper.INSTANCE.getLastLocation();

View file

@ -136,18 +136,6 @@ public class MapPrefsFragment extends BaseXmlSettingsFragment
}
});
TwoStatePreference prefAutodownload = (TwoStatePreference)findPreference(getString(R.string.pref_autodownload));
prefAutodownload.setChecked(Config.isAutodownloadMaps());
prefAutodownload.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
@Override
public boolean onPreferenceChange(Preference preference, Object newValue)
{
Config.setAutodownloadMaps((Boolean)newValue);
return true;
}
});
final Framework.Params3dMode _3d = new Framework.Params3dMode();
Framework.nativeGet3dMode(_3d);

View file

@ -19,7 +19,6 @@ public final class Config
private static final String KEY_PREF_ZOOM_BUTTONS = "ZoomButtonsEnabled";
private static final String KEY_PREF_STATISTICS = "StatisticsEnabled";
private static final String KEY_PREF_AUTODOWNLOAD = "AutoDownloadEnabled";
private static final String KEY_LIKES_RATED_DIALOG = "RatedDialog";
private static final String KEY_LIKES_LAST_RATED_SESSION = "LastRatedSession";
@ -311,16 +310,6 @@ public final class Config
return true;
}
public static boolean isAutodownloadMaps()
{
return getBool(KEY_PREF_AUTODOWNLOAD, true);
}
public static void setAutodownloadMaps(boolean set)
{
setBool(KEY_PREF_AUTODOWNLOAD, set);
}
private static native boolean nativeGetBoolean(String name, boolean defaultValue);
private static native void nativeSetBoolean(String name, boolean value);
private static native int nativeGetInt(String name, int defaultValue);