diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-10-05 14:55:25 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-05 14:55:26 -0700 |
| commit | 3f1246a29b58cf78ebe674ec0905ad1795027aac (patch) | |
| tree | e1c1b0e21b8ed3df9e880bde9d690b735d2986d8 /services/java/com/android/server/power/ScreenOnBlocker.java | |
| parent | d0f199308e5d040bf0a968114578d620fb6a9f61 (diff) | |
| parent | c38c9be031ddad5cf551b55458889f11e01dc5b2 (diff) | |
| download | frameworks_base-3f1246a29b58cf78ebe674ec0905ad1795027aac.zip frameworks_base-3f1246a29b58cf78ebe674ec0905ad1795027aac.tar.gz frameworks_base-3f1246a29b58cf78ebe674ec0905ad1795027aac.tar.bz2 | |
Merge "Coordinate screen on with the window manager." into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server/power/ScreenOnBlocker.java')
| -rw-r--r-- | services/java/com/android/server/power/ScreenOnBlocker.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/services/java/com/android/server/power/ScreenOnBlocker.java b/services/java/com/android/server/power/ScreenOnBlocker.java new file mode 100644 index 0000000..2bf0bcf --- /dev/null +++ b/services/java/com/android/server/power/ScreenOnBlocker.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.power; + +/** + * Low-level screen on blocker mechanism which is used to keep the screen off + * until the window manager is ready to show new content. + */ +interface ScreenOnBlocker { + /** + * Acquires the screen on blocker. + * Prevents the screen from turning on. + * + * Calls to acquire() nest and must be matched by the same number + * of calls to release(). + */ + void acquire(); + + /** + * Releases the screen on blocker. + * Allows the screen to turn on. + * + * It is an error to call release() if the screen on blocker has not been acquired. + * The system may crash. + */ + void release(); +} |
