1/*
2 * Copyright (C) 2006 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.app;
18import android.content.Intent;
19import android.os.IBinder;
20
21/**
22 * {@hide}
23 * @deprecated will be removed soon. See individual methods for alternatives.
24 */
25@Deprecated
26public abstract class ActivityManagerNative {
27    /**
28     * Cast a Binder object into an activity manager interface, generating
29     * a proxy if needed.
30     *
31     * @deprecated use IActivityManager.Stub.asInterface instead.
32     */
33    static public IActivityManager asInterface(IBinder obj) {
34        return IActivityManager.Stub.asInterface(obj);
35    }
36
37    /**
38     * Retrieve the system's default/global activity manager.
39     *
40     * @deprecated use ActivityManager.getService instead.
41     */
42    static public IActivityManager getDefault() {
43        return ActivityManager.getService();
44    }
45
46    /**
47     * Convenience for checking whether the system is ready.  For internal use only.
48     *
49     * @deprecated use ActivityManagerInternal.isSystemReady instead.
50     */
51    static public boolean isSystemReady() {
52        return ActivityManager.isSystemReady();
53    }
54
55    /**
56     * @deprecated use ActivityManager.broadcastStickyIntent instead.
57     */
58    static public void broadcastStickyIntent(Intent intent, String permission, int userId) {
59        broadcastStickyIntent(intent, permission, AppOpsManager.OP_NONE, userId);
60    }
61
62    /**
63     * Convenience for sending a sticky broadcast.  For internal use only.
64     * If you don't care about permission, use null.
65     *
66     * @deprecated use ActivityManager.broadcastStickyIntent instead.
67     */
68    static public void broadcastStickyIntent(Intent intent, String permission, int appOp,
69            int userId) {
70        ActivityManager.broadcastStickyIntent(intent, appOp, userId);
71    }
72
73    /**
74     * @deprecated use ActivityManager.noteWakeupAlarm instead.
75     */
76    static public void noteWakeupAlarm(PendingIntent ps, int sourceUid, String sourcePkg,
77            String tag) {
78        ActivityManager.noteWakeupAlarm(ps, null, sourceUid, sourcePkg, tag);
79    }
80
81    /**
82     * @deprecated use ActivityManager.noteAlarmStart instead.
83     */
84    static public void noteAlarmStart(PendingIntent ps, int sourceUid, String tag) {
85        ActivityManager.noteAlarmStart(ps, null, sourceUid, tag);
86    }
87
88    /**
89     * @deprecated use ActivityManager.noteAlarmFinish instead.
90     */
91    static public void noteAlarmFinish(PendingIntent ps, int sourceUid, String tag) {
92        ActivityManager.noteAlarmFinish(ps, null, sourceUid, tag);
93    }
94}
95