Fix public/private key options on sign_target_files_apks

The if statements appear to check for public_signing
and then calls the private_signing function, and vice
versa.

Change-Id: I4511b9bcf0e03b9ba49b69eb80db84cf31d77020
diff --git a/tools/releasetools/sign_target_files_apks b/tools/releasetools/sign_target_files_apks
index 98d2dc1..075c925 100755
--- a/tools/releasetools/sign_target_files_apks
+++ b/tools/releasetools/sign_target_files_apks
@@ -175,10 +175,10 @@
     out_info = copy.copy(info)
 
     if (info.filename == "META/misc_info.txt" and
-        OPTIONS.replace_verity_public_key):
+        OPTIONS.replace_verity_private_key):
       ReplaceVerityPrivateKey(input_tf_zip, output_tf_zip, misc_info, OPTIONS.replace_verity_private_key[1])
     elif (info.filename == "BOOT/RAMDISK/verity_key" and
-        OPTIONS.replace_verity_private_key):
+        OPTIONS.replace_verity_public_key):
       ReplaceVerityPublicKey(output_tf_zip, OPTIONS.replace_verity_public_key[1])
     elif (info.filename.startswith("BOOT/") or
         info.filename.startswith("RECOVERY/") or
@@ -216,10 +216,10 @@
                             "SYSTEM/etc/security/otacerts.zip")):
       # don't copy these files if we're regenerating them below
       pass
-    elif (OPTIONS.replace_verity_public_key and
+    elif (OPTIONS.replace_verity_private_key and
           info.filename == "META/misc_info.txt"):
       pass
-    elif (OPTIONS.replace_verity_private_key and
+    elif (OPTIONS.replace_verity_public_key and
           info.filename == "BOOT/RAMDISK/verity_key"):
       pass
     else: