Loading core/java/com/android/internal/util/Preconditions.java +14 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,20 @@ public class Preconditions { } } /** * Ensures the truth of an expression involving whether the calling identity is authorized to * call the calling method. * * @param expression a boolean expression * @param message the message of the security exception to be thrown * @throws SecurityException if {@code expression} is false */ public static void checkSecurity(final boolean expression, final String message) { if (!expression) { throw new SecurityException(message); } } /** * Ensures the truth of an expression involving whether the calling user is authorized to * call the calling method. Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +200 −91 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
core/java/com/android/internal/util/Preconditions.java +14 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,20 @@ public class Preconditions { } } /** * Ensures the truth of an expression involving whether the calling identity is authorized to * call the calling method. * * @param expression a boolean expression * @param message the message of the security exception to be thrown * @throws SecurityException if {@code expression} is false */ public static void checkSecurity(final boolean expression, final String message) { if (!expression) { throw new SecurityException(message); } } /** * Ensures the truth of an expression involving whether the calling user is authorized to * call the calling method. Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +200 −91 File changed.Preview size limit exceeded, changes collapsed. Show changes