check for scheme setting in intel-url generation
This commit is contained in:
parent
1b0dc2393b
commit
16f1ce1fc6
@ -68,7 +68,8 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getIntelUrl(final String ll, final int zoom, final boolean isPortal) {
|
private String getIntelUrl(final String ll, final int zoom, final boolean isPortal) {
|
||||||
String url = "http://www.ingress.com/intel?ll=" + ll + "&z=" + zoom;
|
final String scheme = mSharedPrefs.getBoolean("pref_force_https", true) ? "https" : "http";
|
||||||
|
String url = scheme + "://www.ingress.com/intel?ll=" + ll + "&z=" + zoom;
|
||||||
if (isPortal) {
|
if (isPortal) {
|
||||||
url += "&pll=" + ll;
|
url += "&pll=" + ll;
|
||||||
}
|
}
|
||||||
@ -107,6 +108,8 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
|
|
||||||
mFragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
|
mFragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
|
||||||
|
|
||||||
|
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
final ActionBar actionBar = getActionBar();
|
final ActionBar actionBar = getActionBar();
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
@ -175,7 +178,6 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
}
|
}
|
||||||
|
|
||||||
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
|
||||||
final int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
|
final int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
|
||||||
if (selected < mFragmentAdapter.getCount()) {
|
if (selected < mFragmentAdapter.getCount()) {
|
||||||
mViewPager.setCurrentItem(selected);
|
mViewPager.setCurrentItem(selected);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user