Merge "Change switch ratio when new package has reported during device boot up." into rvc-dev am: 1a1f2e9e48
Change-Id: Ib66ea29aad0970170a61ee715a5390a741fb3921
This commit is contained in:
@@ -5750,7 +5750,7 @@ public class AppOpsService extends IAppOpsService.Stub {
|
|||||||
*/
|
*/
|
||||||
private void switchPackageIfBootTimeOrRarelyUsedLocked(@NonNull String packageName) {
|
private void switchPackageIfBootTimeOrRarelyUsedLocked(@NonNull String packageName) {
|
||||||
if (mSampledPackage == null) {
|
if (mSampledPackage == null) {
|
||||||
if (ThreadLocalRandom.current().nextFloat() < 0.1f) {
|
if (ThreadLocalRandom.current().nextFloat() < 0.5f) {
|
||||||
mSamplingStrategy = SAMPLING_STRATEGY_BOOT_TIME_SAMPLING;
|
mSamplingStrategy = SAMPLING_STRATEGY_BOOT_TIME_SAMPLING;
|
||||||
resampleAppOpForPackageLocked(packageName);
|
resampleAppOpForPackageLocked(packageName);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user