Skip to content
Snippets Groups Projects
Commit 1998947e authored by cyberta's avatar cyberta
Browse files

hide gateway pinning entry and obfuscation pinning entry in releases

parent 638966bf
Branches
No related tags found
No related merge requests found
...@@ -228,14 +228,15 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh ...@@ -228,14 +228,15 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
} }
private void initGatewayPinningEntry(View rootView) { private void initGatewayPinningEntry(View rootView) {
IconTextEntry gatewayPinning = rootView.findViewById(R.id.gateway_pinning);
if (!BuildConfig.BUILD_TYPE.equals("debug")) { if (!BuildConfig.BUILD_TYPE.equals("debug")) {
gatewayPinning.setVisibility(GONE);
return; return;
} }
Context context = this.getContext(); Context context = this.getContext();
if (context == null) { if (context == null) {
return; return;
} }
IconTextEntry gatewayPinning = rootView.findViewById(R.id.gateway_pinning);
String pinnedGateway = PreferenceHelper.getPinnedGateway(rootView.getContext()); String pinnedGateway = PreferenceHelper.getPinnedGateway(rootView.getContext());
gatewayPinning.setSubtitle(pinnedGateway != null ? pinnedGateway : "Connect to a specific Gateway for debugging purposes"); gatewayPinning.setSubtitle(pinnedGateway != null ? pinnedGateway : "Connect to a specific Gateway for debugging purposes");
...@@ -264,7 +265,10 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh ...@@ -264,7 +265,10 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
public void initObfuscationPinningEntry(View rootView) { public void initObfuscationPinningEntry(View rootView) {
IconSwitchEntry obfuscationPinning = rootView.findViewById(R.id.obfuscation_proxy_pinning); IconSwitchEntry obfuscationPinning = rootView.findViewById(R.id.obfuscation_proxy_pinning);
if (useObfsVpn()) { if (!BuildConfig.BUILD_TYPE.equals("debug") || !useObfsVpn()) {
obfuscationPinning.setVisibility(GONE);
return;
}
obfuscationPinning.setVisibility(VISIBLE); obfuscationPinning.setVisibility(VISIBLE);
boolean useBridges = getUseBridges(getContext()); boolean useBridges = getUseBridges(getContext());
obfuscationPinning.setEnabled(useBridges); obfuscationPinning.setEnabled(useBridges);
...@@ -285,9 +289,6 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh ...@@ -285,9 +289,6 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
showObfuscationPinningDialog(); showObfuscationPinningDialog();
} }
}); });
} else {
obfuscationPinning.setVisibility(GONE);
}
} }
public void showObfuscationPinningDialog() { public void showObfuscationPinningDialog() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment