android - Can't kill SystemUI with activityManager.killBackgroundProcesses -


first question here , pretty knew android development excuse me. part of app add button can restart systemui, doing following code.

        @override         public void onclick(view v) {             activitymanager activitymanager = (activitymanager)getapplicationcontext().getsystemservice(context.activity_service);             activitymanager.killbackgroundprocesses("com.android.systemui");         } 

i have gave application su permission following code

public process p;  {     try {         p = runtime.getruntime().exec("su");     } catch (ioexception e) {         e.printstacktrace();     } } 

many in advance.

you should have permission kill_background_processes able call method.

su doesn't play role here, because using android's framework operation. if use busybox kill process, need su.

generally, not idea kill systemui, though.


Comments

Post a Comment

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -