ImmersiveMode/Application/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
@UiThreadTest
    public void testFlagsChanged() {
        int uiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
        mTestFragment.toggleHideyBar();
        int newUiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
        assertTrue("UI Flags didn't toggle.", uiFlags != newUiFlags);
    }
/**
     * Verify that the UI flags actually changed when the toggle method is called.
     */
Verify that the UI flags actually changed when the toggle method is called.
Verify that the UI flags actually changed when the toggle method is called .
@UiThreadTest
    public void testFlagsChanged() {
        int uiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
        mTestFragment.toggleHideyBar();
        int newUiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
        assertTrue("UI Flags didn't toggle.", uiFlags != newUiFlags);
    }
@ UiThreadTest public void testFlagsChanged ( ) { int uiFlags = getActivity ( ) . getWindow ( ) . getDecorView ( ) . getSystemUiVisibility ( ) ; mTestFragment . toggleHideyBar ( ) ; int newUiFlags = getActivity ( ) . getWindow ( ) . getDecorView ( ) . getSystemUiVisibility ( ) ; assertTrue ( "UI Flags didn't toggle." , uiFlags != newUiFlags ) ; }
Verify that the UI flags actually changed when the toggle method is called.
Verify that the UI flags actually changed when the toggle method is called .