Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34501,6 +34501,7 @@ package android.os { method public void resetStatus(); method public void resume(); method public void suspend(); method public boolean unbind(); } public static final class UpdateEngine.ErrorCodeConstants { core/java/android/os/UpdateEngine.java +53 −32 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.os.IUpdateEngine; import android.os.IUpdateEngineCallback; import android.os.RemoteException; import android.util.Log; /** * 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 Loading Loading @@ -90,6 +88,8 @@ public class UpdateEngine { } private IUpdateEngine mUpdateEngine; private IUpdateEngineCallback mUpdateEngineCallback = null; private final Object mUpdateEngineCallbackLock = new Object(); /** * Creates a new instance. Loading @@ -107,7 +107,8 @@ public class UpdateEngine { */ @SystemApi public boolean bind(final UpdateEngineCallback callback, final Handler handler) { IUpdateEngineCallback updateEngineCallback = new IUpdateEngineCallback.Stub() { synchronized (mUpdateEngineCallbackLock) { mUpdateEngineCallback = new IUpdateEngineCallback.Stub() { @Override public void onStatusUpdate(final int status, final float percent) { if (handler != null) { Loading Loading @@ -138,11 +139,12 @@ public class UpdateEngine { }; try { return mUpdateEngine.bind(updateEngineCallback); return mUpdateEngine.bind(mUpdateEngineCallback); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } } /** * Equivalent to {@code bind(callback, null)}. Loading Loading @@ -249,4 +251,23 @@ public class UpdateEngine { throw e.rethrowFromSystemServer(); } } /** * Unbinds the last bound callback function. */ @SystemApi public boolean unbind() { synchronized (mUpdateEngineCallbackLock) { if (mUpdateEngineCallback == null) { return true; } try { boolean result = mUpdateEngine.unbind(mUpdateEngineCallback); mUpdateEngineCallback = null; return result; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } } } Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34501,6 +34501,7 @@ package android.os { method public void resetStatus(); method public void resume(); method public void suspend(); method public boolean unbind(); } public static final class UpdateEngine.ErrorCodeConstants {
core/java/android/os/UpdateEngine.java +53 −32 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.os.IUpdateEngine; import android.os.IUpdateEngineCallback; import android.os.RemoteException; import android.util.Log; /** * 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 Loading Loading @@ -90,6 +88,8 @@ public class UpdateEngine { } private IUpdateEngine mUpdateEngine; private IUpdateEngineCallback mUpdateEngineCallback = null; private final Object mUpdateEngineCallbackLock = new Object(); /** * Creates a new instance. Loading @@ -107,7 +107,8 @@ public class UpdateEngine { */ @SystemApi public boolean bind(final UpdateEngineCallback callback, final Handler handler) { IUpdateEngineCallback updateEngineCallback = new IUpdateEngineCallback.Stub() { synchronized (mUpdateEngineCallbackLock) { mUpdateEngineCallback = new IUpdateEngineCallback.Stub() { @Override public void onStatusUpdate(final int status, final float percent) { if (handler != null) { Loading Loading @@ -138,11 +139,12 @@ public class UpdateEngine { }; try { return mUpdateEngine.bind(updateEngineCallback); return mUpdateEngine.bind(mUpdateEngineCallback); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } } /** * Equivalent to {@code bind(callback, null)}. Loading Loading @@ -249,4 +251,23 @@ public class UpdateEngine { throw e.rethrowFromSystemServer(); } } /** * Unbinds the last bound callback function. */ @SystemApi public boolean unbind() { synchronized (mUpdateEngineCallbackLock) { if (mUpdateEngineCallback == null) { return true; } try { boolean result = mUpdateEngine.unbind(mUpdateEngineCallback); mUpdateEngineCallback = null; return result; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } } }