summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2015-12-22 17:49:23 -0800
committerCamera Software Integration <camswint@localhost>2015-12-30 13:52:27 +0530
commit07c4fba97f4a480295f413668a8c8fdca1f77b15 (patch)
tree4f8b5088a0cb43a8830e13f2333c34d8b5da0159 /src/com/android/camera
parent25a11b3497fb81be44e7ad30d672e4bbe9f79a12 (diff)
downloadandroid_packages_apps_Snap-07c4fba97f4a480295f413668a8c8fdca1f77b15.tar.gz
android_packages_apps_Snap-07c4fba97f4a480295f413668a8c8fdca1f77b15.tar.bz2
android_packages_apps_Snap-07c4fba97f4a480295f413668a8c8fdca1f77b15.zip
Revert "SnapdragonCamera: Set navigation bar according to flag"
This reverts commit 8fce47a5fb0277b3763b94a1fd23ea499d35e4b1. Change-Id: I955f7ad42df89d30b39b8c7c26473ceac69a9c9d
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/CameraActivity.java22
-rw-r--r--src/com/android/camera/PhotoUI.java4
-rw-r--r--src/com/android/camera/VideoUI.java4
3 files changed, 12 insertions, 18 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 437549592..118a2677a 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -223,7 +223,8 @@ public class CameraActivity extends Activity
private LocalMediaObserver mLocalImagesObserver;
private LocalMediaObserver mLocalVideosObserver;
- private final int DEFAULT_SYSTEM_UI_VISIBILITY = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ private final int DEFAULT_SYSTEM_UI_VISIBILITY = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
private boolean mPendingDeletion = false;
@@ -639,19 +640,12 @@ public class CameraActivity extends Activity
View decorView = getWindow().getDecorView();
int currentSystemUIVisibility = decorView.getSystemUiVisibility();
- boolean hidePreview = getResources().getBoolean(R.bool.hide_navigation_bar);
-
- int systemUIVisibility = DEFAULT_SYSTEM_UI_VISIBILITY;
- if (hidePreview)
- systemUIVisibility |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-
- int systemUINotVisible = View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN;
- if (hidePreview)
- systemUINotVisible |= (View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
- | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
-
- int newSystemUIVisibility = systemUIVisibility
- | (visible ? View.SYSTEM_UI_FLAG_VISIBLE : systemUINotVisible);
+ int newSystemUIVisibility = DEFAULT_SYSTEM_UI_VISIBILITY
+ | (visible ? View.SYSTEM_UI_FLAG_VISIBLE :
+ View.SYSTEM_UI_FLAG_LOW_PROFILE
+ | View.SYSTEM_UI_FLAG_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
if (newSystemUIVisibility != currentSystemUIVisibility) {
decorView.setSystemUiVisibility(newSystemUIVisibility);
}
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 1c09913b9..6e321c535 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -397,14 +397,14 @@ public class PhotoUI implements PieListener,
if (width > height) {
if(Math.max(width, height * mAspectRatio) > width) {
scaledTextureWidth = width;
- scaledTextureHeight = height;
+ scaledTextureHeight = width / mAspectRatio;
} else {
scaledTextureWidth = height * mAspectRatio;
scaledTextureHeight = height;
}
} else {
if(Math.max(height, width * mAspectRatio) > height) {
- scaledTextureWidth = width;
+ scaledTextureWidth = height / mAspectRatio;
scaledTextureHeight = height;
} else {
scaledTextureWidth = width;
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index b5e7cc3df..df110118e 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -407,14 +407,14 @@ public class VideoUI implements PieRenderer.PieListener,
if (width > height) {
if(Math.max(width, height * mAspectRatio) > width) {
scaledTextureWidth = width;
- scaledTextureHeight = height;
+ scaledTextureHeight = width / mAspectRatio;
} else {
scaledTextureWidth = height * mAspectRatio;
scaledTextureHeight = height;
}
} else {
if(Math.max(height, width * mAspectRatio) > height) {
- scaledTextureWidth = width;
+ scaledTextureWidth = height / mAspectRatio;
scaledTextureHeight = height;
} else {
scaledTextureWidth = width;