Code example for AtomicReference

Methods: get

0
 
    protected AwTestContainerView createAwTestContainerViewOnMainSync( 
            final boolean incognito,
            final AwContentsClient client) throws Exception {
        final AtomicReference<AwTestContainerView> testContainerView =
                new AtomicReference<AwTestContainerView>();
        final Context context = getActivity();
        getInstrumentation().runOnMainSync(new Runnable() {
            @Override 
            public void run() { 
                testContainerView.set(createAwTestContainerView(incognito, client));
            } 
        }); 
        return testContainerView.get();
    } 
 
    protected void destroyAwContentsOnMainSync(final AwContents awContents) {
        if (awContents == null) return;
        getInstrumentation().runOnMainSync(new Runnable() {
            @Override 
            public void run() {