summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/UpdateEngine.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/os/UpdateEngine.java b/core/java/android/os/UpdateEngine.java
index 8f2826c16b63..69bdde35a967 100644
--- a/core/java/android/os/UpdateEngine.java
+++ b/core/java/android/os/UpdateEngine.java
@@ -21,6 +21,8 @@ import android.os.IUpdateEngine;
import android.os.IUpdateEngineCallback;
import android.os.RemoteException;
+import java.io.FileDescriptor;
+
/**
* UpdateEngine handles calls to the update engine which takes care of A/B OTA
* updates. It wraps up the update engine Binder APIs and exposes them as
@@ -187,6 +189,22 @@ public class UpdateEngine {
}
/**
+ * Applies the payload passed as file descriptor {@code fd} instead of
+ * using the {@code file://} scheme.
+ *
+ * <p>See {@link #applyPayload(String)} for {@code offset}, {@code size} and
+ * {@code headerKeyValuePairs} parameters.
+ */
+ public void applyPayload(FileDescriptor fd, long offset, long size,
+ String[] headerKeyValuePairs) {
+ try {
+ mUpdateEngine.applyPayloadFd(fd, offset, size, headerKeyValuePairs);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Permanently cancels an in-progress update.
*
* <p>See {@link #resetStatus} to undo a finshed update (only available