Skip to content

Commit

Permalink
Clarity and cleanup from review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Schwartz committed Aug 15, 2019
1 parent 3062c12 commit 581e494
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Android/app/src/main/java/app/intra/net/socks/TLSProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
// Static utility to check whether the user's connection supports standard TLS sockets.
class TLSProbe {
enum Result {SUCCESS, TLS_FAILED, OTHER_FAILED}
private static Result probe(String server) {
private static Result probe(String target) {
try {
URL url = new URL("https://" + server);
URL url = new URL("https://" + target);
url.openConnection().connect();
} catch (SSLHandshakeException e) {
if (e.getMessage().toLowerCase().contains("cert")) {
Expand All @@ -43,14 +43,14 @@ private static Result probe(String server) {
return Result.SUCCESS;
}

static Result run(Context context, String[] servers) {
static Result run(Context context, String[] targets) {
Result worstResult = Result.SUCCESS;
for (String server : servers) {
Result r = probe(server);
for (String target : targets) {
Result r = probe(target);
if (context != null) {
Bundle b = new Bundle();
b.putString(Names.RESULT.name(), r.name());
b.putString(Names.SERVER.name(), server);
b.putString(Names.SERVER.name(), target);
FirebaseAnalytics.getInstance(context).logEvent(Names.TLS_PROBE.name(), b);
}
if (r == Result.TLS_FAILED ||
Expand Down
1 change: 0 additions & 1 deletion Android/app/src/main/java/app/intra/sys/AutoStarter.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import android.net.VpnService;
import android.util.Log;
import app.intra.ui.MainActivity;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;

/**
* Broadcast receiver that runs on boot, and also when the app is restarted due to an update.
Expand Down
4 changes: 3 additions & 1 deletion Android/app/src/main/java/app/intra/sys/RemoteConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;

/**
* Utility class for initializing Firebase Remote Config.
* Utility class for initializing Firebase Remote Config. Remote Configuration allows us to conduct
* A/B tests of experimental functionality, and to enable or disable features without having to
* release a new version of the app.
*/
public class RemoteConfig {
public static Task<Boolean> update() {
Expand Down

0 comments on commit 581e494

Please sign in to comment.