Code example for DialogFragment

Methods: onResume

0
        NativeHelper.setup(getActivity());
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        new Thread(new Runnable() {
 
            @Override 
            public void run() { 
                // This function does major magic 
                // it blocks (hence the thread) 
                // when it returns it means gpg-agent is no longer communicating 
                // with us 
                // so we quit. we don't like gpg-agent anyways. neaner. 
                connectToGpgAgent(app_uid);
                mCallback.onPinentryDialogClosed();
            } 
 
        }).start();
    }