Merge "UpdateEngine: Add resetStatus() as system API." into nyc-dev
am: 9971d02
* commit '9971d02c38151a4289552d5b1cfb7b3c7c0acec6':
UpdateEngine: Add resetStatus() as system API.
This commit is contained in:
@@ -31581,12 +31581,13 @@ package android.os {
|
|||||||
|
|
||||||
public class UpdateEngine {
|
public class UpdateEngine {
|
||||||
ctor public UpdateEngine();
|
ctor public UpdateEngine();
|
||||||
method public void applyPayload(java.lang.String, long, long, java.lang.String[]) throws android.os.RemoteException;
|
method public void applyPayload(java.lang.String, long, long, java.lang.String[]);
|
||||||
method public boolean bind(android.os.UpdateEngineCallback, android.os.Handler) throws android.os.RemoteException;
|
method public boolean bind(android.os.UpdateEngineCallback, android.os.Handler);
|
||||||
method public boolean bind(android.os.UpdateEngineCallback) throws android.os.RemoteException;
|
method public boolean bind(android.os.UpdateEngineCallback);
|
||||||
method public void cancel() throws android.os.RemoteException;
|
method public void cancel();
|
||||||
method public void resume() throws android.os.RemoteException;
|
method public void resetStatus();
|
||||||
method public void suspend() throws android.os.RemoteException;
|
method public void resume();
|
||||||
|
method public void suspend();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class UpdateEngine.ErrorCodeConstants {
|
public static final class UpdateEngine.ErrorCodeConstants {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class UpdateEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public boolean bind(final UpdateEngineCallback callback, final Handler handler) throws RemoteException {
|
public boolean bind(final UpdateEngineCallback callback, final Handler handler) {
|
||||||
IUpdateEngineCallback updateEngineCallback = new IUpdateEngineCallback.Stub() {
|
IUpdateEngineCallback updateEngineCallback = new IUpdateEngineCallback.Stub() {
|
||||||
@Override
|
@Override
|
||||||
public void onStatusUpdate(final int status, final float percent) {
|
public void onStatusUpdate(final int status, final float percent) {
|
||||||
@@ -118,31 +118,60 @@ public class UpdateEngine {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return mUpdateEngine.bind(updateEngineCallback);
|
try {
|
||||||
|
return mUpdateEngine.bind(updateEngineCallback);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public boolean bind(final UpdateEngineCallback callback) throws RemoteException {
|
public boolean bind(final UpdateEngineCallback callback) {
|
||||||
return bind(callback, null);
|
return bind(callback, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public void applyPayload(String url, long offset, long size, String[] headerKeyValuePairs) throws RemoteException {
|
public void applyPayload(String url, long offset, long size, String[] headerKeyValuePairs) {
|
||||||
mUpdateEngine.applyPayload(url, offset, size, headerKeyValuePairs);
|
try {
|
||||||
|
mUpdateEngine.applyPayload(url, offset, size, headerKeyValuePairs);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public void cancel() throws RemoteException {
|
public void cancel() {
|
||||||
mUpdateEngine.cancel();
|
try {
|
||||||
|
mUpdateEngine.cancel();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public void suspend() throws RemoteException {
|
public void suspend() {
|
||||||
mUpdateEngine.suspend();
|
try {
|
||||||
|
mUpdateEngine.suspend();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public void resume() throws RemoteException {
|
public void resume() {
|
||||||
mUpdateEngine.resume();
|
try {
|
||||||
|
mUpdateEngine.resume();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SystemApi
|
||||||
|
public void resetStatus() {
|
||||||
|
try {
|
||||||
|
mUpdateEngine.resetStatus();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user