Android Open Source - android-child-lock Access Granted






From Project

Back to project page android-child-lock.

License

The source code is released under:

Apache License

If you think the Android project android-child-lock 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 model;
/*from  www  .  ja v  a  2  s .co m*/
public class AccessGranted {
  public static final long ACCESS_TIMEOUT = 1 * 60 * 60 * 1000; //1 hour
  public String packageName;
  public long tstamp;

  public AccessGranted(String packageName) {
    this.packageName = packageName;
    tstamp = System.currentTimeMillis();
  }

  @Override
  public int hashCode() {
    return packageName.hashCode();
  }

  @Override
  public boolean equals(Object o) {
    if (o instanceof AccessGranted) {
      return ((AccessGranted) o).packageName.equals(packageName);
    } else
      return false;
  }

  public boolean isExpired() {
    System.out.println(""+(System.currentTimeMillis() - tstamp));
    return (System.currentTimeMillis() - tstamp) > ACCESS_TIMEOUT;
  }

}




Java Source Code List

com.alimuzaffar.android.childlock.Constants.java
com.alimuzaffar.android.childlock.activities.LockScreenActivity.java
com.alimuzaffar.android.childlock.activities.ParentalControlActivity.java
com.alimuzaffar.android.childlock.adapters.EfficientAdapter.java
com.alimuzaffar.android.childlock.fragments.ListOfApplicationsFragment.java
com.alimuzaffar.android.childlock.fragments.ListOfLockedApplicationsFragment.java
com.alimuzaffar.android.childlock.fragments.SetPinDialogFragment.java
com.alimuzaffar.android.childlock.services.HeartBeat.java
com.alimuzaffar.android.childlock.utils.AppPrefs.java
com.alimuzaffar.android.childlock.utils.AppSettings.java
com.alimuzaffar.android.childlock.utils.Utils.java
model.AccessGranted.java