mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
PGP test improvements
This commit is contained in:
parent
60eca2c595
commit
386475a4d9
1 changed files with 6 additions and 3 deletions
|
@ -136,6 +136,9 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|||
Log.e(ex);
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG)
|
||||
openPgpProvider.add("eu.faircode.test");
|
||||
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, android.R.id.text1);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
adapter.addAll(openPgpProvider);
|
||||
|
@ -390,17 +393,17 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|||
if (pgpService != null && pgpService.isBound())
|
||||
pgpService.unbindFromService();
|
||||
|
||||
tvOpenPgpStatus.setText("PGP binding to " + pkg);
|
||||
tvOpenPgpStatus.setText("Connecting to " + pkg);
|
||||
pgpService = new OpenPgpServiceConnection(getContext(), pkg, new OpenPgpServiceConnection.OnBound() {
|
||||
@Override
|
||||
public void onBound(IOpenPgpService2 service) {
|
||||
tvOpenPgpStatus.setText("PGP bound to " + pkg);
|
||||
tvOpenPgpStatus.setText("Connected to " + pkg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
if ("bindService() returned false!".equals(ex.getMessage()))
|
||||
tvOpenPgpStatus.setText("No OpenPGP providers");
|
||||
tvOpenPgpStatus.setText("Not connected");
|
||||
else {
|
||||
Log.e(ex);
|
||||
tvOpenPgpStatus.setText(ex.toString());
|
||||
|
|
Loading…
Reference in a new issue