History log of /packages/apps/Camera/src/com/android/camera/Util.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd4b5bd53fe9cbf3cdccfbba94f2bc12250eb187 24-Oct-2012 Iliyan Malchev <malchev@google.com> Revert "Use photo picture size for video snapshot"

This reverts commit 8a91b608b73eac4677eba27db621b48ce2e66849

We need to reinstate the aspect-ratio matching code in the camera app to
resolve an underlying hardware limitation where the snapshot pipeline must have
the same aspect ratio as the preview/encoder pipeline. A matching CL will go
into the HAL.

Bug: 7372274
Change-Id: I6daa104a4524a7af3721049d03313416fed60f83
Signed-off-by: Iliyan Malchev <malchev@google.com>
/packages/apps/Camera/src/com/android/camera/Util.java
8a91b608b73eac4677eba27db621b48ce2e66849 19-Oct-2012 Michael Kolb <kolby@google.com> Use photo picture size for video snapshot

Bug: 7331463

Change-Id: I21bcb4bb700b79b2d32e37b666b924e0eae3c0fd
/packages/apps/Camera/src/com/android/camera/Util.java
ad30bda0d0103bd8a93eb834c234341b1ab1e77f 28-Sep-2012 Wu-cheng Li <wuchengli@google.com> Put HDR as a separate setting in the overflow settings dialog.

bug:7222328
Change-Id: I7851f627caca01e2c31cb7b8bfb2bb08e51586a5
/packages/apps/Camera/src/com/android/camera/Util.java
9713c56dfe1c298ab0c2c75d324dc69395d1c809 18-Sep-2012 Michael Kolb <kolby@google.com> Enable full screen preview

Bug: 7191461

Overscale preview texture to fill screen
Minor problem with face detection indicators
will be fixed later.
Change-Id: I5a93048564d69fe05f5a7aa7d6506dec8517e8ea
/packages/apps/Camera/src/com/android/camera/Util.java
39a796b1c7e5bb579d139dda89029d656cc135f8 29-Aug-2012 Wu-cheng Li <wuchengli@google.com> Change HDR to a scene mode.

bug:7054776

Change-Id: I6c4c3c020e82b5c2a7102568de7adaff2a8e1982
/packages/apps/Camera/src/com/android/camera/Util.java
9a0e6f63064c7dc00f3b8b469f3263333d3f5e16 25-Aug-2012 Wu-cheng Li <wuchengli@google.com> Add camera HDR setting UI.

bug:7054776
Change-Id: Id62c1a031c1d95e09da2a8703b017532ca4d7a80
/packages/apps/Camera/src/com/android/camera/Util.java
c347dd2cccb6cbad8caa8404eae1c0ae17204156 09-Aug-2012 Ahbong Chang <cwahbong@google.com> Do not use API in level 11.

Util:
Copy the implementation of AlertDialog.Builder.setIconAttribute()
in the framework.

EffectSettingPopup:
Effect recording is only used in honeycomb and above, so we can simply
add TargetApi for method reloadPreference().

FaceView:
It is only used when face detection is supported, so we can simply add
TargetApi for the class.

InLineSettingXXX:
Move the implementation of onPopulateAccessibilityEvent() into
dispatchPopulateAccessibilityEvent().

Bug: 6927726
Change-Id: I06205914f246b31e37a0c5c549c4cae8d5b11303
/packages/apps/Camera/src/com/android/camera/Util.java
df90c922da29c6c4fa2de721e3cff19461c51715 26-Jul-2012 Ahbong Chang <cwahbong@google.com> Do not use getMaxNumFocusArea and getMaxNumMeteringArea.

Bug: 6912171
Change-Id: Ied12f241da9287b398e33a6b841a761441bf3b1e
/packages/apps/Camera/src/com/android/camera/Util.java
f2229614847f060be34593757ca402ae62c7cc7d 11-Jul-2012 Ahbong Chang <cwahbong@google.com> Do not use ICS camera API in old platforms.

For the following methods, use Camera.Parameters.get() instead:
Camera.setFaceDetectionListener()
Camera.Parameters.isVideoSnapshorSupported()
Camera.Parameters.isAutoExposureLockSupported()
Camera.Parameters.isAutoWhiteBalanceLockSupported()

For the following method, uses Camera.Parameters.set() instead:
Camera.Parameters.setRecordingHint()

Call the following methods only when they exist:
Camera.startFaceDetection()
Camera.stopFaceDetection()
Camera.Parameters.getMaxNumDetectedFaces()

For Camera.Parameters.FOCUS_MODE_CONTINIOUS_PICTURE, use
Util.FOCUS_MODE_CONTINIOUS_PICTURE instead.

Bug: 6707152
Change-Id: I72a97e9c9bcc585692278492397fb4a04ff59555
/packages/apps/Camera/src/com/android/camera/Util.java
4c8e827c20e7c93f94880c42456715191c55d8d0 09-Jul-2012 Hung-ying Tyan <tyanh@google.com> Do not call DevicePolicyManager.getCameraDisabled() if it's not available

Bug: 6706695
Change-Id: I433ab790830c8d4031664ae66394af1dfa5aeec9
/packages/apps/Camera/src/com/android/camera/Util.java
7f0753739e843926a240c001c80ef7fa2f6a8296 28-Jun-2012 Owen Lin <owenlin@google.com> Don't use Build.VERSION_CODES.XXX

Since they won't be avaiable on old platforms.

bug: 6752318
Change-Id: Ia4996a123b1e002d40976d624335b8fc1a7d8186
/packages/apps/Camera/src/com/android/camera/Util.java
a38cf0d7773414a653b6aa19d4d9f25a1d8c5461 29-Jun-2012 Owen Lin <owenlin@google.com> Merge "Don't use Display.getSize() before HC_MR2."
4a12eec56ad1c5a7e89168b205363a3ced7e26b6 27-Jun-2012 Owen Lin <owenlin@google.com> Don't use Display.getSize() before HC_MR2.

bug:6752651

Change-Id: I23354b01bb4117321de6b4a64bc2412ea35492d8
/packages/apps/Camera/src/com/android/camera/Util.java
f75f0f05491560f3be90a1cee05c1ecc90227d42 26-Jun-2012 Wu-cheng Li <wuchengli@google.com> Hardcode constants for new picture/video broadcasts.

