Network Reset should have a lockdown like Factory Reset.

bug:20332322
Change-Id: I645ad0d226869042c11225630e4de5968ebb7a0d
This commit is contained in:
Stuart Scott
2015-04-20 11:05:43 -07:00
parent cd2eb2e6c3
commit 176f512c5a
6 changed files with 61 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Environment;
import android.os.SystemProperties;
import android.os.Process;
import android.os.UserManager;
import android.preference.Preference;
import android.preference.PreferenceActivity;
@@ -191,6 +192,12 @@ public class ResetNetwork extends InstrumentedFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (!Process.myUserHandle().isOwner()
|| UserManager.get(getActivity()).hasUserRestriction(
UserManager.DISALLOW_NETWORK_RESET)) {
return inflater.inflate(R.layout.network_reset_disallowed_screen, null);
}
mContentView = inflater.inflate(R.layout.reset_network, null);
establishInitialState();