Enable OEM unlock checkbox in Developer Settings
For Volantis+ devices, we will give users the ability to enable OEM unlock through Developer Settings. To do so, we must write the value to the last byte of a special partition that does not get erased even after factory reset. This feature will only be available on devices with the persistent data partition, thus the checkbox is only visible for devices that meet this requirement. This depends on https://googleplex-android-review.git.corp.google.com/#/c/495350/ DD: go/factory-reset Bug: 14288780 Change-Id: I8f80b950bc101a1067912faf221391bf0dd826b7
This commit is contained in:
@@ -68,6 +68,7 @@
|
|||||||
<uses-permission android:name="android.permission.REBOOT" />
|
<uses-permission android:name="android.permission.REBOOT" />
|
||||||
<uses-permission android:name="android.permission.MANAGE_DEVICE_ADMINS" />
|
<uses-permission android:name="android.permission.MANAGE_DEVICE_ADMINS" />
|
||||||
<uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />
|
<uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />
|
||||||
|
<uses-permission android:name="android.permission.OEM_UNLOCK_STATE" />
|
||||||
|
|
||||||
<application android:label="@string/settings_label"
|
<application android:label="@string/settings_label"
|
||||||
android:icon="@mipmap/ic_launcher_settings"
|
android:icon="@mipmap/ic_launcher_settings"
|
||||||
|
@@ -3174,6 +3174,10 @@
|
|||||||
<string name="bt_hci_snoop_log">Enable Bluetooth HCI snoop log</string>
|
<string name="bt_hci_snoop_log">Enable Bluetooth HCI snoop log</string>
|
||||||
<!-- setting Checkbox summary whether to capture all bluetooth HCI packets in a file -->
|
<!-- setting Checkbox summary whether to capture all bluetooth HCI packets in a file -->
|
||||||
<string name="bt_hci_snoop_log_summary">Capture all bluetooth HCI packets in a file</string>
|
<string name="bt_hci_snoop_log_summary">Capture all bluetooth HCI packets in a file</string>
|
||||||
|
<!-- setting Checkbox title whether to enable OEM unlock [CHAR_LIMIT=25] -->
|
||||||
|
<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>
|
||||||
|
|
||||||
<!-- Setting Checkbox title whether to show options for wireless display certification -->
|
<!-- Setting Checkbox title whether to show options for wireless display certification -->
|
||||||
<string name="wifi_display_certification">Wireless display certification</string>
|
<string name="wifi_display_certification">Wireless display certification</string>
|
||||||
|
@@ -49,6 +49,11 @@
|
|||||||
android:title="@string/bt_hci_snoop_log"
|
android:title="@string/bt_hci_snoop_log"
|
||||||
android:summary="@string/bt_hci_snoop_log_summary"/>
|
android:summary="@string/bt_hci_snoop_log_summary"/>
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="oem_unlock_enable"
|
||||||
|
android:title="@string/oem_unlock_enable"
|
||||||
|
android:summary="@string/oem_unlock_enable_summary"/>
|
||||||
|
|
||||||
<PreferenceScreen android:key="proc_stats"
|
<PreferenceScreen android:key="proc_stats"
|
||||||
android:title="@string/process_stats_summary_title"
|
android:title="@string/process_stats_summary_title"
|
||||||
android:summary="@string/process_stats_summary"
|
android:summary="@string/process_stats_summary"
|
||||||
|
@@ -26,7 +26,6 @@ import android.bluetooth.BluetoothAdapter;
|
|||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
@@ -40,7 +39,6 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.PowerManager;
|
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
import android.os.StrictMode;
|
import android.os.StrictMode;
|
||||||
@@ -53,6 +51,7 @@ import android.preference.Preference;
|
|||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
import android.preference.PreferenceGroup;
|
import android.preference.PreferenceGroup;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.provider.SearchIndexableResource;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -64,11 +63,13 @@ import android.webkit.WebView;
|
|||||||
import android.widget.Switch;
|
import android.widget.Switch;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
|
import com.android.settings.search.Indexable;
|
||||||
import com.android.settings.widget.SwitchBar;
|
import com.android.settings.widget.SwitchBar;
|
||||||
import dalvik.system.VMRuntime;
|
import dalvik.system.VMRuntime;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class DevelopmentSettings extends SettingsPreferenceFragment
|
public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||||
implements DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
|
implements DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
|
||||||
OnPreferenceChangeListener, SwitchBar.OnSwitchChangeListener {
|
OnPreferenceChangeListener, SwitchBar.OnSwitchChangeListener, Indexable {
|
||||||
private static final String TAG = "DevelopmentSettings";
|
private static final String TAG = "DevelopmentSettings";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,6 +96,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
private static final String ENABLE_TERMINAL = "enable_terminal";
|
private static final String ENABLE_TERMINAL = "enable_terminal";
|
||||||
private static final String KEEP_SCREEN_ON = "keep_screen_on";
|
private static final String KEEP_SCREEN_ON = "keep_screen_on";
|
||||||
private static final String BT_HCI_SNOOP_LOG = "bt_hci_snoop_log";
|
private static final String BT_HCI_SNOOP_LOG = "bt_hci_snoop_log";
|
||||||
|
private static final String ENABLE_OEM_UNLOCK = "oem_unlock_enable";
|
||||||
private static final String ALLOW_MOCK_LOCATION = "allow_mock_location";
|
private static final String ALLOW_MOCK_LOCATION = "allow_mock_location";
|
||||||
private static final String HDCP_CHECKING_KEY = "hdcp_checking";
|
private static final String HDCP_CHECKING_KEY = "hdcp_checking";
|
||||||
private static final String HDCP_CHECKING_PROPERTY = "persist.sys.hdcp_checking";
|
private static final String HDCP_CHECKING_PROPERTY = "persist.sys.hdcp_checking";
|
||||||
@@ -160,6 +162,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
private static final int RESULT_DEBUG_APP = 1000;
|
private static final int RESULT_DEBUG_APP = 1000;
|
||||||
|
|
||||||
|
private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
|
||||||
|
|
||||||
private static String DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = "262144"; // 256K
|
private static String DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = "262144"; // 256K
|
||||||
|
|
||||||
private IWindowManager mWindowManager;
|
private IWindowManager mWindowManager;
|
||||||
@@ -180,9 +184,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
private CheckBoxPreference mBugreportInPower;
|
private CheckBoxPreference mBugreportInPower;
|
||||||
private CheckBoxPreference mKeepScreenOn;
|
private CheckBoxPreference mKeepScreenOn;
|
||||||
private CheckBoxPreference mBtHciSnoopLog;
|
private CheckBoxPreference mBtHciSnoopLog;
|
||||||
|
private CheckBoxPreference mEnableOemUnlock;
|
||||||
private CheckBoxPreference mAllowMockLocation;
|
private CheckBoxPreference mAllowMockLocation;
|
||||||
private PreferenceScreen mPassword;
|
|
||||||
|
|
||||||
|
private PreferenceScreen mPassword;
|
||||||
private String mDebugApp;
|
private String mDebugApp;
|
||||||
private Preference mDebugAppPref;
|
private Preference mDebugAppPref;
|
||||||
private CheckBoxPreference mWaitForDebugger;
|
private CheckBoxPreference mWaitForDebugger;
|
||||||
@@ -190,8 +195,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
private CheckBoxPreference mWifiDisplayCertification;
|
private CheckBoxPreference mWifiDisplayCertification;
|
||||||
private CheckBoxPreference mWifiVerboseLogging;
|
private CheckBoxPreference mWifiVerboseLogging;
|
||||||
private CheckBoxPreference mWifiAggressiveHandover;
|
private CheckBoxPreference mWifiAggressiveHandover;
|
||||||
private CheckBoxPreference mWifiAllowScansWithTraffic;
|
|
||||||
|
|
||||||
|
private CheckBoxPreference mWifiAllowScansWithTraffic;
|
||||||
private CheckBoxPreference mStrictMode;
|
private CheckBoxPreference mStrictMode;
|
||||||
private CheckBoxPreference mPointerLocation;
|
private CheckBoxPreference mPointerLocation;
|
||||||
private CheckBoxPreference mShowTouches;
|
private CheckBoxPreference mShowTouches;
|
||||||
@@ -213,11 +218,12 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
private ListPreference mAnimatorDurationScale;
|
private ListPreference mAnimatorDurationScale;
|
||||||
private ListPreference mOverlayDisplayDevices;
|
private ListPreference mOverlayDisplayDevices;
|
||||||
private ListPreference mOpenGLTraces;
|
private ListPreference mOpenGLTraces;
|
||||||
|
|
||||||
private ListPreference mSimulateColorSpace;
|
private ListPreference mSimulateColorSpace;
|
||||||
|
|
||||||
private CheckBoxPreference mUseNuplayer;
|
private CheckBoxPreference mUseNuplayer;
|
||||||
|
|
||||||
private CheckBoxPreference mImmediatelyDestroyActivities;
|
private CheckBoxPreference mImmediatelyDestroyActivities;
|
||||||
|
|
||||||
private ListPreference mAppProcessLimit;
|
private ListPreference mAppProcessLimit;
|
||||||
|
|
||||||
private CheckBoxPreference mShowAllANRs;
|
private CheckBoxPreference mShowAllANRs;
|
||||||
@@ -225,19 +231,18 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
private CheckBoxPreference mWebViewDataReductionProxy;
|
private CheckBoxPreference mWebViewDataReductionProxy;
|
||||||
|
|
||||||
private PreferenceScreen mProcessStats;
|
private PreferenceScreen mProcessStats;
|
||||||
|
|
||||||
private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>();
|
private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>();
|
||||||
|
|
||||||
private final ArrayList<CheckBoxPreference> mResetCbPrefs
|
private final ArrayList<CheckBoxPreference> mResetCbPrefs
|
||||||
= new ArrayList<CheckBoxPreference>();
|
= new ArrayList<CheckBoxPreference>();
|
||||||
|
|
||||||
private final HashSet<Preference> mDisabledPrefs = new HashSet<Preference>();
|
private final HashSet<Preference> mDisabledPrefs = new HashSet<Preference>();
|
||||||
|
|
||||||
// To track whether a confirmation dialog was clicked.
|
// To track whether a confirmation dialog was clicked.
|
||||||
private boolean mDialogClicked;
|
private boolean mDialogClicked;
|
||||||
private Dialog mEnableDialog;
|
private Dialog mEnableDialog;
|
||||||
private Dialog mAdbDialog;
|
private Dialog mAdbDialog;
|
||||||
private Dialog mAdbKeysDialog;
|
|
||||||
|
|
||||||
|
private Dialog mAdbKeysDialog;
|
||||||
private boolean mUnavailable;
|
private boolean mUnavailable;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -282,10 +287,15 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
mBugreportInPower = findAndInitCheckboxPref(BUGREPORT_IN_POWER_KEY);
|
mBugreportInPower = findAndInitCheckboxPref(BUGREPORT_IN_POWER_KEY);
|
||||||
mKeepScreenOn = findAndInitCheckboxPref(KEEP_SCREEN_ON);
|
mKeepScreenOn = findAndInitCheckboxPref(KEEP_SCREEN_ON);
|
||||||
mBtHciSnoopLog = findAndInitCheckboxPref(BT_HCI_SNOOP_LOG);
|
mBtHciSnoopLog = findAndInitCheckboxPref(BT_HCI_SNOOP_LOG);
|
||||||
|
mEnableOemUnlock = findAndInitCheckboxPref(ENABLE_OEM_UNLOCK);
|
||||||
|
if (!showEnableOemUnlockPreference()) {
|
||||||
|
removePreference(mEnableOemUnlock);
|
||||||
|
}
|
||||||
mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION);
|
mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION);
|
||||||
mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD);
|
mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD);
|
||||||
mAllPrefs.add(mPassword);
|
mAllPrefs.add(mPassword);
|
||||||
|
|
||||||
|
|
||||||
if (!android.os.Process.myUserHandle().equals(UserHandle.OWNER)) {
|
if (!android.os.Process.myUserHandle().equals(UserHandle.OWNER)) {
|
||||||
disableForUser(mEnableAdb);
|
disableForUser(mEnableAdb);
|
||||||
disableForUser(mClearAdbKeys);
|
disableForUser(mClearAdbKeys);
|
||||||
@@ -500,6 +510,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
|
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
|
||||||
updateCheckBox(mBtHciSnoopLog, Settings.Secure.getInt(cr,
|
updateCheckBox(mBtHciSnoopLog, Settings.Secure.getInt(cr,
|
||||||
Settings.Secure.BLUETOOTH_HCI_LOG, 0) != 0);
|
Settings.Secure.BLUETOOTH_HCI_LOG, 0) != 0);
|
||||||
|
updateCheckBox(mEnableOemUnlock, Utils.isOemUnlockEnabled(getActivity()));
|
||||||
updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr,
|
updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr,
|
||||||
Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
|
Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
|
||||||
updateHdcpValues();
|
updateHdcpValues();
|
||||||
@@ -674,6 +685,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE, 1) > 0;
|
Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE, 1) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean showEnableOemUnlockPreference() {
|
||||||
|
return !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("");
|
||||||
|
}
|
||||||
|
|
||||||
private void updateBugreportOptions() {
|
private void updateBugreportOptions() {
|
||||||
if ("user".equals(Build.TYPE)) {
|
if ("user".equals(Build.TYPE)) {
|
||||||
final ContentResolver resolver = getActivity().getContentResolver();
|
final ContentResolver resolver = getActivity().getContentResolver();
|
||||||
@@ -1317,9 +1332,11 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
Settings.Global.putInt(getActivity().getContentResolver(),
|
Settings.Global.putInt(getActivity().getContentResolver(),
|
||||||
Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
|
Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
|
||||||
mKeepScreenOn.isChecked() ?
|
mKeepScreenOn.isChecked() ?
|
||||||
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB) : 0);
|
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB) : 0);
|
||||||
} else if (preference == mBtHciSnoopLog) {
|
} else if (preference == mBtHciSnoopLog) {
|
||||||
writeBtHciSnoopLogOptions();
|
writeBtHciSnoopLogOptions();
|
||||||
|
} else if (preference == mEnableOemUnlock) {
|
||||||
|
Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked());
|
||||||
} else if (preference == mAllowMockLocation) {
|
} else if (preference == mAllowMockLocation) {
|
||||||
Settings.Secure.putInt(getActivity().getContentResolver(),
|
Settings.Secure.putInt(getActivity().getContentResolver(),
|
||||||
Settings.Secure.ALLOW_MOCK_LOCATION,
|
Settings.Secure.ALLOW_MOCK_LOCATION,
|
||||||
@@ -1535,4 +1552,27 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For Search.
|
||||||
|
*/
|
||||||
|
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
|
new BaseSearchIndexProvider() {
|
||||||
|
@Override
|
||||||
|
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||||
|
Context context, boolean enabled) {
|
||||||
|
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||||
|
sir.xmlResId = R.xml.development_prefs;
|
||||||
|
return Arrays.asList(sir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getNonIndexableKeys(Context context) {
|
||||||
|
final List<String> keys = new ArrayList<String>();
|
||||||
|
if (!showEnableOemUnlockPreference()) {
|
||||||
|
keys.add(ENABLE_OEM_UNLOCK);
|
||||||
|
}
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@@ -18,14 +18,12 @@ package com.android.settings;
|
|||||||
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.app.IActivityManager;
|
import android.app.IActivityManager;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
@@ -55,6 +53,7 @@ import android.provider.ContactsContract.Contacts;
|
|||||||
import android.provider.ContactsContract.Data;
|
import android.provider.ContactsContract.Data;
|
||||||
import android.provider.ContactsContract.Profile;
|
import android.provider.ContactsContract.Profile;
|
||||||
import android.provider.ContactsContract.RawContacts;
|
import android.provider.ContactsContract.RawContacts;
|
||||||
|
import android.service.persistentdata.PersistentDataBlockManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -62,8 +61,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TabWidget;
|
import android.widget.TabWidget;
|
||||||
|
|
||||||
import com.android.settings.R.string;
|
|
||||||
import com.android.settings.dashboard.DashboardCategory;
|
import com.android.settings.dashboard.DashboardCategory;
|
||||||
import com.android.settings.dashboard.DashboardTile;
|
import com.android.settings.dashboard.DashboardTile;
|
||||||
|
|
||||||
@@ -670,4 +667,23 @@ public final class Utils {
|
|||||||
.create();
|
.create();
|
||||||
return dlg;
|
return dlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not this device is able to be OEM unlocked.
|
||||||
|
*/
|
||||||
|
static boolean isOemUnlockEnabled(Context context) {
|
||||||
|
PersistentDataBlockManager manager =(PersistentDataBlockManager)
|
||||||
|
context.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
||||||
|
return manager.getOemUnlockEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows enabling or disabling OEM unlock on this device. OEM unlocked
|
||||||
|
* devices allow users to flash other OSes to them.
|
||||||
|
*/
|
||||||
|
static void setOemUnlockEnabled(Context context, boolean enabled) {
|
||||||
|
PersistentDataBlockManager manager =(PersistentDataBlockManager)
|
||||||
|
context.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
||||||
|
manager.setOemUnlockEnabled(enabled);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -245,7 +245,7 @@ public final class SearchIndexableResources {
|
|||||||
sResMap.put(DevelopmentSettings.class.getName(),
|
sResMap.put(DevelopmentSettings.class.getName(),
|
||||||
new SearchIndexableResource(
|
new SearchIndexableResource(
|
||||||
Ranking.getRankForClassName(DevelopmentSettings.class.getName()),
|
Ranking.getRankForClassName(DevelopmentSettings.class.getName()),
|
||||||
R.xml.development_prefs,
|
NO_DATA_RES_ID,
|
||||||
DevelopmentSettings.class.getName(),
|
DevelopmentSettings.class.getName(),
|
||||||
R.drawable.ic_settings_development));
|
R.drawable.ic_settings_development));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user