Merge "Remove an Android change that is causing a test to fail"
am: 49edf3ace6

Change-Id: I5a86265b57641be1ddd39c073588aa33d99e5b27
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
index 5d8e6b1..6e1eda2 100644
--- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
+++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
@@ -133,20 +133,14 @@
         try
         {
             result = agreement.calculateAgreement(pubKey);
-        // BEGIN android-changed
-        // Was:
-        // } catch (final Exception e) {
-        //     throw new InvalidKeyException("calculation failed: " + e.getMessage())
-        //     {
-        //         public Throwable getCause()
-        //                     {
-        //                         return e;
-        //                     }
-        //     };
-        // }
-        // END android-changed
-        } catch (IllegalStateException e) {
-            throw new InvalidKeyException("Invalid public key");
+        } catch (final Exception e) {
+            throw new InvalidKeyException("calculation failed: " + e.getMessage())
+            {
+                public Throwable getCause()
+                            {
+                                return e;
+                            }
+            };
         }
         return null;
     }