FileDocCategorySizeDatePackage
SimPanel.javaAPI DocAndroid 1.5 API2527Wed May 06 22:42:46 BST 2009com.android.phone

SimPanel

public class SimPanel extends android.app.Dialog
Base class for SIM-related panels in the Phone UI.

Fields Summary
protected static final String
TAG
private KeyguardManager.KeyguardLock
mKeyguardLock
Constructors Summary
public SimPanel(android.content.Context context)


       
        super(context, R.style.SimPanel);
    
Methods Summary
private voiddisableKeyguard(boolean disable)
Acquires a wake lock and prevents keyguard from enabling.

        if (disable) {
            mKeyguardLock.disableKeyguard();
        } else {
            mKeyguardLock.reenableKeyguard();
        }
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        Window winP = getWindow();
        winP.setType(WindowManager.LayoutParams.TYPE_PRIORITY_PHONE);
        winP.setLayout(WindowManager.LayoutParams.FILL_PARENT,
                WindowManager.LayoutParams.FILL_PARENT);
        winP.setGravity(Gravity.CENTER);

        PhoneApp app = PhoneApp.getInstance();
        KeyguardManager km = (KeyguardManager) app.getSystemService(Context.KEYGUARD_SERVICE);
        mKeyguardLock = km.newKeyguardLock(TAG);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
    
public booleanonKeyDown(int keyCode, android.view.KeyEvent event)

        if (keyCode == KeyEvent.KEYCODE_BACK) {
            return true;
        }

        return super.onKeyDown(keyCode, event);
    
protected voidonStart()

        super.onStart();
        disableKeyguard(true);
    
public voidonStop()

        super.onStop();
        disableKeyguard(false);