Fix testNoDebuggingFeaturesRestriction fails in eng/userdebug build

Bug: 21628547
Change-Id: Ib7a3bb9dd31a6822834ea8603e23f7ad3e8866f5
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
index 7d8fa67..255c49e 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
@@ -217,6 +217,11 @@
         // If adb is running as root, then the adb uid is 0 instead of SHELL_UID,
         // so the DISALLOW_DEBUGGING_FEATURES restriction does not work and this test
         // fails.
+        if (getDevice().isAdbRoot()) {
+            CLog.logAndDisplay(LogLevel.INFO,
+                    "Cannot test testNoDebuggingFeaturesRestriction() in eng/userdebug build");
+            return;
+        }
         String restriction = "no_debugging_features";  // UserManager.DISALLOW_DEBUGGING_FEATURES
         String command = "add-restriction";