summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_flash_auto_holo_light.pngbin0 -> 1743 bytes
-rw-r--r--res/drawable-hdpi/ic_flash_off_holo_light.pngbin0 -> 1737 bytes
-rw-r--r--res/drawable-hdpi/ic_flash_on_holo_light.pngbin0 -> 1253 bytes
-rw-r--r--res/drawable-hdpi/ic_menuselect_flash_auto.pngbin1559 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_menuselect_flash_off.pngbin1887 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_menuselect_flash_on.pngbin1083 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_viewfinder_flash_auto.pngbin1877 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_viewfinder_flash_off.pngbin2422 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_viewfinder_flash_on.pngbin1258 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_flash_auto_holo_light.pngbin0 -> 1115 bytes
-rw-r--r--res/drawable-mdpi/ic_flash_off_holo_light.pngbin0 -> 1119 bytes
-rw-r--r--res/drawable-mdpi/ic_flash_on_holo_light.pngbin0 -> 853 bytes
-rw-r--r--res/drawable-mdpi/ic_menuselect_flash_auto.pngbin990 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_menuselect_flash_off.pngbin1177 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_menuselect_flash_on.pngbin733 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_viewfinder_flash_auto.pngbin1178 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_viewfinder_flash_off.pngbin1559 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_viewfinder_flash_on.pngbin891 -> 0 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_viewfinder_flash_auto.pngbin2014 -> 0 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_viewfinder_flash_off.pngbin2227 -> 0 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_viewfinder_flash_on.pngbin1651 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/ic_flash_auto_holo_light.pngbin0 -> 2375 bytes
-rw-r--r--res/drawable-xhdpi/ic_flash_off_holo_light.pngbin0 -> 2360 bytes
-rw-r--r--res/drawable-xhdpi/ic_flash_on_holo_light.pngbin0 -> 1597 bytes
-rw-r--r--res/layout/pano_capture.xml9
-rw-r--r--res/values/arrays.xml20
-rw-r--r--src/com/android/camera/Camera.java8
-rw-r--r--src/com/android/camera/panorama/CaptureView.java6
-rw-r--r--src/com/android/camera/panorama/PanoramaActivity.java18
-rw-r--r--src/com/android/camera/ui/SecondLevelIndicatorBar.java5
30 files changed, 31 insertions, 35 deletions
diff --git a/res/drawable-hdpi/ic_flash_auto_holo_light.png b/res/drawable-hdpi/ic_flash_auto_holo_light.png
new file mode 100644
index 0000000..885abd0
--- /dev/null
+++ b/res/drawable-hdpi/ic_flash_auto_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_flash_off_holo_light.png b/res/drawable-hdpi/ic_flash_off_holo_light.png
new file mode 100644
index 0000000..5bf67f9
--- /dev/null
+++ b/res/drawable-hdpi/ic_flash_off_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_flash_on_holo_light.png b/res/drawable-hdpi/ic_flash_on_holo_light.png
new file mode 100644
index 0000000..107b861
--- /dev/null
+++ b/res/drawable-hdpi/ic_flash_on_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menuselect_flash_auto.png b/res/drawable-hdpi/ic_menuselect_flash_auto.png
deleted file mode 100644
index e229c35..0000000
--- a/res/drawable-hdpi/ic_menuselect_flash_auto.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menuselect_flash_off.png b/res/drawable-hdpi/ic_menuselect_flash_off.png
deleted file mode 100644
index cb00600..0000000
--- a/res/drawable-hdpi/ic_menuselect_flash_off.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menuselect_flash_on.png b/res/drawable-hdpi/ic_menuselect_flash_on.png
deleted file mode 100644
index 710e9b7..0000000
--- a/res/drawable-hdpi/ic_menuselect_flash_on.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_viewfinder_flash_auto.png b/res/drawable-hdpi/ic_viewfinder_flash_auto.png
deleted file mode 100644
index 0bf7495..0000000
--- a/res/drawable-hdpi/ic_viewfinder_flash_auto.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_viewfinder_flash_off.png b/res/drawable-hdpi/ic_viewfinder_flash_off.png
deleted file mode 100644
index afcfbad..0000000
--- a/res/drawable-hdpi/ic_viewfinder_flash_off.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_viewfinder_flash_on.png b/res/drawable-hdpi/ic_viewfinder_flash_on.png
deleted file mode 100644
index 827c98f..0000000
--- a/res/drawable-hdpi/ic_viewfinder_flash_on.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_auto_holo_light.png b/res/drawable-mdpi/ic_flash_auto_holo_light.png
new file mode 100644
index 0000000..b9a559d
--- /dev/null
+++ b/res/drawable-mdpi/ic_flash_auto_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_off_holo_light.png b/res/drawable-mdpi/ic_flash_off_holo_light.png
new file mode 100644
index 0000000..3e2f465
--- /dev/null
+++ b/res/drawable-mdpi/ic_flash_off_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_on_holo_light.png b/res/drawable-mdpi/ic_flash_on_holo_light.png
new file mode 100644
index 0000000..4ee1350
--- /dev/null
+++ b/res/drawable-mdpi/ic_flash_on_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menuselect_flash_auto.png b/res/drawable-mdpi/ic_menuselect_flash_auto.png
deleted file mode 100644
index 1967233..0000000
--- a/res/drawable-mdpi/ic_menuselect_flash_auto.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menuselect_flash_off.png b/res/drawable-mdpi/ic_menuselect_flash_off.png
deleted file mode 100644
index 973ef41..0000000
--- a/res/drawable-mdpi/ic_menuselect_flash_off.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menuselect_flash_on.png b/res/drawable-mdpi/ic_menuselect_flash_on.png
deleted file mode 100644
index fe9eaac..0000000
--- a/res/drawable-mdpi/ic_menuselect_flash_on.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_viewfinder_flash_auto.png b/res/drawable-mdpi/ic_viewfinder_flash_auto.png
deleted file mode 100644
index fd73fe1..0000000
--- a/res/drawable-mdpi/ic_viewfinder_flash_auto.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_viewfinder_flash_off.png b/res/drawable-mdpi/ic_viewfinder_flash_off.png
deleted file mode 100644
index b2c0516..0000000
--- a/res/drawable-mdpi/ic_viewfinder_flash_off.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_viewfinder_flash_on.png b/res/drawable-mdpi/ic_viewfinder_flash_on.png
deleted file mode 100644
index 1641aa1..0000000
--- a/res/drawable-mdpi/ic_viewfinder_flash_on.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_auto.png b/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_auto.png
deleted file mode 100644
index 7b1cb6c..0000000
--- a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_auto.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_off.png b/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_off.png
deleted file mode 100644
index ecf8220..0000000
--- a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_off.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_on.png b/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_on.png
deleted file mode 100644
index c01a882..0000000
--- a/res/drawable-w1024dp-mdpi/ic_viewfinder_flash_on.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_auto_holo_light.png b/res/drawable-xhdpi/ic_flash_auto_holo_light.png
new file mode 100644
index 0000000..be20f67
--- /dev/null
+++ b/res/drawable-xhdpi/ic_flash_auto_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_off_holo_light.png b/res/drawable-xhdpi/ic_flash_off_holo_light.png
new file mode 100644
index 0000000..af3535a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_flash_off_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_on_holo_light.png b/res/drawable-xhdpi/ic_flash_on_holo_light.png
new file mode 100644
index 0000000..71edacd
--- /dev/null
+++ b/res/drawable-xhdpi/ic_flash_on_holo_light.png
Binary files differ
diff --git a/res/layout/pano_capture.xml b/res/layout/pano_capture.xml
index 39dd1ab..475e29e 100644
--- a/res/layout/pano_capture.xml
+++ b/res/layout/pano_capture.xml
@@ -24,15 +24,16 @@
<FrameLayout android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.camera.panorama.CaptureView
- android:id="@+id/pano_capture_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
<com.android.camera.panorama.MosaicRendererSurfaceView
android:id="@+id/pano_renderer"
android:layout_gravity="center"
android:layout_width="@dimen/pano_mosaic_surface_width"
android:layout_height="@dimen/pano_mosaic_surface_height" />
+ <com.android.camera.panorama.CaptureView
+ android:id="@+id/pano_capture_view"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</FrameLayout>
<ImageView style="@style/PanoViewHorizontalGrayBar"
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index ff4ab07..97afc9e 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -124,15 +124,15 @@
</string-array>
<array name="camera_flashmode_icons" translatable="false">
- <item>@drawable/ic_menuselect_flash_auto</item>
- <item>@drawable/ic_menuselect_flash_on</item>
- <item>@drawable/ic_menuselect_flash_off</item>
+ <item>@drawable/ic_flash_auto_holo_light</item>
+ <item>@drawable/ic_flash_on_holo_light</item>
+ <item>@drawable/ic_flash_off_holo_light</item>
</array>
<array name="camera_flashmode_largeicons" translatable="false">
- <item>@drawable/ic_viewfinder_flash_auto</item>
- <item>@drawable/ic_viewfinder_flash_on</item>
- <item>@drawable/ic_viewfinder_flash_off</item>
+ <item>@drawable/ic_flash_auto_holo_light</item>
+ <item>@drawable/ic_flash_on_holo_light</item>
+ <item>@drawable/ic_flash_off_holo_light</item>
</array>
<!-- Videocamera Preferences flash mode dialog box entries -->
@@ -147,13 +147,13 @@
</string-array>
<array name="video_flashmode_icons" translatable="false">
- <item>@drawable/ic_menuselect_flash_on</item>
- <item>@drawable/ic_menuselect_flash_off</item>
+ <item>@drawable/ic_flash_on_holo_light</item>
+ <item>@drawable/ic_flash_off_holo_light</item>
</array>
<array name="video_flashmode_largeicons" translatable="false">
- <item>@drawable/ic_viewfinder_flash_on</item>
- <item>@drawable/ic_viewfinder_flash_off</item>
+ <item>@drawable/ic_flash_on_holo_light</item>
+ <item>@drawable/ic_flash_off_holo_light</item>
</array>
<string-array name="pref_camera_recordlocation_entryvalues" translatable="false">
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 50b5165..109fd2a 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -546,6 +546,7 @@ public class Camera extends ActivityBase implements View.OnClickListener,
private void startFaceDetection() {
if (mParameters.getMaxNumDetectedFaces() > 0) {
mFaceView = (FaceView) findViewById(R.id.face_view);
+ mFaceView.clearFaces();
mFaceView.setVisibility(View.VISIBLE);
mFaceView.setDisplayOrientation(mDisplayOrientation);
CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId];
@@ -1441,7 +1442,11 @@ public class Camera extends ActivityBase implements View.OnClickListener,
// Close the camera now because other activities may need to use it.
closeCamera();
resetScreenOn();
+
+ // Clear UI.
collapseCameraControls();
+ if (mSharePopup != null) mSharePopup.dismiss();
+ if (mFaceView != null) mFaceView.clearFaces();
if (mFirstTimeInitialized) {
mOrientationListener.disable();
@@ -1453,8 +1458,6 @@ public class Camera extends ActivityBase implements View.OnClickListener,
hidePostCaptureAlert();
}
- if (mSharePopup != null) mSharePopup.dismiss();
-
if (mDidRegister) {
unregisterReceiver(mReceiver);
mDidRegister = false;
@@ -1823,6 +1826,7 @@ public class Camera extends ActivityBase implements View.OnClickListener,
if (mCameraDevice != null) {
CameraHolder.instance().release();
mCameraDevice.setZoomChangeListener(null);
+ mCameraDevice.setFaceDetectionListener(null);
mCameraDevice = null;
mCameraState = PREVIEW_STOPPED;
}
diff --git a/src/com/android/camera/panorama/CaptureView.java b/src/com/android/camera/panorama/CaptureView.java
index 37f46bb..eea3043 100644
--- a/src/com/android/camera/panorama/CaptureView.java
+++ b/src/com/android/camera/panorama/CaptureView.java
@@ -50,12 +50,6 @@ class CaptureView extends View {
Log.v(TAG, "onSizeChanged: W = " + w + ", H = " + h);
}
- public void onResume() {
- }
-
- public void onPause() {
- }
-
public void setStartAngle(int angle) {
mStartAngle = angle;
}
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java
index bb23b65..f383b4d 100644
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -312,6 +312,7 @@ public class PanoramaActivity extends Activity implements
});
mStopCaptureButton.setVisibility(View.VISIBLE);
+ mCaptureView.setVisibility(View.VISIBLE);
mRealTimeMosaicView.setVisibility(View.VISIBLE);
mPanoControlLayout.setVisibility(View.GONE);
@@ -368,24 +369,20 @@ public class PanoramaActivity extends Activity implements
mCaptureState = CAPTURE_VIEWFINDER;
mCaptureLayout = (View) findViewById(R.id.pano_capture_layout);
- mStopCaptureButton = (Button) findViewById(R.id.pano_capture_stop_button);
- mReviewLayout = (View) findViewById(R.id.pano_review_layout);
-
+ mRealTimeMosaicView = (MosaicRendererSurfaceView) findViewById(R.id.pano_renderer);
+ mRealTimeMosaicView.getRenderer().setMosaicSurfaceCreateListener(this);
mCaptureView = (CaptureView) findViewById(R.id.pano_capture_view);
mCaptureView.setStartAngle(-DEFAULT_SWEEP_ANGLE / 2);
- mReview = (ImageView) findViewById(R.id.pano_reviewarea);
+ mStopCaptureButton = (Button) findViewById(R.id.pano_capture_stop_button);
- mRealTimeMosaicView = (MosaicRendererSurfaceView) findViewById(R.id.pano_renderer);
- mRealTimeMosaicView.getRenderer().setMosaicSurfaceCreateListener(this);
+ mReviewLayout = (View) findViewById(R.id.pano_review_layout);
+ mReview = (ImageView) findViewById(R.id.pano_reviewarea);
mPanoControlLayout = (View) findViewById(R.id.pano_control_layout);
-
mModePicker = (ModePicker) findViewById(R.id.mode_picker);
mModePicker.setVisibility(View.VISIBLE);
mModePicker.setOnModeChangeListener(this);
mModePicker.setCurrentMode(ModePicker.MODE_PANORAMA);
-
- mRealTimeMosaicView.setVisibility(View.VISIBLE);
}
@OnClickAttr
@@ -427,6 +424,7 @@ public class PanoramaActivity extends Activity implements
mReviewLayout.setVisibility(View.GONE);
mStopCaptureButton.setVisibility(View.GONE);
+ mCaptureView.setVisibility(View.GONE);
mPanoControlLayout.setVisibility(View.VISIBLE);
mCaptureLayout.setVisibility(View.VISIBLE);
mMosaicFrameProcessor.reset();
@@ -480,7 +478,6 @@ public class PanoramaActivity extends Activity implements
mPausing = true;
mRealTimeMosaicView.onPause();
- mCaptureView.onPause();
mSensorManager.unregisterListener(mListener);
clearMosaicFrameProcessorIfNeeded();
System.gc();
@@ -504,7 +501,6 @@ public class PanoramaActivity extends Activity implements
// Camera must be initialized before MosaicFrameProcessor is initialized. The preview size
// has to be decided by camera device.
initMosaicFrameProcessorIfNeeded();
- mCaptureView.onResume();
mRealTimeMosaicView.onResume();
}
diff --git a/src/com/android/camera/ui/SecondLevelIndicatorBar.java b/src/com/android/camera/ui/SecondLevelIndicatorBar.java
index 1ba74a9..07ff602 100644
--- a/src/com/android/camera/ui/SecondLevelIndicatorBar.java
+++ b/src/com/android/camera/ui/SecondLevelIndicatorBar.java
@@ -68,10 +68,11 @@ public class SecondLevelIndicatorBar extends IndicatorControl implements
double x = (double) event.getX();
double y = (double) event.getY();
+ int height = getHeight();
if (x > getWidth()) x = getWidth();
- if (y > getHeight()) y = getHeight();
+ if (y >= height) y = height - 1;
- int index = (int) (y * getChildCount()) / getHeight();
+ int index = (int) (y * getChildCount()) / height;
View b = getChildAt(index);
b.dispatchTouchEvent(event);
if ((mSelectedIndex != -1) && (index != mSelectedIndex)) {