commit | a7192e46ad2f5bf84cf68b02a56190a1facca9ad | [log] [tgz] |
---|---|---|
author | Ricky Wai <rickywai@google.com> | Tue Jun 09 16:44:49 2015 +0100 |
committer | Ricky Wai <rickywai@google.com> | Wed Jun 10 14:54:16 2015 +0100 |
tree | 7684a294cf02f163a6056bc9a9c3ac0ab7c41409 | |
parent | 7fe16ae9e5f6deb32b9d0301161c2b87ef94436b [diff] |
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";