Skip to content
Snippets Groups Projects
Commit 13c75b3b authored by cyberta's avatar cyberta
Browse files

Merge branch 'beta_and_debug_settings' into 'master'

hide gateway pinning entry and obfuscation pinning entry in releases

See merge request leap/bitmask_android!242
parents 638966bf 1998947e
Branches
No related tags found
No related merge requests found
......@@ -228,14 +228,15 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
}
private void initGatewayPinningEntry(View rootView) {
IconTextEntry gatewayPinning = rootView.findViewById(R.id.gateway_pinning);
if (!BuildConfig.BUILD_TYPE.equals("debug")) {
gatewayPinning.setVisibility(GONE);
return;
}
Context context = this.getContext();
if (context == null) {
return;
}
IconTextEntry gatewayPinning = rootView.findViewById(R.id.gateway_pinning);
String pinnedGateway = PreferenceHelper.getPinnedGateway(rootView.getContext());
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
public void initObfuscationPinningEntry(View rootView) {
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);
boolean useBridges = getUseBridges(getContext());
obfuscationPinning.setEnabled(useBridges);
......@@ -285,9 +289,6 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
showObfuscationPinningDialog();
}
});
} else {
obfuscationPinning.setVisibility(GONE);
}
}
public void showObfuscationPinningDialog() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment