Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31652,6 +31652,7 @@ package android.os { method public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException; method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException; method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException; method public static void rebootWipeAb(android.content.Context, java.io.File, java.lang.String) throws java.io.IOException; method public static void rebootWipeCache(android.content.Context) throws java.io.IOException; method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException; method public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException; core/java/android/os/RecoverySystem.java +25 −0 Original line number Diff line number Diff line Loading @@ -661,6 +661,31 @@ public class RecoverySystem { bootCommand(context, "--wipe_cache", reasonArg, localeArg); } /** * Reboot into recovery and wipe the A/B device. * * @param Context the Context to use. * @param packageFile the wipe package to be applied. * @param reason the reason to wipe. * * @throws IOException if something goes wrong. * * @hide */ @SystemApi public static void rebootWipeAb(Context context, File packageFile, String reason) throws IOException { String reasonArg = null; if (!TextUtils.isEmpty(reason)) { reasonArg = "--reason=" + sanitizeArg(reason); } final String filename = packageFile.getCanonicalPath(); final String filenameArg = "--wipe_package=" + filename; final String localeArg = "--locale=" + Locale.getDefault().toString(); bootCommand(context, "--wipe_ab", filenameArg, reasonArg, localeArg); } /** * Reboot into the recovery system with the supplied argument. * @param args to pass to the recovery utility. Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31652,6 +31652,7 @@ package android.os { method public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException; method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException; method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException; method public static void rebootWipeAb(android.content.Context, java.io.File, java.lang.String) throws java.io.IOException; method public static void rebootWipeCache(android.content.Context) throws java.io.IOException; method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException; method public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException;
core/java/android/os/RecoverySystem.java +25 −0 Original line number Diff line number Diff line Loading @@ -661,6 +661,31 @@ public class RecoverySystem { bootCommand(context, "--wipe_cache", reasonArg, localeArg); } /** * Reboot into recovery and wipe the A/B device. * * @param Context the Context to use. * @param packageFile the wipe package to be applied. * @param reason the reason to wipe. * * @throws IOException if something goes wrong. * * @hide */ @SystemApi public static void rebootWipeAb(Context context, File packageFile, String reason) throws IOException { String reasonArg = null; if (!TextUtils.isEmpty(reason)) { reasonArg = "--reason=" + sanitizeArg(reason); } final String filename = packageFile.getCanonicalPath(); final String filenameArg = "--wipe_package=" + filename; final String localeArg = "--locale=" + Locale.getDefault().toString(); bootCommand(context, "--wipe_ab", filenameArg, reasonArg, localeArg); } /** * Reboot into the recovery system with the supplied argument. * @param args to pass to the recovery utility. Loading