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

Side by Side Diff: src/org/adblockplus/android/ProxyConfigurationActivity.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
OLDNEW
1 package org.adblockplus.android; 1 package org.adblockplus.android;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
4 import android.content.Intent; 4 import android.content.Intent;
5 import android.os.Bundle; 5 import android.os.Bundle;
6 import android.provider.Settings; 6 import android.provider.Settings;
7 import android.text.Html; 7 import android.text.Html;
8 import android.text.method.LinkMovementMethod; 8 import android.text.method.LinkMovementMethod;
9 import android.view.View; 9 import android.view.View;
10 import android.widget.Button; 10 import android.widget.Button;
11 import android.widget.TextView; 11 import android.widget.TextView;
12 12
13 public class ProxyConfigurationActivity extends Activity 13 public class ProxyConfigurationActivity extends Activity
14 { 14 {
15 @Override 15 @Override
16 public void onCreate(final Bundle savedInstanceState) 16 public void onCreate(final Bundle savedInstanceState)
17 { 17 {
18 super.onCreate(savedInstanceState); 18 super.onCreate(savedInstanceState);
19 setContentView(R.layout.proxyconfiguration); 19 setContentView(R.layout.proxyconfiguration);
20 final int port = getIntent().getIntExtra("port", 0); 20 final int port = getIntent().getIntExtra("port", 0);
21 21
22 final StringBuilder info = new StringBuilder(); 22 final StringBuilder info = new StringBuilder();
23 final int textId = Utils.isNativeProxySupported(this) ? R.raw.proxysettings : R.raw.proxysettings_old; 23 final int textId = ProxyService.GLOBAL_PROXY_USER_CONFIGURABLE ? R.raw.proxy settings : R.raw.proxysettings_old;
24 AdblockPlus.appendRawTextFile(this, info, textId); 24 AdblockPlus.appendRawTextFile(this, info, textId);
25 final String msg = String.format(info.toString(), port); 25 final String msg = String.format(info.toString(), port);
26 26
27 final TextView tv = (TextView) findViewById(R.id.message_text); 27 final TextView tv = (TextView) findViewById(R.id.message_text);
28 tv.setText(Html.fromHtml(msg)); 28 tv.setText(Html.fromHtml(msg));
29 tv.setMovementMethod(LinkMovementMethod.getInstance()); 29 tv.setMovementMethod(LinkMovementMethod.getInstance());
30 30
31 final Button buttonToHide = (Button) findViewById(Utils.isNativeProxySupport ed(this) ? R.id.gotit : R.id.opensettings); 31 final Button buttonToHide = (Button) findViewById(ProxyService.GLOBAL_PROXY_ USER_CONFIGURABLE ? R.id.gotit : R.id.opensettings);
32 buttonToHide.setVisibility(View.GONE); 32 buttonToHide.setVisibility(View.GONE);
33 } 33 }
34 34
35 public void onGotit(final View view) 35 public void onGotit(final View view)
36 { 36 {
37 finish(); 37 finish();
38 } 38 }
39 39
40 public void onSettings(final View view) 40 public void onSettings(final View view)
41 { 41 {
42 startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); 42 startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
43 finish(); 43 finish();
44 } 44 }
45 } 45 }
OLDNEW
« no previous file with comments | « src/org/adblockplus/android/ConfigurationActivity.java ('k') | src/org/adblockplus/android/ProxyService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld