Android System Reboot rebootWipeUserData(final Context context)

Here you can find the source of rebootWipeUserData(final Context context)

Description

reboot Wipe User Data

Declaration

public static void rebootWipeUserData(final Context context) 

Method Source Code

//package com.java2s;

import java.io.IOException;
import android.content.Context;

import android.os.RecoverySystem;
import android.util.Log;

public class Main {
    private final static String TAG = "Upgrade.RebootUtils";

    public static void rebootWipeUserData(final Context context) {
        Log.w(TAG, "!!! REBOOT WIPE USER DATA !!!");
        // The reboot call is blocking, so we need to do it on another thread.
        Thread thr = new Thread("Reboot") {
            @Override//from   w ww. j a v  a  2s.c om
            public void run() {
                try {
                    RecoverySystem.rebootWipeUserData(context);
                } catch (IOException e) {
                    Log.e(TAG, "Can't perform rebootInstallPackage", e);
                }
            }
        };
        thr.start();
    }
}

Related

  1. rebootSystemNow()
  2. rebootInstallPackage(final Context context, final File packageFile)
  3. rebootNormal(Context context)
  4. rebootRecovery(Context context)