OSDN Git Service

android-x86/packages-apps-Camera2.git
9 years agoset default flashMode and focusMode onto Camera Settings
Spike Sprague [Wed, 28 Jan 2015 03:13:44 +0000 (19:13 -0800)]
set default flashMode and focusMode onto Camera Settings
add null checks when accessing flashMode and focusMode

bug: 18200939

Change-Id: I622deed48764ff42b5db9a7313c5bdf3253d3f69

9 years agoMerge "Fix for Ripple on Fast Thumbnail Indicator" into ub-camera-haleakala
I-Jong Lin [Wed, 28 Jan 2015 01:42:50 +0000 (01:42 +0000)]
Merge "Fix for Ripple on Fast Thumbnail Indicator" into ub-camera-haleakala

9 years agoMerge "Ignore duplicate calls to Image.close()" into ub-camera-haleakala
Puneet Lall [Wed, 28 Jan 2015 01:24:28 +0000 (01:24 +0000)]
Merge "Ignore duplicate calls to Image.close()" into ub-camera-haleakala

9 years agoIgnore duplicate calls to Image.close()
Puneet Lall [Wed, 28 Jan 2015 00:54:04 +0000 (16:54 -0800)]
Ignore duplicate calls to Image.close()

Bug: 19156045
Change-Id: I78d4dea216b50c0edd3f8784a5aaafc4647568d0

9 years agoFix for Ripple on Fast Thumbnail Indicator
I-Jong Lin [Tue, 27 Jan 2015 19:29:17 +0000 (11:29 -0800)]
Fix for Ripple on Fast Thumbnail Indicator

There was a cute optimization was to start the ripple animation, and
then fill in the bitmap in 30ms after the bitmap was computed.
However, when the system is overloaded, the bitmap is not necessarily
computed in 30ms, and an empty ripple can result.   Put in a more
conservative fix, when the ripple only starts when the bitmap has
already been computed.

Bug: 19132963
Change-Id: Id39257a1d75342c78385bac8682462e8875d97f7

9 years agoMake CaptureModule obey camera characteristics when reporting flash support
Spike Sprague [Fri, 23 Jan 2015 23:19:36 +0000 (15:19 -0800)]
Make CaptureModule obey camera characteristics when reporting flash support

bug: 19018131
Change-Id: If891bc410a99452dfe0fadc6545e41c3853f5639

9 years agoConsolidate camera logging
Puneet Lall [Tue, 27 Jan 2015 18:28:34 +0000 (10:28 -0800)]
Consolidate camera logging

Consolidates logging and removes misleading stack traces when commands
are interrupted due to an application pause.

Bug: 19156045

Change-Id: I92eea8df1d3bbce048bac02689a14d2240aad2be

9 years agoChange/fix flash behavior when taking photos
Puneet Lall [Tue, 27 Jan 2015 01:49:39 +0000 (17:49 -0800)]
Change/fix flash behavior when taking photos

 * Ignore ZSL images when flash is ON (Bug: 19151455)
 * Ignore AE state when flash is OFF (Bug: 19151502)

Change-Id: I2e27eb9b7573beab352fba89c02805447d009c80

9 years agoMerge "Fix NPE crash in RoundedThumbnailView." into ub-camera-haleakala
Senpo Hu [Sat, 24 Jan 2015 00:53:02 +0000 (00:53 +0000)]
Merge "Fix NPE crash in RoundedThumbnailView." into ub-camera-haleakala

9 years agoFix NPE crash in RoundedThumbnailView.
Senpo Hu [Fri, 23 Jan 2015 23:09:35 +0000 (15:09 -0800)]
Fix NPE crash in RoundedThumbnailView.

Bug: 19003975
Change-Id: I4839696e1f5c4e9b7a768ed24ad5951764cd9d66

9 years agoFix Video thumbnail filmstrip size
Alan Newberger [Fri, 23 Jan 2015 22:23:10 +0000 (14:23 -0800)]
Fix Video thumbnail filmstrip size

Video size comes in asynchronously, and after refactor wasn't
wired up to query the metadata instead of the initial mediastore
size. This CL hides FilmstripItemData dimensions behind FilmstripItem
so that VideoItem can override and provide a Size via its existing
methods that use metadata if present.

Bug: 19000322

Change-Id: Ifddd6c90169c80d9fd69a1549e1086d5f1abfd85

9 years agoMerge "add isFlashSUpported() to OneCameraCharacteristics, make it work with API...
Spike Sprague [Fri, 23 Jan 2015 22:48:00 +0000 (22:48 +0000)]
Merge "add isFlashSUpported() to OneCameraCharacteristics, make it work with API 1 and API 2" into ub-camera-haleakala

9 years agoadd isFlashSUpported() to OneCameraCharacteristics,
Spike Sprague [Fri, 23 Jan 2015 03:37:59 +0000 (19:37 -0800)]
add isFlashSUpported() to OneCameraCharacteristics,
make it work with API 1 and API 2

bug: 19018131

