From 147e26ab7075f0acd3978f0cd0541cd1da4b50e1 Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Mon, 24 Jun 2013 15:29:54 -0700 Subject: Clean up camera switcher Change-Id: I9f0495524028528ca02c7ddf94f4698d4e87af14 --- src/com/android/camera/ui/CameraSwitcher.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/com/android/camera/ui/CameraSwitcher.java') diff --git a/src/com/android/camera/ui/CameraSwitcher.java b/src/com/android/camera/ui/CameraSwitcher.java index 537577fb5..90d88d29a 100644 --- a/src/com/android/camera/ui/CameraSwitcher.java +++ b/src/com/android/camera/ui/CameraSwitcher.java @@ -48,12 +48,10 @@ public class CameraSwitcher extends RotateImageView public static final int PHOTO_MODULE_INDEX = 0; public static final int VIDEO_MODULE_INDEX = 1; - public static final int PANORAMA_MODULE_INDEX = 2; - public static final int LIGHTCYCLE_MODULE_INDEX = 3; + public static final int LIGHTCYCLE_MODULE_INDEX = 2; private static final int[] DRAW_IDS = { R.drawable.ic_switch_camera, R.drawable.ic_switch_video, - R.drawable.ic_switch_pan, R.drawable.ic_switch_photosphere }; public interface CameraSwitchListener { @@ -98,17 +96,13 @@ public class CameraSwitcher extends RotateImageView public void initializeDrawables(Context context) { int totaldrawid = (LightCycleHelper.hasLightCycleCapture(context) ? DRAW_IDS.length : DRAW_IDS.length - 1); - if (!ApiHelper.HAS_OLD_PANORAMA) totaldrawid--; int[] drawids = new int[totaldrawid]; int[] moduleids = new int[totaldrawid]; int ix = 0; for (int i = 0; i < DRAW_IDS.length; i++) { - if (i == PANORAMA_MODULE_INDEX && !ApiHelper.HAS_OLD_PANORAMA) { - continue; // not enabled, so don't add to UI - } if (i == LIGHTCYCLE_MODULE_INDEX && !LightCycleHelper.hasLightCycleCapture(context)) { - continue; // not enabled, so don't add to UI + continue; // not enabled, so don't add to UI } moduleids[ix] = i; drawids[ix++] = DRAW_IDS[i]; @@ -188,10 +182,6 @@ public class CameraSwitcher extends RotateImageView item.setContentDescription(getContext().getResources().getString( R.string.accessibility_switch_to_video)); break; - case R.drawable.ic_switch_pan: - item.setContentDescription(getContext().getResources().getString( - R.string.accessibility_switch_to_panorama)); - break; case R.drawable.ic_switch_photosphere: item.setContentDescription(getContext().getResources().getString( R.string.accessibility_switch_to_new_panorama)); -- cgit v1.2.3