Merge "Make GlobalSearchSession public."
This commit is contained in:
committed by
Android (Google) Code Review
commit
6101dd0e22
@@ -8,6 +8,7 @@ package android.app.appsearch {
|
||||
}
|
||||
|
||||
public class AppSearchManager {
|
||||
method public void createGlobalSearchSession(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.appsearch.AppSearchResult<android.app.appsearch.GlobalSearchSession>>);
|
||||
method public void createSearchSession(@NonNull android.app.appsearch.AppSearchManager.SearchContext, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.appsearch.AppSearchResult<android.app.appsearch.AppSearchSession>>);
|
||||
}
|
||||
|
||||
@@ -150,6 +151,11 @@ package android.app.appsearch {
|
||||
method @NonNull public android.app.appsearch.GetByUriRequest.Builder setNamespace(@NonNull String);
|
||||
}
|
||||
|
||||
public class GlobalSearchSession implements java.io.Closeable {
|
||||
method public void close();
|
||||
method @NonNull public android.app.appsearch.SearchResults query(@NonNull String, @NonNull android.app.appsearch.SearchSpec, @NonNull java.util.concurrent.Executor);
|
||||
}
|
||||
|
||||
public class PackageIdentifier {
|
||||
ctor public PackageIdentifier(@NonNull String, @NonNull byte[]);
|
||||
method @NonNull public String getPackageName();
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
// Signature format: 2.0
|
||||
package android.app.appsearch {
|
||||
|
||||
public class AppSearchManager {
|
||||
method public void createGlobalSearchSession(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.appsearch.AppSearchResult<android.app.appsearch.GlobalSearchSession>>);
|
||||
}
|
||||
|
||||
public class AppSearchManagerFrameworkInitializer {
|
||||
method public static void initialize();
|
||||
}
|
||||
|
||||
public class GlobalSearchSession implements java.io.Closeable {
|
||||
method public void close();
|
||||
method @NonNull public android.app.appsearch.SearchResults query(@NonNull String, @NonNull android.app.appsearch.SearchSpec, @NonNull java.util.concurrent.Executor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ package android.app.appsearch;
|
||||
|
||||
import android.annotation.CallbackExecutor;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@@ -123,8 +122,8 @@ public class AppSearchManager {
|
||||
/**
|
||||
* Creates a new {@link AppSearchSession}.
|
||||
*
|
||||
* <p>This process requires an AppSearch native indexing file system for each user. If it's not
|
||||
* created for this user, the initialization process will create one under user's directory.
|
||||
* <p>This process requires an AppSearch native indexing file system. If it's not created, the
|
||||
* initialization process will create one under the user's credential encrypted directory.
|
||||
*
|
||||
* @param searchContext The {@link SearchContext} contains all information to create a new
|
||||
* {@link AppSearchSession}
|
||||
@@ -147,16 +146,14 @@ public class AppSearchManager {
|
||||
/**
|
||||
* Creates a new {@link GlobalSearchSession}.
|
||||
*
|
||||
* <p>This process requires an AppSearch native indexing file system for each user. If it's not
|
||||
* created for this user, the initialization process will create one under user's directory.
|
||||
* <p>This process requires an AppSearch native indexing file system. If it's not created, the
|
||||
* initialization process will create one under the user's credential encrypted directory.
|
||||
*
|
||||
* @param executor Executor on which to invoke the callback.
|
||||
* @param callback The {@link AppSearchResult}<{@link GlobalSearchSession}> of
|
||||
* performing this operation. Or a {@link AppSearchResult} with failure
|
||||
* reason code and error information.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void createGlobalSearchSession(
|
||||
@NonNull @CallbackExecutor Executor executor,
|
||||
@NonNull Consumer<AppSearchResult<GlobalSearchSession>> callback) {
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.app.appsearch;
|
||||
|
||||
import android.annotation.CallbackExecutor;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.UserIdInt;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@@ -34,9 +33,7 @@ import java.util.function.Consumer;
|
||||
* This class provides global access to the centralized AppSearch index maintained by the system.
|
||||
*
|
||||
* <p>Apps can retrieve indexed documents through the query API.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public class GlobalSearchSession implements Closeable {
|
||||
|
||||
private final IAppSearchManager mService;
|
||||
|
||||
Reference in New Issue
Block a user