diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-08-28 17:03:15 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-08-28 17:03:15 +0200 |
commit | 820e183ca76d0f7feb5d7584d5eddcd49a4e7d57 (patch) | |
tree | 3b86322e52d2f6589a3cb0e33559f2b862ac79f9 /openpgp-api | |
parent | 3433d1297dc095eaf2a004c761af89aef6ce5dd7 (diff) | |
download | openpgp-api-820e183ca76d0f7feb5d7584d5eddcd49a4e7d57.tar.gz openpgp-api-820e183ca76d0f7feb5d7584d5eddcd49a4e7d57.tar.bz2 openpgp-api-820e183ca76d0f7feb5d7584d5eddcd49a4e7d57.zip |
Fix and improve OpenPgpService2 code
Diffstat (limited to 'openpgp-api')
3 files changed, 17 insertions, 9 deletions
diff --git a/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl b/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl index 8fa619b..3689d17 100644 --- a/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl +++ b/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl @@ -13,13 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + package org.openintents.openpgp; interface IOpenPgpService { - // see OpenPgpApi for documentation - //DEPRECATED, do NOT use this, data returned from the service through "output" may be truncated + /** + * do NOT use this, data returned from the service through "output" may be truncated + * @deprecated + */ Intent execute(in Intent data, in ParcelFileDescriptor input, in ParcelFileDescriptor output); }
\ No newline at end of file diff --git a/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService2.aidl b/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService2.aidl index 39c24e5..8aa4dd2 100644 --- a/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService2.aidl +++ b/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService2.aidl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2015 Dominik Schürmann <dominik@dominikschuermann.de> + * Copyright (C) 2015 Dominik Schürmann <dominik@dominikschuermann.de> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,13 @@ package org.openintents.openpgp; interface IOpenPgpService2 { + /** + * see org.openintents.openpgp.util.OpenPgpApi for documentation + */ ParcelFileDescriptor createOutputPipe(in int pipeId); + + /** + * see org.openintents.openpgp.util.OpenPgpApi for documentation + */ Intent execute(in Intent data, in ParcelFileDescriptor input, int pipeId); } diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java b/openpgp-api/src/main/java/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java index 461a5ba..931ed84 100644 --- a/openpgp-api/src/main/java/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java +++ b/openpgp-api/src/main/java/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java @@ -18,6 +18,7 @@ package org.openintents.openpgp.util; import android.os.ParcelFileDescriptor; +import android.util.Log; import java.io.IOException; import java.io.InputStream; @@ -69,17 +70,15 @@ public class ParcelFileDescriptorUtil { mOut.write(buf, 0, len); } } catch (IOException e) { - e.printStackTrace(); + Log.e(OpenPgpApi.TAG, "IOException when writing to out", e); } finally { try { mIn.close(); - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException ignored) { } try { mOut.close(); - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException ignored) { } } } |