Home | History | Annotate | Download | only in anomaly
      1 package com.android.settings.fuelgauge.anomaly;
      2 
      3 import android.content.Context;
      4 import android.support.v7.preference.Preference;
      5 
      6 import com.android.settings.R;
      7 
      8 /**
      9  * Preference that stores {@link Anomaly}
     10  */
     11 public class AnomalyPreference extends Preference {
     12     private Anomaly mAnomaly;
     13 
     14     public AnomalyPreference(Context context, Anomaly anomaly) {
     15         super(context);
     16         mAnomaly = anomaly;
     17 
     18         if (anomaly != null) {
     19             setTitle(anomaly.displayName);
     20         }
     21     }
     22 
     23     public Anomaly getAnomaly() {
     24         return mAnomaly;
     25     }
     26 
     27 }
     28