[Android]如何在app中禁用/启用别的app?
final PackageManager pm = mContext.getPackageManager();
if (PackageManager.COMPONENT_ENABLED_STATE_DISABLED !=
pm.getApplicationEnabledSetting(app)) {
pm.setApplicationEnabledSetting(app,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
} else {
pm.setApplicationEnabledSetting(app,
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
}