Code example for FragmentActivity

Methods: getIntent, getWindow, onCreate

0
 
    static final String TAG = "PinEntryActivity";
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
 
        if (getIntent().getExtras().getInt("uid", -1) < 0) { 
            Log.e(TAG, "missing uid. aborting");
            return; 
        } 
        FragmentManager fm = getSupportFragmentManager();
        PinentryDialog dialog = new PinentryDialog();
        dialog.setArguments(getIntent().getExtras());
        dialog.show(fm, "fragment_pinentry");
    } 
 
    @Override 
    public void onPinentryDialogClosed() { 
        finish();