Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 352e1082 authored by Dan Sandler's avatar Dan Sandler Committed by Android (Google) Code Review
Browse files

Merge "Merge remote-tracking branch 'goog/master-lockscreen-dev'"

parents db8b130a f3e31406
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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.
     *
+11 −6
Original line number Diff line number Diff line
@@ -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 {
@@ -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
@@ -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"),
@@ -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.
         * 
@@ -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
+8 −0
Original line number Diff line number Diff line
@@ -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.
+14 −2
Original line number Diff line number Diff line
@@ -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();
+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