trusty: allow disabling of confirmation UI am: 034998f474

Original change: https://android-review.googlesource.com/c/trusty/app/confirmationui/+/2882786

Change-Id: I45449c4abaea7f262ade2e7e064648c09617d344
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/rules.mk b/rules.mk
index 98432a2..270d96a 100644
--- a/rules.mk
+++ b/rules.mk
@@ -12,6 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+ifeq (true,$(call TOBOOL,$(CONFIRMATIONUI_DISABLED)))
+$(error Trying to build DISABLED confirmationui)
+endif
+
 LOCAL_DIR := $(GET_LOCAL_DIR)
 
 MODULE := $(LOCAL_DIR)
diff --git a/test/rules.mk b/test/rules.mk
index aa816d5..e68f2b5 100644
--- a/test/rules.mk
+++ b/test/rules.mk
@@ -13,6 +13,10 @@
 # limitations under the License.
 #
 
+ifeq (true,$(call TOBOOL,$(CONFIRMATIONUI_DISABLED)))
+$(error Trying to build tests for DISABLED confirmationui)
+endif
+
 LOCAL_DIR := $(GET_LOCAL_DIR)
 
 MODULE := $(LOCAL_DIR)
diff --git a/usertests-inc.mk b/usertests-inc.mk
index a121f93..46dd2df 100644
--- a/usertests-inc.mk
+++ b/usertests-inc.mk
@@ -13,5 +13,7 @@
 # limitations under the License.
 #
 
+ifeq (false,$(call TOBOOL,$(CONFIRMATIONUI_DISABLED)))
 TRUSTY_USER_TESTS += \
-	trusty/user/app/confirmationui/test \
+	trusty/user/app/confirmationui/test
+endif