Reduce "Failed to find provider info" logspam.

If the user is not unlocked, log at the warning level instead of error
to reduce logspam from non-direct boot aware providers.

Fixes: 148747075
Test: manual (observe logs before and after user unlock)
Change-Id: Icd0fb23982a78fb413f329da93b2ce01d37aca2a
This commit is contained in:
Varun Shah
2020-06-09 13:39:53 -07:00
parent 0053a10ea0
commit 4bffd45f2f

View File

@@ -123,6 +123,7 @@ import android.os.SystemProperties;
import android.os.TelephonyServiceManager;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.permission.IPermissionManager;
import android.provider.BlockedNumberContract;
import android.provider.CalendarContract;
@@ -6816,7 +6817,11 @@ public final class ActivityThread extends ClientTransactionHandler {
throw ex.rethrowFromSystemServer();
}
if (holder == null) {
Slog.e(TAG, "Failed to find provider info for " + auth);
if (UserManager.get(c).isUserUnlocked(userId)) {
Slog.e(TAG, "Failed to find provider info for " + auth);
} else {
Slog.w(TAG, "Failed to find provider info for " + auth + " (user not unlocked)");
}
return null;
}