summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/Switch.java
diff options
context:
space:
mode:
authorSascha Haeberling <haeberling@google.com>2013-09-18 14:28:51 -0700
committerSascha Haeberling <haeberling@google.com>2013-09-18 14:32:55 -0700
commit638e6f06c877d90b907f66ea9c22b3c6b73c7384 (patch)
tree6d2123a6d02228f867ccc6f7e51e2a658b2092d5 /src/com/android/camera/ui/Switch.java
parent4ed20592482d2ab2f3f48ee72d5b1c06bf009034 (diff)
downloadandroid_packages_apps_Snap-638e6f06c877d90b907f66ea9c22b3c6b73c7384.tar.gz
android_packages_apps_Snap-638e6f06c877d90b907f66ea9c22b3c6b73c7384.tar.bz2
android_packages_apps_Snap-638e6f06c877d90b907f66ea9c22b3c6b73c7384.zip
Clean up ApiHelper and remove unused code paths.
Bug: 10821545 As we're targeting ICS there are a lot of checks and code paths that are no longer in use. This CL cleans them up. Change-Id: Ic3dd26628a94e134e25e2c496ccec1f1f957216d
Diffstat (limited to 'src/com/android/camera/ui/Switch.java')
-rw-r--r--src/com/android/camera/ui/Switch.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/camera/ui/Switch.java b/src/com/android/camera/ui/Switch.java
index 4518dedf4..6c3399775 100644
--- a/src/com/android/camera/ui/Switch.java
+++ b/src/com/android/camera/ui/Switch.java
@@ -24,6 +24,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
@@ -39,7 +40,6 @@ import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.CompoundButton;
import com.android.camera2.R;
-import com.android.camera.util.ApiHelper;
/**
* A Switch is a two-state toggle switch widget that can select between two
@@ -82,7 +82,6 @@ public class Switch extends CompoundButton {
private Layout mOnLayout;
private Layout mOffLayout;
- @SuppressWarnings("hiding")
private final Rect mTempRect = new Rect();
private static final int[] CHECKED_STATE_SET = {
@@ -151,8 +150,6 @@ public class Switch extends CompoundButton {
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int widthMode = MeasureSpec.getMode(widthMeasureSpec);
- int widthSize = MeasureSpec.getSize(widthMeasureSpec);
if (mOnLayout == null) {
mOnLayout = makeLayout(mTextOn, mSwitchTextMaxWidth);
}
@@ -180,7 +177,7 @@ public class Switch extends CompoundButton {
}
}
- @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH)
+ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
super.onPopulateAccessibilityEvent(event);
@@ -464,7 +461,6 @@ public class Switch extends CompoundButton {
return super.verifyDrawable(who) || who == mThumbDrawable || who == mTrackDrawable;
}
- @TargetApi(ApiHelper.VERSION_CODES.HONEYCOMB)
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
@@ -472,14 +468,12 @@ public class Switch extends CompoundButton {
mTrackDrawable.jumpToCurrentState();
}
- @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(event);
event.setClassName(Switch.class.getName());
}
- @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(info);