1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.server.appsearch.external.localstorage; 18 19 20 /** 21 * In Jetpack, AppSearch doesn't enforce artificial limits on number of documents or size of 22 * documents, since the app is the only user of the Icing instance. Icing still enforces a docid 23 * limit of 1M docs. 24 */ 25 public class UnlimitedLimitConfig implements LimitConfig { 26 @Override getMaxDocumentSizeBytes()27 public int getMaxDocumentSizeBytes() { 28 return Integer.MAX_VALUE; 29 } 30 31 @Override getPerPackageDocumentCountLimit()32 public int getPerPackageDocumentCountLimit() { 33 return Integer.MAX_VALUE; 34 } 35 36 @Override getDocumentCountLimitStartThreshold()37 public int getDocumentCountLimitStartThreshold() { 38 return Integer.MAX_VALUE; 39 } 40 41 @Override getMaxSuggestionCount()42 public int getMaxSuggestionCount() { 43 return Integer.MAX_VALUE; 44 } 45 46 @Override getMaxOpenBlobCount()47 public int getMaxOpenBlobCount() { 48 return Integer.MAX_VALUE; 49 } 50 } 51