summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2018-07-27 11:44:45 +0100
committer David Brazdil <dbrazdil@google.com> 2018-07-30 09:29:13 +0100
commit7eb315903cb05c62dbedd9bc68e87109af1cca2e (patch)
tree962fd62dc7c6fedc1946cec3a4683c7af7e4182e
parent350f7042d98d263a9df7fb89a232d238756fd17a (diff)
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 Change-Id: I2ac9d91ad24194c3205adad1d333649bfd3d2bec
-rw-r--r--vr/java/com/google/vr/platform/DeviceInfo.java2
-rw-r--r--vr/java/com/google/vr/platform/Dvr.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/vr/java/com/google/vr/platform/DeviceInfo.java b/vr/java/com/google/vr/platform/DeviceInfo.java
index f6da66b1807b..6a4617d4624d 100644
--- a/vr/java/com/google/vr/platform/DeviceInfo.java
+++ b/vr/java/com/google/vr/platform/DeviceInfo.java
@@ -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);
}
diff --git a/vr/java/com/google/vr/platform/Dvr.java b/vr/java/com/google/vr/platform/Dvr.java
index b07d6347c9a5..41dcd8741ffb 100644
--- a/vr/java/com/google/vr/platform/Dvr.java
+++ b/vr/java/com/google/vr/platform/Dvr.java
@@ -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");