开发遇到需要恢复出厂设置,在MSTAR方案上面可以直接使用一下代码恢复出厂设置,手机上面没有测试过
//恢复出厂设置
public static final String INTENT_ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR";
Intent intent = new Intent(BuildConfig.INTENT_ACTION_MASTER_CLEAR);
intent.putExtra("from", "restorefactory");
sendBroadcast(intent);