éè¿intentï¼ç¶åä¼ éèªå·±çåºç¨IDï¼è¿æ ·å°±å¯ä»¥è·³å°èªå·±çåºç¨è®¾ç½®é¡µï¼å¦å就跳å°éæºä¸ä¸ªè®¾ç½®é¡µ
ãã代ç å
¶å®å¾ç®åï¼å¤§å®¶ç»å¯¹è½çæï¼ä¸è¯´äº
PackageManager pm = context.getPackageManager();
ããPackageInfo info = null;
ããtry {
ããinfo = pm.getPackageInfo(context.getPackageName(), 0);
ãã} catch (NameNotFoundException e) {
ããe.printStackTrace();
ãã}
ããIntent i = new Intent("miui.intent.action.APP_PERM_EDITOR");
ããi.setClassName("com.android.settings", "com.miui.securitycenter.permission.AppPermissionsEditor");
ããi.putExtra("extra_package_uid", info.applicationInfo.uid);
ããtry {
ããcontext.startActivity(i);
ãã} catch (Exception e) {
ããToast.makeText(this.getContext(), "åªæMIUIæå¯ä»¥è®¾ç½®å¦", Toast.LENGTH_SHORT).show();
ãã}
追é®è¿ä¸ªåªæå°ç±³è½è¡ï¼è¯·é®ä¸ä¸å
¶ä»ççåææºå¢è¯¥æä¹å®ç°ï¼