diff options
Diffstat (limited to 'camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java')
-rw-r--r-- | camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java b/camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java index 7eb5c33..e55748d 100644 --- a/camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java +++ b/camera2/portability/src/com/android/ex/camera2/portability/LegacyVendorTags.java @@ -17,7 +17,6 @@ package com.android.ex.camera2.portability; import android.hardware.camera2.CameraCharacteristics; -import android.util.Log; import java.lang.ExceptionInInitializerError; import java.lang.reflect.Field; @@ -28,24 +27,19 @@ import java.lang.reflect.Method; */ public class LegacyVendorTags { - private static final String TAG = "LegacyVendorTags"; - /** * Hidden enum for scene modes supported only by the Camera1 API. */ public static final int CONTROL_SCENE_MODE_HDR; static { - int tempSceneMode = -1; try { - tempSceneMode = + CONTROL_SCENE_MODE_HDR = Class.forName("android.hardware.camera2.CameraCharacteristics"). getField("CONTROL_SCENE_MODE_HDR").getInt(null); } catch (Exception e) { - Log.e(TAG, "Error while reflecting on SCENE_MODE_HDR enum, HDR will not be available: " - + e); - } finally { - CONTROL_SCENE_MODE_HDR = tempSceneMode; + throw new ExceptionInInitializerError( + "Error while reflecting on LegacyVendorTags: " + e); } } |