Loading core/java/android/view/IWindowManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,11 @@ interface IWindowManager */ boolean isSafeModeEnabled(); /** * Enables the screen if all conditions are met. */ void enableScreenIfNeeded(); /** * Clears the frame statistics for a given window. * Loading core/java/android/view/WindowManager.java +11 −6 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ import android.util.Log; public interface WindowManager extends ViewManager { /** * Exception that is thrown when trying to add view whose * {@link WindowManager.LayoutParams} {@link WindowManager.LayoutParams#token} * {@link LayoutParams} {@link LayoutParams#token} * is invalid. */ public static class BadTokenException extends RuntimeException { Loading Loading @@ -173,7 +173,6 @@ public interface WindowManager extends ViewManager { * @see #TYPE_SEARCH_BAR * @see #TYPE_PHONE * @see #TYPE_SYSTEM_ALERT * @see #TYPE_KEYGUARD * @see #TYPE_TOAST * @see #TYPE_SYSTEM_OVERLAY * @see #TYPE_PRIORITY_PHONE Loading @@ -197,7 +196,6 @@ public interface WindowManager extends ViewManager { @ViewDebug.IntToString(from = TYPE_SEARCH_BAR, to = "TYPE_SEARCH_BAR"), @ViewDebug.IntToString(from = TYPE_PHONE, to = "TYPE_PHONE"), @ViewDebug.IntToString(from = TYPE_SYSTEM_ALERT, to = "TYPE_SYSTEM_ALERT"), @ViewDebug.IntToString(from = TYPE_KEYGUARD, to = "TYPE_KEYGUARD"), @ViewDebug.IntToString(from = TYPE_TOAST, to = "TYPE_TOAST"), @ViewDebug.IntToString(from = TYPE_SYSTEM_OVERLAY, to = "TYPE_SYSTEM_OVERLAY"), @ViewDebug.IntToString(from = TYPE_PRIORITY_PHONE, to = "TYPE_PRIORITY_PHONE"), Loading Loading @@ -916,7 +914,6 @@ public interface WindowManager extends ViewManager { */ public static final int FLAG_NEEDS_MENU_KEY = 0x40000000; /** * Various behavioral options/flags. Default is none. * Loading Loading @@ -1089,6 +1086,14 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR = 0x00000200; /** * Flag whether the current window is a keyguard window, meaning that it will hide all other * windows behind it except for windows with flag {@link #FLAG_SHOW_WHEN_LOCKED} set. * Further, this can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. * {@hide} */ public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400; /** * Control flags that are private to the platform. * @hide Loading core/java/android/view/WindowManagerPolicy.java +8 −0 Original line number Diff line number Diff line Loading @@ -1004,6 +1004,14 @@ public interface WindowManagerPolicy { */ public void dismissKeyguardLw(); /** * Ask the policy whether the Keyguard has drawn. If the Keyguard is disabled, this method * returns true as soon as we know that Keyguard is disabled. * * @return true if the keyguard has drawn. */ public boolean isKeyguardDrawnLw(); /** * Given an orientation constant, returns the appropriate surface rotation, * taking into account sensors, docking mode, rotation lock, and other factors. Loading core/java/com/android/internal/policy/IKeyguardService.aidl +14 −2 Original line number Diff line number Diff line Loading @@ -25,12 +25,24 @@ import android.os.Bundle; interface IKeyguardService { boolean isShowing(); boolean isSecure(); boolean isShowingAndNotHidden(); boolean isShowingAndNotOccluded(); boolean isInputRestricted(); boolean isDismissable(); oneway void verifyUnlock(IKeyguardExitCallback callback); oneway void keyguardDone(boolean authenticated, boolean wakeup); oneway void setHidden(boolean isHidden); /** * Sets the Keyguard as occluded when a window dismisses the Keyguard with flag * FLAG_SHOW_ON_LOCK_SCREEN. * * @param isOccluded Whether the Keyguard is occluded by another window. * @return See IKeyguardServiceConstants.KEYGUARD_SERVICE_SET_OCCLUDED_*. This is needed because * PhoneWindowManager needs to set these flags immediately and can't wait for the * Keyguard thread to pick it up. In the hidden case, PhoneWindowManager is solely * responsible to make sure that the flags are unset. */ int setOccluded(boolean isOccluded); oneway void dismiss(); oneway void onDreamingStarted(); oneway void onDreamingStopped(); Loading core/java/com/android/internal/policy/IKeyguardServiceConstants.java 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 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.internal.policy; /** * @hide */ public class IKeyguardServiceConstants { /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Don't change the keyguard window flags. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_NONE = 0; /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Set the keyguard window flags to FLAG_SHOW_WALLPAPER and PRIVATE_FLAG_KEYGUARD. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_SET_FLAGS = 1; /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Unset the keyguard window flags to FLAG_SHOW_WALLPAPER and PRIVATE_FLAG_KEYGUARD. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_UNSET_FLAGS = 2; } Loading
core/java/android/view/IWindowManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,11 @@ interface IWindowManager */ boolean isSafeModeEnabled(); /** * Enables the screen if all conditions are met. */ void enableScreenIfNeeded(); /** * Clears the frame statistics for a given window. * Loading
core/java/android/view/WindowManager.java +11 −6 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ import android.util.Log; public interface WindowManager extends ViewManager { /** * Exception that is thrown when trying to add view whose * {@link WindowManager.LayoutParams} {@link WindowManager.LayoutParams#token} * {@link LayoutParams} {@link LayoutParams#token} * is invalid. */ public static class BadTokenException extends RuntimeException { Loading Loading @@ -173,7 +173,6 @@ public interface WindowManager extends ViewManager { * @see #TYPE_SEARCH_BAR * @see #TYPE_PHONE * @see #TYPE_SYSTEM_ALERT * @see #TYPE_KEYGUARD * @see #TYPE_TOAST * @see #TYPE_SYSTEM_OVERLAY * @see #TYPE_PRIORITY_PHONE Loading @@ -197,7 +196,6 @@ public interface WindowManager extends ViewManager { @ViewDebug.IntToString(from = TYPE_SEARCH_BAR, to = "TYPE_SEARCH_BAR"), @ViewDebug.IntToString(from = TYPE_PHONE, to = "TYPE_PHONE"), @ViewDebug.IntToString(from = TYPE_SYSTEM_ALERT, to = "TYPE_SYSTEM_ALERT"), @ViewDebug.IntToString(from = TYPE_KEYGUARD, to = "TYPE_KEYGUARD"), @ViewDebug.IntToString(from = TYPE_TOAST, to = "TYPE_TOAST"), @ViewDebug.IntToString(from = TYPE_SYSTEM_OVERLAY, to = "TYPE_SYSTEM_OVERLAY"), @ViewDebug.IntToString(from = TYPE_PRIORITY_PHONE, to = "TYPE_PRIORITY_PHONE"), Loading Loading @@ -916,7 +914,6 @@ public interface WindowManager extends ViewManager { */ public static final int FLAG_NEEDS_MENU_KEY = 0x40000000; /** * Various behavioral options/flags. Default is none. * Loading Loading @@ -1089,6 +1086,14 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR = 0x00000200; /** * Flag whether the current window is a keyguard window, meaning that it will hide all other * windows behind it except for windows with flag {@link #FLAG_SHOW_WHEN_LOCKED} set. * Further, this can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. * {@hide} */ public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400; /** * Control flags that are private to the platform. * @hide Loading
core/java/android/view/WindowManagerPolicy.java +8 −0 Original line number Diff line number Diff line Loading @@ -1004,6 +1004,14 @@ public interface WindowManagerPolicy { */ public void dismissKeyguardLw(); /** * Ask the policy whether the Keyguard has drawn. If the Keyguard is disabled, this method * returns true as soon as we know that Keyguard is disabled. * * @return true if the keyguard has drawn. */ public boolean isKeyguardDrawnLw(); /** * Given an orientation constant, returns the appropriate surface rotation, * taking into account sensors, docking mode, rotation lock, and other factors. Loading
core/java/com/android/internal/policy/IKeyguardService.aidl +14 −2 Original line number Diff line number Diff line Loading @@ -25,12 +25,24 @@ import android.os.Bundle; interface IKeyguardService { boolean isShowing(); boolean isSecure(); boolean isShowingAndNotHidden(); boolean isShowingAndNotOccluded(); boolean isInputRestricted(); boolean isDismissable(); oneway void verifyUnlock(IKeyguardExitCallback callback); oneway void keyguardDone(boolean authenticated, boolean wakeup); oneway void setHidden(boolean isHidden); /** * Sets the Keyguard as occluded when a window dismisses the Keyguard with flag * FLAG_SHOW_ON_LOCK_SCREEN. * * @param isOccluded Whether the Keyguard is occluded by another window. * @return See IKeyguardServiceConstants.KEYGUARD_SERVICE_SET_OCCLUDED_*. This is needed because * PhoneWindowManager needs to set these flags immediately and can't wait for the * Keyguard thread to pick it up. In the hidden case, PhoneWindowManager is solely * responsible to make sure that the flags are unset. */ int setOccluded(boolean isOccluded); oneway void dismiss(); oneway void onDreamingStarted(); oneway void onDreamingStopped(); Loading
core/java/com/android/internal/policy/IKeyguardServiceConstants.java 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 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.internal.policy; /** * @hide */ public class IKeyguardServiceConstants { /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Don't change the keyguard window flags. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_NONE = 0; /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Set the keyguard window flags to FLAG_SHOW_WALLPAPER and PRIVATE_FLAG_KEYGUARD. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_SET_FLAGS = 1; /** * Constant for {@link com.android.internal.policy.IKeyguardService#setHidden(boolean)}: * Unset the keyguard window flags to FLAG_SHOW_WALLPAPER and PRIVATE_FLAG_KEYGUARD. */ public static final int KEYGUARD_SERVICE_SET_OCCLUDED_RESULT_UNSET_FLAGS = 2; }