Change-Id: I0d4157688e6219f9d6f5827c19938e90d3831bdf

9 years agoCaptureSession can now be started with an empty placeholder.
Sascha Haeberling [Wed, 21 Jan 2015 02:59:08 +0000 (18:59 -0800)]
CaptureSession can now be started with an empty placeholder.

  Bug: 19014774
  Bug: 18853119
  Bug: 18979823

Being able to start with an empty placeholder and then updating that
placeholder allows us to add a visual entry to the filmstrip early on.

This avoid jarring effects where after taking many apid fire shots and
going to filmstrip, the entries are appearing one after the other.
This was caused by sessions only getting started when the thumbnail was
produced, which can take a while when multiple shots are in the
encoding pipeline.

Also contains changes that make CaptureSession testable.

Change-Id: I3d44704099be81524f8e165f3f09de6eebfc147b

9 years agoMerge "Remove placeholders from filmstrip methods, add PhotoItem/SessionItem integrat...
Alan Newberger [Fri, 23 Jan 2015 21:31:47 +0000 (21:31 +0000)]
Merge "Remove placeholders from filmstrip methods, add PhotoItem/SessionItem integration" into ub-camera-haleakala

9 years agoMerge "Fix build breakage" into ub-camera-haleakala
Puneet Lall [Fri, 23 Jan 2015 21:07:36 +0000 (21:07 +0000)]
Merge "Fix build breakage" into ub-camera-haleakala

9 years agoFix build breakage
Puneet Lall [Fri, 23 Jan 2015 21:01:03 +0000 (13:01 -0800)]
Fix build breakage

Fix build breakage due to "Enable testing of ZslSharedImageReaderFactory"

Change-Id: I0e1da855a71f5ab83c65bdfb8b1e76cfd9199e3c

9 years agoMerge "Enable testing of ZslSharedImageReaderFactory" into ub-camera-haleakala
Puneet Lall [Fri, 23 Jan 2015 20:18:12 +0000 (20:18 +0000)]
Merge "Enable testing of ZslSharedImageReaderFactory" into ub-camera-haleakala

9 years agoEnable testing of ZslSharedImageReaderFactory
Puneet Lall [Fri, 23 Jan 2015 17:45:51 +0000 (09:45 -0800)]
Enable testing of ZslSharedImageReaderFactory

 * Migrate from CloseableHandlerThread to HandlerFactory to remove all
   direct dependencies on the platform.

Change-Id: I3d6aca94cd6f9559596d157b86c174bfb8801f90

9 years agoRemove placeholders from filmstrip methods, add PhotoItem/SessionItem integration
Alan Newberger [Fri, 23 Jan 2015 17:55:47 +0000 (09:55 -0800)]
Remove placeholders from filmstrip methods, add PhotoItem/SessionItem integration

In this CL we add the ability for a PhotoItem to use a Session bitmap as a
placeholder. We also move general placeholder management out of the method
call stack, moving a single static initialization in CameraActivity into a
field in FilmstripItemBase for use by FilmstripItems.

Bug: 18977838
Change-Id: Ic1b0dc11fd0e4c85b9b310235e6d3122cf1543ce

9 years agoMake most app services lazy.
Paul Rohde [Tue, 20 Jan 2015 21:39:16 +0000 (13:39 -0800)]
Make most app services lazy.

Change-Id: I476914b1ed399f8ad727ac33782229cdf39d378f

9 years agoMerge "Reduce view add/removes when loading photos" into ub-camera-haleakala
Alan Newberger [Fri, 23 Jan 2015 01:00:52 +0000 (01:00 +0000)]
Merge "Reduce view add/removes when loading photos" into ub-camera-haleakala

9 years agoMerge "Wait for AE/AF convergence before taking pictures" into ub-camera-haleakala
Puneet Lall [Fri, 23 Jan 2015 00:42:40 +0000 (00:42 +0000)]
Merge "Wait for AE/AF convergence before taking pictures" into ub-camera-haleakala

9 years agoImage Backend Integration w/ Simple Camera
I-Jong Lin [Thu, 15 Jan 2015 19:24:27 +0000 (11:24 -0800)]
Image Backend Integration w/ Simple Camera

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

9 years agoMerge "Close ImageReaders after the camera is closed" into ub-camera-haleakala
Puneet Lall [Thu, 22 Jan 2015 23:32:36 +0000 (23:32 +0000)]
Merge "Close ImageReaders after the camera is closed" into ub-camera-haleakala

9 years agoReduce view add/removes when loading photos
Alan Newberger [Thu, 22 Jan 2015 19:48:27 +0000 (11:48 -0800)]
Reduce view add/removes when loading photos

Two fixes to reduce flicker when loading images. First, adjust
ViewItem instances in-place instead of creating new ViewItems
which included adding and removing views from the hierarchy.
It turned out we were doing an update for every photo due to
touching PanoramaMetadata and reporting back that metadata
was adjusted, whether or not a photo was a panorama. Now
that data is reported. New photo captures are essentially
added and removed from the view hierarchy three times before
this change, after an ImageView is added once, with its
contents changed as the photo is loaded.

