From a8a96dfce795a6621cdf7b890442fa5ed1252a55 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 14 Apr 2016 13:56:58 -0700 Subject: Initial check-in of Snappy code Snappy will be the basis of DevCamera, so start with its current state. Bug: 27543253 Change-Id: I672190320d9305dff7b7b095d3256d8a270ad693 --- Android.mk | 40 ++ AndroidManifest.xml | 39 ++ res/drawable-hdpi/ic_launcher.png | Bin 0 -> 5115 bytes res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5115 bytes res/drawable-nodpi/ic_capture_camera_normal.png | Bin 0 -> 3547 bytes res/drawable-nodpi/photos.png | Bin 0 -> 4679 bytes res/drawable-nodpi/record_button.png | Bin 0 -> 1558 bytes res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 5115 bytes res/drawable/circle_background.xml | 18 + res/drawable/circle_button.xml | 20 + res/drawable/circle_button_blue.xml | 20 + res/drawable/focus_square_button.xml | 21 + res/drawable/shot_circle.xml | 10 + res/layout/activity_main.xml | 232 +++++++ res/values-sw600dp/dimens.xml | 8 + res/values-sw720dp-land/dimens.xml | 9 + res/values-v11/styles.xml | 11 + res/values-v14/styles.xml | 12 + res/values/colors.xml | 11 + res/values/dimens.xml | 10 + res/values/strings.xml | 16 + res/values/styles.xml | 20 + src/com/google/snappy/BitmapUtility.java | 54 ++ src/com/google/snappy/CameraInfoCache.java | 214 +++++++ src/com/google/snappy/GyroListener.java | 10 + src/com/google/snappy/GyroOperations.java | 92 +++ src/com/google/snappy/MainActivity.java | 545 ++++++++++++++++ src/com/google/snappy/MediaSaver.java | 99 +++ src/com/google/snappy/MyApi2Camera.java | 793 ++++++++++++++++++++++++ src/com/google/snappy/MyCameraInterface.java | 128 ++++ src/com/google/snappy/MyDeviceReport.java | 385 ++++++++++++ src/com/google/snappy/MyLoggingCallbacks.java | 123 ++++ src/com/google/snappy/MyTimer.java | 18 + src/com/google/snappy/NormalizedFace.java | 77 +++ src/com/google/snappy/PreviewOverlay.java | 216 +++++++ 35 files changed, 3251 insertions(+) create mode 100644 Android.mk create mode 100644 AndroidManifest.xml create mode 100644 res/drawable-hdpi/ic_launcher.png create mode 100644 res/drawable-mdpi/ic_launcher.png create mode 100644 res/drawable-nodpi/ic_capture_camera_normal.png create mode 100644 res/drawable-nodpi/photos.png create mode 100644 res/drawable-nodpi/record_button.png create mode 100644 res/drawable-xhdpi/ic_launcher.png create mode 100644 res/drawable/circle_background.xml create mode 100644 res/drawable/circle_button.xml create mode 100644 res/drawable/circle_button_blue.xml create mode 100644 res/drawable/focus_square_button.xml create mode 100644 res/drawable/shot_circle.xml create mode 100644 res/layout/activity_main.xml create mode 100644 res/values-sw600dp/dimens.xml create mode 100644 res/values-sw720dp-land/dimens.xml create mode 100644 res/values-v11/styles.xml create mode 100644 res/values-v14/styles.xml create mode 100644 res/values/colors.xml create mode 100644 res/values/dimens.xml create mode 100644 res/values/strings.xml create mode 100644 res/values/styles.xml create mode 100644 src/com/google/snappy/BitmapUtility.java create mode 100644 src/com/google/snappy/CameraInfoCache.java create mode 100644 src/com/google/snappy/GyroListener.java create mode 100644 src/com/google/snappy/GyroOperations.java create mode 100644 src/com/google/snappy/MainActivity.java create mode 100644 src/com/google/snappy/MediaSaver.java create mode 100644 src/com/google/snappy/MyApi2Camera.java create mode 100644 src/com/google/snappy/MyCameraInterface.java create mode 100644 src/com/google/snappy/MyDeviceReport.java create mode 100644 src/com/google/snappy/MyLoggingCallbacks.java create mode 100644 src/com/google/snappy/MyTimer.java create mode 100644 src/com/google/snappy/NormalizedFace.java create mode 100644 src/com/google/snappy/PreviewOverlay.java diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..256ce47 --- /dev/null +++ b/Android.mk @@ -0,0 +1,40 @@ +# Copyright (C) 2013 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. + +ifeq ($(TARGET_BUILD_JAVA_SUPPORT_LEVEL),platform) + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_SDK_VERSION := current +# LOCAL_SDK_VERSION := 19 + +#LOCAL_STATIC_JAVA_LIBRARIES := android-ex-camera2 + +LOCAL_SRC_FILES := \ + $(call all-java-files-under, src) \ + $(call all-renderscript-files-under, src) + +LOCAL_PACKAGE_NAME := Snappy + +LOCAL_AAPT_FLAGS += --rename-manifest-package com.google.Snappy2 + +LOCAL_JACK_ENABLED := disabled + +include $(BUILD_PACKAGE) + +endif diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..d9904ed --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..16dfd55 Binary files /dev/null and b/res/drawable-hdpi/ic_launcher.png differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..16dfd55 Binary files /dev/null and b/res/drawable-mdpi/ic_launcher.png differ diff --git a/res/drawable-nodpi/ic_capture_camera_normal.png b/res/drawable-nodpi/ic_capture_camera_normal.png new file mode 100644 index 0000000..0360396 Binary files /dev/null and b/res/drawable-nodpi/ic_capture_camera_normal.png differ diff --git a/res/drawable-nodpi/photos.png b/res/drawable-nodpi/photos.png new file mode 100644 index 0000000..26410f7 Binary files /dev/null and b/res/drawable-nodpi/photos.png differ diff --git a/res/drawable-nodpi/record_button.png b/res/drawable-nodpi/record_button.png new file mode 100644 index 0000000..7817eb4 Binary files /dev/null and b/res/drawable-nodpi/record_button.png differ diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..16dfd55 Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ diff --git a/res/drawable/circle_background.xml b/res/drawable/circle_background.xml new file mode 100644 index 0000000..07f7699 --- /dev/null +++ b/res/drawable/circle_background.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/circle_button.xml b/res/drawable/circle_button.xml new file mode 100644 index 0000000..d25a157 --- /dev/null +++ b/res/drawable/circle_button.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/circle_button_blue.xml b/res/drawable/circle_button_blue.xml new file mode 100644 index 0000000..f1f6e3f --- /dev/null +++ b/res/drawable/circle_button_blue.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/focus_square_button.xml b/res/drawable/focus_square_button.xml new file mode 100644 index 0000000..bed0c57 --- /dev/null +++ b/res/drawable/focus_square_button.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/shot_circle.xml b/res/drawable/shot_circle.xml new file mode 100644 index 0000000..9fe49e4 --- /dev/null +++ b/res/drawable/shot_circle.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml new file mode 100644 index 0000000..c54786f --- /dev/null +++ b/res/layout/activity_main.xml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + +