From 8d0fbbc6cec6db276ead0716f5f384fa7cc566fc Mon Sep 17 00:00:00 2001 From: Michael W Date: Sun, 6 Jan 2019 19:32:09 +0100 Subject: Revert "Automatic translation import" This reverts commit 32dc5d98f04d0d00ab21267b45d30c30400dea9a. Change-Id: I64e3536e31fb7db793d96578979ac5b633d954f6 --- quickReader/res/values-ar/strings.xml | 13 -- quickReader/res/values-ast-rES/strings.xml | 13 -- res/values-ar/cm_strings.xml | 6 - res/values-ar/qcomstrings.xml | 169 -------------- res/values-ar/strings.xml | 90 ------- res/values-ast-rES/cm_strings.xml | 56 ----- res/values-ast-rES/qcomstrings.xml | 152 ------------ res/values-ast-rES/strings.xml | 186 --------------- res/values-cy/cm_strings.xml | 28 --- res/values-cy/qcomstrings.xml | 168 -------------- res/values-cy/strings.xml | 256 -------------------- res/values-in/qcomstrings.xml | 1 - res/values-sc-rIT/qcomstrings.xml | 10 - res/values-sc-rIT/strings.xml | 3 - tests/Android.mk | 16 ++ tests/AndroidManifest.xml | 44 ++++ tests/exiftool_parser/parser.py | 90 +++++++ tests/res/raw/android_lawn.mp4 | Bin 0 -> 1514621 bytes tests/res/raw/galaxy_nexus.jpg | Bin 0 -> 1018845 bytes tests/res/raw/jpeg_control.jpg | Bin 0 -> 116135 bytes tests/res/xml/galaxy_nexus.xml | 43 ++++ tests/src/com/android/camera/CameraTestRunner.java | 46 ++++ tests/src/com/android/camera/StressTests.java | 46 ++++ .../com/android/camera/functional/CameraTest.java | 81 +++++++ .../camera/functional/ImageCaptureIntentTest.java | 148 ++++++++++++ .../camera/functional/VideoCaptureIntentTest.java | 258 +++++++++++++++++++++ .../com/android/camera/stress/CameraLatency.java | 148 ++++++++++++ .../com/android/camera/stress/CameraStartUp.java | 156 +++++++++++++ .../camera/stress/CameraStressTestRunner.java | 61 +++++ .../com/android/camera/stress/ImageCapture.java | 124 ++++++++++ .../android/camera/stress/ShotToShotLatency.java | 142 ++++++++++++ .../com/android/camera/stress/SwitchPreview.java | 116 +++++++++ tests/src/com/android/camera/stress/TestUtil.java | 57 +++++ .../com/android/camera/stress/VideoCapture.java | 118 ++++++++++ .../android/camera/unittest/CameraUnitTest.java | 107 +++++++++ 35 files changed, 1801 insertions(+), 1151 deletions(-) create mode 100644 tests/Android.mk create mode 100644 tests/AndroidManifest.xml create mode 100755 tests/exiftool_parser/parser.py create mode 100644 tests/res/raw/android_lawn.mp4 create mode 100755 tests/res/raw/galaxy_nexus.jpg create mode 100644 tests/res/raw/jpeg_control.jpg create mode 100644 tests/res/xml/galaxy_nexus.xml create mode 100755 tests/src/com/android/camera/CameraTestRunner.java create mode 100755 tests/src/com/android/camera/StressTests.java create mode 100644 tests/src/com/android/camera/functional/CameraTest.java create mode 100644 tests/src/com/android/camera/functional/ImageCaptureIntentTest.java create mode 100644 tests/src/com/android/camera/functional/VideoCaptureIntentTest.java create mode 100755 tests/src/com/android/camera/stress/CameraLatency.java create mode 100644 tests/src/com/android/camera/stress/CameraStartUp.java create mode 100755 tests/src/com/android/camera/stress/CameraStressTestRunner.java create mode 100755 tests/src/com/android/camera/stress/ImageCapture.java create mode 100644 tests/src/com/android/camera/stress/ShotToShotLatency.java create mode 100755 tests/src/com/android/camera/stress/SwitchPreview.java create mode 100644 tests/src/com/android/camera/stress/TestUtil.java create mode 100755 tests/src/com/android/camera/stress/VideoCapture.java create mode 100644 tests/src/com/android/camera/unittest/CameraUnitTest.java diff --git a/quickReader/res/values-ar/strings.xml b/quickReader/res/values-ar/strings.xml index 9e04a21bb..e049c8d4a 100644 --- a/quickReader/res/values-ar/strings.xml +++ b/quickReader/res/values-ar/strings.xml @@ -16,29 +16,16 @@ --> - قارئ QR - تجاهل - لا يمكن لأي تطبيق مثبت فتح هذا المحتوى - خطأ في إذن الوصول - مطلوب الوصول إلى الكاميرا لمسح الباركود - اسأل مجدداً - تم رفض الدخول إلى الكاميرا. يرجى السماح لها من إعدادات التطبيق - فتح الإعدادات - النص الممسوح ضوئياً - نسخ - شارك - مشاركة مع - نسخ إلى الحافظة diff --git a/quickReader/res/values-ast-rES/strings.xml b/quickReader/res/values-ast-rES/strings.xml index a97994890..e049c8d4a 100644 --- a/quickReader/res/values-ast-rES/strings.xml +++ b/quickReader/res/values-ast-rES/strings.xml @@ -16,29 +16,16 @@ --> - Llector QR - Escartar - Nun hai denguna aplicación instalada que puea abrir esti conteníu - Fallu de permisos - Precísase l\'accesu a la cámara pa escaniar el códigu de barres - Pidir de nueves - Ñegóse l\'accesu a la cámara. Da laude dende los axustes de l\'aplicación - Abrir axustes - Testu escaniáu - Copiar - Compartir - Compartir con\u2026 - Copióse al cartafueyu diff --git a/res/values-ar/cm_strings.xml b/res/values-ar/cm_strings.xml index 29eeaa511..cd161dd85 100644 --- a/res/values-ar/cm_strings.xml +++ b/res/values-ar/cm_strings.xml @@ -18,12 +18,10 @@ - عريض - (%1$s) %2$1.1f ميجابكسل خفض عدم وضوح الحركة أكوا @@ -47,7 +45,6 @@ الألعاب النارية زهور وضع التصوير المحمول بدون مساعدة - حساسية عالية داخلي المناظر الطبيعية الإضاءة المختلطة @@ -102,7 +99,4 @@ سرعة المصراع - لقم قمت بتمكين خيارات الكاميرا المتقدمة - لقد قمت بتعطيل خيارات الكاميرا المتقدمة - الخيارات المتقدمة diff --git a/res/values-ar/qcomstrings.xml b/res/values-ar/qcomstrings.xml index c104aaf13..30cbbd865 100644 --- a/res/values-ar/qcomstrings.xml +++ b/res/values-ar/qcomstrings.xml @@ -26,10 +26,7 @@ - وضع الطاقة - طاقة منخفضة - طاقة عادية @@ -54,8 +51,6 @@ تعزيز درجة لون البشرة - تفعيل - تعطيل المدة الانتقالية للمصراع صفر @@ -91,35 +86,21 @@ وضع الديوبتر إيقاف تشغيل - التقاط فوري - AEC قوي - AEC سريع - تعطيل إيقاف تشغيل - مفعل - تم تفعيل HDR، يدعم وضع المشهد التلقائي فقط - HDR غير مدعوم في وضع المشهد باستثناء الوضع التلقائي إيقاف تشغيل - مفعل إيقاف تشغيل - مفعل تلقائي إيقاف تشغيل - مفعل تلقائي - تعطيل - تفعيل - تعطيل - تفعيل فيديو HDR @@ -140,25 +121,15 @@ اكتشاف الوجه إيقاف تشغيل - مفعل فلاش سيلفي إيقاف تشغيل - مفعل تقليل العين الحمراء - تفعيل - تعطيل - مرآة السيلفي - تفعيل - تعطيل - صوت الإلتقاط - مفعل - معطّل تسجيل معدل الإطارات العليا غير معتمد عند استخدام التثبيت/الوقت الفاصل/HDR. @@ -172,20 +143,14 @@ دقة الفيديو غير مدعمة لهذا النوع من الترميز - وضع فيديو غير مدعوم تنسيق الصورة الأصلي غير مدعم في وضع المصراع صفر. حدد JPEG أقواس AE أقواس AE - مفعل - أقواس AE غير معتمدة حتى الآن - حجم لقطة الفيديو أقل من حجم الفيديو، وتخطى حجم الفيديو. الرجاء تحديد دقة أعلى أو مساوية لحجم الفيديو الحالي. - تغيير حجم الصورة غير معتمد في وضع \"الطاقة المنخفضة\"، وسوف تُؤخذ لقطة حجم الفيديو. الرجاء تحديد وضع \"الطاقة العادية\" للسماح بتغيير حجم الصورة. - حجم لقطة الفيديو مدعوم لهذا الدقة فقط. تسجيل معدل الإطارات العليا @@ -198,27 +163,21 @@ سرعة عالية 60 إطار في الثانية سرعة عالية 90 إطار في الثانية سرعة عالية 120 إطار في الثانية - سرعة عالية 240 إطار في الثانية - تقليل الضوضاء إيقاف تشغيل - سريع - جودة عالية إيقاف تشغيل - مفعل التشويش إيقاف تشغيل - مفعل ISO @@ -261,7 +220,6 @@ 50 هرتز (أوروبا) 60 هرتز (الولايات المتحدة الأمريكية) - مفعل إيقاف تشغيل تأثير الألوان @@ -287,12 +245,10 @@ تثبيت إيقاف تشغيل - مفعل التعرف على الوجه إيقاف تشغيل - مفعل المستوى 0 المستوى 1 @@ -344,15 +300,10 @@ جودة الصورة - منخفضة - قياسي - عالية مدرج تكراري - تفعيل - تعطيل @@ -360,9 +311,7 @@ إيقاف تشغيل - مفعل - حجم الفيديو غير صحيح لتسجيل الوقت الفاصل. لقطة مستمرة نفاد الذاكرة، إلغاء اللقطة المستمرة @@ -371,8 +320,6 @@ HDR تلقائي - تفعيل - تعطيل مساحة التخزين الداخلية غير كاف، تم تبديل موقع التخزين إلى بطاقة SD @@ -385,7 +332,6 @@ تدوير الفيديو - تدوير الفيديو 0 درجة 90 درجة @@ -399,100 +345,18 @@ اللقطة المستمرة غير مدعمة عند تمكين الميزات المتقدمة تشغيل الكاميرا - التجميل - مفعل إيقاف تشغيل - منخفض - متوسط - عالي - مخصص - تبييض - تنعيم - تحذير - يجب أن يتم تفعيل اكتشاف الوجه من أجل استخدام هذه ميزة التجميل. هل تريد الاستمرار؟ - المتابعة - إلغاء - تجميل كل شيء في التركيز لإعادة تركيز الصورة الأخيرة، اضغط هنا - مع UbiFocus، الكاميرا سوف تلتقط خمس صور، في كل مرة تضغط على زر الإلتقاط. وسيتم الجمع بين الخمس صور في صورة واحدة، عندما يكون كل شيء في البؤرة. يمكنك اختيار إعادة تركيز البؤرة، بعد التقاط الصورة. - الهاتف ساخن بشدة، يتم إغلاق الكاميرا. - انقطع خادم الوسائط، يتم إغلاق الكاميرا. - خطأ غير معروف، يتم إغلاق الكاميرا. - زر كتم الصوت - وضع Camera2 - تفعيل - تعطيل - أحادي فقط - تشغيل إيقاف تشغيل - معاينة الأحادي - مفعل إيقاف تشغيل - مفعل إيقاف تشغيل - تم التقاط مشهد واضح بنجاح - فشل التقاط مشهد واضح - تنسيق MPO - مفعل إيقاف تشغيل - مكياج - تشغيل إيقاف تشغيل - تقليل الضوضاء إيقاف تشغيل - سريع - جودة عالية - حجم لقطة تلقائي - تفعيل - تعطيل - تركيز التتبع - تشغيل إيقاف تشغيل - أفضل صورة - صورة حادة - تركيز التتبع - بانوراما - وضع المحترف - تم - يجب اختيار صورة واحدة على الأقل. - تشغيل إيقاف تشغيل - صوت الإلتقاط إيقاف تشغيل - 2 ثانية - 5 ثواني - 10 ثواني - حفظ بتنسيق Raw - تتحرك باستمرار نحو اتجاه واحد. - اضغط على زر الكاميرا للبدء. - تغيُر في الاتجاه، إيقاف الالتقاط البانورامي - إختر قوة التجميل. - موافق - معلومات الإصدار - عام - كاميرا الصور الثابتة - كاميرا الفيديو - النظام - صورك ستكون أكثر وضوحا في وضع الكاميرا المزدوجة. يمكنك أيضا تطبيق تأثيرات على الخلفية، بالتعديل على صور الكاميرا المُزدوجة الموجودة في معرض الصور. - مع UbiFocus، الكاميرا سوف تأخذ خمس صور والجمع بينهما في صورة واحدة، حيث كل شيء في التركيز. يمكنك اختيار إعادة التركيز، بعد التقاط الصورة. - استخدام OptiZoom عندما تريد تكبير صورة واضحة. يمكنك التكبير قبل أو بعد التقاط الصورة. - وضع الرياضة يساعدك على التقاط افضل صور الرياضة أو الحركة.\n\nتحسين الصور الخاصة بك، ولكن ليس له تأثير على تسجيل الفيديو. - عندما تكون في ظروف الإضاءة المختلطة مثل الإضاءة الخافتة ومشاهد الخلفية حدد\"HDR\" لأفضل صورة ممكنة. - يسمح لك أن تأخذ دفعة من 10 صور، ثم يمكنك أن تختار منها الأفضل. - مع ChromaFlash، سيتم تحسين الإضاءة في صور الفلاش الخاصة لجميع الناس والكائنات في الصور الخاصة بك. تطبق هذه الميزة فقط على الكاميرا الخلفية. - الصورة الحادة تقلل الضبابية بسبب الحركة في المشهد، أو بسبب حركة اليد. - يسمح لك لتتبع وتركيز شخص أو كائن محدد أثناء التقاط الصور أو أشرطة الفيديو. للبدء، ضع مستطيل التركيز على شخص أو كائن تريد تتبعه. - مع مرور الوقت، يمكنك تحويل تسجيل الفيديو الطويل في بضع ثوان من الفيديو. ينطبق هذا التأثير على مقاطع الفيديو، وليس على الصور. - يسمح لك بتحريك الهاتف الى اليسار أو اليمين لالتقاط صورة افقية عريضة. يمكنك أيضا التحريك لأعلى أو لأسفل لالتقاط صور طويلة القامة. - بلوربوستر يقلل الضبابية من الأيدي المهتزه. يمكن أن يكون مفيدا عند التقاط الصور في الأماكن الصعبة. - مع الوضع المتقدم، يمكنك التحكم يدويا في إعدادات iso، والتعرض، وتوازن اللون الأبيض، والتركيز. سيكون لديك سهولة الوصول إلى كل هذه الإعدادات المتقدمة - عدم العرض مجدداً - موافق - AEC الفورية - تعطيل - AEC قوي - AEC سريع التشبع المستوى 0 المستوى 1 @@ -511,46 +375,13 @@ 60 هرتز (الولايات المتحدة الأمريكية) تلقائي مدرج تكراري - تفعيل - تعطيل - HDR - تفعيل - تعطيل HDR تلقائي - تفعيل - تعطيل - وضع البوكيه - تفعيل - تعطيل - وضع بوكيه MPO - تفعيل - تعطيل - قيمة ضبابية البوكيه - التكبير إيقاف تشغيل - 1x - 2x - 3x - 4x - 5x - 6x - 7x - 8x - 9x - 10x - الكشف عن ابتسامة/وميض/نظرة - تفعيل - تعطيل المدة الانتقالية للمصراع صفر إيقاف تشغيل - برنامج ZSL - عتاد ZSL - تبديل الكاميرا بمعرف - باير أُحادي - الأمامية diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 864e5e3a6..c2c778fbf 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -29,14 +29,6 @@ حذف - - حذف العناصر المحددة؟ - حذف العنصر المحدد؟ - حذف العناصر المحددة؟ - حذف العناصر المحددة؟ - حذف العناصر المحددة؟ - حذف العناصر المحددة؟ - مشاركة مشاركة البانوراما مشاركة كصورة @@ -48,34 +40,10 @@ إغلاق - - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - - - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - تم تحديد %1$d - - - ‏تم تحديد %1$d - ‏تم تحديد %1$d - ‏تم تحديد %1$d - ‏تم تحديد %1$d - ‏تم تحديد %1$d - ‏تم تحديد %1$d - عرض على الخريطة تدوير لليسار @@ -159,9 +127,7 @@ تم تعطيل الكاميرا بسبب سياسات الأمان. - لا يشتمل التطبيق على أذونات مهمة للتشغيل. الرجاء التحقق من إعدادات أذوناتك. - تجاهل الرجاء الانتظار\u2026 @@ -181,26 +147,14 @@ الأمامية - موقع GPS الموقع موقّت العد التنازلي - - %d ثانية - 1 ثانية - %d ثواني - %d ثواني - %d ثواني - %d ثواني - صفير أثناء العد التنازلي - التخزين - الهاتف - بطاقة SD إيقاف @@ -319,23 +273,14 @@ لا يمكن تحديده في وضع المشهد. - تمكين HDR سيعطل اللقطة المستمرة. - تمكين اللقطة المتقدمة سيعطل اللقطة المستمرة. - جودة الفيديو 4K ستعطل ثبات الصورة. - لا يمكن تفعيل SeeMore في وضع فيديو 4k. - تقليل الضوضاء عالي الجودة سيعطل CDS. - تقليل الضوضاء عالي الجودة سيعطل NTR. - SeeMore سيعطل CDS. - SeeMore سيعطل TNR. - SeeMore سيعطل تقليل الضوضاء. التعرض للضوء @@ -413,7 +358,6 @@ الغالق - الخروج من وضع أفضل صورة زر القائمة @@ -569,40 +513,6 @@ CHAR LIMIT = NONE] --> جارٍ تعيين الخلفية - %d متبقية - الفيديو التجميلي يعمل فقط في حجم VGA في تسجيل الفيديو. - النظام - استعادة الإعدادات الافتراضية - ستتم استعادة إعدادات الكاميرا إلى الإعدادات الافتراضية - - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - سيتم حفظ %1$d من 10 صور وسيتم حذف البقية - - حفظ الصور المحددة؟ موافق - إلغاء - - %1$d من 10 صور تم حفظها. - %1$d من 10 من الصور تم حفظها. - %1$d من 10 صور تم حفظها. - %1$d من 10 من الصور تم حفظها. - %1$d من 10 صور تم حفظها. - %1$d من 10 من الصور تم حفظها. - - لا تظهر هذا مجدداً - حذف الكل؟ - هل أنت متأكد من أنك تريد حذف الصور العشرة الملتقطة؟ - إلغاء حذف - حذف الكل؟ - هل أنت متأكد من أنك تريد حذف كافة الصور؟ - إلغاء - حذف الكل - حفظ الكل - حذف الكل - الإعدادات diff --git a/res/values-ast-rES/cm_strings.xml b/res/values-ast-rES/cm_strings.xml index b583b6f4a..652128d11 100644 --- a/res/values-ast-rES/cm_strings.xml +++ b/res/values-ast-rES/cm_strings.xml @@ -35,74 +35,18 @@ Retratu a contralluz Códigu de barres Sablera - Belleza Lluz de vela - Cine - Detalle - Escuru - Reflector - Riscar/Aséu Documentu - Color cayíu Voladores - Flores - Atapecer Sensibilidá alta - Interior - Paisaxe - Lluces amestaes - Humor - Retratu nocherniegu - Interior nocherniegu - Película antigua - Mascota - Retratu - Ñeve - Piel suave Deportes - Focu de lluz - Semeya estable - Nueche escura - Percorríu panorámicu - Testu - Teatru - Pizarra - Continuu - Continuu (MW) - Estendíu - Detección de cares - Prioridá de cares - Fixu Normal - Retratu - Hiperfocal - Llaváu - Antiguu caldiu - Antiguu fríu - Puntu azul - Puntu verde - Puntu encarnáu-mariellu - Viñetiar - Güeyos bermeyos - GÜEYOS BERMEYOS - Disparador c/botón d\'encendíu - Pantalla brillante - Duración del enfoque - 0s - 3s - 5 s - 10 s - Infinitu - Velocidá del obturador - Habilitesti les opciones avanzaes de la cámara - Deshabilitesti les opciones avanzaes de la cámara - Opciones avanzaes diff --git a/res/values-ast-rES/qcomstrings.xml b/res/values-ast-rES/qcomstrings.xml index 6dc0ab3d6..d0eb8a68f 100644 --- a/res/values-ast-rES/qcomstrings.xml +++ b/res/values-ast-rES/qcomstrings.xml @@ -58,36 +58,26 @@ Deshabilitar - Desaniciar retrasu del disparador Zona d\'auto-enfoque Auto - Midición puntual - Ponderáu al centru - Media de marcos - Carauterístiques avanzaes - Dengún - Enfoque multi-toque Esposición manual Prioridá ISO Prioridá de tiempu d\'esposición - Axuste d\'usuariu Non Balance manual de blancu Temperatura de color - Ganancies RBGB Non Enfoque manual - Mou d\'escala Mou dioptría Non @@ -143,61 +133,35 @@ - Flax pa selfie Non - Amenorgamientu de güeyos bermeyos Habilitar Deshabilitar Espeyu d\'autoretratu Habilitar Deshabilitar - Soníu d\'obturador - Habilitóse - Deshabilitóse - La grabación d\'alta velocidá de fotogrames nun ye compatible cuando s\'usa la estabilización/TimeLapse/HDR. - El mou de cámara lenta nun ye compatible col tamañu del videu esbilláu. Esbilla un tamañu de videu inferior - La estabilización nun ye compatible col tamañu del videu esbilláu. Esbilla un tamañu de videu inferior - Nun ta sofitáu\'l mou d\'alta velocidá pal tamañu de videu esbilláu. Esbilláu un tamañu de videu más baxu - Namái se sofita la codificación de videu H264 al tar habilitáu HFR - Resolución de videu non sofitada nesti tipu de codificador Perfil non sofitáu de videu - El formatu d\'imaxe RAW nun ye compatible col retrasu de obturador en mou cero. Seleiciona JPEG - Esposición HDR automática - Esposición HDR automática Entá nun se sofita l\'horquiláu AE - El tamañu de la captura de videu ye más baxa que\'l del videu, redimensionando tamañu de videu. Esbilla una resolución mayor o igual a la del tamañu actual de videu, por favor. - Nun se sofita\'l cambéu de tamañu d\'imaxe nel mou de potencia baxa, tomaráse\'l tamañu d\'instantanea de videu. Esbilla\'l mou de potencia normal pa permitir camudar el tamañu de semeya. - Namái tán sofitaes les captures de tamañu de videu pa esta resolución. - Grabación d\'alta velocidá de fotogrames - Desactiváu - Cámara lenta a 60 FPS - Cámara lenta a 90 FPS - Cámara lenta a 120 FPS - Cámara lenta a 240 FPS - Alta velocidá a 60 FPS - Alta velocidá a 90 FPS - Alta velocidá a 90 FPS Velocidá alta a 240 FPS @@ -205,7 +169,6 @@ Reducción de ruíu Non - Rápida Calidá alta @@ -254,7 +217,6 @@ ISO12800 - Anti-bandéu Auto @@ -267,29 +229,15 @@ Efeutu de color Efeutu de color - Nengún - Mono Sepia Negativu - Solarizar - Posterizar - Agua - Realzar - Croquis - Neón - Pastel - Mosaicu - Tinta encarnao - Tinta azul - Tinta verde Estabilización Non - Reconocimientu de cares Non @@ -327,7 +275,6 @@ Nivel 10 - Nitidez Contraste @@ -338,15 +285,11 @@ pref_camera_jpegquality_entryvalues for possible values --> - Formatu d\'imaxe - Calidá d\'imaxe - Baxa Estándar - Alta Histograma @@ -356,30 +299,22 @@ - Auto Detección d\'Escenes Non - Tamañu de videu non válidu pa la grabación de lapsu de tiempu. - Disparu continuu - La memoria ta escosando, encaboxando\'l disparu continuu - El flax nun ye compatible col mou AE bracketing - HDR auto Habilitar Deshabilitar - Nun ye abondu l\'espaciu nel almacenamientu internu, cambióse al allugamientu d\'almacenamientu na tarxeta SD Mou HDR Sensor HDR - HDR de marcos múltiples @@ -392,105 +327,49 @@ 180 graos 270 graos - Nun hai aplicación de mapes instalada dala p\'amosar l\'allugamientu - Carauterístiques avanzaes que nun tán sofitaes nel mou de disparu continuu - Nun tán sofitáu\'l disparu continuu al tar habilitaes les carauterístiques avanzaes Llanzar cámara Gapura Non - Baxa - Media - Alta - Personalizao - Ablanquiao - Suavizao Alvertencia Ha habilitase la deteición de cares pa usar la carauterística de guapura. ¿Quies siguir? Siguir Encaboxar Aguapar - Too nel focu - Pa volver a enfocar la postrer semeya, primi equí - Con UbiFocus, la to cámara fadrá 5 semeyes cada vegada que primas el botón del disparador. Les 5 semeyes combinaránse nuna onde tea too enfocao. Pues escoyer reenfocar dempués de facer la semeya. Teléfonu sobrecargáu, zarrando cámara. Morrió\'l sirvidor de medios, zarrando cámara. Fallu desconocíu, zarrando la cámara. Botón de silenciar Mou Camera2 Habilitar - Deshabilitar Namái mono - Habilitáu Non Previsualización mono Non Non - La captura ClearSight féxose con ésitu Falló la captura ClearSight Formatu MPO Non - Makeup - Habilitáu Non Reducción de ruíu Non - Rápida Calidá alta - Tamañu automática d\'instantanea Habilitar - Deshabilitar - Focu de siguimientu - Habilitáu Non La meyor semeya - Compartir como semeya - Focu de siguimientu - Panorámica - Mou Pro FECHO Tien d\'esbillase polo menos una semeya. Non - Soníu d\'obturador Non - 2 segundos - 5 segundos - 10 segundos - Guardar con formatu Raw - Mover constantemente faza una direición. - Calca nel botó de cámara pa entamar. - La direición cambió. Esto paró la captura panorámica\u2026 - Escueyi\'l grau d\'aguapamientu. ACEUTAR - Información de versión - Xeneral - Cámara de fotos - Cámara de videu - Sistema - Nel mou de cámara dual les imáxenes van ser más clares. Tamién puedes aplicar efeutos de fondu, editando les imaxes de la cámara dual na Galería. - Con UbiFocus la cámara tirará cinco semeyes y combinaráles nuna sola, na que too tea enfocao. Puedes volver a centrala darréu de facer la semeya. - Usa OptiZoom cuando quieras ampliar y obtener una imaxe nítida. Puedes facer zoom enantes o darréu de tirar la semeya. - El mou Deporte ayúdate a tirar meyores semeyes de deportes o d\'aición.\n\nMeyora les tos semeyes, pero nun tien efeutu na grabación de videu. - Cuando t\'atopes en condiciones d\'illuminación mixta, como escenes de poca lluz y retroilluminaes, escueyi \"HDR\" pa obtener les meyores semeyes posibles. - Permite tomar una ráfaga de 10 semeyes, darréu puedes escoyer le(s) meyor(es). - ChormaFlas permite optimicar la illuminación de cada persona y oxetu de la semeya cuando s\'usa\'l flash. Esta funcionalidá aplícase únicamente a la cámara principal. - La fotografía nítida reduz el desenfoque de movimientu causáu pola escena o la mano. - Permite siguir y enfocar a una persona o oxetu mentanto tires fotos o grabes videu. Pa entamar, llanta el rectángulu d\'enfoque na persona o oxetu a siguir. - Con Time lapse, puedes tresformar una grabación de videu llarga nunos segundos de videu. Esti efeutu aplícase a los vídeos, pero non a les semeyes. - Permítete facer panorámiques desplazándote a la izquierda o a la drecha. Tamién puedes facer panorámiques haza arriba o haza abaxo pa sacar semeyes espurríes. - BluBuster reduz el desenfoque deriváu del movimientu de les manes. Esto puede ser útil al tirar fotos en posiciones difíciles. - Nel mou Pro, puedes controlar manualmente los axustes como el ISO, la esposición, balance de blancos y l\'enfoque. Tendrás accesu a toos esos axustes avanzados - Nun amosar más ACEUTAR - Aplicación nel intre - Deshabilitar AEC agresivo AEC rápido Saturación @@ -505,52 +384,21 @@ Nivel 8 Nivel 9 Nivel 10 - Anti-bandéu Non 50 Hz (Europa) 60 Hz (EE.XX) Auto Histograma Habilitar - Deshabilitar - HDR Habilitar - Deshabilitar - HDR auto Habilitar - Deshabilitar - Mou d\'enerxía Habilitar - Deshabilitar - Mou d\'enerxía Habilitar - Deshabilitar - Valor del desenfoque Bokeh - Zoom Non - 1x - 2x - 3x - 4x - 5x - 6x - 7x - 8x - 9x - 10x - Detección de sorrisa/parpaguéu/mirada Habilitar - Deshabilitar - Desaniciar retrasu del disparador Non - Software ZSL - Hardware ZSL - Cambiar cámara por ID - Bayer - Mono - Frontal diff --git a/res/values-ast-rES/strings.xml b/res/values-ast-rES/strings.xml index e7233d0ea..b2a89bb54 100644 --- a/res/values-ast-rES/strings.xml +++ b/res/values-ast-rES/strings.xml @@ -61,37 +61,27 @@ %1$d esbillaos - Amosar nel mapa Voltiar a esquierda - Xirar a la derecha Editar - Recortar - Recortar Afitar como Nun pue reproducise\'l videu. - La imaxe recortada guardóse en %s. - Títulu - Descripción - Hora Allugamientu - Camín Anchor - Altor Orientación @@ -99,21 +89,13 @@ Triba MIME - Tamañu del ficheru - Creador - Modelu - Flax - Apertura - Llonxitú focal - Balance de blancos - Tiempu d\'esposición ISO @@ -122,73 +104,49 @@ Manual - Auto - Flax activáu Ensin flax - Desconocíu Esti elementu atroxóse de mou llocal y ta disponible ensin conexón. - Espera - Procesando semeya esférica - Fallu de cámara - Nun pue accedese a la cámara. - Inhabilitóse la cámara por polítiques de seguridá. - L\'aplicación nun precisa de permisos críticos pa executase. Comprueba los tos axustes de permisos, por favor. - Escartar - Por favor, espera\u2026 - Pa poder usar la cámara, inxerta una tarxeta SD. - Tresnando tarxeta SD\u2026 - Nun pudo accedese a la tarxeta SD. - Grabación a intervalos de tiempu - Capturando - Seleicionar cámara - Atrás - Delantera Allugamientu GPS ALLUGAMIENTU - Temporizador de cuenta atrás 1 segundu %d segundos - Usar pitíu Almacenamientu Teléfonu Tarxeta SD - Non - Activáu - Calidá de videu @@ -199,95 +157,47 @@ - Intervalu de tiempu - Axustes de la cámara - Configuración de videocámara - Tamañu imaxe - Mou d\'enfoque - Automáticu - Infinitu - Macro - AUTOMÁTICU - INFINITU - MACRO - Flax - Automáticu - Activáu - Non - FLASH AUTOMÁTICU - FLASH ACTIVÁU - FLASH DESACTIVÁU - Balance de blancos - BALANCE DE BLANCOS - Automáticu - Incandescente - Lluz natural - Fluorescente - Ñuble - AUTOMÁTICU - INCANDESCENTE - LLUZ NATURAL - FLUORESCENTE - ÑUBLE - Mou d\'escena - Automáticu - HDR+ - HDR - HDR+ ON - HDR+ OFF - HDR ON - HDR OFF - Aición - Nueche - Atapecer - Folixa - NENGÚN - AICIÓN - NUECHE - ATAPECER - FOLIXA - TEMPORIZADOR DESACTIVÁU 1 SEGUNDU @@ -297,7 +207,6 @@ 15 SEGUNDOS - Nun pue seleicionase nel mou d\'escena. HDR deshabilitará\'l disparu continuu. @@ -317,112 +226,63 @@ SeeMore deshabilitará la reducción de ruíu. - Esposición - ESPOSICIÓN - HDR - CÁMARA FRONTAL - CÁMARA TRASERA - Aceutar - Nun hai espaciu na tarxeta SD. Cambia la configuración de calidá o desanicia dalgunes imáxenes o otros ficheros. Algamóse la llende de tamañu. - Mui rápidu - Preparando mou panorámicu - Fallu al guardar imaxe panorámica. - Panorámicu - Capturando panorámica - Esperando semeya panorámica anterior - Guardando\u2026 - Creando panorámica - Toca pa enfocar. - Efeutos - Nengún - Comprimir - Güeyos grandes - Boca grande - Boca pequeña - Nariz grande - Güeyos pequeños - Nel espaciu - Atapecer - El to videu - Toca pa facer una semeya mientres grabes un videu. - Anicióse la grabación de videu. - La grabación de videu detúvose. - Quitar efeutos - CARES GRACIOSES - FONDU - Disparador - Salir del mou meyor semeya - Botón Menú - Cámara, videu o mou panorámicu - Caxellu de verificación %1$s - Cambiar a la cámara - Cambiar a videu - Cambiar a mou panorámicu - Cambiar a fotografía esférica - Cambiar a calidá alta - Revisar encaboxar - Revisar fecho - Revisar repetición - - NON - Non 0,5 segundos @@ -452,7 +312,6 @@ CHAR LIMIT = NONE] --> 0,5 minutos - 1 minutu 1,5 minutos @@ -510,71 +369,26 @@ CHAR LIMIT = NONE] --> Fecho - Afita intervalu de tiempu - L\'intervalu de tiempu ta desactiváu. Activa esta función p\'afitar un intervalu. - Afitar duración en segundos - Cuenta atrás pa facer una semeya - ¿Recordar llocalizaciones de les semeyes? - Etiqueta les tos semeyes y vídeos coles llocalizaciones au se fexeron.\n\nOtres aplicaciones puen acceder a esta información, asina como a les imáxenes guardaes. - Non, gracies - - MÁS OPCIONES - AXUSTES - Crear Planeta nanu - Guardar Planeta nanu … - Zoom - Xirar - Guardar - Fallu al cargar la imaxe! - Vista de tira de película - Afitando fondu de pantalla - Queden %d - Makeup namái furrula so tamañu VGA na grabación de videu. - Sistema - Reafitar valores - Van reafitase los axustes de la cámara - - %1$d de 10 imaxes van guardase y el restu van desaniciase - %1$d de 10 imaxes van guardase y el restu van desaniciase - - ¿Guardar les semeyes esbillaes? - Aceutar - Encaboxar - - %1$d de 10 imaxes guardaes. - %1$d de 10 imaxes guardaes. - - Nun amosar más - ¿Desaniciar too? - ¿Quies desaniciar les 10 semeyes feches? - Encaboxar Desaniciar - ¿Desaniciar too? - ¿Quies desaniciar toles imáxenes? - Encaboxar - Desaniciar too - Guardar too - Desaniciar too - Axustes diff --git a/res/values-cy/cm_strings.xml b/res/values-cy/cm_strings.xml index 7adb4bd3d..a1a37099b 100644 --- a/res/values-cy/cm_strings.xml +++ b/res/values-cy/cm_strings.xml @@ -23,47 +23,19 @@ parameter two is size in megapixels, e.g. "(4:3) 12.1 megapixels" NOTE: for Chinese (zh) and Korean (ko) the pixel number (parameter two) will be multiplied by 100 as those languages want to count by ten thousands --> - (%1$s) %2$1.1f megapicsel - Llun gorau - Baban - Traeth - Harddwch - Tywyll - Dogfen - Lliwau hydref - Tân gwyllt - Blodau - Dan do - Tirlun - Darlun - Eira - Croen meddal Chwaraeon - Noson tywyll Testun Theatr Bwrdd gwyn - Parhaus - Estynedig - Arferol - Darlun - Llygaid cochion - LLYGAID COCHION - Sgrin disglair - Hyd cyffyrddiad ffocysu 0e - 3e - 5e 10e - Diderfyn - Dewisiadau uwch diff --git a/res/values-cy/qcomstrings.xml b/res/values-cy/qcomstrings.xml index b178e7647..d9d702625 100644 --- a/res/values-cy/qcomstrings.xml +++ b/res/values-cy/qcomstrings.xml @@ -31,7 +31,6 @@ - Dinoethiad awtomatig @@ -40,7 +39,6 @@ - Codec sain @@ -50,58 +48,39 @@ - Awto - Nodweddion uwch - Dim - Ffocws aml-gyffyrddiad - Blaenoriaeth ISO - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - Awto - I ffwrdd - Awto - Modd CDS - Modd TNR - Synhwyro wynebau - I ffwrdd - I ffwrdd @@ -121,117 +100,41 @@ - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - ISO - Awto - Awtomatig (HJR) - ISO50 - ISO100 - ISO125 - ISO150 - ISO200 - ISO250 - ISO300 - ISO320 - ISO350 - ISO400 - ISO450 - ISO500 - ISO600 - ISO640 - ISO700 - ISO800 - ISO1000 - ISO1200 - ISO1250 - ISO1500 - ISO1600 - ISO2000 - ISO2500 - ISO2700 - ISO3200 - ISO6400 - ISO12800 - Awto - 50 Hz (Ewrop) - 60 Hz (UDA) - I ffwrdd - Dim - Mono - Sepia - Negyddol - Postereiddio - Neon - Arlliw coch - I ffwrdd - Synhwyriad wynebau - I ffwrdd - Lefel 0 - Lefel 1 - Lefel 3 - Lefel 4 - Lefel 5 - Lefel 6 - Lefel 0 - Lefel 1 - Lefel 2 - Lefel 3 - Lefel 4 - Lefel 6 - Lefel 7 - Lefel 8 - Lefel 9 - Lefel 10 - Lefel 0 - Lefel 1 - Lefel 2 - Lefel 3 - Lefel 4 - Lefel 6 - Lefel 7 - Lefel 8 - Lefel 9 - Lefel 10 - Cyferbyniaeth - Dinoethiad @@ -243,24 +146,19 @@ Safonol - Histogram - Synhwyriad sgrin awtomatig - I ffwrdd - HDR awtomatig - Modd HDR @@ -269,91 +167,25 @@ CYLCHDRO FIDEO - 0 gradd - 90 gradd - 180 gradd - 270 gradd Does dim apiau mapio wedi eu gosod i fedru dangos y lleoliad Agor camera - I ffwrdd Gwynnu Rhybudd Diddymu - Gydag UbiFocus, bydd dy gamera yn tynnu 5 llun pob tro wyt yn pwyso\'r botwm tynnu llun. Caiff y pum llun eu cyfuno mewn i un llun gyda phopeth mewn ffocws. Mi fydd yn bosib dewis ail-ffocysu ar ôl tynnu\'r llun. Gwall anhysbys. Yn cau\'r camera. - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - I ffwrdd - Panorama - Modd proffesiynol - I ffwrdd - I ffwrdd - 2 eiliad - 5 eiliad - 10 eiliad Iawn Gwybodaeth am y fersiwn - Cyffredinol Camera llun Camera fideo System - Yn y modd camera deuol, bydd dy luniau yn fwy eglur. Bydd hefyd yn bosib gosod effeithiau cefndir gan olygu dy luniau camera deuol yn yr Oriel. - Gydag UbiFocus, bydd dy gamera yn tynnu pum llun ac yn eu cyfuno yn un llun gyda phopeth mewn ffocws. Ar ôl tynnu\'r llun, bydd gennyt yr opsiwn i ail-ffocysu. - Defnyddia OptiZoom pan rwyt eisiau chwyddo i mewn am lun clir. Gellir chwyddo i mewn cyn neu ar ôl tynnu\'r llun. - Mae modd chwaraeon yn dy helpu i dynnu gwell lluniau o chwaraeon neu bethau\'n symud.\n\nMae\'n gwella dy luniau ond yn cael dim effaith ar fideos. - Dewisa \"HDR\" am y lluniau gorau posib mewn amgylchiadau gyda golau cymysg fel golau isel neu golau yn y cefndir. - Mae\'n dy ganiatáu i dynnu ffrwydrad o 10 llun ac wedyn i ddewis y gorau neu\'r goreuon ohonyn nhw. - Gyda ChromaFlash, bydd y golau yn dy luniau â fflach yn cael ei optimeiddio ar gyfer yr holl bobol a gwrthrychau yn dy luniau. Mae\'r nodwedd yn gweithio gyda\'r camera cefn yn unig. - Peidio â dangos eto Iawn - Dinoethiad - Lefel 0 - Lefel 1 - Lefel 2 - Lefel 3 - Lefel 4 - Lefel 6 - Lefel 7 - Lefel 8 - Lefel 9 - Lefel 10 - I ffwrdd - 50 Hz (Ewrop) - 60 Hz (UDA) - Awto - Histogram - HDR - HDR awtomatig - Modd Bokeh - Modd Bokeh MPO Chwyddo - I ffwrdd - 1x - 2x - 3x - 4x - 5x - 6x - 7x - 8x - 9x - 10x - Canfod gwenu/syllu/cau llygaid - I ffwrdd - ZSL meddalwedd - ZSL caledwedd - Newid camera gydag ID - Mono diff --git a/res/values-cy/strings.xml b/res/values-cy/strings.xml index 16af9880c..44e308af7 100644 --- a/res/values-cy/strings.xml +++ b/res/values-cy/strings.xml @@ -18,193 +18,94 @@ Camera - Camera Fideo %1$02d:%2$02d - %1$d:%2$02d:%3$02d - Gosod y llun fel - Dileu - - Dileu\'r eitemau a ddewiswyd? - Dileu\'r eitem a ddewiswyd? - Dileu\'r eitemau a ddewiswyd? - Dileu\'r eitemau a ddewiswyd? - Dileu\'r eitemau a ddewiswyd? - Dileu\'r eitemau a ddewiswyd? - - Rhannu - Rhannu\'r panorama - Rhannu fel llun - Dilëwyd DADWNEUD - Manylion - Cau - - %1$d wedi\'u dewis - %1$d wedi\'i dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - - - %1$d wedi\'u dewis - %1$d wedi\'i dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - - - %1$d wedi\'u dewis - %1$d wedi\'i dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - %1$d wedi\'u dewis - - Dangos ar fap - Cylchdroi\'n wrthglocwedd - Cylchdroi i\'r dde - Golygu - Tocio - Tocio - Gosod fel - Methu â chwarae\'r fideo. - Cadwyd y ddelwedd wedi\'i thocio yn %s. Teitl - Disgrifiad Amser - Lleoliad - Llwybr Lled - Uchder - Gorweddiad - Hyd - Math MIME - Maint ffeil - Gwneuthurwr - Model - Flach - Agorfa - Hyd Ffocal Cydbwysedd gwyn - Amser Dinoethiad - ISO - mm - Â llaw - Awto - Taniodd y fflach - Dim fflach Anhysybys - Mae\'r eitem hon wedi ei gadw\'n lleol ac ar gael all-lein. - Arhosa - Yn rendro\'r llun sffêr Gwall camera - Methu â chysylltu â\'r camera. - Mae\'r camera wedi\'i analluogi oherwydd polisïau diogelwch. - Nid oes gan yr ap yr hawliau sydd ei angen arno er mwyn rhedeg. Gwiria dy osodiadau caniatâd. - Gwrthod - Arhosa\u2026 - Gosoda cerdyn SD cyn defnyddio\'r camera. - Yn paratoi\'r cerdyn SD\u2026 - Methwyd â chael at y cerdyn SD. - Recordiad treigl amser - Cipio Dewis camera Nôl - Blaen - LLEOLIAD - Amserydd cyfrif i lawr - - %d eiliad - 1 eiliad - %d eiliad - %d eiliad - %d eiliad - %d eiliad - - Bipio wrth gyfrif i lawr - I Ffwrdd - Ymlaen - Ansawdd fideo @@ -217,37 +118,20 @@ time lapse recording. Appears at top of the dialog. [CHAR LIMIT=30] --> Treigl amser - Gosodiadau camera - Gosodiadau fideo - Maint llun - Modd ffocysu - Awto - Anfeidredd - Macro - AWTO - ANFEIDREDD - MACRO - Flach - Awto - Ymlaen - I ffwrdd - FFLACH - AWTO - FFLACH - GORFODI - FFLACH - DIM @@ -255,65 +139,36 @@ CYDBWYSEDD GWYN - Awto - Gwynias - Golau dydd - Fflwroleuol - Cymylog - AWTO - GWYNIAS - GOLAU DYDD - FFLWROLEUOL - CYMYLOG - Modd olygfa - Awto - HDR+ - HDR - HDR+ YMLAEN - HDR+ I FFWRDD - HDR YMLAEN - HDR I FFWRDD - Symudiad - Nos Machlud - Parti - DIM - SYMUD - NOS MACHLUD - PARTI AMSERYDD I FFWRDD - 1 EILIAD - 3 EILIAD 10 EILIAD - 15 EILIAD - Nid yw\'n bosib ei ddewis mewn modd golygfa. @@ -324,13 +179,10 @@ - Goleuni - GOLEUNI - HDR CAMERA BLAEN @@ -343,70 +195,44 @@ - Wedi cyrraedd y terfyn maint. Rhy gyflym - Yn paratoi\'r panorama - Methwyd â chadw\'r panorama. - Panorama - Yn cipio panorama - Yn disgwyl am y panorama blaenorol - Yn cadw\u2026 - Yn rendro\'r panorama - Cyffyrdda i ffocysu. - Effeithiau - Dim - Gwasgu - Llygaid mawr - Ceg fawr - Ceg fach - Trwyn mawr - Llygaid bach - Yn y gofod Machlud Dy fideo - Cyffyrdda i dynnu llun wrth recordio. Mae recordio fideo wedi dechrau. Mae recordio fideo wedi stopio. - Clirio effeithiau - WYNEBAU GWIRION CEFNDIR - Caead - Gadael modd llun gorau - Botwm dewislen - Dewisydd camera, fideo, neu banorama - %1$s blwch tic Newid i lun @@ -414,48 +240,32 @@ Newid i banorama - Newid i Lun Sffêr Newid i ansawdd uchel - Diddymu adolygu - Wedi gorffen adolygu - Adolygu eto - YMLAEN - I FFWRDD - I ffwrdd 0.5 eiliad - 1 eiliad 1.5 eiliad - 2 eiliad - 2.5 eiliad - 3 eiliad - 4 eiliad - 5 eiliad - 6 eiliad 10 eiliad 12 eiliad - 15 eiliad - 24 eiliad 0.5 munud @@ -463,25 +273,17 @@ CHAR LIMIT = NONE] --> 1.5 munud - 2 funud - 2.5 munud - 3 munud - 4 munud - 5 munud - 6 munud 10 munud 12 munud - 15 munud - 24 munud 0.5 awr @@ -489,105 +291,47 @@ CHAR LIMIT = NONE] --> 1.5 awr - 2 awr - 2.5 awr - 3 awr - 4 awr - 5 awr - 6 awr 10 awr 12 awr - 15 awr - 24 awr - eiliadau - munudau - oriau - Iawn - Gosod Ysbaid Amser - Mae\'r nodwedd treigl amser i ffwrdd. Rhaid ei droi ymlaen i osod ysbaid amser. - Gosod yr hyd mewn eiliadau - Yn cyfrif i lawr i dynnu llun - Cofio lleoliadau tynnu lluniau? - Tagia dy luniau a fideos gyda\'r lleoliadau ble\'i tynnwyd.\n\nGall apiau eraill gweld y fath wybodaeth gyda\'r delweddau. - Dim diolch - Iawn - RHAGOR O DDEWISIADAU - GOSODIADAU - Creu Delwedd Planed Fychan - Yn cadw fy Mhlaned Fychan … Chwyddo - Cylchdroi - Cadw - Methu â llwytho\'r ddelwedd! - Golwg stribed ffilm - Yn gosod fel papur wal System - Adfer y rhagosodiadau - Caiff gosodiadau\'r camer eu hailosod i\'r gosodiadau rhagosodedig - - Caiff %1$d o 10 llun eu cadw a chaiff y gweddill eu dileu - Caiff %1$d o 10 llun ei gadw a chaiff y gweddill eu dileu - Caiff %1$d o 10 llun eu cadw a chaiff y gweddill eu dileu - Caiff %1$d o 10 llun eu cadw a chaiff y gweddill eu dileu - Caiff %1$d o 10 llun eu cadw a chaiff y gweddill eu dileu - Caiff %1$d o 10 llun eu cadw a chaiff y gweddill eu dileu - - Cadw\'r delweddau a ddewiswyd? Iawn Diddymu - - Cadwyd %1$d o 10 delwedd. - Cadwyd %1$d o 10 delwedd. - Cadwyd %1$d o 10 delwedd. - Cadwyd %1$d o 10 delwedd. - Cadwyd %1$d o 10 delwedd. - Cadwyd %1$d o 10 delwedd. - - Peidio â dangos eto - Dileu\'r cwbl? - Wyt ti\'n bendant eisiau dileu\'r 10 llun? Diddymu - Dileu - Dileu\'r cwbl? - Wyt ti\'n bendant eisiau dileu\'r holl luniau? Diddymu - Dileu\'r cwbl - Cadw\'r cwbl - Dileu\'r cwbl - Gosodiadau diff --git a/res/values-in/qcomstrings.xml b/res/values-in/qcomstrings.xml index 413aed3cd..62458ecd8 100644 --- a/res/values-in/qcomstrings.xml +++ b/res/values-in/qcomstrings.xml @@ -525,7 +525,6 @@ Bokeh modus MPO Hidup Mati - Nilai blur bokeh Perbesar diff --git a/res/values-sc-rIT/qcomstrings.xml b/res/values-sc-rIT/qcomstrings.xml index 648aea03f..d16ee7b6d 100644 --- a/res/values-sc-rIT/qcomstrings.xml +++ b/res/values-sc-rIT/qcomstrings.xml @@ -277,16 +277,6 @@ Ismanniamentu Istudadu - 1x - 2x - 3x - 4x - 5x - 6x - 7x - 8x - 9x - 10x Abìlita Disabìlita Istudadu diff --git a/res/values-sc-rIT/strings.xml b/res/values-sc-rIT/strings.xml index e9e0b1455..5f3be580d 100644 --- a/res/values-sc-rIT/strings.xml +++ b/res/values-sc-rIT/strings.xml @@ -375,8 +375,5 @@ CHAR LIMIT = NONE] --> Annulla Iscantzella Annulla - Iscantzella totu - Sarva totu - Iscantzella totu Cunfiguratziones diff --git a/tests/Android.mk b/tests/Android.mk new file mode 100644 index 000000000..cd768e06b --- /dev/null +++ b/tests/Android.mk @@ -0,0 +1,16 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +# We only want this apk build for tests. +LOCAL_MODULE_TAGS := tests + +LOCAL_SDK_VERSION := 16 + +# Include all test java files. +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := SnapTests + +LOCAL_INSTRUMENTATION_FOR := Snap + +include $(BUILD_PACKAGE) diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml new file mode 100644 index 000000000..9544aa592 --- /dev/null +++ b/tests/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/exiftool_parser/parser.py b/tests/exiftool_parser/parser.py new file mode 100755 index 000000000..7df23f154 --- /dev/null +++ b/tests/exiftool_parser/parser.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python +# +# This parser parses the output from Phil Harvey's exiftool (version 9.02) +# and convert it to xml format. It reads exiftool's output from stdin and +# write the xml format to stdout. +# +# In order to get the raw infomation from exiftool, we need to enable the verbose +# flag (-v2) of exiftool. +# +# Usage: +# exiftool -v2 img.jpg | ./parser.py >> output.xml +# +# + +import os +import sys +import re + +text = sys.stdin.read() + +print """""" +print "" + +# find the following two groups of string: +# +# 1. tag: +# +# | | | x) name = value +# | | | - Tag 0x1234 +# +# 2. IFD indicator: +# +# | | | + [xxx directory with xx entries] +# +p = re.compile( + "(((?:\| )+)[0-9]*\)(?:(?:.*? = .*?)|(?:.*? \(SubDirectory\) -->))\n.*?- Tag 0x[0-9a-f]{4})" + "|" + + "(((?:\| )*)\+ \[.*? directory with [0-9]+ entries]$)" + , re.M) +tags = p.findall(text) + +layer = 0 +ifds = [] + +for s in tags: + # IFD indicator + if s[2]: + l = len(s[3]) + ifd = s[2][l + 3:].split()[0] + new_layer = l / 2 + 1 + if new_layer > layer: + ifds.append(ifd) + else: + for i in range(layer - new_layer): + ifds.pop() + ifds[-1] = ifd + layer = new_layer + else: + l = len(s[1]) + s = s[0] + new_layer = l / 2 + if new_layer < layer: + for i in range(layer - new_layer): + ifds.pop() + layer = new_layer + + # find the ID + _id = re.search("0x[0-9a-f]{4}", s) + _id = _id.group(0) + + # find the name + name = re.search("[0-9]*?\).*?(?:(?: = )|(?: \(SubDirectory\) -->))", s) + name = name.group(0).split()[1] + + # find the raw value in the parenthesis + value = re.search("\(SubDirectory\) -->", s) + if value: + value = "NO_VALUE" + else: + value = re.search("\(.*\)\n", s) + if (name != 'Model' and value): + value = value.group(0)[1:-2] + else: + value = re.search("=.*\n", s) + value = value.group(0)[2:-1] + if "[snip]" in value: + value = "NO_VALUE" + + print (' ' + value + "") +print "" diff --git a/tests/res/raw/android_lawn.mp4 b/tests/res/raw/android_lawn.mp4 new file mode 100644 index 000000000..bdeffbed7 Binary files /dev/null and b/tests/res/raw/android_lawn.mp4 differ diff --git a/tests/res/raw/galaxy_nexus.jpg b/tests/res/raw/galaxy_nexus.jpg new file mode 100755 index 000000000..de91df696 Binary files /dev/null and b/tests/res/raw/galaxy_nexus.jpg differ diff --git a/tests/res/raw/jpeg_control.jpg b/tests/res/raw/jpeg_control.jpg new file mode 100644 index 000000000..bb468a77c Binary files /dev/null and b/tests/res/raw/jpeg_control.jpg differ diff --git a/tests/res/xml/galaxy_nexus.xml b/tests/res/xml/galaxy_nexus.xml new file mode 100644 index 000000000..55dd524a4 --- /dev/null +++ b/tests/res/xml/galaxy_nexus.xml @@ -0,0 +1,43 @@ + + + 2560 + 1920 + google + Nexus S + 1 + MASTER + 2012:07:30 16:28:42 + 1 + NO_VALUE + 1/40 + 26/10 + 3 + 100 + 0220 + 2012:07:30 16:28:42 + 2012:07:30 16:28:42 + 50/10 + 30/10 + 30/10 + 0/0 + 30/10 + 2 + 0 + 343/100 + IICSAUser comments + 1 + 2560 + 1920 + 0 + 0 + 0 + 320 + 240 + 6 + 1 + 72/1 + 72/1 + 2 + 690 + 10447 + diff --git a/tests/src/com/android/camera/CameraTestRunner.java b/tests/src/com/android/camera/CameraTestRunner.java new file mode 100755 index 000000000..03ec6b3be --- /dev/null +++ b/tests/src/com/android/camera/CameraTestRunner.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012 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.test.InstrumentationTestRunner; +import android.test.InstrumentationTestSuite; + +import com.android.camera.functional.CameraTest; +import com.android.camera.functional.ImageCaptureIntentTest; +import com.android.camera.functional.VideoCaptureIntentTest; +import com.android.camera.unittest.CameraUnitTest; + +import junit.framework.TestSuite; + + +public class CameraTestRunner extends InstrumentationTestRunner { + + @Override + public TestSuite getAllTests() { + TestSuite suite = new InstrumentationTestSuite(this); + suite.addTestSuite(CameraTest.class); + suite.addTestSuite(ImageCaptureIntentTest.class); + suite.addTestSuite(VideoCaptureIntentTest.class); + suite.addTestSuite(CameraUnitTest.class); + return suite; + } + + @Override + public ClassLoader getLoader() { + return CameraTestRunner.class.getClassLoader(); + } +} diff --git a/tests/src/com/android/camera/StressTests.java b/tests/src/com/android/camera/StressTests.java new file mode 100755 index 000000000..2cc4eeb4e --- /dev/null +++ b/tests/src/com/android/camera/StressTests.java @@ -0,0 +1,46 @@ +/* + * 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 com.android.camera.stress.CameraLatency; +import com.android.camera.stress.CameraStartUp; +import com.android.camera.stress.ImageCapture; +import com.android.camera.stress.SwitchPreview; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * Instrumentation Test Runner for all Camera tests. + * + * Running all tests: + * + * adb shell am instrument \ + * -e class com.android.camera.StressTests \ + * -w com.google.android.camera.tests/com.android.camera.stress.CameraStressTestRunner + */ + +public class StressTests extends TestSuite { + public static Test suite() { + TestSuite result = new TestSuite(); + result.addTestSuite(CameraLatency.class); + result.addTestSuite(CameraStartUp.class); + result.addTestSuite(ImageCapture.class); + result.addTestSuite(SwitchPreview.class); + return result; + } +} diff --git a/tests/src/com/android/camera/functional/CameraTest.java b/tests/src/com/android/camera/functional/CameraTest.java new file mode 100644 index 000000000..3fdebc030 --- /dev/null +++ b/tests/src/com/android/camera/functional/CameraTest.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2010 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.functional; + +import com.android.camera.CameraActivity; + +import android.app.Activity; +import android.content.Intent; +import android.net.Uri; +import android.os.Environment; +import android.os.Process; +import android.provider.MediaStore; +import android.test.InstrumentationTestCase; +import android.test.suitebuilder.annotation.LargeTest; + +import java.io.File; +import java.lang.ref.WeakReference; +import java.util.ArrayList; + +public class CameraTest extends InstrumentationTestCase { + @LargeTest + public void testVideoCaptureIntentFdLeak() throws Exception { + Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.parse("file://" + + Environment.getExternalStorageDirectory().toString() + + "test_fd_leak.3gp")); + getInstrumentation().startActivitySync(intent).finish(); + // Test if the fd is closed. + for (File f: new File("/proc/" + Process.myPid() + "/fd").listFiles()) { + assertEquals(-1, f.getCanonicalPath().indexOf("test_fd_leak.3gp")); + } + } + + @LargeTest + public void testActivityLeak() throws Exception { + checkActivityLeak(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); + checkActivityLeak(MediaStore.INTENT_ACTION_VIDEO_CAMERA); + } + + private void checkActivityLeak(String action) throws Exception { + final int TEST_COUNT = 5; + Intent intent = new Intent(action); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.setClass(getInstrumentation().getTargetContext(), + CameraActivity.class); + ArrayList> refs = + new ArrayList>(); + for (int i = 0; i < TEST_COUNT; i++) { + Activity activity = getInstrumentation().startActivitySync(intent); + refs.add(new WeakReference(activity)); + activity.finish(); + getInstrumentation().waitForIdleSync(); + activity = null; + } + Runtime.getRuntime().gc(); + Runtime.getRuntime().runFinalization(); + Runtime.getRuntime().gc(); + int refCount = 0; + for (WeakReference c: refs) { + if (c.get() != null) refCount++; + } + // If applications are leaking activity, every reference is reachable. + assertTrue(refCount != TEST_COUNT); + } +} diff --git a/tests/src/com/android/camera/functional/ImageCaptureIntentTest.java b/tests/src/com/android/camera/functional/ImageCaptureIntentTest.java new file mode 100644 index 000000000..88e7551b8 --- /dev/null +++ b/tests/src/com/android/camera/functional/ImageCaptureIntentTest.java @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2011 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.functional; + +import com.android.camera.CameraActivity; +import org.codeaurora.snapcam.R; + +import android.app.Activity; +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.net.Uri; +import android.os.Environment; +import android.provider.MediaStore; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.view.KeyEvent; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; + +public class ImageCaptureIntentTest extends ActivityInstrumentationTestCase2 { + private Intent mIntent; + + public ImageCaptureIntentTest() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); + } + + @LargeTest + public void testNoExtraOutput() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + takePicture(); + pressDone(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_OK, getActivity().getResultCode()); + Intent resultData = getActivity().getResultData(); + Bitmap bitmap = (Bitmap) resultData.getParcelableExtra("data"); + assertNotNull(bitmap); + assertTrue(bitmap.getWidth() > 0); + assertTrue(bitmap.getHeight() > 0); + } + + @LargeTest + public void testExtraOutput() throws Exception { + File file = new File(Environment.getExternalStorageDirectory(), + "test.jpg"); + BufferedInputStream stream = null; + byte[] jpegData; + + try { + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); + setActivityIntent(mIntent); + getActivity(); + + takePicture(); + pressDone(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_OK, getActivity().getResultCode()); + + // Verify the jpeg file + int fileLength = (int) file.length(); + assertTrue(fileLength > 0); + jpegData = new byte[fileLength]; + stream = new BufferedInputStream(new FileInputStream(file)); + stream.read(jpegData); + } finally { + if (stream != null) stream.close(); + file.delete(); + } + + Bitmap b = BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length); + assertTrue(b.getWidth() > 0); + assertTrue(b.getHeight() > 0); + } + + @LargeTest + public void testCancel() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + pressCancel(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_CANCELED, getActivity().getResultCode()); + } + + @LargeTest + public void testSnapshotCancel() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + takePicture(); + pressCancel(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_CANCELED, getActivity().getResultCode()); + } + + private void takePicture() throws Exception { + getInstrumentation().sendKeySync( + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_FOCUS)); + getInstrumentation().sendCharacterSync(KeyEvent.KEYCODE_CAMERA); + Thread.sleep(4000); + } + + private void pressDone() { + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + getActivity().findViewById(R.id.done_button).performClick(); + } + }); + } + + private void pressCancel() { + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + getActivity().findViewById(R.id.btn_cancel).performClick(); + } + }); + } +} diff --git a/tests/src/com/android/camera/functional/VideoCaptureIntentTest.java b/tests/src/com/android/camera/functional/VideoCaptureIntentTest.java new file mode 100644 index 000000000..c0f297017 --- /dev/null +++ b/tests/src/com/android/camera/functional/VideoCaptureIntentTest.java @@ -0,0 +1,258 @@ +/* + * Copyright (C) 2011 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.functional; + +import com.android.camera.CameraActivity; +import org.codeaurora.snapcam.R; + +import android.app.Activity; +import android.content.ContentResolver; +import android.content.Intent; +import android.database.Cursor; +import android.media.MediaMetadataRetriever; +import android.net.Uri; +import android.os.Environment; +import android.provider.MediaStore; +import android.provider.MediaStore.Video.VideoColumns; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.util.Log; +import android.view.KeyEvent; + +import java.io.File; + +public class VideoCaptureIntentTest extends ActivityInstrumentationTestCase2 { + private static final String TAG = "VideoCaptureIntentTest"; + private Intent mIntent; + private Uri mVideoUri; + private File mFile, mFile2; + + public VideoCaptureIntentTest() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + mIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); + } + + @Override + protected void tearDown() throws Exception { + if (mVideoUri != null) { + ContentResolver resolver = getActivity().getContentResolver(); + Uri query = mVideoUri.buildUpon().build(); + String[] projection = new String[] {VideoColumns.DATA}; + + Cursor cursor = null; + try { + cursor = resolver.query(query, projection, null, null, null); + if (cursor != null && cursor.moveToFirst()) { + new File(cursor.getString(0)).delete(); + } + } finally { + if (cursor != null) cursor.close(); + } + + resolver.delete(mVideoUri, null, null); + } + if (mFile != null) mFile.delete(); + if (mFile2 != null) mFile2.delete(); + super.tearDown(); + } + + @LargeTest + public void testNoExtraOutput() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + recordVideo(); + pressDone(); + + Intent resultData = getActivity().getResultData(); + mVideoUri = resultData.getData(); + assertNotNull(mVideoUri); + verify(getActivity(), mVideoUri); + } + + @LargeTest + public void testExtraOutput() throws Exception { + mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); + + Uri uri = Uri.fromFile(mFile); + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri); + setActivityIntent(mIntent); + getActivity(); + + recordVideo(); + pressDone(); + + verify(getActivity(), uri); + } + + @LargeTest + public void testCancel() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + pressCancel(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_CANCELED, getActivity().getResultCode()); + } + + @LargeTest + public void testRecordCancel() throws Exception { + setActivityIntent(mIntent); + getActivity(); + + recordVideo(); + pressCancel(); + + assertTrue(getActivity().isFinishing()); + assertEquals(Activity.RESULT_CANCELED, getActivity().getResultCode()); + } + + @LargeTest + public void testExtraSizeLimit() throws Exception { + mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); + final long sizeLimit = 500000; // bytes + + Uri uri = Uri.fromFile(mFile); + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri); + mIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, sizeLimit); + mIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); // use low quality to speed up + setActivityIntent(mIntent); + getActivity(); + + recordVideo(5000); + pressDone(); + + verify(getActivity(), uri); + long length = mFile.length(); + Log.v(TAG, "Video size is " + length + " bytes."); + assertTrue(length > 0); + assertTrue("Actual size=" + length, length <= sizeLimit); + } + + @LargeTest + public void testExtraDurationLimit() throws Exception { + mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); + final int durationLimit = 2; // seconds + + Uri uri = Uri.fromFile(mFile); + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri); + mIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, durationLimit); + setActivityIntent(mIntent); + getActivity(); + + recordVideo(5000); + pressDone(); + + int duration = verify(getActivity(), uri); + // The duraion should be close to to the limit. The last video duration + // also has duration, so the total duration may exceeds the limit a + // little bit. + Log.v(TAG, "Video length is " + duration + " ms."); + assertTrue(duration < (durationLimit + 1) * 1000); + } + + @LargeTest + public void testExtraVideoQuality() throws Exception { + mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); + mFile2 = new File(Environment.getExternalStorageDirectory(), "video2.tmp"); + + Uri uri = Uri.fromFile(mFile); + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri); + mIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); // low quality + setActivityIntent(mIntent); + getActivity(); + + recordVideo(); + pressDone(); + + verify(getActivity(), uri); + setActivity(null); + + uri = Uri.fromFile(mFile2); + mIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri); + mIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); // high quality + setActivityIntent(mIntent); + getActivity(); + + recordVideo(); + pressDone(); + + verify(getActivity(), uri); + assertTrue(mFile.length() <= mFile2.length()); + } + + // Verify result code, result data, and the duration. + private int verify(CameraActivity activity, Uri uri) throws Exception { + assertTrue(activity.isFinishing()); + assertEquals(Activity.RESULT_OK, activity.getResultCode()); + + // Verify the video file + MediaMetadataRetriever retriever = new MediaMetadataRetriever(); + retriever.setDataSource(activity, uri); + String duration = retriever.extractMetadata( + MediaMetadataRetriever.METADATA_KEY_DURATION); + assertNotNull(duration); + int durationValue = Integer.parseInt(duration); + Log.v(TAG, "Video duration is " + durationValue); + assertTrue(durationValue > 0); + return durationValue; + } + + private void recordVideo(int ms) throws Exception { + getInstrumentation().sendCharacterSync(KeyEvent.KEYCODE_CAMERA); + Thread.sleep(ms); + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + // If recording is in progress, stop it. Run these atomically in + // UI thread. + CameraActivity activity = getActivity(); + if (activity.isRecording()) { + activity.findViewById(R.id.shutter_button).performClick(); + } + } + }); + } + + private void recordVideo() throws Exception { + recordVideo(2000); + } + + private void pressDone() { + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + getActivity().findViewById(R.id.done_button).performClick(); + } + }); + } + + private void pressCancel() { + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + getActivity().findViewById(R.id.btn_cancel).performClick(); + } + }); + } +} diff --git a/tests/src/com/android/camera/stress/CameraLatency.java b/tests/src/com/android/camera/stress/CameraLatency.java new file mode 100755 index 000000000..22347ddb4 --- /dev/null +++ b/tests/src/com/android/camera/stress/CameraLatency.java @@ -0,0 +1,148 @@ +/* + * 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.stress; + +import com.android.camera.CameraActivity; + +import android.app.Instrumentation; +import android.os.Environment; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.util.Log; +import android.view.KeyEvent; + +import java.io.BufferedWriter; +import java.io.FileWriter; + +/** + * Junit / Instrumentation test case for camera test + * + */ + +public class CameraLatency extends ActivityInstrumentationTestCase2 { + private String TAG = "CameraLatency"; + private static final int TOTAL_NUMBER_OF_IMAGECAPTURE = 20; + private static final long WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN = 6 * 1000; //6 seconds. + private static final String CAMERA_TEST_OUTPUT_FILE = + Environment.getExternalStorageDirectory().toString() + "/mediaStressOut.txt"; + + private long mTotalAutoFocusTime; + private long mTotalShutterLag; + private long mTotalShutterToPictureDisplayedTime; + private long mTotalPictureDisplayedToJpegCallbackTime; + private long mTotalJpegCallbackFinishTime; + private long mAvgAutoFocusTime; + private long mAvgShutterLag = mTotalShutterLag; + private long mAvgShutterToPictureDisplayedTime; + private long mAvgPictureDisplayedToJpegCallbackTime; + private long mAvgJpegCallbackFinishTime; + + public CameraLatency() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + Thread.sleep(2 * 1000); //sleep for 2 seconds. + getActivity(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + public void testImageCapture() { + Log.v(TAG, "start testImageCapture test"); + Instrumentation inst = getInstrumentation(); + try { + for (int i = 0; i < TOTAL_NUMBER_OF_IMAGECAPTURE; i++) { + Thread.sleep(WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN); + inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_CENTER); + Thread.sleep(WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN); + //skip the first measurement + if (i != 0) { + CameraActivity c = getActivity(); + + // if any of the latency var accessor methods return -1 then the + // camera is set to a different module other than PhotoModule so + // skip the shot and try again + if (c.getAutoFocusTime() != -1) { + mTotalAutoFocusTime += c.getAutoFocusTime(); + mTotalShutterLag += c.getShutterLag(); + mTotalShutterToPictureDisplayedTime += + c.getShutterToPictureDisplayedTime(); + mTotalPictureDisplayedToJpegCallbackTime += + c.getPictureDisplayedToJpegCallbackTime(); + mTotalJpegCallbackFinishTime += c.getJpegCallbackFinishTime(); + } + else { + i--; + continue; + } + } + } + } catch (Exception e) { + Log.v(TAG, "Got exception", e); + } + //ToDO: yslau + //1) Need to get the baseline from the cupcake so that we can add the + //failure condition of the camera latency. + //2) Only count those number with succesful capture. Set the timer to invalid + //before capture and ignore them if the value is invalid + int numberofRun = TOTAL_NUMBER_OF_IMAGECAPTURE - 1; + mAvgAutoFocusTime = mTotalAutoFocusTime / numberofRun; + mAvgShutterLag = mTotalShutterLag / numberofRun; + mAvgShutterToPictureDisplayedTime = + mTotalShutterToPictureDisplayedTime / numberofRun; + mAvgPictureDisplayedToJpegCallbackTime = + mTotalPictureDisplayedToJpegCallbackTime / numberofRun; + mAvgJpegCallbackFinishTime = + mTotalJpegCallbackFinishTime / numberofRun; + + try { + FileWriter fstream = null; + fstream = new FileWriter(CAMERA_TEST_OUTPUT_FILE, true); + BufferedWriter out = new BufferedWriter(fstream); + out.write("Camera Latency : \n"); + out.write("Number of loop: " + TOTAL_NUMBER_OF_IMAGECAPTURE + "\n"); + out.write("Avg AutoFocus = " + mAvgAutoFocusTime + "\n"); + out.write("Avg mShutterLag = " + mAvgShutterLag + "\n"); + out.write("Avg mShutterToPictureDisplayedTime = " + + mAvgShutterToPictureDisplayedTime + "\n"); + out.write("Avg mPictureDisplayedToJpegCallbackTime = " + + mAvgPictureDisplayedToJpegCallbackTime + "\n"); + out.write("Avg mJpegCallbackFinishTime = " + + mAvgJpegCallbackFinishTime + "\n"); + out.close(); + fstream.close(); + } catch (Exception e) { + fail("Camera Latency write output to file"); + } + Log.v(TAG, "The Image capture wait time = " + + WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN); + Log.v(TAG, "Avg AutoFocus = " + mAvgAutoFocusTime); + Log.v(TAG, "Avg mShutterLag = " + mAvgShutterLag); + Log.v(TAG, "Avg mShutterToPictureDisplayedTime = " + + mAvgShutterToPictureDisplayedTime); + Log.v(TAG, "Avg mPictureDisplayedToJpegCallbackTime = " + + mAvgPictureDisplayedToJpegCallbackTime); + Log.v(TAG, "Avg mJpegCallbackFinishTime = " + mAvgJpegCallbackFinishTime); + } +} + diff --git a/tests/src/com/android/camera/stress/CameraStartUp.java b/tests/src/com/android/camera/stress/CameraStartUp.java new file mode 100644 index 000000000..c39f43584 --- /dev/null +++ b/tests/src/com/android/camera/stress/CameraStartUp.java @@ -0,0 +1,156 @@ +/* + * 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.stress; + +import com.android.camera.CameraActivity; + +import android.app.Activity; +import android.app.Instrumentation; +import android.content.Intent; +import android.os.Environment; +import android.provider.MediaStore; +import android.test.InstrumentationTestCase; +import android.test.suitebuilder.annotation.LargeTest; +import android.util.Log; + +import java.io.FileWriter; +import java.io.BufferedWriter; + +/** + * Test cases to measure the camera and video recorder startup time. + */ +public class CameraStartUp extends InstrumentationTestCase { + + private static final int TOTAL_NUMBER_OF_STARTUP = 20; + + private String TAG = "CameraStartUp"; + private static final String CAMERA_TEST_OUTPUT_FILE = + Environment.getExternalStorageDirectory().toString() + "/mediaStressOut.txt"; + private static int WAIT_TIME_FOR_PREVIEW = 4 * 1000; //4 seconds. + + private long launchCamera() { + long startupTime = 0; + try { + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + long beforeStart = System.currentTimeMillis(); + Instrumentation inst = getInstrumentation(); + Activity cameraActivity = inst.startActivitySync(intent); + long cameraStarted = System.currentTimeMillis(); + Thread.sleep(WAIT_TIME_FOR_PREVIEW); + cameraActivity.finish(); + startupTime = cameraStarted - beforeStart; + Thread.sleep(2 * 1000); //sleep for 2 seconds. + Log.v(TAG, "camera startup time: " + startupTime); + } catch (Exception e) { + Log.v(TAG, "Got exception", e); + fail("Fails to get the output file"); + } + return startupTime; + } + + private long launchVideo() { + long startupTime = 0; + + try { + Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA); + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + long beforeStart = System.currentTimeMillis(); + Instrumentation inst = getInstrumentation(); + Activity recorderActivity = inst.startActivitySync(intent); + long cameraStarted = System.currentTimeMillis(); + Thread.sleep(WAIT_TIME_FOR_PREVIEW); + recorderActivity.finish(); + startupTime = cameraStarted - beforeStart; + Log.v(TAG, "Video Startup Time = " + startupTime); + // wait for 1s to make sure it reach a clean stage + Thread.sleep(2 * 1000); //sleep for 2 seconds. + Log.v(TAG, "video startup time: " + startupTime); + } catch (Exception e) { + Log.v(TAG, "Got exception", e); + fail("Fails to launch video output file"); + } + return startupTime; + } + + private void writeToOutputFile(long totalStartupTime, + String individualStartupTime, boolean firstStartUp, String Type) throws Exception { + // TODO (yslau) : Need to integrate the output data with central + // dashboard + try { + FileWriter fstream = null; + fstream = new FileWriter(CAMERA_TEST_OUTPUT_FILE, true); + BufferedWriter out = new BufferedWriter(fstream); + if (firstStartUp) { + out.write("First " + Type + " Startup: " + totalStartupTime + "\n"); + } else { + long averageStartupTime = totalStartupTime / (TOTAL_NUMBER_OF_STARTUP -1); + out.write(Type + "startup time: " + "\n"); + out.write("Number of loop: " + (TOTAL_NUMBER_OF_STARTUP -1) + "\n"); + out.write(individualStartupTime + "\n\n"); + out.write(Type + " average startup time: " + averageStartupTime + " ms\n\n"); + } + out.close(); + fstream.close(); + } catch (Exception e) { + fail("Camera write output to file"); + } + } + + public void testLaunchVideo() throws Exception { + String individualStartupTime; + individualStartupTime = "Individual Video Startup Time = "; + long totalStartupTime = 0; + long startupTime = 0; + for (int i = 0; i < TOTAL_NUMBER_OF_STARTUP; i++) { + if (i == 0) { + // Capture the first startup time individually + long firstStartUpTime = launchVideo(); + writeToOutputFile(firstStartUpTime, "na", true, "Video"); + } else { + startupTime = launchVideo(); + totalStartupTime += startupTime; + individualStartupTime += startupTime + " ,"; + } + } + Log.v(TAG, "totalStartupTime =" + totalStartupTime); + writeToOutputFile(totalStartupTime, individualStartupTime, false, "Video"); + } + + public void testLaunchCamera() throws Exception { + String individualStartupTime; + individualStartupTime = "Individual Camera Startup Time = "; + long totalStartupTime = 0; + long startupTime = 0; + for (int i = 0; i < TOTAL_NUMBER_OF_STARTUP; i++) { + if (i == 0) { + // Capture the first startup time individually + long firstStartUpTime = launchCamera(); + writeToOutputFile(firstStartUpTime, "na", true, "Camera"); + } else { + startupTime = launchCamera(); + totalStartupTime += startupTime; + individualStartupTime += startupTime + " ,"; + } + } + Log.v(TAG, "totalStartupTime =" + totalStartupTime); + writeToOutputFile(totalStartupTime, + individualStartupTime, false, "Camera"); + } +} diff --git a/tests/src/com/android/camera/stress/CameraStressTestRunner.java b/tests/src/com/android/camera/stress/CameraStressTestRunner.java new file mode 100755 index 000000000..b1bb2a899 --- /dev/null +++ b/tests/src/com/android/camera/stress/CameraStressTestRunner.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2010 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.stress; + +import android.os.Bundle; +import android.test.InstrumentationTestRunner; +import android.test.InstrumentationTestSuite; +import junit.framework.TestSuite; + +public class CameraStressTestRunner extends InstrumentationTestRunner { + + // Default recorder settings + public static int mVideoDuration = 20000; // set default to 20 seconds + public static int mVideoIterations = 1; // set default to 1 video + public static int mImageIterations = 10; // set default to 10 images + + @Override + public TestSuite getAllTests() { + TestSuite suite = new InstrumentationTestSuite(this); + suite.addTestSuite(ImageCapture.class); + suite.addTestSuite(VideoCapture.class); + return suite; + } + + @Override + public ClassLoader getLoader() { + return CameraStressTestRunner.class.getClassLoader(); + } + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + String video_iterations = (String) icicle.get("video_iterations"); + String image_iterations = (String) icicle.get("image_iterations"); + String video_duration = (String) icicle.get("video_duration"); + + if ( video_iterations != null ) { + mVideoIterations = Integer.parseInt(video_iterations); + } + if ( image_iterations != null) { + mImageIterations = Integer.parseInt(image_iterations); + } + if ( video_duration != null) { + mVideoDuration = Integer.parseInt(video_duration); + } + } +} diff --git a/tests/src/com/android/camera/stress/ImageCapture.java b/tests/src/com/android/camera/stress/ImageCapture.java new file mode 100755 index 000000000..f5f430225 --- /dev/null +++ b/tests/src/com/android/camera/stress/ImageCapture.java @@ -0,0 +1,124 @@ +/* + * 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.stress; + +import com.android.camera.CameraActivity; +import com.android.camera.stress.CameraStressTestRunner; + +import android.app.Instrumentation; +import android.content.Intent; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.util.Log; +import android.view.KeyEvent; +import android.app.Activity; + +/** + * Junit / Instrumentation test case for camera test + * + * Running the test suite: + * + * adb shell am instrument \ + * -e class com.android.camera.stress.ImageCapture \ + * -w com.google.android.camera.tests/android.test.InstrumentationTestRunner + * + */ + +public class ImageCapture extends ActivityInstrumentationTestCase2 { + private String TAG = "ImageCapture"; + private static final long WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN = 4 * 1000; //4 seconds + private static final long WAIT_FOR_SWITCH_CAMERA = 4 * 1000; //4 seconds + + private TestUtil testUtil = new TestUtil(); + + // Private intent extras. + private final static String EXTRAS_CAMERA_FACING = + "android.intent.extras.CAMERA_FACING"; + + public ImageCapture() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + testUtil.prepareOutputFile(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + testUtil.closeOutputFile(); + super.tearDown(); + } + + public void captureImages(String reportTag, Instrumentation inst) { + int total_num_of_images = CameraStressTestRunner.mImageIterations; + Log.v(TAG, "no of images = " + total_num_of_images); + + //TODO(yslau): Need to integrate the outoput with the central dashboard, + //write to a txt file as a temp solution + boolean memoryResult = false; + KeyEvent focusEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_FOCUS); + + try { + testUtil.writeReportHeader(reportTag, total_num_of_images); + for (int i = 0; i < total_num_of_images; i++) { + Thread.sleep(WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN); + inst.sendKeySync(focusEvent); + inst.sendCharacterSync(KeyEvent.KEYCODE_CAMERA); + Thread.sleep(WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN); + testUtil.writeResult(i); + } + } catch (Exception e) { + Log.v(TAG, "Got exception: " + e.toString()); + assertTrue("testImageCapture", false); + } + } + + public void testBackImageCapture() throws Exception { + Instrumentation inst = getInstrumentation(); + Intent intent = new Intent(); + + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.putExtra(EXTRAS_CAMERA_FACING, + android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK); + Activity act = inst.startActivitySync(intent); + Thread.sleep(WAIT_FOR_SWITCH_CAMERA); + captureImages("Back Camera Image Capture\n", inst); + act.finish(); + // Wait for a clean finish. + Thread.sleep(2 * 1000); //sleep for 2 seconds. + + } + + public void testFrontImageCapture() throws Exception { + Instrumentation inst = getInstrumentation(); + Intent intent = new Intent(); + + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.putExtra(EXTRAS_CAMERA_FACING, + android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT); + Activity act = inst.startActivitySync(intent); + Thread.sleep(WAIT_FOR_SWITCH_CAMERA); + captureImages("Front Camera Image Capture\n", inst); + act.finish(); + // Wait for a clean finish. + Thread.sleep(2 * 1000); //sleep for 2 seconds. + } +} diff --git a/tests/src/com/android/camera/stress/ShotToShotLatency.java b/tests/src/com/android/camera/stress/ShotToShotLatency.java new file mode 100644 index 000000000..345379f2a --- /dev/null +++ b/tests/src/com/android/camera/stress/ShotToShotLatency.java @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2012 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.stress; + +import android.app.Instrumentation; +import android.os.Environment; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.util.Log; +import android.view.KeyEvent; +import com.android.camera.CameraActivity; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FilenameFilter; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; + +/** + * Junit / Instrumentation test case for measuring camera shot to shot latency + */ +public class ShotToShotLatency extends ActivityInstrumentationTestCase2 { + private String TAG = "ShotToShotLatency"; + private static final int TOTAL_NUMBER_OF_SNAPSHOTS = 250; + private static final long SNAPSHOT_WAIT = 1000; + private static final String CAMERA_TEST_OUTPUT_FILE = + Environment.getExternalStorageDirectory().toString() + "/mediaStressOut.txt"; + private static final String CAMERA_IMAGE_DIRECTORY = + Environment.getExternalStorageDirectory().toString() + "/DCIM/Camera/"; + + public ShotToShotLatency() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + getActivity(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + private void cleanupLatencyImages() { + try { + File sdcard = new File(CAMERA_IMAGE_DIRECTORY); + File[] pics = null; + FilenameFilter filter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.endsWith(".jpg"); + } + }; + pics = sdcard.listFiles(filter); + for (File f : pics) { + f.delete(); + } + } catch (SecurityException e) { + Log.e(TAG, "Security manager access violation: " + e.toString()); + } + } + + private void sleep(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException e) { + Log.e(TAG, "Sleep InterruptedException " + e.toString()); + } + } + + public void testShotToShotLatency() { + long sigmaOfDiffFromMeanSquared = 0; + double mean = 0; + double standardDeviation = 0; + ArrayList captureTimes = new ArrayList(); + ArrayList latencyTimes = new ArrayList(); + + Log.v(TAG, "start testShotToShotLatency test"); + Instrumentation inst = getInstrumentation(); + + // Generate data points + for (int i = 0; i < TOTAL_NUMBER_OF_SNAPSHOTS; i++) { + inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_CENTER); + sleep(SNAPSHOT_WAIT); + CameraActivity c = getActivity(); + if (c.getCaptureStartTime() > 0) { + captureTimes.add(c.getCaptureStartTime()); + } + } + + // Calculate latencies + for (int j = 1; j < captureTimes.size(); j++) { + latencyTimes.add(captureTimes.get(j) - captureTimes.get(j - 1)); + } + + // Crunch numbers + for (long dataPoint : latencyTimes) { + mean += (double) dataPoint; + } + mean /= latencyTimes.size(); + + for (long dataPoint : latencyTimes) { + sigmaOfDiffFromMeanSquared += (dataPoint - mean) * (dataPoint - mean); + } + standardDeviation = Math.sqrt(sigmaOfDiffFromMeanSquared / latencyTimes.size()); + + // Report statistics + File outFile = new File(CAMERA_TEST_OUTPUT_FILE); + BufferedWriter output = null; + try { + output = new BufferedWriter(new FileWriter(outFile, true)); + output.write("Shot to shot latency - mean: " + mean + "\n"); + output.write("Shot to shot latency - standard deviation: " + standardDeviation + "\n"); + cleanupLatencyImages(); + } catch (IOException e) { + Log.e(TAG, "testShotToShotLatency IOException writing to log " + e.toString()); + } finally { + try { + if (output != null) { + output.close(); + } + } catch (IOException e) { + Log.e(TAG, "Error closing file: " + e.toString()); + } + } + } +} diff --git a/tests/src/com/android/camera/stress/SwitchPreview.java b/tests/src/com/android/camera/stress/SwitchPreview.java new file mode 100755 index 000000000..a818bdf60 --- /dev/null +++ b/tests/src/com/android/camera/stress/SwitchPreview.java @@ -0,0 +1,116 @@ +/* + * 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.stress; + +import com.android.camera.CameraActivity; + +import android.app.Instrumentation; +import android.content.Intent; +import android.provider.MediaStore; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.os.Environment; +import android.util.Log; + +import java.io.BufferedWriter; +import java.io.FileWriter; + +/** + * Junit / Instrumentation test case for camera test + * + * Running the test suite: + * + * adb shell am instrument \ + * -e class com.android.camera.stress.SwitchPreview \ + * -w com.android.camera.tests/com.android.camera.stress.CameraStressTestRunner + * + */ +public class SwitchPreview extends ActivityInstrumentationTestCase2 { + private String TAG = "SwitchPreview"; + private static final int TOTAL_NUMBER_OF_SWITCHING = 200; + private static final long WAIT_FOR_PREVIEW = 4000; + + private static final String CAMERA_TEST_OUTPUT_FILE = + Environment.getExternalStorageDirectory().toString() + "/mediaStressOut.txt"; + private BufferedWriter mOut; + private FileWriter mfstream; + + public SwitchPreview() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + getActivity(); + prepareOutputFile(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + getActivity().finish(); + closeOutputFile(); + super.tearDown(); + } + + private void prepareOutputFile(){ + try{ + mfstream = new FileWriter(CAMERA_TEST_OUTPUT_FILE, true); + mOut = new BufferedWriter(mfstream); + } catch (Exception e){ + assertTrue("Camera Switch Mode", false); + } + } + + private void closeOutputFile() { + try { + mOut.write("\n"); + mOut.close(); + mfstream.close(); + } catch (Exception e) { + assertTrue("CameraSwitchMode close output", false); + } + } + + public void testSwitchMode() { + //Switching the video and the video recorder mode + Instrumentation inst = getInstrumentation(); + try{ + mOut.write("Camera Switch Mode:\n"); + mOut.write("No of loops :" + TOTAL_NUMBER_OF_SWITCHING + "\n"); + mOut.write("loop: "); + for (int i=0; i< TOTAL_NUMBER_OF_SWITCHING; i++) { + Thread.sleep(WAIT_FOR_PREVIEW); + Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + intent.setClass(getInstrumentation().getTargetContext(), + CameraActivity.class); + getActivity().startActivity(intent); + Thread.sleep(WAIT_FOR_PREVIEW); + intent = new Intent(); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + intent.setClass(getInstrumentation().getTargetContext(), + CameraActivity.class); + getActivity().startActivity(intent); + mOut.write(" ," + i); + mOut.flush(); + } + } catch (Exception e){ + Log.v(TAG, "Got exception", e); + } + } +} diff --git a/tests/src/com/android/camera/stress/TestUtil.java b/tests/src/com/android/camera/stress/TestUtil.java new file mode 100644 index 000000000..64e2039f2 --- /dev/null +++ b/tests/src/com/android/camera/stress/TestUtil.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2011 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.stress; + +import android.os.Environment; +import java.io.FileWriter; +import java.io.BufferedWriter; + + +/** + * Collection of utility functions used for the test. + */ +public class TestUtil { + public BufferedWriter mOut; + public FileWriter mfstream; + + public TestUtil() { + } + + public void prepareOutputFile() throws Exception { + String camera_test_output_file = + Environment.getExternalStorageDirectory().toString() + "/mediaStressOut.txt"; + mfstream = new FileWriter(camera_test_output_file, true); + mOut = new BufferedWriter(mfstream); + } + + public void closeOutputFile() throws Exception { + mOut.write("\n"); + mOut.close(); + mfstream.close(); + } + + public void writeReportHeader(String reportTag, int iteration) throws Exception { + mOut.write(reportTag); + mOut.write("No of loops :" + iteration + "\n"); + mOut.write("loop: "); + } + + public void writeResult(int iteration) throws Exception { + mOut.write(" ," + iteration); + mOut.flush(); + } +} diff --git a/tests/src/com/android/camera/stress/VideoCapture.java b/tests/src/com/android/camera/stress/VideoCapture.java new file mode 100755 index 000000000..c7409829f --- /dev/null +++ b/tests/src/com/android/camera/stress/VideoCapture.java @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2010 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.stress; + +import com.android.camera.CameraActivity; +import com.android.camera.stress.TestUtil; + +import android.app.Activity; +import android.app.Instrumentation; +import android.content.Intent; +import android.provider.MediaStore; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; +import android.view.KeyEvent; + +import com.android.camera.stress.CameraStressTestRunner; + +/** + * Junit / Instrumentation test case for camera test + * + * Running the test suite: + * + * adb shell am instrument \ + * -e class com.android.camera.stress.VideoCapture \ + * -w com.google.android.camera.tests/android.test.InstrumentationTestRunner + * + */ + +public class VideoCapture extends ActivityInstrumentationTestCase2 { + private static final long WAIT_FOR_PREVIEW = 4 * 1000; //4 seconds + private static final long WAIT_FOR_SWITCH_CAMERA = 4 * 1000; //4 seconds + + // Private intent extras which control the camera facing. + private final static String EXTRAS_CAMERA_FACING = + "android.intent.extras.CAMERA_FACING"; + + private TestUtil testUtil = new TestUtil(); + + public VideoCapture() { + super(CameraActivity.class); + } + + @Override + protected void setUp() throws Exception { + testUtil.prepareOutputFile(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + testUtil.closeOutputFile(); + super.tearDown(); + } + + public void captureVideos(String reportTag, Instrumentation inst) throws Exception{ + boolean memoryResult = false; + int total_num_of_videos = CameraStressTestRunner.mVideoIterations; + int video_duration = CameraStressTestRunner.mVideoDuration; + testUtil.writeReportHeader(reportTag, total_num_of_videos); + + for (int i = 0; i < total_num_of_videos; i++) { + Thread.sleep(WAIT_FOR_PREVIEW); + // record a video + inst.sendCharacterSync(KeyEvent.KEYCODE_CAMERA); + Thread.sleep(video_duration); + inst.sendCharacterSync(KeyEvent.KEYCODE_CAMERA); + testUtil.writeResult(i); + } + } + + public void testBackVideoCapture() throws Exception { + Instrumentation inst = getInstrumentation(); + Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA); + + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.putExtra(EXTRAS_CAMERA_FACING, + android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK); + Activity act = inst.startActivitySync(intent); + Thread.sleep(WAIT_FOR_SWITCH_CAMERA); + captureVideos("Back Camera Video Capture\n", inst); + act.finish(); + // Wait for a clean finish. + Thread.sleep(2 * 1000); //sleep for 2 seconds + + } + + public void testFrontVideoCapture() throws Exception { + Instrumentation inst = getInstrumentation(); + Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA); + + intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.putExtra(EXTRAS_CAMERA_FACING, + android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT); + Activity act = inst.startActivitySync(intent); + Thread.sleep(WAIT_FOR_SWITCH_CAMERA); + captureVideos("Front Camera Video Capture\n", inst); + act.finish(); + // Wait for a clean finish. + Thread.sleep(2 * 1000); //sleep for 2 seconds. + + } +} diff --git a/tests/src/com/android/camera/unittest/CameraUnitTest.java b/tests/src/com/android/camera/unittest/CameraUnitTest.java new file mode 100644 index 000000000..70faa5c8d --- /dev/null +++ b/tests/src/com/android/camera/unittest/CameraUnitTest.java @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2010 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.unittest; + +import com.android.camera.util.CameraUtil; + +import android.graphics.Matrix; +import android.test.suitebuilder.annotation.SmallTest; + +import junit.framework.TestCase; + +@SmallTest +public class CameraUnitTest extends TestCase { + public void testRoundOrientation() { + int h = CameraUtil.ORIENTATION_HYSTERESIS; + assertEquals(0, CameraUtil.roundOrientation(0, 0)); + assertEquals(0, CameraUtil.roundOrientation(359, 0)); + assertEquals(0, CameraUtil.roundOrientation(0 + 44 + h, 0)); + assertEquals(90, CameraUtil.roundOrientation(0 + 45 + h, 0)); + assertEquals(0, CameraUtil.roundOrientation(360 - 44 - h, 0)); + assertEquals(270, CameraUtil.roundOrientation(360 - 45 - h, 0)); + + assertEquals(90, CameraUtil.roundOrientation(90, 90)); + assertEquals(90, CameraUtil.roundOrientation(90 + 44 + h, 90)); + assertEquals(180, CameraUtil.roundOrientation(90 + 45 + h, 90)); + assertEquals(90, CameraUtil.roundOrientation(90 - 44 - h, 90)); + assertEquals(0, CameraUtil.roundOrientation(90 - 45 - h, 90)); + + assertEquals(180, CameraUtil.roundOrientation(180, 180)); + assertEquals(180, CameraUtil.roundOrientation(180 + 44 + h, 180)); + assertEquals(270, CameraUtil.roundOrientation(180 + 45 + h, 180)); + assertEquals(180, CameraUtil.roundOrientation(180 - 44 - h, 180)); + assertEquals(90, CameraUtil.roundOrientation(180 - 45 - h, 180)); + + assertEquals(270, CameraUtil.roundOrientation(270, 270)); + assertEquals(270, CameraUtil.roundOrientation(270 + 44 + h, 270)); + assertEquals(0, CameraUtil.roundOrientation(270 + 45 + h, 270)); + assertEquals(270, CameraUtil.roundOrientation(270 - 44 - h, 270)); + assertEquals(180, CameraUtil.roundOrientation(270 - 45 - h, 270)); + + assertEquals(90, CameraUtil.roundOrientation(90, 0)); + assertEquals(180, CameraUtil.roundOrientation(180, 0)); + assertEquals(270, CameraUtil.roundOrientation(270, 0)); + + assertEquals(0, CameraUtil.roundOrientation(0, 90)); + assertEquals(180, CameraUtil.roundOrientation(180, 90)); + assertEquals(270, CameraUtil.roundOrientation(270, 90)); + + assertEquals(0, CameraUtil.roundOrientation(0, 180)); + assertEquals(90, CameraUtil.roundOrientation(90, 180)); + assertEquals(270, CameraUtil.roundOrientation(270, 180)); + + assertEquals(0, CameraUtil.roundOrientation(0, 270)); + assertEquals(90, CameraUtil.roundOrientation(90, 270)); + assertEquals(180, CameraUtil.roundOrientation(180, 270)); + } + + public void testPrepareMatrix() { + Matrix matrix = new Matrix(); + float[] points; + int[] expected; + + CameraUtil.prepareMatrix(matrix, false, 0, 800, 480); + points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; + expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; + matrix.mapPoints(points); + assertEquals(expected, points); + + CameraUtil.prepareMatrix(matrix, false, 90, 800, 480); + points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; + expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; + matrix.mapPoints(points); + assertEquals(expected, points); + + CameraUtil.prepareMatrix(matrix, false, 180, 800, 480); + points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; + expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; + matrix.mapPoints(points); + assertEquals(expected, points); + + CameraUtil.prepareMatrix(matrix, true, 180, 800, 480); + points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; + expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; + matrix.mapPoints(points); + assertEquals(expected, points); + } + + private void assertEquals(int expected[], float[] actual) { + for (int i = 0; i < expected.length; i++) { + assertEquals("Array index " + i + " mismatch", expected[i], Math.round(actual[i])); + } + } +} -- cgit v1.2.3