Home | History | Annotate | Download | only in policy
      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  */
     16 package com.android.internal.policy;
     17 
     18 import com.android.internal.policy.IKeyguardShowCallback;
     19 import com.android.internal.policy.IKeyguardStateCallback;
     20 import com.android.internal.policy.IKeyguardExitCallback;
     21 
     22 import android.os.Bundle;
     23 
     24 oneway interface IKeyguardService {
     25     /**
     26      * Sets the Keyguard as occluded when a window dismisses the Keyguard with flag
     27      * FLAG_SHOW_ON_LOCK_SCREEN.
     28      *
     29      * @param isOccluded Whether the Keyguard is occluded by another window.
     30      */
     31     void setOccluded(boolean isOccluded);
     32 
     33     void addStateMonitorCallback(IKeyguardStateCallback callback);
     34     void verifyUnlock(IKeyguardExitCallback callback);
     35     void keyguardDone(boolean authenticated, boolean wakeup);
     36     void dismiss();
     37     void onDreamingStarted();
     38     void onDreamingStopped();
     39     void onScreenTurnedOff(int reason);
     40     void onScreenTurnedOn(IKeyguardShowCallback callback);
     41     void setKeyguardEnabled(boolean enabled);
     42     void onSystemReady();
     43     void doKeyguardTimeout(in Bundle options);
     44     void setCurrentUser(int userId);
     45     void onBootCompleted();
     46 
     47     /**
     48      * Notifies that the activity behind has now been drawn and it's safe to remove the wallpaper
     49      * and keyguard flag.
     50      *
     51      * @param startTime the start time of the animation in uptime milliseconds
     52      * @param fadeoutDuration the duration of the exit animation, in milliseconds
     53      */
     54     void startKeyguardExitAnimation(long startTime, long fadeoutDuration);
     55 
     56     /**
     57      * Notifies the Keyguard that the activity that was starting has now been drawn and it's safe
     58      * to start the keyguard dismiss sequence.
     59      */
     60     void onActivityDrawn();
     61 }
     62