Expose getCurrentSpi from crypto operations as hidden API.
050e672a exposed the existing getSpi method of Cipher, Signature, Mac, and KeyAgreement as hidden API. Unfortunately, the getSpi method creates an SPI instance if one is not yet set. This changes the state of the crypto operation and does does not lend itself well to being used for read-only querying of the SPI from a crypto operation. This CL addresses the issue by adding a getCurrentSpi hidden API to these crypto operations. getCurrentSpi simply returns the current SPI instance, if any, and does not modify the state of the crypto operation. A follow-up CL will revert 050e672a which will no longer be needed. This is not reverted here to avoid breaking the build. Bug: 18088752 Change-Id: Ifc0b0db1bcbc7447353254f0e2bcf8962cd3919e
Loading
Please sign in to comment