Android:系统栏不会隐藏。 LogCat(没有此类文件或目录;请求被拒绝(服务调用活动 79 s16 com.android.systemui)
我有一个自己编写的应用程序,应该隐藏或恢复系统栏。此应用程序在 Samsung Galaxy Tab 10.1 (P7500) 上运行。我有两个标签。一款植根于原装 Galaxy ROM,一款植根于 Overcome ROM。
我查看了本教程来隐藏该栏( http://android.serverbox.ch/?p=306 )
我的方法如下所示:
private void hideStatusBar() throws IOException, InterruptedException {
Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 79 s16 com.android.systemui"});
proc.waitFor();
}
private void showStatusBar() throws IOException, InterruptedException {
Process proc = Runtime.getRuntime().exec(new String[]{"am","startservice","-n","com.android.systemui/.SystemUIService"});
proc.waitFor();
}
如果我单击按钮并调用方法,我可以看到正在发生某些事情,因为应用程序正在等待几秒钟。我还查看了 LogCat,发现发生了一些事情。
显示:http://pastebin.com/CidTRSTi 隐藏:
我猜隐藏的问题在第57行
所以我尝试了市场上的一个应用程序:TabBar Hider Demo ( https://market.android.com/details?id=com.tlalexander.tabletbarhiderdemo&feature=more_from_developer#?t=W251bGwsMSwxLDEwMiwiY29tLnRsYWxleGFuZGVyLnRhYmxldGJhcmhpZGVyZGVtbyJd )
但是这里 相同的。该栏不会删除/隐藏。我还查看了 LogCat
显示:http://pastebin.com/TuKXQ5qm
隐藏:http://pastebin.com/rWHFQV4u
第 51 行中存在相同问题(隐藏)
任何提示? 谢谢B770
I've got an self written app that shoult hide or restore the systembar. This app is running on an Samsung Galaxy Tab 10.1 (P7500). I've got two Tabs. One rooted with stock Galaxy ROM and one rooted with Overcome ROM.
I looked at this tutorial to hide the bar ( http://android.serverbox.ch/?p=306 )
My methods look like this:
private void hideStatusBar() throws IOException, InterruptedException {
Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 79 s16 com.android.systemui"});
proc.waitFor();
}
private void showStatusBar() throws IOException, InterruptedException {
Process proc = Runtime.getRuntime().exec(new String[]{"am","startservice","-n","com.android.systemui/.SystemUIService"});
proc.waitFor();
}
If I click on my buttons an the methods are called I can see that something is happening because the app is waiting some seconds. I also looked into LogCat and see that something is happening.
show: http://pastebin.com/CidTRSTi hide:
I guess the problem with hide is in line 57
So I tried an app in the market: TabBar Hider Demo ( https://market.android.com/details?id=com.tlalexander.tabletbarhiderdemo&feature=more_from_developer#?t=W251bGwsMSwxLDEwMiwiY29tLnRsYWxleGFuZGVyLnRhYmxldGJhcmhpZGVyZGVtbyJd )
But here the same. The bar won't remove/hide. I also looked into LogCat
show: http://pastebin.com/TuKXQ5qm
hide: http://pastebin.com/rWHFQV4u
Same problem in line 51 (hide)
Any hints?
Thx B770
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在未root的平板电脑上,这是可以预料的。
在 root 后的平板电脑上,它似乎找不到 su 二进制文件。打开一个 shell(例如,从您的 PC/Mac,输入“adb shell”或使用市场上的终端应用程序),然后看看输入 su 会发生什么。在未取得 root 权限的设备上,您应该收到一条错误消息,指出未找到 su,而在取得 root 权限的设备上,则不会出现这样的错误。如果您确实收到此错误,则说明您的 root ROM 不包含 su。转到 xda 论坛并找到不同的 rom 或如何添加 su
on the non rooted tablet, this is to be expected.
on the rooted tablet, it soulds like it can't find the su binary. open a shell (eg, from your pc/mac, type 'adb shell' or use a terminal app from the market), and see what happens if you type su. on a non rooted device you should get an error saying su not found whereas on the rooted device you shouldn't. if you do get this error, then your rooted rom is not including su. goto xda forums and find either a different rom or how to add su