summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/data/InProgressDataWrapper.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-09-29 16:29:29 -0700
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 22:00:39 +0200
commitc3d5c2c58485fc0789af0e178dd11b881df0f63c (patch)
treec2c989daf1d82ca64f61ecadc60b5ab7b5a095b4 /src/com/android/camera/data/InProgressDataWrapper.java
parentd6162483d308b8d796d8fcec975437376c3bb868 (diff)
downloadandroid_packages_apps_Snap-c3d5c2c58485fc0789af0e178dd11b881df0f63c.tar.gz
android_packages_apps_Snap-c3d5c2c58485fc0789af0e178dd11b881df0f63c.tar.bz2
android_packages_apps_Snap-c3d5c2c58485fc0789af0e178dd11b881df0f63c.zip
CameraNext: Use Glide for async bitmap loading
This is what Camera2 code uses. Addresses SAMBAR-766 CameraNext: Fix rotation not updated The thumbnail generated by Glide is not updated when user rotate the image manually. This is because exif is rewrite using nio mmap, however there is no nio unmap available in java. Even though the file channel is closed, the rotation modification is still in buffer, when Glide tries to dtermine the orientation of the image, it still reads the old data. Use force to ensure data is sync to disk and buffer flushed. HAM-1389 Fix memory leaks Two leaks were occuring. One was an unused Parameters in AndroidCameraManagerImpl that was holding onto excess PhotoModules. The second was Glide images for video previews that were never being cleared on recycle. issue-id: CYNGNOS-2731 CameraNext: don't call Glide to load image after Camera exits There is a race condition where the filmstrip can still be trying to load a new image just as the camera exit, and Glide gets upset if it is handed a destroyed activity context to work with. So just check for that condition and go home. Change-Id: I9e76ab40d23213c7a74c26779e345207d5fd7bae Ticket-Id: CRACKLING-1068
Diffstat (limited to 'src/com/android/camera/data/InProgressDataWrapper.java')
-rw-r--r--src/com/android/camera/data/InProgressDataWrapper.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/camera/data/InProgressDataWrapper.java b/src/com/android/camera/data/InProgressDataWrapper.java
index 9ce968e2f..f212b6929 100644
--- a/src/com/android/camera/data/InProgressDataWrapper.java
+++ b/src/com/android/camera/data/InProgressDataWrapper.java
@@ -50,8 +50,9 @@ public class InProgressDataWrapper implements LocalData {
@Override
public View getView(
Activity a, int width, int height,
- Drawable placeHolder, LocalDataAdapter adapter) {
- View v = mLocalData.getView(a, width, height, placeHolder, adapter);
+ int placeHolderResourceId, LocalDataAdapter adapter, boolean inFullScreen) {
+ View v = mLocalData.getView(a, width, height, placeHolderResourceId,
+ adapter, inFullScreen);
if (mHasProgressBar) {
// Return a framelayout with the progressbar and imageview.