Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f6b7dd9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "Add null check for vrManager"""

parents fce28b51 5ba61f45
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ import android.os.Process;
import android.provider.Settings;
import android.provider.Settings;
import android.test.ActivityInstrumentationTestCase2;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;


/**
/**
 * Tests ActivityManager#setPersistentVrThread and ActivityManager#setVrThread's
 * Tests ActivityManager#setPersistentVrThread and ActivityManager#setVrThread's
@@ -76,10 +75,12 @@ public class SetPersistentVrThreadTest extends ActivityInstrumentationTestCase2<
    }
    }


    private void setPersistentVrModeEnabled(boolean enable) throws Throwable {
    private void setPersistentVrModeEnabled(boolean enable) throws Throwable {
        if (mVrManager != null) {
            mVrManager.setPersistentVrModeEnabled(enable);
            mVrManager.setPersistentVrModeEnabled(enable);
            // Allow the system time to send out callbacks for persistent VR mode.
            // Allow the system time to send out callbacks for persistent VR mode.
            Thread.sleep(200);
            Thread.sleep(200);
        }
        }
    }


    @SmallTest
    @SmallTest
    public void testSetPersistentVrThreadAPISuccess() throws Throwable {
    public void testSetPersistentVrThreadAPISuccess() throws Throwable {