summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/camera2/params/StreamConfigurationMap.java21
-rw-r--r--core/java/android/os/Build.java11
-rw-r--r--core/java/android/widget/Editor.java2
3 files changed, 28 insertions, 6 deletions
diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
index 8e0eab2..e71e49f 100644
--- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
+++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
@@ -98,9 +98,19 @@ public final class StreamConfigurationMap {
HighSpeedVideoConfiguration[] highSpeedVideoConfigurations,
ReprocessFormatsMap inputOutputFormatsMap,
boolean listHighResolution) {
- mConfigurations = checkArrayElementsNotNull(configurations, "configurations");
- mMinFrameDurations = checkArrayElementsNotNull(minFrameDurations, "minFrameDurations");
- mStallDurations = checkArrayElementsNotNull(stallDurations, "stallDurations");
+
+ if (configurations == null) {
+ // If no color configurations exist, ensure depth ones do
+ checkArrayElementsNotNull(depthConfigurations, "depthConfigurations");
+ mConfigurations = new StreamConfiguration[0];
+ mMinFrameDurations = new StreamConfigurationDuration[0];
+ mStallDurations = new StreamConfigurationDuration[0];
+ } else {
+ mConfigurations = checkArrayElementsNotNull(configurations, "configurations");
+ mMinFrameDurations = checkArrayElementsNotNull(minFrameDurations, "minFrameDurations");
+ mStallDurations = checkArrayElementsNotNull(stallDurations, "stallDurations");
+ }
+
mListHighResolution = listHighResolution;
if (depthConfigurations == null) {
@@ -124,7 +134,7 @@ public final class StreamConfigurationMap {
}
// For each format, track how many sizes there are available to configure
- for (StreamConfiguration config : configurations) {
+ for (StreamConfiguration config : mConfigurations) {
int fmt = config.getFormat();
SparseIntArray map = null;
if (config.isOutput()) {
@@ -159,7 +169,8 @@ public final class StreamConfigurationMap {
mDepthOutputFormats.get(config.getFormat()) + 1);
}
- if (mOutputFormats.indexOfKey(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) < 0) {
+ if (configurations != null &&
+ mOutputFormats.indexOfKey(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) < 0) {
throw new AssertionError(
"At least one stream configuration for IMPLEMENTATION_DEFINED must exist");
}
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index a0162f7..2374899 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -157,6 +157,17 @@ public class Build {
public static final String RELEASE = getString("ro.build.version.release");
/**
+ * The base OS build the product is based on.
+ */
+ public static final String BASE_OS = SystemProperties.get("ro.build.version.base_os", "");
+
+ /**
+ * The user-visible security patch level.
+ */
+ public static final String SECURITY_PATCH = SystemProperties.get(
+ "ro.build.version.security_patch", "");
+
+ /**
* The user-visible SDK version of the framework in its raw String
* representation; use {@link #SDK_INT} instead.
*
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 010cb27..5b042c6 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -3308,7 +3308,7 @@ public class Editor {
mSelectionBounds.set(
primaryHorizontal,
layout.getLineTop(line),
- primaryHorizontal + 1,
+ primaryHorizontal,
layout.getLineTop(line + 1) + mHandleHeight);
}
// Take TextView's padding and scroll into account.