Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa5b1a23 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Not log error when isPackageEnabled = false

Which is expected when package is not installed or not enabled.

Bug: 369427597
Flag: EXEMPT log only
Test: manual - on sub pages of Settings
Change-Id: Ic8bcf0df8b91d50215be2df8eba20eb447258d1e
parent f7d9c87a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1180,10 +1180,10 @@ public final class Utils extends com.android.settingslib.Utils {
        try {
            return context.getPackageManager().getApplicationInfo(packageName, 0).enabled;
        } 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;
        }
    }

    /** Get {@link Resources} by subscription id if subscription id is valid. */
    public static Resources getResourcesForSubId(Context context, int subId) {