Use explicit intent for installing system credentials

Bug: 3020049
Change-Id: Iae999db70ee1a4e12d660c9335232b2429b8a5db
diff --git a/src/com/android/certinstaller/CredentialHelper.java b/src/com/android/certinstaller/CredentialHelper.java
index 15f31ce..5ad7f87 100644
--- a/src/com/android/certinstaller/CredentialHelper.java
+++ b/src/com/android/certinstaller/CredentialHelper.java
@@ -228,6 +228,10 @@
 
     Intent createSystemInstallIntent() {
         Intent intent = new Intent(Credentials.SYSTEM_INSTALL_ACTION);
+        // To prevent the private key from being sniffed, we explicitly spell
+        // out the intent receiver class.
+        intent.setClassName("com.android.settings",
+                "com.android.settings.CredentialInstaller");
         if (mUserKey != null) {
             intent.putExtra(Credentials.USER_PRIVATE_KEY + mName,
                     convertToPem(mUserKey));