summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt8
-rw-r--r--api/system-current.txt8
-rw-r--r--core/java/android/hardware/camera2/CameraCaptureSession.java36
-rw-r--r--core/java/android/hardware/camera2/CameraCharacteristics.java19
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java55
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java2
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java6
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.java48
-rw-r--r--core/java/android/hardware/camera2/CaptureResult.java2
-rw-r--r--core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java10
-rw-r--r--core/java/android/hardware/camera2/impl/CameraDeviceImpl.java6
-rw-r--r--core/java/android/hardware/camera2/params/InputConfiguration.java6
-rw-r--r--core/java/android/view/ViewRootImpl.java5
-rw-r--r--core/java/android/view/accessibility/AccessibilityNodeInfo.java8
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java36
-rw-r--r--core/java/android/webkit/FindActionModeCallback.java1
-rw-r--r--core/java/android/webkit/WebResourceError.java5
-rw-r--r--core/res/res/values/attrs_manifest.xml2
-rw-r--r--packages/StatementService/src/com/android/statementservice/retriever/AbstractStatementRetriever.java2
-rw-r--r--packages/StatementService/src/com/android/statementservice/retriever/DirectStatementRetriever.java2
-rw-r--r--packages/StatementService/src/com/android/statementservice/retriever/Statement.java2
-rw-r--r--rs/java/android/renderscript/Element.java5
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerDebugConfig.java2
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java6
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java46
-rw-r--r--services/core/java/com/android/server/am/TaskRecord.java16
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java38
27 files changed, 239 insertions, 143 deletions
diff --git a/api/current.txt b/api/current.txt
index 2b1c697..6dcb733 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -13165,7 +13165,7 @@ package android.hardware.camera2 {
method public abstract void close();
method public abstract android.hardware.camera2.CameraDevice getDevice();
method public abstract android.view.Surface getInputSurface();
- method public abstract boolean isReprocessible();
+ method public abstract boolean isReprocessable();
method public abstract void prepare(android.view.Surface) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
@@ -13286,7 +13286,7 @@ package android.hardware.camera2 {
method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
method public abstract void createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract android.hardware.camera2.CaptureRequest.Builder createReprocessCaptureRequest(android.hardware.camera2.TotalCaptureResult) throws android.hardware.camera2.CameraAccessException;
- method public abstract void createReprocessibleCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void createReprocessableCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract java.lang.String getId();
field public static final int TEMPLATE_MANUAL = 6; // 0x6
field public static final int TEMPLATE_PREVIEW = 1; // 0x1
@@ -13465,7 +13465,7 @@ package android.hardware.camera2 {
field public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; // 0x8
field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; // 0x2
field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; // 0x1
- field public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; // 0x4
+ field public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4; // 0x4
field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
@@ -38808,7 +38808,7 @@ package android.webkit {
}
public abstract class WebResourceError {
- method public abstract java.lang.CharSequence getDescription();
+ method public java.lang.CharSequence getDescription();
method public abstract int getErrorCode();
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 176ebdd..72c2f56 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -13479,7 +13479,7 @@ package android.hardware.camera2 {
method public abstract void close();
method public abstract android.hardware.camera2.CameraDevice getDevice();
method public abstract android.view.Surface getInputSurface();
- method public abstract boolean isReprocessible();
+ method public abstract boolean isReprocessable();
method public abstract void prepare(android.view.Surface) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
@@ -13600,7 +13600,7 @@ package android.hardware.camera2 {
method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
method public abstract void createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract android.hardware.camera2.CaptureRequest.Builder createReprocessCaptureRequest(android.hardware.camera2.TotalCaptureResult) throws android.hardware.camera2.CameraAccessException;
- method public abstract void createReprocessibleCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void createReprocessableCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract java.lang.String getId();
field public static final int TEMPLATE_MANUAL = 6; // 0x6
field public static final int TEMPLATE_PREVIEW = 1; // 0x1
@@ -13779,7 +13779,7 @@ package android.hardware.camera2 {
field public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; // 0x8
field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; // 0x2
field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; // 0x1
- field public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; // 0x4
+ field public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4; // 0x4
field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
@@ -41132,7 +41132,7 @@ package android.webkit {
public abstract class WebResourceError {
ctor public WebResourceError();
- method public abstract java.lang.CharSequence getDescription();
+ method public java.lang.CharSequence getDescription();
method public abstract int getErrorCode();
}
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index f70e075..c6f622c 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -29,11 +29,11 @@ import java.util.List;
* <p>A CameraCaptureSession is created by providing a set of target output surfaces to
* {@link CameraDevice#createCaptureSession createCaptureSession}, or by providing an
* {@link android.hardware.camera2.params.InputConfiguration} and a set of target output surfaces to
- * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} for a
- * reprocessible capture session. Once created, the session is active until a new session is
+ * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} for a
+ * reprocessable capture session. Once created, the session is active until a new session is
* created by the camera device, or the camera device is closed.</p>
*
- * <p>All capture sessions can be used for capturing images from the camera but only reprocessible
+ * <p>All capture sessions can be used for capturing images from the camera but only reprocessable
* capture sessions can reprocess images captured from the camera in the same session previously.
* </p>
*
@@ -41,7 +41,7 @@ import java.util.List;
* it requires configuring the camera device's internal pipelines and allocating memory buffers for
* sending images to the desired targets. Therefore the setup is done asynchronously, and
* {@link CameraDevice#createCaptureSession createCaptureSession} and
- * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} will
+ * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} will
* send the ready-to-use CameraCaptureSession to the provided listener's
* {@link CameraCaptureSession.StateCallback#onConfigured onConfigured} callback. If configuration
* cannot be completed, then the
@@ -156,7 +156,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
*
* <p>All capture sessions can be used for capturing images from the camera but only capture
* sessions created by
- * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession}
+ * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession}
* can submit reprocess capture requests. Submitting a reprocess request to a regular capture
* session will result in an {@link IllegalArgumentException}.</p>
*
@@ -179,9 +179,9 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalArgumentException if the request targets no Surfaces or Surfaces that are not
* configured as outputs for this session; or the request
* targets a set of Surfaces that cannot be submitted
- * simultaneously in a reprocessible capture session; or a
+ * simultaneously in a reprocessable capture session; or a
* reprocess capture request is submitted in a
- * non-reprocessible capture session; or the reprocess capture
+ * non-reprocessable capture session; or the reprocess capture
* request was created with a {@link TotalCaptureResult} from
* a different session; or the capture targets a Surface in
* the middle of being {@link #prepare prepared}; or the
@@ -192,7 +192,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @see #setRepeatingRequest
* @see #setRepeatingBurst
* @see #abortCaptures
- * @see CameraDevice#createReprocessibleCaptureSession
+ * @see CameraDevice#createReprocessableCaptureSession
*/
public abstract int capture(CaptureRequest request, CaptureCallback listener, Handler handler)
throws CameraAccessException;
@@ -214,7 +214,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
*
* <p>All capture sessions can be used for capturing images from the camera but only capture
* sessions created by
- * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession}
+ * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession}
* can submit reprocess capture requests. Submitting a reprocess request to a regular
* capture session will result in an {@link IllegalArgumentException}.</p>
*
@@ -238,9 +238,9 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalArgumentException If the requests target no Surfaces, or the requests target
* Surfaces not currently configured as outputs; or one of the
* requests targets a set of Surfaces that cannot be submitted
- * simultaneously in a reprocessible capture session; or a
+ * simultaneously in a reprocessable capture session; or a
* reprocess capture request is submitted in a
- * non-reprocessible capture session; or one of the reprocess
+ * non-reprocessable capture session; or one of the reprocess
* capture requests was created with a
* {@link TotalCaptureResult} from a different session; or one
* of the captures targets a Surface in the middle of being
@@ -425,7 +425,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
*
* <p>This method is the fastest way to switch the camera device to a new session with
* {@link CameraDevice#createCaptureSession} or
- * {@link CameraDevice#createReprocessibleCaptureSession}, at the cost of discarding in-progress
+ * {@link CameraDevice#createReprocessableCaptureSession}, at the cost of discarding in-progress
* work. It must be called before the new session is created. Once all pending requests are
* either completed or thrown away, the {@link StateCallback#onReady} callback will be called,
* if the session has not been closed. Otherwise, the {@link StateCallback#onClosed}
@@ -448,7 +448,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @see #setRepeatingRequest
* @see #setRepeatingBurst
* @see CameraDevice#createCaptureSession
- * @see CameraDevice#createReprocessibleCaptureSession
+ * @see CameraDevice#createReprocessableCaptureSession
*/
public abstract void abortCaptures() throws CameraAccessException;
@@ -459,14 +459,14 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @return {@code true} if the application can submit reprocess capture requests with this
* camera capture session. {@code false} otherwise.
*
- * @see CameraDevice#createReprocessibleCaptureSession
+ * @see CameraDevice#createReprocessableCaptureSession
*/
- public abstract boolean isReprocessible();
+ public abstract boolean isReprocessable();
/**
- * Get the input Surface associated with a reprocessible capture session.
+ * Get the input Surface associated with a reprocessable capture session.
*
- * <p>Each reprocessible capture session has an input {@link Surface} where the reprocess
+ * <p>Each reprocessable capture session has an input {@link Surface} where the reprocess
* capture requests get the input images from, rather than the camera device. The application
* can create a {@link android.media.ImageWriter} with this input {@link Surface} and use it to
* provide input images for reprocess capture requests.</p>
@@ -474,7 +474,7 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @return The {@link Surface} where reprocessing capture requests get the input images from. If
* this is not a reprocess capture session, {@code null} will be returned.
*
- * @see CameraDevice#createReprocessibleCaptureSession
+ * @see CameraDevice#createReprocessableCaptureSession
* @see android.media.ImageWriter
* @see android.media.ImageReader
*/
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 19e821c..d3b63f9 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -1239,7 +1239,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* only the input buffer will be used to produce these output stream buffers, and a
* new sensor image will not be captured.</p>
* <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
- * stream image format will be OPAQUE, the associated output stream image format
+ * stream image format will be PRIVATE, the associated output stream image format
* should be JPEG.</p>
* <p><b>Range of valid values:</b><br></p>
* <p>0 or 1.</p>
@@ -1326,7 +1326,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
- * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}</li>
+ * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li>
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
@@ -1339,7 +1339,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
* @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
* @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
- * @see #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING
+ * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
* @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
* @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
* @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
@@ -1536,12 +1536,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* <tr>
* <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
* <td align="left">{@link android.graphics.ImageFormat#JPEG }</td>
- * <td align="left">OPAQUE_REPROCESSING</td>
+ * <td align="left">PRIVATE_REPROCESSING</td>
* </tr>
* <tr>
* <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td>
* <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
- * <td align="left">OPAQUE_REPROCESSING</td>
+ * <td align="left">PRIVATE_REPROCESSING</td>
* </tr>
* <tr>
* <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
@@ -1556,8 +1556,9 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* </tbody>
* </table>
* <p>PRIVATE refers to a device-internal format that is not directly application-visible. A
- * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newOpaqueInstance }.</p>
- * <p>For a OPAQUE_REPROCESSING-capable camera device, using the PRIVATE format as either input
+ * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance }
+ * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p>
+ * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
* or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),</p>
* <p>Attempting to configure an input stream with output streams not
* listed as available in this map is not valid.</p>
@@ -2647,8 +2648,8 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* formats/sizes combination.</p>
* <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
* ongoing camera repeating request outputs, as if this reprocess request is never issued.</p>
- * <p>This key is supported if the camera device supports OPAQUE or YUV reprocessing (
- * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains OPAQUE_REPROCESSING or
+ * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing (
+ * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or
* YUV_REPROCESSING).</p>
* <p><b>Units</b>: Number of frames.</p>
* <p><b>Range of valid values:</b><br>
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 4af7daf..dad4fb6 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -100,7 +100,7 @@ public abstract class CameraDevice implements AutoCloseable {
* means maximizing image quality without compromising preview frame rate.
* AE/AWB/AF should be on auto mode.
* This template is guaranteed to be supported on camera devices that support the
- * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}
+ * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}
* capability or the
* {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}
* capability.
@@ -409,15 +409,15 @@ public abstract class CameraDevice implements AutoCloseable {
CameraCaptureSession.StateCallback callback, Handler handler)
throws CameraAccessException;
/**
- * Create a new reprocessible camera capture session by providing the desired reprocessing
+ * Create a new reprocessable camera capture session by providing the desired reprocessing
* input Surface configuration and the target output set of Surfaces to the camera device.
*
* <p>If a camera device supports YUV reprocessing
- * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING}) or OPAQUE
+ * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING}) or PRIVATE
* reprocessing
- * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING}), besides
+ * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING}), besides
* the capture session created via {@link #createCaptureSession createCaptureSession}, the
- * application can also create a reprocessible capture session to submit reprocess capture
+ * application can also create a reprocessable capture session to submit reprocess capture
* requests in addition to regular capture requests. A reprocess capture request takes the next
* available buffer from the session's input Surface, and sends it through the camera device's
* processing pipeline again, to produce buffers for the request's target output Surfaces. No
@@ -426,7 +426,7 @@ public abstract class CameraDevice implements AutoCloseable {
* directly (e.g. for Zero-Shutter-Lag use case) or indirectly (e.g. combining multiple output
* images).</p>
*
- * <p>The active reprocessible capture session determines an input {@link Surface} and the set
+ * <p>The active reprocessable capture session determines an input {@link Surface} and the set
* of potential output Surfaces for the camera devices for each capture request. The application
* can use {@link #createCaptureRequest createCaptureRequest} to create regular capture requests
* to capture new images from the camera device, and use {@link #createReprocessCaptureRequest
@@ -448,30 +448,30 @@ public abstract class CameraDevice implements AutoCloseable {
* they cannot be used as targets for a reprocessing request.</p>
*
* <p>Since the application cannot access {@link android.graphics.ImageFormat#PRIVATE} images
- * directly, an output Surface created by {@link android.media.ImageReader#newOpaqueInstance}
- * will be considered as intended to be used for reprocessing input and thus the
- * {@link android.media.ImageReader} size must match one of the supported input sizes for
- * {@link android.graphics.ImageFormat#PRIVATE} format. Otherwise, creating a reprocessible
- * capture session will fail.</p>
+ * directly, an output Surface created by {@link android.media.ImageReader#newInstance} with
+ * {@link android.graphics.ImageFormat#PRIVATE} as the format will be considered as intended to
+ * be used for reprocessing input and thus the {@link android.media.ImageReader} size must
+ * match one of the supported input sizes for {@link android.graphics.ImageFormat#PRIVATE}
+ * format. Otherwise, creating a reprocessable capture session will fail.</p>
*
* <p>The guaranteed stream configurations listed in
* {@link #createCaptureSession createCaptureSession} are also guaranteed to work for
- * {@link #createReprocessibleCaptureSession createReprocessibleCaptureSession}. In addition,
- * the configurations in the tables below are also guaranteed for creating a reprocessible
- * capture session if the camera device supports YUV reprocessing or OPAQUE reprocessing.
- * However, not all output targets used to create a reprocessible session may be used in a
+ * {@link #createReprocessableCaptureSession createReprocessableCaptureSession}. In addition,
+ * the configurations in the tables below are also guaranteed for creating a reprocessable
+ * capture session if the camera device supports YUV reprocessing or PRIVATE reprocessing.
+ * However, not all output targets used to create a reprocessable session may be used in a
* {@link CaptureRequest} simultaneously. The guaranteed output targets that can be included
* in a {@link CaptureRequest} simultaneously are listed in the tables under
* {@link #createCaptureSession createCaptureSession}. For example, with a FULL-capability
* ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL} {@code == }
- * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) device that supports OPAQUE
- * reprocessing, an application can create a reprocessible capture session with 1 input,
+ * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) device that supports PRIVATE
+ * reprocessing, an application can create a reprocessable capture session with 1 input,
* ({@code PRIV}, {@code MAXIMUM}), and 3 outputs, ({@code PRIV}, {@code MAXIMUM}),
* ({@code PRIV}, {@code PREVIEW}), and ({@code YUV}, {@code MAXIMUM}). However, it's not
* guaranteed that an application can submit a regular or reprocess capture with ({@code PRIV},
* {@code MAXIMUM}) and ({@code YUV}, {@code MAXIMUM}) outputs based on the table listed under
* {@link #createCaptureSession createCaptureSession}. In other words, use the tables below to
- * determine the guaranteed stream configurations for creating a reprocessible capture session,
+ * determine the guaranteed stream configurations for creating a reprocessable capture session,
* and use the tables under {@link #createCaptureSession createCaptureSession} to determine the
* guaranteed output targets that can be submitted in a regular or reprocess
* {@link CaptureRequest} simultaneously.</p>
@@ -482,12 +482,12 @@ public abstract class CameraDevice implements AutoCloseable {
*
* <p>Limited-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
* {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}) devices
- * support at least the following stream combinations for creating a reprocessible capture
+ * support at least the following stream combinations for creating a reprocessable capture
* session in addition to those listed in {@link #createCaptureSession createCaptureSession} for
* {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices:
*
* <table>
- * <tr><th colspan="11">LIMITED-level additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
+ * <tr><th colspan="11">LIMITED-level additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
* <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr>
* <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
* <tr> <td>{@code PRIV}/{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>Same as input</td><td id="rb">{@code MAXIMUM}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td></td><td id="rb"></td> <td></td><td id="rb"></td> <td>No-viewfinder still image reprocessing.</td> </tr>
@@ -499,12 +499,12 @@ public abstract class CameraDevice implements AutoCloseable {
*
* <p>FULL-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
* {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) devices
- * support at least the following stream combinations for creating a reprocessible capture
+ * support at least the following stream combinations for creating a reprocessable capture
* session in addition to those for
* {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices:
*
* <table>
- * <tr><th colspan="11">FULL-capability additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
+ * <tr><th colspan="11">FULL-capability additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
* <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr>
* <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
* <tr> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td></td><td id="rb"></td> <td></td><td id="rb"></td> <td>Maximum-resolution multi-frame image fusion in-app processing with regular preview.</td> </tr>
@@ -520,12 +520,12 @@ public abstract class CameraDevice implements AutoCloseable {
*
* <p>RAW-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES} includes
* {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}) devices additionally support
- * at least the following stream combinations for creating a reprocessible capture session
+ * at least the following stream combinations for creating a reprocessable capture session
* on both {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL} and
* {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices
*
* <table>
- * <tr><th colspan="11">RAW-capability additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
+ * <tr><th colspan="11">RAW-capability additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr>
* <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr>
* <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
* <tr> <td>{@code PRIV}/{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>Same as input</td><td id="rb">{@code MAXIMUM}</td> <td>{@code YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW}</td><td id="rb">{@code MAXIMUM}</td> <td></td><td id="rb"></td> <td>Mutually exclusive ZSL in-app processing and DNG capture.</td> </tr>
@@ -560,7 +560,7 @@ public abstract class CameraDevice implements AutoCloseable {
* @see android.media.ImageWriter
* @see android.media.ImageReader
*/
- public abstract void createReprocessibleCaptureSession(InputConfiguration inputConfig,
+ public abstract void createReprocessableCaptureSession(InputConfiguration inputConfig,
List<Surface> outputs, CameraCaptureSession.StateCallback callback, Handler handler)
throws CameraAccessException;
@@ -602,8 +602,7 @@ public abstract class CameraDevice implements AutoCloseable {
* {@link CameraCaptureSession}'s input {@link Surface} to all output {@link Surface Surfaces}
* included in the reprocess capture request. The reprocess input images must be generated from
* one or multiple output images captured from the same camera device. The application can
- * provide input images to camera device via
- * {{@link android.media.ImageWriter#queueInputImage ImageWriter#queueInputImage}}.
+ * provide input images to camera device via {@link android.media.ImageWriter#queueInputImage}.
* The application must use the capture result of one of those output images to create a
* reprocess capture request so that the camera device can use the information to achieve
* optimal reprocess image quality.
@@ -618,7 +617,7 @@ public abstract class CameraDevice implements AutoCloseable {
*
* @see CaptureRequest.Builder
* @see TotalCaptureResult
- * @see CameraDevice#createReprocessibleCaptureSession
+ * @see CameraDevice#createReprocessableCaptureSession
* @see android.media.ImageWriter
*/
public abstract CaptureRequest.Builder createReprocessCaptureRequest(
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 9327f00..d99cce7 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -556,7 +556,7 @@ public final class CameraManager {
* {@link CameraManager#registerTorchCallback} to be notified of such status changes.
* </p>
*
- * @see registerTorchCallback
+ * @see #registerTorchCallback
*/
public static abstract class TorchCallback {
/**
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index ca9439b..1d7450e 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -472,7 +472,7 @@ public abstract class CameraMetadata<TKey> {
* <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
* {@link android.graphics.ImageFormat#YUV_420_888 } and
* {@link android.graphics.ImageFormat#JPEG } formats.</li>
- * <li>The maximum available resolution for OPAQUE streams
+ * <li>The maximum available resolution for PRIVATE streams
* (both input/output) will match the maximum available
* resolution of JPEG streams.</li>
* <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
@@ -492,7 +492,7 @@ public abstract class CameraMetadata<TKey> {
* @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
*/
- public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4;
+ public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
/**
* <p>The camera device supports accurately reporting the sensor settings for many of
@@ -565,7 +565,7 @@ public abstract class CameraMetadata<TKey> {
/**
* <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
- * OPAQUE_REPROCESSING, This capability requires the camera device to support the
+ * PRIVATE_REPROCESSING, This capability requires the camera device to support the
* following:</p>
* <ul>
* <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index ab6ce91..3ec11b7 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -158,9 +158,9 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
private final HashSet<Surface> mSurfaceSet;
private final CameraMetadataNative mSettings;
private boolean mIsReprocess;
- // Each reprocess request must be tied to a reprocessible session ID.
+ // Each reprocess request must be tied to a reprocessable session ID.
// Valid only for reprocess requests (mIsReprocess == true).
- private int mReprocessibleSessionId;
+ private int mReprocessableSessionId;
private Object mUserTag;
@@ -173,7 +173,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
mSettings = new CameraMetadataNative();
mSurfaceSet = new HashSet<Surface>();
mIsReprocess = false;
- mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE;
+ mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE;
}
/**
@@ -186,7 +186,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
mSettings = new CameraMetadataNative(source.mSettings);
mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone();
mIsReprocess = source.mIsReprocess;
- mReprocessibleSessionId = source.mReprocessibleSessionId;
+ mReprocessableSessionId = source.mReprocessableSessionId;
mUserTag = source.mUserTag;
}
@@ -199,30 +199,30 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* @param isReprocess Indicates whether to create a reprocess capture request. {@code true}
* to create a reprocess capture request. {@code false} to create a regular
* capture request.
- * @param reprocessibleSessionId The ID of the camera capture session this capture is created
+ * @param reprocessableSessionId The ID of the camera capture session this capture is created
* for. This is used to validate if the application submits a
* reprocess capture request to the same session where
* the {@link TotalCaptureResult}, used to create the reprocess
* capture, came from.
*
* @throws IllegalArgumentException If creating a reprocess capture request with an invalid
- * reprocessibleSessionId.
+ * reprocessableSessionId.
*
* @see CameraDevice#createReprocessCaptureRequest
*/
private CaptureRequest(CameraMetadataNative settings, boolean isReprocess,
- int reprocessibleSessionId) {
+ int reprocessableSessionId) {
mSettings = CameraMetadataNative.move(settings);
mSurfaceSet = new HashSet<Surface>();
mIsReprocess = isReprocess;
if (isReprocess) {
- if (reprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) {
+ if (reprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) {
throw new IllegalArgumentException("Create a reprocess capture request with an " +
- "invalid session ID: " + reprocessibleSessionId);
+ "invalid session ID: " + reprocessableSessionId);
}
- mReprocessibleSessionId = reprocessibleSessionId;
+ mReprocessableSessionId = reprocessableSessionId;
} else {
- mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE;
+ mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE;
}
}
@@ -307,20 +307,20 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
}
/**
- * Get the reprocessible session ID this reprocess capture request is associated with.
+ * Get the reprocessable session ID this reprocess capture request is associated with.
*
- * @return the reprocessible session ID this reprocess capture request is associated with
+ * @return the reprocessable session ID this reprocess capture request is associated with
*
* @throws IllegalStateException if this capture request is not a reprocess capture request.
* @hide
*/
- public int getReprocessibleSessionId() {
+ public int getReprocessableSessionId() {
if (mIsReprocess == false ||
- mReprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) {
- throw new IllegalStateException("Getting the reprocessible session ID for a "+
+ mReprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) {
+ throw new IllegalStateException("Getting the reprocessable session ID for a "+
"non-reprocess capture request is illegal.");
}
- return mReprocessibleSessionId;
+ return mReprocessableSessionId;
}
/**
@@ -346,7 +346,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
&& mSurfaceSet.equals(other.mSurfaceSet)
&& mSettings.equals(other.mSettings)
&& mIsReprocess == other.mIsReprocess
- && mReprocessibleSessionId == other.mReprocessibleSessionId;
+ && mReprocessableSessionId == other.mReprocessableSessionId;
}
@Override
@@ -395,7 +395,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
}
mIsReprocess = (in.readInt() == 0) ? false : true;
- mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE;
+ mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE;
}
@Override
@@ -450,19 +450,19 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* @param reprocess Indicates whether to create a reprocess capture request. {@code true}
* to create a reprocess capture request. {@code false} to create a regular
* capture request.
- * @param reprocessibleSessionId The ID of the camera capture session this capture is
+ * @param reprocessableSessionId The ID of the camera capture session this capture is
* created for. This is used to validate if the application
* submits a reprocess capture request to the same session
* where the {@link TotalCaptureResult}, used to create the
* reprocess capture, came from.
*
* @throws IllegalArgumentException If creating a reprocess capture request with an invalid
- * reprocessibleSessionId.
+ * reprocessableSessionId.
* @hide
*/
public Builder(CameraMetadataNative template, boolean reprocess,
- int reprocessibleSessionId) {
- mRequest = new CaptureRequest(template, reprocess, reprocessibleSessionId);
+ int reprocessableSessionId) {
+ mRequest = new CaptureRequest(template, reprocess, reprocessableSessionId);
}
/**
@@ -1275,7 +1275,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* <p>This control (except for MANUAL) is only effective if
* <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
* <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
- * contains OPAQUE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
+ * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
* {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are
* always supported.</p>
* <p><b>Possible values:</b>
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 3dc8970..d931a76 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -1698,7 +1698,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
* <p>This control (except for MANUAL) is only effective if
* <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
* <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
- * contains OPAQUE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
+ * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
* {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are
* always supported.</p>
* <p><b>Possible values:</b>
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index dff6227..d08c52b 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -153,10 +153,10 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
Handler handler) throws CameraAccessException {
if (request == null) {
throw new IllegalArgumentException("request must not be null");
- } else if (request.isReprocess() && !isReprocessible()) {
+ } else if (request.isReprocess() && !isReprocessable()) {
throw new IllegalArgumentException("this capture session cannot handle reprocess " +
"requests");
- } else if (request.isReprocess() && request.getReprocessibleSessionId() != mId) {
+ } else if (request.isReprocess() && request.getReprocessableSessionId() != mId) {
throw new IllegalArgumentException("capture request was created for another session");
}
@@ -184,10 +184,10 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
for (CaptureRequest request : requests) {
if (request.isReprocess()) {
- if (!isReprocessible()) {
+ if (!isReprocessable()) {
throw new IllegalArgumentException("This capture session cannot handle " +
"reprocess requests");
- } else if (request.getReprocessibleSessionId() != mId) {
+ } else if (request.getReprocessableSessionId() != mId) {
throw new IllegalArgumentException("Capture request was created for another " +
"session");
}
@@ -293,7 +293,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
@Override
- public boolean isReprocessible() {
+ public boolean isReprocessable() {
return mInput != null;
}
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index e84b46a..4508dc8 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -480,16 +480,16 @@ public class CameraDeviceImpl extends CameraDevice {
}
@Override
- public void createReprocessibleCaptureSession(InputConfiguration inputConfig,
+ public void createReprocessableCaptureSession(InputConfiguration inputConfig,
List<Surface> outputs, CameraCaptureSession.StateCallback callback, Handler handler)
throws CameraAccessException {
if (DEBUG) {
- Log.d(TAG, "createReprocessibleCaptureSession");
+ Log.d(TAG, "createReprocessableCaptureSession");
}
if (inputConfig == null) {
throw new IllegalArgumentException("inputConfig cannot be null when creating a " +
- "reprocessible capture session");
+ "reprocessable capture session");
}
List<OutputConfiguration> outConfigurations = new ArrayList<>(outputs.size());
for (Surface surface : outputs) {
diff --git a/core/java/android/hardware/camera2/params/InputConfiguration.java b/core/java/android/hardware/camera2/params/InputConfiguration.java
index dea1c5c..0c642cf 100644
--- a/core/java/android/hardware/camera2/params/InputConfiguration.java
+++ b/core/java/android/hardware/camera2/params/InputConfiguration.java
@@ -19,11 +19,11 @@ package android.hardware.camera2.params;
import android.hardware.camera2.utils.HashCodeHelpers;
/**
- * Immutable class to store an input configuration that is used to create a reprocessible capture
+ * Immutable class to store an input configuration that is used to create a reprocessable capture
* session.
*
- * @see CameraDevice#createReprocessibleCaptureSession
- * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
+ * @see android.hardware.camera2.CameraDevice#createReprocessableCaptureSession
+ * @see android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
*/
public final class InputConfiguration {
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1cbd886..4f2a3fa 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -2015,6 +2015,7 @@ public final class ViewRootImpl implements ViewParent,
mLastWasImTarget = imTarget;
InputMethodManager imm = InputMethodManager.peekInstance();
if (imm != null && imTarget) {
+ imm.startGettingWindowFocus(mView);
imm.onWindowFocus(mView, mView.findFocus(),
mWindowAttributes.softInputMode,
!mHasHadWindowFocus, mWindowAttributes.flags);
@@ -3321,6 +3322,10 @@ public final class ViewRootImpl implements ViewParent,
InputMethodManager imm = InputMethodManager.peekInstance();
if (mView != null) {
+ if (hasWindowFocus && imm != null && mLastWasImTarget &&
+ !isInLocalFocusMode()) {
+ imm.startGettingWindowFocus(mView);
+ }
mAttachInfo.mKeyDispatchState.reset();
mView.dispatchWindowFocusChanged(hasWindowFocus);
mAttachInfo.mTreeObserver.dispatchOnWindowFocusChange(hasWindowFocus);
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index c785149..42e6766 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -1011,6 +1011,10 @@ public class AccessibilityNodeInfo implements Parcelable {
public void addAction(AccessibilityAction action) {
enforceNotSealed();
+ addActionUnchecked(action);
+ }
+
+ private void addActionUnchecked(AccessibilityAction action) {
if (action == null) {
return;
}
@@ -2846,9 +2850,9 @@ public class AccessibilityNodeInfo implements Parcelable {
addLegacyStandardActions(legacyStandardActions);
final int nonLegacyActionCount = actionCount - Integer.bitCount(legacyStandardActions);
for (int i = 0; i < nonLegacyActionCount; i++) {
- AccessibilityAction action = new AccessibilityAction(
+ final AccessibilityAction action = new AccessibilityAction(
parcel.readInt(), parcel.readCharSequence());
- addAction(action);
+ addActionUnchecked(action);
}
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 1fb791c..568e160 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -281,7 +281,12 @@ public final class InputMethodManager {
boolean mFullscreenMode;
// -----------------------------------------------------------
-
+
+ /**
+ * This is the root view of the overall window that currently has input
+ * method focus.
+ */
+ View mCurRootView;
/**
* This is the view that should currently be served by an input method,
* regardless of the state of setting that up.
@@ -801,6 +806,7 @@ public final class InputMethodManager {
* Disconnect any existing input connection, clearing the served view.
*/
void finishInputLocked() {
+ mCurRootView = null;
mNextServedView = null;
if (mServedView != null) {
if (DEBUG) Log.v(TAG, "FINISH INPUT: " + mServedView);
@@ -1284,9 +1290,10 @@ public final class InputMethodManager {
void focusInLocked(View view) {
if (DEBUG) Log.v(TAG, "focusIn: " + view);
- if (!view.hasWindowFocus()) {
- // This is a request from a window that doesn't have window focus, so ignore it.
- if (DEBUG) Log.v(TAG, "Not focused window, ignoring");
+ if (mCurRootView != view.getRootView()) {
+ // This is a request from a window that isn't in the window with
+ // IME focus, so ignore it.
+ if (DEBUG) Log.v(TAG, "Not IME target window, ignoring");
return;
}
@@ -1303,9 +1310,16 @@ public final class InputMethodManager {
if (DEBUG) Log.v(TAG, "focusOut: " + view
+ " mServedView=" + mServedView
+ " winFocus=" + view.hasWindowFocus());
- if (mServedView == view && view.hasWindowFocus()) {
- mNextServedView = null;
- scheduleCheckFocusLocked(view);
+ if (mServedView != view) {
+ // The following code would auto-hide the IME if we end up
+ // with no more views with focus. This can happen, however,
+ // whenever we go into touch mode, so it ends up hiding
+ // at times when we don't really want it to. For now it
+ // seems better to just turn it all off.
+ if (false && view.hasWindowFocus()) {
+ mNextServedView = null;
+ scheduleCheckFocusLocked(view);
+ }
}
}
}
@@ -1428,6 +1442,13 @@ public final class InputMethodManager {
}
}
+ /** @hide */
+ public void startGettingWindowFocus(View rootView) {
+ synchronized (mH) {
+ mCurRootView = rootView;
+ }
+ }
+
/**
* Report the current selection range.
*
@@ -2135,6 +2156,7 @@ public final class InputMethodManager {
+ " mBindSequence=" + mBindSequence
+ " mCurId=" + mCurId);
p.println(" mCurMethod=" + mCurMethod);
+ p.println(" mCurRootView=" + mCurRootView);
p.println(" mServedView=" + mServedView);
p.println(" mNextServedView=" + mNextServedView);
p.println(" mServedConnecting=" + mServedConnecting);
diff --git a/core/java/android/webkit/FindActionModeCallback.java b/core/java/android/webkit/FindActionModeCallback.java
index 6fef2d6..ab6a2f9 100644
--- a/core/java/android/webkit/FindActionModeCallback.java
+++ b/core/java/android/webkit/FindActionModeCallback.java
@@ -154,6 +154,7 @@ public class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
}
public void showSoftInput() {
+ mInput.startGettingWindowFocus(mEditText.getRootView());
mInput.focusIn(mEditText);
mInput.showSoftInput(mEditText, 0);
}
diff --git a/core/java/android/webkit/WebResourceError.java b/core/java/android/webkit/WebResourceError.java
index 11f1b6f..90693f3 100644
--- a/core/java/android/webkit/WebResourceError.java
+++ b/core/java/android/webkit/WebResourceError.java
@@ -36,8 +36,11 @@ public abstract class WebResourceError {
* and thus can be used for communicating the problem to the user.
*
* @return The description of the error
+ *
+ * Will become abstract after updated WebView.apk will be submitted
+ * into the Android tree.
*/
- public abstract CharSequence getDescription();
+ public CharSequence getDescription() { return ""; }
/**
* This class can not be subclassed by applications.
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 38bbe66..470e345 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1105,7 +1105,7 @@
intern filter data scheme is set to "http" or "https". When set to true, the intent filter
will need to use its data tag for getting the URIs to verify with.
- For each URI, an HTTPS network request will be done to <code>/.well-known/associations.json</code>
+ For each URI, an HTTPS network request will be done to <code>/.well-known/statements.json</code>
host to verify that the web site is okay with the app intercepting the URI.
-->
<attr name="autoVerify" format="boolean" />
diff --git a/packages/StatementService/src/com/android/statementservice/retriever/AbstractStatementRetriever.java b/packages/StatementService/src/com/android/statementservice/retriever/AbstractStatementRetriever.java
index fb30bc1..3b59fd6 100644
--- a/packages/StatementService/src/com/android/statementservice/retriever/AbstractStatementRetriever.java
+++ b/packages/StatementService/src/com/android/statementservice/retriever/AbstractStatementRetriever.java
@@ -90,7 +90,7 @@ public abstract class AbstractStatementRetriever {
* Creates a new StatementRetriever that directly retrieves statements from the asset.
*
* <p> For web assets, {@link AbstractStatementRetriever} will try to retrieve the statement
- * file from URL: {@code [webAsset.site]/.well-known/associations.json"} where {@code
+ * file from URL: {@code [webAsset.site]/.well-known/statements.json"} where {@code
* [webAsset.site]} is in the form {@code http{s}://[hostname]:[optional_port]}. The file
* should contain one JSON array of statements.
*
diff --git a/packages/StatementService/src/com/android/statementservice/retriever/DirectStatementRetriever.java b/packages/StatementService/src/com/android/statementservice/retriever/DirectStatementRetriever.java
index 3ad71c4..6516516 100644
--- a/packages/StatementService/src/com/android/statementservice/retriever/DirectStatementRetriever.java
+++ b/packages/StatementService/src/com/android/statementservice/retriever/DirectStatementRetriever.java
@@ -38,7 +38,7 @@ import java.util.List;
private static final int HTTP_CONNECTION_TIMEOUT_MILLIS = 5000;
private static final long HTTP_CONTENT_SIZE_LIMIT_IN_BYTES = 1024 * 1024;
private static final int MAX_INCLUDE_LEVEL = 1;
- private static final String WELL_KNOWN_STATEMENT_PATH = "/.well-known/associations.json";
+ private static final String WELL_KNOWN_STATEMENT_PATH = "/.well-known/statements.json";
private final URLFetcher mUrlFetcher;
private final AndroidPackageInfoFetcher mAndroidFetcher;
diff --git a/packages/StatementService/src/com/android/statementservice/retriever/Statement.java b/packages/StatementService/src/com/android/statementservice/retriever/Statement.java
index f83edaf..da3c355 100644
--- a/packages/StatementService/src/com/android/statementservice/retriever/Statement.java
+++ b/packages/StatementService/src/com/android/statementservice/retriever/Statement.java
@@ -21,7 +21,7 @@ import android.annotation.NonNull;
/**
* An immutable value type representing a statement, consisting of a source, target, and relation.
* This reflects an assertion that the relation holds for the source, target pair. For example, if a
- * web site has the following in its associations.json file:
+ * web site has the following in its statements.json file:
*
* <pre>
* {
diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java
index 4b3e30f..6efb6d6 100644
--- a/rs/java/android/renderscript/Element.java
+++ b/rs/java/android/renderscript/Element.java
@@ -536,8 +536,8 @@ public class Element extends BaseObj {
}
public static Element F16_3(RenderScript rs) {
- if(rs.mElement_FLOAT_3 == null) {
- rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3);
+ if(rs.mElement_HALF_3 == null) {
+ rs.mElement_HALF_3 = createVector(rs, DataType.FLOAT_16, 3);
}
return rs.mElement_HALF_3;
}
@@ -911,6 +911,7 @@ public class Element extends BaseObj {
switch (dt) {
// Support only primitive integer/float/boolean types as vectors.
+ case FLOAT_16:
case FLOAT_32:
case FLOAT_64:
case SIGNED_8:
diff --git a/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
index d64e39f..925fae0 100644
--- a/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
+++ b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
@@ -51,6 +51,7 @@ class ActivityManagerDebugConfig {
static final boolean DEBUG_FOCUS = false;
static final boolean DEBUG_IMMERSIVE = DEBUG_ALL || false;
static final boolean DEBUG_LOCKSCREEN = DEBUG_ALL || false;
+ static final boolean DEBUG_LOCKTASK = DEBUG_ALL || false;
static final boolean DEBUG_LRU = DEBUG_ALL || false;
static final boolean DEBUG_MU = DEBUG_ALL || false;
static final boolean DEBUG_OOM_ADJ = DEBUG_ALL || false;
@@ -82,6 +83,7 @@ class ActivityManagerDebugConfig {
static final String POSTFIX_FOCUS = (APPEND_CATEGORY_NAME) ? "_Focus" : "";
static final String POSTFIX_IMMERSIVE = (APPEND_CATEGORY_NAME) ? "_Immersive" : "";
static final String POSTFIX_LOCKSCREEN = (APPEND_CATEGORY_NAME) ? "_LOCKSCREEN" : "";
+ static final String POSTFIX_LOCKTASK = (APPEND_CATEGORY_NAME) ? "_LOCKTASK" : "";
static final String POSTFIX_LRU = (APPEND_CATEGORY_NAME) ? "_LRU" : "";
static final String POSTFIX_MU = "_MU";
static final String POSTFIX_OOM_ADJ = (APPEND_CATEGORY_NAME) ? "_OomAdj" : "";
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 9ffb874..2158395 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -265,6 +265,7 @@ public final class ActivityManagerService extends ActivityManagerNative
private static final String TAG_FOCUS = TAG + POSTFIX_FOCUS;
private static final String TAG_IMMERSIVE = TAG + POSTFIX_IMMERSIVE;
private static final String TAG_LOCKSCREEN = TAG + POSTFIX_LOCKSCREEN;
+ private static final String TAG_LOCKTASK = TAG + POSTFIX_LOCKTASK;
private static final String TAG_LRU = TAG + POSTFIX_LRU;
private static final String TAG_MU = TAG + POSTFIX_MU;
private static final String TAG_OOM_ADJ = TAG + POSTFIX_OOM_ADJ;
@@ -8762,6 +8763,7 @@ public final class ActivityManagerService extends ActivityManagerNative
throw new SecurityException("updateLockTaskPackage called from non-system process");
}
synchronized (this) {
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "Whitelisting " + userId + ":" + packages);
mLockTaskPackages.put(userId, packages);
mStackSupervisor.onLockTaskPackagesUpdatedLocked();
}
@@ -8769,6 +8771,7 @@ public final class ActivityManagerService extends ActivityManagerNative
void startLockTaskModeLocked(TaskRecord task) {
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "startLockTaskModeLocked: " + task);
if (task.mLockTaskAuth == LOCK_TASK_AUTH_DONT_LOCK) {
return;
}
@@ -8785,6 +8788,7 @@ public final class ActivityManagerService extends ActivityManagerNative
task.mLockTaskUid = callingUid;
if (task.mLockTaskAuth == LOCK_TASK_AUTH_PINNABLE) {
// startLockTask() called by app and task mode is lockTaskModeDefault.
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "Mode default, asking user");
StatusBarManagerInternal statusBarManager =
LocalServices.getService(StatusBarManagerInternal.class);
if (statusBarManager != null) {
@@ -8797,6 +8801,8 @@ public final class ActivityManagerService extends ActivityManagerNative
throw new IllegalArgumentException("Invalid task, not in foreground");
}
}
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, isSystemInitiated ? "Locking pinned" :
+ "Locking fully");
mStackSupervisor.setLockTaskModeLocked(task, isSystemInitiated ?
ActivityManager.LOCK_TASK_MODE_PINNED :
ActivityManager.LOCK_TASK_MODE_LOCKED,
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 54ea6d7..f304828 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -117,6 +117,7 @@ import java.io.FileDescriptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Set;
@@ -124,6 +125,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
private static final String TAG = TAG_WITH_CLASS_NAME ? "ActivityStackSupervisor" : TAG_AM;
private static final String TAG_CONFIGURATION = TAG + POSTFIX_CONFIGURATION;
private static final String TAG_FOCUS = TAG + POSTFIX_FOCUS;
+ private static final String TAG_LOCKTASK = TAG + POSTFIX_LOCKTASK;
private static final String TAG_PAUSE = TAG + POSTFIX_PAUSE;
private static final String TAG_RESULTS = TAG + POSTFIX_RESULTS;
private static final String TAG_RECENTS = TAG + POSTFIX_RECENTS;
@@ -1183,7 +1185,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
final TaskRecord task = r.task;
if (task.mLockTaskAuth == LOCK_TASK_AUTH_LAUNCHABLE) {
- setLockTaskModeLocked(task, LOCK_TASK_MODE_LOCKED, "lockTaskLaunchMode attribute");
+ setLockTaskModeLocked(task, LOCK_TASK_MODE_LOCKED, "mLockTaskAuth==LAUNCHABLE");
}
final ActivityStack stack = task.stack;
@@ -3327,6 +3329,18 @@ public final class ActivityStackSupervisor implements DisplayListener {
}
}
+ private String lockTaskModeToString() {
+ switch (mLockTaskModeState) {
+ case LOCK_TASK_MODE_LOCKED:
+ return "LOCKED";
+ case LOCK_TASK_MODE_PINNED:
+ return "PINNED";
+ case LOCK_TASK_MODE_NONE:
+ return "NONE";
+ default: return "unknown=" + mLockTaskModeState;
+ }
+ }
+
public void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("mFocusedStack=" + mFocusedStack);
pw.print(" mLastFocusedStack="); pw.println(mLastFocusedStack);
@@ -3334,7 +3348,16 @@ public final class ActivityStackSupervisor implements DisplayListener {
pw.print(prefix); pw.println("mCurTaskId=" + mCurTaskId);
pw.print(prefix); pw.println("mUserStackInFront=" + mUserStackInFront);
pw.print(prefix); pw.println("mActivityContainers=" + mActivityContainers);
- pw.print(prefix); pw.println("mLockTaskModeTasks" + mLockTaskModeTasks);
+ pw.print(prefix); pw.print("mLockTaskModeState=" + lockTaskModeToString());
+ final SparseArray<String[]> packages = mService.mLockTaskPackages;
+ if (packages.size() > 0) {
+ pw.println(" mLockTaskPackages (userId:packages)=");
+ for (int i = 0; i < packages.size(); ++i) {
+ pw.print(prefix); pw.print(prefix); pw.print(packages.keyAt(i));
+ pw.print(":"); pw.println(Arrays.toString(packages.valueAt(i)));
+ }
+ }
+ pw.println(" mLockTaskModeTasks" + mLockTaskModeTasks);
}
ArrayList<ActivityRecord> getDumpActivitiesLocked(String name) {
@@ -3654,6 +3677,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
void removeLockedTaskLocked(final TaskRecord task) {
if (mLockTaskModeTasks.remove(task) && mLockTaskModeTasks.isEmpty()) {
// Last one.
+ if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "removeLockedTask: task=" + task +
+ " last task, reverting locktask mode. Callers=" + Debug.getCallers(3));
final Message lockTaskMsg = Message.obtain();
lockTaskMsg.arg1 = task.userId;
lockTaskMsg.what = LOCK_TASK_END_MSG;
@@ -3679,20 +3704,26 @@ public final class ActivityStackSupervisor implements DisplayListener {
removeLockedTaskLocked(lockedTask);
if (!mLockTaskModeTasks.isEmpty()) {
// There are locked tasks remaining, can only finish this task, not unlock it.
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
+ "setLockTaskModeLocked: Tasks remaining, can't unlock");
lockedTask.performClearTaskLocked();
resumeTopActivitiesLocked();
return;
}
}
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
+ "setLockTaskModeLocked: No tasks to unlock. Callers=" + Debug.getCallers(4));
return;
}
// Should have already been checked, but do it again.
if (task.mLockTaskAuth == LOCK_TASK_AUTH_DONT_LOCK) {
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
+ "setLockTaskModeLocked: Can't lock due to auth");
return;
}
if (isLockTaskModeViolation(task)) {
- Slog.e(TAG, "setLockTaskMode: Attempt to start an unauthorized lock task.");
+ Slog.e(TAG_LOCKTASK, "setLockTaskMode: Attempt to start an unauthorized lock task.");
return;
}
@@ -3706,6 +3737,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
mHandler.sendMessage(lockTaskMsg);
}
// Add it or move it to the top.
+ if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "setLockTaskModeLocked: Locking to " + task +
+ " Callers=" + Debug.getCallers(4));
mLockTaskModeTasks.remove(task);
mLockTaskModeTasks.add(task);
@@ -3759,6 +3792,13 @@ public final class ActivityStackSupervisor implements DisplayListener {
stack.onLockTaskPackagesUpdatedLocked();
}
}
+ final ActivityRecord r = topRunningActivityLocked();
+ final TaskRecord task = r != null ? r.task : null;
+ if (mLockTaskModeTasks.isEmpty() && task != null
+ && task.mLockTaskAuth == LOCK_TASK_AUTH_LAUNCHABLE) {
+ // This task must have just been authorized.
+ setLockTaskModeLocked(task, ActivityManager.LOCK_TASK_MODE_LOCKED, "package updated");
+ }
if (didSomething) {
resumeTopActivitiesLocked();
}
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 5e9f2b0..f653e9e 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -63,6 +63,7 @@ import java.util.ArrayList;
final class TaskRecord {
private static final String TAG = TAG_WITH_CLASS_NAME ? "TaskRecord" : TAG_AM;
private static final String TAG_RECENTS = TAG + POSTFIX_RECENTS;
+ private static final String TAG_LOCKTASK = TAG + POSTFIX_LOCKTASK;
private static final String TAG_TASKS = TAG + POSTFIX_TASKS;
static final String ATTR_TASKID = "task_id";
@@ -134,12 +135,11 @@ final class TaskRecord {
/** Can't be put in lockTask mode. */
final static int LOCK_TASK_AUTH_DONT_LOCK = 0;
- /** Can enter lockTask with user approval if not already in lockTask. */
+ /** Can enter lockTask with user approval. Can never start over existing lockTask task. */
final static int LOCK_TASK_AUTH_PINNABLE = 1;
/** Starts in LOCK_TASK_MODE_LOCKED automatically. Can start over existing lockTask task. */
final static int LOCK_TASK_AUTH_LAUNCHABLE = 2;
- /** Enters LOCK_TASK_MODE_LOCKED via startLockTask(), enters LOCK_TASK_MODE_PINNED from
- * Overview. Can start over existing lockTask task. */
+ /** Can enter lockTask with user approval. Can start over existing lockTask task. */
final static int LOCK_TASK_AUTH_WHITELISTED = 3;
int mLockTaskAuth = LOCK_TASK_AUTH_PINNABLE;
@@ -744,21 +744,31 @@ final class TaskRecord {
void setLockTaskAuth() {
switch (mLockTaskMode) {
case LOCK_TASK_LAUNCH_MODE_DEFAULT:
+ if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "setLockTaskAuth: task=" + this +
+ " mLockTaskAuth=" + (isLockTaskWhitelistedLocked() ?
+ "WHITELISTED" : "PINNABLE"));
mLockTaskAuth = isLockTaskWhitelistedLocked() ?
LOCK_TASK_AUTH_WHITELISTED : LOCK_TASK_AUTH_PINNABLE;
break;
case LOCK_TASK_LAUNCH_MODE_NEVER:
+ if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "setLockTaskAuth: task=" + this +
+ " mLockTaskAuth=" + (mPrivileged ? "DONT_LOCK" : "PINNABLE"));
mLockTaskAuth = mPrivileged ?
LOCK_TASK_AUTH_DONT_LOCK : LOCK_TASK_AUTH_PINNABLE;
break;
case LOCK_TASK_LAUNCH_MODE_ALWAYS:
+ if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "setLockTaskAuth: task=" + this +
+ " mLockTaskAuth=" + (mPrivileged ? "LAUNCHABLE" : "PINNABLE"));
mLockTaskAuth = mPrivileged ?
LOCK_TASK_AUTH_LAUNCHABLE: LOCK_TASK_AUTH_PINNABLE;
break;
case LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED:
+ if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "setLockTaskAuth: task=" + this +
+ " mLockTaskAuth=" + (isLockTaskWhitelistedLocked() ?
+ "LAUNCHABLE" : "PINNABLE"));
mLockTaskAuth = isLockTaskWhitelistedLocked() ?
LOCK_TASK_AUTH_LAUNCHABLE : LOCK_TASK_AUTH_PINNABLE;
break;
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 4098698..7784884 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -590,12 +590,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
void switchUser(int userId, IRemoteCallback reply) {
synchronized (mLock) {
mCurrentUserId = userId;
- WallpaperData wallpaper = mWallpaperMap.get(userId);
- if (wallpaper == null) {
- wallpaper = new WallpaperData(userId);
- mWallpaperMap.put(userId, wallpaper);
- loadSettingsLocked(userId);
- }
+ WallpaperData wallpaper = getWallpaperSafeLocked(userId);
// Not started watching yet, in case wallpaper data was loaded for other reasons.
if (wallpaper.wallpaperObserver == null) {
wallpaper.wallpaperObserver = new WallpaperObserver(wallpaper);
@@ -718,10 +713,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
}
synchronized (mLock) {
int userId = UserHandle.getCallingUserId();
- WallpaperData wallpaper = mWallpaperMap.get(userId);
- if (wallpaper == null) {
- throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
- }
+ WallpaperData wallpaper = getWallpaperSafeLocked(userId);
if (width <= 0 || height <= 0) {
throw new IllegalArgumentException("width and height must be > 0");
}
@@ -783,10 +775,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
}
synchronized (mLock) {
int userId = UserHandle.getCallingUserId();
- WallpaperData wallpaper = mWallpaperMap.get(userId);
- if (wallpaper == null) {
- throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
- }
+ WallpaperData wallpaper = getWallpaperSafeLocked(userId);
if (padding.left < 0 || padding.top < 0 || padding.right < 0 || padding.bottom < 0) {
throw new IllegalArgumentException("padding must be positive: " + padding);
}
@@ -867,10 +856,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
synchronized (mLock) {
if (DEBUG) Slog.v(TAG, "setWallpaper");
int userId = UserHandle.getCallingUserId();
- WallpaperData wallpaper = mWallpaperMap.get(userId);
- if (wallpaper == null) {
- throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
- }
+ WallpaperData wallpaper = getWallpaperSafeLocked(userId);
final long ident = Binder.clearCallingIdentity();
try {
ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name, wallpaper);
@@ -1230,6 +1216,22 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
return Integer.parseInt(value);
}
+ /**
+ * Sometimes it is expected the wallpaper map may not have a user's data. E.g. This could
+ * happen during user switch. The async user switch observer may not have received
+ * the event yet. We use this safe method when we don't care about this ordering and just
+ * want to update the data. The data is going to be applied when the user switch observer
+ * is eventually executed.
+ */
+ private WallpaperData getWallpaperSafeLocked(int userId) {
+ WallpaperData wallpaper = mWallpaperMap.get(userId);
+ if (wallpaper == null) {
+ loadSettingsLocked(userId);
+ wallpaper = mWallpaperMap.get(userId);
+ }
+ return wallpaper;
+ }
+
private void loadSettingsLocked(int userId) {
if (DEBUG) Slog.v(TAG, "loadSettingsLocked");