summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-01-15 08:59:20 +0100
committerSteve Kondik <steve@cyngn.com>2016-11-17 23:54:30 -0800
commit1041bf671160d85995cf1950aba5d2187a414569 (patch)
tree3494f23fb5a04f3ae290e67e3ddf6db99d247f75
parent40b496ae42500990ab486c7bd055ce5e69bcba2e (diff)
downloadandroid_packages_apps_Snap-1041bf671160d85995cf1950aba5d2187a414569.tar.gz
android_packages_apps_Snap-1041bf671160d85995cf1950aba5d2187a414569.tar.bz2
android_packages_apps_Snap-1041bf671160d85995cf1950aba5d2187a414569.zip
Remove unused menu indicators code.
Change-Id: I0ce48da277a532b46fdde15027f636de4d7585b7
-rw-r--r--AndroidManifest.xml11
-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--src/com/android/camera/OnScreenIndicators.java205
-rw-r--r--src/com/android/camera/PhotoModule.java6
-rw-r--r--src/com/android/camera/PhotoUI.java43
-rw-r--r--src/com/android/camera/VideoModule.java3
-rw-r--r--src/com/android/camera/VideoUI.java32
-rw-r--r--src/com/android/camera/WideAnglePanoramaUI.java3
12 files changed, 2 insertions, 546 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c3970cd1d..7d117c34d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -51,12 +51,7 @@
android:screenOrientation="portrait"
android:taskAffinity="com.android.camera.CameraActivity"
android:theme="@style/Theme.Camera"
- android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
-
- <meta-data
- android:name="com.android.keyguard.layout"
- android:resource="@layout/keyguard_widget" />
- </activity>
+ android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity
android:name="com.android.camera.PermissionsActivity"
@@ -138,10 +133,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 2269a60d4..99a7133b5 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -121,14 +121,6 @@
android:contentDescription="@string/accessibility_mode_picker" />
</LinearLayout>
- <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" />
-
<LinearLayout
android:id="@+id/remaining_photos"
android:layout_width="wrap_content"
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/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/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 14e358b88..ed7ad8da2 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -522,8 +522,6 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
case SET_PHOTO_UI_PARAMS: {
setCameraParametersWhenIdle(UPDATE_PARAM_PREFERENCE);
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
break;
}
@@ -2595,8 +2593,6 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
}
mUI.initDisplayChangeListener();
keepScreenOnAwhile();
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
UsageStatistics.onContentViewChanged(
UsageStatistics.COMPONENT_CAMERA, "PhotoModule");
@@ -4807,8 +4803,6 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
* 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 96dda6f8a..b81578f6a 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -106,9 +106,6 @@ public class PhotoUI extends BaseUI 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;
@@ -447,11 +444,6 @@ public class PhotoUI extends BaseUI 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) {
@@ -484,7 +476,6 @@ public class PhotoUI extends BaseUI implements PieListener,
mRenderOverlay.requestLayout();
initializeZoom(params);
- updateOnScreenIndicators(params, prefGroup, prefs);
mActivity.setPreviewGestures(mGestures);
}
@@ -573,8 +564,6 @@ public class PhotoUI extends BaseUI implements PieListener,
// called from onResume but only the first time
public void initializeFirstTime() {
- initIndicators();
-
// Initialize shutter button.
mShutterButton.setImageResource(R.drawable.btn_new_shutter);
mShutterButton.setOnClickListener(new OnClickListener() {
@@ -628,29 +617,6 @@ public class PhotoUI extends BaseUI implements PieListener,
mMenu.overrideSettings(keyvalues);
}
- public void updateOnScreenIndicators(Camera.Parameters params,
- PreferenceGroup group, ComboPreferences prefs) {
- if (params == null || group == null || mOnScreenIndicators == 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);
- mOnScreenIndicators.updateLocationIndicator(location);
- }
-
public void setAutoHdrEnabled(boolean enabled) {
mCameraControls.setAutoHdrEnabled(enabled);
}
@@ -717,7 +683,6 @@ public class PhotoUI extends BaseUI implements PieListener,
if (mPieRenderer != null) {
mPieRenderer.setBlockFocus(!previewFocused);
}
- //setShowMenu(previewFocused);
if (!previewFocused && mCountDownView != null) mCountDownView.cancelCountDown();
}
@@ -905,12 +870,6 @@ public class PhotoUI extends BaseUI 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.
@@ -933,7 +892,6 @@ public class PhotoUI extends BaseUI implements PieListener,
mCameraControls.hideCameraSettings();
mDecodeTaskForReview = new DecodeImageForReview(jpegData, orientation, mirror);
mDecodeTaskForReview.execute();
- mOnScreenIndicators.setVisibility(View.GONE);
CameraUtil.fadeIn(mReviewDoneButton);
mShutterButton.setVisibility(View.INVISIBLE);
CameraUtil.fadeIn(mReviewRetakeButton);
@@ -945,7 +903,6 @@ public class PhotoUI extends BaseUI implements PieListener,
mDecodeTaskForReview.cancel(true);
}
mReviewImage.setVisibility(View.GONE);
- mOnScreenIndicators.setVisibility(View.VISIBLE);
CameraUtil.fadeOut(mReviewDoneButton);
mShutterButton.setVisibility(View.VISIBLE);
CameraUtil.fadeOut(mReviewRetakeButton);
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index b528a7625..91b154da6 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -468,7 +468,6 @@ public class VideoModule extends BaseModule<VideoUI> implements
case SET_VIDEO_UI_PARAMS: {
setCameraParameters(UPDATE_PARAM_PREFERENCE);
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
break;
}
@@ -1267,7 +1266,6 @@ public class VideoModule extends BaseModule<VideoUI> implements
mUI.initDisplayChangeListener();
keepScreenOnAwhile();
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
mUI.setSwitcherIndex();
UsageStatistics.onContentViewChanged(
@@ -3148,7 +3146,6 @@ public class VideoModule extends BaseModule<VideoUI> implements
forceFlashOffIfSupported(forceOff);
mCameraDevice.setParameters(mParameters);
}
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
}
@Override
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index f2b725e85..89d32884c 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -85,7 +85,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
private ZoomRenderer mZoomRenderer;
private PreviewGestures mGestures;
private View mMenuButton;
- private OnScreenIndicators mOnScreenIndicators;
private boolean mRecordingStarted = false;
private VideoController mController;
private int mZoomMax;
@@ -497,11 +496,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
mSurfaceView.setVisibility(View.VISIBLE);
}
- 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) {
if (mPieRenderer == null) {
@@ -558,8 +552,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
// called from onResume but only the first time
public void initializeFirstTime() {
- initIndicators();
-
// Initialize shutter button.
mShutterButton.setImageResource(R.drawable.btn_new_shutter_video);
mShutterButton.addOnShutterButtonListener(mController);
@@ -574,18 +566,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
mShutterButton.enableTouch(true);
}
- public void updateOnScreenIndicators(Parameters param, ComboPreferences prefs) {
- if (param == null) {
- return;
- }
- mOnScreenIndicators.updateExposureOnScreenIndicator(param,
- CameraSettings.readExposure(prefs));
- mOnScreenIndicators.updateFlashOnScreenIndicator(param.getFlashMode());
- boolean location = RecordLocationPreference.get(prefs);
- mOnScreenIndicators.updateLocationIndicator(location);
-
- }
-
public void setAspectRatio(double ratio) {
if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
@@ -831,7 +811,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
public void showRecordingUI(boolean recording) {
mRecordingStarted = recording;
- mOnScreenIndicators.setVisibility(recording ? View.GONE : View.VISIBLE);
if (recording) {
mShutterButton.setImageResource(R.drawable.shutter_button_video_stop);
hideSwitcher();
@@ -863,27 +842,17 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
CameraUtil.fadeIn(mReviewPlayButton);
mReviewImage.setVisibility(View.VISIBLE);
mCameraControls.hideCameraSettings();
- mOnScreenIndicators.setVisibility(View.GONE);
}
public void hideReviewUI() {
mReviewImage.setVisibility(View.GONE);
mShutterButton.setEnabled(true);
mCameraControls.hideCameraSettings();
- 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) {
super.onPreviewFocusChanged(previewFocused);
@@ -894,7 +863,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
// this can not happen in capture mode
mRenderOverlay.setVisibility(previewFocused ? View.VISIBLE : View.GONE);
}
- setShowMenu(previewFocused);
}
public void initializeZoom(Parameters param) {
diff --git a/src/com/android/camera/WideAnglePanoramaUI.java b/src/com/android/camera/WideAnglePanoramaUI.java
index 547836850..19dd01b5b 100644
--- a/src/com/android/camera/WideAnglePanoramaUI.java
+++ b/src/com/android/camera/WideAnglePanoramaUI.java
@@ -412,9 +412,8 @@ public class WideAnglePanoramaUI extends BaseUI implements
mShutterButton = (ShutterButton) mRootView.findViewById(R.id.shutter_button);
mShutterButton.setImageResource(R.drawable.btn_new_shutter);
mShutterButton.addOnShutterButtonListener(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.