Merge "Refactor code to make predicates negatable" am: 76b7493035
am: e8ac821819

Change-Id: I912628363b6d95fdbee772a8372a620fa47c5841