Back to project page permission-explorer.
The source code is released under:
Copyright (C) 2012 Rui Gon?alves and Daniel Cibr?o Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),...
If you think the Android project permission-explorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package pt.up.fe.ssin.pexplorer.actions; /*from w ww. ja va2 s . c o m*/ import java.io.IOException; import pt.up.fe.ssin.pexplorer.R; import pt.up.fe.ssin.pexplorer.app.PermissionAction; import android.content.Context; import android.widget.Toast; public class RebootAction extends PermissionAction { public RebootAction() { super(R.string.reboot_label, R.string.reboot_desc, PermissionAction.WARN); } @Override protected void doAction(Context context) { try { Runtime.getRuntime().exec(new String[] { "su", "-c", "reboot" }); } catch (IOException e) { Toast.makeText(context, R.string.no_root, Toast.LENGTH_SHORT).show(); return; } } }