Back to project page nfcunlocker.
The source code is released under:
Apache License
If you think the Android project nfcunlocker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.steelrat.nfcunlocker.unlockmethods; //from ww w .j a v a 2s. c om import android.app.Activity; public class UnlockMethodFactory { public static UnlockMethod getUnlockMethod(Activity activity, String methodName) { UnlockMethod unlockMethod = null; if (methodName.equals("FlagUnlock")) { unlockMethod = new FlagUnlock(activity); } else if (methodName.equals("InputUnlock")) { unlockMethod = new InputUnlock(activity); } else if (methodName.equals("KeyguardUnlock")) { unlockMethod = new KeyguardUnlock(activity); } return unlockMethod; } public static String getUnlockMethodName(UnlockMethod unlockMethod) { String name = null; if (unlockMethod != null) { name = unlockMethod.getClass().getSimpleName(); } return name; } }