bug:6706690
Change-Id: I55d5ba3348aa5d6ec745d503b5ad6df2382153e2
/packages/apps/Camera/src/com/android/camera/Util.java
476cfec16c6388b59ba8fbe9846551174b383523 18-May-2012 Chih-Chung Chang <chihchung@google.com> Move lights-out mode handling to Gallery.

Bug: 6451200

Change-Id: Ib821e36dc75997471a9c3b5233cc30022c15851b
/packages/apps/Camera/src/com/android/camera/Util.java
0cd5c5c2734f01b7fd9f1a2624bbbdcbea33b1ce 17-May-2012 Pin Ting <pinting@google.com> Fix ClassCastException when using timelapse recording on Nakasi.

Bug:6507471
Change-Id: I7a3d2a233bba79b5aac4e2109e342d8b8de77389
/packages/apps/Camera/src/com/android/camera/Util.java
71bf9ebe0f207c1af741e3b76d84dde1358faa1b 24-Apr-2012 Wu-cheng Li <wuchengli@google.com> Fix the crash when tapping thumbnail in panorama.

Swipe UI is not working in panorama yet. Send the intent
when the thumbnail is tapped in panorama.

bug:6313320

Change-Id: I6ab0dc0745b02350a5c87c0d9c8650791b1b19e7
/packages/apps/Camera/src/com/android/camera/Util.java
dbf0c4f2fbf366f764f421f70605205440c07fa2 24-Apr-2012 Chih-Chung Chang <chihchung@google.com> Disable camera activities if there is no back camera.

Bug: 6313793

Change-Id: I713407efe783fd90cc26cb4a14f30a21f8ed77cc
/packages/apps/Camera/src/com/android/camera/Util.java
b130b9af898f597eb7506dd2f29f0961b858176d 19-Apr-2012 Wu-cheng Li <wuchengli@google.com> Fix incorrect width and height written to database.

The width and height of the actual jpeg may be opposite
to the width and height from Parameters.getPictureSize.
getRotation and exif orientation should be considered.

bug:6364158

Change-Id: I87769815a91093d8842c6e18ed7b2db9ff29b46b
/packages/apps/Camera/src/com/android/camera/Util.java
7a54ffad3be4bd94365a1c70b719e41b573cc7fd 18-Apr-2012 Pin Ting <pinting@google.com> Remove unused classes and rename variable.

Change-Id: I4b49dc97818bc461223c9d32056ea37a4a1a4d83
/packages/apps/Camera/src/com/android/camera/Util.java
bfaab736a344641a63170ebdcd9d5377779d3a15 17-Apr-2012 Wu-cheng Li <wuchengli@google.com> Fix touch focus.

Use PhotoPage listener to get the touch event.

bug:6313318

Change-Id: Ib36dfd4fa11779faca59604fb145344d5af9df30
/packages/apps/Camera/src/com/android/camera/Util.java
8a79ddc5827de54a33d8fbef0e467da2266342cb 09-Apr-2012 Wu-cheng Li <wuchengli@google.com> Make aspect ratio of preview and picture the same.

- Move the preview to the center of the preview frame layout.

bug:6294992
bug:5954389

Change-Id: I47e4b81dd9f3c207025256e1f4e7b23d5f5d84dd
/packages/apps/Camera/src/com/android/camera/Util.java
a6b966047b6215b02c502a3f143106070abf6009 23-Mar-2012 Angus Kong <shkong@google.com> Use galley camera preview to support swipe UI.

Users can swipe to see the last captured picture/video and
the camera roll.

Known issues:
- Capture animation is disabled.
- Effect recording viewfinder is black.
- Swipe to gallery does not work in panorama yet.
- Swipe only works in one direction.
- Touch focus is disabled.
- Some widgets like priority indicators are not positioned correctly.
- Aspect ratio of preview and postview may not match.

bug:5954389

Change-Id: I5ea0459bead36169cd73dfa25717da7353f9d181
/packages/apps/Camera/src/com/android/camera/Util.java
aaf129e4b755e4eef9eaa0fd736a9bbd20904fc8 27-Mar-2012 Pin Ting <pinting@google.com> Fix NPE in OutputStream.write().

Users could click fading-out buttons before the fade-out animation
ends, which could crash Camera app.

This changelist blocks user click by disabling the button before fade-out
animation starts.

bug:6049267
Change-Id: Ic43710611ddf5c21717a115942a2279f10b4d52a
/packages/apps/Camera/src/com/android/camera/Util.java
475b4c6eca6f7e7ca0e4b3ee0ee234c6fe079687 21-Mar-2012 Pin Ting <pinting@google.com> Move camera operations to background thread.

- This CL moves camera operations off the main thread.
- To keep changes clear, this CL doesn't accelerate operations.
Using async call and condition variable to keep the original
synchronous call structure.
- This design keeps the CameraHolder testability.
- Merge CameraDevice into CameraManager.
- Will explore parallelism and possibly merge CameraHolder and CameraManager in follow-up CLs.

bug:5954391
Change-Id: I4d2ad6d3c70cc221e6a6f90f81b6b7a564102ac1
/packages/apps/Camera/src/com/android/camera/Util.java
b59f282910deca258ca4381c6f4b6970a2838bed 05-Mar-2012 Angus Kong <shkong@google.com> Use TextureView for preview in camcorder.

TextureView supports animations better than SurfaceView.

bug:5988937
Change-Id: I38222a8c426ce2b6024dcb022d88a3891b786b24
/packages/apps/Camera/src/com/android/camera/Util.java
a1f6eec7b587064b5677160668345f5610073b51 21-Mar-2012 akahuang <akahuang@google.com> Add fade in animation at mode picker.

bug:6144758
Change-Id: I9152d09a9ff7afbc00bc320f8b408a5e305435cc
/packages/apps/Camera/src/com/android/camera/Util.java
4d226d16bb06861527e5ec162e39d9673e23df83 22-Feb-2012 akahuang <akahuang@google.com> Fix lint warnings.

Fix warning: ObsoleteLayoutParam, FloatMath, IconDuplicatesConfig, UselessParent.

