public boolean compareLocalVersionToServer(BuildPropParser parser){
  if (parser == null) {
    Log.d(TAG,"compareLocalVersion Without fetch remote prop list.");
    return false;
  }
  Long buildTime=Long.parseLong(SystemProperties.get(BUILD_DATE_UTC_PROPERTY));
  String buildTimeUTC=parser.getProp(BUILD_DATE_UTC_PROPERTY);
  Long remoteBuildUTC;
  if ((buildTimeUTC != null) && (!(buildTimeUTC.equals("null")))) {
    remoteBuildUTC=Long.parseLong(buildTimeUTC);
  }
 else {
    remoteBuildUTC=Long.MIN_VALUE;
    Log.e(TAG,"UTC date not found in config file, config may be corrupted or missing");
  }
  Log.d(TAG,"Local Version:" + Build.VERSION.INCREMENTAL + " Server Version:"+ parser.getNumRelease());
  boolean upgrade=remoteBuildUTC > buildTime;
  Log.d(TAG,"Remote build time : " + remoteBuildUTC + " Local build time : "+ buildTime);
  return upgrade;
}

public boolean compareLocalVersionToServer ( BuildPropParser parser ) { if ( parser == null ) { Log . d ( TAG , "compareLocalVersion Without fetch remote prop list." ) ; return false ; } Long buildTime = Long . parseLong ( SystemProperties . get ( BUILD_DATE_UTC_PROPERTY ) ) ; String buildTimeUTC = parser . getProp ( BUILD_DATE_UTC_PROPERTY ) ; Long remoteBuildUTC ; if ( ( buildTimeUTC != null ) && ( ! ( buildTimeUTC . equals ( "null" ) ) ) ) { remoteBuildUTC = Long . parseLong ( buildTimeUTC ) ; } else { remoteBuildUTC = Long . MIN_VALUE ; Log . e ( TAG , "UTC date not found in config file, config may be corrupted or missing" ) ; } Log . d ( TAG , "Local Version:" + Build . VERSION . INCREMENTAL + " Server Version:" + parser . getNumRelease ( ) ) ; boolean upgrade = remoteBuildUTC > buildTime ; Log . d ( TAG , "Remote build time : " + remoteBuildUTC + " Local build time : " + buildTime ) ; return upgrade ; }
compares device firmware version with the latest upgrade file from the server .
