Merge "Revert "Revert "Import translations. DO NOT MERGE""" into gb-ub-photos-denali
diff --git a/res/drawable-hdpi/ic_flash_auto_indicator.png b/res/drawable-hdpi/ic_flash_auto_indicator.png
index 9383da0..d259231 100644
--- a/res/drawable-hdpi/ic_flash_auto_indicator.png
+++ b/res/drawable-hdpi/ic_flash_auto_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_flash_off_indicator.png b/res/drawable-hdpi/ic_flash_off_indicator.png
index ee6a947..ff000db 100644
--- a/res/drawable-hdpi/ic_flash_off_indicator.png
+++ b/res/drawable-hdpi/ic_flash_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_flash_on_indicator.png b/res/drawable-hdpi/ic_flash_on_indicator.png
index 2d897b1..f169e00 100644
--- a/res/drawable-hdpi/ic_flash_on_indicator.png
+++ b/res/drawable-hdpi/ic_flash_on_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_grid_off_indicator.png b/res/drawable-hdpi/ic_grid_off_indicator.png
new file mode 100644
index 0000000..ba71a22
--- /dev/null
+++ b/res/drawable-hdpi/ic_grid_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_grid_on_indicator.png b/res/drawable-hdpi/ic_grid_on_indicator.png
new file mode 100644
index 0000000..b7f3c69
--- /dev/null
+++ b/res/drawable-hdpi/ic_grid_on_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_off_indicator.png b/res/drawable-hdpi/ic_hdr_off_indicator.png
index c5c535d..c1a0d6c 100644
--- a/res/drawable-hdpi/ic_hdr_off_indicator.png
+++ b/res/drawable-hdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_on_indicator.png b/res/drawable-hdpi/ic_hdr_on_indicator.png
index 8b682bd..f60ff7c 100644
--- a/res/drawable-hdpi/ic_hdr_on_indicator.png
+++ b/res/drawable-hdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_plus_off_indicator.png b/res/drawable-hdpi/ic_hdr_plus_off_indicator.png
index 0f9f24a..39e9d06 100644
--- a/res/drawable-hdpi/ic_hdr_plus_off_indicator.png
+++ b/res/drawable-hdpi/ic_hdr_plus_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_plus_on_indicator.png b/res/drawable-hdpi/ic_hdr_plus_on_indicator.png
index 5880236..21c2350 100644
--- a/res/drawable-hdpi/ic_hdr_plus_on_indicator.png
+++ b/res/drawable-hdpi/ic_hdr_plus_on_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_refocus_off_indicator.png b/res/drawable-hdpi/ic_refocus_off_indicator.png
index 50bb770..88f5f09 100644
--- a/res/drawable-hdpi/ic_refocus_off_indicator.png
+++ b/res/drawable-hdpi/ic_refocus_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_refocus_on_indicator.png b/res/drawable-hdpi/ic_refocus_on_indicator.png
index 15b4d63..0e7d9b7 100644
--- a/res/drawable-hdpi/ic_refocus_on_indicator.png
+++ b/res/drawable-hdpi/ic_refocus_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_auto_indicator.png b/res/drawable-mdpi/ic_flash_auto_indicator.png
index eb0e6f2..53838b8 100644
--- a/res/drawable-mdpi/ic_flash_auto_indicator.png
+++ b/res/drawable-mdpi/ic_flash_auto_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_off_indicator.png b/res/drawable-mdpi/ic_flash_off_indicator.png
index 3abd8bd..11876f8 100644
--- a/res/drawable-mdpi/ic_flash_off_indicator.png
+++ b/res/drawable-mdpi/ic_flash_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_flash_on_indicator.png b/res/drawable-mdpi/ic_flash_on_indicator.png
index 480b0e9..9235c05 100644
--- a/res/drawable-mdpi/ic_flash_on_indicator.png
+++ b/res/drawable-mdpi/ic_flash_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_grid_off_indicator.png b/res/drawable-mdpi/ic_grid_off_indicator.png
new file mode 100644
index 0000000..d50c9c0
--- /dev/null
+++ b/res/drawable-mdpi/ic_grid_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_grid_on_indicator.png b/res/drawable-mdpi/ic_grid_on_indicator.png
new file mode 100644
index 0000000..855d60d
--- /dev/null
+++ b/res/drawable-mdpi/ic_grid_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_off_indicator.png b/res/drawable-mdpi/ic_hdr_off_indicator.png
index 61e775c..67ee5ce 100644
--- a/res/drawable-mdpi/ic_hdr_off_indicator.png
+++ b/res/drawable-mdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_on_indicator.png b/res/drawable-mdpi/ic_hdr_on_indicator.png
index ed89346..65c5846 100644
--- a/res/drawable-mdpi/ic_hdr_on_indicator.png
+++ b/res/drawable-mdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_plus_off_indicator.png b/res/drawable-mdpi/ic_hdr_plus_off_indicator.png
index 0005639..489240a 100644
--- a/res/drawable-mdpi/ic_hdr_plus_off_indicator.png
+++ b/res/drawable-mdpi/ic_hdr_plus_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_plus_on_indicator.png b/res/drawable-mdpi/ic_hdr_plus_on_indicator.png
index 454ffc2..1509bbf 100644
--- a/res/drawable-mdpi/ic_hdr_plus_on_indicator.png
+++ b/res/drawable-mdpi/ic_hdr_plus_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_refocus_off_indicator.png b/res/drawable-mdpi/ic_refocus_off_indicator.png
index 502f627..f33c3d3 100644
--- a/res/drawable-mdpi/ic_refocus_off_indicator.png
+++ b/res/drawable-mdpi/ic_refocus_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_refocus_on_indicator.png b/res/drawable-mdpi/ic_refocus_on_indicator.png
index 9d491d1..e2d758b 100644
--- a/res/drawable-mdpi/ic_refocus_on_indicator.png
+++ b/res/drawable-mdpi/ic_refocus_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_auto_indicator.png b/res/drawable-xhdpi/ic_flash_auto_indicator.png
index de15956..c599d98 100644
--- a/res/drawable-xhdpi/ic_flash_auto_indicator.png
+++ b/res/drawable-xhdpi/ic_flash_auto_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_off_indicator.png b/res/drawable-xhdpi/ic_flash_off_indicator.png
index a8f9da0..8793748 100644
--- a/res/drawable-xhdpi/ic_flash_off_indicator.png
+++ b/res/drawable-xhdpi/ic_flash_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_flash_on_indicator.png b/res/drawable-xhdpi/ic_flash_on_indicator.png
index e689c37..fb15711 100644
--- a/res/drawable-xhdpi/ic_flash_on_indicator.png
+++ b/res/drawable-xhdpi/ic_flash_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_grid_off_indicator.png b/res/drawable-xhdpi/ic_grid_off_indicator.png
new file mode 100644
index 0000000..5a05966
--- /dev/null
+++ b/res/drawable-xhdpi/ic_grid_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_grid_on_indicator.png b/res/drawable-xhdpi/ic_grid_on_indicator.png
new file mode 100644
index 0000000..6e1ff89
--- /dev/null
+++ b/res/drawable-xhdpi/ic_grid_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_off_indicator.png b/res/drawable-xhdpi/ic_hdr_off_indicator.png
index 637bfcb..527de2c 100644
--- a/res/drawable-xhdpi/ic_hdr_off_indicator.png
+++ b/res/drawable-xhdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_on_indicator.png b/res/drawable-xhdpi/ic_hdr_on_indicator.png
index 74ae13f..4218e50 100644
--- a/res/drawable-xhdpi/ic_hdr_on_indicator.png
+++ b/res/drawable-xhdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_plus_off_indicator.png b/res/drawable-xhdpi/ic_hdr_plus_off_indicator.png
index 53b209d..d7454bf 100644
--- a/res/drawable-xhdpi/ic_hdr_plus_off_indicator.png
+++ b/res/drawable-xhdpi/ic_hdr_plus_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_plus_on_indicator.png b/res/drawable-xhdpi/ic_hdr_plus_on_indicator.png
index 1fa1897..c2ce461 100644
--- a/res/drawable-xhdpi/ic_hdr_plus_on_indicator.png
+++ b/res/drawable-xhdpi/ic_hdr_plus_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_refocus_off_indicator.png b/res/drawable-xhdpi/ic_refocus_off_indicator.png
index 39f8f16..a15e806 100644
--- a/res/drawable-xhdpi/ic_refocus_off_indicator.png
+++ b/res/drawable-xhdpi/ic_refocus_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_refocus_on_indicator.png b/res/drawable-xhdpi/ic_refocus_on_indicator.png
index e4731e2..71eb72b 100644
--- a/res/drawable-xhdpi/ic_refocus_on_indicator.png
+++ b/res/drawable-xhdpi/ic_refocus_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_flash_auto_indicator.png b/res/drawable-xxhdpi/ic_flash_auto_indicator.png
index ec512a8..65dcf1b 100644
--- a/res/drawable-xxhdpi/ic_flash_auto_indicator.png
+++ b/res/drawable-xxhdpi/ic_flash_auto_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_flash_off_indicator.png b/res/drawable-xxhdpi/ic_flash_off_indicator.png
index 3552edd..5aa096c 100644
--- a/res/drawable-xxhdpi/ic_flash_off_indicator.png
+++ b/res/drawable-xxhdpi/ic_flash_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_flash_on_indicator.png b/res/drawable-xxhdpi/ic_flash_on_indicator.png
index e2873d6..4177f65 100644
--- a/res/drawable-xxhdpi/ic_flash_on_indicator.png
+++ b/res/drawable-xxhdpi/ic_flash_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_grid_off_indicator.png b/res/drawable-xxhdpi/ic_grid_off_indicator.png
new file mode 100644
index 0000000..1505870
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_grid_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_grid_on_indicator.png b/res/drawable-xxhdpi/ic_grid_on_indicator.png
new file mode 100644
index 0000000..381942f
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_grid_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_off_indicator.png b/res/drawable-xxhdpi/ic_hdr_off_indicator.png
index 1204315..640d903 100644
--- a/res/drawable-xxhdpi/ic_hdr_off_indicator.png
+++ b/res/drawable-xxhdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_on_indicator.png b/res/drawable-xxhdpi/ic_hdr_on_indicator.png
index b247343..eb44d43 100644
--- a/res/drawable-xxhdpi/ic_hdr_on_indicator.png
+++ b/res/drawable-xxhdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_plus_off_indicator.png b/res/drawable-xxhdpi/ic_hdr_plus_off_indicator.png
index 08369e1..4d5e046 100644
--- a/res/drawable-xxhdpi/ic_hdr_plus_off_indicator.png
+++ b/res/drawable-xxhdpi/ic_hdr_plus_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_plus_on_indicator.png b/res/drawable-xxhdpi/ic_hdr_plus_on_indicator.png
index 7b6e158..5999ba2 100644
--- a/res/drawable-xxhdpi/ic_hdr_plus_on_indicator.png
+++ b/res/drawable-xxhdpi/ic_hdr_plus_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_refocus_off_indicator.png b/res/drawable-xxhdpi/ic_refocus_off_indicator.png
index ca0c286..fae486b 100644
--- a/res/drawable-xxhdpi/ic_refocus_off_indicator.png
+++ b/res/drawable-xxhdpi/ic_refocus_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_refocus_on_indicator.png b/res/drawable-xxhdpi/ic_refocus_on_indicator.png
index 86ceb9f..a8529b5 100644
--- a/res/drawable-xxhdpi/ic_refocus_on_indicator.png
+++ b/res/drawable-xxhdpi/ic_refocus_on_indicator.png
Binary files differ
diff --git a/res/layout/mode_options_bottombar.xml b/res/layout/mode_options_bottombar.xml
index 423cdec..4dd6232 100644
--- a/res/layout/mode_options_bottombar.xml
+++ b/res/layout/mode_options_bottombar.xml
@@ -41,11 +41,6 @@
android:visibility="invisible"
android:background="#4C000000" >
<com.android.camera.MultiToggleImageButton
- android:id="@+id/refocus_toggle_button"
- style="@style/ModeOption"
- camera:imageIds="@array/refocus_icons"
- camera:contentDescriptionIds="@array/refocus_descriptions" />
- <com.android.camera.MultiToggleImageButton
android:id="@+id/hdr_plus_toggle_button"
style="@style/ModeOption"
camera:imageIds="@array/pref_camera_hdr_plus_icons"
@@ -94,9 +89,6 @@
android:id="@+id/panorama_indicator"
style="@style/IndicatorIcon" />
<ImageView
- android:id="@+id/refocus_indicator"
- style="@style/IndicatorIcon" />
- <ImageView
android:id="@+id/hdr_indicator"
style="@style/IndicatorIcon" />
<ImageView
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index e191859..995d5c0 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -579,20 +579,19 @@
<!--Index of camera modes. -->
<integer name="camera_mode_photo">0</integer>
<integer name="camera_mode_video">1</integer>
- <integer name="camera_mode_craft">2</integer>
+ <integer name="camera_mode_refocus">2</integer>
<integer name="camera_mode_photosphere">3</integer>
<integer name="camera_mode_panorama">4</integer>
<integer name="camera_mode_timelapse">5</integer>
<integer name="camera_mode_setting">6</integer>
<integer name="camera_mode_gcam">7</integer>
- <integer name="camera_mode_refocus">8</integer>
<!-- An array of camera mode indices in the sequence of their appearance
in the mode drawer. -->
<integer-array name="camera_modes_in_nav_drawer_if_supported">
<item>@integer/camera_mode_photo</item>
<item>@integer/camera_mode_video</item>
- <item>@integer/camera_mode_craft</item>
+ <item>@integer/camera_mode_refocus</item>
<item>@integer/camera_mode_panorama</item>
<item>@integer/camera_mode_photosphere</item>
<item>@integer/camera_mode_timelapse</item>
@@ -613,56 +612,51 @@
<item>@color/panorama_mode_color</item>
<item>@color/timelapse_mode_color</item>
<item>@color/settings_mode_color</item>
- <item>@color/craft_mode_color</item>
- <item>@color/craft_mode_color</item>
+ <item>@color/camera_mode_color</item>
</array>
<string-array name="camera_mode_text">
<item>@string/mode_camera</item>
<item>@string/mode_video</item>
- <item>@string/mode_advanced_camera</item>
+ <item>@string/mode_refocus</item>
<item>@string/mode_photosphere</item>
<item>@string/mode_panorama</item>
<item>@string/mode_timelapse</item>
<item>@string/mode_settings</item>
<item>""</item>
- <item>""</item>
</string-array>
<string-array name="camera_mode_content_description">
<item>@string/mode_camera_desc</item>
<item>@string/mode_video_desc</item>
- <item>@string/mode_advanced_camera_desc</item>
+ <item>@string/mode_refocus_desc</item>
<item>@string/mode_photosphere_desc</item>
<item>@string/mode_panorama_desc</item>
<item>@string/mode_timelapse_desc</item>
<item>@string/mode_settings_desc</item>
<item>""</item>
- <item>""</item>
</string-array>
<array name="camera_mode_icon">
<item>@drawable/ic_camera_normal</item>
<item>@drawable/ic_video_normal</item>
- <item>@drawable/ic_craft_normal</item>
+ <item>@drawable/ic_refocus_normal</item>
<item>@drawable/ic_photo_sphere_normal</item>
<item>@drawable/ic_panorama_normal</item>
<item>@drawable/ic_timelapse_normal</item>
<item>@drawable/ic_settings_normal</item>
- <item>@drawable/ic_craft_normal</item>
- <item>@drawable/ic_craft_normal</item>
+ <item>@drawable/ic_camera_normal</item>
</array>
<array name="camera_mode_shutter_icon">
<item>@drawable/ic_camera_normal</item>
<item>@drawable/ic_video_normal</item>
- <item>@drawable/ic_camera_normal</item>
+ <item>@drawable/ic_refocus_normal</item>
<item>@null</item>
<item>@drawable/ic_panorama_normal</item>
<item>@null</item>
<item>@null</item>
- <item>@drawable/ic_craft_normal</item>
- <item>@drawable/ic_craft_normal</item>
+ <item>@drawable/ic_camera_normal</item>
</array>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6751f10..7f515b5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -682,6 +682,8 @@
<string name="mode_wideangle">Wide Angle</string>
<!-- Text shown in the camera mode options list for putting camera in panorama mode [CHAR LIMIT=25] -->
<string name="mode_panorama">Panorama</string>
+ <!-- Text shown in the camera mode options list for putting camera in refocus mode [CHAR LIMIT=25] -->
+ <string name="mode_refocus">Foreground Focus</string>
<!-- Accessibility text for switching to camera settings [CHAR_LIMIT=NONE] -->
<string name="mode_settings_desc">Open Settings</string>
@@ -701,6 +703,8 @@
<string name="mode_wideangle_desc">Switch to Wideangle Mode</string>
<!-- Accessibility text for switching to panorama mode [CHAR_LIMIT=NONE] -->
<string name="mode_panorama_desc">Switch to Panorama Mode</string>
+ <!-- Accessibility text for switching to refocus mode [CHAR_LIMIT=NONE] -->
+ <string name="mode_refocus_desc">Switch to Foreground Focus Mode</string>
<!-- Accessibility text for refocus toggle button states [CHAR_LIMIT=NONE] -->
diff --git a/src/com/android/camera/ButtonManager.java b/src/com/android/camera/ButtonManager.java
index 526ffd4..f5e36f6 100644
--- a/src/com/android/camera/ButtonManager.java
+++ b/src/com/android/camera/ButtonManager.java
@@ -39,7 +39,6 @@
public static final int BUTTON_CAMERA = 2;
public static final int BUTTON_HDRPLUS = 3;
public static final int BUTTON_HDR = 4;
- public static final int BUTTON_REFOCUS = 5;
public static final int BUTTON_CANCEL = 6;
public static final int BUTTON_DONE = 7;
public static final int BUTTON_RETAKE = 8;
@@ -131,8 +130,6 @@
= (MultiToggleImageButton) root.findViewById(R.id.flash_toggle_button);
mButtonPos3
= (MultiToggleImageButton) root.findViewById(R.id.hdr_plus_toggle_button);
- mButtonPos4
- = (MultiToggleImageButton) root.findViewById(R.id.refocus_toggle_button);
mButtonCancel
= (ImageButton) root.findViewById(R.id.cancel_button);
mButtonDone
@@ -169,11 +166,6 @@
button = getButtonOrError(BUTTON_HDRPLUS);
break;
}
- case SettingsManager.SETTING_CAMERA_REFOCUS: {
- index = mSettingsManager.getStringValueIndex(id);
- button = getButtonOrError(BUTTON_REFOCUS);
- break;
- }
default: {
// Do nothing.
}
@@ -228,11 +220,6 @@
throw new IllegalStateException("Hdr button could not be found.");
}
return mButtonPos3;
- case BUTTON_REFOCUS:
- if (mButtonPos4 == null) {
- throw new IllegalStateException("Refocus button could not be found.");
- }
- return mButtonPos4;
default:
throw new IllegalArgumentException("button not known by id=" + buttonId);
}
@@ -302,9 +289,6 @@
case BUTTON_HDR:
enableHdrPlusButton(button, cb, R.array.pref_camera_hdr_icons);
break;
- case BUTTON_REFOCUS:
- enableRefocusButton(button, cb, R.array.refocus_icons);
- break;
default:
throw new IllegalArgumentException("button not known by id=" + buttonId);
}
@@ -548,28 +532,4 @@
}
});
}
-
- /**
- * Enable a refocus button.
- */
- private void enableRefocusButton(MultiToggleImageButton button,
- final ButtonCallback cb, int resIdImages) {
-
- if (resIdImages > 0) {
- button.overrideImageIds(resIdImages);
- }
-
- int index = mSettingsManager.getStringValueIndex(SettingsManager.SETTING_CAMERA_REFOCUS);
- button.setState(index >= 0 ? index : 0, false);
-
- button.setOnStateChangeListener(new MultiToggleImageButton.OnStateChangeListener() {
- @Override
- public void stateChanged(View view, int state) {
- mSettingsManager.setStringValueIndex(SettingsManager.SETTING_CAMERA_REFOCUS, state);
- if (cb != null) {
- cb.onStateChanged(state);
- }
- }
- });
- }
}
\ No newline at end of file
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 1aee123..1c3bd2c 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -420,18 +420,17 @@
switch (msg.what) {
case MSG_HIDE_ACTION_BAR: {
removeMessages(MSG_HIDE_ACTION_BAR);
- mActivity.get().setFilmstripUiVisibility(false);
+ activity.setFilmstripUiVisibility(false);
break;
}
case MSG_CLEAR_SCREEN_ON_FLAG: {
- if (!mActivity.get().mPaused) {
- mActivity.get().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+ if (!activity.mPaused) {
+ activity.getWindow().clearFlags(
+ WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
break;
}
-
- default:
}
}
}
@@ -1107,7 +1106,6 @@
if (modeIndex == getResources().getInteger(R.integer.camera_mode_photo)
|| modeIndex == getResources().getInteger(R.integer.camera_mode_video)
|| modeIndex == getResources().getInteger(R.integer.camera_mode_gcam)
- || modeIndex == getResources().getInteger(R.integer.camera_mode_craft)
|| modeIndex == getResources().getInteger(R.integer.camera_mode_refocus)) {
mCameraAppUI.prepareModuleUI();
}
@@ -1487,7 +1485,7 @@
CameraPerformanceTracker.onEvent(CameraPerformanceTracker.MODE_SWITCH_START);
// Record last used camera mode for quick switching
if (modeIndex == getResources().getInteger(R.integer.camera_mode_photo)
- || modeIndex == getResources().getInteger(R.integer.camera_mode_craft)) {
+ || modeIndex == getResources().getInteger(R.integer.camera_mode_gcam)) {
mSettingsManager.setInt(SettingsManager.SETTING_KEY_CAMERA_MODULE_LAST_USED_INDEX,
modeIndex);
}
@@ -1498,18 +1496,10 @@
// Refocus and Gcam are modes that cannot be selected
// from the mode list view, because they are not list items.
// Check whether we should interpret MODULE_CRAFT as either.
- if (modeIndex == getResources().getInteger(R.integer.camera_mode_craft)) {
- boolean refocusOn = mSettingsManager.isRefocusOn();
+ if (modeIndex == getResources().getInteger(R.integer.camera_mode_photo)) {
boolean hdrPlusOn = mSettingsManager.isHdrPlusOn();
- if (refocusOn && hdrPlusOn) {
- throw new IllegalStateException("Refocus and hdr plus cannot be on together.");
- }
- if (refocusOn) {
- modeIndex = getResources().getInteger(R.integer.camera_mode_refocus);
- } else if (hdrPlusOn && GcamHelper.hasGcamCapture()) {
+ if (hdrPlusOn && GcamHelper.hasGcamCapture()) {
modeIndex = getResources().getInteger(R.integer.camera_mode_gcam);
- } else {
- // Do nothing, keep MODULE_CRAFT.
}
}
@@ -1521,12 +1511,10 @@
if (mCurrentModeIndex == getResources().getInteger(R.integer.camera_mode_photo)
|| mCurrentModeIndex == getResources().getInteger(R.integer.camera_mode_video)
|| mCurrentModeIndex == getResources().getInteger(R.integer.camera_mode_gcam)
- || mCurrentModeIndex == getResources().getInteger(R.integer.camera_mode_craft)
|| mCurrentModeIndex == getResources().getInteger(R.integer.camera_mode_refocus)) {
if (oldModuleIndex != getResources().getInteger(R.integer.camera_mode_photo)
&& oldModuleIndex != getResources().getInteger(R.integer.camera_mode_video)
&& oldModuleIndex != getResources().getInteger(R.integer.camera_mode_gcam)
- && oldModuleIndex != getResources().getInteger(R.integer.camera_mode_craft)
&& oldModuleIndex != getResources().getInteger(R.integer.camera_mode_refocus)) {
mCameraAppUI.prepareModuleUI();
} else {
@@ -1624,7 +1612,7 @@
* location on the first run of the app.
*/
public AlertDialog getFirstTimeLocationAlert() {
- AlertDialog.Builder builder = new AlertDialog.Builder(mAppContext);
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder = SettingsView.getFirstTimeLocationAlertBuilder(builder, mSettingsController);
if (builder != null) {
return builder.create();
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 7c79dfa..89a8e98 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -232,7 +232,6 @@
private FocusOverlayManager mFocusManager;
private final int mGcamModeIndex;
- private final int mRefocusModeIndex;
private String mSceneMode;
@@ -328,8 +327,6 @@
super(app);
mGcamModeIndex = app.getAndroidContext().getResources()
.getInteger(R.integer.camera_mode_gcam);
- mRefocusModeIndex = app.getAndroidContext().getResources()
- .getInteger(R.integer.camera_mode_refocus);
}
@Override
@@ -480,18 +477,6 @@
}
};
- private final ButtonManager.ButtonCallback mRefocusCallback =
- new ButtonManager.ButtonCallback() {
- @Override
- public void onStateChanged(int state) {
- if (state == ButtonManager.OFF) {
- throw new IllegalStateException(
- "Can't switch refocus off because it should already be off.");
- }
- mActivity.onModeSelected(mRefocusModeIndex);
- }
- };
-
private final View.OnClickListener mCancelCallback = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -526,17 +511,8 @@
bottomBarSpec.enableCamera = true;
bottomBarSpec.cameraCallback = mCameraCallback;
bottomBarSpec.enableFlash = true;
-
- if (mActivity.getCurrentModuleIndex() == mActivity.getResources()
- .getInteger(R.integer.camera_mode_photo)) {
- bottomBarSpec.hideHdr = true;
- bottomBarSpec.hideRefocus = true;
- } else {
- bottomBarSpec.enableHdr = true;
- bottomBarSpec.hdrCallback = mHdrPlusCallback;
- bottomBarSpec.enableRefocus = true;
- bottomBarSpec.refocusCallback = mRefocusCallback;
- }
+ bottomBarSpec.enableHdr = true;
+ bottomBarSpec.hdrCallback = mHdrPlusCallback;
if (isImageCaptureIntent()) {
bottomBarSpec.showCancel = true;
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index f3e85ad..42b1e93 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -522,7 +522,6 @@
bottomBarSpec.enableTorchFlash = true;
bottomBarSpec.flashCallback = mFlashCallback;
bottomBarSpec.hideHdr = true;
- bottomBarSpec.hideRefocus = true;
if (isVideoCaptureIntent()) {
bottomBarSpec.showCancel = true;
diff --git a/src/com/android/camera/app/CameraAppUI.java b/src/com/android/camera/app/CameraAppUI.java
index d89b8db..a4af75f 100644
--- a/src/com/android/camera/app/CameraAppUI.java
+++ b/src/com/android/camera/app/CameraAppUI.java
@@ -231,25 +231,18 @@
public boolean enableHdr;
/**
+ * Set true if flash should not be visible, regardless of
+ * hardware limitations.
+ */
+ public boolean hideFlash;
+
+ /**
* Set true if hdr/hdr+ should not be visible, regardless of
* hardware limitations.
*/
public boolean hideHdr;
/**
- * Set true if the refocus option should be enabled.
- * If not set or false, the refocus option will be disabled.
- *
- * This option is not constrained by hardware limitations.
- */
- public boolean enableRefocus;
-
- /**
- * Set true if refocus should not be visible.
- */
- public boolean hideRefocus;
-
- /**
* Set true if the panorama horizontal option should be visible.
*
* This option is not constrained by hardware limitations.
@@ -1184,17 +1177,21 @@
buttonManager.hideButton(ButtonManager.BUTTON_CAMERA);
}
- if (hardwareSpec.isFlashSupported()) {
- if (bottomBarSpec.enableFlash && settingsManager.isCameraBackFacing()) {
- buttonManager.enableButton(ButtonManager.BUTTON_FLASH, bottomBarSpec.flashCallback);
- } else if (bottomBarSpec.enableTorchFlash && settingsManager.isCameraBackFacing()) {
- buttonManager.enableButton(ButtonManager.BUTTON_TORCH, bottomBarSpec.flashCallback);
+ if (bottomBarSpec.hideFlash) {
+ buttonManager.hideButton(ButtonManager.BUTTON_FLASH);
+ } else {
+ if (hardwareSpec.isFlashSupported()) {
+ if (bottomBarSpec.enableFlash && settingsManager.isCameraBackFacing()) {
+ buttonManager.enableButton(ButtonManager.BUTTON_FLASH, bottomBarSpec.flashCallback);
+ } else if (bottomBarSpec.enableTorchFlash && settingsManager.isCameraBackFacing()) {
+ buttonManager.enableButton(ButtonManager.BUTTON_TORCH, bottomBarSpec.flashCallback);
+ } else {
+ buttonManager.disableButton(ButtonManager.BUTTON_FLASH);
+ }
} else {
+ // Disable flash icon if not supported by the hardware.
buttonManager.disableButton(ButtonManager.BUTTON_FLASH);
}
- } else {
- // Disable flash icon if not supported by the hardware.
- buttonManager.disableButton(ButtonManager.BUTTON_FLASH);
}
if (bottomBarSpec.hideHdr) {
@@ -1221,19 +1218,6 @@
}
}
- if (bottomBarSpec.hideRefocus) {
- buttonManager.hideButton(ButtonManager.BUTTON_REFOCUS);
- } else {
- if (bottomBarSpec.enableRefocus) {
- buttonManager.enableButton(ButtonManager.BUTTON_REFOCUS,
- bottomBarSpec.refocusCallback);
- } else {
- // Disable refocus icon when not enabled, not dependent
- // on hardware spec.
- buttonManager.disableButton(ButtonManager.BUTTON_REFOCUS);
- }
- }
-
if (bottomBarSpec.enablePanoHorizontal
&& PhotoSphereHelper.getPanoramaHorizontalDrawableId() > 0) {
buttonManager.enablePushButton(ButtonManager.BUTTON_PANO_HORIZONTAL,
diff --git a/src/com/android/camera/app/ModuleManagerImpl.java b/src/com/android/camera/app/ModuleManagerImpl.java
index 65d1e77..2b64514 100644
--- a/src/com/android/camera/app/ModuleManagerImpl.java
+++ b/src/com/android/camera/app/ModuleManagerImpl.java
@@ -114,19 +114,14 @@
final int videoModuleId = context.getResources().getInteger(R.integer.camera_mode_video);
int quickSwitchTo = moduleId;
- if (moduleId == photoModuleId) {
- // Quick switch from simple camera to video.
+ if (moduleId == photoModuleId
+ || moduleId == context.getResources().getInteger(R.integer.camera_mode_gcam)) {
+ // Quick switch from camera to video.
quickSwitchTo = videoModuleId;
} else if (moduleId == videoModuleId) {
- // Quick switch from video to last used camera (i.e. simple camera or
- // advanced camera).
+ // Quick switch from video to last used camera (i.e. simple camera or hdr+)
quickSwitchTo = settingsManager.getInt(
SettingsManager.SETTING_KEY_CAMERA_MODULE_LAST_USED_INDEX);
- } else if (moduleId == context.getResources().getInteger(R.integer.camera_mode_craft)
- || moduleId == context.getResources().getInteger(R.integer.camera_mode_gcam)
- || moduleId == context.getResources().getInteger(R.integer.camera_mode_refocus)) {
- // Quick switch from advanced camera to video.
- quickSwitchTo = videoModuleId;
}
if (mRegisteredModuleAgents.get(quickSwitchTo) != null) {
diff --git a/src/com/android/camera/module/ModulesInfo.java b/src/com/android/camera/module/ModulesInfo.java
index 1bf50a6..aceed47 100644
--- a/src/com/android/camera/module/ModulesInfo.java
+++ b/src/com/android/camera/module/ModulesInfo.java
@@ -38,8 +38,6 @@
int photoModuleId = context.getResources().getInteger(R.integer.camera_mode_photo);
registerPhotoModule(moduleManager, photoModuleId);
moduleManager.setDefaultModuleIndex(photoModuleId);
- registerCraftModule(moduleManager, context.getResources()
- .getInteger(R.integer.camera_mode_craft));
registerVideoModule(moduleManager, context.getResources()
.getInteger(R.integer.camera_mode_video));
if (PhotoSphereHelper.hasLightCycleCapture(context)) {
@@ -77,25 +75,6 @@
});
}
- private static void registerCraftModule(ModuleManager moduleManager, final int moduleId) {
- moduleManager.registerModule(new ModuleManager.ModuleAgent() {
- @Override
- public int getModuleId() {
- return moduleId;
- }
-
- @Override
- public boolean requestAppForCamera() {
- return true;
- }
-
- @Override
- public ModuleController createModule(AppController app) {
- return new PhotoModule(app);
- }
- });
- }
-
private static void registerVideoModule(ModuleManager moduleManager, final int moduleId) {
moduleManager.registerModule(new ModuleManager.ModuleAgent() {
@Override
diff --git a/src/com/android/camera/widget/IndicatorIconController.java b/src/com/android/camera/widget/IndicatorIconController.java
index 7d9284d..d628fa2 100644
--- a/src/com/android/camera/widget/IndicatorIconController.java
+++ b/src/com/android/camera/widget/IndicatorIconController.java
@@ -48,14 +48,12 @@
private ImageView mFlashIndicator;
private ImageView mHdrIndicator;
- private ImageView mRefocusIndicator;
private ImageView mPanoramaIndicator;
private TypedArray mFlashIndicatorPhotoIcons;
private TypedArray mFlashIndicatorVideoIcons;
private TypedArray mHdrPlusIndicatorIcons;
private TypedArray mHdrIndicatorIcons;
- private TypedArray mRefocusIndicatorIcons;
private TypedArray mPanoramaIndicatorIcons;
private AppController mController;
@@ -66,7 +64,6 @@
mFlashIndicator = (ImageView) root.findViewById(R.id.flash_indicator);
mHdrIndicator = (ImageView) root.findViewById(R.id.hdr_indicator);
- mRefocusIndicator = (ImageView) root.findViewById(R.id.refocus_indicator);
mPanoramaIndicator = (ImageView) root.findViewById(R.id.panorama_indicator);
mFlashIndicatorPhotoIcons = context.getResources().obtainTypedArray(
@@ -77,8 +74,6 @@
R.array.pref_camera_hdr_plus_indicator_icons);
mHdrIndicatorIcons = context.getResources().obtainTypedArray(
R.array.pref_camera_hdr_indicator_icons);
- mRefocusIndicatorIcons = context.getResources().obtainTypedArray(
- R.array.refocus_indicator_icons);
if (PhotoSphereHelper.getPanoramaIndicatorArrayId() > 0) {
mPanoramaIndicatorIcons = context.getResources().obtainTypedArray(
PhotoSphereHelper.getPanoramaIndicatorArrayId());
@@ -117,10 +112,6 @@
syncHdrIndicator();
break;
}
- case ButtonManager.BUTTON_REFOCUS: {
- syncRefocusIndicator();
- break;
- }
case ButtonManager.BUTTON_PANO_HORIZONTAL: {
syncPanoramaIndicator();
break;
@@ -142,7 +133,6 @@
public void syncIndicators() {
syncFlashIndicator();
syncHdrIndicator();
- syncRefocusIndicator();
syncPanoramaIndicator();
}
@@ -195,23 +185,6 @@
}
/**
- * Sync the icon and the visibility of the refocus indicator.
- */
- private void syncRefocusIndicator() {
- ButtonManager buttonManager = mController.getButtonManager();
- // If refocus isn't an enabled and visible option,
- // do not show the indicator.
- if (buttonManager.isEnabled(ButtonManager.BUTTON_REFOCUS)
- && buttonManager.isVisible(ButtonManager.BUTTON_REFOCUS)) {
- setIndicatorState(mController.getSettingsManager(),
- SettingsManager.SETTING_CAMERA_REFOCUS,
- mRefocusIndicator, mRefocusIndicatorIcons, false);
- } else {
- mRefocusIndicator.setVisibility(View.GONE);
- }
- }
-
- /**
* Sync the icon and the visibility of the panorama indicator.
*/
private void syncPanoramaIndicator() {
@@ -278,10 +251,6 @@
syncHdrIndicator();
break;
}
- case SettingsManager.SETTING_CAMERA_REFOCUS: {
- syncRefocusIndicator();
- break;
- }
case SettingsManager.SETTING_CAMERA_PANO_ORIENTATION: {
syncPanoramaIndicator();
break;