More testing is needed but I cannot repro the elusive filmstrip
flicker with these changes.

Bug: 18977838
Bug: 17905863
Change-Id: I5a42c0baf87a8cef0ee4dbcf9f03d40715e6aa2d

9 years agoClose ImageReaders after the camera is closed
Puneet Lall [Wed, 14 Jan 2015 21:03:47 +0000 (13:03 -0800)]
Close ImageReaders after the camera is closed

Bug: 18841114
Change-Id: Ifc0b79e70059efd8f8ace2c29243406b524ad918

9 years agoWait for AE/AF convergence before taking pictures
Puneet Lall [Thu, 15 Jan 2015 17:28:34 +0000 (09:28 -0800)]
Wait for AE/AF convergence before taking pictures

Bug: 18997124
Change-Id: I27b06186acde05c81d31042f330b6dabeac865cf

9 years agoMerge "Add typing to cursor item factories" into ub-camera-haleakala
Alan Newberger [Thu, 22 Jan 2015 17:39:33 +0000 (17:39 +0000)]
Merge "Add typing to cursor item factories" into ub-camera-haleakala

9 years agoFix camera2 LogHelper signature mismatch.
Paul Rohde [Thu, 22 Jan 2015 17:23:59 +0000 (09:23 -0800)]
Fix camera2 LogHelper signature mismatch.

Change-Id: Ibb37baad498bfebbab9f0451af4d5a95ac45dabe

9 years agoExtended logging utilities.
Paul Rohde [Thu, 22 Jan 2015 01:20:04 +0000 (17:20 -0800)]
Extended logging utilities.

Change-Id: I4a49a0694495f9c03c55a9ea8fad0ed22bc45bfc

9 years agoAdd typing to cursor item factories
Alan Newberger [Thu, 22 Jan 2015 03:25:24 +0000 (19:25 -0800)]
Add typing to cursor item factories

Add a bit of generic typing to allow clients to directly use
PhotoItem or VideoItem without casting, particularly in
CameraActivity.onSessionDone where explicit calls are made
to the PhotoItem factory.

Bug: 18977838
Change-Id: Ib5ecff2342d73ec3ce817a5f7e7fe42733ed8a71

9 years agoMake it possible for singletons that rely on application context to be
Paul Rohde [Tue, 20 Jan 2015 21:39:16 +0000 (13:39 -0800)]
Make it possible for singletons that rely on application context to be
initalized lazily.

* Add AndroidContext
* Add AndroidServices
* Make LogHelper ues thread safe lazy initialization
* Convert several unused fields into local variables in CameraApp.

Change-Id: I9c73e9b91efb49a01d848a8cca1e8e65f059b5d0

9 years agoMerge "Move first run detection into its own object." into ub-camera-haleakala
Paul Rohde [Wed, 21 Jan 2015 23:30:15 +0000 (23:30 +0000)]
Merge "Move first run detection into its own object." into ub-camera-haleakala

9 years agoMove first run detection into its own object.
Paul Rohde [Wed, 21 Jan 2015 23:01:13 +0000 (15:01 -0800)]
Move first run detection into its own object.

Change-Id: I82f109e970ac871c9de54ff551176c2cd29070b4

9 years agoAdd missing copyright header
Puneet Lall [Wed, 21 Jan 2015 23:04:54 +0000 (15:04 -0800)]
Add missing copyright header

Change-Id: Ia0198b9661ef5882e998ac0a6bb17cffc013057a

9 years agoMerge "Fix issue where holding down shutter button sometimes does not trigger burst...
Radford Juang [Tue, 20 Jan 2015 17:16:38 +0000 (17:16 +0000)]
Merge "Fix issue where holding down shutter button sometimes does not trigger burst." into ub-camera-haleakala

9 years agoPreserve zoom on touch to focus
Alan Newberger [Tue, 20 Jan 2015 01:47:36 +0000 (17:47 -0800)]
Preserve zoom on touch to focus

During the full AF scan the crop region is missing from the request,
so you see the preview snap back to no zoom, then back when the delayed
reset occurs. This CL works, I think it's sound per AF/AE metering as
they were already monitoring the crop region in their calculations, this
just feeds the crop region to the request as well.

Bug: 19064291
Change-Id: I5b2b90147f29abda68df80fed66685aca90a515c

9 years agoMerge "Check for null camera within proxy" into ub-camera-haleakala
Alan Newberger [Sat, 17 Jan 2015 02:14:00 +0000 (02:14 +0000)]
Merge "Check for null camera within proxy" into ub-camera-haleakala

9 years agoCheck for null camera within proxy
Alan Newberger [Sat, 17 Jan 2015 00:27:58 +0000 (16:27 -0800)]
Check for null camera within proxy

Companion cl to ag/614134, ensures now may have a null camera
rather than a potentially stale one, ensure we don't pass one
into the MediaRecorder.

