Move framework-appsearch out of framework.jar.

Test: CtsAppSearchTestCases
Bug: 146218515
Change-Id: I55a8732e54e46877ee448973d735ded2870d9443
This commit is contained in:
Alexander Dorokhine 2019-12-17 10:41:21 -08:00
parent 98be60dd24
commit 04a05a8bb2
6 changed files with 71 additions and 17 deletions

View File

@ -203,7 +203,6 @@ filegroup {
name: "framework-non-updatable-sources",
srcs: [
// Java/AIDL sources under frameworks/base
":framework-appsearch-sources",
":framework-blobstore-sources",
":framework-core-sources",
":framework-drm-sources",
@ -262,6 +261,7 @@ filegroup {
filegroup {
name: "framework-updatable-sources",
srcs: [
":framework-appsearch-sources",
":framework-sdkext-sources",
":framework-statsd-sources",
":updatable-media-srcs",
@ -427,6 +427,7 @@ java_library {
defaults: ["framework-defaults"],
srcs: [":framework-non-updatable-sources"],
libs: [
"framework-appsearch-stubs",
// TODO(b/146167933): Use framework-statsd-stubs
"framework-statsd",
"framework-wifi-stubs",
@ -466,6 +467,7 @@ java_library {
installable: false, // this lib is a build-only library
static_libs: [
"framework-minus-apex",
"framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
"framework-sdkext-stubs-systemapi",
// TODO(b/146167933): Use framework-statsd-stubs instead.
"framework-statsd",

View File

@ -14,9 +14,11 @@
apex {
name: "com.android.appsearch",
manifest: "apex_manifest.json",
java_libs: [
"framework-appsearch",
"service-appsearch",
],
key: "com.android.appsearch.key",
certificate: ":com.android.appsearch.certificate",
}

View File

@ -23,17 +23,52 @@ filegroup {
java_library {
name: "framework-appsearch",
installable: false,
sdk_version: "core_platform",
srcs: [
":framework-appsearch-sources",
],
aidl: {
export_include_dirs: [
"java",
],
},
installable: true,
sdk_version: "core_platform", // TODO(b/146218515) should be core_current
srcs: [":framework-appsearch-sources"],
libs: [
"framework-minus-apex",
"framework-minus-apex", // TODO(b/146218515) should be framework-system-stubs
],
}
metalava_appsearch_docs_args =
"--hide-package com.android.server " +
"--error UnhiddenSystemApi " +
"--hide RequiresPermission " +
"--hide MissingPermission " +
"--hide BroadcastBehavior " +
"--hide HiddenSuperclass " +
"--hide DeprecationMismatch " +
"--hide UnavailableSymbol " +
"--hide SdkConstant " +
"--hide HiddenTypeParameter " +
"--hide Todo --hide Typo " +
"--hide HiddenTypedefConstant " +
"--show-annotation android.annotation.SystemApi "
droidstubs {
name: "framework-appsearch-stubs-srcs",
srcs: [
":framework-annotations",
":framework-appsearch-sources",
],
aidl: {
include_dirs: ["frameworks/base/core/java"],
},
args: metalava_appsearch_docs_args,
sdk_version: "core_current",
libs: ["android_system_stubs_current"],
}
java_library {
name: "framework-appsearch-stubs",
srcs: [":framework-appsearch-stubs-srcs"],
aidl: {
export_include_dirs: [
"java",
],
},
sdk_version: "core_current",
libs: ["android_system_stubs_current"],
installable: false,
}

View File

@ -15,19 +15,25 @@
*/
package android.app.appsearch;
import android.annotation.SystemApi;
import android.app.SystemServiceRegistry;
import android.content.Context;
/**
* This is where the AppSearchManagerService wrapper is registered.
* Class holding initialization code for the AppSearch module.
*
* TODO(b/142567528): add comments when implement this class
* @hide
*/
@SystemApi
public class AppSearchManagerFrameworkInitializer {
private AppSearchManagerFrameworkInitializer() {}
/**
* TODO(b/142567528): add comments when implement this class
* Called by {@link SystemServiceRegistry}'s static initializer and registers all AppSearch
* services to {@link Context}, so that {@link Context#getSystemService} can return them.
*
* @throws IllegalStateException if this is called from anywhere besides
* {@link SystemServiceRegistry}
*/
public static void initialize() {
SystemServiceRegistry.registerStaticService(

View File

@ -811,6 +811,14 @@ package android.app.admin {
}
package android.app.appsearch {
public class AppSearchManagerFrameworkInitializer {
method public static void initialize();
}
}
package android.app.assist {
public static class AssistStructure.ViewNode {

View File

@ -33,6 +33,7 @@
// Static whitelist of open paths that the zygote is allowed to keep open.
static const char* kPathWhitelist[] = {
"/apex/com.android.appsearch/javalib/framework-appsearch.jar",
"/apex/com.android.conscrypt/javalib/conscrypt.jar",
"/apex/com.android.ipsec/javalib/ike.jar",
"/apex/com.android.media/javalib/updatable-media.jar",