Loading res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -3392,6 +3392,11 @@ <string name="oem_unlock_enable">Enable OEM unlock</string> <!-- setting Checkbox summary whether to enable OEM unlock [CHAR_LIMIT=50] --> <string name="oem_unlock_enable_summary">Allow the device to be OEM unlocked</string> <!-- Message to enter device PIN to enable OEM unlock --> <string name="oem_unlock_enable_pin_prompt">Enter your PIN</string> <!-- Explanation to enter device pin to enable OEM unlock --> <string name="oem_unlock_enable_pin_description">Enter your device PIN to enable OEM unlock</string> <!-- Setting Checkbox title whether to show options for wireless display certification --> <string name="wifi_display_certification">Wireless display certification</string> Loading src/com/android/settings/DevelopmentSettings.java +17 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.hardware.usb.IUsbManager; import android.net.wifi.WifiManager; import android.os.AsyncTask; Loading Loading @@ -162,6 +163,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst"; private static final int REQUEST_CODE_ENABLE_OEM_UNLOCK = 0; private static String DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = "262144"; // 256K private IWindowManager mWindowManager; Loading Loading @@ -1311,6 +1314,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment writeDebuggerOptions(); updateDebuggerOptions(); } } else if (requestCode == REQUEST_CODE_ENABLE_OEM_UNLOCK) { if (resultCode == Activity.RESULT_OK) { Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked()); } } else { super.onActivityResult(requestCode, resultCode, data); } Loading Loading @@ -1364,7 +1371,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } else if (preference == mBtHciSnoopLog) { writeBtHciSnoopLogOptions(); } else if (preference == mEnableOemUnlock) { if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) { Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked()); } } else if (preference == mAllowMockLocation) { Settings.Secure.putInt(getActivity().getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION, Loading Loading @@ -1426,6 +1435,13 @@ public class DevelopmentSettings extends SettingsPreferenceFragment return false; } private boolean showKeyguardConfirmation(Resources resources, int requestCode) { return new ChooseLockSettingsHelper(getActivity(), this) .launchConfirmationActivity(requestCode, resources.getString(R.string.oem_unlock_enable_pin_prompt), resources.getString(R.string.oem_unlock_enable_pin_description)); } @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (HDCP_CHECKING_KEY.equals(preference.getKey())) { Loading Loading
res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -3392,6 +3392,11 @@ <string name="oem_unlock_enable">Enable OEM unlock</string> <!-- setting Checkbox summary whether to enable OEM unlock [CHAR_LIMIT=50] --> <string name="oem_unlock_enable_summary">Allow the device to be OEM unlocked</string> <!-- Message to enter device PIN to enable OEM unlock --> <string name="oem_unlock_enable_pin_prompt">Enter your PIN</string> <!-- Explanation to enter device pin to enable OEM unlock --> <string name="oem_unlock_enable_pin_description">Enter your device PIN to enable OEM unlock</string> <!-- Setting Checkbox title whether to show options for wireless display certification --> <string name="wifi_display_certification">Wireless display certification</string> Loading
src/com/android/settings/DevelopmentSettings.java +17 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.hardware.usb.IUsbManager; import android.net.wifi.WifiManager; import android.os.AsyncTask; Loading Loading @@ -162,6 +163,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst"; private static final int REQUEST_CODE_ENABLE_OEM_UNLOCK = 0; private static String DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = "262144"; // 256K private IWindowManager mWindowManager; Loading Loading @@ -1311,6 +1314,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment writeDebuggerOptions(); updateDebuggerOptions(); } } else if (requestCode == REQUEST_CODE_ENABLE_OEM_UNLOCK) { if (resultCode == Activity.RESULT_OK) { Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked()); } } else { super.onActivityResult(requestCode, resultCode, data); } Loading Loading @@ -1364,7 +1371,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } else if (preference == mBtHciSnoopLog) { writeBtHciSnoopLogOptions(); } else if (preference == mEnableOemUnlock) { if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) { Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked()); } } else if (preference == mAllowMockLocation) { Settings.Secure.putInt(getActivity().getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION, Loading Loading @@ -1426,6 +1435,13 @@ public class DevelopmentSettings extends SettingsPreferenceFragment return false; } private boolean showKeyguardConfirmation(Resources resources, int requestCode) { return new ChooseLockSettingsHelper(getActivity(), this) .launchConfirmationActivity(requestCode, resources.getString(R.string.oem_unlock_enable_pin_prompt), resources.getString(R.string.oem_unlock_enable_pin_description)); } @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (HDCP_CHECKING_KEY.equals(preference.getKey())) { Loading