summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/FilmStripView.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-09-29 16:29:29 -0700
committerSteve Kondik <steve@cyngn.com>2016-11-09 00:33:10 -0800
commit5a82864e7cf42d3bd04bb167ebfa52d3e5deb1f6 (patch)
tree8c14729de11f59b21b8bc9237f84236b8f0ed41f /src/com/android/camera/ui/FilmStripView.java
parentf549631a977d44b3cf378cf51de108ab022c7315 (diff)
downloadandroid_packages_apps_Snap-5a82864e7cf42d3bd04bb167ebfa52d3e5deb1f6.tar.gz
android_packages_apps_Snap-5a82864e7cf42d3bd04bb167ebfa52d3e5deb1f6.tar.bz2
android_packages_apps_Snap-5a82864e7cf42d3bd04bb167ebfa52d3e5deb1f6.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/ui/FilmStripView.java')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index 3ac0bf6d9..47f480e57 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -281,10 +281,11 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
*
* @param activity The {@link Activity} context to create the view.
* @param dataID The ID of the image data to be presented.
+ * @param inFullScreen if the filmstrip is in fullscreen
* @return The view representing the image data. Null if unavailable or
* the {@code dataID} is out of range.
*/
- public View getView(Activity activity, int dataID);
+ public View getView(Activity activity, int dataID, boolean inFullScreen);
/**
* Returns the {@link ImageData} specified by the ID.
@@ -923,7 +924,7 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
return null;
}
data.prepare();
- View v = mDataAdapter.getView(mActivity, dataID);
+ View v = mDataAdapter.getView(mActivity, dataID, inFullScreen());
if (v == null) {
return null;
}