Java Code Examples for android.content.Intent.ACTION_REBOOT

The following are Jave code examples for showing how to use ACTION_REBOOT of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GitHub   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
 * 重启
 * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
 *
 */
public static void reboot() {
    ShellUtils.execCmd("reboot", true);
    Intent intent = new Intent(Intent.ACTION_REBOOT);
    intent.putExtra("nowait", 1);
    intent.putExtra("interval", 1);
    intent.putExtra("window", 0);
    Utils.getApp().sendBroadcast(intent);
}
 
Example 2
Project: Android-UtilCode   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
 * 重启
 * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
 *
 */
public static void reboot() {
    ShellUtils.execCmd("reboot", true);
    Intent intent = new Intent(Intent.ACTION_REBOOT);
    intent.putExtra("nowait", 1);
    intent.putExtra("interval", 1);
    intent.putExtra("window", 0);
    Utils.getContext().sendBroadcast(intent);
}
 
Example 3
Project: AndroidUtilCode-master   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
 * 重启
 * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
 *
 */
public static void reboot() {
    ShellUtils.execCmd("reboot", true);
    Intent intent = new Intent(Intent.ACTION_REBOOT);
    intent.putExtra("nowait", 1);
    intent.putExtra("interval", 1);
    intent.putExtra("window", 0);
    Utils.getContext().sendBroadcast(intent);
}
 
Example 4
Project: BaseCore   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
 * 重启
 * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
 */
public static void reboot() {
    ShellUtils.execCmd("reboot", true);
    Intent intent = new Intent(Intent.ACTION_REBOOT);
    intent.putExtra("nowait", 1);
    intent.putExtra("interval", 1);
    intent.putExtra("window", 0);
    Utils.getContext().sendBroadcast(intent);
}
 
Example 5
Project: HeadlineNews   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
 * 重启
 * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
 *
 */
public static void reboot() {
    ShellUtils.execCmd("reboot", true);
    Intent intent = new Intent(Intent.ACTION_REBOOT);
    intent.putExtra("nowait", 1);
    intent.putExtra("interval", 1);
    intent.putExtra("window", 0);
    Utils.getContext().sendBroadcast(intent);
}
 
Example 6
Project: RLibrary   File: DeviceUtils.java   View Source Code Vote up 6 votes
/**
     * 重启
     * <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
<<<<<<< HEAD
=======
     *
>>>>>>> init commit
     */
    public static void reboot() {
        ShellUtils.execCmd("reboot", true);
        Intent intent = new Intent(Intent.ACTION_REBOOT);
        intent.putExtra("nowait", 1);
        intent.putExtra("interval", 1);
        intent.putExtra("window", 0);
        Utils.getContext().sendBroadcast(intent);
    }