I would like to explore exilit answer. From the source, we finally get into this:
mChooseLockSettingsHelper.utils().clearLock(false);
mChooseLockSettingsHelper.utils().setLockScreenDisabled(disabled);
The utils is the com.android.internal.widget.LockPatternUtils
object and we can somehow get it by reflection. Here is the code:
try{
Class lockPatternUtilsCls = Class.forName("com.android.internal.widget.LockPatternUtils");
Constructor lockPatternUtilsConstructor =