Removed LiveUpdates from developer options.

This commit is contained in:
GaidamakUA 2016-01-18 15:38:05 +02:00
parent 210592c1e8
commit 0a77d8bae0
3 changed files with 39 additions and 49 deletions

View file

@ -888,9 +888,7 @@ public class OsmandSettings {
public final OsmandPreference<Boolean> FAST_ROUTE_MODE = new BooleanPreference("fast_route_mode", true).makeProfile(); public final OsmandPreference<Boolean> FAST_ROUTE_MODE = new BooleanPreference("fast_route_mode", true).makeProfile();
// temporarily for new version // temporarily for new version
public final CommonPreference<Boolean> DISABLE_COMPLEX_ROUTING = new BooleanPreference("disable_complex_routing", false).makeGlobal(); public final CommonPreference<Boolean> DISABLE_COMPLEX_ROUTING = new BooleanPreference("disable_complex_routing", false).makeGlobal();
public final CommonPreference<Boolean> BETA_TESTING_LIVE_UPDATES = new BooleanPreference("live_updates_beta", false).makeGlobal();
public final CommonPreference<Boolean> SHOW_TRAFFIC_WARNINGS = new BooleanPreference("show_traffic_warnings", false).makeProfile().cache(); public final CommonPreference<Boolean> SHOW_TRAFFIC_WARNINGS = new BooleanPreference("show_traffic_warnings", false).makeProfile().cache();
{ {
SHOW_TRAFFIC_WARNINGS.setModeDefaultValue(ApplicationMode.CAR, true); SHOW_TRAFFIC_WARNINGS.setModeDefaultValue(ApplicationMode.CAR, true);

View file

@ -18,7 +18,6 @@ import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmAndLocationSimulation; import net.osmand.plus.OsmAndLocationSimulation;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.activities.SettingsBaseActivity; import net.osmand.plus.activities.SettingsBaseActivity;
import net.osmand.plus.activities.actions.AppModeDialog; import net.osmand.plus.activities.actions.AppModeDialog;
import net.osmand.util.SunriseSunset; import net.osmand.util.SunriseSunset;
@ -40,30 +39,25 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getToolbar().setTitle(R.string.debugging_and_development); getToolbar().setTitle(R.string.debugging_and_development);
PreferenceScreen cat = getPreferenceScreen(); PreferenceScreen cat = getPreferenceScreen();
CheckBoxPreference dbg = createCheckBoxPreference(settings.DEBUG_RENDERING_INFO, CheckBoxPreference dbg = createCheckBoxPreference(settings.DEBUG_RENDERING_INFO,
R.string.trace_rendering, R.string.trace_rendering_descr); R.string.trace_rendering, R.string.trace_rendering_descr);
cat.addPreference(dbg); cat.addPreference(dbg);
cat.addPreference(createCheckBoxPreference(settings.DISABLE_COMPLEX_ROUTING, cat.addPreference(createCheckBoxPreference(settings.DISABLE_COMPLEX_ROUTING,
R.string.disable_complex_routing, R.string.disable_complex_routing_descr)); R.string.disable_complex_routing, R.string.disable_complex_routing_descr));
cat.addPreference(createCheckBoxPreference(settings.USE_FAST_RECALCULATION, cat.addPreference(createCheckBoxPreference(settings.USE_FAST_RECALCULATION,
R.string.use_fast_recalculation, R.string.use_fast_recalculation_desc)); R.string.use_fast_recalculation, R.string.use_fast_recalculation_desc));
cat.addPreference(createCheckBoxPreference(settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS, cat.addPreference(createCheckBoxPreference(settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS,
R.string.use_magnetic_sensor, R.string.use_magnetic_sensor,
R.string.use_magnetic_sensor_descr)); R.string.use_magnetic_sensor_descr));
final CheckBoxPreference openGlRender = createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr); final CheckBoxPreference openGlRender = createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr);
cat.addPreference(openGlRender); cat.addPreference(openGlRender);
if(Version.isDeveloperVersion(getMyApplication())) {
cat.addPreference(createCheckBoxPreference(settings.BETA_TESTING_LIVE_UPDATES,
"Live updates", "Beta testing for live updates"));
}
final Preference firstRunPreference = new Preference(this); final Preference firstRunPreference = new Preference(this);
firstRunPreference.setTitle(R.string.simulate_initial_startup); firstRunPreference.setTitle(R.string.simulate_initial_startup);
firstRunPreference.setSummary(R.string.simulate_initial_startup_descr); firstRunPreference.setSummary(R.string.simulate_initial_startup_descr);
@ -90,8 +84,8 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
@Override @Override
public void run() { public void run() {
simulate.setSummary(sim.isRouteAnimating() ? simulate.setSummary(sim.isRouteAnimating() ?
R.string.simulate_your_location_stop_descr : R.string.simulate_your_location_descr); R.string.simulate_your_location_stop_descr : R.string.simulate_your_location_descr);
} }
}; };
pref.setTitle(R.string.simulate_your_location); pref.setTitle(R.string.simulate_your_location);
@ -106,7 +100,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
} }
}); });
cat.addPreference(pref); cat.addPreference(pref);
pref = new Preference(this); pref = new Preference(this);
pref.setTitle(R.string.test_voice_prompts); pref.setTitle(R.string.test_voice_prompts);
pref.setSummary(R.string.play_commands_of_currently_selected_voice); pref.setSummary(R.string.play_commands_of_currently_selected_voice);
@ -148,7 +142,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
//setEnabled(false) creates bad readability on some devices //setEnabled(false) creates bad readability on some devices
//pref.setEnabled(false); //pref.setEnabled(false);
info.addPreference(pref); info.addPreference(pref);
// ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); // ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
// ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo(); // ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
// activityManager.getMemoryInfo(memoryInfo); // activityManager.getMemoryInfo(memoryInfo);
@ -157,7 +151,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
Debug.getMemoryInfo(mem); Debug.getMemoryInfo(mem);
pref = new Preference(this); pref = new Preference(this);
pref.setTitle(R.string.native_app_allocated_memory); pref.setTitle(R.string.native_app_allocated_memory);
pref.setSummary(getString(R.string.native_app_allocated_memory_descr pref.setSummary(getString(R.string.native_app_allocated_memory_descr
, mem.nativePrivateDirty / 1024, mem.dalvikPrivateDirty / 1024 , mem.otherPrivateDirty / 1024 , mem.nativePrivateDirty / 1024, mem.dalvikPrivateDirty / 1024 , mem.otherPrivateDirty / 1024
, mem.nativePss / 1024, mem.dalvikPss / 1024 , mem.otherPss / 1024)); , mem.nativePss / 1024, mem.dalvikPss / 1024 , mem.otherPss / 1024));
pref.setSelectable(false); pref.setSelectable(false);
@ -188,7 +182,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
} }
}); });
info.addPreference(agpspref); info.addPreference(agpspref);
SunriseSunset sunriseSunset = getMyApplication().getDaynightHelper().getSunriseSunset(); SunriseSunset sunriseSunset = getMyApplication().getDaynightHelper().getSunriseSunset();
pref = new Preference(this); pref = new Preference(this);
pref.setTitle(R.string.day_night_info); pref.setTitle(R.string.day_night_info);