bug:6047024
Change-Id: Id33a00e497acb276cd1cec8076f77e2fd4a0876e
/packages/apps/Camera/src/com/android/camera/Util.java
043ad7e3404cdf74afc01076551c84d70a0a01d3 23-Feb-2012 Wu-cheng Li <wuchengli@google.com> Fix Eclipse warnings.

Change-Id: I49c57424a74dd683115d91347c18b6bb0946ee06
/packages/apps/Camera/src/com/android/camera/Util.java
913f3784d368a5e11fee5d5db2c355ef832685da 03-Feb-2012 Wu-cheng Li <wuchengli@google.com> Fix warnings and remove unused code.

Change-Id: I1039edbc5a9990d44f5a629a18066805f370775e
/packages/apps/Camera/src/com/android/camera/Util.java
e4d834211d8cf33dbaffe88aad7857fb251f95c8 04-Jan-2012 Wu-cheng Li <wuchengli@google.com> Merge "Add a test to check camera fails to connect."
19c0b7882d14679bc0fe5d25c4e1ea34350d0b8d 22-Nov-2011 Wu-cheng Li <wuchengli@google.com> Add a test to check camera fails to connect.

+ Add CameraDevice interface.
+ Add MockCamera and RealCamera classes.

bug:5656411

Change-Id: I0cba855a4ac1a68b8e4aa2a56d1e58c6f1def459
/packages/apps/Camera/src/com/android/camera/Util.java
38e7f88993ece55252165940c471a031f87df55a 03-Jan-2012 Wu-cheng Li <wuchengli@google.com> Remove brightness change to be consisten with other apps.

It is strange to see brightness change going to or from the
gallery.

bug:5800702

Change-Id: I44215782ca127b1cc538c303401d32dfdcadb95c
/packages/apps/Camera/src/com/android/camera/Util.java
71e88239cee734b1153839ba9d744a244c0be602 22-Dec-2011 Wu-cheng Li <wuchengli@google.com> Revert "Track users behaviour in Camera app."

This reverts commit 862dc9ba03a2619fcbf8713103317ca5207e409a.
/packages/apps/Camera/src/com/android/camera/Util.java
862dc9ba03a2619fcbf8713103317ca5207e409a 15-Dec-2011 Chih-yu Huang <akahuang@google.com> Track users behaviour in Camera app.

At the first time, a confirmation dialog would appear.
In Camera:
Track settings when capturing photos and usage of share popup.
In Video:
Track setting about video effect, time lapse, and video quality.
In Panorama:
Track saving picture or discard, length of picture.

bug:4293199
Change-Id: Ie1d289bc2e2c7520db1ccdf4e07b7f55554cfb85
/packages/apps/Camera/src/com/android/camera/Util.java
e0bbb93f6a598206ecd6e09150d51eae64bd3507 12-Nov-2011 Wei-Ta Chen <weita@google.com> Set the orientation of a panorama image.

The panorama image returned from the panorama library is oriented based
on the natural orientation of the camera.
We set an orientation in its EXIF header, so that the image can be
displayed correctly. The orientation is calculated by compensating the
device orientation and the camera orientation respective to the natural
orientation of the device.

Bug: 5603313
Change-Id: Id6907cb08a7ff77e44736f3c3cd1503e7a68d783
/packages/apps/Camera/src/com/android/camera/Util.java
3300723ee68dfb28871fcf30864d2f73946ab660 04-Nov-2011 Chih-Chung Chang <chihchung@google.com> am 93b9c8ac: Merge "5554028: Select video snapshot resolution based on the video recording aspect ratio." into ics-mr0

* commit '93b9c8aca92b2a6a651c562c71b8c414458c1419':
5554028: Select video snapshot resolution based on the video recording aspect ratio.
1d965984ecf6c6233967a1f5d5a24f21fd2e450d 02-Nov-2011 Chih-Chung Chang <chihchung@google.com> 5554028: Select video snapshot resolution based on the video recording aspect ratio.

Change-Id: I7b01a21271068b9d201e38197e2a61b183f87902
/packages/apps/Camera/src/com/android/camera/Util.java
4c7b291018e08dbb4bc1712d95117a294fa1416c 26-Oct-2011 Wu-cheng Li <wuchengli@google.com> Make PreviewFrameLayout and ControlPanelLayout work in potrait mode.

+ Move tablet resource to sw600dp and sw800dp

bug:5446617

Change-Id: Iaf2a442e621ed071d7639972a529dd263e3ce628
/packages/apps/Camera/src/com/android/camera/Util.java
048edf2ef22607b85bc4b062e2af71804f5b3530 21-Oct-2011 Chih-yu Huang <akahuang@google.com> Fix focus area in front camera.

Front camera preview is mirrored. Change to use matrix to
calculate the focus area. So the focus area will be
correct in all orientations in front or back camera.

bug:5446617
bug:5461028
Change-Id: I2d39a22cd9f034c5028843ca3d4abe0f9962f18a
/packages/apps/Camera/src/com/android/camera/Util.java
131cf9886c4f34431598be0b1f5b7aaa915277cc 18-Oct-2011 Eino-Ville Talvala <etalvala@google.com> Add hysteresis to orientation rounding.

This prevents fast flickering between two orientation states, which
can result in ugly UI issues, especially with the preview thumbnail.

Bug: 5477483
Change-Id: I9513547207ae1918066c1a19947c974eaad72e24
/packages/apps/Camera/src/com/android/camera/Util.java
ee740f1254232cbe5b8dd34c0c957866c03e7787 11-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5429468: Append _1, _2, etc to the file name in the same second.

Change-Id: I68ca915eee4e343fa1b90fef068fecb9c919aa53
/packages/apps/Camera/src/com/android/camera/Util.java
b416f542580970aeac320219b80137b1e9f8d4cd 26-Sep-2011 Mike Dodd <mdodd@google.com> Fix display of preview thumbnail after recording video.

The first was that the code was trying to rotate the video thumbnail
retrieved from MetadataRetriever back by just reversing whatever
rotation we set as a playback hint when we started recording. But
this isn't actually correct -- the bitmap we get back from MetadataRetriever
is going to be oriented correctly for display if the device is oriented
in the locked UI orientation (landscape), and we need to rotate it
to compensate for what the actual device orientation is relative to
that.

Phrased another way, we were taking into account the camera and
device orientation, but not the UI orientation. This just happened
to work on some devices because of their camera orientations, but not all.

