Merge "Not log error when isPackageEnabled = false" into main

This commit is contained in:
Chaohui Wang
2024-10-12 01:21:39 +00:00
committed by Android (Google) Code Review

View File

@@ -1180,9 +1180,9 @@ public final class Utils extends com.android.settingslib.Utils {
try { try {
return context.getPackageManager().getApplicationInfo(packageName, 0).enabled; return context.getPackageManager().getApplicationInfo(packageName, 0).enabled;
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "Error while retrieving application info for package " + packageName, e); // Expected, package is not installed or not enabled.
return false;
} }
return false;
} }
/** Get {@link Resources} by subscription id if subscription id is valid. */ /** Get {@link Resources} by subscription id if subscription id is valid. */