View file

@ -1,20 +1,15 @@
package net.osmand.plus.resources; package net.osmand.plus.resources;
import java.io.File; import android.content.Context;
import java.io.FileOutputStream; import android.content.res.AssetManager;
import java.io.IOException; import android.database.sqlite.SQLiteException;
import java.io.InputStream; import android.graphics.Bitmap;
import java.io.RandomAccessFile; import android.graphics.BitmapFactory;
import java.text.MessageFormat; import android.os.HandlerThread;
import java.util.ArrayList; import android.text.format.DateFormat;
import java.util.Collection; import android.util.DisplayMetrics;
import java.util.Collections; import android.view.WindowManager;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
import net.osmand.GeoidAltitudeCorrection; import net.osmand.GeoidAltitudeCorrection;
@ -58,15 +53,20 @@ import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory; import org.xmlpull.v1.XmlPullParserFactory;
import android.content.Context; import java.io.File;
import android.content.res.AssetManager; import java.io.FileOutputStream;
import android.database.sqlite.SQLiteException; import java.io.IOException;
import android.graphics.Bitmap; import java.io.InputStream;
import android.graphics.BitmapFactory; import java.io.RandomAccessFile;
import android.os.HandlerThread; import java.text.MessageFormat;
import android.text.format.DateFormat; import java.util.ArrayList;
import android.util.DisplayMetrics; import java.util.Collection;
import android.view.WindowManager; import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/** /**
* Resource manager is responsible to work with all resources * Resource manager is responsible to work with all resources
@ -620,10 +620,8 @@ public class ResourceManager {
collectFiles(context.getAppPath(IndexConstants.SRTM_INDEX_DIR), IndexConstants.BINARY_MAP_INDEX_EXT, files); collectFiles(context.getAppPath(IndexConstants.SRTM_INDEX_DIR), IndexConstants.BINARY_MAP_INDEX_EXT, files);
} }
if(context.getSettings().BETA_TESTING_LIVE_UPDATES.get()) { changesManager.collectChangesFiles(context.getAppPath(IndexConstants.LIVE_INDEX_DIR), IndexConstants.BINARY_MAP_INDEX_EXT, files);
changesManager.collectChangesFiles(context.getAppPath(IndexConstants.LIVE_INDEX_DIR), IndexConstants.BINARY_MAP_INDEX_EXT, files);
}
Collections.sort(files, Algorithms.getFileVersionComparator()); Collections.sort(files, Algorithms.getFileVersionComparator());
List<String> warnings = new ArrayList<String>(); List<String> warnings = new ArrayList<String>();
renderer.clearAllResources(); renderer.clearAllResources();