Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 阻止崩溃的服务自动重新启动_Android_Service_System - Fatal编程技术网

Android 阻止崩溃的服务自动重新启动

Android 阻止崩溃的服务自动重新启动,android,service,system,Android,Service,System,我在程序上终止了android systemui服务,它工作正常,并且随着导航栏和通知栏的消失而反映在屏幕上 然而,安卓系统似乎不喜欢这一点,并自动重启了这项服务 11-29 11:01:44.975: W/ActivityManager(678): Scheduling restart of crashed service com.android.systemui/.SystemUIService in 0ms 是否有办法拦截此重新启动请求,或者首先通过编程或修改android系统映像阻止a

我在程序上终止了android systemui服务,它工作正常,并且随着导航栏和通知栏的消失而反映在屏幕上

然而,安卓系统似乎不喜欢这一点,并自动重启了这项服务

11-29 11:01:44.975: W/ActivityManager(678): Scheduling restart of crashed service com.android.systemui/.SystemUIService in 0ms

是否有办法拦截此重新启动请求,或者首先通过编程或修改android系统映像阻止android系统安排服务?

如果您只需隐藏通知栏,则可以通过adb执行:

要隐藏:

service call activity 42 s16 com.android.systemui
显示:

am startservice -n com.android.systemui /.SystemUIService

这是很久以前的事了,但我使用的安卓版本在本地隐藏方面表现不佳。最后我使用了“pm disable com.android.systemui”和“pm enable com.android.systemui”。