Add ab_ota_keys prop to android_device

This will be populated with PRODUCT_OTA_PUBLIC_KEYS for now.

It will be used to generate otakeys.txt file in
target_files.zip

Test: Built soong target_files.zip locally
Bug: 388633394
Change-Id: If10e0f6a7fcd55239e87dffa92341ed8c31d17cc
diff --git a/android/variable.go b/android/variable.go
index 419f778..aace6ed 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -665,6 +665,7 @@
 	ProductVirtualAbCowVersion        string                                   `json:",omitempty"`
 	AbOtaUpdater                      bool                                     `json:",omitempty"`
 	AbOtaPartitions                   []string                                 `json:",omitempty"`
+	AbOtaKeys                         []string                                 `json:",omitempty"`
 
 	// Avb (android verified boot) stuff
 	BoardAvbEnable          bool                                `json:",omitempty"`
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index d42927a..514fd28 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -72,6 +72,7 @@
 
 	Ab_ota_updater    *bool
 	Ab_ota_partitions []string
+	Ab_ota_keys       []string
 }
 
 type androidDevice struct {
@@ -449,6 +450,10 @@
 		abPartitionsSorted := android.SortedUniqueStrings(a.deviceProps.Ab_ota_partitions)
 		abPartitionsSortedString := proptools.ShellEscape(strings.Join(abPartitionsSorted, "\\n"))
 		builder.Command().Textf("echo -e").Flag(abPartitionsSortedString).Textf(" > %s/META/ab_partitions.txt", targetFilesDir.String())
+		// otakeys.txt
+		abOtaKeysSorted := android.SortedUniqueStrings(a.deviceProps.Ab_ota_keys)
+		abOtaKeysSortedString := proptools.ShellEscape(strings.Join(abOtaKeysSorted, "\\n"))
+		builder.Command().Textf("echo -e").Flag(abOtaKeysSortedString).Textf(" > %s/META/otakeys.txt", targetFilesDir.String())
 	}
 }