Browse Source

Merge pull request #21 from Awesomez/master

add baidu search engine
master
Anthony Restaino 11 years ago
parent
commit
89b7f63a75
  1. 3
      src/acr/browser/barebones/activities/BarebonesActivity.java
  2. 3
      src/acr/browser/barebones/activities/IncognitoModeActivity.java
  3. 8
      src/acr/browser/barebones/activities/SettingsActivity.java
  4. 1
      src/acr/browser/barebones/utilities/FinalVariables.java

3
src/acr/browser/barebones/activities/BarebonesActivity.java

@ -1692,6 +1692,9 @@ public class BarebonesActivity extends Activity { @@ -1692,6 +1692,9 @@ public class BarebonesActivity extends Activity {
case 5:
SEARCH = FinalVariables.DUCK_SEARCH;
break;
case 6:
SEARCH = FinalVariables.BAIDU_SEARCH;
break;
}
exitTab = getResources().getDrawable(R.drawable.stop); // user

3
src/acr/browser/barebones/activities/IncognitoModeActivity.java

@ -1654,6 +1654,9 @@ public class IncognitoModeActivity extends Activity { @@ -1654,6 +1654,9 @@ public class IncognitoModeActivity extends Activity {
case 5:
SEARCH = FinalVariables.DUCK_SEARCH;
break;
case 6:
SEARCH = FinalVariables.BAIDU_SEARCH;
break;
}
exitTab = getResources().getDrawable(R.drawable.stop); // user

8
src/acr/browser/barebones/activities/SettingsActivity.java

@ -88,6 +88,9 @@ public class SettingsActivity extends Activity { @@ -88,6 +88,9 @@ public class SettingsActivity extends Activity {
case 5:
searchText.setText("DuckDuckGo");
break;
case 6:
searchText.setText("Baidu");
break;
}
back.setBackgroundResource(R.drawable.button);
@ -211,7 +214,7 @@ public class SettingsActivity extends Activity { @@ -211,7 +214,7 @@ public class SettingsActivity extends Activity {
SettingsActivity.this);
picker.setTitle("Search Engine");
CharSequence[] chars = { "Google (Suggested)", "Bing", "Yahoo",
"StartPage", "DuckDuckGo (Privacy)" };
"StartPage", "DuckDuckGo (Privacy)" ,"Baidu"};
int n = settings.getInt("search", 1);
@ -239,6 +242,9 @@ public class SettingsActivity extends Activity { @@ -239,6 +242,9 @@ public class SettingsActivity extends Activity {
case 5:
searchText.setText("DuckDuckGo");
break;
case 6:
searchText.setText("Baidu");
break;
}
}
});

1
src/acr/browser/barebones/utilities/FinalVariables.java

@ -15,6 +15,7 @@ public class FinalVariables { @@ -15,6 +15,7 @@ public class FinalVariables {
public static final String GOOGLE_SEARCH = "https://www.google.com/search?client=lightning&q=";
public static final String BING_SEARCH = "http://www.bing.com/search?q=";
public static final String DUCK_SEARCH = "https://duckduckgo.com/?t=lightning&q=";
public static final String BAIDU_SEARCH = "http://www.baidu.com/s?wd=";
public static final String STARTPAGE_SEARCH = "https://startpage.com/do/metasearch.pl?language=english&cat=web&query=";
public static final String HOMEPAGE = "https://www.google.com/";
public static final String SETTINGS_INTENT = "android.intent.action.SETTINGS";

Loading…
Cancel
Save