Ejemplo n.º 1
0
 /**
  * Returns the software configuration for the given API version.
  *
  * @param apiVersion The API version requested.
  * @return The Software instance for the requested API version or null if the API version is
  *     unsupported for this device.
  */
 public Software getSoftware(int apiVersion) {
   for (Software s : mSoftware) {
     if (apiVersion >= s.getMinSdkLevel() && apiVersion <= s.getMaxSdkLevel()) {
       return s;
     }
   }
   return null;
 }
  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (!(o instanceof Software)) {
      return false;
    }

    Software sw = (Software) o;
    return mMinSdkLevel == sw.getMinSdkLevel()
        && mMaxSdkLevel == sw.getMaxSdkLevel()
        && mLiveWallpaperSupport == sw.hasLiveWallpaperSupport()
        && mBluetoothProfiles.equals(sw.getBluetoothProfiles())
        && mGlVersion.equals(sw.getGlVersion())
        && mGlExtensions.equals(sw.getGlExtensions())
        && mStatusBar == sw.hasStatusBar();
  }