Force sampling to always take all ops for the same package.

Bug:167579006

Test: manually verified
Change-Id: I3d86ec5fc8ad7ff5c6042caa7265647722bc62ac
This commit is contained in:
Stanislav Zholnin
2020-12-03 18:30:45 +00:00
parent bde6cfbd10
commit 96165b5983

View File

@@ -3164,9 +3164,7 @@ public class StatsPullAtomService extends SystemService {
mAttributionTag = attributionTag;
mUid = uid;
mOp = op;
mHash = ((op.getOpCode() * 961
+ (attributionTag == null ? 0 : attributionTag.hashCode()) * 31
+ packageName.hashCode() + RANDOM_SEED) & 0x7fffffff) % 100;
mHash = ((packageName.hashCode() + RANDOM_SEED) & 0x7fffffff) % 100;
}
}