Merge "Change switch ratio when new package has reported during device boot up." into rvc-dev am: 1a1f2e9e48 am: 33c3c1f930 am: 946de7f293

Change-Id: Idd3bb50eae2f494738855f3a22687d1093147bce
This commit is contained in:
TreeHugger Robot
2020-04-20 15:17:13 +00:00
committed by Automerger Merge Worker

View File

@@ -5750,7 +5750,7 @@ public class AppOpsService extends IAppOpsService.Stub {
*/
private void switchPackageIfBootTimeOrRarelyUsedLocked(@NonNull String packageName) {
if (mSampledPackage == null) {
if (ThreadLocalRandom.current().nextFloat() < 0.1f) {
if (ThreadLocalRandom.current().nextFloat() < 0.5f) {
mSamplingStrategy = SAMPLING_STRATEGY_BOOT_TIME_SAMPLING;
resampleAppOpForPackageLocked(packageName);
}