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

Commit 5ba61f45 authored by Rick Yiu's avatar Rick Yiu
Browse files

Revert "Revert "Add null check for vrManager""

This reverts commit e19a4540.

Bug: 112064298
Change-Id: I3893684d85200c7396195831a95be270c6394211
parent e19a4540
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.os.Process;
import android.provider.Settings;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;

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

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

    @SmallTest
    public void testSetPersistentVrThreadAPISuccess() throws Throwable {