blob: dbaba4931ee320ff4e756abb38993cde7ccc3782 [file] [log] [blame]
Svet Ganovadc1cf42015-06-15 16:36:24 -07001/*
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);
Svetoslavcdfd2302015-06-25 19:07:31 -070058
59 /**
60 * Sets the SMS packages provider.
61 * @param provider The packages provider.
62 */
63 public abstract void setSmsAppPackagesProvider(PackagesProvider provider);
64
65 /**
66 * Sets the dialer packages provider.
67 * @param provider The packages provider.
68 */
69 public abstract void setDialerAppPackagesProvider(PackagesProvider provider);
70
71 /**
72 * Requests granting of the default permissions to the current default SMS app.
73 * @param packageName The default SMS package name.
74 * @param userId The user for which to grant the permissions.
75 */
76 public abstract void grantDefaultPermissionsToDefaultSmsApp(String packageName, int userId);
77
78 /**
79 * Requests granting of the default permissions to the current default dialer app.
80 * @param packageName The default dialer package name.
81 * @param userId The user for which to grant the permissions.
82 */
83 public abstract void grantDefaultPermissionsToDefaultDialerApp(String packageName, int userId);
Svet Ganovadc1cf42015-06-15 16:36:24 -070084}