Follow revert back to oc-dev APIs. am: a731198905
am: 702d7f32d2

Change-Id: I5f5ffacd8c90bde8af6b8202f8677f792650f963
diff --git a/testapps/src/com/android/server/telecom/testapps/TestCertActivity.java b/testapps/src/com/android/server/telecom/testapps/TestCertActivity.java
index 0df836c..312b447 100644
--- a/testapps/src/com/android/server/telecom/testapps/TestCertActivity.java
+++ b/testapps/src/com/android/server/telecom/testapps/TestCertActivity.java
@@ -54,6 +54,7 @@
 import java.net.ProtocolException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Date;
 
 import android.util.Base64;
 
@@ -83,16 +84,6 @@
         mCertUrlView.setText(mURL);
     }
 
-    public static PublicKey makeKeyObject(byte[] publicKeyBytes) {
-        try {
-            X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(publicKeyBytes);
-            return KeyFactory.getInstance("RSA").generatePublic(pubKeySpec);
-        } catch (InvalidKeySpecException | NoSuchAlgorithmException ex) {
-            Log.e(LOG_TAG, "Error makeKeyObject: unable to convert into PublicKey", ex);
-        }
-        return null;
-    }
-
     /**
      * Class to get json by making HTTP call
      */
@@ -152,8 +143,6 @@
 
         private void savePublicKey(String key, int type, String identifier) {
             byte[] keyBytes = Base64.decode(key.getBytes(), Base64.DEFAULT);
-            PublicKey publicKey = makeKeyObject(keyBytes);
-            Log.i(LOG_TAG, "generated public key: " + publicKey);
             final TelephonyManager telephonyManager =
                     (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
 
@@ -168,7 +157,7 @@
             }
 
             ImsiEncryptionInfo imsiEncryptionInfo = new ImsiEncryptionInfo(mcc,
-                    mnc, type, identifier, publicKey);
+                    mnc, type, identifier, keyBytes, new Date());
             telephonyManager.setCarrierInfoForImsiEncryption(imsiEncryptionInfo);
             keyList.add(imsiEncryptionInfo.getKeyType() + "," +
                     imsiEncryptionInfo.getKeyIdentifier());