Это длинная история, но я пытаюсь вызвать каталог ShutdownThread, чтобы перезапустить телефон, и по какой-то причине ему не нравится мой контекст и т. Д., Поскольку он дает мне эту ошибку ... любая помощь будет оценена....
.NativeStart.main(Native Method)
[exec] 05-23 16:32:36.354 5573 5573 W System.err: Caused by: android.view
.WindowManager$BadTokenException: Unable to add window android.view.ViewRoot$W@4
5985ae0 -- permission denied for this window type
[exec] 05-23 16:32:36.362 5573 5573 W System.err: at android.view.
/**
* Request a clean shutdown, waiting for subsystems to clean up their
* state etc. Must be called from a Looper thread in which its UI
* is shown.
*
* @param context Context used to display the shutdown progress dialog.
* @param reason code to pass to the kernel (e.g. "recovery"), or null.
* @param confirm true if user confirmation is needed before shutting down.
*/
public static void reboot(final Context context, String reason, boolean confirm) {
mReboot = true;
mRebootReason = reason;
shutdown(context, confirm);
}