Bug: 18414095
Change-Id: I215cd10e4322109019ea710b155121d375f82712

9 years agoFix issue where holding down shutter button sometimes does not trigger burst.
Radford Juang [Fri, 16 Jan 2015 22:46:52 +0000 (14:46 -0800)]
Fix issue where holding down shutter button sometimes does not trigger burst.

This can occur when the user intends to do a long-press but finger
budges slightly (e.g., 1 pixel) triggering an ACTION_MOVE event. This
fix disables ACTION_MOVE events from being sent to gesture detector,
allowing the long tap event to occur when slight finger movement occurs.

Change-Id: Id13a7121f0a899291f031509983050d472566c80

9 years agoMerge "Delete obsolete/unused interface" into ub-camera-haleakala
Puneet Lall [Fri, 16 Jan 2015 23:22:38 +0000 (23:22 +0000)]
Merge "Delete obsolete/unused interface" into ub-camera-haleakala

9 years agoFramerate fix for ZSL Nexus 5, Redux
I-Jong Lin [Fri, 16 Jan 2015 22:57:13 +0000 (14:57 -0800)]
Framerate fix for ZSL Nexus 5, Redux

Screwed up the merge last time.  Need to redo this fix.

Bug: 19017062
Change-Id: I52b5bb71dea71f52c7c5d3379df798931b1976c5

9 years agoFix for Camera2 Build
I-Jong Lin [Fri, 16 Jan 2015 22:44:31 +0000 (14:44 -0800)]
Fix for Camera2 Build

Unfortunately, introduced in ag/612015.

Change-Id: Ic4e17f8093272f7b531c526607ca974b2d456737

9 years agoMerge "Fix capture indicator on non-zsl modules." into ub-camera-haleakala
Senpo Hu [Fri, 16 Jan 2015 22:33:57 +0000 (22:33 +0000)]
Merge "Fix capture indicator on non-zsl modules." into ub-camera-haleakala

9 years agoRevert "Optimize Framerate Workaround for ZSL on Nexus 5"
I-Jong Lin [Fri, 16 Jan 2015 22:25:37 +0000 (22:25 +0000)]
Revert "Optimize Framerate Workaround for ZSL on Nexus 5"

This reverts commit 3ec132c4429683871ffd652e2563459e5c866065.

Change-Id: I269f26ce801dc730055307226479af1d6f6effd5

9 years agoDelete obsolete/unused interface
Puneet Lall [Fri, 16 Jan 2015 22:23:03 +0000 (14:23 -0800)]
Delete obsolete/unused interface

Change-Id: I5c79e3372c9950fde6d6a86e647cf38dee79c9af

9 years agoOptimize Framerate Workaround for ZSL on Nexus 5
I-Jong Lin [Fri, 16 Jan 2015 20:58:10 +0000 (12:58 -0800)]
Optimize Framerate Workaround for ZSL on Nexus 5

Through experimentation, we have found that the framerate range
[7,29] does NOT reproduce the preview jank, but still allows
ZSL to be run.

Bug: 19017062
Change-Id: I99f71385640f103a05f86d7a194f36712b1841d8

9 years agoMerge "Route ImageBackend JPEG Thumbnail To Wear" into ub-camera-haleakala
I-Jong Lin [Fri, 16 Jan 2015 22:14:44 +0000 (22:14 +0000)]
Merge "Route ImageBackend JPEG Thumbnail To Wear" into ub-camera-haleakala

9 years agoFix capture indicator on non-zsl modules.
Senpo Hu [Fri, 16 Jan 2015 22:13:42 +0000 (14:13 -0800)]
Fix capture indicator on non-zsl modules.

The logic is accidentally changed by ag/607738.
Let's revert it here.

Bug: 19022139
Change-Id: Idc6fd91ff5352a464bc128b367c54ba971b16b28

9 years agoRoute ImageBackend JPEG Thumbnail To Wear
I-Jong Lin [Tue, 13 Jan 2015 18:23:16 +0000 (10:23 -0800)]
Route ImageBackend JPEG Thumbnail To Wear

Sends the results of JPEG compression task to a wear device if
available.  Need to do a little plumbing on the
OneCamera.PictureSaverCallback.

Bug: 18841900
Change-Id: Iec86a82d9b99e8ff9fecd208d27bfbc563af73f6

9 years agoMerge "Apply flash setting changes to the AE mode" into ub-camera-haleakala
Puneet Lall [Fri, 16 Jan 2015 22:09:49 +0000 (22:09 +0000)]
Merge "Apply flash setting changes to the AE mode" into ub-camera-haleakala

9 years agoApply flash setting changes to the AE mode
Puneet Lall [Fri, 9 Jan 2015 18:08:16 +0000 (10:08 -0800)]
Apply flash setting changes to the AE mode

Bug: 17216526

Change-Id: If6c03102f04ad2ba54e1a045a3ab7445aaa5b595

9 years agoMove stats to new package.
Andy Huibers [Fri, 16 Jan 2015 02:19:10 +0000 (18:19 -0800)]
Move stats to new package.

