Home
last modified time | relevance | path

Searched refs:optimizeInfo (Results 1 – 8 of 8) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/
DFrameworkOptimizeStrategyTest.java34 GetOptimizeInfoResultProto optimizeInfo = in testShouldOptimize_byteThreshold() local
42 assertThat(mFrameworkOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldOptimize_byteThreshold()
47 GetOptimizeInfoResultProto optimizeInfo = in testShouldNotOptimize_timeThreshold() local
55 assertThat(mFrameworkOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldNotOptimize_timeThreshold()
60 GetOptimizeInfoResultProto optimizeInfo = in testShouldOptimize_docCountThreshold() local
68 assertThat(mFrameworkOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldOptimize_docCountThreshold()
DAppSearchImplPlatformTest.java64 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
/frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/
DFrameworkOptimizeStrategy.java40 public boolean shouldOptimize(@NonNull GetOptimizeInfoResultProto optimizeInfo) { in shouldOptimize() argument
41 return optimizeInfo.getOptimizableDocs() in shouldOptimize()
43 || optimizeInfo.getEstimatedOptimizableBytes() in shouldOptimize()
45 || optimizeInfo.getTimeSinceLastOptimizeMs() in shouldOptimize()
/frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/external/localstorage/
DOptimizeStrategy.java38 boolean shouldOptimize(@NonNull GetOptimizeInfoResultProto optimizeInfo); in shouldOptimize() argument
DAppSearchImpl.java2216 GetOptimizeInfoResultProto optimizeInfo = getOptimizeInfoResultLocked(); in checkForOptimize() local
2217 checkSuccess(optimizeInfo.getStatus()); in checkForOptimize()
2219 if (mOptimizeStrategy.shouldOptimize(optimizeInfo)) { in checkForOptimize()
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/
DAppSearchImplTest.java84 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
451 GetOptimizeInfoResultProto optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize() local
452 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(1); in testTriggerCheckOptimizeByMutationSize()
459 optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize()
460 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(1); in testTriggerCheckOptimizeByMutationSize()
467 optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize()
468 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(0); in testTriggerCheckOptimizeByMutationSize()
469 assertThat(optimizeInfo.getEstimatedOptimizableBytes()).isEqualTo(0); in testTriggerCheckOptimizeByMutationSize()
DAppSearchLoggerTest.java66 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/visibilitystore/
DVisibilityStoreImplTest.java62 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;