bug:5360349

Change-Id: I8b481907c211328726ecd91fa054b9e9a4798601
/packages/apps/Camera/src/com/android/camera/Util.java
5be37a20b9086be505ebd424a4b92967800038c8 19-Sep-2011 Wei-Ta Chen <weita@google.com> Merge "Adjust the screen brightness in the panorama mode." into ics-factoryrom
a959d05b52ac4b27dcdfe3d3a4e72220cf69d47a 17-Sep-2011 Wei-Ta Chen <weita@google.com> Adjust the screen brightness in the panorama mode.

Adjust the screen brightness in the case of automatic brightness.
Make the screen brightness in the panorama mode consistent with that in
the Camera mode and VideoCamera mode.

Change-Id: I1600bcabcdf0d5f3840a347cce10c329d2db100b
/packages/apps/Camera/src/com/android/camera/Util.java
30f0481931beed547656f2c7bc6290ecc9b01ac3 08-Sep-2011 Chih-yu Huang <akahuang@google.com> Change image of review control buttons.

bug:5244256
Change-Id: Idf02f40edb7e2e15edb4fc1ac86a4694d9147661
/packages/apps/Camera/src/com/android/camera/Util.java
e0861e7473d042bdd9c935f3bdf50ae220891b6c 08-Sep-2011 Wu-cheng Li <wuchengli@google.com> Enter lights out mode.

bug:5158325
Change-Id: I7c14397d6b6d9fe72e92bf0ea260322d64c87b98
/packages/apps/Camera/src/com/android/camera/Util.java
a93a4d60eacee4e12471b45f8691c14114e113a4 07-Sep-2011 Wu-cheng Li <wuchengli@google.com> Set rotation and gps in video snapshot.

bug:5187868

Change-Id: I1092e3d37dba78073b42aa9107e7cc326d67decc
/packages/apps/Camera/src/com/android/camera/Util.java
ea136afa2f4d38428ad486df5fb0a24db8314a3d 30-Aug-2011 Chih-yu Huang <akahuang@google.com> Move review control out of preview.

bug:5141555
Change-Id: I04e4ca0d0e1a40ccfe39e5276fda66ffd02ae1b5
/packages/apps/Camera/src/com/android/camera/Util.java
757b67951f40850b1ac3102dc0b6fe8977615a4a 31-Aug-2011 Wu-cheng Li <wuchengli@google.com> Add video snapshot.

Touch on the viewfinder will take a picture during recording.

Things not implemented:
- Add EXIF GPS.
- The last thumbnail can be a jpeg in camcorder mode.
- Call setRotation.
- Highlight preview border during video snapshot.

bug:5187868

Change-Id: I59a22aa00424355584611f095af752b83c0ee2f0
/packages/apps/Camera/src/com/android/camera/Util.java
22d4b7fbace56c03092eb088a4df98e04a6681af 31-Aug-2011 Angus Kong <shkong@google.com> Fix NPE 5238952 when generating panorama fails.

1. Handle the situation of failing to generate the panorama.
2. The string id "details_ok" is changed to "dialog_ok" and used now in the "Ok" button of all the
dialogs.

bug:5238952
Change-Id: I847255a46667960e604892ad55a642358c4eab02
/packages/apps/Camera/src/com/android/camera/Util.java
7058a9318dd5d6d5a1e79a84080cdc02975f68c1 12-Aug-2011 Wu-cheng Li <wuchengli@google.com> Remove zoom ratio text label.

Change-Id: Ia4d54034b0b2c039e874b1fa580b036962f4cd33
/packages/apps/Camera/src/com/android/camera/Util.java
d2db70880e6159413932f747eb82df3e925852c1 11-Aug-2011 Wu-cheng Li <wuchengli@google.com> Use matrix to transform the location of faces.

bug:5141019

Change-Id: Id4bb82cee5fd788689fb18bb199504d963c5d3a2
/packages/apps/Camera/src/com/android/camera/Util.java
16ca94d73bfe07f280e381595709b56c2681b2bc 08-Aug-2011 Wu-cheng Li <wuchengli@google.com> Use new background and shutter button.

bug:5024054

Change-Id: I2def331433b0db66efc0d38f1e9537c0980441bb
/packages/apps/Camera/src/com/android/camera/Util.java
4b602592e0d189499b22d107d997b83e798b5bd9 03-Aug-2011 Wu-cheng Li <wuchengli@google.com> Add face detection UI.

bug:4460717
Change-Id: Id09cc012efffcee0f5af3a070b5dcb775a7048a0
/packages/apps/Camera/src/com/android/camera/Util.java
bed7386688cd7810cba23732ab71f370fe3222ff 20-Jul-2011 Chung-yih Wang <cywang@google.com> Merge the indicator bar implementations.

bug:5039235

Originally we have the GLView-implemented indicators for Phone-based UI.
Based on the current UI design, we would like to merge the look on all
devices for the dialog of the camera setting. Therefore, a refactor of
how to handle the popup window is required here and this will simplify our
UI work for handling different layout/resolution.

Change-Id: I6f9e6ebed7600be460ddd906505cdc44f81098ad
/packages/apps/Camera/src/com/android/camera/Util.java
4a045a8e858706f56a6ffb5187960768f861f007 31-May-2011 Wu-cheng Li <wuchengli@google.com> Add camcorder zoom.

bug:2644213

Change-Id: I669966e4fd54c76d19660efa6f1700a86b4d6c07
/packages/apps/Camera/src/com/android/camera/Util.java
dfb6f208e3f5dd7d68bcaade644aa1d1f1f0a98f 30-May-2011 Wu-cheng Li <wuchengli@google.com> Check if device policay manager has disabled camera.

Show the corresponding message if that is the case.

bug:4185309

Change-Id: I0f4a5ac577f13331685f8e7343bab6317f96c3d8
/packages/apps/Camera/src/com/android/camera/Util.java
8ab2b624d51b3b8254ece98c46a7e22a6fb5d4aa 13-May-2011 Wu-cheng Li <wuchengli@google.com> Refactor RotateImageView and thumbnail.

Change-Id: Ic435b7cd97ba775ec8f4b8342a1d4d25e2a5120c
/packages/apps/Camera/src/com/android/camera/Util.java
9e1fcfe35695fd1e71d6c86f28075ca356e5bad5 15-May-2011 Wu-cheng Li <wuchengli@google.com> Remove dead code and reduce visibility.

