Correct debugging of accountsForUser binder cache
Bug: 140788621 Replaced the default result comparison so that two results can be compared for value equality. This code is only exercised with VERIFY is set true in PropertyInvalidatedCache (this is a compile-time flag). Test: Created a special build that sets VERIFY to true; verified that the binder cache does not detect any inconsistent results. Further modified the build to generate inconsistencies; verified that the new code does, in fact, detect true inconsistencies. Change-Id: I48080cd3109b96159f711bd2d84a69530450c2c8
This commit is contained in:
@@ -388,6 +388,16 @@ public class AccountManager {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected boolean debugCompareQueryResults(Account[] l, Account[] r) {
|
||||
if (l == r) {
|
||||
return true;
|
||||
} else if (l == null || r == null) {
|
||||
return false;
|
||||
} else {
|
||||
return Arrays.equals(l, r);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user