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

Commit 98abb2ec authored by Alexander Dorokhine's avatar Alexander Dorokhine
Browse files

Unhide APIs in Framework that were already unhidden in Jetpack.

Bug: 169883602
Test: GlobalSearchSessionCtsTest
Change-Id: Ib004de00c078e066d8a9acd2355bcb5fe2859b62
parent 51193cd9
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ package android.app.appsearch {
    method public long getCreationTimestampMillis();
    method public static int getMaxIndexedProperties();
    method @NonNull public String getNamespace();
    method @Nullable public Object getProperty(@NonNull String);
    method public boolean getPropertyBoolean(@NonNull String);
    method @Nullable public boolean[] getPropertyBooleanArray(@NonNull String);
    method @Nullable public byte[] getPropertyBytes(@NonNull String);
@@ -148,6 +149,12 @@ package android.app.appsearch {
    method @NonNull public android.app.appsearch.GetByUriRequest.Builder setNamespace(@NonNull String);
  }

  public class PackageIdentifier {
    ctor public PackageIdentifier(@NonNull String, @NonNull byte[]);
    method @NonNull public String getPackageName();
    method @NonNull public byte[] getSha256Certificate();
  }

  public final class PutDocumentsRequest {
    method @NonNull public java.util.List<android.app.appsearch.GenericDocument> getDocuments();
  }
@@ -233,6 +240,8 @@ package android.app.appsearch {

  public final class SetSchemaRequest {
    method @NonNull public java.util.Set<android.app.appsearch.AppSearchSchema> getSchemas();
    method @NonNull public java.util.Set<java.lang.String> getSchemasNotVisibleToSystemUi();
    method @NonNull public java.util.Map<java.lang.String,java.util.Set<android.app.appsearch.PackageIdentifier>> getSchemasVisibleToPackages();
    method public boolean isForceOverride();
  }

@@ -242,6 +251,17 @@ package android.app.appsearch {
    method @NonNull public android.app.appsearch.SetSchemaRequest.Builder addSchema(@NonNull java.util.Collection<android.app.appsearch.AppSearchSchema>);
    method @NonNull public android.app.appsearch.SetSchemaRequest build();
    method @NonNull public android.app.appsearch.SetSchemaRequest.Builder setForceOverride(boolean);
    method @NonNull public android.app.appsearch.SetSchemaRequest.Builder setSchemaTypeVisibilityForPackage(@NonNull String, boolean, @NonNull android.app.appsearch.PackageIdentifier);
    method @NonNull public android.app.appsearch.SetSchemaRequest.Builder setSchemaTypeVisibilityForSystemUi(@NonNull String, boolean);
  }

}

package android.app.appsearch.exceptions {

  public class AppSearchException extends java.lang.Exception {
    method public int getResultCode();
    method @NonNull public <T> android.app.appsearch.AppSearchResult<T> toAppSearchResult();
  }

}
+0 −1
Original line number Diff line number Diff line
@@ -203,7 +203,6 @@ public class GenericDocument {
     *
     * @param key The key to look for.
     * @return The entry with the given key as an object or {@code null} if there is no such key.
     * @hide
     */
    @Nullable
    public Object getProperty(@NonNull String key) {
+1 −4
Original line number Diff line number Diff line
@@ -23,10 +23,7 @@ import com.android.internal.util.Preconditions;
import java.util.Arrays;
import java.util.Objects;

/**
 * This class represents a uniquely identifiable package.
 * @hide
 */
/** This class represents a uniquely identifiable package. */
public class PackageIdentifier {
    private final String mPackageName;
    private final byte[] mSha256Certificate;
+0 −4
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ public final class SetSchemaRequest {

    /**
     * Returns the set of schema types that have opted out of being visible on system UI surfaces.
     * @hide
     */
    @NonNull
    public Set<String> getSchemasNotVisibleToSystemUi() {
@@ -72,7 +71,6 @@ public final class SetSchemaRequest {
     * certificate.
     *
     * <p>This method is inefficient to call repeatedly.
     * @hide
     */
    @NonNull
    public Map<String, Set<PackageIdentifier>> getSchemasVisibleToPackages() {
@@ -141,7 +139,6 @@ public final class SetSchemaRequest {
         *
         * @param schemaType The schema type to set visibility on.
         * @param visible Whether the {@code schemaType} will be visible or not.
         * @hide
         */
        // Merged list available from getSchemasNotVisibleToSystemUi
        @SuppressLint("MissingGetterMatchingBuilder")
@@ -165,7 +162,6 @@ public final class SetSchemaRequest {
         * @param schemaType The schema type to set visibility on.
         * @param visible Whether the {@code schemaType} will be visible or not.
         * @param packageIdentifier Represents the package that will be granted visibility.
         * @hide
         */
        // Merged list available from getSchemasVisibleToPackages
        @SuppressLint("MissingGetterMatchingBuilder")
+0 −2
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ import android.app.appsearch.AppSearchResult;
 *
 * <p>These exceptions can be converted into a failed {@link AppSearchResult} for propagating to the
 * client.
 *
 * @hide
 */
public class AppSearchException extends Exception {
    private final @AppSearchResult.ResultCode int mResultCode;