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

Commit ecc0d1b2 authored by Terry Wang's avatar Terry Wang
Browse files

Add a new system service for app search project

Bug: 142567528
Test: manual
Change-Id: Iefb426383f94ec89c896065c798b22cfb2977bf3
parent 40160776
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ 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",
+39 −0
Original line number Diff line number Diff line
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

filegroup {
  name: "framework-appsearch-sources",
  srcs: [
    "java/**/*.java",
    "java/**/*.aidl",
  ],
  path: "java",
}

java_library {
  name: "framework-appsearch",
  installable: false,
  sdk_version: "core_platform",
  srcs: [
    ":framework-appsearch-sources",
  ],
  aidl: {
    export_include_dirs: [
      "java",
    ],
  },
  libs: [
    "framework-minus-apex",
  ],
}
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.app.appsearch;

import android.annotation.SystemService;
import android.content.Context;

/**
 * TODO(b/142567528): add comments when implement this class
 * @hide
 */
@SystemService(Context.APP_SEARCH_SERVICE)
public class AppSearchManager {
    private final IAppSearchManager mService;
    /**
     * TODO(b/142567528): add comments when implement this class
     * @hide
     */
    public AppSearchManager(IAppSearchManager service) {
        mService = service;
    }
}
+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.app.appsearch;

import android.app.SystemServiceRegistry;
import android.content.Context;

/**
 * This is where the AppSearchManagerService wrapper is registered.
 *
 * TODO(b/142567528): add comments when implement this class
 * @hide
 */
public class AppSearchManagerFrameworkInitializer {

    /**
     * TODO(b/142567528): add comments when implement this class
     */
    public static void initialize() {
        SystemServiceRegistry.registerStaticService(
                Context.APP_SEARCH_SERVICE, AppSearchManager.class,
                (service) -> new AppSearchManager(IAppSearchManager.Stub.asInterface(service)));
    }
}
+19 −0
Original line number Diff line number Diff line
/**
 * Copyright 2019, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.app.appsearch;
/** {@hide} */
interface IAppSearchManager {
}
Loading