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

Unified Diff: src/org/adblockplus/android/ProxyConfigurationActivity.java

Issue 9643003: Improve manual proxy configuration (Closed)
Patch Set: Addressed review issues Created March 13, 2013, 8:48 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/org/adblockplus/android/Preferences.java ('k') | src/org/adblockplus/android/ProxyService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/ProxyConfigurationActivity.java
===================================================================
--- a/src/org/adblockplus/android/ProxyConfigurationActivity.java
+++ b/src/org/adblockplus/android/ProxyConfigurationActivity.java
@@ -2,11 +2,13 @@
import android.app.Activity;
import android.content.Intent;
+import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
+import android.widget.Button;
import android.widget.TextView;
public class ProxyConfigurationActivity extends Activity
@@ -17,15 +19,18 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.proxyconfiguration);
int port = getIntent().getIntExtra("port", 0);
-
+
StringBuilder info = new StringBuilder();
- AdblockPlus.appendRawTextFile(this, info, R.raw.proxysettings);
+ int textId = ProxyService.NATIVE_PROXY_SUPPORTED ? R.raw.proxysettings : R.raw.proxysettings_old;
+ AdblockPlus.appendRawTextFile(this, info, textId);
String msg = String.format(info.toString(), port);
TextView tv = (TextView) findViewById(R.id.message_text);
tv.setText(Html.fromHtml(msg));
tv.setMovementMethod(LinkMovementMethod.getInstance());
+ Button buttonToHide = (Button) findViewById(ProxyService.NATIVE_PROXY_SUPPORTED ? R.id.gotit : R.id.opensettings);
+ buttonToHide.setVisibility(View.GONE);
}
public void onGotit(View view)
« no previous file with comments | « src/org/adblockplus/android/Preferences.java ('k') | src/org/adblockplus/android/ProxyService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld