Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c850e57 authored by Alexander Dorokhine's avatar Alexander Dorokhine Committed by Android (Google) Code Review
Browse files

Merge "Sync framework from jetpack."

parents 6d560f6d 2b601f71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public final class AppSearchSchema {

    /** Returns the name of this schema type, e.g. Email. */
    @NonNull
    public String getSchemaTypeName() {
    public String getSchemaType() {
        return mBundle.getString(SCHEMA_TYPE_FIELD, "");
    }

+2 −3
Original line number Diff line number Diff line
@@ -79,9 +79,8 @@ public class GenericDocument {
     * The maximum number of indexed properties a document can have.
     *
     * <p>Indexed properties are properties where the
     * {@link android.app.appsearch.annotation.AppSearchDocument.Property#indexingType} constant is
     * anything other than {@link
     * android.app.appsearch.AppSearchSchema.PropertyConfig.IndexingType#INDEXING_TYPE_NONE}.
     * {@link AppSearchSchema.PropertyConfig#getIndexingType()} constant is anything other than
     * {@link AppSearchSchema.PropertyConfig.IndexingType#INDEXING_TYPE_NONE}.
     */
    public static int getMaxIndexedProperties() {
        return MAX_INDEXED_PROPERTIES;
+8 −9
Original line number Diff line number Diff line
@@ -154,12 +154,12 @@ public final class SearchSpec {
     * <p>If empty, the query will search over all schema types.
     */
    @NonNull
    public List<String> getSchemas() {
        List<String> schemas = mBundle.getStringArrayList(SCHEMA_TYPE_FIELD);
        if (schemas == null) {
    public List<String> getSchemaTypes() {
        List<String> schemaTypes = mBundle.getStringArrayList(SCHEMA_TYPE_FIELD);
        if (schemaTypes == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(schemas);
        return Collections.unmodifiableList(schemaTypes);
    }

    /**
@@ -241,10 +241,10 @@ public final class SearchSpec {
         * <p>If unset, the query will search over all schema types.
         */
        @NonNull
        public Builder addSchema(@NonNull String... schemaTypes) {
        public Builder addSchemaType(@NonNull String... schemaTypes) {
            Preconditions.checkNotNull(schemaTypes);
            Preconditions.checkState(!mBuilt, "Builder has already been used");
            return addSchema(Arrays.asList(schemaTypes));
            return addSchemaType(Arrays.asList(schemaTypes));
        }

        /**
@@ -254,7 +254,7 @@ public final class SearchSpec {
         * <p>If unset, the query will search over all schema types.
         */
        @NonNull
        public Builder addSchema(@NonNull Collection<String> schemaTypes) {
        public Builder addSchemaType(@NonNull Collection<String> schemaTypes) {
            Preconditions.checkNotNull(schemaTypes);
            Preconditions.checkState(!mBuilt, "Builder has already been used");
            mSchemaTypes.addAll(schemaTypes);
@@ -341,8 +341,7 @@ public final class SearchSpec {

        /**
         * Sets {@code snippetCountPerProperty}. Only the first {@code snippetCountPerProperty}
         * snippets for a every property of {@link GenericDocument} will contain snippet
         * information.
         * snippets for each property of {@link GenericDocument} will contain snippet information.
         *
         * <p>If set to 0, snippeting is disabled and {@link SearchResult#getMatches}
         * will return {@code null} for that result.
+172 −55

File changed.

Preview size limit exceeded, changes collapsed.

+250 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading