Loading core/java/android/app/PropertyInvalidatedCache.java +12 −6 Original line number Diff line number Diff line Loading @@ -296,12 +296,14 @@ public abstract class PropertyInvalidatedCache<Query, Result> { for (;;) { if (currentNonce == NONCE_DISABLED || currentNonce == NONCE_UNSET) { if (DEBUG) { Log.d(TAG, String.format("cache %s %s for %s", if (!mDisabled) { Log.d(TAG, String.format( "cache %s %s for %s", cacheName(), currentNonce == NONCE_DISABLED ? "disabled" : "unset", queryToString(query))); } } return recompute(query); } final Result cachedResult; Loading Loading @@ -450,8 +452,12 @@ public abstract class PropertyInvalidatedCache<Query, Result> { Result resultToCompare = recompute(query); boolean nonceChanged = (getCurrentNonce() != mLastSeenNonce); if (!nonceChanged && !debugCompareQueryResults(proposedResult, resultToCompare)) { throw new AssertionError("cache returned out of date response for " + query); Log.e(TAG, String.format( "cache %s inconsistent for %s", cacheName(), queryToString(query))); } // Always return the "true" result in verification mode. return resultToCompare; } return proposedResult; } Loading Loading
core/java/android/app/PropertyInvalidatedCache.java +12 −6 Original line number Diff line number Diff line Loading @@ -296,12 +296,14 @@ public abstract class PropertyInvalidatedCache<Query, Result> { for (;;) { if (currentNonce == NONCE_DISABLED || currentNonce == NONCE_UNSET) { if (DEBUG) { Log.d(TAG, String.format("cache %s %s for %s", if (!mDisabled) { Log.d(TAG, String.format( "cache %s %s for %s", cacheName(), currentNonce == NONCE_DISABLED ? "disabled" : "unset", queryToString(query))); } } return recompute(query); } final Result cachedResult; Loading Loading @@ -450,8 +452,12 @@ public abstract class PropertyInvalidatedCache<Query, Result> { Result resultToCompare = recompute(query); boolean nonceChanged = (getCurrentNonce() != mLastSeenNonce); if (!nonceChanged && !debugCompareQueryResults(proposedResult, resultToCompare)) { throw new AssertionError("cache returned out of date response for " + query); Log.e(TAG, String.format( "cache %s inconsistent for %s", cacheName(), queryToString(query))); } // Always return the "true" result in verification mode. return resultToCompare; } return proposedResult; } Loading