summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2012-07-09 14:59:51 +0800
committerHung-ying Tyan <tyanh@google.com>2012-07-10 15:08:21 +0800
commita7ded76de610b3a025b0c2052fcbeb952c482bd6 (patch)
treeb269c0595a9707bca83e2f8c21576ce42457eba4 /gallerycommon/src/com/android/gallery3d
parentf7d461c6efebcd9fa29236fbddc31b702c87fba8 (diff)
downloadandroid_packages_apps_Snap-a7ded76de610b3a025b0c2052fcbeb952c482bd6.tar.gz
android_packages_apps_Snap-a7ded76de610b3a025b0c2052fcbeb952c482bd6.tar.bz2
android_packages_apps_Snap-a7ded76de610b3a025b0c2052fcbeb952c482bd6.zip
Add existence check for DevicePolicyManager.getCameraDisabled()
Bug: 6706695 Change-Id: Ib8ea8805a4bea862c8407f8c73a6e5ba1e0f49d3
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/ApiHelper.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
index b5db3c88e..4e61c77c9 100644
--- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
+++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
@@ -17,6 +17,8 @@
package com.android.gallery3d.common;
import android.app.Activity;
+import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
import android.os.Build;
import android.provider.MediaStore.MediaColumns;
import android.view.View;
@@ -73,6 +75,9 @@ public class ApiHelper {
public static final boolean HAS_SET_SYSTEM_UI_VISIBILITY =
hasMethod(View.class, "setSystemUiVisibility", int.class);
+ public static final boolean HAS_GET_CAMERA_DISABLED =
+ hasMethod(DevicePolicyManager.class, "getCameraDisabled", ComponentName.class);
+
private static boolean hasField(Class<?> klass, String fieldName) {
try {
klass.getDeclaredField(fieldName);