Android Open Source - ProxSensorReset Calibration Procedure Data






From Project

Back to project page ProxSensorReset.

License

The source code is released under:

MIT License

If you think the Android project ProxSensorReset 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.abfactory.proxsensorreset.datamodel;
/* w  ww.ja va2  s.  c  om*/
import android.os.Parcel;
import android.os.Parcelable;

public class CalibrationProcedureData implements Parcelable {

  // Tag to pass the object via intent
  public static final String CALIBRATION_PROCEDURE_DATA = "CALIBRATION_PROCEDURE_DATA";

  // Calibration data
  private double hiddenSensorValue = 0;
  private double freeSensorValue = 0;

  /**
   * Constructors
   */
  
  public CalibrationProcedureData() {}
  
  public CalibrationProcedureData(Parcel in) {
      this.hiddenSensorValue = in.readDouble();
      this.freeSensorValue = in.readDouble();
  }
  
  /**
   * Parcelable methods
   */
  
  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeDouble(hiddenSensorValue);
    dest.writeDouble(freeSensorValue);
  }

  public void readFromParcel(Parcel in) {
    hiddenSensorValue = in.readDouble();
    freeSensorValue = in.readDouble();

  }
  
  @SuppressWarnings("rawtypes")
  public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
      public CalibrationProcedureData createFromParcel(Parcel in) {
          return new CalibrationProcedureData(in);
      }

      public CalibrationProcedureData[] newArray(int size) {
          return new CalibrationProcedureData[size];
      }
  };
  
  /**
   * Getter and setter for calibration data when proximity sensor is hidden
   */

  public double getHiddenSensorValue() {
    return hiddenSensorValue;
  }

  public void setHiddenSensorValue(double hiddenSensorValue) {
    this.hiddenSensorValue = hiddenSensorValue;
  }

  /**
   * Getter and setter for calibration data when proximity sensor is *NOT* hidden
   */

  public double getFreeSensorValue() {
    return freeSensorValue;
  }

  public void setFreeSensorValue(double freeSensorValue) {
    this.freeSensorValue = freeSensorValue;
  }

}




Java Source Code List

com.abfactory.proxsensorreset.CalibrationsHistoryActivity.java
com.abfactory.proxsensorreset.HistoryDAO.java
com.abfactory.proxsensorreset.History.java
com.abfactory.proxsensorreset.MoreInfoActivity.java
com.abfactory.proxsensorreset.PreferencesHandler.java
com.abfactory.proxsensorreset.ProxSensorReset.java
com.abfactory.proxsensorreset.ResetFlowPhaseOneActivity.java
com.abfactory.proxsensorreset.ResetFlowPhaseThreeActivity.java
com.abfactory.proxsensorreset.ResetFlowPhaseTwoActivity.java
com.abfactory.proxsensorreset.SettingsActivity.java
com.abfactory.proxsensorreset.SupportUsActivity.java
com.abfactory.proxsensorreset.datamodel.CalibrationProcedureData.java