projects
/
fonbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bcf6b2
)
Call reboot command as root if PowerManager#reboot fails
author
Marius Gavrilescu
<marius@ieval.ro>
Tue, 19 Aug 2014 21:53:33 +0000
(
00:53
+0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Tue, 19 Aug 2014 21:54:12 +0000
(
00:54
+0300)
This should resolve bug 1, reported by treaki.
src/ro/ieval/fonbot/Heavy.java
patch
|
blob
|
blame
|
history
diff --git
a/src/ro/ieval/fonbot/Heavy.java
b/src/ro/ieval/fonbot/Heavy.java
index 909e7ca1e866dbb0e3c5c3a3546d0172e219de0e..e4ff0a4cb2dd2f45939d4f970d3bc9b779326a1f 100644
(file)
--- a/
src/ro/ieval/fonbot/Heavy.java
+++ b/
src/ro/ieval/fonbot/Heavy.java
@@
-1843,8
+1843,13
@@
final class Heavy {
*/
public static void reboot(final Context context, final Address replyTo, final @Nullable String reason) {
final PowerManager pm=(PowerManager) context.getSystemService(Context.POWER_SERVICE);
- Utils.sendMessage(context, replyTo, rebooting);
+ Utils.sendMessage(context, replyTo, rebooting);
pm.reboot(reason);
+ Runtime.getRuntime().exec(new String[]{
+ "su",
+ "-c",
+ "reboot"
+ }).waitFor();
}
/**
This page took
0.01225 seconds
and
4
git commands to generate.