Home | History | Annotate | Download | only in widget
      1 /*
      2  * Copyright (C) 2011 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 
     17 package com.android.internal.widget;
     18 
     19 import android.view.View;
     20 
     21 /**
     22  * An interface used by LockScreenWidgets to send messages to lock screen.
     23  */
     24 public interface LockScreenWidgetCallback {
     25     // Sends a message to lock screen requesting the given view be shown.  May be ignored, depending
     26     // on lock screen state. View must be the top-level lock screen widget or it will be ignored.
     27     public void requestShow(View self);
     28 
     29     // Sends a message to lock screen requesting the view to be hidden.
     30     public void requestHide(View self);
     31 
     32     // Whether or not this view is currently visible on LockScreen
     33     public boolean isVisible(View self);
     34 
     35     // Sends a message to lock screen that user has interacted with widget. This should be used
     36     // exclusively in response to user activity, i.e. user hits a button in the view.
     37     public void userActivity(View self);
     38 
     39 }
     40