Change-Id: Idfab1a24c91ff4c96515f3520283c7a0512d0514

9 years agoMerge "Move FirstRunDialog to app layer." into ub-camera-haleakala
Senpo Hu [Fri, 16 Jan 2015 21:19:59 +0000 (21:19 +0000)]
Merge "Move FirstRunDialog to app layer." into ub-camera-haleakala

9 years agoMerge "Add method for preallocating image-reader space" into ub-camera-haleakala
Puneet Lall [Fri, 16 Jan 2015 21:18:06 +0000 (21:18 +0000)]
Merge "Add method for preallocating image-reader space" into ub-camera-haleakala

9 years agoMove FirstRunDialog to app layer.
Senpo Hu [Sun, 11 Jan 2015 23:04:31 +0000 (15:04 -0800)]
Move FirstRunDialog to app layer.

The first run logic should live in CameraActivity. This refactoring
could clean up CaptureModule and PhotoModule.

  * Introduce ResolutionSetting class.
  * Introduce OneCameraManagerImpl for camera API 1.

Tested and verified this works on K / L devices.

Change-Id: I11a968a9346b520dee23fc4591a73bb483c43246

9 years agoMerge "Add Camera cover equivalent to windowBackground to smooth lockscreen startup...
Alan Newberger [Fri, 16 Jan 2015 17:46:06 +0000 (17:46 +0000)]
Merge "Add Camera cover equivalent to windowBackground to smooth lockscreen startup" into ub-camera-haleakala

9 years agoAdd Camera cover equivalent to windowBackground to smooth lockscreen startup
Alan Newberger [Wed, 14 Jan 2015 22:10:05 +0000 (14:10 -0800)]
Add Camera cover equivalent to windowBackground to smooth lockscreen startup

This CL adds a windowBackground drawable equivalent to the covers shown by lockscreen
and app, to remove the black screen in between. With this CL I mostly see no artifacts
when opening camera from lockscreen. Some issues:

* to improve memory usage in system UI holding the lockscreen preview, a vector
  camera blanket was added in ag/587418 to ic_camera_blanket. That works transparently
  everywhere so far but not in resource drawables that can only handle bitmaps in
  layer-list items. Split the vector and bitmaps here, which means only the lockscreen
  uses the vector -- this also surfaced a color mismatch between the vector and our PNG
  bitmaps, corrected in the new ic_camera_blanket_vector resource. This is a bit fragile
  as we rely on pixel match of the two resources, would like a cleaner solution but the
  layer-list limitation is tough -- without this change the app crashes at runtime within
  BitmapDrawable when the windowBackground is loaded.

* likewise both the lockscreen and app covers explicitly size the bitmap, there are no
  provisions to do so within layer-list. Will follow up with a refactor of in-app cover
  (ModeTransitionView) to remove explicit sizing and then all will rely on bitmap size
  (per above will still need vector file size coordinated with bitmap).

* current implementation relies upon a black window background, we restore that in onCreate.

* Both secure camera and v21 main camera currently use the windowBackground, will submit
  just for secure then introduce for main camera when we always start into Camera mode.

* For L explicitly set android:windowDrawsSystemBarBackgrounds to false to ensure the
  system preview into the DecorView doesn't take the navigation bar into account when
  vertically centering the cover bitmap, to make the preview identical to the other covers.

Bug: 18369862

Change-Id: Ia481e2d1d94bdc5a5d39b4d35b32c29a75bf99ec

9 years agoAdd method for preallocating image-reader space
Puneet Lall [Fri, 16 Jan 2015 00:16:43 +0000 (16:16 -0800)]
Add method for preallocating image-reader space

For non-zsl picture-taking, it is critical that image-reader
space be allocated prior to starting the precapture AF/AE sequence.

Bug: 18997124
Change-Id: Id931d687c4034dadab3aee60142b096f298216a7

9 years agoChange visibility to allow for continuous testing.
Sascha Haeberling [Thu, 15 Jan 2015 21:17:29 +0000 (13:17 -0800)]
Change visibility to allow for continuous testing.

  Bug: 19034273

Background: Dexmaker (through Mockito) is not able to mock
package-protected classes:
https://code.google.com/p/dexmaker/issues/detail?id=34

This can be reverted once we have a build system that doesn't require us
wrapping JUnit tests into an APK.

Change-Id: I7de59e36fa7645f9e1616e4d9c4fdda8e612e9bc

9 years agoFix for JPEG Compression w/ Unknown Orientation
I-Jong Lin [Thu, 15 Jan 2015 17:38:53 +0000 (09:38 -0800)]
Fix for JPEG Compression w/ Unknown Orientation

TaskCompressImageToJpeg blindly passed the orientation from the camera to
JpegUtilNative.compressJpegFromYUV420Image, which then threw a run-time
exception.  Behavior for TaskCompressImageToJpeg with an image of
UNKNOWN orientation is to treat it as CLOCKWISE_0 for purposes of
JPEG compression.  Instead of crashing, the camera now receives a JPEG
of the dark image of one's tabletop.

