|
@@ -1,12 +1,11 @@
|
|
|
package com.xplora.xpsettings.Activity;
|
|
|
|
|
|
+import android.app.admin.DevicePolicyManager;
|
|
|
import android.content.ComponentName;
|
|
|
import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.PowerManager;
|
|
|
-import android.provider.ContactsContract;
|
|
|
-import android.provider.Settings;
|
|
|
import android.util.Log;
|
|
|
import android.view.WindowManager;
|
|
|
|
|
@@ -191,6 +190,11 @@ public class BaseActionActivity extends BaseActivity implements Listener.SelectF
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void restoreFactorySettings() {
|
|
|
+ DevicePolicyManager devicePolicyManager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
|
|
|
+ devicePolicyManager.wipeData(0);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void onSelectFragment(int type) {
|
|
|
if (type == 100) {
|
|
@@ -198,7 +202,7 @@ public class BaseActionActivity extends BaseActivity implements Listener.SelectF
|
|
|
} else if (type == 101) {
|
|
|
shutdown();
|
|
|
} else if (type == 102) {
|
|
|
-
|
|
|
+ restoreFactorySettings();
|
|
|
}
|
|
|
|
|
|
//状态栏不显示
|