diff options
author | Shashi Shekhar <shashishekhar@google.com> | 2014-11-12 09:52:19 -0800 |
---|---|---|
committer | Shashi Shekhar <shashishekhar@google.com> | 2014-11-19 15:55:21 -0800 |
commit | 82d592f64966766ac4e4181e08b0d2989d4ed9c3 (patch) | |
tree | ef86a024028677672c693e1080e841fb5cea90e5 /src_pd | |
parent | 0bdc4b54a18c18d7094b2e4cea1e238005c5c4a2 (diff) | |
download | android_packages_apps_Camera2-82d592f64966766ac4e4181e08b0d2989d4ed9c3.tar.gz android_packages_apps_Camera2-82d592f64966766ac4e4181e08b0d2989d4ed9c3.tar.bz2 android_packages_apps_Camera2-82d592f64966766ac4e4181e08b0d2989d4ed9c3.zip |
Hook burst controller to the shutter button long press.
Hooks up the shutter button long press to start the burst.
Introduces a BurstManager to interact with burst.
Provides an implementation of BurstManager that listens to burst and
saves results when burst is complete.
The burst eviction handler is now installed on the ring buffer
on shutter button press and uninstalled on shutter button release.
The ring buffer is cleared before starting and after completion of the
burst.
Also provides a stub implementation of the BurstController that has a
static method which controls if burst is enabled or not.
Bug: 18332704
Change-Id: I1098937bf348af7acbf55da1a5eeb423c30fb901
Diffstat (limited to 'src_pd')
-rw-r--r-- | src_pd/com/android/camera/burst/BurstControllerImpl.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src_pd/com/android/camera/burst/BurstControllerImpl.java b/src_pd/com/android/camera/burst/BurstControllerImpl.java new file mode 100644 index 000000000..dbf8d7755 --- /dev/null +++ b/src_pd/com/android/camera/burst/BurstControllerImpl.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.android.camera.burst; + +import android.content.Context; + +import com.android.camera.gl.FrameDistributor.FrameConsumer; + +/** + * Stub implementation for burst controller. + */ +class BurstControllerImpl implements BurstController { + /** + * Create a new BurstController. + * + * @param context the context of the application. + * @param resultsListener listener for listening to burst events. + */ + public BurstControllerImpl(Context context, BurstResultsListener resultsListener) { + } + + /** + * Returns true if burst mode is supported by camera. + */ + public static boolean isBurstModeSupported() { + return false; + } + + @Override + public BurstConfiguration startBurst() { + return null; + } + + @Override + public void stopBurst(ResultsAccessor resultsAccessor) { + // no op + } + + @Override + public void onPreviewSizeChanged(int width, int height) { + } + + @Override + public void onOrientationChanged(int orientation, boolean isMirrored) { + } + + @Override + public FrameConsumer getPreviewFrameConsumer() { + throw new IllegalStateException("Not implemented."); + } +} |