Merge "Port appsearch-service to the system_server_current sdk." into sc-dev

This commit is contained in:
Alexander Dorokhine
2021-06-28 16:27:55 +00:00
committed by Android (Google) Code Review
10 changed files with 70 additions and 51 deletions

View File

@@ -65,5 +65,8 @@ java_sdk_library {
},
jarjar_rules: "jarjar-rules.txt",
apex_available: ["com.android.appsearch"],
impl_library_visibility: [
"//frameworks/base/apex/appsearch/service",
],
unsafe_ignore_missing_latest_api: true, // TODO(b/146218515) should be removed
}

View File

@@ -28,31 +28,41 @@ genrule {
}
java_library {
name: "service-appsearch",
srcs: [
"java/**/*.java",
":statslog-appsearch-java-gen",
name: "statslog-appsearch-lib",
srcs: [":statslog-appsearch-java-gen"],
libs: [
"framework-statsd.stubs.module_lib",
],
sdk_version: "system_server_current",
apex_available: ["com.android.appsearch"],
}
java_library {
name: "service-appsearch",
srcs: ["java/**/*.java"],
sdk_version: "system_server_current",
static_libs: [
"icing-java-proto-lite",
"libicing-java",
// This list must be kept in sync with jarjar.txt
"statslog-appsearch-lib",
// Entries below this line are outside of the appsearch package tree and must be kept in
// sync with jarjar.txt
"modules-utils-preconditions",
],
libs: [
"framework",
"framework-appsearch",
"framework-statsd.stubs.module_lib",
"services.core",
"services.usage",
"framework-appsearch.impl",
"unsupportedappusage", // TODO(b/181887768) should be removed
],
required: [
"libicing",
],
defaults: ["framework-system-server-module-defaults"],
permitted_packages: [
"com.android.server.appsearch",
"com.google.android.icing",
],
jarjar_rules: "jarjar-rules.txt",
visibility: [
"//frameworks/base/apex/appsearch:__subpackages__",
// These are required until appsearch is properly unbundled.
"//frameworks/base/services/tests/mockingservicestests",
"//frameworks/base/services/tests/servicestests",

View File

@@ -1,5 +1,8 @@
# Rename all icing classes to match our module name. OEMs could start using icing lib for some other
# purpose in system service, which would cause class collisions when loading our apex into the
# system service.
rule com.google.protobuf.** com.android.server.appsearch.protobuf.@1
rule com.google.android.icing.proto.** com.android.server.appsearch.proto.@1
rule com.google.android.icing.proto.** com.android.server.appsearch.icing.proto.@1
# Rename all com.android.internal.util classes to prevent class name collisions
# between this module and the other versions of the utility classes linked into

View File

@@ -82,7 +82,10 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/** TODO(b/142567528): add comments when implement this class */
/**
* The main service implementation which contains AppSearch's platform functionality.
* @hide
*/
public class AppSearchManagerService extends SystemService {
private static final String TAG = "AppSearchManagerService";
private final Context mContext;