summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2009-11-03 21:09:08 -0800
committerOwen Lin <owenlin@google.com>2009-11-04 01:53:45 -0800
commit46d402ade45b258f4515c42b6940749364557fb3 (patch)
tree2dc8ced4ae80a509d73c0a6de789c9cb4f79505d
parent111bf09fd62bd0c714ef2164c77965fb0db05a8e (diff)
downloadpackages_apps_LegacyCamera-46d402ade45b258f4515c42b6940749364557fb3.zip
packages_apps_LegacyCamera-46d402ade45b258f4515c42b6940749364557fb3.tar.gz
packages_apps_LegacyCamera-46d402ade45b258f4515c42b6940749364557fb3.tar.bz2
Remove some more code.
Change-Id: I5779a15fcffecd9de28e6e1c24a59d3cf0a523f7
-rw-r--r--res/drawable-hdpi/appwidget_bg.9.pngbin2658 -> 0 bytes
-rw-r--r--res/drawable-hdpi/camera_crop_height.pngbin2901 -> 0 bytes
-rw-r--r--res/drawable-hdpi/camera_crop_width.pngbin2908 -> 0 bytes
-rw-r--r--res/drawable-hdpi/image_border_bg_focus_blue.9.pngbin820 -> 0 bytes
-rw-r--r--res/drawable-hdpi/image_border_bg_normal.9.pngbin666 -> 0 bytes
-rw-r--r--res/drawable-hdpi/image_border_bg_pressed_blue.9.pngbin815 -> 0 bytes
-rw-r--r--res/drawable-hdpi/indicator_autocrop.pngbin3266 -> 0 bytes
-rw-r--r--res/drawable-hdpi/photo_inner.9.pngbin412 -> 0 bytes
-rw-r--r--res/drawable-mdpi/appwidget_bg.9.pngbin1736 -> 0 bytes
-rw-r--r--res/drawable-mdpi/camera_crop_height.pngbin2100 -> 0 bytes
-rw-r--r--res/drawable-mdpi/camera_crop_width.pngbin2085 -> 0 bytes
-rw-r--r--res/drawable-mdpi/image_border_bg_focus_blue.9.pngbin3618 -> 0 bytes
-rw-r--r--res/drawable-mdpi/image_border_bg_normal.9.pngbin3423 -> 0 bytes
-rw-r--r--res/drawable-mdpi/image_border_bg_pressed_blue.9.pngbin3418 -> 0 bytes
-rw-r--r--res/drawable-mdpi/indicator_autocrop.pngbin3225 -> 0 bytes
-rw-r--r--res/drawable-mdpi/photo_inner.9.pngbin3000 -> 0 bytes
-rw-r--r--res/layout/cropimage.xml57
-rw-r--r--res/values-cs/strings.xml6
-rw-r--r--res/values-da/strings.xml6
-rw-r--r--res/values-de/strings.xml6
-rw-r--r--res/values-el/strings.xml6
-rw-r--r--res/values-es-rUS/strings.xml6
-rw-r--r--res/values-es/strings.xml6
-rw-r--r--res/values-fr/strings.xml6
-rw-r--r--res/values-it/strings.xml6
-rw-r--r--res/values-ja/strings.xml6
-rw-r--r--res/values-ko/strings.xml6
-rw-r--r--res/values-nb/strings.xml6
-rw-r--r--res/values-nl/strings.xml6
-rw-r--r--res/values-pl/strings.xml6
-rw-r--r--res/values-pt-rPT/strings.xml6
-rw-r--r--res/values-pt/strings.xml6
-rw-r--r--res/values-ru/strings.xml6
-rw-r--r--res/values-sv/strings.xml6
-rw-r--r--res/values-tr/strings.xml6
-rw-r--r--res/values-zh-rCN/strings.xml6
-rw-r--r--res/values-zh-rTW/strings.xml6
-rw-r--r--res/values/strings.xml18
-rw-r--r--res/values/styles.xml2
-rw-r--r--src/com/android/camera/CameraHardwareException.java3
-rw-r--r--src/com/android/camera/CropImage.java792
-rw-r--r--src/com/android/camera/HighlightView.java410
-rw-r--r--src/com/android/camera/ImageManager.java10
-rw-r--r--src/com/android/camera/ImageViewTouchBase.java20
-rw-r--r--src/com/android/camera/MenuHelper.java27
-rw-r--r--src/com/android/camera/MonitoredActivity.java98
-rw-r--r--src/com/android/camera/ThumbnailController.java2
-rw-r--r--src/com/android/camera/Util.java157
-rw-r--r--src/com/android/camera/VideoCamera.java9
-rw-r--r--src/com/android/camera/gallery/IImageList.java5
-rw-r--r--src/com/android/camera/gallery/ImageListUber.java8
-rw-r--r--src/com/android/camera/gallery/SingleImageList.java4
52 files changed, 6 insertions, 1736 deletions
diff --git a/res/drawable-hdpi/appwidget_bg.9.png b/res/drawable-hdpi/appwidget_bg.9.png
deleted file mode 100644
index 6861664..0000000
--- a/res/drawable-hdpi/appwidget_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/camera_crop_height.png b/res/drawable-hdpi/camera_crop_height.png
deleted file mode 100644
index dc157ed..0000000
--- a/res/drawable-hdpi/camera_crop_height.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/camera_crop_width.png b/res/drawable-hdpi/camera_crop_width.png
deleted file mode 100644
index b3f4ee0..0000000
--- a/res/drawable-hdpi/camera_crop_width.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/image_border_bg_focus_blue.9.png b/res/drawable-hdpi/image_border_bg_focus_blue.9.png
deleted file mode 100644
index cd6cde0..0000000
--- a/res/drawable-hdpi/image_border_bg_focus_blue.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/image_border_bg_normal.9.png b/res/drawable-hdpi/image_border_bg_normal.9.png
deleted file mode 100644
index 571c5dd..0000000
--- a/res/drawable-hdpi/image_border_bg_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/image_border_bg_pressed_blue.9.png b/res/drawable-hdpi/image_border_bg_pressed_blue.9.png
deleted file mode 100644
index 36ccfb0..0000000
--- a/res/drawable-hdpi/image_border_bg_pressed_blue.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/indicator_autocrop.png b/res/drawable-hdpi/indicator_autocrop.png
deleted file mode 100644
index 73fa59e..0000000
--- a/res/drawable-hdpi/indicator_autocrop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/photo_inner.9.png b/res/drawable-hdpi/photo_inner.9.png
deleted file mode 100644
index 8d27225..0000000
--- a/res/drawable-hdpi/photo_inner.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/appwidget_bg.9.png b/res/drawable-mdpi/appwidget_bg.9.png
deleted file mode 100644
index 8e7e3d7..0000000
--- a/res/drawable-mdpi/appwidget_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/camera_crop_height.png b/res/drawable-mdpi/camera_crop_height.png
deleted file mode 100644
index b089aec..0000000
--- a/res/drawable-mdpi/camera_crop_height.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/camera_crop_width.png b/res/drawable-mdpi/camera_crop_width.png
deleted file mode 100644
index 65216af..0000000
--- a/res/drawable-mdpi/camera_crop_width.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/image_border_bg_focus_blue.9.png b/res/drawable-mdpi/image_border_bg_focus_blue.9.png
deleted file mode 100644
index 89debd2..0000000
--- a/res/drawable-mdpi/image_border_bg_focus_blue.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/image_border_bg_normal.9.png b/res/drawable-mdpi/image_border_bg_normal.9.png
deleted file mode 100644
index 18e3607..0000000
--- a/res/drawable-mdpi/image_border_bg_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/image_border_bg_pressed_blue.9.png b/res/drawable-mdpi/image_border_bg_pressed_blue.9.png
deleted file mode 100644
index 94fa74f..0000000
--- a/res/drawable-mdpi/image_border_bg_pressed_blue.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/indicator_autocrop.png b/res/drawable-mdpi/indicator_autocrop.png
deleted file mode 100644
index d960b1f..0000000
--- a/res/drawable-mdpi/indicator_autocrop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/photo_inner.9.png b/res/drawable-mdpi/photo_inner.9.png
deleted file mode 100644
index 0e77c7b..0000000
--- a/res/drawable-mdpi/photo_inner.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/cropimage.xml b/res/layout/cropimage.xml
deleted file mode 100644
index dcb8b72..0000000
--- a/res/layout/cropimage.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="horizontal">
-
- <view class="com.android.camera.CropImageView" android:id="@+id/image"
- android:background="#55000000"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_x="0dip"
- android:layout_y="0dip"
- />
- <RelativeLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true">
- <Button
- android:id="@+id/save"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:text="@string/crop_save_text"
- />
- <Button
- android:id="@+id/discard"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:text="@string/crop_discard_text"
- />
- </RelativeLayout>
- </RelativeLayout>
-
-</FrameLayout>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 366fcf1..9778f63 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Než začnete používat fotoaparát, vložte kartu SD."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Vaše karta SD je plná."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Příprava karty SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Nastavování tapety, čekejte prosím..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Ukládání fotografie..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Čekejte prosím..."</string>
<string name="settings" msgid="1534847740615665736">"Nastavení"</string>
<string name="details" msgid="8415120088556445230">"Podrobnosti"</string>
<string name="show_on_map" msgid="441725587731006228">"Zobrazit v Mapách"</string>
<string name="rotate" msgid="460017689320955494">"Otočit"</string>
<string name="rotate_left" msgid="5888273317282539839">"Otočit doleva"</string>
<string name="rotate_right" msgid="6776325835923384839">"Otočit doprava"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Uložit"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Zahodit"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Smazat"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Fotografie bude smazána."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Video bude smazáno."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kb/s"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mb/s"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Začněte klepnutím na obličej."</string>
<string name="sendImage" msgid="7279510542799399570">"Sdílet fotografii pomocí"</string>
<string name="setImage" msgid="7246975856983303047">"Fotografie bude použita jako"</string>
<string name="sendVideo" msgid="3598567735831863073">"Sdílet video pomocí"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 58b32b0..972bb52 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Indsæt et SD-kort, inden du bruger kameraet."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Dit SD-kort er fuldt."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Forbereder SD-kort ..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Indstiller tapet. Vent et øjeblik ..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Gemmer billede ..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Vent ..."</string>
<string name="settings" msgid="1534847740615665736">"Indstillinger"</string>
<string name="details" msgid="8415120088556445230">"Detaljer"</string>
<string name="show_on_map" msgid="441725587731006228">"Vis i Maps"</string>
<string name="rotate" msgid="460017689320955494">"Roter"</string>
<string name="rotate_left" msgid="5888273317282539839">"Roter til venstre"</string>
<string name="rotate_right" msgid="6776325835923384839">"Roter til højre"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Gem"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Kassér"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Slet"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Billedet slettes."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Videoen slettes."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Tryk på et ansigt for at begynde."</string>
<string name="sendImage" msgid="7279510542799399570">"Del billede via"</string>
<string name="setImage" msgid="7246975856983303047">"Indstil billedet som"</string>
<string name="sendVideo" msgid="3598567735831863073">"Del video via"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index a23e4ff..3d85cff 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Legen Sie vor Verwendung der Kamera eine SD-Karte ein."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Ihre SD-Karte ist voll."</string>
<string name="preparing_sd" msgid="2914969119574812666">"SD-Karte wird vorbereitet..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Hintergrund wird eingestellt, bitte warten..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Bild wird gespeichert..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Bitte warten..."</string>
<string name="settings" msgid="1534847740615665736">"Einstellungen"</string>
<string name="details" msgid="8415120088556445230">"Details"</string>
<string name="show_on_map" msgid="441725587731006228">"In Google Maps anzeigen"</string>
<string name="rotate" msgid="460017689320955494">"Drehen"</string>
<string name="rotate_left" msgid="5888273317282539839">"Nach links drehen"</string>
<string name="rotate_right" msgid="6776325835923384839">"Nach rechts drehen"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Speichern"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Verwerfen"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Löschen"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Das Bild wird gelöscht."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Das Video wird gelöscht."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbit/s"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbit/s"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Tippen Sie zum Beginnen auf ein Gesicht."</string>
<string name="sendImage" msgid="7279510542799399570">"Bild senden via"</string>
<string name="setImage" msgid="7246975856983303047">"Bild festlegen als"</string>
<string name="sendVideo" msgid="3598567735831863073">"Video weiterleiten via"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 5fe2a79..0458011 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Πριν χρησιμοποιήσετε τη φωτογραφική μηχανή, εισάγετε μία κάρτα SD."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Η κάρτα SD είναι πλήρης."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Προετοιμασία κάρτας SD…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Ρύθμιση ταπετσαρίας, περιμένετε..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Αποθήκευση εικόνας..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Περιμένετε..."</string>
<string name="settings" msgid="1534847740615665736">"Ρυθμίσεις"</string>
<string name="details" msgid="8415120088556445230">"Λεπτομέρειες"</string>
<string name="show_on_map" msgid="441725587731006228">"Προβολή στους Χάρτες"</string>
<string name="rotate" msgid="460017689320955494">"Περιστροφή"</string>
<string name="rotate_left" msgid="5888273317282539839">"Αριστερή περιστροφή"</string>
<string name="rotate_right" msgid="6776325835923384839">"Δεξιά περιστροφή"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Αποθήκευση"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Απόρριψη"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Διαγραφή"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Η εικόνα θα διαγραφεί."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Το βίντεο θα διαγραφεί."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Πατήστε σε ένα πρόσωπο για να ξεκινήσετε."</string>
<string name="sendImage" msgid="7279510542799399570">"Κοινή χρήση εικόνας μέσω"</string>
<string name="setImage" msgid="7246975856983303047">"Ορισμός εικόνας ως"</string>
<string name="sendVideo" msgid="3598567735831863073">"Κοινή χρήση βίντεο μέσω"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index a68170d..95e305f 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -26,17 +26,12 @@
<string name="no_storage" msgid="820691042667338625">"Inserta una tarjeta SD antes de utilizar la cámara."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Tu tarjeta SD está llena."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Preparando la tarjeta SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Configurando papel tapiz. Espera, por favor..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Guardando imagen..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Espera, por favor..."</string>
<string name="settings" msgid="1534847740615665736">"Configuración"</string>
<string name="details" msgid="8415120088556445230">"Detalles"</string>
<string name="show_on_map" msgid="441725587731006228">"Mostrar en Google Maps"</string>
<string name="rotate" msgid="460017689320955494">"Rotar"</string>
<string name="rotate_left" msgid="5888273317282539839">"Rotar hacia la izquierda"</string>
<string name="rotate_right" msgid="6776325835923384839">"Rotar hacia la derecha"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Guardar"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Eliminar"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Eliminar"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"La imagen se eliminará."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"El video se eliminará."</string>
@@ -151,7 +146,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"Aceptar"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Golpea una cara para comenzar."</string>
<string name="sendImage" msgid="7279510542799399570">"Compartir imagen mediante"</string>
<string name="setImage" msgid="7246975856983303047">"Definir imagen como"</string>
<string name="sendVideo" msgid="3598567735831863073">"Compartir video mediante"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index a36afcf..4ce8d24 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Inserta o activa la tarjeta SD para poder utilizar la cámara."</string>
<string name="not_enough_space" msgid="6655334407957844653">"La tarjeta SD está llena."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Preparando tarjeta SD…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Estableciendo fondo de pantalla..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Guardando imagen..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Por favor, espera..."</string>
<string name="settings" msgid="1534847740615665736">"Ajustes"</string>
<string name="details" msgid="8415120088556445230">"Detalles"</string>
<string name="show_on_map" msgid="441725587731006228">"Mostrar en mapas"</string>
<string name="rotate" msgid="460017689320955494">"Girar"</string>
<string name="rotate_left" msgid="5888273317282539839">"Girar a la izquierda"</string>
<string name="rotate_right" msgid="6776325835923384839">"Girar a la derecha"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Guardar"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Descartar"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Suprimir"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Se eliminará la imagen."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Se eliminará el vídeo."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"Aceptar"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Toca una cara para empezar."</string>
<string name="sendImage" msgid="7279510542799399570">"Compartir imagen por"</string>
<string name="setImage" msgid="7246975856983303047">"Establecer imagen como"</string>
<string name="sendVideo" msgid="3598567735831863073">"Compartir vídeo a través de"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 2b99149..49d3c0a 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Veuillez insérer une carte SD avant d\'utiliser l\'appareil photo."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Votre carte SD est pleine."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Préparation de la carte SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Configuration du fond d\'écran en cours. Veuillez patienter..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Enregistrement de l\'image"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Veuillez patienter..."</string>
<string name="settings" msgid="1534847740615665736">"Paramètres"</string>
<string name="details" msgid="8415120088556445230">"Détails"</string>
<string name="show_on_map" msgid="441725587731006228">"Afficher sur une carte"</string>
<string name="rotate" msgid="460017689320955494">"Faire pivoter"</string>
<string name="rotate_left" msgid="5888273317282539839">"Faire pivoter à gauche"</string>
<string name="rotate_right" msgid="6776325835923384839">"Faire pivoter à droite"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Enregistrer"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Annuler"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Supprimer"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"L\'image sera supprimée."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"La vidéo va être supprimée."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbits/s"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbits/s"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Appuyez sur un visage pour commencer."</string>
<string name="sendImage" msgid="7279510542799399570">"Partager l\'image via"</string>
<string name="setImage" msgid="7246975856983303047">"Définir l\'image comme"</string>
<string name="sendVideo" msgid="3598567735831863073">"Partager la vidéo via"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 12b6020..c8b9e22 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Per usare la fotocamera devi inserire una scheda SD."</string>
<string name="not_enough_space" msgid="6655334407957844653">"La scheda SD è piena."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Preparazione scheda SD…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Impostazione sfondo, attendi..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Salvataggio foto..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Attendere..."</string>
<string name="settings" msgid="1534847740615665736">"Impostazioni"</string>
<string name="details" msgid="8415120088556445230">"Dettagli"</string>
<string name="show_on_map" msgid="441725587731006228">"Mostra su Google Maps"</string>
<string name="rotate" msgid="460017689320955494">"Ruota"</string>
<string name="rotate_left" msgid="5888273317282539839">"Ruota a sinistra"</string>
<string name="rotate_right" msgid="6776325835923384839">"Ruota a destra"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Salva"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Annulla"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Elimina"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"La foto verrà eliminata."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Il video verrà eliminato."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Tocca un viso per iniziare."</string>
<string name="sendImage" msgid="7279510542799399570">"Condividi foto via"</string>
<string name="setImage" msgid="7246975856983303047">"Imposta foto come"</string>
<string name="sendVideo" msgid="3598567735831863073">"Condividi video tramite"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 5109ec7..812c9bf 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"カメラを使用する前にSDカードを挿入してください。"</string>
<string name="not_enough_space" msgid="6655334407957844653">"SDカードがいっぱいです。"</string>
<string name="preparing_sd" msgid="2914969119574812666">"SDカードの準備中..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"壁紙を設定しています。しばらくお待ちください..."</string>
- <string name="savingImage" msgid="3051745378545909260">"写真を保存中..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"お待ちください..."</string>
<string name="settings" msgid="1534847740615665736">"設定"</string>
<string name="details" msgid="8415120088556445230">"詳細情報"</string>
<string name="show_on_map" msgid="441725587731006228">"地図に表示"</string>
<string name="rotate" msgid="460017689320955494">"回転"</string>
<string name="rotate_left" msgid="5888273317282539839">"左に回転"</string>
<string name="rotate_right" msgid="6776325835923384839">"右に回転"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"保存"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"キャンセル"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"削除"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"画像を削除します。"</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"動画を削除します。"</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g>Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g>Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"顔をタップして開始します。"</string>
<string name="sendImage" msgid="7279510542799399570">"画像を共有:"</string>
<string name="setImage" msgid="7246975856983303047">"登録"</string>
<string name="sendVideo" msgid="3598567735831863073">"動画を共有"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 4537d7e..1852054 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"카메라를 사용하려면 SD 카드를 넣으세요."</string>
<string name="not_enough_space" msgid="6655334407957844653">"SD 카드가 꽉 찼습니다."</string>
<string name="preparing_sd" msgid="2914969119574812666">"SD 카드 준비중..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"배경화면을 설정하는 중입니다. 잠시 기다려 주세요..."</string>
- <string name="savingImage" msgid="3051745378545909260">"사진 저장 중..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"잠시 기다려 주세요..."</string>
<string name="settings" msgid="1534847740615665736">"설정"</string>
<string name="details" msgid="8415120088556445230">"세부정보"</string>
<string name="show_on_map" msgid="441725587731006228">"지도에 표시"</string>
<string name="rotate" msgid="460017689320955494">"회전"</string>
<string name="rotate_left" msgid="5888273317282539839">"왼쪽으로 회전"</string>
<string name="rotate_right" msgid="6776325835923384839">"오른쪽으로 회전"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"저장"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"취소"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"삭제"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"사진이 삭제됩니다."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"동영상이 삭제됩니다."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g>Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g>Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"확인"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"시작하려면 얼굴을 탭하세요."</string>
<string name="sendImage" msgid="7279510542799399570">"사진 공유 응용프로그램"</string>
<string name="setImage" msgid="7246975856983303047">"사진을 다음으로 설정"</string>
<string name="sendVideo" msgid="3598567735831863073">"동영상 공유 응용프로그램"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 1b6da13..a80826d 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Sett inn et minnekort før du bruker kameraet."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Minnekortet er fullt."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Forbereder minnekort…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Setter bakgrunnsbilde, vent litt…"</string>
- <string name="savingImage" msgid="3051745378545909260">"Lagrer bilde…"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Vent litt…"</string>
<string name="settings" msgid="1534847740615665736">"Innstillinger"</string>
<string name="details" msgid="8415120088556445230">"Detaljer"</string>
<string name="show_on_map" msgid="441725587731006228">"Vis i Maps"</string>
<string name="rotate" msgid="460017689320955494">"Roter"</string>
<string name="rotate_left" msgid="5888273317282539839">"Roter mot venstre"</string>
<string name="rotate_right" msgid="6776325835923384839">"Roter mot høyre"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Lagre"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Forkast"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Slett"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Bildet vil bli slettet."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Videoen vil bli slettet."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Trykk på et ansikt for å begynne."</string>
<string name="sendImage" msgid="7279510542799399570">"Del bilde via"</string>
<string name="setImage" msgid="7246975856983303047">"Bruk bilde som"</string>
<string name="sendVideo" msgid="3598567735831863073">"Del video via"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 8354e79..881958d 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Plaats een SD-kaart voordat u de camera gebruikt."</string>
<string name="not_enough_space" msgid="6655334407957844653">"De SD-kaart is vol."</string>
<string name="preparing_sd" msgid="2914969119574812666">"SD-kaart voorbereiden…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Achtergrond wordt ingesteld. Een ogenblik geduld..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Foto opslaan..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Een ogenblik geduld..."</string>
<string name="settings" msgid="1534847740615665736">"Instellingen"</string>
<string name="details" msgid="8415120088556445230">"Details"</string>
<string name="show_on_map" msgid="441725587731006228">"Weergeven op Maps"</string>
<string name="rotate" msgid="460017689320955494">"Draaien"</string>
<string name="rotate_left" msgid="5888273317282539839">"Linksom draaien"</string>
<string name="rotate_right" msgid="6776325835923384839">"Rechtsom draaien"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Opslaan"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Ongedaan maken"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Verwijderen"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"De foto wordt verwijderd."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"De video wordt verwijderd."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Tik op een gezicht om te beginnen."</string>
<string name="sendImage" msgid="7279510542799399570">"Foto delen via"</string>
<string name="setImage" msgid="7246975856983303047">"Foto instellen als"</string>
<string name="sendVideo" msgid="3598567735831863073">"Video delen via"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 9f5f4e3..7af617c 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Zanim zaczniesz korzystać z aparatu fotograficznego, włóż kartę SD."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Karta SD jest pełna."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Przygotowywanie karty SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Ustawianie tapety, proszę czekać…"</string>
- <string name="savingImage" msgid="3051745378545909260">"Trwa zapisywanie zdjęcia…"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Proszę czekać…"</string>
<string name="settings" msgid="1534847740615665736">"Ustawienia"</string>
<string name="details" msgid="8415120088556445230">"Szczegóły"</string>
<string name="show_on_map" msgid="441725587731006228">"Pokaż w Mapach Google"</string>
<string name="rotate" msgid="460017689320955494">"Obróć"</string>
<string name="rotate_left" msgid="5888273317282539839">"Obróć w lewo"</string>
<string name="rotate_right" msgid="6776325835923384839">"Obróć w prawo"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Zapisz"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Odrzuć"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Usuń"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Zdjęcie zostanie usunięte."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Film wideo zostanie usunięty."</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> kb/s"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mb/s"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Dotknij twarzy, aby rozpocząć"</string>
<string name="sendImage" msgid="7279510542799399570">"Prześlij zdjęcie następującą drogą:"</string>
<string name="setImage" msgid="7246975856983303047">"Ustaw zdjęcie jako"</string>
<string name="sendVideo" msgid="3598567735831863073">"Prześlij film następującą drogą:"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 6bc6ee9..634859c 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Insira um cartão SD antes de utilizar a câmara."</string>
<string name="not_enough_space" msgid="6655334407957844653">"O cartão SD está cheio."</string>
<string name="preparing_sd" msgid="2914969119574812666">"A preparar o cartão SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"A definir a imagem de fundo, aguarde..."</string>
- <string name="savingImage" msgid="3051745378545909260">"A guardar imagem..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Aguarde..."</string>
<string name="settings" msgid="1534847740615665736">"Definições"</string>
<string name="details" msgid="8415120088556445230">"Detalhes"</string>
<string name="show_on_map" msgid="441725587731006228">"Mostrar no Google Maps"</string>
<string name="rotate" msgid="460017689320955494">"Rodar"</string>
<string name="rotate_left" msgid="5888273317282539839">"Rodar para a esquerda"</string>
<string name="rotate_right" msgid="6776325835923384839">"Rodar para a direita"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Guardar"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Rejeitar"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Eliminar"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"A imagem será eliminada."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"O vídeo será eliminado."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Toque num rosto para começar."</string>
<string name="sendImage" msgid="7279510542799399570">"Partilhar a imagem através de"</string>
<string name="setImage" msgid="7246975856983303047">"Definir imagem como:"</string>
<string name="sendVideo" msgid="3598567735831863073">"Partilhar vídeo através de"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index b0c734f..314653d 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Insira um cartão SD antes de usar a câmera."</string>
<string name="not_enough_space" msgid="6655334407957844653">"O seu cartão SD está cheio."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Preparando o cartão SD…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Configurando o papel de parede, aguarde…"</string>
- <string name="savingImage" msgid="3051745378545909260">"Salvando imagem…"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Aguarde..."</string>
<string name="settings" msgid="1534847740615665736">"Configurações"</string>
<string name="details" msgid="8415120088556445230">"Detalhes"</string>
<string name="show_on_map" msgid="441725587731006228">"Mostrar no Google Maps"</string>
<string name="rotate" msgid="460017689320955494">"Girar"</string>
<string name="rotate_left" msgid="5888273317282539839">"Girar para a esquerda"</string>
<string name="rotate_right" msgid="6776325835923384839">"Girar para a direita"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Salvar"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Descartar"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Excluir"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"A imagem será excluída."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"O vídeo será excluído."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Toque em uma face para começar."</string>
<string name="sendImage" msgid="7279510542799399570">"Compartilhar imagem via"</string>
<string name="setImage" msgid="7246975856983303047">"Definir imagem como"</string>
<string name="sendVideo" msgid="3598567735831863073">"Compartilhar vídeo via"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index f3f40d7..27a952f 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Прежде чем использовать камеру, вставьте SD-карту."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Ваша SD-карта заполнена."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Подготовка карты SD..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Установка обоев, подождите..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Сохранение картинки..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Подождите..."</string>
<string name="settings" msgid="1534847740615665736">"Настройки"</string>
<string name="details" msgid="8415120088556445230">"Сведения"</string>
<string name="show_on_map" msgid="441725587731006228">"Показать в Картах"</string>
<string name="rotate" msgid="460017689320955494">"Повернуть"</string>
<string name="rotate_left" msgid="5888273317282539839">"Повернуть влево"</string>
<string name="rotate_right" msgid="6776325835923384839">"Повернуть вправо"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Сохранить"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Отменить"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Удалить"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Картинка будет удалена."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Видео будет удалено."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Кбит/с"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Мбит/с"</string>
<string name="details_ok" msgid="6848594369924424312">"ОК"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Нажмите лицо, чтобы начать."</string>
<string name="sendImage" msgid="7279510542799399570">"Отправить картинку через"</string>
<string name="setImage" msgid="7246975856983303047">"Установить картинку как"</string>
<string name="sendVideo" msgid="3598567735831863073">"Отправить видео при помощи"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 2797e72..b27e490 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Sätt i ett SD-kort innan du använder kameran."</string>
<string name="not_enough_space" msgid="6655334407957844653">"Ditt SD-kort är fullt."</string>
<string name="preparing_sd" msgid="2914969119574812666">"Förbereder SD-kort…"</string>
- <string name="wallpaper" msgid="9222901738515471972">"Anger bakgrund, vänta…"</string>
- <string name="savingImage" msgid="3051745378545909260">"Sparar bild…"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Vänta…"</string>
<string name="settings" msgid="1534847740615665736">"Inställningar"</string>
<string name="details" msgid="8415120088556445230">"Information"</string>
<string name="show_on_map" msgid="441725587731006228">"Visa på kartor"</string>
<string name="rotate" msgid="460017689320955494">"Rotera"</string>
<string name="rotate_left" msgid="5888273317282539839">"Rotera åt vänster"</string>
<string name="rotate_right" msgid="6776325835923384839">"Rotera åt höger"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Spara"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Ignorera"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Ta bort"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Bilden kommer att tas bort."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Videon kommer att tas bort."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> kbit/s"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbit/s"</string>
<string name="details_ok" msgid="6848594369924424312">"OK"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Peka på ett ansikte när du vill börja."</string>
<string name="sendImage" msgid="7279510542799399570">"Dela bild via"</string>
<string name="setImage" msgid="7246975856983303047">"Använd bild som"</string>
<string name="sendVideo" msgid="3598567735831863073">"Dela video via"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 8193bd8..58577d6 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"Kamerayı kullanmadan önce lütfen bir SD kart takın."</string>
<string name="not_enough_space" msgid="6655334407957844653">"SD kartınız dolu."</string>
<string name="preparing_sd" msgid="2914969119574812666">"SD kart hazırlanıyor..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"Duvar kağıdı ayarlanıyor, lütfen bekleyin..."</string>
- <string name="savingImage" msgid="3051745378545909260">"Resim kaydediliyor..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"Lütfen bekleyin..."</string>
<string name="settings" msgid="1534847740615665736">"Ayarlar"</string>
<string name="details" msgid="8415120088556445230">"Ayrıntılar"</string>
<string name="show_on_map" msgid="441725587731006228">"Google Haritalar\'da göster"</string>
<string name="rotate" msgid="460017689320955494">"Döndür"</string>
<string name="rotate_left" msgid="5888273317282539839">"Sola döndür"</string>
<string name="rotate_right" msgid="6776325835923384839">"Sağa döndür"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"Kaydet"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"Sil"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"Sil"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"Resim silinecek."</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"Video silinecek."</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"Tamam"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"Başlamak için bir yüze hafifçe dokunun"</string>
<string name="sendImage" msgid="7279510542799399570">"Resmi şunun aracılığıyla paylaş:"</string>
<string name="setImage" msgid="7246975856983303047">"Resmi şu şekilde ayarla:"</string>
<string name="sendVideo" msgid="3598567735831863073">"Videoyu şunun aracılığıyla paylaş:"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 256dc43..9dad6a3 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"使用相机前请先插入 SD 卡。"</string>
<string name="not_enough_space" msgid="6655334407957844653">"SD 卡已满。"</string>
<string name="preparing_sd" msgid="2914969119574812666">"正在准备 SD 卡..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"正在设置壁纸,请稍候..."</string>
- <string name="savingImage" msgid="3051745378545909260">"正在保存图片..."</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"请稍候..."</string>
<string name="settings" msgid="1534847740615665736">"设置"</string>
<string name="details" msgid="8415120088556445230">"详细信息"</string>
<string name="show_on_map" msgid="441725587731006228">"显示在地图上"</string>
<string name="rotate" msgid="460017689320955494">"旋转"</string>
<string name="rotate_left" msgid="5888273317282539839">"向左旋转"</string>
<string name="rotate_right" msgid="6776325835923384839">"向右旋转"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"保存"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"舍弃"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"删除"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"将会删除此图片。"</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"将会删除视频。"</string>
@@ -209,7 +204,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"确定"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"点按一张脸开始裁剪。"</string>
<string name="sendImage" msgid="7279510542799399570">"图片分享方式"</string>
<string name="setImage" msgid="7246975856983303047">"将图片设置为"</string>
<string name="sendVideo" msgid="3598567735831863073">"分享视频的方式"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 62c2d3c..e1cada5 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -28,17 +28,12 @@
<string name="no_storage" msgid="820691042667338625">"使用相機前請先插入 SD 卡。"</string>
<string name="not_enough_space" msgid="6655334407957844653">"SD 卡已滿。"</string>
<string name="preparing_sd" msgid="2914969119574812666">"正在準備 SD 卡..."</string>
- <string name="wallpaper" msgid="9222901738515471972">"設定桌布中,請稍候…"</string>
- <string name="savingImage" msgid="3051745378545909260">"儲存相片中…"</string>
- <string name="runningFaceDetection" msgid="2293932204708167704">"請稍候…"</string>
<string name="settings" msgid="1534847740615665736">"設定"</string>
<string name="details" msgid="8415120088556445230">"詳細資料"</string>
<string name="show_on_map" msgid="441725587731006228">"顯示在地圖上"</string>
<string name="rotate" msgid="460017689320955494">"旋轉"</string>
<string name="rotate_left" msgid="5888273317282539839">"向左旋轉"</string>
<string name="rotate_right" msgid="6776325835923384839">"向右旋轉"</string>
- <string name="crop_save_text" msgid="8140440041190264400">"儲存"</string>
- <string name="crop_discard_text" msgid="5303657888280340603">"放棄"</string>
<string name="confirm_delete_title" msgid="263478358046514887">"刪除"</string>
<string name="confirm_delete_message" msgid="4161389939579284604">"刪除相片?"</string>
<string name="confirm_delete_video_message" msgid="5796154324948010221">"刪除這部影片?"</string>
@@ -213,7 +208,6 @@
<string name="details_kbps" msgid="1515369011744784592">"<xliff:g id="SPEED">%1$d</xliff:g> Kbps"</string>
<string name="details_mbps" msgid="3291428849607323284">"<xliff:g id="SPEED">%1$g</xliff:g> Mbps"</string>
<string name="details_ok" msgid="6848594369924424312">"確定"</string>
- <string name="multiface_crop_help" msgid="3127018992717032779">"輕觸所需的臉孔開始裁剪。"</string>
<string name="sendImage" msgid="7279510542799399570">"透過…分享圖片"</string>
<string name="setImage" msgid="7246975856983303047">"設定相片為…"</string>
<string name="sendVideo" msgid="3598567735831863073">"透過…分享影片"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8496f01..27ca6b0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -50,18 +50,8 @@
<!-- alert to the user to that the SD card is being disk-checked -->
<string name="preparing_sd">Preparing SD card\u2026</string>
- <!-- Toast/alert after saving wallpaper -->
- <string name="wallpaper">Setting wallpaper, please wait\u2026</string>
-
<!-- Settings stuff -->
- <!-- Toast/alert that the image is being saved to the SD card -->
- <string name="savingImage">Saving picture\u2026</string>
-
- <!-- Toast/alert that the face detection is being run -->
- <string name="runningFaceDetection">Please wait\u2026</string>
-
-
<!-- Menu items: -->
<!-- menu pick to go to the settings screen -->
<string name="settings">Settings</string>
@@ -81,11 +71,6 @@
<!-- menu pick to rotate the currently selected image to the right -->
<string name="rotate_right">Rotate right</string>
- <!-- button indicating that the cropped image should be saved -->
- <string name="crop_save_text">Save</string>
- <!-- button indicating that the cropped image should be reverted back to the original -->
- <string name="crop_discard_text">Discard</string>
-
<!-- Confirmation dialog title after deleting a picture -->
<string name="confirm_delete_title">Delete</string>
<!-- Confirmation dialog message after deleting a picture -->
@@ -363,9 +348,6 @@
<!-- Details dialog "OK" button. Dismisses dialog. -->
<string name="details_ok">OK</string>
- <!-- Hint that appears when cropping an image with more than one face -->
- <string name="multiface_crop_help">Tap a face to begin.</string>
-
<!-- Displayed in the title of the dialog for things to do with a picture that
is to be sent to another application: -->
<string name="sendImage">Share picture via</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f2204d1..4a79fe5 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -57,8 +57,6 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
</style>
- <style name="Theme.DeleteImageDialog" parent="android:style/Theme.Dialog.Alert">
- </style>
<style name="NoEnterExitAnimation">
<item name="android:windowEnterAnimation">@null</item>
<item name="android:windowExitAnimation">@null</item>
diff --git a/src/com/android/camera/CameraHardwareException.java b/src/com/android/camera/CameraHardwareException.java
index d1e4387..8209055 100644
--- a/src/com/android/camera/CameraHardwareException.java
+++ b/src/com/android/camera/CameraHardwareException.java
@@ -22,9 +22,6 @@ package com.android.camera;
*/
public class CameraHardwareException extends Exception {
- public CameraHardwareException() {
- }
-
public CameraHardwareException(Throwable t) {
super(t);
}
diff --git a/src/com/android/camera/CropImage.java b/src/com/android/camera/CropImage.java
deleted file mode 100644
index 6a52d72..0000000
--- a/src/com/android/camera/CropImage.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * Copyright (C) 2007 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;
-
-import com.android.camera.gallery.IImage;
-import com.android.camera.gallery.IImageList;
-
-import android.app.WallpaperManager;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Matrix;
-import android.graphics.Path;
-import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Region;
-import android.media.FaceDetector;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.provider.MediaStore;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
-import android.widget.Toast;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * The activity can crop specific region of interest from an image.
- */
-public class CropImage extends MonitoredActivity {
- private static final String TAG = "CropImage";
-
- // These are various options can be specified in the intent.
- private Bitmap.CompressFormat mOutputFormat =
- Bitmap.CompressFormat.JPEG; // only used with mSaveUri
- private Uri mSaveUri = null;
- private boolean mSetWallpaper = false;
- private int mAspectX, mAspectY;
- private boolean mDoFaceDetection = true;
- private boolean mCircleCrop = false;
- private final Handler mHandler = new Handler();
-
- // These options specifiy the output image size and whether we should
- // scale the output to fit it (or just crop it).
- private int mOutputX, mOutputY;
- private boolean mScale;
- private boolean mScaleUp = true;
-
- boolean mWaitingToPick; // Whether we are wait the user to pick a face.
- boolean mSaving; // Whether the "save" button is already clicked.
-
- private CropImageView mImageView;
- private ContentResolver mContentResolver;
-
- private Bitmap mBitmap;
- HighlightView mCrop;
-
- private IImageList mAllImages;
- private IImage mImage;
-
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mContentResolver = getContentResolver();
-
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(R.layout.cropimage);
-
- mImageView = (CropImageView) findViewById(R.id.image);
-
- MenuHelper.showStorageToast(this);
-
- Intent intent = getIntent();
- Bundle extras = intent.getExtras();
-
- if (extras != null) {
- if (extras.getString("circleCrop") != null) {
- mCircleCrop = true;
- mAspectX = 1;
- mAspectY = 1;
- }
- mSaveUri = (Uri) extras.getParcelable(MediaStore.EXTRA_OUTPUT);
- if (mSaveUri != null) {
- String outputFormatString = extras.getString("outputFormat");
- if (outputFormatString != null) {
- mOutputFormat = Bitmap.CompressFormat.valueOf(
- outputFormatString);
- }
- } else {
- mSetWallpaper = extras.getBoolean("setWallpaper");
- }
- mBitmap = (Bitmap) extras.getParcelable("data");
- mAspectX = extras.getInt("aspectX");
- mAspectY = extras.getInt("aspectY");
- mOutputX = extras.getInt("outputX");
- mOutputY = extras.getInt("outputY");
- mScale = extras.getBoolean("scale", true);
- mScaleUp = extras.getBoolean("scaleUpIfNeeded", true);
- mDoFaceDetection = extras.containsKey("noFaceDetection")
- ? !extras.getBoolean("noFaceDetection")
- : true;
- }
-
- if (mBitmap == null) {
- Uri target = intent.getData();
- mAllImages = ImageManager.makeImageList(mContentResolver, target,
- ImageManager.SORT_ASCENDING);
- mImage = mAllImages.getImageForUri(target);
- if (mImage != null) {
- // Don't read in really large bitmaps. Use the (big) thumbnail
- // instead.
- // TODO when saving the resulting bitmap use the
- // decode/crop/encode api so we don't lose any resolution.
- mBitmap = mImage.thumbBitmap(IImage.ROTATE_AS_NEEDED);
- }
- }
-
- if (mBitmap == null) {
- finish();
- return;
- }
-
- // Make UI fullscreen.
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
-
- findViewById(R.id.discard).setOnClickListener(
- new View.OnClickListener() {
- public void onClick(View v) {
- setResult(RESULT_CANCELED);
- finish();
- }
- });
-
- findViewById(R.id.save).setOnClickListener(
- new View.OnClickListener() {
- public void onClick(View v) {
- onSaveClicked();
- }
- });
-
- startFaceDetection();
- }
-
- private void startFaceDetection() {
- if (isFinishing()) {
- return;
- }
-
- mImageView.setImageBitmapResetBase(mBitmap, true);
-
- Util.startBackgroundJob(this, null,
- getResources().getString(R.string.runningFaceDetection),
- new Runnable() {
- public void run() {
- final CountDownLatch latch = new CountDownLatch(1);
- final Bitmap b = (mImage != null)
- ? mImage.fullSizeBitmap(IImage.UNCONSTRAINED,
- 1024 * 1024)
- : mBitmap;
- mHandler.post(new Runnable() {
- public void run() {
- if (b != mBitmap && b != null) {
- mImageView.setImageBitmapResetBase(b, true);
- mBitmap.recycle();
- mBitmap = b;
- }
- if (mImageView.getScale() == 1F) {
- mImageView.center(true, true);
- }
- latch.countDown();
- }
- });
- try {
- latch.await();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- mRunFaceDetection.run();
- }
- }, mHandler);
- }
-
- private void onSaveClicked() {
- // TODO this code needs to change to use the decode/crop/encode single
- // step api so that we don't require that the whole (possibly large)
- // bitmap doesn't have to be read into memory
- if (mCrop == null) {
- return;
- }
-
- if (mSaving) return;
- mSaving = true;
-
- Bitmap croppedImage;
-
- // If the output is required to a specific size, create an new image
- // with the cropped image in the center and the extra space filled.
- if (mOutputX != 0 && mOutputY != 0 && !mScale) {
- // Don't scale the image but instead fill it so it's the
- // required dimension
- croppedImage = Bitmap.createBitmap(mOutputX, mOutputY,
- Bitmap.Config.RGB_565);
- Canvas canvas = new Canvas(croppedImage);
-
- Rect srcRect = mCrop.getCropRect();
- Rect dstRect = new Rect(0, 0, mOutputX, mOutputY);
-
- int dx = (srcRect.width() - dstRect.width()) / 2;
- int dy = (srcRect.height() - dstRect.height()) / 2;
-
- // If the srcRect is too big, use the center part of it.
- srcRect.inset(Math.max(0, dx), Math.max(0, dy));
-
- // If the dstRect is too big, use the center part of it.
- dstRect.inset(Math.max(0, -dx), Math.max(0, -dy));
-
- // Draw the cropped bitmap in the center
- canvas.drawBitmap(mBitmap, srcRect, dstRect, null);
-
- // Release bitmap memory as soon as possible
- mImageView.clear();
- mBitmap.recycle();
- } else {
- Rect r = mCrop.getCropRect();
-
- int width = r.width();
- int height = r.height();
-
- // If we are circle cropping, we want alpha channel, which is the
- // third param here.
- croppedImage = Bitmap.createBitmap(width, height,
- mCircleCrop
- ? Bitmap.Config.ARGB_8888
- : Bitmap.Config.RGB_565);
-
- Canvas canvas = new Canvas(croppedImage);
- Rect dstRect = new Rect(0, 0, width, height);
- canvas.drawBitmap(mBitmap, r, dstRect, null);
-
- // Release bitmap memory as soon as possible
- mImageView.clear();
- mBitmap.recycle();
-
- if (mCircleCrop) {
- // OK, so what's all this about?
- // Bitmaps are inherently rectangular but we want to return
- // something that's basically a circle. So we fill in the
- // area around the circle with alpha. Note the all important
- // PortDuff.Mode.CLEAR.
- Canvas c = new Canvas(croppedImage);
- Path p = new Path();
- p.addCircle(width / 2F, height / 2F, width / 2F,
- Path.Direction.CW);
- c.clipPath(p, Region.Op.DIFFERENCE);
- c.drawColor(0x00000000, PorterDuff.Mode.CLEAR);
- }
-
- // If the required dimension is specified, scale the image.
- if (mOutputX != 0 && mOutputY != 0 && mScale) {
- croppedImage = Util.transform(new Matrix(), croppedImage,
- mOutputX, mOutputY, mScaleUp, Util.RECYCLE_INPUT);
- }
- }
-
- mImageView.setImageBitmapResetBase(croppedImage, true);
- mImageView.center(true, true);
- mImageView.mHighlightViews.clear();
-
- // Return the cropped image directly or save it to the specified URI.
- Bundle myExtras = getIntent().getExtras();
- if (myExtras != null && (myExtras.getParcelable("data") != null
- || myExtras.getBoolean("return-data"))) {
- Bundle extras = new Bundle();
- extras.putParcelable("data", croppedImage);
- setResult(RESULT_OK,
- (new Intent()).setAction("inline-data").putExtras(extras));
- finish();
- } else {
- final Bitmap b = croppedImage;
- final int msdId = mSetWallpaper
- ? R.string.wallpaper
- : R.string.savingImage;
- Util.startBackgroundJob(this, null,
- getResources().getString(msdId),
- new Runnable() {
- public void run() {
- saveOutput(b);
- }
- }, mHandler);
- }
- }
-
- private void saveOutput(Bitmap croppedImage) {
- if (mSaveUri != null) {
- OutputStream outputStream = null;
- try {
- outputStream = mContentResolver.openOutputStream(mSaveUri);
- if (outputStream != null) {
- croppedImage.compress(mOutputFormat, 75, outputStream);
- }
- } catch (IOException ex) {
- // TODO: report error to caller
- Log.e(TAG, "Cannot open file: " + mSaveUri, ex);
- } finally {
- Util.closeSilently(outputStream);
- }
- Bundle extras = new Bundle();
- setResult(RESULT_OK, new Intent(mSaveUri.toString())
- .putExtras(extras));
- } else if (mSetWallpaper) {
- try {
- WallpaperManager.getInstance(this).setBitmap(croppedImage);
- setResult(RESULT_OK);
- } catch (IOException e) {
- Log.e(TAG, "Failed to set wallpaper.", e);
- setResult(RESULT_CANCELED);
- }
- } else {
- Bundle extras = new Bundle();
- extras.putString("rect", mCrop.getCropRect().toString());
-
- File oldPath = new File(mImage.getDataPath());
- File directory = new File(oldPath.getParent());
-
- int x = 0;
- String fileName = oldPath.getName();
- fileName = fileName.substring(0, fileName.lastIndexOf("."));
-
- // Try file-1.jpg, file-2.jpg, ... until we find a filename which
- // does not exist yet.
- while (true) {
- x += 1;
- String candidate = directory.toString()
- + "/" + fileName + "-" + x + ".jpg";
- boolean exists = (new File(candidate)).exists();
- if (!exists) {
- break;
- }
- }
-
- try {
- int[] degree = new int[1];
- Uri newUri = ImageManager.addImage(
- mContentResolver,
- mImage.getTitle(),
- mImage.getDateTaken(),
- null, // TODO this null is going to cause us to lose
- // the location (gps).
- directory.toString(), fileName + "-" + x + ".jpg",
- croppedImage, null,
- degree);
-
- setResult(RESULT_OK, new Intent()
- .setAction(newUri.toString())
- .putExtras(extras));
- } catch (Exception ex) {
- // basically ignore this or put up
- // some ui saying we failed
- Log.e(TAG, "store image fail, continue anyway", ex);
- }
- }
-
- final Bitmap b = croppedImage;
- mHandler.post(new Runnable() {
- public void run() {
- mImageView.clear();
- b.recycle();
- }
- });
-
- finish();
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- }
-
- @Override
- protected void onDestroy() {
- if (mAllImages != null) {
- mAllImages.close();
- }
- super.onDestroy();
- }
-
- Runnable mRunFaceDetection = new Runnable() {
- @SuppressWarnings("hiding")
- float mScale = 1F;
- Matrix mImageMatrix;
- FaceDetector.Face[] mFaces = new FaceDetector.Face[3];
- int mNumFaces;
-
- // For each face, we create a HightlightView for it.
- private void handleFace(FaceDetector.Face f) {
- PointF midPoint = new PointF();
-
- int r = ((int) (f.eyesDistance() * mScale)) * 2;
- f.getMidPoint(midPoint);
- midPoint.x *= mScale;
- midPoint.y *= mScale;
-
- int midX = (int) midPoint.x;
- int midY = (int) midPoint.y;
-
- HighlightView hv = new HighlightView(mImageView);
-
- int width = mBitmap.getWidth();
- int height = mBitmap.getHeight();
-
- Rect imageRect = new Rect(0, 0, width, height);
-
- RectF faceRect = new RectF(midX, midY, midX, midY);
- faceRect.inset(-r, -r);
- if (faceRect.left < 0) {
- faceRect.inset(-faceRect.left, -faceRect.left);
- }
-
- if (faceRect.top < 0) {
- faceRect.inset(-faceRect.top, -faceRect.top);
- }
-
- if (faceRect.right > imageRect.right) {
- faceRect.inset(faceRect.right - imageRect.right,
- faceRect.right - imageRect.right);
- }
-
- if (faceRect.bottom > imageRect.bottom) {
- faceRect.inset(faceRect.bottom - imageRect.bottom,
- faceRect.bottom - imageRect.bottom);
- }
-
- hv.setup(mImageMatrix, imageRect, faceRect, mCircleCrop,
- mAspectX != 0 && mAspectY != 0);
-
- mImageView.add(hv);
- }
-
- // Create a default HightlightView if we found no face in the picture.
- private void makeDefault() {
- HighlightView hv = new HighlightView(mImageView);
-
- int width = mBitmap.getWidth();
- int height = mBitmap.getHeight();
-
- Rect imageRect = new Rect(0, 0, width, height);
-
- // make the default size about 4/5 of the width or height
- int cropWidth = Math.min(width, height) * 4 / 5;
- int cropHeight = cropWidth;
-
- if (mAspectX != 0 && mAspectY != 0) {
- if (mAspectX > mAspectY) {
- cropHeight = cropWidth * mAspectY / mAspectX;
- } else {
- cropWidth = cropHeight * mAspectX / mAspectY;
- }
- }
-
- int x = (width - cropWidth) / 2;
- int y = (height - cropHeight) / 2;
-
- RectF cropRect = new RectF(x, y, x + cropWidth, y + cropHeight);
- hv.setup(mImageMatrix, imageRect, cropRect, mCircleCrop,
- mAspectX != 0 && mAspectY != 0);
- mImageView.add(hv);
- }
-
- // Scale the image down for faster face detection.
- private Bitmap prepareBitmap() {
- if (mBitmap == null) {
- return null;
- }
-
- // 256 pixels wide is enough.
- if (mBitmap.getWidth() > 256) {
- mScale = 256.0F / mBitmap.getWidth();
- }
- Matrix matrix = new Matrix();
- matrix.setScale(mScale, mScale);
- Bitmap faceBitmap = Bitmap.createBitmap(mBitmap, 0, 0, mBitmap
- .getWidth(), mBitmap.getHeight(), matrix, true);
- return faceBitmap;
- }
-
- public void run() {
- mImageMatrix = mImageView.getImageMatrix();
- Bitmap faceBitmap = prepareBitmap();
-
- mScale = 1.0F / mScale;
- if (faceBitmap != null && mDoFaceDetection) {
- FaceDetector detector = new FaceDetector(faceBitmap.getWidth(),
- faceBitmap.getHeight(), mFaces.length);
- mNumFaces = detector.findFaces(faceBitmap, mFaces);
- }
-
- if (faceBitmap != null && faceBitmap != mBitmap) {
- faceBitmap.recycle();
- }
-
- mHandler.post(new Runnable() {
- public void run() {
- mWaitingToPick = mNumFaces > 1;
- if (mNumFaces > 0) {
- for (int i = 0; i < mNumFaces; i++) {
- handleFace(mFaces[i]);
- }
- } else {
- makeDefault();
- }
- mImageView.invalidate();
- if (mImageView.mHighlightViews.size() == 1) {
- mCrop = mImageView.mHighlightViews.get(0);
- mCrop.setFocus(true);
- }
-
- if (mNumFaces > 1) {
- Toast t = Toast.makeText(CropImage.this,
- R.string.multiface_crop_help,
- Toast.LENGTH_SHORT);
- t.show();
- }
- }
- });
- }
- };
-}
-
-class CropImageView extends ImageViewTouchBase {
- ArrayList<HighlightView> mHighlightViews = new ArrayList<HighlightView>();
- HighlightView mMotionHighlightView = null;
- float mLastX, mLastY;
- int mMotionEdge;
-
- @Override
- protected void onLayout(boolean changed, int left, int top,
- int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- if (mBitmapDisplayed.getBitmap() != null) {
- for (HighlightView hv : mHighlightViews) {
- hv.mMatrix.set(getImageMatrix());
- hv.invalidate();
- if (hv.mIsFocused) {
- centerBasedOnHighlightView(hv);
- }
- }
- }
- }
-
- public CropImageView(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- protected void zoomTo(float scale, float centerX, float centerY) {
- super.zoomTo(scale, centerX, centerY);
- for (HighlightView hv : mHighlightViews) {
- hv.mMatrix.set(getImageMatrix());
- hv.invalidate();
- }
- }
-
- @Override
- protected void zoomIn() {
- super.zoomIn();
- for (HighlightView hv : mHighlightViews) {
- hv.mMatrix.set(getImageMatrix());
- hv.invalidate();
- }
- }
-
- @Override
- protected void zoomOut() {
- super.zoomOut();
- for (HighlightView hv : mHighlightViews) {
- hv.mMatrix.set(getImageMatrix());
- hv.invalidate();
- }
- }
-
- @Override
- protected void postTranslate(float deltaX, float deltaY) {
- super.postTranslate(deltaX, deltaY);
- for (int i = 0; i < mHighlightViews.size(); i++) {
- HighlightView hv = mHighlightViews.get(i);
- hv.mMatrix.postTranslate(deltaX, deltaY);
- hv.invalidate();
- }
- }
-
- // According to the event's position, change the focus to the first
- // hitting cropping rectangle.
- private void recomputeFocus(MotionEvent event) {
- for (int i = 0; i < mHighlightViews.size(); i++) {
- HighlightView hv = mHighlightViews.get(i);
- hv.setFocus(false);
- hv.invalidate();
- }
-
- for (int i = 0; i < mHighlightViews.size(); i++) {
- HighlightView hv = mHighlightViews.get(i);
- int edge = hv.getHit(event.getX(), event.getY());
- if (edge != HighlightView.GROW_NONE) {
- if (!hv.hasFocus()) {
- hv.setFocus(true);
- hv.invalidate();
- }
- break;
- }
- }
- invalidate();
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- CropImage cropImage = (CropImage) mContext;
- if (cropImage.mSaving) {
- return false;
- }
-
- switch (event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- if (cropImage.mWaitingToPick) {
- recomputeFocus(event);
- } else {
- for (int i = 0; i < mHighlightViews.size(); i++) {
- HighlightView hv = mHighlightViews.get(i);
- int edge = hv.getHit(event.getX(), event.getY());
- if (edge != HighlightView.GROW_NONE) {
- mMotionEdge = edge;
- mMotionHighlightView = hv;
- mLastX = event.getX();
- mLastY = event.getY();
- mMotionHighlightView.setMode(
- (edge == HighlightView.MOVE)
- ? HighlightView.ModifyMode.Move
- : HighlightView.ModifyMode.Grow);
- break;
- }
- }
- }
- break;
- case MotionEvent.ACTION_UP:
- if (cropImage.mWaitingToPick) {
- for (int i = 0; i < mHighlightViews.size(); i++) {
- HighlightView hv = mHighlightViews.get(i);
- if (hv.hasFocus()) {
- cropImage.mCrop = hv;
- for (int j = 0; j < mHighlightViews.size(); j++) {
- if (j == i) {
- continue;
- }
- mHighlightViews.get(j).setHidden(true);
- }
- centerBasedOnHighlightView(hv);
- ((CropImage) mContext).mWaitingToPick = false;
- return true;
- }
- }
- } else if (mMotionHighlightView != null) {
- centerBasedOnHighlightView(mMotionHighlightView);
- mMotionHighlightView.setMode(
- HighlightView.ModifyMode.None);
- }
- mMotionHighlightView = null;
- break;
- case MotionEvent.ACTION_MOVE:
- if (cropImage.mWaitingToPick) {
- recomputeFocus(event);
- } else if (mMotionHighlightView != null) {
- mMotionHighlightView.handleMotion(mMotionEdge,
- event.getX() - mLastX,
- event.getY() - mLastY);
- mLastX = event.getX();
- mLastY = event.getY();
-
- if (true) {
- // This section of code is optional. It has some user
- // benefit in that moving the crop rectangle against
- // the edge of the screen causes scrolling but it means
- // that the crop rectangle is no longer fixed under
- // the user's finger.
- ensureVisible(mMotionHighlightView);
- }
- }
- break;
- }
-
- switch (event.getAction()) {
- case MotionEvent.ACTION_UP:
- center(true, true);
- break;
- case MotionEvent.ACTION_MOVE:
- // if we're not zoomed then there's no point in even allowing
- // the user to move the image around. This call to center puts
- // it back to the normalized location (with false meaning don't
- // animate).
- if (getScale() == 1F) {
- center(true, true);
- }
- break;
- }
-
- return true;
- }
-
- // Pan the displayed image to make sure the cropping rectangle is visible.
- private void ensureVisible(HighlightView hv) {
- Rect r = hv.mDrawRect;
-
- int panDeltaX1 = Math.max(0, mLeft - r.left);
- int panDeltaX2 = Math.min(0, mRight - r.right);
-
- int panDeltaY1 = Math.max(0, mTop - r.top);
- int panDeltaY2 = Math.min(0, mBottom - r.bottom);
-
- int panDeltaX = panDeltaX1 != 0 ? panDeltaX1 : panDeltaX2;
- int panDeltaY = panDeltaY1 != 0 ? panDeltaY1 : panDeltaY2;
-
- if (panDeltaX != 0 || panDeltaY != 0) {
- panBy(panDeltaX, panDeltaY);
- }
- }
-
- // If the cropping rectangle's size changed significantly, change the
- // view's center and scale according to the cropping rectangle.
- private void centerBasedOnHighlightView(HighlightView hv) {
- Rect drawRect = hv.mDrawRect;
-
- float width = drawRect.width();
- float height = drawRect.height();
-
- float thisWidth = getWidth();
- float thisHeight = getHeight();
-
- float z1 = thisWidth / width * .6F;
- float z2 = thisHeight / height * .6F;
-
- float zoom = Math.min(z1, z2);
- zoom = zoom * this.getScale();
- zoom = Math.max(1F, zoom);
-
- if ((Math.abs(zoom - getScale()) / zoom) > .1) {
- float [] coordinates = new float[] {hv.mCropRect.centerX(),
- hv.mCropRect.centerY()};
- getImageMatrix().mapPoints(coordinates);
- zoomTo(zoom, coordinates[0], coordinates[1], 300F);
- }
-
- ensureVisible(hv);
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
- for (int i = 0; i < mHighlightViews.size(); i++) {
- mHighlightViews.get(i).draw(canvas);
- }
- }
-
- public void add(HighlightView hv) {
- mHighlightViews.add(hv);
- invalidate();
- }
-}
diff --git a/src/com/android/camera/HighlightView.java b/src/com/android/camera/HighlightView.java
deleted file mode 100644
index c05a4b2..0000000
--- a/src/com/android/camera/HighlightView.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Copyright (C) 2007 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;
-
-import android.graphics.Canvas;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.Path;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Region;
-import android.graphics.drawable.Drawable;
-import android.view.View;
-
-// This class is used by CropImage to display a highlighted cropping rectangle
-// overlayed with the image. There are two coordinate spaces in use. One is
-// image, another is screen. computeLayout() uses mMatrix to map from image
-// space to screen space.
-class HighlightView {
-
- @SuppressWarnings("unused")
- private static final String TAG = "HighlightView";
- View mContext; // The View displaying the image.
-
- public static final int GROW_NONE = (1 << 0);
- public static final int GROW_LEFT_EDGE = (1 << 1);
- public static final int GROW_RIGHT_EDGE = (1 << 2);
- public static final int GROW_TOP_EDGE = (1 << 3);
- public static final int GROW_BOTTOM_EDGE = (1 << 4);
- public static final int MOVE = (1 << 5);
-
- public HighlightView(View ctx) {
- mContext = ctx;
- }
-
- private void init() {
- android.content.res.Resources resources = mContext.getResources();
- mResizeDrawableWidth =
- resources.getDrawable(R.drawable.camera_crop_width);
- mResizeDrawableHeight =
- resources.getDrawable(R.drawable.camera_crop_height);
- mResizeDrawableDiagonal =
- resources.getDrawable(R.drawable.indicator_autocrop);
- }
-
- boolean mIsFocused;
- boolean mHidden;
-
- public boolean hasFocus() {
- return mIsFocused;
- }
-
- public void setFocus(boolean f) {
- mIsFocused = f;
- }
-
- public void setHidden(boolean hidden) {
- mHidden = hidden;
- }
-
- protected void draw(Canvas canvas) {
- if (mHidden) {
- return;
- }
- canvas.save();
- Path path = new Path();
- if (!hasFocus()) {
- mOutlinePaint.setColor(0xFF000000);
- canvas.drawRect(mDrawRect, mOutlinePaint);
- } else {
- Rect viewDrawingRect = new Rect();
- mContext.getDrawingRect(viewDrawingRect);
- if (mCircle) {
- float width = mDrawRect.width();
- float height = mDrawRect.height();
- path.addCircle(mDrawRect.left + (width / 2),
- mDrawRect.top + (height / 2),
- width / 2,
- Path.Direction.CW);
- mOutlinePaint.setColor(0xFFEF04D6);
- } else {
- path.addRect(new RectF(mDrawRect), Path.Direction.CW);
- mOutlinePaint.setColor(0xFFFF8A00);
- }
- canvas.clipPath(path, Region.Op.DIFFERENCE);
- canvas.drawRect(viewDrawingRect,
- hasFocus() ? mFocusPaint : mNoFocusPaint);
-
- canvas.restore();
- canvas.drawPath(path, mOutlinePaint);
-
- if (mMode == ModifyMode.Grow) {
- if (mCircle) {
- int width = mResizeDrawableDiagonal.getIntrinsicWidth();
- int height = mResizeDrawableDiagonal.getIntrinsicHeight();
-
- int d = (int) Math.round(Math.cos(/*45deg*/Math.PI / 4D)
- * (mDrawRect.width() / 2D));
- int x = mDrawRect.left
- + (mDrawRect.width() / 2) + d - width / 2;
- int y = mDrawRect.top
- + (mDrawRect.height() / 2) - d - height / 2;
- mResizeDrawableDiagonal.setBounds(x, y,
- x + mResizeDrawableDiagonal.getIntrinsicWidth(),
- y + mResizeDrawableDiagonal.getIntrinsicHeight());
- mResizeDrawableDiagonal.draw(canvas);
- } else {
- int left = mDrawRect.left + 1;
- int right = mDrawRect.right + 1;
- int top = mDrawRect.top + 4;
- int bottom = mDrawRect.bottom + 3;
-
- int widthWidth =
- mResizeDrawableWidth.getIntrinsicWidth() / 2;
- int widthHeight =
- mResizeDrawableWidth.getIntrinsicHeight() / 2;
- int heightHeight =
- mResizeDrawableHeight.getIntrinsicHeight() / 2;
- int heightWidth =
- mResizeDrawableHeight.getIntrinsicWidth() / 2;
-
- int xMiddle = mDrawRect.left
- + ((mDrawRect.right - mDrawRect.left) / 2);
- int yMiddle = mDrawRect.top
- + ((mDrawRect.bottom - mDrawRect.top) / 2);
-
- mResizeDrawableWidth.setBounds(left - widthWidth,
- yMiddle - widthHeight,
- left + widthWidth,
- yMiddle + widthHeight);
- mResizeDrawableWidth.draw(canvas);
-
- mResizeDrawableWidth.setBounds(right - widthWidth,
- yMiddle - widthHeight,
- right + widthWidth,
- yMiddle + widthHeight);
- mResizeDrawableWidth.draw(canvas);
-
- mResizeDrawableHeight.setBounds(xMiddle - heightWidth,
- top - heightHeight,
- xMiddle + heightWidth,
- top + heightHeight);
- mResizeDrawableHeight.draw(canvas);
-
- mResizeDrawableHeight.setBounds(xMiddle - heightWidth,
- bottom - heightHeight,
- xMiddle + heightWidth,
- bottom + heightHeight);
- mResizeDrawableHeight.draw(canvas);
- }
- }
- }
- }
-
- public void setMode(ModifyMode mode) {
- if (mode != mMode) {
- mMode = mode;
- mContext.invalidate();
- }
- }
-
- // Determines which edges are hit by touching at (x, y).
- public int getHit(float x, float y) {
- Rect r = computeLayout();
- final float hysteresis = 20F;
- int retval = GROW_NONE;
-
- if (mCircle) {
- float distX = x - r.centerX();
- float distY = y - r.centerY();
- int distanceFromCenter =
- (int) Math.sqrt(distX * distX + distY * distY);
- int radius = mDrawRect.width() / 2;
- int delta = distanceFromCenter - radius;
- if (Math.abs(delta) <= hysteresis) {
- if (Math.abs(distY) > Math.abs(distX)) {
- if (distY < 0) {
- retval = GROW_TOP_EDGE;
- } else {
- retval = GROW_BOTTOM_EDGE;
- }
- } else {
- if (distX < 0) {
- retval = GROW_LEFT_EDGE;
- } else {
- retval = GROW_RIGHT_EDGE;
- }
- }
- } else if (distanceFromCenter < radius) {
- retval = MOVE;
- } else {
- retval = GROW_NONE;
- }
- } else {
- // verticalCheck makes sure the position is between the top and
- // the bottom edge (with some tolerance). Similar for horizCheck.
- boolean verticalCheck = (y >= r.top - hysteresis)
- && (y < r.bottom + hysteresis);
- boolean horizCheck = (x >= r.left - hysteresis)
- && (x < r.right + hysteresis);
-
- // Check whether the position is near some edge(s).
- if ((Math.abs(r.left - x) < hysteresis) && verticalCheck) {
- retval |= GROW_LEFT_EDGE;
- }
- if ((Math.abs(r.right - x) < hysteresis) && verticalCheck) {
- retval |= GROW_RIGHT_EDGE;
- }
- if ((Math.abs(r.top - y) < hysteresis) && horizCheck) {
- retval |= GROW_TOP_EDGE;
- }
- if ((Math.abs(r.bottom - y) < hysteresis) && horizCheck) {
- retval |= GROW_BOTTOM_EDGE;
- }
-
- // Not near any edge but inside the rectangle: move.
- if (retval == GROW_NONE && r.contains((int) x, (int) y)) {
- retval = MOVE;
- }
- }
- return retval;
- }
-
- // Handles motion (dx, dy) in screen space.
- // The "edge" parameter specifies which edges the user is dragging.
- void handleMotion(int edge, float dx, float dy) {
- Rect r = computeLayout();
- if (edge == GROW_NONE) {
- return;
- } else if (edge == MOVE) {
- // Convert to image space before sending to moveBy().
- moveBy(dx * (mCropRect.width() / r.width()),
- dy * (mCropRect.height() / r.height()));
- } else {
- if (((GROW_LEFT_EDGE | GROW_RIGHT_EDGE) & edge) == 0) {
- dx = 0;
- }
-
- if (((GROW_TOP_EDGE | GROW_BOTTOM_EDGE) & edge) == 0) {
- dy = 0;
- }
-
- // Convert to image space before sending to growBy().
- float xDelta = dx * (mCropRect.width() / r.width());
- float yDelta = dy * (mCropRect.height() / r.height());
- growBy((((edge & GROW_LEFT_EDGE) != 0) ? -1 : 1) * xDelta,
- (((edge & GROW_TOP_EDGE) != 0) ? -1 : 1) * yDelta);
- }
- }
-
- // Grows the cropping rectange by (dx, dy) in image space.
- void moveBy(float dx, float dy) {
- Rect invalRect = new Rect(mDrawRect);
-
- mCropRect.offset(dx, dy);
-
- // Put the cropping rectangle inside image rectangle.
- mCropRect.offset(
- Math.max(0, mImageRect.left - mCropRect.left),
- Math.max(0, mImageRect.top - mCropRect.top));
-
- mCropRect.offset(
- Math.min(0, mImageRect.right - mCropRect.right),
- Math.min(0, mImageRect.bottom - mCropRect.bottom));
-
- mDrawRect = computeLayout();
- invalRect.union(mDrawRect);
- invalRect.inset(-10, -10);
- mContext.invalidate(invalRect);
- }
-
- // Grows the cropping rectange by (dx, dy) in image space.
- void growBy(float dx, float dy) {
- if (mMaintainAspectRatio) {
- if (dx != 0) {
- dy = dx / mInitialAspectRatio;
- } else if (dy != 0) {
- dx = dy * mInitialAspectRatio;
- }
- }
-
- // Don't let the cropping rectangle grow too fast.
- // Grow at most half of the difference between the image rectangle and
- // the cropping rectangle.
- RectF r = new RectF(mCropRect);
- if (dx > 0F && r.width() + 2 * dx > mImageRect.width()) {
- float adjustment = (mImageRect.width() - r.width()) / 2F;
- dx = adjustment;
- if (mMaintainAspectRatio) {
- dy = dx / mInitialAspectRatio;
- }
- }
- if (dy > 0F && r.height() + 2 * dy > mImageRect.height()) {
- float adjustment = (mImageRect.height() - r.height()) / 2F;
- dy = adjustment;
- if (mMaintainAspectRatio) {
- dx = dy * mInitialAspectRatio;
- }
- }
-
- r.inset(-dx, -dy);
-
- // Don't let the cropping rectangle shrink too fast.
- final float widthCap = 25F;
- if (r.width() < widthCap) {
- r.inset(-(widthCap - r.width()) / 2F, 0F);
- }
- float heightCap = mMaintainAspectRatio
- ? (widthCap / mInitialAspectRatio)
- : widthCap;
- if (r.height() < heightCap) {
- r.inset(0F, -(heightCap - r.height()) / 2F);
- }
-
- // Put the cropping rectangle inside the image rectangle.
- if (r.left < mImageRect.left) {
- r.offset(mImageRect.left - r.left, 0F);
- } else if (r.right > mImageRect.right) {
- r.offset(-(r.right - mImageRect.right), 0);
- }
- if (r.top < mImageRect.top) {
- r.offset(0F, mImageRect.top - r.top);
- } else if (r.bottom > mImageRect.bottom) {
- r.offset(0F, -(r.bottom - mImageRect.bottom));
- }
-
- mCropRect.set(r);
- mDrawRect = computeLayout();
- mContext.invalidate();
- }
-
- // Returns the cropping rectangle in image space.
- public Rect getCropRect() {
- return new Rect((int) mCropRect.left, (int) mCropRect.top,
- (int) mCropRect.right, (int) mCropRect.bottom);
- }
-
- // Maps the cropping rectangle from image space to screen space.
- private Rect computeLayout() {
- RectF r = new RectF(mCropRect.left, mCropRect.top,
- mCropRect.right, mCropRect.bottom);
- mMatrix.mapRect(r);
- return new Rect(Math.round(r.left), Math.round(r.top),
- Math.round(r.right), Math.round(r.bottom));
- }
-
- public void invalidate() {
- mDrawRect = computeLayout();
- }
-
- public void setup(Matrix m, Rect imageRect, RectF cropRect, boolean circle,
- boolean maintainAspectRatio) {
- if (circle) {
- maintainAspectRatio = true;
- }
- mMatrix = new Matrix(m);
-
- mCropRect = cropRect;
- mImageRect = new RectF(imageRect);
- mMaintainAspectRatio = maintainAspectRatio;
- mCircle = circle;
-
- mInitialAspectRatio = mCropRect.width() / mCropRect.height();
- mDrawRect = computeLayout();
-
- mFocusPaint.setARGB(125, 50, 50, 50);
- mNoFocusPaint.setARGB(125, 50, 50, 50);
- mOutlinePaint.setStrokeWidth(3F);
- mOutlinePaint.setStyle(Paint.Style.STROKE);
- mOutlinePaint.setAntiAlias(true);
-
- mMode = ModifyMode.None;
- init();
- }
-
- enum ModifyMode { None, Move, Grow }
-
- private ModifyMode mMode = ModifyMode.None;
-
- Rect mDrawRect; // in screen space
- private RectF mImageRect; // in image space
- RectF mCropRect; // in image space
- Matrix mMatrix;
-
- private boolean mMaintainAspectRatio = false;
- private float mInitialAspectRatio;
- private boolean mCircle = false;
-
- private Drawable mResizeDrawableWidth;
- private Drawable mResizeDrawableHeight;
- private Drawable mResizeDrawableDiagonal;
-
- private final Paint mFocusPaint = new Paint();
- private final Paint mNoFocusPaint = new Paint();
- private final Paint mOutlinePaint = new Paint();
-}
diff --git a/src/com/android/camera/ImageManager.java b/src/com/android/camera/ImageManager.java
index 5486dec..25c8c29 100644
--- a/src/com/android/camera/ImageManager.java
+++ b/src/com/android/camera/ImageManager.java
@@ -64,6 +64,9 @@ public class ImageManager {
private static final Uri VIDEO_STORAGE_URI =
Uri.parse("content://media/external/video/media");
+ private ImageManager() {
+ }
+
/**
* {@code ImageListParam} specifies all the parameters we need to create an
* image list (we also need a ContentResolver).
@@ -80,7 +83,8 @@ public class ImageManager {
// This is only used if we are creating an empty image list.
public boolean mIsEmptyImageList;
- public ImageListParam() {}
+ public ImageListParam() {
+ }
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mLocation.ordinal());
@@ -415,10 +419,6 @@ public class ImageManager {
return 0;
}
- public boolean isEmpty() {
- return true;
- }
-
public IImage getImageAt(int i) {
return null;
}
diff --git a/src/com/android/camera/ImageViewTouchBase.java b/src/com/android/camera/ImageViewTouchBase.java
index 84fb173..dfd0932 100644
--- a/src/com/android/camera/ImageViewTouchBase.java
+++ b/src/com/android/camera/ImageViewTouchBase.java
@@ -317,26 +317,6 @@ abstract class ImageViewTouchBase extends ImageView {
center(true, true);
}
- protected void zoomTo(final float scale, final float centerX,
- final float centerY, final float durationMs) {
- final float incrementPerMs = (scale - getScale()) / durationMs;
- final float oldScale = getScale();
- final long startTime = System.currentTimeMillis();
-
- mHandler.post(new Runnable() {
- public void run() {
- long now = System.currentTimeMillis();
- float currentMs = Math.min(durationMs, now - startTime);
- float target = oldScale + (incrementPerMs * currentMs);
- zoomTo(target, centerX, centerY);
-
- if (currentMs < durationMs) {
- mHandler.post(this);
- }
- }
- });
- }
-
protected void zoomTo(float scale) {
float cx = getWidth() / 2F;
float cy = getHeight() / 2F;
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java
index 6d30a3d..33b87c8 100644
--- a/src/com/android/camera/MenuHelper.java
+++ b/src/com/android/camera/MenuHelper.java
@@ -865,10 +865,6 @@ public class MenuHelper {
deleteImpl(activity, onDelete, true);
}
- static void deleteVideo(Activity activity, Runnable onDelete) {
- deleteImpl(activity, onDelete, false);
- }
-
static void deleteImage(
Activity activity, Runnable onDelete, IImage image) {
deleteImpl(activity, onDelete, ImageManager.isImage(image));
@@ -975,29 +971,6 @@ public class MenuHelper {
return durationValue;
}
- public static void showStorageToast(Activity activity) {
- showStorageToast(activity, calculatePicturesRemaining());
- }
-
- public static void showStorageToast(Activity activity, int remaining) {
- String noStorageText = null;
-
- if (remaining == MenuHelper.NO_STORAGE_ERROR) {
- String state = Environment.getExternalStorageState();
- if (state == Environment.MEDIA_CHECKING) {
- noStorageText = activity.getString(R.string.preparing_sd);
- } else {
- noStorageText = activity.getString(R.string.no_storage);
- }
- } else if (remaining < 1) {
- noStorageText = activity.getString(R.string.not_enough_space);
- }
-
- if (noStorageText != null) {
- Toast.makeText(activity, noStorageText, 5000).show();
- }
- }
-
public static int calculatePicturesRemaining() {
try {
if (!ImageManager.hasStorage()) {
diff --git a/src/com/android/camera/MonitoredActivity.java b/src/com/android/camera/MonitoredActivity.java
deleted file mode 100644
index 74097ae..0000000
--- a/src/com/android/camera/MonitoredActivity.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2009 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;
-
-import android.os.Bundle;
-
-import java.util.ArrayList;
-
-/**
- * This class monitors the life cycle events for an activity.
- *
- * To use it, make the activity inherit from MonitoredActivity. You also need
- * to register a LifeCycleListener using addLifeCycleListener().
- *
- * There is a convenience class LifeCycleAdapter which lets you implement only
- * methods for the events you are interested.
- */
-class MonitoredActivity extends NoSearchActivity {
-
- private final ArrayList<LifeCycleListener> mListeners =
- new ArrayList<LifeCycleListener>();
-
- public static interface LifeCycleListener {
- public void onActivityCreated(MonitoredActivity activity);
- public void onActivityDestroyed(MonitoredActivity activity);
- public void onActivityStarted(MonitoredActivity activity);
- public void onActivityStopped(MonitoredActivity activity);
- }
-
- public static class LifeCycleAdapter implements LifeCycleListener {
- public void onActivityCreated(MonitoredActivity activity) {
- }
-
- public void onActivityDestroyed(MonitoredActivity activity) {
- }
-
- public void onActivityStarted(MonitoredActivity activity) {
- }
-
- public void onActivityStopped(MonitoredActivity activity) {
- }
- }
-
- public void addLifeCycleListener(LifeCycleListener listener) {
- if (mListeners.contains(listener)) return;
- mListeners.add(listener);
- }
-
- public void removeLifeCycleListener(LifeCycleListener listener) {
- mListeners.remove(listener);
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- for (LifeCycleListener listener : mListeners) {
- listener.onActivityCreated(this);
- }
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- for (LifeCycleListener listener : mListeners) {
- listener.onActivityDestroyed(this);
- }
- }
-
- @Override
- protected void onStart() {
- super.onStart();
- for (LifeCycleListener listener : mListeners) {
- listener.onActivityStarted(this);
- }
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- for (LifeCycleListener listener : mListeners) {
- listener.onActivityStopped(this);
- }
- }
-}
diff --git a/src/com/android/camera/ThumbnailController.java b/src/com/android/camera/ThumbnailController.java
index 858fa22..3bc0e8c 100644
--- a/src/com/android/camera/ThumbnailController.java
+++ b/src/com/android/camera/ThumbnailController.java
@@ -162,7 +162,7 @@ public class ThumbnailController {
final int miniThumbHeight = param.height - 2 * PADDING_HEIGHT;
mThumb = ThumbnailUtil.extractMiniThumb(
original, miniThumbWidth, miniThumbHeight,
- Util.NO_RECYCLE_INPUT);
+ ThumbnailUtil.NO_RECYCLE_INPUT);
Drawable drawable;
if (mThumbs == null) {
mThumbs = new Drawable[2];
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java
index ec1d732..4492091 100644
--- a/src/com/android/camera/Util.java
+++ b/src/com/android/camera/Util.java
@@ -138,103 +138,6 @@ public class Util {
}
}
- // Whether we should recycle the input (unless the output is the input).
- public static final boolean RECYCLE_INPUT = true;
- public static final boolean NO_RECYCLE_INPUT = false;
-
- public static Bitmap transform(Matrix scaler,
- Bitmap source,
- int targetWidth,
- int targetHeight,
- boolean scaleUp,
- boolean recycle) {
- int deltaX = source.getWidth() - targetWidth;
- int deltaY = source.getHeight() - targetHeight;
- if (!scaleUp && (deltaX < 0 || deltaY < 0)) {
- /*
- * In this case the bitmap is smaller, at least in one dimension,
- * than the target. Transform it by placing as much of the image
- * as possible into the target and leaving the top/bottom or
- * left/right (or both) black.
- */
- Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight,
- Bitmap.Config.ARGB_8888);
- Canvas c = new Canvas(b2);
-
- int deltaXHalf = Math.max(0, deltaX / 2);
- int deltaYHalf = Math.max(0, deltaY / 2);
- Rect src = new Rect(
- deltaXHalf,
- deltaYHalf,
- deltaXHalf + Math.min(targetWidth, source.getWidth()),
- deltaYHalf + Math.min(targetHeight, source.getHeight()));
- int dstX = (targetWidth - src.width()) / 2;
- int dstY = (targetHeight - src.height()) / 2;
- Rect dst = new Rect(
- dstX,
- dstY,
- targetWidth - dstX,
- targetHeight - dstY);
- c.drawBitmap(source, src, dst, null);
- if (recycle) {
- source.recycle();
- }
- return b2;
- }
- float bitmapWidthF = source.getWidth();
- float bitmapHeightF = source.getHeight();
-
- float bitmapAspect = bitmapWidthF / bitmapHeightF;
- float viewAspect = (float) targetWidth / targetHeight;
-
- if (bitmapAspect > viewAspect) {
- float scale = targetHeight / bitmapHeightF;
- if (scale < .9F || scale > 1F) {
- scaler.setScale(scale, scale);
- } else {
- scaler = null;
- }
- } else {
- float scale = targetWidth / bitmapWidthF;
- if (scale < .9F || scale > 1F) {
- scaler.setScale(scale, scale);
- } else {
- scaler = null;
- }
- }
-
- Bitmap b1;
- if (scaler != null) {
- // this is used for minithumb and crop, so we want to filter here.
- b1 = Bitmap.createBitmap(source, 0, 0,
- source.getWidth(), source.getHeight(), scaler, true);
- } else {
- b1 = source;
- }
-
- if (recycle && b1 != source) {
- source.recycle();
- }
-
- int dx1 = Math.max(0, b1.getWidth() - targetWidth);
- int dy1 = Math.max(0, b1.getHeight() - targetHeight);
-
- Bitmap b2 = Bitmap.createBitmap(
- b1,
- dx1 / 2,
- dy1 / 2,
- targetWidth,
- targetHeight);
-
- if (b2 != b1) {
- if (recycle || b1 != source) {
- b1.recycle();
- }
- }
-
- return b2;
- }
-
public static <T> int indexOf(T [] array, T s) {
for (int i = 0; i < array.length; i++) {
if (array[i].equals(s)) {
@@ -369,66 +272,6 @@ public class Util {
return a == b || a.equals(b);
}
- private static class BackgroundJob
- extends MonitoredActivity.LifeCycleAdapter implements Runnable {
-
- private final MonitoredActivity mActivity;
- private final ProgressDialog mDialog;
- private final Runnable mJob;
- private final Handler mHandler;
- private final Runnable mCleanupRunner = new Runnable() {
- public void run() {
- mActivity.removeLifeCycleListener(BackgroundJob.this);
- if (mDialog.getWindow() != null) mDialog.dismiss();
- }
- };
-
- public BackgroundJob(MonitoredActivity activity, Runnable job,
- ProgressDialog dialog, Handler handler) {
- mActivity = activity;
- mDialog = dialog;
- mJob = job;
- mActivity.addLifeCycleListener(this);
- mHandler = handler;
- }
-
- public void run() {
- try {
- mJob.run();
- } finally {
- mHandler.post(mCleanupRunner);
- }
- }
-
-
- @Override
- public void onActivityDestroyed(MonitoredActivity activity) {
- // We get here only when the onDestroyed being called before
- // the mCleanupRunner. So, run it now and remove it from the queue
- mCleanupRunner.run();
- mHandler.removeCallbacks(mCleanupRunner);
- }
-
- @Override
- public void onActivityStopped(MonitoredActivity activity) {
- mDialog.hide();
- }
-
- @Override
- public void onActivityStarted(MonitoredActivity activity) {
- mDialog.show();
- }
- }
-
- public static void startBackgroundJob(MonitoredActivity activity,
- String title, String message, Runnable job, Handler handler) {
- // Make the progress dialog uncancelable, so that we can gurantee
- // the thread will be done before the activity getting destroyed.
- ProgressDialog dialog = ProgressDialog.show(
- activity, title, message, true, false);
- new Thread(new BackgroundJob(activity, job, dialog, handler)).start();
- }
-
// Returns an intent which is used for "set as" menu items.
public static Intent createSetAsIntent(IImage image) {
Uri u = image.fullSizeImageUri();
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index b598d4f..144c9fb 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -353,15 +353,6 @@ public class VideoCamera extends NoSearchActivity
stopVideoRecording();
doReturnToCaller(false);
break;
- case R.id.discard: {
- Runnable deleteCallback = new Runnable() {
- public void run() {
- discardCurrentVideoAndInitRecorder();
- }
- };
- MenuHelper.deleteVideo(this, deleteCallback);
- break;
- }
case R.id.review_thumbnail: {
if (!mMediaRecorderRecording) {
stopVideoRecordingAndShowReview();
diff --git a/src/com/android/camera/gallery/IImageList.java b/src/com/android/camera/gallery/IImageList.java
index 3f55913..6f3d68d 100644
--- a/src/com/android/camera/gallery/IImageList.java
+++ b/src/com/android/camera/gallery/IImageList.java
@@ -51,11 +51,6 @@ public interface IImageList {
public int getCount();
/**
- * @return true if the count of image objects is zero.
- */
- public boolean isEmpty();
-
- /**
* Returns the image at the ith position.
*
* @param i the position
diff --git a/src/com/android/camera/gallery/ImageListUber.java b/src/com/android/camera/gallery/ImageListUber.java
index 402392e..0756947 100644
--- a/src/com/android/camera/gallery/ImageListUber.java
+++ b/src/com/android/camera/gallery/ImageListUber.java
@@ -75,18 +75,10 @@ public class ImageListUber implements IImageList {
return count;
}
- public boolean isEmpty() {
- for (IImageList subList : mSubList) {
- if (!subList.isEmpty()) return false;
- }
- return true;
- }
-
// mSkipCounts is used to tally the counts as we traverse
// the mSkipList. It's a member variable only so that
// we don't have to allocate each time through. Otherwise
// it could just as easily be a local.
-
public IImage getImageAt(int index) {
if (index < 0 || index > getCount()) {
throw new IndexOutOfBoundsException(
diff --git a/src/com/android/camera/gallery/SingleImageList.java b/src/com/android/camera/gallery/SingleImageList.java
index 1b3f844..c2ef371 100644
--- a/src/com/android/camera/gallery/SingleImageList.java
+++ b/src/com/android/camera/gallery/SingleImageList.java
@@ -40,10 +40,6 @@ public class SingleImageList implements IImageList {
return 1;
}
- public boolean isEmpty() {
- return false;
- }
-
public int getImageIndex(IImage image) {
return image == mSingleImage ? 0 : -1;
}