From 52c377cfa936bb9812e38bd623b7bac621919565 Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Thu, 6 Apr 2023 20:20:34 +0900 Subject: [PATCH] Change userdebug or eng condition check with debuggable Looks like VTS is running unlocked user build, so removing build config condition from the cert sideloading shell command Bug: 270484361 Bug: 275538125 Test: N/A Change-Id: If062343abb9b0327f4585b962d3926bfb289eec0 --- .../server/graphics/fonts/FontManagerShellCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java b/services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java index 2ac283370886b..c039a836843cd 100644 --- a/services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java +++ b/services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java @@ -334,8 +334,8 @@ public class FontManagerShellCommand extends ShellCommand { } private int installCert(ShellCommand shell) throws SystemFontException { - if (!(Build.IS_USERDEBUG || Build.IS_ENG)) { - throw new SecurityException("Only userdebug/eng device can add debug certificate"); + if (!Build.IS_DEBUGGABLE) { + throw new SecurityException("Only debuggable device can add debug certificate"); } if (Binder.getCallingUid() != Process.ROOT_UID) { throw new SecurityException("Only root can add debug certificate");