summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/module
Commit message (Collapse)AuthorAgeFilesLines
* Clean up HDR+ button state logic.Senpo Hu2015-03-231-1/+3
| | | | | | | | | CameraAppUI#applyModuleSpecs should honor whatever HardwareSpec and BottomBarUISpec provided by modules. UI should not change behavior by poking setting by itself. This can cause huge pain when debugging. Bug: 19657871 Change-Id: Ief153f6c92a12ab1a72732a7a0908059fd91167e
* Re-arrange camera initialization.Paul Rohde2015-03-201-3/+8
| | | | | | | | | | | | | This change re-arranges several things to make it possible to know the CameraId you are about to open before you actually open the camera device. It also adds an explicit CameraId class for handling both legacy and camera2 id comparisons, an active camera tracker, and moves the camera id query mechanism into a hardware manager class in prep for the subsequent camera release. Bug: 19679820 Change-Id: I4c09b9a12a1ea5badcac3a6a073a56764f9a7eba
* Make module scope prefix a static agent valueAlan Newberger2015-02-242-29/+66
| | | | | | | | | | This removes the multiple "PhotoModule" strings across the codebase and allows for retrieval of a module's string scope prefix as part of its static ModuleAgent properties rather than as a property of the module itself. Bug: 19482146 Change-Id: I2c36878dd070106149909f19f98bcae221b94012
* Centralize logic for Camera API feature determination.Sascha Haeberling2015-02-201-20/+22
| | | | | | | | | | | | | Bug: 19179276 This captures camera capabilities in a centralized class and allows them to be overridden by GServices in the field or using adb. Since this is not it's own class it would be trivial to create another instance for testing and pass that into CameraActivity or even to change these values using a UI before the actual Activity is started. Change-Id: I74262c8467f631c7b5e42b02d269d5f401d4e9e7
* Instantiate CaptureIntentModule in ModulesInfo.Senpo Hu2015-02-201-6/+31
| | | | | Bug: 18726217 Change-Id: I93397322843a7b1258b881e19ae90a7f6fb55e3b
* N4 Shutter Regression FixI-Jong Lin2015-02-121-1/+2
| | | | | | | | | | The fix to allow the OnCameraAvailable Listener synchronization causes a regression failure in enabling the shutter button properly. Remove that fix, but now I can enable CaptureModule N4 by default, since it actually works now. Bug: 19355923 Change-Id: I60fbc38010535cd750a2a74b9b6ead12df80e366
* N4 CaptureModule not closingI-Jong Lin2015-02-111-1/+0
| | | | | | | | | | | N4 CaptureModule was not wired up properly to close the device when it closed. There's still an issue that the synchronization is incorrect, i.e. we don't guarentee close has completed before we open it again. There's a fix so that we can use OnCameraAvailable listener to only open the camera when it is available. Bug: 19332637 Change-Id: Ie88acb3a9f75a5896606dd660c005de0dc82dc3c
* Add JPEG Orientation into N4 CaptureRequestsI-Jong Lin2015-02-101-2/+2
| | | | | | | | | | | Wired up the SimpleOneCameraFactory to dynamically decorate the JPEG capture request with the proper orientation so that the framework does the proper orientation. Paired with ag/629241. Bug: 19122922 Change-Id: If206b0d18979ddc4ed9ab6df7ce4d22ba01534a8
* Revert N4 to PhotoModule until ImageBackend can handle EXIF rotation.Sascha Haeberling2015-02-051-1/+1
| | | | | | Bug: 19281550 Change-Id: I8a87b8e4815b2f16d42c28a0cd9887379b742f75
* Nexus 4 Camera Start-up FixI-Jong Lin2015-02-041-1/+2
| | | | | | | | | Issue revolves around the fact that the camera ZSL template was invalid for Nexus4, and Nexus4 did not support ConvergedImage Picture taker. Turned those things off for the Nexus 4 and now it works. Bug: 19123014 Change-Id: I5aef58a0f0c7e9396e999d6b7ab2736e4565b73f
* Image Backend Integration w/ Simple CameraI-Jong Lin2015-01-221-0/+1
| | | | | | | | | | | | | Wiring for cameras that only deliver compressed JPEG artifacts. This CL was tested by enabling it on the Nexus 5. Currently, the code in this CL is NOT exposed in any known Nexus Camera model. The two unexposed bugs are as follows: an camera initialization bug on Nexus 4, and a cross-device functional issue with the SimpleCameraOneFactory object in that it doesn't request a JPEG compression artifact from the HAL with zero orientation. Bug: 18908116 Change-Id: If7080c4e8e52a329fb9a6fed52f7c31541758afb
* Fix bug in FirstRunDialog detection and re-enable CaptureModule on N9.Sascha Haeberling2014-12-231-1/+1
| | | | | | Bug: 18840830 Change-Id: I22abae32c5e55f779b5c645324f1f3a8421e4bde
* CaptureModule is not yet working on N9, so switch it to PhotoModule.Sascha Haeberling2014-12-231-1/+1
| | | | Change-Id: I58aee4b7704840b0d89c8c2c0d96f54a2347c42b
* Until Camera2-based JPEG camera is ready, N4 uses PhotoModule.Sascha Haeberling2014-12-191-3/+2
| | | | Change-Id: I3fc9503ae254a4d3975d9387f13f78e387ab0361
* Unify orientation calculation logic.Senpo Hu2014-11-191-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Camera API takes clockwise degrees for JPEG rotation and OrientationEventListener reports clockwise device orientation. The easiest formula of calculating output image rotation degree is: "camera sensor orientation" + "device orientation" Since front cameras face in opposite direction. The result needs to be mirrored for front camera. Detailed changes: * Refactor OrientationManager to remove unnecessary complexity. * Add OrientationManager.DeviceOrientation enum and OrientationManager.getDeviceOrientation * Remove CameraUtil.roundOrientation. * Fix the weird calculation which is hard to understand in CameraUtil.getJpegRotation and add CameraUtil.getImageRotation * Clean up image rotation logic in all modules: * Always look up the current device orientation via OrientationManager.getDeviceOrientation * Fix the doc for copyImagePlaneToBitmap() which actually rotates image counterclockwise. * Clean up CameraActivity: * Remove CameraActivity.onOrientationChanged and ModuleController.onOrientationChanged. Any individual module which wants to listen orientation change should register itself to OrientationManager. Now only VideoModule needs to do that. Bug: 17443789 Change-Id: I6d54cac5bde950acae0c3226448c27a816266df0
* Enable CaptureModule/ZSLPuneet Lall2014-10-151-2/+2
| | | | | | | | * Close the image reader in ZSL impl * Enable CaptureModule for API2 * Set ZSL ring-buffer to 10 images Change-Id: I19eb6bf9102ba8397fa073c98b1a3b5f84b74601
* Enable switching within CaptureModule to HDR+ and back.Sascha Haeberling2014-08-221-1/+1
| | | | | | Bug: 16945820 Change-Id: If92371129c5bf2a78b7623d745a8b86d218d32e1
* Consolidate properties for debugging.Andy Huibers2014-08-151-5/+4
| | | | Change-Id: I052492375bf176622b38382579b2189d22a05349
* [OC] Hook new Capture module up, behind a system property.Sascha Haeberling2014-07-301-2/+14
| | | | | | Bug: 16654225 Change-Id: I6be44fefce66c09425a1bebc1942489f6af7636c
* New Settings APIErin Dahlgren2014-06-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Based on discussions from last week and comments on the design doc, this api begins to implement the following: 1. Adds a "Scope" variable to api, which tells the SettingsManager whether the setting can be stored globally (so that it is visible to all parts of the app), or per-camera, or per-module, or per- custom scope that the api user provides. 2. Separates keys and default values from SettingsManager, to make it easy to add new settings/defaults from third party modules. 3. Stores all settings as strings, to avoid upgrade errors, and handles casting to type requested. Only String, Integer, and boolean are supported. 4. Opens SharedPreferences files on demand, depending on scope argument. 5. Creates a "DefaultsStore" to hold the defaults and possible values of a setting. Then a user can request the default or possible values of a setting at any time. Change-Id: I03e0e1dd0955c519f54112e89716014aa963a425
* Remove cameradevice subpackage and point references at ex librarySol Boucher2014-06-181-2/+2
| | | | | | This code is being relocated into frameworks/ex for availability to other apps. Change-Id: Icada261ac7a795b08dd8b187dfd17077077b37c3
* Create cameradevice package for camera management.Angus Kong2014-04-211-1/+1
| | | | Change-Id: I73c69a70736b0b0eb0ef069a7876cf75fee91262
* am 1ca516f2: Allow modules to hard reset settings to prevent out-of-sync errors.Erin Dahlgren2014-03-281-0/+7
|\ | | | | | | | | * commit '1ca516f2b612f91e0857ca87d978d39c2aba7c8c': Allow modules to hard reset settings to prevent out-of-sync errors.
| * Allow modules to hard reset settings to prevent out-of-sync errors.Erin Dahlgren2014-03-281-0/+7
| | | | | | | | | | | | Bug: 13663716 Bug: 13507557 Change-Id: Ie4e66c356c69c3a75a568dae13ddd2d42f60179e
| * Use debug.Log instead of android.util.Log.Angus Kong2014-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change to use com.android.camera.debug.Log instead of android.util.Log. 2. Add DebugCameraProxy to support more detailed debug info. 3. Add CameraErrorCallback in CameraManager. 4. Support posting to a specific handler for CameraErrorCallback. 5. Trim down some TAGs to match the framework tag length limit. 6. Remove some unused codes in CameraSettings. bug:13324870 Change-Id: I8c20a8a0d11cfd50b6e199b03cbc88d3c4ad2ceb
* | Use debug.Log instead of android.util.Log.Angus Kong2014-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see http://ag/438423, merge conflicts solved. 1. Change to use com.android.camera.debug.Log instead of android.util.Log. 2. Add DebugCameraProxy to support more detailed debug info. 3. Add CameraErrorCallback in CameraManager. 4. Support posting to a specific handler for CameraErrorCallback. 5. Trim down some TAGs to match the framework tag length limit. 6. Remove some unused codes in CameraSettings. bug:13324870 Change-Id: I8c20a8a0d11cfd50b6e199b03cbc88d3c4ad2ceb Conflicts: src/com/android/camera/data/LocalMediaData.java src/com/android/camera/data/RotationTask.java src/com/android/camera/widget/FilmstripView.java
* | Move startSmartCamera call back into onPreviewStarted(). ↵Teresa Ko2014-03-101-5/+0
|/ | | | | | (onPreviewInitialDataReceived() doesn't seem to be called anymore.) Change-Id: I25455dd8e1076150be37e419c73d5e5447c144d2
* Generalize shutter button listeners and add one for mode options.Erin Dahlgren2014-02-261-1/+2
| | | | | Bug: 13099000 Change-Id: Ib0726c70a9e4aa06197550f29360bacb2dda4783
* Make visibility support three states.Sascha Haeberling2014-02-251-2/+10
| | | | | | | | | Bug: 13169154 This will enable us to either stop preview rendering or pause picture taking in certain modes. Change-Id: I28014452ce43effeeaef9638b2f3a3bc42027257
* Give Smart Camera a signal to startSeth Raphael2014-02-121-0/+5
| | | Change-Id: I1b31d4cbf81a5865ef0807b07df0f644fa871247
* Move onPreviewAreaSizeChanged() out of layout passAngus Kong2014-02-071-8/+0
| | | | Change-Id: I4eb6f6ffda1438fca7575328ce09945d40549d51
* Elevate refocus to its own mode, merge craft and camera.Erin Dahlgren2014-02-051-21/+0
| | | | Change-Id: I9686db26993319fdaf09f09c0610bb65e00a0e05
* Avoid activity leaks.Sascha Haeberling2014-02-051-6/+3
| | | | | | Bug: 12805279 Change-Id: Ib91ff2d286f6a0e0d67dad673e7af24600e15759
* Remove global UI elements based on supported camera parameters.Erin Dahlgren2014-01-181-3/+13
| | | | | Bug: 12192238 Change-Id: I6373adeaa9c95385a2a4ca8d81cf7656550911f2
* Change order of modules to spec.Sascha Haeberling2014-01-171-2/+0
| | | | | | Bug: 12607061 Change-Id: Iff142b2571f17f71f7a76d629119ac4c8c7f2764
* Sync dependencies between bottom bar options.Erin Dahlgren2014-01-131-0/+7
| | | | | | | | | | | * Centralizes the bottom bar button customization. * Makes HDR+ and front camera exclusive. Bug: 12469207 Change-Id: I65e3d16d314a26889f04e9bcc26fa4bf095150b7 Conflicts: src/com/android/camera/ButtonManager.java
* Centralize camera mode resourcesDoris Liu2014-01-091-32/+30
| | | | | | | | | | Moved camera mode related resources such as mode theme color, mode icon, text, mode id, etc to resources xml. And created utility functions to query for them. Part II at ag/404854 Change-Id: I828502c76851cc2ed0b632b1ed4bb7f702fee231
* New Capture UI.Erin Dahlgren2013-12-202-1/+30
| | | | | | * depends on ag/400799 Change-Id: Ieb0e27447659bcb04dee57348583f68d680408d2
* Change the mode switcher order, color, text.Sascha Haeberling2013-12-171-2/+1
| | | | | | | | | | Bug: 12179634 Bug: 12179736 Bug: 12180159 Also re-enable wide angle mode. Change-Id: I075d7e2311fc560ed3d757585891c0eb2da08ea0
* Disable wideangle mode for the weekend build.Sascha Haeberling2013-12-131-3/+4
| | | | | | The code is not ready yet for the extended fishfood. Change-Id: I6e7fd7061f4b68a4270efcc4ac946d596bfa698c
* Add a capture-session API to be used by all modules.Sascha Haeberling2013-12-111-10/+1
| | | | | | | | | | | | | | Bug: 11747284 This refactors the way we think of sessions. Instead of having multiple session and notification APIs being used by different modules, we create on central capture session API to be used by all modules. This also adds a first implementation of a Memory API which tells modules about the current memory situation. Change-Id: I7f030e32fc2f70f4007825ba7bbbdce9521a2bd9
* Re-design callbacks from filmstrip.Angus Kong2013-12-091-0/+7
| | | | | | | Enumerated the possible states of filmstrip and have proper callbacks when entering/leaving each of the states. Change-Id: I5a6e931095bb0792e0832fda11d1f1b5ba850263
* Remove build target and codes for legacy panorama.Angus Kong2013-12-051-2/+0
| | | | | bug:11811982 Change-Id: I733e80511d8eecdd1dbc90daf9b7f9fb709a2766
* Replace legacy wide-angle panorama with new one.Angus Kong2013-12-051-5/+4
| | | | Change-Id: I55977b1a3346bfc45782eed3791e34cac423ee96
* Make onLayoutOrientationChanged to take a boolean.Angus Kong2013-12-031-4/+4
| | | | | | | ModuleController.onLayoutOrientationChanged() call back can just take a boolean to know whether the layout orientation is in landscape or portrait. Change-Id: I1675cbea263b12bb0b568a6038f0fc17dd03799a
* Change to have finer callbacks.Angus Kong2013-12-021-4/+5
| | | | | | | onConfigurationChanged() is too general since the configuration contains many things. Should use finer callbacks for each of the changes we care about. Change-Id: I5ffbb7f1f71e6675a4fbb07e564ae09f55fa5127
* Migrate from old CameraModule to ModuleController.Angus Kong2013-11-251-0/+7
| | | | | | | | | | | | | | | | | The following methods are removed. init() of old module interface onUserInteraction() installIntetFilter() onPreviewTextureCopied() onCaptureTextureCopied() onStop() onActivityResult() onShowSwitcherPopup updateStorageHintOnResume() The logic of controlling screen on/off is moved to CameraActivity. Change-Id: I6807ac6bc314bdfcfe47273baf071be94098fd44
* Consolidate onResume* and onPause* in modules.Angus Kong2013-11-231-12/+13
| | | | | | | | 1. Combine onResumeAfterSuper() and onResumeBeforeSuper() to resume(). 2. Combine onPauseAfterSuper() and onPauseBeforeSuper() to pause(). 3. Add helper function requestBackCamera() to CameraModule. Change-Id: Ie0ffb0168e2df1e77aba4ead4f8729eca09c894a
* Refactor PhotoSphere and Refocus: new camera openAngus Kong2013-11-221-2/+2
| | | | | | | | | This is part of the Denali refactor work. Now PhotoSphere and Refocus both uses the new camera start up process so the camera is not released between modules. See http://ag/392043/ Change-Id: I6ae9b111ba1fda33912159e0967f3a12d02937ba
* Introduce common services and integrate Refocus end-to-end.Sascha Haeberling2013-11-211-12/+13
| | | | | | | | | | | | | Bug: 11120164 Bug: 10073814 This adds a new common CameraServices interface and a method to every module to get it. Through this we can expose common services and due to the interface, we can easily mock them for tests. Also makes the MediaSaveService not a service anymore. Change-Id: Ifa093efd4ba53c2955ccc2a990b4f18610c29944