summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Haeberling <haeberling@google.com>2013-07-23 18:30:17 -0700
committerSascha Haeberling <haeberling@google.com>2013-07-24 12:18:28 -0700
commitc46978c469e8a7f7ea79ac805cef80c892649280 (patch)
tree1991735fe92f237041c48132c39c633fe4b7c5eb
parent2d3b8b11f03ab41558866d2b996b76e0ceef845a (diff)
downloadandroid_packages_apps_Gallery2-c46978c469e8a7f7ea79ac805cef80c892649280.tar.gz
android_packages_apps_Gallery2-c46978c469e8a7f7ea79ac805cef80c892649280.tar.bz2
android_packages_apps_Gallery2-c46978c469e8a7f7ea79ac805cef80c892649280.zip
Refocus integration phase 1.
Bug: 9966846 Change-Id: I591ce1ee878a9f4d6bd63eddef6e79608ffd69ec
-rw-r--r--res/drawable-xhdpi/ic_switch_refocus.pngbin0 -> 833 bytes
-rw-r--r--res/values/strings.xml2
-rw-r--r--src/com/android/camera/CameraActivity.java4
-rw-r--r--src/com/android/camera/ui/CameraSwitcher.java8
-rw-r--r--src_pd/com/android/gallery3d/util/RefocusHelper.java25
5 files changed, 38 insertions, 1 deletions
diff --git a/res/drawable-xhdpi/ic_switch_refocus.png b/res/drawable-xhdpi/ic_switch_refocus.png
new file mode 100644
index 000000000..3175f35ae
--- /dev/null
+++ b/res/drawable-xhdpi/ic_switch_refocus.png
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c110e79d7..f2d69c8c3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -942,6 +942,8 @@
<string name="accessibility_switch_to_panorama">Switch to panorama</string>
<!-- The button to switch to new Panorama mode. [CHAR LIMIT = NONE] -->
<string name="accessibility_switch_to_new_panorama">Switch to new panorama</string>
+ <!-- The button to switch to the Re-Focus mode. [CHAR LIMIT = NONE] -->
+ <string name="accessibility_switch_to_refocus">Switch to Refocus</string>
<!-- The button in review mode indicating that the photo taking, video recording, and panorama saving session should be canceled [CHAR LIMIT = NONE] -->
<string name="accessibility_review_cancel">Review cancel</string>
<!-- The button in review mode indicating that the taken photo/video is OK to be attached/uploaded [CHAR LIMIT = NONE] -->
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index d8756701d..701303653 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -50,6 +50,7 @@ import com.android.camera.ui.FilmStripView;
import com.android.gallery3d.R;
import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.util.LightCycleHelper;
+import com.android.gallery3d.util.RefocusHelper;
public class CameraActivity extends Activity
implements CameraSwitchListener {
@@ -477,6 +478,9 @@ public class CameraActivity extends Activity
case CameraSwitcher.LIGHTCYCLE_MODULE_INDEX:
mCurrentModule = LightCycleHelper.createPanoramaModule();
break;
+ case CameraSwitcher.REFOCUS_MODULE_INDEX:
+ mCurrentModule = RefocusHelper.createRefocusModule();
+ break;
default:
break;
}
diff --git a/src/com/android/camera/ui/CameraSwitcher.java b/src/com/android/camera/ui/CameraSwitcher.java
index 90d88d29a..6e4321571 100644
--- a/src/com/android/camera/ui/CameraSwitcher.java
+++ b/src/com/android/camera/ui/CameraSwitcher.java
@@ -49,10 +49,12 @@ 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 LIGHTCYCLE_MODULE_INDEX = 2;
+ public static final int REFOCUS_MODULE_INDEX = 3;
private static final int[] DRAW_IDS = {
R.drawable.ic_switch_camera,
R.drawable.ic_switch_video,
- R.drawable.ic_switch_photosphere
+ R.drawable.ic_switch_photosphere,
+ R.drawable.ic_switch_refocus
};
public interface CameraSwitchListener {
public void onCameraSelected(int i);
@@ -186,6 +188,10 @@ public class CameraSwitcher extends RotateImageView
item.setContentDescription(getContext().getResources().getString(
R.string.accessibility_switch_to_new_panorama));
break;
+ case R.drawable.ic_switch_refocus:
+ item.setContentDescription(getContext().getResources().getString(
+ R.string.accessibility_switch_to_refocus));
+ break;
default:
break;
}
diff --git a/src_pd/com/android/gallery3d/util/RefocusHelper.java b/src_pd/com/android/gallery3d/util/RefocusHelper.java
new file mode 100644
index 000000000..39ded4740
--- /dev/null
+++ b/src_pd/com/android/gallery3d/util/RefocusHelper.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.gallery3d.util;
+
+import com.android.camera.CameraModule;
+
+public class RefocusHelper {
+ public static CameraModule createRefocusModule() {
+ return null;
+ }
+}