summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml8
-rw-r--r--res/layout-land/keyguard_widget.xml63
-rw-r--r--res/layout-port/keyguard_widget.xml60
-rw-r--r--res/layout/camera_controls.xml8
-rw-r--r--res/layout/menu_indicators.xml57
-rw-r--r--res/layout/menu_indicators_keyguard.xml57
-rw-r--r--res/values-large/dimens.xml1
-rw-r--r--res/values-sw600dp/dimens.xml1
-rw-r--r--res/values-sw640dp/dimens.xml2
-rw-r--r--res/values-xlarge/dimens.xml2
-rwxr-xr-xres/values/dimens.xml5
-rw-r--r--src/com/android/camera/OnScreenIndicators.java205
-rw-r--r--src/com/android/camera/PanoCaptureUI.java16
-rwxr-xr-xsrc/com/android/camera/PhotoModule.java6
-rwxr-xr-xsrc/com/android/camera/PhotoUI.java42
-rw-r--r--src/com/android/camera/VideoModule.java6
-rwxr-xr-xsrc/com/android/camera/VideoUI.java25
-rw-r--r--src/com/android/camera/WideAnglePanoramaUI.java3
-rw-r--r--src/com/android/camera/ui/CameraControls.java20
19 files changed, 1 insertions, 586 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5b3c8a20f..0e70031ce 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -58,10 +58,6 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
-
- <meta-data
- android:name="com.android.keyguard.layout"
- android:resource="@layout/keyguard_widget" />
</activity>
<activity
@@ -150,10 +146,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
-
- <meta-data
- android:name="com.android.keyguard.layout"
- android:resource="@layout/keyguard_widget" />
</activity>
<activity-alias
diff --git a/res/layout-land/keyguard_widget.xml b/res/layout-land/keyguard_widget.xml
deleted file mode 100644
index 31569004a..000000000
--- a/res/layout-land/keyguard_widget.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/camera_controls"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/default_background" >
-
- <ImageView
- android:id="@+id/shutter_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
- android:layout_marginRight="@dimen/shutter_offset"
- android:contentDescription="@string/accessibility_shutter_button"
- android:scaleType="center"
- android:src="@drawable/btn_new_shutter" />
-
- <include
- android:layout_width="64dip"
- android:layout_height="64dip"
- android:layout_above="@id/shutter_button"
- android:layout_alignParentRight="true"
- android:layout_marginRight="6dip"
- android:layout_marginTop="-5dip"
- layout="@layout/menu_indicators_keyguard" />
-
- <ImageView
- android:id="@+id/camera_switcher"
- style="@style/SwitcherButton"
- android:layout_below="@id/shutter_button"
- android:layout_alignParentRight="true"
- android:layout_marginRight="2dip"
- android:contentDescription="@string/accessibility_mode_picker"
- android:scaleType="center"
- android:src="@drawable/ic_switch_camera" />
-
- <ImageView
- android:id="@+id/camera_switcher_ind"
- style="@style/SwitcherButton"
- android:layout_below="@id/shutter_button"
- android:layout_alignParentRight="true"
- android:layout_marginRight="2dip"
- android:contentDescription="@string/accessibility_mode_picker"
- android:scaleType="center"
- android:src="@android:color/transparent" />
-
-</RelativeLayout>
diff --git a/res/layout-port/keyguard_widget.xml b/res/layout-port/keyguard_widget.xml
deleted file mode 100644
index 04816a35d..000000000
--- a/res/layout-port/keyguard_widget.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/camera_controls"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/default_background" >
-
- <ImageView
- android:id="@+id/shutter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:layout_marginBottom="@dimen/shutter_offset"
- android:src="@drawable/btn_new_shutter" />
-
- <include layout="@layout/menu_indicators_keyguard"
- android:layout_width="64dip"
- android:layout_height="64dip"
- android:layout_toRightOf="@id/shutter"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="9dip"
- android:layout_marginRight="-5dip" />
-
- <ImageView
- android:id="@+id/camera_switcher"
- style="@style/SwitcherButton"
- android:layout_toLeftOf="@id/shutter"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="3dip"
- android:scaleType="center"
- android:contentDescription="@string/accessibility_mode_picker"
- android:src="@drawable/ic_switch_camera" />
-
- <ImageView
- android:id="@+id/camera_switcher_ind"
- style="@style/SwitcherButton"
- android:layout_toLeftOf="@id/shutter"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="3dip"
- android:scaleType="center"
- android:contentDescription="@string/accessibility_mode_picker"
- android:src="@android:color/transparent" />
-
-</RelativeLayout>
diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml
index 6be2af985..2d5712b79 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -25,14 +25,6 @@
android:layout_gravity="bottom"
android:clickable="true" />
- <include
- android:layout_width="64dip"
- android:layout_height="64dip"
- android:layout_gravity="bottom|right"
- android:layout_marginBottom="8dip"
- android:layout_marginRight="-8dip"
- layout="@layout/menu_indicators" />
-
<com.android.camera.ui.RotateImageView
android:id="@+id/menu"
style="@style/MenuButton"
diff --git a/res/layout/menu_indicators.xml b/res/layout/menu_indicators.xml
deleted file mode 100644
index 037700349..000000000
--- a/res/layout/menu_indicators.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/on_screen_indicators"
- android:layout_width="64dip"
- android:layout_height="64dip" >
-
- <ImageView
- android:id="@+id/menu_scenemode_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="left|top"
- android:src="@drawable/ic_indicator_sce_off" />
-
- <ImageView
- android:id="@+id/menu_timer_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="center_horizontal|top"
- android:src="@drawable/ic_indicator_timer_off" />
-
- <ImageView
- android:id="@+id/menu_flash_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="right|top"
- android:src="@drawable/ic_indicator_flash_off" />
-
- <ImageView
- android:id="@+id/menu_exposure_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="left|bottom"
- android:src="@drawable/ic_indicator_ev_0" />
-
- <ImageView
- android:id="@+id/menu_location_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="center_horizontal|bottom"
- android:src="@drawable/ic_indicator_loc_on" />
-
- <ImageView
- android:id="@+id/menu_wb_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="right|bottom"
- android:src="@drawable/ic_indicator_wb_off" />
-
-</FrameLayout>
diff --git a/res/layout/menu_indicators_keyguard.xml b/res/layout/menu_indicators_keyguard.xml
deleted file mode 100644
index f3631f67e..000000000
--- a/res/layout/menu_indicators_keyguard.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/on_screen_indicators"
- android:layout_width="64dip"
- android:layout_height="64dip" >
-
- <ImageView
- android:id="@+id/menu_scenemode_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="left|top"
- android:src="@drawable/ic_indicator_sce_off" />
-
- <ImageView
- android:id="@+id/menu_timer_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="center_horizontal|top"
- android:src="@drawable/ic_indicator_timer_off" />
-
- <ImageView
- android:id="@+id/menu_flash_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="right|top"
- android:src="@drawable/ic_indicator_flash_off" />
-
- <ImageView
- android:id="@+id/menu_exposure_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="left|bottom"
- android:src="@drawable/ic_indicator_ev_0" />
-
- <ImageView
- android:id="@+id/menu_location_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="center_horizontal|bottom"
- android:src="@drawable/ic_indicator_loc_on" />
-
- <ImageView
- android:id="@+id/menu_wb_indicator"
- style="@style/MenuIndicator"
- android:layout_gravity="right|bottom"
- android:src="@drawable/ic_indicator_wb_off" />
-
-</FrameLayout>
diff --git a/res/values-large/dimens.xml b/res/values-large/dimens.xml
index d663a9d42..adecc58e7 100644
--- a/res/values-large/dimens.xml
+++ b/res/values-large/dimens.xml
@@ -18,5 +18,4 @@
<dimen name="setting_row_height">@dimen/setting_row_height_large</dimen>
<dimen name="setting_popup_window_width">@dimen/setting_popup_window_width_large</dimen>
<dimen name="setting_item_icon_width">@dimen/setting_item_icon_width_large</dimen>
- <dimen name="onscreen_indicators_height">@dimen/onscreen_indicators_height_large</dimen>
</resources>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 5ec2f19b4..d8e88c47a 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -18,7 +18,6 @@
<dimen name="setting_row_height">@dimen/setting_row_height_large</dimen>
<dimen name="setting_popup_window_width">@dimen/setting_popup_window_width_large</dimen>
<dimen name="setting_item_icon_width">@dimen/setting_item_icon_width_large</dimen>
- <dimen name="onscreen_indicators_height">@dimen/onscreen_indicators_height_large</dimen>
<dimen name="shutter_offset">-33dp</dimen>
<dimen name="capture_size">80dip</dimen>
<dimen name="capture_margin_top">16dip</dimen>
diff --git a/res/values-sw640dp/dimens.xml b/res/values-sw640dp/dimens.xml
index 51b3dad21..8c5272daa 100644
--- a/res/values-sw640dp/dimens.xml
+++ b/res/values-sw640dp/dimens.xml
@@ -35,7 +35,5 @@
<dimen name="effect_setting_clear_text_size">@dimen/effect_setting_clear_text_size_xlarge</dimen>
<dimen name="effect_setting_clear_text_min_height">@dimen/effect_setting_clear_text_min_height_xlarge</dimen>
<dimen name="effect_setting_type_text_left_padding">@dimen/effect_setting_type_text_left_padding_xlarge</dimen>
- <dimen name="onscreen_indicators_height">@dimen/onscreen_indicators_height_xlarge</dimen>
- <dimen name="onscreen_exposure_indicator_text_size">@dimen/onscreen_exposure_indicator_text_size_xlarge</dimen>
</resources>
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
index 51b3dad21..8c5272daa 100644
--- a/res/values-xlarge/dimens.xml
+++ b/res/values-xlarge/dimens.xml
@@ -35,7 +35,5 @@
<dimen name="effect_setting_clear_text_size">@dimen/effect_setting_clear_text_size_xlarge</dimen>
<dimen name="effect_setting_clear_text_min_height">@dimen/effect_setting_clear_text_min_height_xlarge</dimen>
<dimen name="effect_setting_type_text_left_padding">@dimen/effect_setting_type_text_left_padding_xlarge</dimen>
- <dimen name="onscreen_indicators_height">@dimen/onscreen_indicators_height_xlarge</dimen>
- <dimen name="onscreen_exposure_indicator_text_size">@dimen/onscreen_exposure_indicator_text_size_xlarge</dimen>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 86654591d..6a62f6ab9 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -38,8 +38,6 @@
<dimen name="effect_setting_clear_text_size">20dp</dimen>
<dimen name="effect_setting_clear_text_min_height">45dp</dimen>
<dimen name="effect_setting_type_text_left_padding">16dp</dimen>
- <dimen name="onscreen_indicators_height">28dp</dimen>
- <dimen name="onscreen_exposure_indicator_text_size">15dp</dimen>
<dimen name="switch_padding">16dp</dimen>
<dimen name="switch_min_width">96dp</dimen>
<dimen name="switch_text_max_width">44dp</dimen>
@@ -50,7 +48,6 @@
<dimen name="setting_popup_window_width_large">260dp</dimen>
<dimen name="indicator_bar_width_large">72dp</dimen>
<dimen name="setting_item_icon_width_large">48dp</dimen>
- <dimen name="onscreen_indicators_height_large">36dp</dimen>
<dimen name="pano_mosaic_surface_height_xlarge">480dp</dimen>
<dimen name="pano_review_button_width_xlarge">180dp</dimen>
<dimen name="pano_review_button_height_xlarge">115dp</dimen>
@@ -72,8 +69,6 @@
<dimen name="effect_setting_clear_text_size_xlarge">23dp</dimen>
<dimen name="effect_setting_clear_text_min_height_xlarge">44dp</dimen>
<dimen name="effect_setting_type_text_left_padding_xlarge">26dp</dimen>
- <dimen name="onscreen_indicators_height_xlarge">36dp</dimen>
- <dimen name="onscreen_exposure_indicator_text_size_xlarge">18dp</dimen>
<dimen name="pie_progress_radius">25dp</dimen>
<dimen name="pie_progress_width">3dp</dimen>
<dimen name="pie_radius_start">80dp</dimen>
diff --git a/src/com/android/camera/OnScreenIndicators.java b/src/com/android/camera/OnScreenIndicators.java
deleted file mode 100644
index 9d07c49e2..000000000
--- a/src/com/android/camera/OnScreenIndicators.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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.camera;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.hardware.Camera;
-import android.hardware.Camera.Parameters;
-import android.util.Log;
-import android.view.View;
-import android.widget.ImageView;
-
-import org.codeaurora.snapcam.R;
-
-/**
- * The on-screen indicators of the pie menu button. They show the camera
- * settings in the viewfinder.
- */
-public class OnScreenIndicators {
- public static final String SCENE_MODE_HDR_PLUS = "hdr_plus";
-
- private final int[] mWBArray;
- private final View mOnScreenIndicators;
- private final ImageView mExposureIndicator;
- private final ImageView mFlashIndicator;
- private final ImageView mSceneIndicator;
- private final ImageView mLocationIndicator;
- private final ImageView mTimerIndicator;
- private final ImageView mWBIndicator;
-
- public OnScreenIndicators(Context ctx, View onScreenIndicatorsView) {
- TypedArray iconIds = ctx.getResources().obtainTypedArray(
- R.array.camera_wb_indicators);
- final int n = iconIds.length();
- mWBArray = new int[n];
- for (int i = 0; i < n; i++) {
- mWBArray[i] = iconIds.getResourceId(i, R.drawable.ic_indicator_wb_off);
- }
- mOnScreenIndicators = onScreenIndicatorsView;
- mExposureIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_exposure_indicator);
- mFlashIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_flash_indicator);
- mSceneIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_scenemode_indicator);
- mLocationIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_location_indicator);
- mTimerIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_timer_indicator);
- mWBIndicator = (ImageView) onScreenIndicatorsView.findViewById(
- R.id.menu_wb_indicator);
- mExposureIndicator.setVisibility(View.GONE);
- mFlashIndicator.setVisibility(View.GONE);
- mSceneIndicator.setVisibility(View.GONE);
- mLocationIndicator.setVisibility(View.GONE);
- mTimerIndicator.setVisibility(View.GONE);
- mWBIndicator.setVisibility(View.GONE);
- }
-
- /**
- * Resets all indicators to show the default values.
- */
- public void resetToDefault() {
- updateExposureOnScreenIndicator(0);
- updateFlashOnScreenIndicator(Parameters.FLASH_MODE_OFF);
- updateSceneOnScreenIndicator(Parameters.SCENE_MODE_AUTO);
- updateWBIndicator(2);
- updateTimerIndicator(false);
- updateLocationIndicator(false);
- }
-
- /**
- * Sets the exposure indicator using exposure compensations step rounding.
- */
- public void updateExposureOnScreenIndicator(Camera.Parameters params, int value) {
- if (mExposureIndicator == null) {
- return;
- }
- float step = params.getExposureCompensationStep();
- value = Math.round(value * step);
- updateExposureOnScreenIndicator(value);
- }
-
- /**
- * Set the exposure indicator to the given value.
- *
- * @param value Value between -3 and 3. If outside this range, 0 is used by
- * default.
- */
- public void updateExposureOnScreenIndicator(int value) {
- int id = 0;
- switch(value) {
- case -3:
- id = R.drawable.ic_indicator_ev_n3;
- break;
- case -2:
- id = R.drawable.ic_indicator_ev_n2;
- break;
- case -1:
- id = R.drawable.ic_indicator_ev_n1;
- break;
- case 0:
- id = R.drawable.ic_indicator_ev_0;
- break;
- case 1:
- id = R.drawable.ic_indicator_ev_p1;
- break;
- case 2:
- id = R.drawable.ic_indicator_ev_p2;
- break;
- case 3:
- id = R.drawable.ic_indicator_ev_p3;
- break;
- }
- mExposureIndicator.setImageResource(R.drawable.ic_settings);
- }
-
- public void updateWBIndicator(int wbIndex) {
- if (mWBIndicator == null) return;
- mWBIndicator.setImageResource(mWBArray[wbIndex]);
- }
-
- public void updateTimerIndicator(boolean on) {
- if (mTimerIndicator == null) return;
- mTimerIndicator.setImageResource(on ? R.drawable.ic_indicator_timer_on
- : R.drawable.ic_indicator_timer_off);
- }
-
- public void updateLocationIndicator(boolean on) {
- if (mLocationIndicator == null) return;
- mLocationIndicator.setImageResource(on ? R.drawable.ic_indicator_loc_on
- : R.drawable.ic_indicator_loc_off);
- }
-
- /**
- * Set the flash indicator to the given value.
- *
- * @param value One of Parameters.FLASH_MODE_OFF, Parameters.FLASH_MODE_RED_EYE,
- * Parameters.FLASH_MODE_AUTO, Parameters.FLASH_MODE_ON.
- */
- public void updateFlashOnScreenIndicator(String value) {
- if (mFlashIndicator == null) {
- return;
- }
- if (value == null || Parameters.FLASH_MODE_OFF.equals(value)) {
- mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_off);
- } else {
- if (Parameters.FLASH_MODE_AUTO.equals(value)) {
- mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_auto);
- } else if (Parameters.FLASH_MODE_ON.equals(value)
- || Parameters.FLASH_MODE_TORCH.equals(value)) {
- mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_on);
- } else if (Parameters.FLASH_MODE_RED_EYE.equals(value)) {
- mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_redeye);
- } else {
- mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_off);
- }
- }
- }
-
- /**
- * Set the scene indicator depending on the given scene mode.
- *
- * @param value the current Parameters.SCENE_MODE_* value or
- * {@link #SCENE_MODE_HDR_PLUS}.
- */
- public void updateSceneOnScreenIndicator(String value) {
- if (mSceneIndicator == null) {
- return;
- }
-
- if (SCENE_MODE_HDR_PLUS.equals(value)) {
- mSceneIndicator.setImageResource(R.drawable.ic_indicator_hdr_plus_on);
- } else if ((value == null) || Parameters.SCENE_MODE_AUTO.equals(value)) {
- mSceneIndicator.setImageResource(R.drawable.ic_indicator_sce_off);
- } else if (Parameters.SCENE_MODE_HDR.equals(value)) {
- mSceneIndicator.setImageResource(R.drawable.ic_indicator_sce_hdr);
- } else {
- mSceneIndicator.setImageResource(R.drawable.ic_indicator_sce_on);
- }
- }
-
- /**
- * Sets the visibility of all indicators.
- *
- * @param visibility View.VISIBLE, View.GONE etc.
- */
- public void setVisibility(int visibility) {
- mOnScreenIndicators.setVisibility(visibility);
- }
-}
diff --git a/src/com/android/camera/PanoCaptureUI.java b/src/com/android/camera/PanoCaptureUI.java
index a25ff9f94..2894e683c 100644
--- a/src/com/android/camera/PanoCaptureUI.java
+++ b/src/com/android/camera/PanoCaptureUI.java
@@ -80,9 +80,6 @@ public class PanoCaptureUI implements
private ImageView mSceneModeLabelCloseIcon;
private AlertDialog mSceneModeInstructionalDialog = null;
- // Small indicators which show the camera settings in the viewfinder.
- private OnScreenIndicators mOnScreenIndicators;
-
private AutoFitSurfaceView mSurfaceView = null;
private Matrix mMatrix = null;
private boolean mUIhidden = false;
@@ -225,7 +222,6 @@ public class PanoCaptureUI implements
mSceneModeLabelRect.setVisibility(View.GONE);
}
});
- initIndicators();
Point size = new Point();
mActivity.getWindowManager().getDefaultDisplay().getSize(size);
@@ -278,11 +274,6 @@ public class PanoCaptureUI implements
return mRootView;
}
- private void initIndicators() {
- mOnScreenIndicators = new OnScreenIndicators(mActivity,
- mRootView.findViewById(R.id.on_screen_indicators));
- }
-
public void onCameraOpened() {
}
@@ -354,13 +345,6 @@ public class PanoCaptureUI implements
} else {
hideUI();
}
- setShowMenu(previewFocused);
- }
-
- private void setShowMenu(boolean show) {
- if (mOnScreenIndicators != null) {
- mOnScreenIndicators.setVisibility(show ? View.VISIBLE : View.GONE);
- }
}
public boolean collapseCameraControls() {
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 7e91f3066..747cc4114 100755
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -532,8 +532,6 @@ public class PhotoModule
case SET_PHOTO_UI_PARAMS: {
setCameraParametersWhenIdle(UPDATE_PARAM_PREFERENCE);
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
break;
}
@@ -2665,8 +2663,6 @@ public class PhotoModule
}
mUI.initDisplayChangeListener();
keepScreenOnAwhile();
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
UsageStatistics.onContentViewChanged(
UsageStatistics.COMPONENT_CAMERA, "PhotoModule");
@@ -5017,8 +5013,6 @@ public class PhotoModule
* later by posting a message to the handler */
if (mUI.mMenuInitialized) {
setCameraParametersWhenIdle(UPDATE_PARAM_PREFERENCE);
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
mActivity.initPowerShutter(mPreferences);
mActivity.initMaxBrightness(mPreferences);
} else {
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 1022b0709..7c312e155 100755
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -117,9 +117,6 @@ public class PhotoUI implements PieListener,
private MenuHelp mMenuHelp;
private AlertDialog mLocationDialog;
- // Small indicators which show the camera settings in the viewfinder.
- private OnScreenIndicators mOnScreenIndicators;
-
private PieRenderer mPieRenderer;
private ZoomRenderer mZoomRenderer;
private RotateTextToast mNotSelectableToast;
@@ -296,7 +293,6 @@ public class PhotoUI implements PieListener,
mFaceView = (FaceView) mRootView.findViewById(R.id.face_view);
setSurfaceTextureSizeChangedListener(mFaceView);
}
- initIndicators();
mAnimationManager = new AnimationManager();
mOrientationResize = false;
mPrevOrientationResize = false;
@@ -503,11 +499,6 @@ public class PhotoUI implements PieListener,
return mRootView;
}
- private void initIndicators() {
- mOnScreenIndicators = new OnScreenIndicators(mActivity,
- mRootView.findViewById(R.id.on_screen_indicators));
- }
-
public void onCameraOpened(PreferenceGroup prefGroup, ComboPreferences prefs,
Camera.Parameters params, OnPreferenceChangedListener listener, MakeupLevelListener makeupListener) {
if (mPieRenderer == null) {
@@ -540,7 +531,6 @@ public class PhotoUI implements PieListener,
mRenderOverlay.requestLayout();
initializeZoom(params);
- updateOnScreenIndicators(params, prefGroup, prefs);
mActivity.setPreviewGestures(mGestures);
}
@@ -697,29 +687,6 @@ public class PhotoUI implements PieListener,
mMenu.overrideSettings(keyvalues);
}
- public void updateOnScreenIndicators(Camera.Parameters params,
- PreferenceGroup group, ComboPreferences prefs) {
- if (params == null || group == null) return;
- mOnScreenIndicators.updateSceneOnScreenIndicator(params.getSceneMode());
- mOnScreenIndicators.updateExposureOnScreenIndicator(params,
- CameraSettings.readExposure(prefs));
- mOnScreenIndicators.updateFlashOnScreenIndicator(params.getFlashMode());
- int wbIndex = -1;
- String wb = Camera.Parameters.WHITE_BALANCE_AUTO;
- if (Camera.Parameters.SCENE_MODE_AUTO.equals(params.getSceneMode())) {
- wb = params.getWhiteBalance();
- }
- ListPreference pref = group.findPreference(CameraSettings.KEY_WHITE_BALANCE);
- if (pref != null) {
- wbIndex = pref.findIndexOfValue(wb);
- }
- // make sure the correct value was found
- // otherwise use auto index
- mOnScreenIndicators.updateWBIndicator(wbIndex < 0 ? 2 : wbIndex);
- boolean location = RecordLocationPreference.get(prefs, CameraSettings.KEY_RECORD_LOCATION);
- mOnScreenIndicators.updateLocationIndicator(location);
- }
-
public void setCameraState(int state) {
}
@@ -784,7 +751,6 @@ public class PhotoUI implements PieListener,
if (mPieRenderer != null) {
mPieRenderer.setBlockFocus(!previewFocused);
}
- setShowMenu(previewFocused);
if (!previewFocused && mCountDownView != null) mCountDownView.cancelCountDown();
}
@@ -971,12 +937,6 @@ public class PhotoUI implements PieListener,
}
}
- private void setShowMenu(boolean show) {
- if (mOnScreenIndicators != null) {
- mOnScreenIndicators.setVisibility(show ? View.VISIBLE : View.GONE);
- }
- }
-
public boolean collapseCameraControls() {
// TODO: Mode switcher should behave like a popup and should hide itself when there
// is a touch outside of it.
@@ -999,7 +959,6 @@ public class PhotoUI implements PieListener,
mCameraControls.hideCameraSettings();
mDecodeTaskForReview = new DecodeImageForReview(jpegData, orientation, mirror);
mDecodeTaskForReview.execute();
- mOnScreenIndicators.setVisibility(View.GONE);
mMenuButton.setVisibility(View.GONE);
CameraUtil.fadeIn(mReviewDoneButton);
mShutterButton.setVisibility(View.INVISIBLE);
@@ -1015,7 +974,6 @@ public class PhotoUI implements PieListener,
mDecodeTaskForReview.cancel(true);
}
mReviewImage.setVisibility(View.GONE);
- mOnScreenIndicators.setVisibility(View.VISIBLE);
mMenuButton.setVisibility(View.VISIBLE);
if (mMenu != null) {
mMenu.hideTopMenu(false);
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 02246d229..a7efae0e7 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -3001,9 +3001,6 @@ public class VideoModule implements CameraModule,
// Keep preview size up to date.
mParameters = mCameraDevice.getParameters();
- // Update UI based on the new parameters.
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
-
mFocusManager.setPreviewSize(videoWidth, videoHeight);
}
@@ -3079,7 +3076,6 @@ public class VideoModule implements CameraModule,
setCameraParameters(false);
}
mRestartPreview = false;
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
Storage.setSaveSDCard(
mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, "0").equals("1"));
mActivity.updateStorageSpaceAndHint();
@@ -3135,7 +3131,6 @@ public class VideoModule implements CameraModule,
// Start switch camera animation. Post a message because
// onFrameAvailable from the old camera may already exist.
mHandler.sendEmptyMessage(SWITCH_CAMERA_START_ANIMATION);
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
//Display timelapse msg depending upon selection in front/back camera.
mUI.showTimeLapseUI(mCaptureTimeLapse);
@@ -3218,7 +3213,6 @@ public class VideoModule implements CameraModule,
}
forceFlashOffIfSupported(forceOff);
mCameraDevice.setParameters(mCameraDevice.getParameters());
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
}
@Override
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 4bd38bbbe..5e74ab940 100755
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -97,7 +97,6 @@ public class VideoUI implements PieRenderer.PieListener,
private ZoomRenderer mZoomRenderer;
private PreviewGestures mGestures;
private View mMenuButton;
- private OnScreenIndicators mOnScreenIndicators;
private RotateLayout mRecordingTimeRect;
private boolean mRecordingStarted = false;
private VideoController mController;
@@ -340,9 +339,6 @@ public class VideoUI implements PieRenderer.PieListener,
});
mCameraControls = (CameraControls) mRootView.findViewById(R.id.camera_controls);
- mOnScreenIndicators = new OnScreenIndicators(mActivity,
- mRootView.findViewById(R.id.on_screen_indicators));
- mOnScreenIndicators.resetToDefault();
if (mController.isVideoCaptureIntent()) {
hideSwitcher();
mActivity.getLayoutInflater().inflate(R.layout.review_module_control,
@@ -728,15 +724,6 @@ public class VideoUI implements PieRenderer.PieListener,
mPauseButton.setOnPauseButtonListener(this);
}
- public void updateOnScreenIndicators(Parameters param, ComboPreferences prefs) {
- mOnScreenIndicators.updateExposureOnScreenIndicator(param,
- CameraSettings.readExposure(prefs));
- mOnScreenIndicators.updateFlashOnScreenIndicator(param.getFlashMode());
- boolean location = RecordLocationPreference.get(prefs, CameraSettings.KEY_RECORD_LOCATION);
- mOnScreenIndicators.updateLocationIndicator(location);
-
- }
-
public void setAspectRatio(double ratio) {
if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
@@ -991,7 +978,6 @@ public class VideoUI implements PieRenderer.PieListener,
public void showRecordingUI(boolean recording) {
mRecordingStarted = recording;
mMenuButton.setVisibility(recording ? View.GONE : View.VISIBLE);
- mOnScreenIndicators.setVisibility(recording ? View.GONE : View.VISIBLE);
if (recording) {
mShutterButton.setImageResource(R.drawable.shutter_button_video_stop);
hideSwitcher();
@@ -1031,7 +1017,6 @@ public class VideoUI implements PieRenderer.PieListener,
mMenuButton.setVisibility(View.GONE);
mCameraControls.hideUI();
mVideoMenu.hideUI();
- mOnScreenIndicators.setVisibility(View.GONE);
}
public void hideReviewUI() {
@@ -1040,20 +1025,11 @@ public class VideoUI implements PieRenderer.PieListener,
mMenuButton.setVisibility(View.VISIBLE);
mCameraControls.showUI();
mVideoMenu.showUI();
- mOnScreenIndicators.setVisibility(View.VISIBLE);
CameraUtil.fadeOut(mReviewDoneButton);
CameraUtil.fadeOut(mReviewPlayButton);
CameraUtil.fadeIn(mShutterButton);
}
- private void setShowMenu(boolean show) {
- if (mController.isVideoCaptureIntent())
- return;
- if (mOnScreenIndicators != null) {
- mOnScreenIndicators.setVisibility(show ? View.VISIBLE : View.GONE);
- }
- }
-
public void onPreviewFocusChanged(boolean previewFocused) {
if (previewFocused) {
showUI();
@@ -1067,7 +1043,6 @@ public class VideoUI implements PieRenderer.PieListener,
// this can not happen in capture mode
mRenderOverlay.setVisibility(previewFocused ? View.VISIBLE : View.GONE);
}
- setShowMenu(previewFocused);
}
public void initializePopup(PreferenceGroup pref) {
diff --git a/src/com/android/camera/WideAnglePanoramaUI.java b/src/com/android/camera/WideAnglePanoramaUI.java
index 46cf173bb..f2c6e2bb7 100644
--- a/src/com/android/camera/WideAnglePanoramaUI.java
+++ b/src/com/android/camera/WideAnglePanoramaUI.java
@@ -469,9 +469,8 @@ public class WideAnglePanoramaUI implements
mShutterButton = (ShutterButton) mRootView.findViewById(R.id.shutter_button);
mShutterButton.setImageResource(R.drawable.btn_new_shutter);
mShutterButton.setOnShutterButtonListener(this);
- // Hide menu and indicators.
+ // Hide menu
mRootView.findViewById(R.id.menu).setVisibility(View.GONE);
- mRootView.findViewById(R.id.on_screen_indicators).setVisibility(View.GONE);
mReview.setBackgroundColor(mReviewBackground);
// TODO: set display change listener properly.
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index 7461e12be..b8e4f35ec 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -59,7 +59,6 @@ public class CameraControls extends RotatableLayout {
private View mFrontBackSwitcher;
private View mHdrSwitcher;
private View mTsMakeupSwitcher;
- private View mIndicators;
private View mPreview;
private View mSceneModeSwitcher;
private View mFilterModeSwitcher;
@@ -135,7 +134,6 @@ public class CameraControls extends RotatableLayout {
mMenu.setVisibility(View.INVISIBLE);
mMute.setVisibility(View.INVISIBLE);
mExitPanorama.setVisibility(View.INVISIBLE);
- mIndicators.setVisibility(View.INVISIBLE);
mPreview.setVisibility(View.INVISIBLE);
isAnimating = false;
enableTouch(true);
@@ -160,7 +158,6 @@ public class CameraControls extends RotatableLayout {
mMenu.setVisibility(View.INVISIBLE);
mMute.setVisibility(View.INVISIBLE);
mExitPanorama.setVisibility(View.INVISIBLE);
- mIndicators.setVisibility(View.INVISIBLE);
mPreview.setVisibility(View.INVISIBLE);
isAnimating = false;
enableTouch(true);
@@ -276,8 +273,6 @@ public class CameraControls extends RotatableLayout {
mViewList.add(mMute);
if (mExitPanorama.getVisibility() == View.VISIBLE)
mViewList.add(mExitPanorama);
- if (mIndicators.getVisibility() == View.VISIBLE)
- mViewList.add(mIndicators);
}
public void removeFromViewList(View view) {
@@ -303,7 +298,6 @@ public class CameraControls extends RotatableLayout {
mMute = findViewById(R.id.mute_button);
mExitPanorama = findViewById(R.id.exit_panorama);
mExitPanorama.setVisibility(View.GONE);
- mIndicators = findViewById(R.id.on_screen_indicators);
mPreview = findViewById(R.id.preview_thumb);
mSceneModeSwitcher = findViewById(R.id.scene_mode_switcher);
mFilterModeSwitcher = findViewById(R.id.filter_mode_switcher);
@@ -384,7 +378,6 @@ public class CameraControls extends RotatableLayout {
toIndex(mMenu, w, h, rotation, 4, 0, MENU_INDEX);
toIndex(mMute, w, h, rotation, 3, 0, MUTE_INDEX);
toIndex(mExitPanorama, w, h, rotation, 0, 0, EXIT_PANORAMA_INDEX);
- toIndex(mIndicators, w, h, rotation, 0, 6, INDICATOR_INDEX);
toIndex(mFrontBackSwitcher, w, h, rotation, 2, 0, FRONT_BACK_INDEX);
toIndex(mPreview, w, h, rotation, 0, 6, PREVIEW_INDEX);
if(TsMakeupManager.HAS_TS_MAKEUP) {
@@ -498,7 +491,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.setX(mLocX[idx1][SWITCHER_INDEX] - x);
mShutter.setX(mLocX[idx1][SHUTTER_INDEX] - x);
mVideoShutter.setX(mLocX[idx1][VIDEO_SHUTTER_INDEX] - x);
- mIndicators.setX(mLocX[idx1][INDICATOR_INDEX] - x);
mPreview.setX(mLocX[idx1][PREVIEW_INDEX] - x);
mFrontBackSwitcher.setY(mLocY[idx1][FRONT_BACK_INDEX] + y);
@@ -515,7 +507,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.setY(mLocY[idx1][SWITCHER_INDEX] - y);
mShutter.setY(mLocY[idx1][SHUTTER_INDEX] - y);
mVideoShutter.setY(mLocY[idx1][VIDEO_SHUTTER_INDEX] - y);
- mIndicators.setY(mLocY[idx1][INDICATOR_INDEX] - y);
mPreview.setY(mLocY[idx1][PREVIEW_INDEX] - y);
}
@@ -550,7 +541,6 @@ public class CameraControls extends RotatableLayout {
mMenu.animate().cancel();
mMute.animate().cancel();
mExitPanorama.animate().cancel();
- mIndicators.animate().cancel();
mPreview.animate().cancel();
mFrontBackSwitcher.animate().setListener(outlistener);
((ModuleSwitcher) mSwitcher).removePopup();
@@ -573,7 +563,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
break;
case 90:
@@ -592,7 +581,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
break;
case 180:
@@ -611,7 +599,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
break;
case 270:
@@ -630,7 +617,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
break;
}
@@ -657,7 +643,6 @@ public class CameraControls extends RotatableLayout {
mMenu.animate().cancel();
mMute.animate().cancel();
mExitPanorama.animate().cancel();
- mIndicators.animate().cancel();
mPreview.animate().cancel();
if (mViewList != null)
for (View v : mViewList) {
@@ -669,7 +654,6 @@ public class CameraControls extends RotatableLayout {
shutterAnim.stop();
mMenu.setVisibility(View.VISIBLE);
- mIndicators.setVisibility(View.VISIBLE);
mPreview.setVisibility(View.VISIBLE);
mFrontBackSwitcher.animate().setListener(inlistener);
@@ -692,7 +676,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationYBy(-mSize).setDuration(ANIME_DURATION);
break;
case 90:
@@ -713,7 +696,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
break;
case 180:
@@ -734,7 +716,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationYBy(mSize).setDuration(ANIME_DURATION);
break;
case 270:
@@ -755,7 +736,6 @@ public class CameraControls extends RotatableLayout {
mSwitcher.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mShutter.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mVideoShutter.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
- mIndicators.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
mPreview.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
break;
}