Debug: moved ciphers button to connection settings

pull/208/head
M66B 2 years ago
parent 0248a7eb18
commit 528d60fae8

@ -20,6 +20,7 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
@ -50,6 +51,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SwitchCompat;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.Group;
@ -79,6 +81,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
private TextView tvNetworkMetered;
private TextView tvNetworkRoaming;
private CardView cardDebug;
private Button btnCiphers;
private TextView tvNetworkInfo;
private Group grpValidated;
@ -125,6 +128,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
tvNetworkRoaming = view.findViewById(R.id.tvNetworkRoaming);
cardDebug = view.findViewById(R.id.cardDebug);
btnCiphers = view.findViewById(R.id.btnCiphers);
tvNetworkInfo = view.findViewById(R.id.tvNetworkInfo);
grpValidated = view.findViewById(R.id.grpValidated);
@ -302,6 +306,23 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
}
});
btnCiphers.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new AlertDialog.Builder(getContext())
.setIcon(R.drawable.twotone_info_24)
.setTitle(R.string.title_advanced_ciphers)
.setMessage(Log.getCiphers())
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Do nothing
}
})
.show();
}
});
// Initialize
FragmentDialogTheme.setBackground(getContext(), view, false);
tvNetworkMetered.setVisibility(View.GONE);

@ -192,7 +192,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private Button btnGC;
private Button btnCharsets;
private Button btnFontMap;
private Button btnCiphers;
private Button btnFiles;
private Button btnUris;
private Button btnAllPermissions;
@ -367,7 +366,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
btnGC = view.findViewById(R.id.btnGC);
btnCharsets = view.findViewById(R.id.btnCharsets);
btnFontMap = view.findViewById(R.id.btnFontMap);
btnCiphers = view.findViewById(R.id.btnCiphers);
btnFiles = view.findViewById(R.id.btnFiles);
btnUris = view.findViewById(R.id.btnUris);
btnAllPermissions = view.findViewById(R.id.btnAllPermissions);
@ -1297,23 +1295,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
btnCiphers.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new AlertDialog.Builder(getContext())
.setIcon(R.drawable.twotone_info_24)
.setTitle(R.string.title_advanced_ciphers)
.setMessage(Log.getCiphers())
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Do nothing
}
})
.show();
}
});
final String title = getString(R.string.title_advanced_files, Helper.humanReadableByteCount(MIN_FILE_SIZE));
btnFiles.setText(title);

@ -552,6 +552,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnCiphers"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_ciphers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCaptionDebug" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvNetworkInfo"
android:layout_width="0dp"
@ -565,7 +575,7 @@
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCaptionDebug" />
app:layout_constraintTop_toBottomOf="@id/btnCiphers" />
</eu.faircode.email.ConstraintLayoutEx>
</androidx.cardview.widget.CardView>
</eu.faircode.email.ConstraintLayoutEx>

@ -1623,16 +1623,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnCharsets" />
<Button
android:id="@+id/btnCiphers"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_ciphers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnFontMap" />
<Button
android:id="@+id/btnFiles"
style="?android:attr/buttonStyleSmall"
@ -1641,7 +1631,7 @@
android:layout_marginTop="12dp"
android:text="@string/title_advanced_files"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnCiphers" />
app:layout_constraintTop_toBottomOf="@id/btnFontMap" />
<Button
android:id="@+id/btnUris"

Loading…
Cancel
Save