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

Commit 1368cc47 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Log instead of throw exception when pkg not found" into sc-dev am: e90ea3aa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14537490

Change-Id: I0b504bf433ca6961baab748bc041a55dea22703e
parents 10b85951 e90ea3aa
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -220,9 +220,9 @@ public final class AppHibernationService extends SystemService {
            final Map<String, UserLevelState> packageStates = mUserStates.get(userId);
            final UserLevelState pkgState = packageStates.get(packageName);
            if (pkgState == null) {
                throw new IllegalArgumentException(
                        String.format("Package %s is not installed for user %s",
                Slog.e(TAG, String.format("Package %s is not installed for user %s",
                        packageName, userId));
                return false;
            }
            return pkgState.hibernated;
        }
@@ -275,9 +275,9 @@ public final class AppHibernationService extends SystemService {
            final Map<String, UserLevelState> packageStates = mUserStates.get(userId);
            final UserLevelState pkgState = packageStates.get(packageName);
            if (pkgState == null) {
                throw new IllegalArgumentException(
                        String.format("Package %s is not installed for user %s",
                Slog.e(TAG, String.format("Package %s is not installed for user %s",
                        packageName, userId));
                return;
            }

            if (pkgState.hibernated == isHibernating) {
@@ -320,8 +320,8 @@ public final class AppHibernationService extends SystemService {
        synchronized (mLock) {
            GlobalLevelState state = mGlobalHibernationStates.get(packageName);
            if (state == null) {
                throw new IllegalArgumentException(
                        String.format("Package %s is not installed for any user", packageName));
                Slog.e(TAG, String.format("Package %s is not installed for any user", packageName));
                return;
            }
            if (state.hibernated != isHibernating) {
                if (isHibernating) {