Enable CAT in userdebug build by default

Note: Enable CAT in userdebug build by default
      for CBRS auto test.

Bug: 152921347
Bug: 152341603
Test: Check CAT property and send CAT command
Change-Id: I76090c6fa25e62e4704966cca1776ed052b25426
diff --git a/device.mk b/device.mk
index f43b5d2..dbca309 100644
--- a/device.mk
+++ b/device.mk
@@ -146,6 +146,12 @@
       $(LOCAL_PATH)/init.hardware.diag.rc.user:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).diag.rc
 endif
 
+# Enable CAT by default
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+  PRODUCT_COPY_FILES += \
+      $(LOCAL_PATH)/init.cat.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.cat.rc
+endif
+
 # A/B support
 PRODUCT_PACKAGES += \
     otapreopt_script \
diff --git a/init.cat.rc.userdebug b/init.cat.rc.userdebug
new file mode 100644
index 0000000..704e4ba
--- /dev/null
+++ b/init.cat.rc.userdebug
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2018 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+on boot
+    setprop persist.vendor.radio.scone_cat.enable 1