diff options
| author | Wu-cheng Li <wuchengli@google.com> | 2011-04-27 17:56:09 +0800 |
|---|---|---|
| committer | Wu-cheng Li <wuchengli@google.com> | 2011-04-28 12:37:04 +0800 |
| commit | feaf2ccff42c44b74be814b66296f9ddedcc9aa9 (patch) | |
| tree | 0a077d6d11481c12beb0665fb5ff7a3e9ad140c5 /src/com | |
| parent | 18c1ad898f3fddcd321af7ffbb32416a1b32f323 (diff) | |
| download | LegacyCamera-feaf2ccff42c44b74be814b66296f9ddedcc9aa9.zip LegacyCamera-feaf2ccff42c44b74be814b66296f9ddedcc9aa9.tar.gz LegacyCamera-feaf2ccff42c44b74be814b66296f9ddedcc9aa9.tar.bz2 | |
Reduce the size of focus rectangle.
Now the length of focus rectangle is 1/4 of the height of
preview frame.
bug:3475893
Change-Id: Ib1f09d5dbb25bb20343b39116c12febe08d83051
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/camera/Camera.java | 9 | ||||
| -rw-r--r-- | src/com/android/camera/Util.java | 2 | ||||
| -rw-r--r-- | src/com/android/camera/ui/IndicatorWheel.java | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 8677c9a..909d218 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -387,6 +387,11 @@ public class Camera extends ActivityBase implements View.OnClickListener, mPreviewFrame = findViewById(R.id.camera_preview); mPreviewFrame.setOnTouchListener(this); mPreviewBorder = (View) findViewById(R.id.preview_border); + // Set the length of focus rectangle according to preview frame size. + int len = Math.min(mPreviewFrame.getWidth(), mPreviewFrame.getHeight()) / 4; + ViewGroup.LayoutParams layout = mFocusRectangle.getLayoutParams(); + layout.width = len; + layout.height = len; updateFocusIndicator(); initializeScreenBrightness(); @@ -2173,7 +2178,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, 1000, 0F, mLocationListeners[1]); - } catch (java.lang.SecurityException ex) { + } catch (SecurityException ex) { Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { Log.d(TAG, "provider does not exist " + ex.getMessage()); @@ -2185,7 +2190,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, 0F, mLocationListeners[0]); showGpsOnScreenIndicator(false); - } catch (java.lang.SecurityException ex) { + } catch (SecurityException ex) { Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { Log.d(TAG, "provider does not exist " + ex.getMessage()); diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index cfef950..5cafe7a 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -404,7 +404,7 @@ public class Util { } catch (java.lang.reflect.InvocationTargetException ite) { // Failure, must be another device. // Assume that it is voice capable. - } catch (java.lang.IllegalAccessException iae) { + } catch (IllegalAccessException iae) { // Failure, must be an other device. // Assume that it is voice capable. } catch (NoSuchMethodException nsme) { diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java index e24fbc5..8ddd7cd 100644 --- a/src/com/android/camera/ui/IndicatorWheel.java +++ b/src/com/android/camera/ui/IndicatorWheel.java @@ -38,7 +38,6 @@ import android.view.MotionEvent; import android.view.ViewGroup; import android.view.View; -import java.lang.Math; import java.util.ArrayList; /** |
