diff options
-rw-r--r-- | res/values/arrays.xml | 6 | ||||
-rw-r--r-- | res/values/strings.xml | 8 | ||||
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 61548b7e6..c600cffd7 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -18,6 +18,8 @@ <resources> <!-- Camera Preferences Video Quality entries --> <string-array name="pref_video_quality_entries" translatable="false"> + <item>@string/pref_video_quality_entry_4kdci</item> + <item>@string/pref_video_quality_entry_4kuhd</item> <item>@string/pref_video_quality_entry_1080p</item> <item>@string/pref_video_quality_entry_720p</item> <item>@string/pref_video_quality_entry_480p</item> @@ -31,6 +33,10 @@ </string-array> <string-array name="pref_video_quality_entryvalues" translatable="false"> + <!-- The integer value of CamcorderProfile.QUALITY_4kDCI --> + <item>13</item> + <!-- The integer value of CamcorderProfile.QUALITY_4kUHD --> + <item>12</item> <!-- The integer value of CamcorderProfile.QUALITY_1080P --> <item>6</item> <!-- The integer value of CamcorderProfile.QUALITY_720P --> diff --git a/res/values/strings.xml b/res/values/strings.xml index 04b765879..dfee17b37 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -230,6 +230,14 @@ <string name="pref_video_quality_title">Video quality</string> <!-- The default quality value is 3 (CIF) --> <string name="pref_video_quality_default" translatable="false">3</string> + <!-- Video quality setting entry. + Videos will be recorded in 4k DCI quality. [CHAR LIMIT=24] --> + <string name="pref_video_quality_entry_4kdci" translatable="false"> + 4k DCI</string> + <!-- Video quality setting entry. + Videos will be recorded in 4k UHD quality. [CHAR LIMIT=24] --> + <string name="pref_video_quality_entry_4kuhd" translatable="false"> + 4k UHD</string> <!-- Video quality setting entry. Videos will be recorded in 1080p quality. [CHAR LIMIT=24] --> <string name="pref_video_quality_entry_1080p" translatable="false">HD 1080p</string> <!-- Video quality setting entry. Videos will be recorded in 720p quality. [CHAR LIMIT=24] --> diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index 243f1e35d..2c205e0b5 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -754,6 +754,16 @@ public class CameraSettings { @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) private static void getFineResolutionQuality(ArrayList<String> supported, int cameraId,Parameters parameters) { + if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_4kDCI)) { + if (checkSupportedVideoQuality(parameters,4096,2160)) { + supported.add(Integer.toString(CamcorderProfile.QUALITY_4kDCI)); + } + } + if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_4kUHD)) { + if (checkSupportedVideoQuality(parameters,3840,2160)) { + supported.add(Integer.toString(CamcorderProfile.QUALITY_4kUHD)); + } + } if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_1080P)) { if (checkSupportedVideoQuality(parameters,1920,1080)){ supported.add(Integer.toString(CamcorderProfile.QUALITY_1080P)); |