Remove wtf log when optional apps are not found.

Test: none
Change-Id: I9f94c2ab47eb78d05754c85aafc13e1e238ead04
Fixes: 31177447
This commit is contained in:
Felipe Leme
2016-08-31 08:47:50 -07:00
parent 43896cbc02
commit 6fa02e95ba

View File

@@ -513,12 +513,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
try { try {
app = pm.getApplicationInfoAsUser(pkg, PackageManager.MATCH_SYSTEM_ONLY, userId); app = pm.getApplicationInfoAsUser(pkg, PackageManager.MATCH_SYSTEM_ONLY, userId);
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
// Should not happen if (LOGD) Slog.d(TAG, "No ApplicationInfo for package " + pkg);
Slog.wtf(TAG, "No ApplicationInfo for package " + pkg); // Ignore it - some apps on allow-in-data-usage-save are optional.
continue; continue;
} }
if (!app.isPrivilegedApp()) { if (!app.isPrivilegedApp()) {
Slog.wtf(TAG, "pm.getApplicationInfoAsUser() returned non-privileged app: " + pkg); Slog.e(TAG, "addDefaultRestrictBackgroundWhitelistUidsUL(): "
+ "skipping non-privileged app " + pkg);
continue; continue;
} }
final int uid = UserHandle.getUid(userId, app.uid); final int uid = UserHandle.getUid(userId, app.uid);
@@ -528,8 +529,9 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
+ "background whitelist. Revoked status: " + "background whitelist. Revoked status: "
+ mRestrictBackgroundWhitelistRevokedUids.get(uid)); + mRestrictBackgroundWhitelistRevokedUids.get(uid));
if (!mRestrictBackgroundWhitelistRevokedUids.get(uid)) { if (!mRestrictBackgroundWhitelistRevokedUids.get(uid)) {
Slog.i(TAG, "adding default package " + pkg + " (uid " + uid + " for user " if (LOGD)
+ userId + ") to restrict background whitelist"); Slog.d(TAG, "adding default package " + pkg + " (uid " + uid + " for user "
+ userId + ") to restrict background whitelist");
mRestrictBackgroundWhitelistUids.append(uid, true); mRestrictBackgroundWhitelistUids.append(uid, true);
changed = true; changed = true;
} }