summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2017-03-26 12:13:09 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2017-04-04 16:23:16 +0000
commit65aa6fdd3684ddd6821a0f82a3c488899ca6f278 (patch)
treee588203419822bb8db851d2e06f15f5f5de40979 /src
parent9e8d9195a2ca900e15cc6eadc7a2864306b2b75c (diff)
downloadandroid_packages_apps_Snap-65aa6fdd3684ddd6821a0f82a3c488899ca6f278.tar.gz
android_packages_apps_Snap-65aa6fdd3684ddd6821a0f82a3c488899ca6f278.tar.bz2
android_packages_apps_Snap-65aa6fdd3684ddd6821a0f82a3c488899ca6f278.zip
Always apply frame size reduction to panorama pictures
Panorama mode requires quite some memory, especially after the frame num bump done with commit aa0733567c30 ("Make panorama able to go 270 degrees in landscape"). Some devices run out of memory while taking a panorama picture and force close Snap before the picture is complete. We have a config to reduce the memory requirements that reduces the size of each frame, but it's applied only if ro.config.low_ram is true. Bump the default value to 100 and always respect it. Devices having ro.config.low_ram set to true will have to override this config from their device tree. BUGBASH-326 Change-Id: Ic6d24b17b2293adf8d715904c8c1874a4c624e99
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index e7c95c015..eda0f70ff 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -16,7 +16,6 @@
package com.android.camera;
-import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -908,12 +907,7 @@ public class WideAnglePanoramaModule extends BaseModule<WideAnglePanoramaUI> imp
return;
}
- int perct = 100;
- final ActivityManager am = (ActivityManager)
- mActivity.getSystemService(Context.ACTIVITY_SERVICE);
- if (am.isLowRamDevice()) {
- perct = mActivity.getResources().getInteger(R.integer.panorama_frame_size_reduction);
- }
+ int perct = mActivity.getResources().getInteger(R.integer.panorama_frame_size_reduction);
int width = (mCameraPreviewWidth * perct) / 100;
int height = (mCameraPreviewHeight * perct) / 100;