CodePudding user response:
You need to use the system signature https://blog.csdn.net/xk7298/article/details/93332419
PackageManager p=getPackageManager ();
P. etApplicationEnabledSetting (" packages ", PackageManager.COM PONENT_ENABLED_STATE_DISABLED, PackageManager DONT_KILL_APP);
CodePudding user response:
PackageManager p=getPackageManager ();
P. etApplicationEnabledSetting (" packages ", PackageManager.COM PONENT_ENABLED_STATE_DISABLED, PackageManager DONT_KILL_APP);
& lt; USES - the permission of the android: name="android. Permission. CHANGE_COMPONENT_ENABLED_STATE"/& gt;
The permissions only open to the system, so you need to use the system signature at https://blog.csdn.net/xk7298/article/details/93332419