[android] Removed simplfied color scheme for traffic

This commit is contained in:
Александр Зацепин 2018-02-26 16:00:02 +03:00 committed by Aleksandr Zatsepin
parent f59450ff79
commit c93eacfd17
4 changed files with 1 additions and 44 deletions

View file

@ -1388,20 +1388,6 @@ Java_com_mapswithme_maps_Framework_nativeGetAutoZoomEnabled(JNIEnv *, jclass)
return frm()->LoadAutoZoom();
}
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_Framework_nativeSetSimplifiedTrafficColorsEnabled(JNIEnv *, jclass, jboolean enabled)
{
bool const simplifiedEnabled = static_cast<bool>(enabled);
frm()->GetTrafficManager().SetSimplifiedColorScheme(simplifiedEnabled);
frm()->SaveTrafficSimplifiedColors(simplifiedEnabled);
}
JNIEXPORT jboolean JNICALL
Java_com_mapswithme_maps_Framework_nativeGetSimplifiedTrafficColorsEnabled(JNIEnv * env, jclass)
{
return frm()->LoadTrafficSimplifiedColors();
}
// static void nativeZoomToPoint(double lat, double lon, int zoom, boolean animate);
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_Framework_nativeZoomToPoint(JNIEnv * env, jclass, jdouble lat, jdouble lon, jint zoom, jboolean animate)

View file

@ -127,15 +127,11 @@
android:key="@string/pref_auto_zoom"
android:title="@string/pref_map_auto_zoom"
android:order="3"/>
<SwitchPreferenceCompat
android:key="@string/pref_traffic_simplified_colors"
android:title="@string/pref_traffic_simplified_colors_title"
android:order="4"/>
<android.support.v7.preference.PreferenceScreen
android:key="@string/pref_tts_screen"
android:title="@string/pref_tts_enable_title"
android:persistent="false"
android:order="5">
android:order="4">
<SwitchPreferenceCompat
android:key="@string/pref_tts_enabled"
android:title="@string/pref_tts_enable_title"

View file

@ -338,10 +338,6 @@ public class Framework
public static native void nativeSetAutoZoomEnabled(boolean enabled);
public static native boolean nativeGetSimplifiedTrafficColorsEnabled();
public static native void nativeSetSimplifiedTrafficColorsEnabled(boolean enabled);
@NonNull
public static native MapObject nativeDeleteBookmarkFromMapObject();

View file

@ -300,7 +300,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment
initStatisticsPrefsCallback();
initPlayServicesPrefsCallbacks();
initAutoZoomPrefsCallbacks();
initSimplifiedTrafficColorsPrefsCallbacks();
initDisplayShowcasePrefs();
initLoggingEnabledPrefsCallbacks();
initEmulationBadStorage();
@ -391,26 +390,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment
}
}
private void initSimplifiedTrafficColorsPrefsCallbacks()
{
final TwoStatePreference prefSimplifiedColors = (TwoStatePreference)findPreference(
getString(R.string.pref_traffic_simplified_colors));
if (prefSimplifiedColors == null)
return;
boolean simplifiedColorsEnabled = Framework.nativeGetSimplifiedTrafficColorsEnabled();
prefSimplifiedColors.setChecked(simplifiedColorsEnabled);
prefSimplifiedColors.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
@Override
public boolean onPreferenceChange(Preference preference, Object newValue)
{
Framework.nativeSetSimplifiedTrafficColorsEnabled((Boolean)newValue);
return true;
}
});
}
private void initLargeFontSizePrefsCallbacks()
{
Preference pref = findPreference(getString(R.string.pref_large_fonts_size));