summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Util.java
Commit message (Collapse)AuthorAgeFilesLines
* Set the orientation of a panorama image.Wei-Ta Chen2011-11-151-0/+6
| | | | | | | | | | | | 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
* am 93b9c8ac: Merge "5554028: Select video snapshot resolution based on the ↵Chih-Chung Chang2011-11-041-0/+31
|\ | | | | | | | | | | | | video recording aspect ratio." into ics-mr0 * commit '93b9c8aca92b2a6a651c562c71b8c414458c1419': 5554028: Select video snapshot resolution based on the video recording aspect ratio.
| * 5554028: Select video snapshot resolution based on the video recording ↵Chih-Chung Chang2011-11-021-0/+31
| | | | | | | | | | | | aspect ratio. Change-Id: I7b01a21271068b9d201e38197e2a61b183f87902
* | Make PreviewFrameLayout and ControlPanelLayout work in potrait mode.Wu-cheng Li2011-10-271-1/+1
|/ | | | | | | | + Move tablet resource to sw600dp and sw800dp bug:5446617 Change-Id: Iaf2a442e621ed071d7639972a529dd263e3ce628
* Fix focus area in front camera.Chih-yu Huang2011-10-211-0/+14
| | | | | | | | | | 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
* Add hysteresis to orientation rounding.Eino-Ville Talvala2011-10-191-0/+18
| | | | | | | | 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
* Fix 5429468: Append _1, _2, etc to the file name in the same second.Chih-Chung Chang2011-10-111-6/+37
| | | | Change-Id: I68ca915eee4e343fa1b90fef068fecb9c919aa53
* Fix display of preview thumbnail after recording video.Mike Dodd2011-10-041-2/+7
| | | | | | | | | | | | | | | | | | | 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
* Merge "Adjust the screen brightness in the panorama mode." into ics-factoryromWei-Ta Chen2011-09-191-0/+17
|\
| * Adjust the screen brightness in the panorama mode.Wei-Ta Chen2011-09-161-0/+17
| | | | | | | | | | | | | | | | 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
* | Change image of review control buttons.Chih-yu Huang2011-09-161-1/+12
|/ | | | | bug:5244256 Change-Id: Idf02f40edb7e2e15edb4fc1ac86a4694d9147661
* Enter lights out mode.Wu-cheng Li2011-09-081-0/+7
| | | | | bug:5158325 Change-Id: I7c14397d6b6d9fe72e92bf0ea260322d64c87b98
* Set rotation and gps in video snapshot.Wu-cheng Li2011-09-081-0/+56
| | | | | | bug:5187868 Change-Id: I1092e3d37dba78073b42aa9107e7cc326d67decc
* Move review control out of preview.Chih-yu Huang2011-09-021-0/+9
| | | | | bug:5141555 Change-Id: I04e4ca0d0e1a40ccfe39e5276fda66ffd02ae1b5
* Add video snapshot.Wu-cheng Li2011-09-011-0/+17
| | | | | | | | | | | | | | 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
* Fix NPE 5238952 when generating panorama fails.Angus Kong2011-09-011-1/+1
| | | | | | | | | 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
* Remove zoom ratio text label.Wu-cheng Li2011-08-121-8/+0
| | | | Change-Id: Ia4d54034b0b2c039e874b1fa580b036962f4cd33
* Use matrix to transform the location of faces.Wu-cheng Li2011-08-111-0/+12
| | | | | | bug:5141019 Change-Id: Id4bb82cee5fd788689fb18bb199504d963c5d3a2
* Use new background and shutter button.Wu-cheng Li2011-08-091-0/+13
| | | | | | bug:5024054 Change-Id: I2def331433b0db66efc0d38f1e9537c0980441bb
* Add face detection UI.Wu-cheng Li2011-08-041-4/+3
| | | | | bug:4460717 Change-Id: Id09cc012efffcee0f5af3a070b5dcb775a7048a0
* Merge the indicator bar implementations.Chung-yih Wang2011-08-041-0/+10
| | | | | | | | | | | | 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
* Add camcorder zoom.Wu-cheng Li2011-06-271-0/+8
| | | | | | bug:2644213 Change-Id: I669966e4fd54c76d19660efa6f1700a86b4d6c07
* Check if device policay manager has disabled camera.Wu-cheng Li2011-06-171-8/+29
| | | | | | | | Show the corresponding message if that is the case. bug:4185309 Change-Id: I0f4a5ac577f13331685f8e7343bab6317f96c3d8
* Refactor RotateImageView and thumbnail.Wu-cheng Li2011-05-171-0/+39
| | | | Change-Id: Ic435b7cd97ba775ec8f4b8342a1d4d25e2a5120c
* Remove dead code and reduce visibility.Wu-cheng Li2011-05-171-58/+6
| | | | Change-Id: Icec126d3d83f3b158d284dd63dfed8452ffa2249
* Do not trigger touch focus when popup window is dismissed.Wu-cheng Li2011-04-281-0/+8
| | | | | | | Also use getLocationInWindow instead of getLocationOnScreen. bug:3475893 Change-Id: I6e5917cf7340a7968fd07c13bf91e3c555d0cf87
* Reduce the size of focus rectangle.Wu-cheng Li2011-04-281-1/+1
| | | | | | | | Now the length of focus rectangle is 1/4 of the height of preview frame. bug:3475893 Change-Id: Ib1f09d5dbb25bb20343b39116c12febe08d83051
* Fix camera preview orientation when device is held in portrait.Wu-cheng Li2011-01-261-2/+1
| | | | | | | | | | | 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
* Change AlertDialog.setIcon to setIconAttribute.Wu-cheng Li2011-01-181-1/+1
| | | | | | | 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
* Removed the flaky memory checking.Yu Shan Emily Lau2011-01-091-0/+36
| | | | | | Added the image caputre and video recording stress test for the front facing camera. Change-Id: Ice3abf35791e1953f70ef25375409fd5efe870b3
* Cleanup: Make Util get rid of IImage.Chia-chi Yeh2010-12-201-19/+16
| | | | Change-Id: I1628bcae4daa4768186f08df0d328f7c5a5380df
* Cleanup: Remove MenuHelper.closeSilently().Chia-chi Yeh2010-12-201-9/+0
| | | | Change-Id: I449a10104615c402dbd36d615e845185063a9660
* Choose the preview size that has the same aspect ratio as picture size.Wu-cheng Li2010-12-171-3/+5
| | | | | | | | 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
* Remove mms quality if the device does not support voice.Wu-cheng Li2010-12-131-0/+32
| | | | | bug:3272846 Change-Id: Ic573e790d323e93c9976e9985308890031d26a0b
* Add dumpParameters for debugging when necessary.Wu-cheng Li2010-12-101-0/+11
| | | | Change-Id: Ie21b93ddb02647df512ee0088e77c522902028f3
* Rotate the postview to correct orientation in video attach mode.Wu-cheng Li2010-11-181-1/+19
| | | | | | Manual merge from gingerbread. bug:3208306 Change-Id: Ib7fb0a960c862527324adefd419e74224f59bc30
* Merge 559a4151 from gingerbread-plus-aospJean-Baptiste Queru2010-10-191-5/+13
|\ | | | | | | Change-Id: I8ec4aa5210cb5104bedb7d5ed6f823f44517b203
| * Fix wrong usage of setRotation and setOrientation.Wu-cheng Li2010-10-191-5/+13
| | | | | | | | | | bug:3105659 Change-Id: Ie2c1559cc03ece66705c1d766bea0e736f2684bc
* | Change review action domain to com.android.camera.Owen Lin2010-09-301-5/+4
| | | | | | | | Change-Id: I21b3ef1494296671472acf3619688739861f2cff
* | am c97d2382: Update the code due to API change.Wu-cheng Li2010-09-151-1/+1
|\| | | | | | | | | | | | | Merge commit 'c97d23826a28dd725951eccb62651244f9fb8228' * commit 'c97d23826a28dd725951eccb62651244f9fb8228': Update the code due to API change.
| * Update the code due to API change.Wu-cheng Li2010-09-151-1/+1
| | | | | | | | | | | | bug:3001395 bug:3001399 Change-Id: Ie1347ed28aa72a3ec637867dc2226c60ef2dbd6c
* | am 50ab7fd1: Merge "Fix the wrong rotation on naturally landscape devices." ↵Wu-cheng Li2010-09-151-10/+13
|\| | | | | | | | | | | | | | | | | into gingerbread Merge commit '50ab7fd18e8a631237f7546cd25af974e3e30dcb' * commit '50ab7fd18e8a631237f7546cd25af974e3e30dcb': Fix the wrong rotation on naturally landscape devices.
| * Fix the wrong rotation on naturally landscape devices.Wu-cheng Li2010-09-151-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Added support for time lapse video capture.Nipun Kwatra2010-08-101-0/+49
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Support switching between multiple cameras.Chih-Chung Chang2010-06-231-0/+20
| | | | Change-Id: Id444ebcd780c67f4990bd6f6b96c74379b6859ab
* Fix 2533691 by using REVIEW intent added in Gallery.Wei-Ta Chen2010-03-221-0/+2
| | | | | | Bug: 2533691 Change-Id: Ia8b7732a485bde5dec6b7cff0b80d4d6f08a8fee
* Camera should have the com.android.camera package name.Romain Guy2010-03-101-1/+1
| | | | | | Related to bug #2464545 Change-Id: I08f5cce5b0df623fc62683bd9c9d4a1aa0694240
* Add the new ZoomController UI and also the exposure compensation settings.Owen Lin2010-03-101-0/+12
| | | | | | | | | 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
* Unbundle: change camera package name.Chih-Chung Chang2010-03-081-0/+1
| | | | Change-Id: I9b101ea486f06be553104bc4879f5ec66ae014bc
* Remove unused code.Chih-Chung Chang2010-03-051-88/+0
|