Android Open Source - nfcunlocker Unlock Method






From Project

Back to project page nfcunlocker.

License

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.

Java Source Code

package com.steelrat.nfcunlocker.unlockmethods;
//from www  .j  a  va2  s. c om
import android.app.Activity;

public abstract class UnlockMethod {
  private String mPassword;
  private Activity mActivity;
  
  public UnlockMethod(Activity activity) {
    mActivity = activity;
  }
  
  public void unlock(String password) {
    mPassword = password;
  }
  
  /**
   * Called on unlock method activation.
   * @return boolean Activation result (success or fail).
   */
  public boolean onActivate() {
    return true;
  }
  
  /**
   * Called on unlock method deactivation.
   */
  public void onDeactivate() {
    
  }
  
  /**
   * Called by activity on some event methods.
   * 
   * @param event Activity event's method, e.g. onCreate, onDestroy...
   * @return true, if activity must be finished and false otherwise.
   */
  public void onActivityEvent(String event) {}

  protected String getPassword() {
    return mPassword;
  }

  protected void setPassword(String password) {
    mPassword = password;
  }

  protected Activity getActivity() {
    return mActivity;
  }

  protected void setActivity(Activity activity) {
    mActivity = activity;
  }
}




Java Source Code List

com.steelrat.nfcunlocker.AddActivity.java
com.steelrat.nfcunlocker.DiscoveredActivity.java
com.steelrat.nfcunlocker.MainActivity.java
com.steelrat.nfcunlocker.NFCApplication.java
com.steelrat.nfcunlocker.helpers.AppDeviceAdminReceiver.java
com.steelrat.nfcunlocker.helpers.TagsStorage.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivityBase.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivityOA.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivity.java
com.steelrat.nfcunlocker.unlockmethods.DevicePolicyUnlockMethod.java
com.steelrat.nfcunlocker.unlockmethods.FlagUnlock.java
com.steelrat.nfcunlocker.unlockmethods.InputUnlock.java
com.steelrat.nfcunlocker.unlockmethods.KeyguardUnlock.java
com.steelrat.nfcunlocker.unlockmethods.UnlockMethodFactory.java
com.steelrat.nfcunlocker.unlockmethods.UnlockMethod.java