Bug: 19000723
Change-Id: I412fb6fed5d80035b180db7f6e8504d6d36b4fcc

9 years agoMerge "Make SettingsManager thread-safe" into ub-camera-haleakala
Puneet Lall [Wed, 14 Jan 2015 23:22:55 +0000 (23:22 +0000)]
Merge "Make SettingsManager thread-safe" into ub-camera-haleakala

9 years agoMerge "Filter ZSL images based on frame metadata" into ub-camera-haleakala
Puneet Lall [Wed, 14 Jan 2015 23:22:42 +0000 (23:22 +0000)]
Merge "Filter ZSL images based on frame metadata" into ub-camera-haleakala

9 years agoMake SettingsManager thread-safe
Puneet Lall [Tue, 13 Jan 2015 23:55:15 +0000 (15:55 -0800)]
Make SettingsManager thread-safe

Required to fix bug: 17216526

Change-Id: I4e0d8dfc613a8022982d48f2086e2539f3db9596

9 years agoCheck filmstrip scroll controller as well when deciding to load the full resolution...
Paul Rohde [Wed, 14 Jan 2015 18:17:01 +0000 (10:17 -0800)]
Check filmstrip scroll controller as well when deciding to load the full resolution image.

b/18947934

Change-Id: I6e9558bbd8a9b5ae52207cbb9af3b575123eda1f

9 years agoFilter ZSL images based on frame metadata
Puneet Lall [Thu, 8 Jan 2015 01:40:51 +0000 (17:40 -0800)]
Filter ZSL images based on frame metadata

Introduces a new metadatasynchronizer package with functionality for
retrieving metadata (TotalCaptureResults) for images which have been added to
the zsl ringbuffer.

To enable unit-testing, proxy objects for CaptureRequest, CaptureResult,
and TotalCaptureResult have been added, so they can now be mocked.

Bug: 18964540

Change-Id: I8374350e09d33f54ff241f23fd005013ed26dab0

9 years agoMerge "Load full resolution images for newly inserted images." into ub-camera-haleakala
Paul Rohde [Wed, 14 Jan 2015 00:45:21 +0000 (00:45 +0000)]
Merge "Load full resolution images for newly inserted images." into ub-camera-haleakala

9 years agoLoad full resolution images for newly inserted images.
Paul Rohde [Wed, 14 Jan 2015 00:16:07 +0000 (16:16 -0800)]
Load full resolution images for newly inserted images.

- Update log messages to remove filmstrip log spam.

b/18947934

Change-Id: I7ee26e45ab2991ada148ce52d04899fc1d164784

9 years agoTurn off message spam on ImageBackend
I-Jong Lin [Wed, 14 Jan 2015 00:27:34 +0000 (16:27 -0800)]
Turn off message spam on ImageBackend

Change-Id: Id31cb1571f7ed135c7aa74fbca37270c401ca9c1

9 years agoMerge "Change ImageSaver interface to support processing bursts and thumbnails" into...
Puneet Lall [Tue, 13 Jan 2015 23:57:38 +0000 (23:57 +0000)]
Merge "Change ImageSaver interface to support processing bursts and thumbnails" into ub-camera-haleakala

9 years agoMerge "Remove exception when releasing a requested, not yet opened camera" into ub...
Alan Newberger [Tue, 13 Jan 2015 22:51:54 +0000 (22:51 +0000)]
Merge "Remove exception when releasing a requested, not yet opened camera" into ub-camera-haleakala

9 years agoChange ImageSaver interface to support processing bursts and thumbnails
Puneet Lall [Thu, 8 Jan 2015 19:26:56 +0000 (11:26 -0800)]
Change ImageSaver interface to support processing bursts and thumbnails

Bug: 18908116

Change-Id: I14863011de5c3a575bfb54758824ccfaa04cf200

9 years agoMerge "Fix crash that occurs when two consecutive smartburst captures taken." into...
Radford Juang [Tue, 13 Jan 2015 16:12:49 +0000 (16:12 +0000)]
Merge "Fix crash that occurs when two consecutive smartburst captures taken." into ub-camera-haleakala

9 years agoMerge "Save media items in burst with sequential timestamps." into ub-camera-haleakala
Shashi Shekhar [Mon, 12 Jan 2015 21:50:40 +0000 (21:50 +0000)]
Merge "Save media items in burst with sequential timestamps." into ub-camera-haleakala

9 years agoMerge "Enable ZSL for Nexus 5 Back Camera, 1 of 2, Redux" into ub-camera-haleakala
I-Jong Lin [Mon, 12 Jan 2015 19:34:08 +0000 (19:34 +0000)]
Merge "Enable ZSL for Nexus 5 Back Camera, 1 of 2, Redux" into ub-camera-haleakala

9 years agoEnable ZSL for Nexus 5 Back Camera, 1 of 2, Redux
I-Jong Lin [Mon, 12 Jan 2015 19:28:36 +0000 (11:28 -0800)]
Enable ZSL for Nexus 5 Back Camera, 1 of 2, Redux

