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

Commit 65b01db1 authored by Rhed Jao's avatar Rhed Jao
Browse files

Downgrade error messages to the warning

For error logs which we could ignore in the package manager,
downgrade them to the warning for the green log purpose.

Bug: 181269159
Test: Manual boot up and check
Change-Id: Id290e496b794922444ddeaed1de5f291785dad14
parent 5cd74d3d
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -7198,7 +7198,7 @@ public class PackageManagerService extends IPackageManager.Stub
                        updateSharedLibrariesLocked(pkg, stubPkgSetting, null, null,
                        updateSharedLibrariesLocked(pkg, stubPkgSetting, null, null,
                                Collections.unmodifiableMap(mPackages));
                                Collections.unmodifiableMap(mPackages));
                    } catch (PackageManagerException e) {
                    } catch (PackageManagerException e) {
                        Slog.e(TAG, "updateAllSharedLibrariesLPw failed: ", e);
                        Slog.w(TAG, "updateAllSharedLibrariesLPw failed: ", e);
                    }
                    }
                    final int[] userIds = mUserManager.getUserIds();
                    final int[] userIds = mUserManager.getUserIds();
                    for (final int userId : userIds) {
                    for (final int userId : userIds) {
@@ -7450,7 +7450,7 @@ public class PackageManagerService extends IPackageManager.Stub
        if (matches.size() == 1) {
        if (matches.size() == 1) {
            return matches.get(0).getComponentInfo().packageName;
            return matches.get(0).getComponentInfo().packageName;
        } else if (matches.size() == 0) {
        } else if (matches.size() == 0) {
            Log.e(TAG, "There should probably be a verifier, but, none were found");
            Log.w(TAG, "There should probably be a verifier, but, none were found");
            return null;
            return null;
        }
        }
        throw new RuntimeException("There must be exactly one verifier; found " + matches);
        throw new RuntimeException("There must be exactly one verifier; found " + matches);
@@ -22824,7 +22824,7 @@ public class PackageManagerService extends IPackageManager.Stub
        if (matches.size() == 1) {
        if (matches.size() == 1) {
            return matches.get(0).getComponentInfo().packageName;
            return matches.get(0).getComponentInfo().packageName;
        } else {
        } else {
            Slog.e(TAG, "There should probably be exactly one storage manager; found "
            Slog.w(TAG, "There should probably be exactly one storage manager; found "
                    + matches.size() + ": matches=" + matches);
                    + matches.size() + ": matches=" + matches);
            return null;
            return null;
        }
        }
@@ -25016,7 +25016,7 @@ public class PackageManagerService extends IPackageManager.Stub
                    // already held, since it's invoked as a side-effect of
                    // already held, since it's invoked as a side-effect of
                    // executeBatchLI()
                    // executeBatchLI()
                    if (e != null) {
                    if (e != null) {
                        logCriticalInfo(Log.ERROR, "Failed to create app data for " + packageName
                        logCriticalInfo(Log.WARN, "Failed to create app data for " + packageName
                                + ", but trying to recover: " + e);
                                + ", but trying to recover: " + e);
                        destroyAppDataLeafLIF(pkg, userId, flags);
                        destroyAppDataLeafLIF(pkg, userId, flags);
                        try {
                        try {
+2 −2
Original line number Original line Diff line number Diff line
@@ -1229,7 +1229,7 @@ public final class Settings implements Watchable, Snappable {
                size++;
                size++;
            }
            }
            if (mAppIds.get(index) != null) {
            if (mAppIds.get(index) != null) {
                PackageManagerService.reportSettingsProblem(Log.ERROR,
                PackageManagerService.reportSettingsProblem(Log.WARN,
                        "Adding duplicate app id: " + appId
                        "Adding duplicate app id: " + appId
                        + " name=" + name);
                        + " name=" + name);
                return false;
                return false;
@@ -1237,7 +1237,7 @@ public final class Settings implements Watchable, Snappable {
            mAppIds.set(index, obj);
            mAppIds.set(index, obj);
        } else {
        } else {
            if (mOtherAppIds.get(appId) != null) {
            if (mOtherAppIds.get(appId) != null) {
                PackageManagerService.reportSettingsProblem(Log.ERROR,
                PackageManagerService.reportSettingsProblem(Log.WARN,
                        "Adding duplicate shared id: " + appId
                        "Adding duplicate shared id: " + appId
                                + " name=" + name);
                                + " name=" + name);
                return false;
                return false;