got rid of iitc source setting

* the developer mode makes it pretty much useless
* it's broken since the new fileManager was introduced. nobody complained that it doesn't work -> nobody uses this feature.
This commit is contained in:
Philipp Schaefer 2014-01-22 16:15:54 +01:00
parent cfcc18f3a6
commit 0d852b5043
5 changed files with 0 additions and 77 deletions

View File

@ -121,8 +121,6 @@
<string name="pref_fake_user_agent">Fake User Agent</string>
<string name="pref_fake_user_agent_sum">Let IITCm appear as a desktop browser for the intel site.
Note: If just want to use the desktop mode use the \'force desktop mode\' setting</string>
<string name="pref_select_iitc">IITC source</string>
<string name="pref_select_iitc_sum">Load IITC main script from url or use local script. Currently used source:</string>
<string-array name="pref_hide_fullscreen">
<item>System Bar</item>

View File

@ -71,13 +71,6 @@
android:key="pref_dev_checkbox"
android:summary="@string/pref_enable_dev_mode_sum"
android:title="@string/pref_enable_dev_mode"/>
<!-- summary is set in settings fragment -->
<EditTextPreference
android:defaultValue="local"
android:key="pref_iitc_source"
android:title="@string/pref_select_iitc"/>
<PreferenceCategory
android:key="pref_advanced_ui_cat"
android:title="@string/pref_ui_cat">

View File

@ -27,7 +27,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
@ -155,27 +154,6 @@ public class IITC_FileManager {
}
}
final String source = mPrefs.getString("pref_iitc_source", "local");
if (!source.equals("local")) {
// load iitc script from web or asset folder
if (source.contains("http")) {
try {
final URL context = new URL(source);
final URL url = new URL(context, filename);
return url.openStream();
} catch (final IOException e) {
Log.w(e);
}
} else {
final File file = new File(source + File.separatorChar + filename);
try {
return new FileInputStream(file);
} catch (final FileNotFoundException e) {
Log.w(e);
}
}
}
// load plugins from asset folder
return mAssetManager.open(filename);
}

View File

@ -1,32 +0,0 @@
package com.cradle.iitc_mobile.async;
import android.os.AsyncTask;
import com.cradle.iitc_mobile.IITC_FileManager;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.net.URL;
/*
* this class parses the content of a web page.
* since network operations shouldn't be done on main UI thread
* (NetworkOnMainThread exception is thrown) we use an async task for this.
*/
public class UrlContentToString extends AsyncTask<URL, Integer, String> {
@Override
protected String doInBackground(URL... urls) {
String js = "";
URL url = urls[0];
try {
FileInputStream is = new FileInputStream(new File(url.getPath()));
js = IITC_FileManager.readStream(is);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return js;
}
}

View File

@ -44,20 +44,6 @@ public class MainSettings extends PreferenceFragment {
IITC_AboutDialogPreference pref_about = (IITC_AboutDialogPreference) findPreference("pref_about");
pref_about.setVersions(iitcVersion, buildVersion);
// set iitc source
EditTextPreference pref_iitc_source = (EditTextPreference) findPreference("pref_iitc_source");
pref_iitc_source.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
preference.setSummary(getString(R.string.pref_select_iitc_sum) + " " + newValue);
// TODO: update mIitcVersion when iitc source has changed
return true;
}
});
// first init of summary
String pref_iitc_source_sum = getString(R.string.pref_select_iitc_sum) + " " + pref_iitc_source.getText();
pref_iitc_source.setSummary(pref_iitc_source_sum);
final ListPreference pref_user_location_mode = (ListPreference) findPreference("pref_user_location_mode");
pref_user_location_mode.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override