Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/org/adblockplus/android/AdvancedPreferences.java

Issue 6074937345310720: Issue 1262 - Wrong proxy configuration message (Closed)
Patch Set: Created Aug. 26, 2014, 12:51 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/org/adblockplus/android/ConfigurationActivity.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 { 58 {
59 super.onCreate(savedInstanceState); 59 super.onCreate(savedInstanceState);
60 60
61 addPreferencesFromResource(R.xml.preferences_advanced); 61 addPreferencesFromResource(R.xml.preferences_advanced);
62 62
63 final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreference s(this); 63 final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreference s(this);
64 64
65 this.serviceBinder = new ServiceBinder(this); 65 this.serviceBinder = new ServiceBinder(this);
66 66
67 final PreferenceScreen screen = getPreferenceScreen(); 67 final PreferenceScreen screen = getPreferenceScreen();
68 if (Utils.isNativeProxySupported(this)) 68 if (ProxyService.GLOBAL_PROXY_USER_CONFIGURABLE)
69 { 69 {
70 screen.removePreference(findPreference(getString(R.string.pref_proxy))); 70 screen.removePreference(findPreference(getString(R.string.pref_proxy)));
71 if (prefs.getBoolean(getString(R.string.pref_proxyautoconfigured), false)) 71 if (prefs.getBoolean(getString(R.string.pref_proxyautoconfigured), false))
72 { 72 {
73 screen.removePreference(findPreference(getString(R.string.pref_proxyenab led))); 73 screen.removePreference(findPreference(getString(R.string.pref_proxyenab led)));
74 } 74 }
75 } 75 }
76 if (getResources().getBoolean(R.bool.def_release)) 76 if (getResources().getBoolean(R.bool.def_release))
77 { 77 {
78 screen.removePreference(findPreference(getString(R.string.pref_support))); 78 screen.removePreference(findPreference(getString(R.string.pref_support)));
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 { 193 {
194 if (StringUtils.isNotEmpty(line)) 194 if (StringUtils.isNotEmpty(line))
195 items.add(line); 195 items.add(line);
196 } 196 }
197 } 197 }
198 } 198 }
199 if (proxyService.isNativeProxyAutoConfigured()) 199 if (proxyService.isNativeProxyAutoConfigured())
200 { 200 {
201 items.add("Has native proxy auto configured"); 201 items.add("Has native proxy auto configured");
202 } 202 }
203 if (Utils.isNativeProxySupported(this)) 203 if (ProxyService.GLOBAL_PROXY_USER_CONFIGURABLE)
204 { 204 {
205 final ProxyProperties pp = ProxyProperties.fromContext(getApplicatio nContext()); 205 final ProxyProperties pp = ProxyProperties.fromContext(getApplicatio nContext());
206 if (pp != null) 206 if (pp != null)
207 { 207 {
208 items.add("System settings:"); 208 items.add("System settings:");
209 items.add(String.format("Host: [%s] Port: [%d] Excl: [%s]", pp.get Host(), pp.getPort(), pp.getExclusionList())); 209 items.add(String.format("Host: [%s] Port: [%d] Excl: [%s]", pp.get Host(), pp.getPort(), pp.getExclusionList()));
210 } 210 }
211 } 211 }
212 items.add("Proxy settings:"); 212 items.add("Proxy settings:");
213 items.add(String.format("Host: [%s] Port: [%s] Excl: [%s]", proxyServi ce.proxy.props.getProperty("adblock.proxyHost"), proxyService.proxy.props.getPro perty("adblock.proxyPort"), 213 items.add(String.format("Host: [%s] Port: [%s] Excl: [%s]", proxyServi ce.proxy.props.getProperty("adblock.proxyHost"), proxyService.proxy.props.getPro perty("adblock.proxyPort"),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 { 249 {
250 dialog.cancel(); 250 dialog.cancel();
251 } 251 }
252 }); 252 });
253 dialog = builder.create(); 253 dialog = builder.create();
254 break; 254 break;
255 } 255 }
256 return dialog; 256 return dialog;
257 } 257 }
258 } 258 }
OLDNEW
« no previous file with comments | « no previous file | src/org/adblockplus/android/ConfigurationActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld