19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* //device/java/android/android/os/IPowerManager.aidl 29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** 39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** Copyright 2007, The Android Open Source Project 49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** 5455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** Licensed under the Apache License, Version 2.0 (the "License"); 6455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** you may not use this file except in compliance with the License. 7455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** You may obtain a copy of the License at 89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** 9455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** http://www.apache.org/licenses/LICENSE-2.0 109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** 11455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** Unless required by applicable law or agreed to in writing, software 12455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** distributed under the License is distributed on an "AS IS" BASIS, 13455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei** See the License for the specific language governing permissions and 159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** limitations under the License. 169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project*/ 179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.os; 199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 207e9f4eb2608148436cef36c9969bf8a599b39e72Dianne Hackbornimport android.os.WorkSource; 21455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyuleiimport android.os.PowerSaveState; 227e9f4eb2608148436cef36c9969bf8a599b39e72Dianne Hackborn 239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** @hide */ 246dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent 259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectinterface IPowerManager 269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project{ 2722f58762e120c71cdf94a8d5d9b9343ad5534321Daniel Erat // WARNING: When methods are inserted or deleted, the transaction IDs in 2822f58762e120c71cdf94a8d5d9b9343ad5534321Daniel Erat // frameworks/native/include/powermanager/IPowerManager.h must be updated to match the order in this file. 2922f58762e120c71cdf94a8d5d9b9343ad5534321Daniel Erat // 3022f58762e120c71cdf94a8d5d9b9343ad5534321Daniel Erat // When a method's argument list is changed, BnPowerManager's corresponding serialization code (if any) in 3122f58762e120c71cdf94a8d5d9b9343ad5534321Daniel Erat // frameworks/native/services/powermanager/IPowerManager.cpp must be updated. 32a1f1a3c573acd91024fda0ceb3b921c73b186963Dianne Hackborn void acquireWakeLock(IBinder lock, int flags, String tag, String packageName, in WorkSource ws, 33a1f1a3c573acd91024fda0ceb3b921c73b186963Dianne Hackborn String historyTag); 34a1f1a3c573acd91024fda0ceb3b921c73b186963Dianne Hackborn void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName, 35a1f1a3c573acd91024fda0ceb3b921c73b186963Dianne Hackborn int uidtoblame); 360e39ea83c5578e0d55e120c91ff7cfeeb0c1cb2fMike Lockwood void releaseWakeLock(IBinder lock, int flags); 371125235da15a5655e1fdf3b5f24df48dafccee90Marco Nelissen void updateWakeLockUids(IBinder lock, in int[] uids); 38f20a5eb279035d462e1f5d9895f4eb66cc152215Ruchi Kandoi oneway void powerHint(int hintId, int data); 399630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown 404590e52f3d0558e01322fe4dd55bb612afdfb079Dianne Hackborn void updateWakeLockWorkSource(IBinder lock, in WorkSource ws, String historyTag); 419630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown boolean isWakeLockLevelSupported(int level); 429630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown 439630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown void userActivity(long time, int event, int flags); 44280a64e793d081847c5dcea23ed9be38aa5332d2Dianne Hackborn void wakeUp(long time, String reason, String opPackageName); 456d8fd27e51d799cf7418b14092b5e806d9792812Jeff Brown void goToSleep(long time, int reason, int flags); 4662c82e4d92cc0b856059f905d81885f7808a0e7dJeff Brown void nap(long time); 47037c33eae74bee2774897d969d48947f9abe254fJeff Brown boolean isInteractive(); 48eb94fa7975b1e8742f3b00cec6bd4f9d6b329e3aDianne Hackborn boolean isPowerSaveMode(); 49455e90add22835d0744fc0f5c2feb5fcaf03b28fjackqdyulei PowerSaveState getPowerSaveState(int serviceType); 508d4e6cb06005a2ce994360340a6191f0690db8f4John Spurlock boolean setPowerSaveMode(boolean mode); 5188e98dfa59e68a860d8c3b462ec03bc0b06d6b5cDianne Hackborn boolean isDeviceIdleMode(); 5208c47a5dece977a55d250d98bda9e2a8df8b6ed0Dianne Hackborn boolean isLightDeviceIdleMode(); 539630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown 54c428aae6429c3fd5e2037c3793af399d9f6e23bfDianne Hackborn void reboot(boolean confirm, String reason, boolean wait); 55b8009fddd85aa5ecd6b2321f92a1ae0568089a54Tony Mantler void rebootSafeMode(boolean confirm, boolean wait); 56705ffd1efe529bb291e90fa06e92c8090ee98627Yusuke Sato void shutdown(boolean confirm, String reason, boolean wait); 579630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown void crash(String message); 58a6f7b25c3d160be02cb7384f154a1f77a8faaffaSalvador Martinez int getLastShutdownReason(); 599630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void setStayOnSetting(int val); 61e333e674a758c39885d4d9779a1aad387fb0e6aaJeff Brown void boostScreenBrightness(long time); 6284d6c0fbf6e513d68330234503b809751d0e3564Bryce Lee boolean isScreenBrightnessBoosted(); 63237a29923a05663a2195bf93b392768dbaf31ebfMike Lockwood 649630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown // temporarily overrides the screen brightness settings to allow the user to 659630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown // see the effect of a settings change without applying it immediately 669630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown void setTemporaryScreenBrightnessSettingOverride(int brightness); 679630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown void setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(float adj); 689630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown 699630704ed3b265f008a8f64ec60a33cf9dcd3345Jeff Brown // sets the attention light (used by phone app only) 70b11832de735e95aac1a1b9e900dbbd8285cee3adMike Lockwood void setAttentionLight(boolean on, int color); 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 72