Allow ZSL implementation to be used with Nexus 5.  We still
need to drop the frame rate, if the current camera is facing back.

Screwed up last submission.  Will always build locally next time
no matter how small the change.

Bug: 18964282
Change-Id: I975129d7262b904f8b0b31a4cdbe95526e88a521

9 years agoRemove exception when releasing a requested, not yet opened camera
Alan Newberger [Mon, 12 Jan 2015 19:27:30 +0000 (11:27 -0800)]
Remove exception when releasing a requested, not yet opened camera

From monkey tests, we see a spike in an exception from new device
which is likely due to slow close performance. If we camera B is
open, and we request camera A, B will be closed then A opened. If
we release A during this process but B is not yet closed, don't
crash, just let the pending underlying open of A happen and release
the request. Preserve the exception for application errors where
truly unrequested cameras are released.

Bug: 17975345
Change-Id: I9aa3b0575e130f516cea6a3df120e4812df55bce

9 years agoMerge "Revert "Enable ZSL for Nexus 5 Back Camera, 1 of 2"" into ub-camera-haleakala
I-Jong Lin [Mon, 12 Jan 2015 19:22:14 +0000 (19:22 +0000)]
Merge "Revert "Enable ZSL for Nexus 5 Back Camera, 1 of 2"" into ub-camera-haleakala

9 years agoRevert "Enable ZSL for Nexus 5 Back Camera, 1 of 2"
I-Jong Lin [Mon, 12 Jan 2015 19:21:15 +0000 (19:21 +0000)]
Revert "Enable ZSL for Nexus 5 Back Camera, 1 of 2"

This reverts commit f7803cb20b39aa48dd399c5768902593a22d3104.

Change-Id: Ic9ebea1d723dc51c07bda01edd83cb2ac23dfe26

9 years agoMerge "Enable ZSL for Nexus 5 Back Camera, 1 of 2" into ub-camera-haleakala
I-Jong Lin [Mon, 12 Jan 2015 19:11:06 +0000 (19:11 +0000)]
Merge "Enable ZSL for Nexus 5 Back Camera, 1 of 2" into ub-camera-haleakala

9 years agoEnable ZSL for Nexus 5 Back Camera, 1 of 2
I-Jong Lin [Mon, 12 Jan 2015 18:50:29 +0000 (10:50 -0800)]
Enable ZSL for Nexus 5 Back Camera, 1 of 2

Allow ZSL implementation to be used with Nexus 5.  We still
need to drop the frame rate, if the current camera is facing back.

Bug: 18964282
Change-Id: Ia733cbc7bd8766245bf668e8f9141b1ec6d5eaaf

9 years agoMerge "Ensure button callbacks check lifecycle" into ub-camera-haleakala
Alan Newberger [Sat, 10 Jan 2015 01:52:08 +0000 (01:52 +0000)]
Merge "Ensure button callbacks check lifecycle" into ub-camera-haleakala

9 years agoMerge "Add HeadingSensor." into ub-camera-haleakala
Senpo Hu [Sat, 10 Jan 2015 00:42:17 +0000 (00:42 +0000)]
Merge "Add HeadingSensor." into ub-camera-haleakala

9 years agoAdd HeadingSensor.
Senpo Hu [Sat, 10 Jan 2015 00:26:16 +0000 (16:26 -0800)]
Add HeadingSensor.

A small step to clean up PhotoModule and CaptureModule...

Bug: 17985028
Change-Id: Ic79dd5e2582479d8ed9705e8150c4438e39116c8

9 years agoSave media items in burst with sequential timestamps.
Shashi Shekhar [Fri, 12 Dec 2014 03:01:57 +0000 (19:01 -0800)]
Save media items in burst with sequential timestamps.

Save media items with at least one second difference for burst.

Change-Id: I332a4f19ef754dcf4e82ee9c5725e09ef147bb24

9 years agoPassing an intermediate preview to the session.
I-Jong Lin [Thu, 8 Jan 2015 19:25:57 +0000 (11:25 -0800)]
Passing an intermediate preview to the session.

Generalized the image thumbnail preview task to create artifacts of
multiple shape.  Added this task before the full-sized JPEG decode.
Added a field in the TaskInfo to specify the purpose of the imaging
artifacts on the listener, since the processing of an image may result
in multiple uncompressed/compress artifacts and need extra
explicit identification to be properly routed by listener.  Changed the
default behavior of the ImageBackend to produce an intermediate-sized
preview on job submission.  Routed this intermediate-sized preview to
the CaptureSession for an earlier Filmstrip update.

Bug: 18841584
Change-Id: I8db2d3a7c30cddd1e0e9ddf0709b7867f841b056

9 years agoEnsure button callbacks check lifecycle
Alan Newberger [Sat, 10 Jan 2015 00:02:57 +0000 (16:02 -0800)]
Ensure button callbacks check lifecycle

