private boolean allowUploadCrashDump(){
  if (isCellularExperimentEnabled())   return isUsageAndCrashReportingEnabled();
  if (isMobileNetworkCapable()) {
    String option=mSharedPreferences.getString(PREF_CRASH_DUMP_UPLOAD,mCrashDumpNeverUpload);
    return option.equals(mCrashDumpAlwaysUpload) || (option.equals(mCrashDumpWifiOnlyUpload) && isWiFiOrEthernetNetwork());
  }
  return mSharedPreferences.getBoolean(PREF_CRASH_DUMP_UPLOAD_NO_CELLULAR,false);
}

private boolean allowUploadCrashDump ( ) { if ( isCellularExperimentEnabled ( ) ) return isUsageAndCrashReportingEnabled ( ) ; if ( isMobileNetworkCapable ( ) ) { String option = mSharedPreferences . getString ( PREF_CRASH_DUMP_UPLOAD , mCrashDumpNeverUpload ) ; return option . equals ( mCrashDumpAlwaysUpload ) || ( option . equals ( mCrashDumpWifiOnlyUpload ) && isWiFiOrEthernetNetwork ( ) ) ; } return mSharedPreferences . getBoolean ( PREF_CRASH_DUMP_UPLOAD_NO_CELLULAR , false ) ; }
check whether to allow uploading usage and crash reporting . the option should be either " always upload " , or " wifi only " with current connection being wifi / ethernet for the three - choice pref or on for the new two - choice pref .