Change-Id: Icec126d3d83f3b158d284dd63dfed8452ffa2249
/packages/apps/Camera/src/com/android/camera/Util.java
97d089d718dc92c0e9ccc3c923066cf4f0101c35 27-Apr-2011 Wu-cheng Li <wuchengli@google.com> Do not trigger touch focus when popup window is dismissed.

Also use getLocationInWindow instead of getLocationOnScreen.

bug:3475893
Change-Id: I6e5917cf7340a7968fd07c13bf91e3c555d0cf87
/packages/apps/Camera/src/com/android/camera/Util.java
feaf2ccff42c44b74be814b66296f9ddedcc9aa9 27-Apr-2011 Wu-cheng Li <wuchengli@google.com> Reduce the size of focus rectangle.

Now the length of focus rectangle is 1/4 of the height of
preview frame.

bug:3475893
Change-Id: Ib1f09d5dbb25bb20343b39116c12febe08d83051
/packages/apps/Camera/src/com/android/camera/Util.java
855b4ca04f982c7110acd81b509c955df976926f 25-Jan-2011 Wu-cheng Li <wuchengli@google.com> Fix camera preview orientation when device is held in portrait.

The problem is the rotation animation may still in progress during
onCreate. When we start the preview in onCreate, the display rotation
is still the value in portrait. So we check the display rotation
again in surfaceChanged. If it is different, restart the preview.

bug:3362860

Change-Id: Ib930c18d089114a3b5b9ca0f599e1ebdace73eb7
/packages/apps/Camera/src/com/android/camera/Util.java
db0757dc9c627e7c5206104664028e386ade7d03 18-Jan-2011 Wu-cheng Li <wuchengli@google.com> Change AlertDialog.setIcon to setIconAttribute.

Use setIconAttribute to tell the framework you want the icon that works
with the theme you have set on your alert dialog.

Change-Id: Ie6e39f5c311f419c18d833323696363fa494aae9
/packages/apps/Camera/src/com/android/camera/Util.java
bbe9db4d12978f220aeb0379731b548420bbd6db 17-Dec-2010 Yu Shan Emily Lau <yslau@google.com> Removed the flaky memory checking.
Added the image caputre and video recording stress test for the front facing camera.

Change-Id: Ice3abf35791e1953f70ef25375409fd5efe870b3
/packages/apps/Camera/src/com/android/camera/Util.java
6bca5289166b1444f4b98538343a24d35f46dda5 20-Dec-2010 Chia-chi Yeh <chiachi@android.com> Cleanup: Make Util get rid of IImage.

Change-Id: I1628bcae4daa4768186f08df0d328f7c5a5380df
/packages/apps/Camera/src/com/android/camera/Util.java
5f039073a239fc8ebf94238c3dce24dc1cce865b 20-Dec-2010 Chia-chi Yeh <chiachi@android.com> Cleanup: Remove MenuHelper.closeSilently().

Change-Id: I449a10104615c402dbd36d615e845185063a9660
/packages/apps/Camera/src/com/android/camera/Util.java
0fad45d0d64569098f4daf34ff7e5ae785601304 17-Dec-2010 Wu-cheng Li <wuchengli@google.com> Choose the preview size that has the same aspect ratio as picture size.

Sometimes the camera driver has many preview sizes with close aspect
ratios. Now camera app only chooses the preview size if its aspect
ratio is an exact match of the picture size or video size.

Change-Id: I3be1189688de3ac499f7d69f4febf09c7763393a
/packages/apps/Camera/src/com/android/camera/Util.java
10208b3b4e2e9ca5af27be49356288531e3cd45b 10-Dec-2010 Wu-cheng Li <wuchengli@google.com> Remove mms quality if the device does not support voice.

bug:3272846
Change-Id: Ic573e790d323e93c9976e9985308890031d26a0b
/packages/apps/Camera/src/com/android/camera/Util.java
10fb15e4b1a8cd4acae1a745ada98cf9fac5a809 10-Dec-2010 Wu-cheng Li <wuchengli@google.com> Add dumpParameters for debugging when necessary.

Change-Id: Ie21b93ddb02647df512ee0088e77c522902028f3
/packages/apps/Camera/src/com/android/camera/Util.java
9cfab4bc18b8d9d905263c687e19c06df885dca7 09-Nov-2010 Wu-cheng Li <wuchengli@google.com> Rotate the postview to correct orientation in video attach mode.

Manual merge from gingerbread.
bug:3208306
Change-Id: Ib7fb0a960c862527324adefd419e74224f59bc30
/packages/apps/Camera/src/com/android/camera/Util.java
9a2b75b19b46ad5a66edf9a1c97f8da281c3dfdc 19-Oct-2010 Jean-Baptiste Queru <jbq@google.com> Merge 559a4151 from gingerbread-plus-aosp

Change-Id: I8ec4aa5210cb5104bedb7d5ed6f823f44517b203
c1dd72054122befb49aa1ca11ffa589b00186f80 18-Oct-2010 Wu-cheng Li <wuchengli@google.com> Fix wrong usage of setRotation and setOrientation.

bug:3105659
Change-Id: Ie2c1559cc03ece66705c1d766bea0e736f2684bc
/packages/apps/Camera/src/com/android/camera/Util.java
1efb18228a45952d699af280482e1c51a4582690 29-Sep-2010 Owen Lin <owenlin@google.com> Change review action domain to com.android.camera.

Change-Id: I21b3ef1494296671472acf3619688739861f2cff
/packages/apps/Camera/src/com/android/camera/Util.java
2b2cbfb78e3e184b55041926c7bc7bdc18cb5934 16-Sep-2010 Wu-cheng Li <wuchengli@google.com> am c97d2382: Update the code due to API change.

Merge commit 'c97d23826a28dd725951eccb62651244f9fb8228'

* commit 'c97d23826a28dd725951eccb62651244f9fb8228':
Update the code due to API change.
da395f80c71733e46736927f84e731066346f95e 16-Sep-2010 Wu-cheng Li <wuchengli@google.com> am 50ab7fd1: Merge "Fix the wrong rotation on naturally landscape devices." into gingerbread

