113014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown/* 213014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * Copyright (C) 2014 The Android Open Source Project 313014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * 413014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * Licensed under the Apache License, Version 2.0 (the "License"); 513014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * you may not use this file except in compliance with the License. 613014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * You may obtain a copy of the License at 713014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * 813014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * http://www.apache.org/licenses/LICENSE-2.0 913014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * 1013014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * Unless required by applicable law or agreed to in writing, software 1113014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * distributed under the License is distributed on an "AS IS" BASIS, 1213014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1313014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * See the License for the specific language governing permissions and 1413014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * limitations under the License. 1513014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown */ 1613014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown 1713014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brownpackage android.app; 1813014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown 19061ea99546fbba1da86094518992cf6b7a125278Jeff Brownimport android.annotation.NonNull; 20b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolovimport android.content.ComponentName; 21061ea99546fbba1da86094518992cf6b7a125278Jeff Brown 2213014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown/** 2313014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * Activity manager local system service interface. 2413014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * 2513014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown * @hide Only for use within the system server. 2613014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown */ 2713014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brownpublic abstract class ActivityManagerInternal { 2813014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown // Called by the power manager. 29fbe96706bb9754f9ea3f6345f32e058a45ad10b4Jeff Brown public abstract void onWakefulnessChanged(int wakefulness); 30fbe96706bb9754f9ea3f6345f32e058a45ad10b4Jeff Brown 31810c052d9b117217152c2a609ccec056a2a61d1ePrimiano Tucci public abstract int startIsolatedProcess(String entryPoint, String[] mainArgs, 32810c052d9b117217152c2a609ccec056a2a61d1ePrimiano Tucci String processName, String abiOverride, int uid, Runnable crashHandler); 33061ea99546fbba1da86094518992cf6b7a125278Jeff Brown 34061ea99546fbba1da86094518992cf6b7a125278Jeff Brown /** 35061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * Acquires a sleep token with the specified tag. 36061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * 37061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * @param tag A string identifying the purpose of the token (eg. "Dream"). 38061ea99546fbba1da86094518992cf6b7a125278Jeff Brown */ 39061ea99546fbba1da86094518992cf6b7a125278Jeff Brown public abstract SleepToken acquireSleepToken(@NonNull String tag); 40061ea99546fbba1da86094518992cf6b7a125278Jeff Brown 41061ea99546fbba1da86094518992cf6b7a125278Jeff Brown /** 42061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * Sleep tokens cause the activity manager to put the top activity to sleep. 43061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * They are used by components such as dreams that may hide and block interaction 44061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * with underlying activities. 45061ea99546fbba1da86094518992cf6b7a125278Jeff Brown */ 46061ea99546fbba1da86094518992cf6b7a125278Jeff Brown public static abstract class SleepToken { 47061ea99546fbba1da86094518992cf6b7a125278Jeff Brown /** 48061ea99546fbba1da86094518992cf6b7a125278Jeff Brown * Releases the sleep token. 49061ea99546fbba1da86094518992cf6b7a125278Jeff Brown */ 50061ea99546fbba1da86094518992cf6b7a125278Jeff Brown public abstract void release(); 51061ea99546fbba1da86094518992cf6b7a125278Jeff Brown } 52b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov 53b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov /** 54b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov * Returns home activity for the specified user. 55b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov * @param userId ID of the user or {@link android.os.UserHandle#USER_ALL} 56b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov */ 57b501330a1b6ef14ff512a5727f7a01bc423d6fbbFyodor Kupolov public abstract ComponentName getHomeActivityForUser(int userId); 5813014b5fe5967b3c7e232ffaf81581ed178e6df6Jeff Brown} 59