1package com.android.keyguard;
2
3import android.content.Context;
4import android.util.AttributeSet;
5import android.view.View;
6import android.widget.FrameLayout;
7
8public class KeyguardSecurityContainer extends FrameLayout {
9    public KeyguardSecurityContainer(Context context, AttributeSet attrs) {
10        this(context, attrs, 0);
11    }
12
13    public KeyguardSecurityContainer(Context context) {
14        this(null, null, 0);
15    }
16
17    public KeyguardSecurityContainer(Context context, AttributeSet attrs, int defStyle) {
18        super(context, attrs, defStyle);
19    }
20
21    KeyguardSecurityViewFlipper getFlipper() {
22        for (int i = 0; i < getChildCount(); i++) {
23            View child = getChildAt(i);
24            if (child instanceof KeyguardSecurityViewFlipper) {
25                return (KeyguardSecurityViewFlipper) child;
26            }
27        }
28        return null;
29    }
30
31    public void showBouncer(int duration) {
32        KeyguardSecurityViewFlipper flipper = getFlipper();
33        if (flipper != null) {
34            flipper.showBouncer(duration);
35        }
36    }
37
38    public void hideBouncer(int duration) {
39        KeyguardSecurityViewFlipper flipper = getFlipper();
40        if (flipper != null) {
41            flipper.hideBouncer(duration);
42        }
43    }
44}
45
46