diff options
| author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-03 16:27:13 +0200 | 
|---|---|---|
| committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-03 16:27:13 +0200 | 
| commit | 0657f9289a220974d24de379295eeb976ebee7f8 (patch) | |
| tree | 32a295d34522b0b33dd8f084d0b8fcdf99d0deb2 /OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp | |
| parent | 24454b9d88a23ebda7e4c9cc57a1fb0750872390 (diff) | |
| download | open-keychain-0657f9289a220974d24de379295eeb976ebee7f8.tar.gz open-keychain-0657f9289a220974d24de379295eeb976ebee7f8.tar.bz2 open-keychain-0657f9289a220974d24de379295eeb976ebee7f8.zip  | |
simplify OpenPgpServiceConnection
Diffstat (limited to 'OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp')
| -rw-r--r-- | OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java b/OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java index c80656c52..346055dcd 100644 --- a/OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java +++ b/OpenPGP-Keychain-API/libraries/openpgp-api-library/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java @@ -27,7 +27,6 @@ import android.os.IBinder;  public class OpenPgpServiceConnection {      private Context mApplicationContext; -    private boolean mBound;      private IOpenPgpService mService;      private String mProviderPackageName; @@ -41,18 +40,16 @@ public class OpenPgpServiceConnection {      }      public boolean isBound() { -        return mBound; +        return (mService != null);      }      private ServiceConnection mServiceConnection = new ServiceConnection() {          public void onServiceConnected(ComponentName name, IBinder service) {              mService = IOpenPgpService.Stub.asInterface(service); -            mBound = true;          }          public void onServiceDisconnected(ComponentName name) {              mService = null; -            mBound = false;          }      }; @@ -63,7 +60,7 @@ public class OpenPgpServiceConnection {       */      public boolean bindToService() {          // if not already bound... -        if (mService == null && !mBound) { +        if (mService == null) {              try {                  Intent serviceIntent = new Intent();                  serviceIntent.setAction(IOpenPgpService.class.getName());  | 
