Home
last modified time | relevance | path

Searched refs:AppSearchResult (Results 1 – 25 of 68) sorted by relevance

123

/packages/modules/AppSearch/framework/java/android/app/appsearch/aidl/
DAppSearchResultParcel.java21 import android.app.appsearch.AppSearchResult;
82 @AppSearchResult.ResultCode
125 @NonNull AppSearchResult<ValueType> mResultCached;
144 @Param(id = 1) @AppSearchResult.ResultCode int resultCode, in AppSearchResultParcel()
157 if (resultCode == AppSearchResult.RESULT_OK) { in AppSearchResultParcel()
169 (AppSearchResult<ValueType>) in AppSearchResultParcel()
170 AppSearchResult.newSuccessfulResult(mInternalSetSchemaResponse); in AppSearchResultParcel()
173 (AppSearchResult<ValueType>) in AppSearchResultParcel()
174 AppSearchResult.newSuccessfulResult(mGetSchemaResponse); in AppSearchResultParcel()
177 (AppSearchResult<ValueType>) AppSearchResult.newSuccessfulResult(mStrings); in AppSearchResultParcel()
[all …]
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/
DAppSearchManagerServiceTest.java19 import static android.app.appsearch.AppSearchResult.RESULT_DENIED;
20 import static android.app.appsearch.AppSearchResult.RESULT_RATE_LIMITED;
53 import android.app.appsearch.AppSearchResult;
325 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testSetSchemaStatsLogging()
349 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testLocalGetSchemaStatsLogging()
364 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testGlobalGetSchemaStatsLogging()
378 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testGetNamespacesStatsLogging()
595 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testSearchStatsLogging()
607 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testGlobalSearchStatsLogging()
620 assertThat(callback.get().getResultCode()).isEqualTo(AppSearchResult.RESULT_OK); in testLocalGetNextPageStatsLogging()
[all …]
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/
DAppSearchResult.java39 public final class AppSearchResult<ValueType> { class
126 private AppSearchResult( in AppSearchResult() method in AppSearchResult
180 if (!(other instanceof AppSearchResult)) { in equals()
183 AppSearchResult<?> otherResult = (AppSearchResult<?>) other; in equals()
210 public static <ValueType> AppSearchResult<ValueType> newSuccessfulResult( in newSuccessfulResult()
212 return new AppSearchResult<>(RESULT_OK, value, /* errorMessage= */ null); in newSuccessfulResult()
222 public static <ValueType> AppSearchResult<ValueType> newFailedResult( in newFailedResult()
224 return new AppSearchResult<>(resultCode, /* resultValue= */ null, errorMessage); in newFailedResult()
233 public static <ValueType> AppSearchResult<ValueType> newFailedResult( in newFailedResult()
234 @NonNull AppSearchResult<?> otherFailedResult) { in newFailedResult()
[all …]
DAppSearchBatchResult.java49 @NonNull private final Map<KeyType, AppSearchResult<ValueType>> mFailures;
50 @NonNull private final Map<KeyType, AppSearchResult<ValueType>> mAll;
56 @NonNull Map<KeyType, AppSearchResult<ValueType>> failures, in AppSearchBatchResult()
57 @NonNull Map<KeyType, AppSearchResult<ValueType>> all) { in AppSearchBatchResult()
90 public Map<KeyType, AppSearchResult<ValueType>> getFailures() { in getFailures()
101 public Map<KeyType, AppSearchResult<ValueType>> getAll() { in getAll()
131 private ArrayMap<KeyType, AppSearchResult<ValueType>> mFailures = new ArrayMap<>();
132 private ArrayMap<KeyType, AppSearchResult<ValueType>> mAll = new ArrayMap<>();
155 return setResult(key, AppSearchResult.newSuccessfulResult(value)); in setSuccess()
177 @AppSearchResult.ResultCode int resultCode, in setFailure()
[all …]
/packages/modules/AppSearch/framework/java/android/app/appsearch/
DAppSearchSession.java19 import static android.app.appsearch.AppSearchResult.RESULT_INTERNAL_ERROR;
118 @NonNull Consumer<AppSearchResult<AppSearchSession>> callback) { in createSearchSession()
133 @NonNull Consumer<AppSearchResult<AppSearchSession>> callback) { in initialize()
148 AppSearchResult<Void> result = resultParcel.getResult(); in initialize()
151 AppSearchResult.newSuccessfulResult( in initialize()
155 AppSearchResult.newFailedResult(result)); in initialize()
198 @NonNull Consumer<AppSearchResult<SetSchemaResponse>> callback) { in setSchema()
241 @NonNull Consumer<AppSearchResult<GetSchemaResponse>> callback) { in getSchema()
263 AppSearchResult<GetSchemaResponse> result = in getSchema()
269 AppSearchResult.newSuccessfulResult(response)); in getSchema()
[all …]
DReadOnlyGlobalSearchSession.java78 @NonNull Consumer<AppSearchResult<Void>> callback) { in initialize()
93 AppSearchResult<Void> result = resultParcel.getResult(); in initialize()
96 AppSearchResult.newSuccessfulResult(null)); in initialize()
99 AppSearchResult.newFailedResult(result)); in initialize()
210 @NonNull Consumer<AppSearchResult<GetSchemaResponse>> callback) { in getSchema()
232 AppSearchResult<GetSchemaResponse> result = in getSchema()
237 AppSearchResult.newSuccessfulResult(response)); in getSchema()
240 AppSearchResult.newFailedResult(result)); in getSchema()
DAppSearchMigrationHelper.java19 import static android.app.appsearch.AppSearchResult.RESULT_INVALID_SCHEMA;
146 AtomicReference<AppSearchResult<Void>> resultReference = new AtomicReference<>(); in queryAndTransform()
167 AppSearchResult<Void> result = resultReference.get(); in queryAndTransform()
196 AppSearchResult<SetSchemaResponse> putMigratedDocuments( in putMigratedDocuments()
201 return AppSearchResult.newSuccessfulResult(responseBuilder.build()); in putMigratedDocuments()
206 AtomicReference<AppSearchResult<List<MigrationFailure>>> resultReference = in putMigratedDocuments()
225 AppSearchResult<List<MigrationFailure>> result = resultReference.get(); in putMigratedDocuments()
227 return AppSearchResult.newFailedResult(result); in putMigratedDocuments()
235 return AppSearchResult.throwableToFailedResult(e); in putMigratedDocuments()
239 return AppSearchResult.newSuccessfulResult(responseBuilder.build()); in putMigratedDocuments()
DSearchResults.java117 @NonNull Consumer<AppSearchResult<List<SearchResult>>> callback) { in getNextPage()
192 @NonNull Consumer<AppSearchResult<List<SearchResult>>> callback) { in wrapCallback()
205 @NonNull AppSearchResult<SearchResultPage> searchResultPageResult,
206 @NonNull Consumer<AppSearchResult<List<SearchResult>>> callback) {
212 callback.accept(AppSearchResult.newSuccessfulResult(searchResultPage.getResults()));
214 callback.accept(AppSearchResult.throwableToFailedResult(e));
217 callback.accept(AppSearchResult.newFailedResult(searchResultPageResult));
DSearchSessionUtil.java59 @NonNull AppSearchResult<?> failedResult, @NonNull BatchResultCallback<?, ?> callback) { in sendSystemErrorToCallback()
84 @NonNull Consumer<AppSearchResult<T>> errorCallback, in safeExecute()
90 errorCallback.accept(AppSearchResult.throwableToFailedResult(e)); in safeExecute()
152 AppSearchResult.RESULT_INTERNAL_ERROR, in createGetDocumentCallback()
161 AppSearchResult.RESULT_INTERNAL_ERROR, in createGetDocumentCallback()
168 for (Entry<String, AppSearchResult<GenericDocumentParcel>> entry : in createGetDocumentCallback()
DGlobalSearchSession.java82 @NonNull Consumer<AppSearchResult<GlobalSearchSession>> callback) { in createGlobalSearchSession()
89 callback.accept(AppSearchResult.newSuccessfulResult(globalSearchSession)); in createGlobalSearchSession()
91 callback.accept(AppSearchResult.newFailedResult(result)); in createGlobalSearchSession()
180 @NonNull Consumer<AppSearchResult<GetSchemaResponse>> callback) { in getSchema()
206 @NonNull Consumer<AppSearchResult<Void>> callback) { in reportSystemUsage()
337 @NonNull AppSearchResult<?> unused) {} in registerObserverCallback()
360 AppSearchResult<Void> result = resultParcel.getResult(); in registerObserverCallback()
427 AppSearchResult<Void> result = resultParcel.getResult(); in unregisterObserverCallback()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/external/localstorage/converter/
DResultCodeToProtoConverter.java20 import android.app.appsearch.AppSearchResult;
37 @AppSearchResult.ResultCode
41 return AppSearchResult.RESULT_OK; in toResultCode()
43 return AppSearchResult.RESULT_OUT_OF_SPACE; in toResultCode()
45 return AppSearchResult.RESULT_INTERNAL_ERROR; in toResultCode()
47 return AppSearchResult.RESULT_UNKNOWN_ERROR; in toResultCode()
49 return AppSearchResult.RESULT_NOT_FOUND; in toResultCode()
51 return AppSearchResult.RESULT_INVALID_ARGUMENT; in toResultCode()
59 return AppSearchResult.RESULT_INTERNAL_ERROR; in toResultCode()
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/exceptions/
DAppSearchException.java21 import android.app.appsearch.AppSearchResult;
30 @AppSearchResult.ResultCode private final int mResultCode;
37 public AppSearchException(@AppSearchResult.ResultCode int resultCode) { in AppSearchException()
49 @AppSearchResult.ResultCode int resultCode, @Nullable String message) { in AppSearchException()
64 @AppSearchResult.ResultCode int resultCode, in AppSearchException()
76 @AppSearchResult.ResultCode
83 public <T> AppSearchResult<T> toAppSearchResult() { in toAppSearchResult()
84 return AppSearchResult.newFailedResult(mResultCode, getMessage()); in toAppSearchResult()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/appsindexer/
DSyncAppSearchBase.java21 import android.app.appsearch.AppSearchResult;
40 Consumer<Consumer<AppSearchResult<T>>> operation) throws AppSearchException { in executeAppSearchResultOperation()
41 final CompletableFuture<AppSearchResult<T>> futureResult = new CompletableFuture<>(); in executeAppSearchResultOperation()
50 AppSearchResult<T> result = futureResult.get(); in executeAppSearchResultOperation()
60 AppSearchResult.RESULT_INTERNAL_ERROR, "Operation was interrupted.", e); in executeAppSearchResultOperation()
63 AppSearchResult.RESULT_UNKNOWN_ERROR, in executeAppSearchResultOperation()
96 AppSearchResult.RESULT_INTERNAL_ERROR, "Operation was interrupted.", e); in executeAppSearchBatchResultOperation()
99 AppSearchResult.RESULT_UNKNOWN_ERROR, in executeAppSearchBatchResultOperation()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/external/localstorage/stats/
DInitializeStats.java21 import android.app.appsearch.AppSearchResult;
81 @AppSearchResult.ResultCode private final int mStatusCode;
125 @AppSearchResult.ResultCode private final int mResetStatusCode;
128 @AppSearchResult.ResultCode
244 @AppSearchResult.ResultCode
273 @AppSearchResult.ResultCode int mStatusCode;
290 @AppSearchResult.ResultCode int mResetStatusCode;
295 public Builder setStatusCode(@AppSearchResult.ResultCode int statusCode) { in setStatusCode()
458 public Builder setResetStatusCode(@AppSearchResult.ResultCode int resetStatusCode) { in setResetStatusCode()
DOptimizeStats.java20 import android.app.appsearch.AppSearchResult;
35 @AppSearchResult.ResultCode private final int mStatusCode;
81 @AppSearchResult.ResultCode
145 @AppSearchResult.ResultCode int mStatusCode;
161 public Builder setStatusCode(@AppSearchResult.ResultCode int statusCode) { in setStatusCode()
DRemoveStats.java21 import android.app.appsearch.AppSearchResult;
74 @AppSearchResult.ResultCode private final int mStatusCode;
105 @AppSearchResult.ResultCode
135 @AppSearchResult.ResultCode int mStatusCode;
150 public Builder setStatusCode(@AppSearchResult.ResultCode int statusCode) { in setStatusCode()
DPutDocumentStats.java20 import android.app.appsearch.AppSearchResult;
39 @AppSearchResult.ResultCode private final int mStatusCode;
115 @AppSearchResult.ResultCode
189 @AppSearchResult.ResultCode int mStatusCode;
213 public Builder setStatusCode(@AppSearchResult.ResultCode int statusCode) { in setStatusCode()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/
DAppSearchManagerService.java18 import static android.app.appsearch.AppSearchResult.RESULT_DENIED;
19 import static android.app.appsearch.AppSearchResult.RESULT_INTERNAL_ERROR;
20 import static android.app.appsearch.AppSearchResult.RESULT_INVALID_ARGUMENT;
21 import static android.app.appsearch.AppSearchResult.RESULT_NOT_FOUND;
22 import static android.app.appsearch.AppSearchResult.RESULT_OK;
23 import static android.app.appsearch.AppSearchResult.RESULT_RATE_LIMITED;
24 import static android.app.appsearch.AppSearchResult.RESULT_SECURITY_ERROR;
25 import static android.app.appsearch.AppSearchResult.RESULT_TIMED_OUT;
26 import static android.app.appsearch.AppSearchResult.throwableToFailedResult;
44 import android.app.appsearch.AppSearchResult;
[all …]
/packages/modules/AppSearch/testing/coretests/src/android/app/appsearch/
DAppSearchSessionUnitTest.java50 CompletableFuture<AppSearchResult<AppSearchSession>> future = new CompletableFuture<>(); in setUp()
54 CompletableFuture<AppSearchResult<SetSchemaResponse>> schemaFuture = in setUp()
66 CompletableFuture<AppSearchResult<SetSchemaResponse>> schemaFuture = in testGetEmptyNextPage()
102 CompletableFuture<AppSearchResult<List<SearchResult>>> getNextPageFuture = in testGetEmptyNextPage()
119 CompletableFuture<AppSearchResult<SetSchemaResponse>> schemaFuture = in testGetEmptyNextPage_multiPages()
162 CompletableFuture<AppSearchResult<List<SearchResult>>> getNextPageFuture = in testGetEmptyNextPage_multiPages()
188 CompletableFuture<AppSearchResult<SetSchemaResponse>> schemaFuture = in testClosedCallbackExecutor()
197 AppSearchResult<SetSchemaResponse> result = schemaFuture.get(); in testClosedCallbackExecutor()
198 assertThat(result.getResultCode()).isEqualTo(AppSearchResult.RESULT_UNKNOWN_ERROR); in testClosedCallbackExecutor()
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/
DAppSearchResult.java22 public class AppSearchResult extends SearchResult { class
28 public AppSearchResult(Builder builder) { in AppSearchResult() method in AppSearchResult
41 public AppSearchResult build() { in build()
42 return new AppSearchResult(this); in build()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/external/localstorage/visibilitystore/
DVisibilityStore.java18 import static android.app.appsearch.AppSearchResult.RESULT_NOT_FOUND;
22 import android.app.appsearch.AppSearchResult;
126 AppSearchResult.RESULT_INTERNAL_ERROR, in VisibilityStore()
342 AppSearchResult.RESULT_INTERNAL_ERROR, in setLatestSchemaAndDocuments()
360 AppSearchResult.RESULT_INTERNAL_ERROR, in setLatestSchemaAndDocuments()
407 AppSearchResult.RESULT_INTERNAL_ERROR, in migrateVisibilityOverlayDatabase()
417 AppSearchResult.RESULT_INTERNAL_ERROR, in migrateVisibilityOverlayDatabase()
458 AppSearchResult.RESULT_INTERNAL_ERROR, in verifyOrSetLatestVisibilitySchema()
484 AppSearchResult.RESULT_INTERNAL_ERROR, in verifyOrSetLatestVisibilitySchema()
521 AppSearchResult.RESULT_INTERNAL_ERROR, in verifyOrSetLatestVisibilityOverlaySchema()
/packages/modules/AppSearch/framework/java/android/app/appsearch/functions/
DSafeOneTimeAppSearchResultCallback.java21 import android.app.appsearch.AppSearchResult;
44 @Nullable private final Consumer<AppSearchResult<?>> mOnDispatchCallback;
57 @Nullable Consumer<AppSearchResult<?>> onDispatchCallback) { in SafeOneTimeAppSearchResultCallback()
62 public void onFailedResult(@NonNull AppSearchResult<?> result) { in onFailedResult()
DAppFunctionService.java24 import android.app.appsearch.AppSearchResult;
102 AppSearchResult failedResult = AppSearchResult.throwableToFailedResult(ex);
136 @NonNull Consumer<AppSearchResult<ExecuteAppFunctionResponse>> callback); in onExecuteFunction()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/
DAppSearchHelper.java24 import android.app.appsearch.AppSearchResult;
342 Map<String, AppSearchResult<Void>> failures = in indexContactsAsync()
344 AppSearchResult<Void> firstFailure = null; in indexContactsAsync()
345 for (AppSearchResult<Void> failure : failures.values()) { in indexContactsAsync()
353 == AppSearchResult in indexContactsAsync()
386 + AppSearchResult.throwableToFailedResult( in indexContactsAsync()
447 AppSearchResult<Void> firstFailure = null; in removeContactsByIdAsync()
448 for (AppSearchResult<Void> failedResult : in removeContactsByIdAsync()
454 if (errorCode == AppSearchResult.RESULT_NOT_FOUND) { in removeContactsByIdAsync()
486 + AppSearchResult.throwableToFailedResult( in removeContactsByIdAsync()
[all …]
/packages/apps/Car/SettingsIntelligence/src/com/android/settings/intelligence/search/car/
DCarIntentSearchViewHolder.java24 import com.android.settings.intelligence.search.AppSearchResult;
39 if (result instanceof AppSearchResult) { in onBind()
40 AppSearchResult appResult = (AppSearchResult) result; in onBind()

123