summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-cs/strings.xml1
-rw-r--r--res/values-da/strings.xml2
-rw-r--r--res/values-de/strings.xml1
-rw-r--r--res/values-el/strings.xml2
-rw-r--r--res/values-es-rUS/strings.xml2
-rw-r--r--res/values-es/strings.xml1
-rw-r--r--res/values-fr/strings.xml1
-rw-r--r--res/values-it/strings.xml1
-rw-r--r--res/values-ja/strings.xml2
-rw-r--r--res/values-ko/strings.xml2
-rw-r--r--res/values-nb/strings.xml2
-rw-r--r--res/values-nl/strings.xml1
-rw-r--r--res/values-pl/strings.xml1
-rw-r--r--res/values-pt-rPT/strings.xml2
-rw-r--r--res/values-pt/strings.xml2
-rw-r--r--res/values-ru/strings.xml2
-rw-r--r--res/values-sv/strings.xml2
-rw-r--r--res/values-tr/strings.xml2
-rw-r--r--res/values-zh-rCN/strings.xml2
-rw-r--r--res/values-zh-rTW/strings.xml1
-rw-r--r--res/values/arrays.xml4
-rw-r--r--res/values/strings.xml6
-rw-r--r--src/com/android/camera/CameraSettings.java41
-rw-r--r--src/com/android/camera/VideoCamera.java9
24 files changed, 48 insertions, 44 deletions
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 0909620..0519502 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Vysoká (pro kartu SD)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Kvalita videa"</string>
<string name="pref_camera_video_duration_title">"Výběr délky videa"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minuta (pro sdílení)"</string>
<string name="pref_camera_video_duration_entry_10">"10 min"</string>
<string name="pref_camera_video_duration_entry_30">"30 min"</string>
<string name="pref_camera_video_duration_dialogtitle">"Délka videa"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index c6d5537..79718dc 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Videokvalitet"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index f0e17e2..8821c8a 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Hoch (für SD-Karte)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Videoqualität"</string>
<string name="pref_camera_video_duration_title">"Videodauer auswählen"</string>
- <string name="pref_camera_video_duration_entry_1">"1 Minute (zum Senden)"</string>
<string name="pref_camera_video_duration_entry_10">"10 Minuten"</string>
<string name="pref_camera_video_duration_entry_30">"30 Minuten"</string>
<string name="pref_camera_video_duration_dialogtitle">"Videodauer"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 6fd6774..0da9f1b 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Ποιότητα βίντεο"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 6a0ec61..8fd847a 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Calidad del video"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index d991884..0147e77 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Alta (para tarjeta SD)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Calidad de vídeo"</string>
<string name="pref_camera_video_duration_title">"Seleccionar duración de vídeo"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minuto (para compartir)"</string>
<string name="pref_camera_video_duration_entry_10">"10 minutos"</string>
<string name="pref_camera_video_duration_entry_30">"30 minutos"</string>
<string name="pref_camera_video_duration_dialogtitle">"Duración de vídeo"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 4e0e73c..9f7d23f 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Haute (carte SD)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Qualité vidéo"</string>
<string name="pref_camera_video_duration_title">"Sélectionner la durée de vidéo"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minute (pour le partage)"</string>
<string name="pref_camera_video_duration_entry_10">"10 minutes"</string>
<string name="pref_camera_video_duration_entry_30">"30 minutes"</string>
<string name="pref_camera_video_duration_dialogtitle">"Durée de la vidéo"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 174b597..4eb7652 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Alta (per scheda SD)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Qualità video"</string>
<string name="pref_camera_video_duration_title">"Seleziona durata video"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minuto (per condivisione)"</string>
<string name="pref_camera_video_duration_entry_10">"10 minuti"</string>
<string name="pref_camera_video_duration_entry_30">"30 minuti"</string>
<string name="pref_camera_video_duration_dialogtitle">"Durata video"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index c0940de..6786378 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"画質"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 64e6d22..c762b36 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"동영상 화질"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index ae8dd59..37824e4 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Videokvalitet"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 3280fb7..e8cf62c 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Hoog (voor SD-kaart)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Videokwaliteit"</string>
<string name="pref_camera_video_duration_title">"Duur van video selecteren"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minuut (voor delen)"</string>
<string name="pref_camera_video_duration_entry_10">"10 minuten"</string>
<string name="pref_camera_video_duration_entry_30">"30 minuten"</string>
<string name="pref_camera_video_duration_dialogtitle">"Duur van video"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index b0a1831..52b5287 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"Wysoka (dla karty SD)"</string>
<string name="pref_camera_videoquality_dialogtitle">"Jakość wideo"</string>
<string name="pref_camera_video_duration_title">"Wybierz czas trwania filmu wideo"</string>
- <string name="pref_camera_video_duration_entry_1">"1 minuta (w celu udostępniania)"</string>
<string name="pref_camera_video_duration_entry_10">"10 minut"</string>
<string name="pref_camera_video_duration_entry_30">"30 minut"</string>
<string name="pref_camera_video_duration_dialogtitle">"Czas trwania filmu wideo"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 5d75756..ff65b7d 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Qualidade de vídeo"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 3b7ce7d..30864aa 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Qualidade do vídeo"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index f75e242..4d60fe7 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Качество видео"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 940bc95..1d40f89 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Videokvalitet"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 77e4e40..833a191 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"Video kalitesi"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 1208012..d08c95d 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -134,8 +134,6 @@
<string name="pref_camera_videoquality_dialogtitle">"视频画质"</string>
<!-- no translation found for pref_camera_video_duration_title (3659987702892910722) -->
<skip />
- <!-- no translation found for pref_camera_video_duration_entry_1 (886640327548814447) -->
- <skip />
<!-- no translation found for pref_camera_video_duration_entry_10 (664455443394175885) -->
<skip />
<!-- no translation found for pref_camera_video_duration_entry_30 (1197298883102352735) -->
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index b5db3a4..59155b5 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -121,7 +121,6 @@
<string name="pref_camera_videoquality_entry_1">"高 (適用於 SD 卡)"</string>
<string name="pref_camera_videoquality_dialogtitle">"影片品質"</string>
<string name="pref_camera_video_duration_title">"選取影片長度"</string>
- <string name="pref_camera_video_duration_entry_1">"1 分鐘 (分享影片)"</string>
<string name="pref_camera_video_duration_entry_10">"10 分鐘"</string>
<string name="pref_camera_video_duration_entry_30">"30 分鐘"</string>
<string name="pref_camera_video_duration_dialogtitle">"影片長度"</string>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 44af4be..acd1794 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -30,14 +30,14 @@
<!-- Camera Preferences Video Duration dialog box entries -->
<string-array name="pref_camera_video_duration_entries">
- <item>@string/pref_camera_video_duration_entry_1</item>
+ <item>@string/pref_camera_video_duration_entry_mms</item>
<item>@string/pref_camera_video_duration_entry_10</item>
<item>@string/pref_camera_video_duration_entry_30</item>
</string-array>
<!-- Do not localize entryvalues -->
<string-array name="pref_camera_video_duration_entryvalues">
- <item>1</item>
+ <item>-1</item>
<item>10</item>
<item>30</item>
</string-array>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ace55c0..e428b6c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -347,13 +347,15 @@
<string name="pref_camera_videoquality_dialogtitle">Video quality</string>
<!-- Default video duration setting. A numerical value. Do not translate. -->
- <string name="pref_camera_video_duration_default">1</string>
+ <string name="pref_camera_video_duration_default">-1</string>
<!-- Settings screen, Video duration title -->
<string name="pref_camera_video_duration_title">Video duration</string>
<!-- Settings screen, Video duration dialog radio button choices -->
- <string name="pref_camera_video_duration_entry_1">1 minute (for sharing)</string>
+ <string name="pref_camera_video_duration_entry_mms">
+ <xliff:g id="duration" example="60">%1$d</xliff:g> seconds (for MMS)
+ </string>
<string name="pref_camera_video_duration_entry_10">10 minutes</string>
<string name="pref_camera_video_duration_entry_30">30 minutes</string>
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 78e0724..2432704 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -21,10 +21,12 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Resources;
import android.hardware.Camera.Parameters;
import android.os.Bundle;
+import android.os.SystemProperties;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceGroup;
+import android.util.Log;
import java.util.ArrayList;
import java.util.StringTokenizer;
@@ -38,12 +40,18 @@ public class CameraSettings extends PreferenceActivity implements
"pref_camera_videoquality_key";
public static final String KEY_VIDEO_DURATION =
"pref_camera_video_duration_key";
+ public static final String KEY_VERSION = "pref_version_key";
+ public static final int CURRENT_VERSION = 1;
public static final String KEY_PICTURE_SIZE = "pref_camera_picturesize_key";
public static final String KEY_JPEG_QUALITY = "pref_camera_jpegquality_key";
public static final String KEY_FOCUS_MODE = "pref_camera_focusmode_key";
public static final String KEY_FLASH_MODE = "pref_camera_flashmode_key";
public static final boolean DEFAULT_VIDEO_QUALITY_VALUE = true;
- public static final int DEFAULT_VIDEO_DURATION_VALUE = 1; // 1 minute
+ public static final int DEFAULT_VIDEO_DURATION_VALUE = -1; // MMS video length
+
+ // max mms video duration in seconds.
+ public static final int MMS_VIDEO_DURATION =
+ SystemProperties.getInt("ro.media.enc.lprof.duration", 60);
private ListPreference mVideoQuality;
private ListPreference mVideoDuration;
@@ -77,8 +85,9 @@ public class CameraSettings extends PreferenceActivity implements
mPictureSize = (ListPreference) findPreference(KEY_PICTURE_SIZE);
mJpegQuality = (ListPreference) findPreference(KEY_JPEG_QUALITY);
mFocusMode = (ListPreference) findPreference(KEY_FOCUS_MODE);
- getPreferenceScreen().getSharedPreferences().
- registerOnSharedPreferenceChangeListener(this);
+ SharedPreferences pref = getPreferenceScreen().getSharedPreferences();
+ upgradePreferences(pref);
+ pref.registerOnSharedPreferenceChangeListener(this);
// Get parameters.
android.hardware.Camera device;
@@ -97,6 +106,12 @@ public class CameraSettings extends PreferenceActivity implements
// Create picture size settings.
createSettings(mPictureSize, Camera.SUPPORTED_PICTURE_SIZE);
+ // Modify video duration settings.
+ // The first entry is for MMS video duration, and we need to fill in the
+ // device-dependent value (in seconds).
+ CharSequence[] entries = mVideoDuration.getEntries();
+ entries[0] = String.format(entries[0].toString(), MMS_VIDEO_DURATION);
+
// Set default JPEG quality value if it is empty.
if (mJpegQuality.getValue() == null) {
mJpegQuality.setValue(getString(
@@ -199,4 +214,24 @@ public class CameraSettings extends PreferenceActivity implements
updateFocusModeSummary();
}
}
+
+ private static final String TAG = "CameraSettings";
+ public static void upgradePreferences(SharedPreferences pref) {
+ int version;
+ try {
+ version = pref.getInt(KEY_VERSION, 0);
+ } catch (Exception ex) {
+ version = 0;
+ }
+
+ if (version == 0) {
+ SharedPreferences.Editor editor = pref.edit();
+ // For old version, change 1 to -1 for video duration preference.
+ if (pref.getString(KEY_VIDEO_DURATION, "1").equals("1")) {
+ editor.putString(KEY_VIDEO_DURATION, "-1");
+ }
+ editor.putInt(KEY_VERSION, CURRENT_VERSION);
+ editor.commit();
+ }
+ }
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index c5befa6..7d3854b 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -225,6 +225,7 @@ public class VideoCamera extends Activity implements View.OnClickListener,
super.onCreate(icicle);
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
+ CameraSettings.upgradePreferences(mPreferences);
readVideoSizePreference();
/*
@@ -475,13 +476,11 @@ public class VideoCamera extends Activity implements View.OnClickListener,
} else {
int minutes = getIntPreference(CameraSettings.KEY_VIDEO_DURATION,
CameraSettings.DEFAULT_VIDEO_DURATION_VALUE);
- if (minutes == 1) {
- // This is a special case: the value 1 means we want to use the
+ if (minutes == -1) {
+ // This is a special case: the value -1 means we want to use the
// device-dependent duration for MMS messages. The value is
// represented in seconds.
- int seconds = SystemProperties.getInt(
- "ro.media.enc.lprof.duration", 60);
- mMaxVideoDurationInMs = 1000 * seconds;
+ mMaxVideoDurationInMs = 1000 * CameraSettings.MMS_VIDEO_DURATION;
} else {
// 1 minute = 60000ms
mMaxVideoDurationInMs = 60000 * minutes;