FileDocCategorySizeDatePackage
SystemUIDialog.javaAPI DocAndroid 5.1 API2269Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

SystemUIDialog

public class SystemUIDialog extends android.app.AlertDialog
Base class for dialogs that should appear over panels and keyguard.

Fields Summary
private final android.content.Context
mContext
Constructors Summary
public SystemUIDialog(android.content.Context context)

        super(context, R.style.Theme_SystemUI_Dialog);
        mContext = context;

        getWindow().setType(WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
                | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
        WindowManager.LayoutParams attrs = getWindow().getAttributes();
        attrs.setTitle(getClass().getSimpleName());
        getWindow().setAttributes(attrs);
    
Methods Summary
public voidsetMessage(int resId)

        setMessage(mContext.getString(resId));
    
public voidsetNegativeButton(int resId, OnClickListener onClick)

        setButton(BUTTON_NEGATIVE, mContext.getString(resId), onClick);
    
public voidsetPositiveButton(int resId, OnClickListener onClick)

        setButton(BUTTON_POSITIVE, mContext.getString(resId), onClick);
    
public voidsetShowForAllUsers(boolean show)

        if (show) {
            getWindow().getAttributes().privateFlags |=
                    WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        } else {
            getWindow().getAttributes().privateFlags &=
                    ~WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        }