Merge commit '50ab7fd18e8a631237f7546cd25af974e3e30dcb'

* commit '50ab7fd18e8a631237f7546cd25af974e3e30dcb':
Fix the wrong rotation on naturally landscape devices.
c97d23826a28dd725951eccb62651244f9fb8228 15-Sep-2010 Wu-cheng Li <wuchengli@google.com> Update the code due to API change.

bug:3001395
bug:3001399
Change-Id: Ie1347ed28aa72a3ec637867dc2226c60ef2dbd6c
/packages/apps/Camera/src/com/android/camera/Util.java
4aaa2130af7241f128ee561cafd17a4fb560b92c 10-Sep-2010 Wu-cheng Li <wuchengli@google.com> Fix the wrong rotation on naturally landscape devices.

The orientation of on-screen icons and thumbnails are
wrong on devices that are naturally landscape in their
orientation. Display.getRotation should be used to
compensate.

Parameters.setRotation should also be compensated by
camera's orientation.

Change-Id: Ia0684fcd606252c49fa2d701ab07c73f7e29b70b
/packages/apps/Camera/src/com/android/camera/Util.java
6227fa641518492a6b660c78463da18d9ec8fcd8 06-Aug-2010 Nipun Kwatra <nkwatra@google.com> Added support for time lapse video capture.

Changes in individual files:

VideoCamera.java:
- Added swith to time lapse option in Menu.
- initializeHeadUpDisplay(): sets up display according to the
current mode (timelapse/no timelapse).
- readTimeLapseVideoPreferences(): sets parameters according to
the chosen quality. Eventually this should move to CamcorderProfile
through media_profiles.xml files.
- switchTimeLapseMode(): handles switching between time lapse mode
normal mode.
- Since preview size may be different from video size for HD time lapse
capture, we save the desired preview size in mDesiredPreviewWidth,
mDesiredPreviewHeight and use it for comparison in
resetCameraParameters().
- Time lapse mode is enabled/disabled by calling
mMediaRecorder.setTimeLapseParameters().

CamcorderHeadUpDisplay.java: Constructor now takes in a boolean
(captureTimeLapse) telling whether to enable time lapse quality
options or the normal camcorder quality options.

Camera.java: Moved getOptimalPreviewSize() to Util.java to enable
use from VideoCamera.java. Also needed to pass activity, so that can
use getWindowManager(), getSystemService().

CameraSettings.java: added support for time lapse parameters. The
function getVideoTimeLapseQuality() returns the quality identifier
from the passed in string.

res/: added string, array values for time lapse.

res/xml/video_time_lapse_preferences.xml: contains all the preferences
for time lapse mode.

Change-Id: I194e7bc0b6218aa742d91c859a122de2b953a314
/packages/apps/Camera/src/com/android/camera/Util.java
ac9d0a1ce538eb4bd50cba3b257737a05b9ac4e5 15-Jun-2010 Chih-Chung Chang <chihchung@google.com> Support switching between multiple cameras.

Change-Id: Id444ebcd780c67f4990bd6f6b96c74379b6859ab
/packages/apps/Camera/src/com/android/camera/Util.java
35688439f40f00a1376dcfab6e6495989d82e433 22-Mar-2010 Wei-Ta Chen <weita@google.com> Fix 2533691 by using REVIEW intent added in Gallery.

Bug: 2533691

Change-Id: Ia8b7732a485bde5dec6b7cff0b80d4d6f08a8fee
/packages/apps/Camera/src/com/android/camera/Util.java
e480f77352d670b2892a9b7b7cd503838b71ca9f 10-Mar-2010 Romain Guy <romainguy@android.com> Camera should have the com.android.camera package name.
Related to bug #2464545

Change-Id: I08f5cce5b0df623fc62683bd9c9d4a1aa0694240
/packages/apps/Camera/src/com/android/camera/Util.java
33be45a1abaf6a8d611fb87b18945c84ab76c229 06-Mar-2010 Owen Lin <owenlin@google.com> Add the new ZoomController UI and also the exposure compensation settings.

Fix the bug that some MotionEvent of some actions should always pass to the
component who accept the DOWN event.

Also fix a bug that nine patch image will be drawn incorrectly after rotation.

Change-Id: I8ab36fb6f958c1967afa11eed5f167842b59cada
/packages/apps/Camera/src/com/android/camera/Util.java
3889cf31101cfd4d336f1ce5ae5122c2cb3c0fdc 06-Mar-2010 Chih-Chung Chang <chihchung@google.com> Unbundle: change camera package name.

Change-Id: I9b101ea486f06be553104bc4879f5ec66ae014bc
/packages/apps/Camera/src/com/android/camera/Util.java
9a4c2cac83f50e29063d27605c9f8d9e676a6f22 06-Mar-2010 Chih-Chung Chang <chihchung@google.com> Remove unused code.
/packages/apps/Camera/src/com/android/camera/Util.java
4de149ceb47f2c251f646419907424bfb67d2b64 29-Jan-2010 Owen Lin <owenlin@google.com> The first runnable version of the new UI.

Implement the new UI with OpenGL (GLSurfaceView).

Known issues:

* Texture are never freed from GL
* Do not consider the density of screen. Currently, the dimensions in mdpi
devices are wrong.
* It won't work on Sapphire, bug fired: Bug: 2473605
* The action UP event may pass a wrong target. (It should pass to the same
target who recive the DOWN action.
* Animation is not smooth enough.
* Should not allocate objects into heap during rendering path.
* The scrollbar in GLListView doesn't match the design
* We should calculate our own orientation instead of using the system one.
* Regression: "restore to default settings" is removed

Change-Id: I93fa45831aa87787dd5ee9e43e270a9d786c5a2a
/packages/apps/Camera/src/com/android/camera/Util.java
ffbbd7f09b8832ce523799eec53753cd3559e53d 11-Feb-2010 Chih-Chung Chang <chihchung@google.com> Remove the use of native allocation.
/packages/apps/Camera/src/com/android/camera/Util.java
73e782de608cbe2ddffd75c055009ff2e208f78b 19-Jan-2010 Owen Lin <owenlin@google.com> Unbundle with the PreferenceManager.

Change-Id: Ib415bf36147f35cbf1681cd87514124822ac48c6
/packages/apps/Camera/src/com/android/camera/Util.java
46d402ade45b258f4515c42b6940749364557fb3 04-Nov-2009 Owen Lin <owenlin@google.com> Remove some more code.

Change-Id: I5779a15fcffecd9de28e6e1c24a59d3cf0a523f7
/packages/apps/Camera/src/com/android/camera/Util.java
3f1947b04f2764b81e30cfde38468c4224f5035f 02-Nov-2009 Chih-Chung Chang <chihchung@google.com> Remove unused code.
/packages/apps/Camera/src/com/android/camera/Util.java
79bc8acc67097c09907a71c4a5a72ab85eb58087 26-Oct-2009 Owen Lin <owenlin@google.com> Remove unused code in Camera app.

Change-Id: I7b25fde19a172b6910d0217581cf61152d494a82
/packages/apps/Camera/src/com/android/camera/Util.java
35627500f00644aaae44c93f98f6a0cdeefe2d94 29-Sep-2009 Chih-Chung Chang <chihchung@google.com> Remove unused code.
/packages/apps/Camera/src/com/android/camera/Util.java
9f1480b2c27d744c816c71cb3c512d37bc48c524 28-Aug-2009 Ray Chen <raychen@google.com> Change Camera & Gallery code to use the new thumbnail APIs.
/packages/apps/Camera/src/com/android/camera/Util.java
cd972b0cd67d7a45084d9757ebd49b8f22989edd 23-Sep-2009 Chih-Chung Chang <chihchung@google.com> Fix 2129498: add a MaxNumOfPixels parameter for client to specify the captured picture size.
/packages/apps/Camera/src/com/android/camera/Util.java
697ea6ef1d84bc707881e736ff1148e3a30ed445 18-Sep-2009 Chih-Chung Chang <chihchung@google.com> Fix 2128896: The thumbnail generated is overlapped with previous thumbnail.

Change-Id: I57048527912887a6f9ff10dbd59233fc73c0cc7b
/packages/apps/Camera/src/com/android/camera/Util.java
c1f2e3021bf7b12f2a33561e09bd0ab32530382e 14-Sep-2009 Owen Lin <owenlin@google.com> Implement the drawer UI. When user click on the drawer button, the
on-screen settings will show up.

Change-Id: I86a587969a9a01d62560e21d457d3639841ba6da
/packages/apps/Camera/src/com/android/camera/Util.java
2c6c6174e2363fccb4e4f29b76290e99234fe140 01-Sep-2009 Owen Lin <owenlin@google.com> First version of on-screen settings for Camera.

Change-Id: I6e608b5b2d02abf3d1901160adba188399b03542
/packages/apps/Camera/src/com/android/camera/Util.java
3f3c857e3f34650c15d764810335024654b0fcc3 18-Aug-2009 Owen Lin <owenlin@google.com> Show error dialog when the camera hardware is busy (Eg: hijack by other
activity). We also change the behavior of the "Camera button", if the
camera is being used by others. We just ignore the request and won't start
the camera.

Change-Id: Icf3b00113aba61c9aa3f43ba07cf6944085d5d52
/packages/apps/Camera/src/com/android/camera/Util.java
522e836abc90bcb2d4e7a4ac37e269154d06c715 26-Aug-2009 Chih-Chung Chang <chihchung@google.com> Style fix.

Change-Id: I09ba86ee314e643415e41879c1d20ab1ede65a91
/packages/apps/Camera/src/com/android/camera/Util.java
34fe2a9d33a5b4ce49862ce4558a36c62ba6d540 19-Aug-2009 Chih-Chung Chang <chihchung@google.com> Fix 2052451: recycle bitmap memory as soon as possible so we won't be out-of-memory.
/packages/apps/Camera/src/com/android/camera/Util.java
3c21008c953cf6177f7771c176fa81d336e74ed8 12-Aug-2009 Wei-Ta Chen <weita@google.com> Fix http://b/issue?id=2048408.

(1) Set default maximum numbers of pixels for thumbails and mini thumbnails.
(2) Enfore computeSampleSize() to return a sample size that is either power of 2
or multiple of 8.
/packages/apps/Camera/src/com/android/camera/Util.java
382b384ec2cd948a82fe42294b18e4ec630bbdf6 06-Aug-2009 Chih-Chung Chang <chihchung@google.com> Removed unused resources and code. See 2036961: build size too large.
/packages/apps/Camera/src/com/android/camera/Util.java
f2c7e983fafaf7639a6ad090a93d1892015777ed 29-Jul-2009 Wei-Ta Chen <weita@google.com> Fix http://b/2017388 by handling the corner case in computeSampleSize().
/packages/apps/Camera/src/com/android/camera/Util.java
ce033a5871a0b678521411f9a3acaee2ab279178 27-Jul-2009 Chih-Chung Chang <chihchung@google.com> Fix http://b/1991523 by limiting the size of a bitmap when we decode a full image.

computeSampleSize() now accepts not only targetWidthOrHeight but also the size of a bitmap.
/packages/apps/Camera/src/com/android/camera/Util.java
187e9f4fd03bdba56ddb4ff4584800abdbef1952 24-Jul-2009 Chih-Chung Chang <chihchung@google.com> Remove unused code.
/packages/apps/Camera/src/com/android/camera/Util.java
4250e214f539a3caee1434889c5660d594b45dfd 24-Jul-2009 Chih-Chung Chang <chihchung@google.com> Simplify ImageGetter.
/packages/apps/Camera/src/com/android/camera/Util.java
026dff889c80763fc322ed03e2d3a76750320138 19-Jul-2009 Wei-Ta Chen <weita@google.com> Fix http://b/1907995 by using native allocation in BitmapFactory.
/packages/apps/Camera/src/com/android/camera/Util.java
6fa5404fd6c34d401c56accd059a706d8a832812 10-Jul-2009 Owen Lin <owenlin@google.com> Fix bug 1970161.

I think the reason is that we post a runner to do clean up when the
background job has been done.

However, the runner could be queued when the activity finished().
So, we first see a leak window message (because we havn't close the dialog yet)
And then see a "view not attached" exception (because we try to close
it after the activity being destroyed)

Fixed now.
/packages/apps/Camera/src/com/android/camera/Util.java
d5d74642d7c0b43578b43cdd46b70671b64c88e2 11-Jun-2009 Wei-Ta Chen <weita@google.com> Set bitmaps for full size images as being purgeable in viewing and reviewing images.

We increase the resolution of full size images to 2048x1536 for achieving better zoom-in quality.
Also the delay between decoding a thumbnail and decoding a full size image is set to 1000 msecs.
/packages/apps/Camera/src/com/android/camera/Util.java
bb1877847ae050918fe591d9b7fa63deaf645746 02-Jul-2009 Chih-Chung Chang <chihchung@google.com> Fix 1956859: "Set as" is not working with the downloaded image.
/packages/apps/Camera/src/com/android/camera/Util.java
482a3a54cfa8ec2cc913efc0e73a01d78453ee6d 27-Jun-2009 Owen Lin <owenlin@google.com> Fixed the OOM in crop image.

The original code of "CropImage" won't wait the save action to be complete
before exiting.

We have to hide the ProgressDialog in onStop(), otherwise, if the job is done
in background(after onStop()), a "no window token exception" will be
thrown when dialog.dismiss() is called. Thus, a new MonitoredActivity is
introduced to help us handle this, hope it will be useful in other places.
/packages/apps/Camera/src/com/android/camera/Util.java
35f8af0ff228adfeec6bb40844d362f6dd62dab6 01-Jul-2009 Chih-Chung Chang <chihchung@google.com> Fix 1950477: Menu items for video review are incorrect.
/packages/apps/Camera/src/com/android/camera/Util.java
b0e1282810ec68fd7585beb9ab9afab9bcafe1bd 23-Jun-2009 Owen Lin <owenlin@google.com> Fix several issues with ImageList.

One is bug 1933327

It seems to be timing issue. We assign the value of mAllImages in only
"onCreate" and will set it to null in "onActivityResult".
I modified the code so that it won't be null after "onCreate()".

The other issue is the crop image won't . The reason is we don't clean
up the cache when we reopen the cache. It won't work for ImageListUber
for the original fix since "buildImageListFromUri" won't return ImageList
of type ImageListUber.

The final one is the "getImaegForUri", last time, I made a change but
cause review fails in Camera. But, I need the check if the given uri is
actually the same as the image list not just check the "id".
/packages/apps/Camera/src/com/android/camera/Util.java
bbc2f2f15a865cf0330cd78a6ea67177c5863b3b 06-May-2009 Owen Lin <owenlin@google.com> Simplify the database code by keeping small data in memory.
/packages/apps/Camera/src/com/android/camera/Util.java
059daa36dc6e83ca24a16d9b99925e71010bcceb 19-May-2009 Owen Lin <owenlin@google.com> New UI for donut's camera !!
/packages/apps/Camera/src/com/android/camera/Util.java
724e9b3db93677b753c1267a716e30e6cf5ff3b6 19-May-2009 Chih-Chung Chang <chihchung@google.com> Clean CropImage.
/packages/apps/Camera/src/com/android/camera/Util.java
4177add422a041ea9f1007c05ff42361bf529d52 15-May-2009 Chih-Chung Chang <chihchung@google.com> Clean BitmapManager.
/packages/apps/Camera/src/com/android/camera/Util.java
341ad98e59d92769e1cc8ba68fa86c72dce0543b 12-May-2009 Chih-Chung Chang <chihchung@google.com> Make ImageLoader load image in order.

Split high and low priority tasks in ImageLoader.
Add adjustPriority function.
/packages/apps/Camera/src/com/android/camera/Util.java
601ce56b034f111b2875e7636776f2f359f6a156 30-Apr-2009 Owen Lin <owenlin@google.com> Add progress dialog for delete operation and make the close button work
/packages/apps/Camera/src/com/android/camera/Util.java
74c3bd38d4155c694bbb575f389597ee60aec7d3 28-Apr-2009 Owen Lin <owenlin@google.com> fix issue 1815454
/packages/apps/Camera/src/com/android/camera/Util.java
fa021af9397011cf180003139e80a88902c4b70a 24-Apr-2009 Chih-Chung Chang <chihchung@google.com> Fix bitmap decoding in CropImage.

Call allow decoding function so it can decode bitmaps.
Add log in BitmapManager so we can fix callers which forget to call it.
/packages/apps/Camera/src/com/android/camera/Util.java
bbc560b5216bbb2e3028020e426ce6a6e0e5df08 17-Apr-2009 Owen Lin <owenlin@google.com> Code cleanup. Try to remove some depercated usage of cursor.commitUpadtes()
/packages/apps/Camera/src/com/android/camera/Util.java
58e94eddd371a9bb7c04936dbeb99615fd1a0c2c 17-Apr-2009 Chih-Chung Chang <chihchung@google.com> Code clean up.
/packages/apps/Camera/src/com/android/camera/Util.java
d30b5877fbdedcebc0af5cccffddccfe9b11cb0b 16-Apr-2009 Owen Lin <owenlin@google.com> Refactoring the code.
/packages/apps/Camera/src/com/android/camera/Util.java
96b3c6ee6d93c136bb8270521158a989584966b1 16-Apr-2009 Chih-Chung Chang <chihchung@google.com> Move transform to Util.java
/packages/apps/Camera/src/com/android/camera/Util.java
0a475e11e2ceadbaa70308b52e06f4e6d9e56f12 16-Apr-2009 Chih-Chung Chang <chihchung@google.com> Code clean up.
/packages/apps/Camera/src/com/android/camera/Util.java
c1c20e9ce386c1f660059acaede591d2d718995a 15-Apr-2009 Chih-Chung Chang <chihchung@google.com> Move makeBitmap to Util.
/packages/apps/Camera/src/com/android/camera/Util.java
2b82c4a17abfe926dc2942a6d1bf7982b006de6d 14-Apr-2009 Chih-Chung Chang <chihchung@google.com> Clean verbose logging messages.
Extract UriImage to a separate file.
/packages/apps/Camera/src/com/android/camera/Util.java
937fc48b37fafe3ffc8f4b52bd9a171bbb4d3a37 14-Apr-2009 Owen Lin <> AI 146099: 1. Use ICancelable<T> to replace several different interfaces, such as IGetBooleanCancelable.
2. Remove some warnings.

Automated import of CL 146099
/packages/apps/Camera/src/com/android/camera/Util.java