UpdateEngine: add WorkerThread annotation.
Add @WorkerThread to allocateSpace and cleanupAppliedPayload because they take a non-trivial amount of time. Bug: 148486809 Test: builds Change-Id: Ib7daba9c662b9e141430df71401d069577221b8a
This commit is contained in:
@@ -19,6 +19,7 @@ package android.os;
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.WorkerThread;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.os.IUpdateEngine;
|
||||
import android.os.IUpdateEngineCallback;
|
||||
@@ -535,6 +536,7 @@ public class UpdateEngine {
|
||||
* @return See {@link AllocateSpaceResult#getErrorCode} and
|
||||
* {@link AllocateSpaceResult#getFreeSpaceRequired}.
|
||||
*/
|
||||
@WorkerThread
|
||||
@NonNull
|
||||
public AllocateSpaceResult allocateSpace(
|
||||
@NonNull String payloadMetadataFilename,
|
||||
@@ -585,6 +587,7 @@ public class UpdateEngine {
|
||||
* @throws ServiceSpecificException if other transient errors has occurred.
|
||||
* A reboot may or may not help resolving the issue.
|
||||
*/
|
||||
@WorkerThread
|
||||
@ErrorCode
|
||||
public int cleanupAppliedPayload() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user