summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-01-15 08:59:20 +0100
committerDanny Baumann <dannybaumann@web.de>2016-01-20 23:31:18 -0800
commit42f6d5c06c5db74c6971e37dbb78bf41d2783e07 (patch)
treeea7305846f10d3ddfee87d19d6700a3de65d7bab
parent4faa77d616d3637e628816da0d24bb0ea3432cd2 (diff)
downloadandroid_packages_apps_Snap-42f6d5c06c5db74c6971e37dbb78bf41d2783e07.zip
android_packages_apps_Snap-42f6d5c06c5db74c6971e37dbb78bf41d2783e07.tar.gz
android_packages_apps_Snap-42f6d5c06c5db74c6971e37dbb78bf41d2783e07.tar.bz2
Remove unused menu indicators code.
Change-Id: I0ce48da277a532b46fdde15027f636de4d7585b7
-rw-r--r--AndroidManifest.xml8
-rw-r--r--res/layout-land/keyguard_widget.xml63
-rw-r--r--res/layout-port/camera_controls.xml8
-rw-r--r--res/layout-port/keyguard_widget.xml60
-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.java7
-rw-r--r--src/com/android/camera/VideoUI.java26
-rw-r--r--src/com/android/camera/WideAnglePanoramaUI.java3
-rw-r--r--src/com/android/camera/ui/CameraControls.java6
13 files changed, 2 insertions, 547 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9bbcaf6..d32caeb 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -75,10 +75,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-alias
@@ -130,10 +126,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 3156900..0000000
--- 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/camera_controls.xml b/res/layout-port/camera_controls.xml
index 525ffc3..d979147 100644
--- a/res/layout-port/camera_controls.xml
+++ b/res/layout-port/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/filter_mode_switcher"
style="@style/ToggleButton" />
diff --git a/res/layout-port/keyguard_widget.xml b/res/layout-port/keyguard_widget.xml
deleted file mode 100644
index 04816a3..0000000
--- 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/menu_indicators.xml b/res/layout/menu_indicators.xml
deleted file mode 100644
index 0377003..0000000
--- 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 f3631f6..0000000
--- 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 9d07c49..0000000
--- 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 077436b..30956c4 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -456,8 +456,6 @@ public class PhotoModule
case SET_PHOTO_UI_PARAMS: {
setCameraParametersWhenIdle(UPDATE_PARAM_PREFERENCE);
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
break;
}
@@ -2309,8 +2307,6 @@ public class PhotoModule
}
mUI.initDisplayChangeListener();
keepScreenOnAwhile();
- mUI.updateOnScreenIndicators(mParameters, mPreferenceGroup,
- mPreferences);
UsageStatistics.onContentViewChanged(
UsageStatistics.COMPONENT_CAMERA, "PhotoModule");
@@ -4264,8 +4260,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 6529051..d5ddaf0 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -110,9 +110,6 @@ public class PhotoUI implements PieListener,
private CameraControls mCameraControls;
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;
@@ -293,7 +290,6 @@ public class PhotoUI implements PieListener,
setSurfaceTextureSizeChangedListener(mFaceView);
}
mFocusRing = (FocusRing) mRootView.findViewById(R.id.focus_ring);
- initIndicators();
mAnimationManager = new AnimationManager();
mOrientationResize = false;
mPrevOrientationResize = false;
@@ -470,11 +466,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) {
if (mPieRenderer == null) {
@@ -507,7 +498,6 @@ public class PhotoUI implements PieListener,
mRenderOverlay.requestLayout();
initializeZoom(params);
- updateOnScreenIndicators(params, prefGroup, prefs);
mActivity.setPreviewGestures(mGestures);
}
@@ -696,30 +686,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, mActivity.getContentResolver());
- mOnScreenIndicators.updateLocationIndicator(location);
- }
-
public void setCameraState(int state) {
}
@@ -784,7 +750,6 @@ public class PhotoUI implements PieListener,
if (mPieRenderer != null) {
mPieRenderer.setBlockFocus(!previewFocused);
}
- setShowMenu(previewFocused);
if (!previewFocused && mCountDownView != null) mCountDownView.cancelCountDown();
}
@@ -964,12 +929,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.
@@ -992,7 +951,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);
@@ -1005,7 +963,6 @@ public class PhotoUI implements PieListener,
mDecodeTaskForReview.cancel(true);
}
mReviewImage.setVisibility(View.GONE);
- mOnScreenIndicators.setVisibility(View.VISIBLE);
mMenuButton.setVisibility(View.VISIBLE);
CameraUtil.fadeOut(mReviewDoneButton);
mShutterButton.setVisibility(View.VISIBLE);
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 6b882ae..fd7bff6 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -321,7 +321,6 @@ public class VideoModule implements CameraModule,
private int mVideoEncoder;
private int mAudioEncoder;
- private boolean mRestartPreview = false;
private int videoWidth;
private int videoHeight;
boolean mUnsupportedResolution = false;
@@ -2625,9 +2624,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);
}
@@ -2685,7 +2681,6 @@ public class VideoModule implements CameraModule,
} else {
setCameraParameters();
}
- mUI.updateOnScreenIndicators(mParameters, mPreferences);
Storage.setSaveSDCard(
mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, "0").equals("1"));
mActivity.updateStorageSpaceAndHint();
@@ -2739,7 +2734,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);
@@ -2820,7 +2814,6 @@ public class VideoModule implements CameraModule,
}
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 a193fa8..d5255cc 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -90,7 +90,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;
@@ -281,9 +280,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,
@@ -639,16 +635,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, mActivity.getContentResolver());
- mOnScreenIndicators.updateLocationIndicator(location);
-
- }
-
public void setAspectRatio(double ratio) {
if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
@@ -896,7 +882,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();
@@ -934,27 +919,17 @@ public class VideoUI implements PieRenderer.PieListener,
CameraUtil.fadeIn(mReviewPlayButton);
mReviewImage.setVisibility(View.VISIBLE);
mMenuButton.setVisibility(View.GONE);
- mOnScreenIndicators.setVisibility(View.GONE);
}
public void hideReviewUI() {
mReviewImage.setVisibility(View.GONE);
mShutterButton.setEnabled(true);
mMenuButton.setVisibility(View.VISIBLE);
- 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();
@@ -968,7 +943,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 d811b95..3c55add 100644
--- a/src/com/android/camera/WideAnglePanoramaUI.java
+++ b/src/com/android/camera/WideAnglePanoramaUI.java
@@ -451,9 +451,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 c0fbf13..f444918 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -52,7 +52,6 @@ public class CameraControls extends RotatableLayout {
private View mMenu;
private View mFrontBackSwitcher;
private View mHdrSwitcher;
- private View mIndicators;
private View mPreview;
private View mSceneModeSwitcher;
private View mFilterModeSwitcher;
@@ -190,7 +189,6 @@ public class CameraControls extends RotatableLayout {
mFrontBackSwitcher = findViewById(R.id.front_back_switcher);
mHdrSwitcher = findViewById(R.id.hdr_switcher);
mMenu = findViewById(R.id.menu);
- 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);
@@ -202,7 +200,7 @@ public class CameraControls extends RotatableLayout {
mFrontBackSwitcher, mMenu
};
mBottomViews = new View[] {
- mIndicators, mPreview, mShutter, mSwitcher
+ mPreview, mShutter, mSwitcher
};
mAllViews = new View[mTopViews.length + mBottomViews.length];
for (int i = 0; i < mTopViews.length; i++) {
@@ -273,7 +271,6 @@ public class CameraControls extends RotatableLayout {
}
toRight(mSwitcher, expandedShutter, rotation);
- toLeft(mIndicators, expandedShutter, rotation);
toLeft(mPreview, expandedShutter, rotation);
layoutToast(mRefocusToast, w, h, rotation);
@@ -451,7 +448,6 @@ public class CameraControls extends RotatableLayout {
shutterAnim.stop();
mMenu.setVisibility(View.VISIBLE);
- mIndicators.setVisibility(View.VISIBLE);
mPreview.setVisibility(View.VISIBLE);
mFrontBackSwitcher.animate().setListener(inlistener);