Move developer options related class to development package

Bug: 34203528
Test: none, purely moving classes around
Change-Id: I3cd1d257f948729fda5c04632e7ce9114c40bd0c
This commit is contained in:
Fan Zhang
2017-03-17 16:19:26 -07:00
parent 2907f86971
commit 11d2d68e23
16 changed files with 92 additions and 163 deletions

View File

@@ -750,30 +750,6 @@ public final class Utils extends com.android.settingslib.Utils {
|| um.getUserProfiles().contains(otherUser);
}
/**
* 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) {
try {
PersistentDataBlockManager manager = (PersistentDataBlockManager)
context.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
manager.setOemUnlockEnabled(enabled);
} catch (SecurityException e) {
Log.e(TAG, "Fail to set oem unlock.", e);
}
}
/**
* Return whether or not the user should have a SIM Cards option in Settings.
* TODO: Change back to returning true if count is greater than one after testing.