Revert^2: Greylist com.google.vr.platform hidden methods

Enforcement of non-SDK API is being extended to all modules on the
boot class path. This includes the com.google.vr.platform package,
which is used to set up VR on a given device. Two hidden methods
are used by the client static library via reflection. Mark them
@UnsupportedAppUsage so that they remain discoverable.

Bug: 111911841
Test: make
Merged-In: Iaed1cd6bc7419597510bfc1ab30a169f75e4ae3f
Change-Id: Iaed1cd6bc7419597510bfc1ab30a169f75e4ae3f
(cherry picked from commit a1c19e1254)
This commit is contained in:
David Brazdil
2018-08-01 09:26:44 +00:00
parent 80e6ac7d2c
commit bf7bfc88d8
2 changed files with 5 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
package com.google.vr.platform;
import android.annotation.UnsupportedAppUsage;
import android.os.SystemProperties;
/**
@@ -13,6 +14,7 @@ public class DeviceInfo {
/**
* Returns true if this device boots directly in VR mode.
*/
@UnsupportedAppUsage
public static boolean getVrBoot() {
return SystemProperties.getBoolean(VR_MODE_BOOT, false);
}

View File

@@ -1,5 +1,7 @@
package com.google.vr.platform;
import android.annotation.UnsupportedAppUsage;
/**
* Class to load the dvr api.
* @hide
@@ -10,6 +12,7 @@ public class Dvr {
*
* @return A Long object describing the handle returned by dlopen.
*/
@UnsupportedAppUsage
public static Long loadLibrary() {
// Load a thin JNI library that runs dlopen on request.
System.loadLibrary("dvr_loader");