IKeyguardService.aidl revision e29b2dbc762bfa66093d76f5a65f55328d8753c9
1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.android.internal.policy;
17
18import android.view.MotionEvent;
19
20import com.android.internal.policy.IKeyguardShowCallback;
21import com.android.internal.policy.IKeyguardExitCallback;
22
23import android.os.Bundle;
24
25interface IKeyguardService {
26    boolean isShowing();
27    boolean isSecure();
28    boolean isShowingAndNotOccluded();
29    boolean isInputRestricted();
30    boolean isDismissable();
31    oneway void verifyUnlock(IKeyguardExitCallback callback);
32    oneway void keyguardDone(boolean authenticated, boolean wakeup);
33
34    /**
35     * Sets the Keyguard as occluded when a window dismisses the Keyguard with flag
36     * FLAG_SHOW_ON_LOCK_SCREEN.
37     *
38     * @param isOccluded Whether the Keyguard is occluded by another window.
39     * @return See IKeyguardServiceConstants.KEYGUARD_SERVICE_SET_OCCLUDED_*. This is needed because
40     *         PhoneWindowManager needs to set these flags immediately and can't wait for the
41     *         Keyguard thread to pick it up. In the hidden case, PhoneWindowManager is solely
42     *         responsible to make sure that the flags are unset.
43     */
44    int setOccluded(boolean isOccluded);
45
46    oneway void dismiss();
47    oneway void onDreamingStarted();
48    oneway void onDreamingStopped();
49    oneway void onScreenTurnedOff(int reason);
50    oneway void onScreenTurnedOn(IKeyguardShowCallback callback);
51    oneway void setKeyguardEnabled(boolean enabled);
52    oneway void onSystemReady();
53    oneway void doKeyguardTimeout(in Bundle options);
54    oneway void setCurrentUser(int userId);
55    oneway void showAssistant();
56    oneway void dispatch(in MotionEvent event);
57    oneway void launchCamera();
58    oneway void onBootCompleted();
59
60    /**
61     * Notifies that the activity behind has now been drawn and it's safe to remove the wallpaper
62     * and keyguard flag.
63     *
64     * @param startTime the start time of the animation in uptime milliseconds
65     * @param fadeoutDuration the duration of the exit animation, in milliseconds
66     */
67    oneway void startKeyguardExitAnimation(long startTime, long fadeoutDuration);
68}
69