summaryrefslogtreecommitdiff
path: root/SafetyCenter
diff options
context:
space:
mode:
authorElliot Sisteron <elliotsisteron@google.com>2023-06-14 15:49:58 +0000
committerElliot Sisteron <elliotsisteron@google.com>2023-06-14 16:20:43 +0000
commitcb9c8e1f326930f83f9149bd956a1ce884aacb5d (patch)
tree9d25b609b097c456f76c2e6276b8b8dd8b352ed0 /SafetyCenter
parent2a3eaaa7876cb26a3be34021600a6b4c99ba3bbb (diff)
downloadPermission-cb9c8e1f326930f83f9149bd956a1ce884aacb5d.tar.gz
Allow running Safety Center tests without the resources APK.
Iff the device doesn't support Safety Center. Previously the tests would crash if the resources APK is not found while the device doesn't support SC. Bug: 286532479 Test: atest CtsSafetyCenterTestCases && atest SafetyCenterFunctionalTestCases && atest SafetyCenterActivityFunctionalTestCases && atest SafetyCenterFunctionalMultiUsersTestCases (with SC unsupported and resources APK not found) Relnote: N/A Change-Id: Ia10bb399748afa0aadcc771f447e89c80873ffac
Diffstat (limited to 'SafetyCenter')
-rw-r--r--SafetyCenter/ResourcesLib/java/com/android/safetycenter/resources/SafetyCenterResourcesApk.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/SafetyCenter/ResourcesLib/java/com/android/safetycenter/resources/SafetyCenterResourcesApk.java b/SafetyCenter/ResourcesLib/java/com/android/safetycenter/resources/SafetyCenterResourcesApk.java
index b0063d051..fe0908ea0 100644
--- a/SafetyCenter/ResourcesLib/java/com/android/safetycenter/resources/SafetyCenterResourcesApk.java
+++ b/SafetyCenter/ResourcesLib/java/com/android/safetycenter/resources/SafetyCenterResourcesApk.java
@@ -189,10 +189,7 @@ public final class SafetyCenterResourcesApk {
if (info == null) {
// Resource APK not loaded yet, print a stack trace to see where this is called from
- Log.e(
- TAG,
- "Attempted to fetch resources before Safety Center resources APK is loaded!",
- new IllegalStateException());
+ Log.e(TAG, "Could not find Safety Center resources APK", new IllegalStateException());
return null;
}