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

Commit 2b601f71 authored by Alexander Dorokhine's avatar Alexander Dorokhine
Browse files

Sync framework from jetpack.

Included changes:
* 44f446f: Update getSchemaType() to be consistent with other usages
* 1a96f7f: Update docs in GenericDocument to an alternative visible to platform
* e4640c3: Fixes a grammatical issue
* 1ea6307: Manage visibility settings
* 8fa4956: Minor fixes to AppSearchImpl
* 7464be0: Adapt to new Icing Lib IndexingConfig name

Now includes a text file with the changeid of the jetpack HEAD at time
of export to make it easier to create the above "Included changes" list
in the future.

Bug: 162450968
Test: AppSearchManagerTest
Change-Id: I85909a44ac2677170872990452d2ab48ce71c1aa
parent 1628d581
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