解决方法
适用于xiaomi,oppo,vivo和oneplus手机.
try { Intent intent = new Intent(); String manufacturer = android.os.Build.MANUFACTURER; if ("xiaomi".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.miui.securitycenter","com.miui.permcenter.autostart.AutoStartManagementActivity")); } else if ("oppo".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.coloros.safecenter","com.coloros.safecenter.permission.startup.StartupAppListActivity")); } else if ("vivo".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.vivo.permissionmanager","com.vivo.permissionmanager.activity.BgStartUpManagerActivity")); } else if("oneplus".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.oneplus.security","com.oneplus.security.chainlaunch.view.ChainLaunchAppListActivity")); } List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(intent,PackageManager.MATCH_DEFAULT_ONLY); if (list.size() > 0) { context.startActivity(intent); } } catch (Exception e) { Crashlytics.logException(e); }