PackageManagerInternal.java revision adc1cf46045ae756d3a9ccbccf6b0f894e4c1edd
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.content.pm;
18
19import android.annotation.NonNull;
20
21/**
22 * Package manager local system service interface.
23 *
24 * @hide Only for use within the system server.
25 */
26public abstract class PackageManagerInternal {
27
28    /**
29     * Provider for package names.
30     */
31    public interface PackagesProvider {
32
33        /**
34         * Gets the packages for a given user.
35         * @param userId The user id.
36         * @return The package names.
37         */
38        public String[] getPackages(int userId);
39    }
40
41    /**
42     * Sets the location provider packages provider.
43     * @param provider The packages provider.
44     */
45    public abstract void setLocationPackagesProvider(PackagesProvider provider);
46
47    /**
48     * Sets the input method packages provider.
49     * @param provider The packages provider.
50     */
51    public abstract void setImePackagesProvider(PackagesProvider provider);
52
53    /**
54     * Sets the voice interaction packages provider.
55     * @param provider The packages provider.
56     */
57    public abstract void setVoiceInteractionPackagesProvider(PackagesProvider provider);
58}
59