Check for build type, not debuggable, for extra guardrails test.

We were testing for ro.debuggable before, which is wrong in some weird
presubmit targets.

extra guardrails are rejected for fork mode, which is used on user
builds regardless of ro.debuggable. For release apps, the signal is
ignored based on ro.debuggable, so we keep using IsDebuggableBuild for
the condition in ReleaseApp(Runtime|Startup).

Bug: 152839251

Change-Id: Ia89339241b81d9f95f295c728220f51ed4356c9e
diff --git a/test/cts/utils.cc b/test/cts/utils.cc
index 79e5d4d..1dd9b1e 100644
--- a/test/cts/utils.cc
+++ b/test/cts/utils.cc
@@ -52,6 +52,13 @@
   return std::string(buf) == "1";
 }
 
+bool IsUserBuild() {
+  char buf[PROP_VALUE_MAX + 1] = {};
+  int ret = __system_property_get("ro.build.type", buf);
+  PERFETTO_CHECK(ret >= 0);
+  return std::string(buf) == "user";
+}
+
 // note: cannot use gtest macros due to return type
 bool IsAppRunning(const std::string& name) {
   std::string cmd = "pgrep -f ^" + name + "$";