The button callbacks are asynchronous behind animators. Most in the codebase
(i.e., all in CaptureModule) do paused checks, but the one in CameraAppUI
for grid lines did not and is causing lots of feedback reports with null
SettingsManagers (done in the activity onDestroy). Audited codebase, these
two instances were the only ones not checking.

Bug: 17905718
Change-Id: I31c26088ef1e7d600b4e3be42950b0ca70613e20

9 years agoMerge "Change IllegalStateException to a log." into ub-camera-haleakala
Shashi Shekhar [Fri, 9 Jan 2015 21:03:54 +0000 (21:03 +0000)]
Merge "Change IllegalStateException to a log." into ub-camera-haleakala

9 years agoAdd OneCamera.PictureSaverCallback.
Senpo Hu [Fri, 9 Jan 2015 20:04:51 +0000 (12:04 -0800)]
Add OneCamera.PictureSaverCallback.

Remove the undesirable dependency between ImageBackend and CameraAppUI.

Create a new interface rather than using PictureCallback since
at some points we might consider retiring it.

Change-Id: I6e02564c9ca9990aa847902d86806f8bbd9cd652

9 years agoChange IllegalStateException to a log.
Shashi Shekhar [Fri, 9 Jan 2015 20:24:08 +0000 (12:24 -0800)]
Change IllegalStateException to a log.

Change SurfaceTextureConsumer to ignore new frames when wrapped surface
is null.

Change-Id: I952bdb96c0debc53a0f1548fb66b3221f65f6f7f

9 years agoFix placeholder bug.
Senpo Hu [Thu, 8 Jan 2015 23:06:25 +0000 (15:06 -0800)]
Fix placeholder bug.

Bug: 18947927
Change-Id: I08542d614b15f31398150ea52caa6055ec63ccfb

9 years agoFix crash that occurs when two consecutive smartburst captures taken.
Radford Juang [Thu, 8 Jan 2015 19:20:33 +0000 (11:20 -0800)]
Fix crash that occurs when two consecutive smartburst captures taken.

Change-Id: I771afdd180a0d162b2a8b3c0fc4b8e4cb04baaf0

9 years agoMerge "Refactor the filmstrip backing data." into ub-camera-haleakala
Paul Rohde [Thu, 8 Jan 2015 18:47:34 +0000 (18:47 +0000)]
Merge "Refactor the filmstrip backing data." into ub-camera-haleakala

9 years agoFix bug in ReservableTicketPool not being fair
Puneet Lall [Thu, 8 Jan 2015 18:17:17 +0000 (10:17 -0800)]
Fix bug in ReservableTicketPool not being fair

Calls to acquire() by multiple threads could previously violate fairness
and result in starvation in extreme cases.  The associated unit-test
was previously flaky and failed only occasionally.

Change-Id: I7ae9bead2ac3cb6d7e81e88076bef2ea08e7d368

9 years agoMerge "Instantiate a ImageSaver.Builder in CaptureModule." into ub-camera-haleakala
Senpo Hu [Thu, 8 Jan 2015 00:53:06 +0000 (00:53 +0000)]
Merge "Instantiate a ImageSaver.Builder in CaptureModule." into ub-camera-haleakala

9 years agoInstantiate a ImageSaver.Builder in CaptureModule.
Senpo Hu [Wed, 7 Jan 2015 23:35:49 +0000 (15:35 -0800)]
Instantiate a ImageSaver.Builder in CaptureModule.

We will need different image savers for capture intent.
Since we plan to create a separate module for capture intent,
this change allows modules to be able to choose a different builder.

Bug: 18726217
Change-Id: I5871263123b06958d902cc8e3a4d911f14c83e66

9 years agoMerge "Image Plane Proxy for Image Content Testability" into ub-camera-haleakala
I-Jong Lin [Wed, 7 Jan 2015 23:10:06 +0000 (23:10 +0000)]
Merge "Image Plane Proxy for Image Content Testability" into ub-camera-haleakala

9 years agoImage Plane Proxy for Image Content Testability
I-Jong Lin [Wed, 7 Jan 2015 00:35:19 +0000 (16:35 -0800)]
Image Plane Proxy for Image Content Testability

Adds in an Image Plane wrapper level so that image content can be
decoupled from the native Android Image objects whose constructors
are privated and cannot be extended.

Change-Id: Ia16418d18010e672f6c3e5db64bb7f6a9b3b2f3e

9 years agoRefactor the filmstrip backing data.
Paul Rohde [Thu, 18 Dec 2014 19:11:34 +0000 (11:11 -0800)]
Refactor the filmstrip backing data.

- Remove unused fields and code.
- Rename classes and methods to be consistent with usage
- Make data more immutable
- Add Location and Metadata classes for typed data access.
- Use Date instead of long for DateTime representations.
- Filmstrip prefix for filmstrip specific code.
- Cleaner Glide implementations.
- Initialize Glide bitmap pool.
- Eagerly load large image sizes when scroll stops.

Change-Id: I3b51d42416ca076c80bf7db441d257659174b47d