Java Code Examples for com.google.android.vending.expansion.downloader.Constants#RETRY_FIRST_DELAY

The following examples show how to use com.google.android.vending.expansion.downloader.Constants#RETRY_FIRST_DELAY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DownloadInfo.java    From QtAndroidTools with MIT License 5 votes vote down vote up
/**
 * Returns the time when a download should be restarted.
 */
public long restartTime(long now) {
    if (mNumFailed == 0) {
        return now;
    }
    if (mRetryAfter > 0) {
        return mLastMod + mRetryAfter;
    }
    return mLastMod +
            Constants.RETRY_FIRST_DELAY *
            (1000 + mFuzz) * (1 << (mNumFailed - 1));
}
 
Example 2
Source File: DownloadInfo.java    From play-apk-expansion with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the time when a download should be restarted.
 */
public long restartTime(long now) {
    if (mNumFailed == 0) {
        return now;
    }
    if (mRetryAfter > 0) {
        return mLastMod + mRetryAfter;
    }
    return mLastMod +
            Constants.RETRY_FIRST_DELAY *
            (1000 + mFuzz) * (1 << (mNumFailed - 1));
}
 
Example 3
Source File: DownloadInfo.java    From travelguide with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the time when a download should be restarted.
 */
public long restartTime(long now) {
    if (mNumFailed == 0) {
        return now;
    }
    if (mRetryAfter > 0) {
        return mLastMod + mRetryAfter;
    }
    return mLastMod +
            Constants.RETRY_FIRST_DELAY *
            (1000 + mFuzz) * (1 << (mNumFailed - 1));
}
 
Example 4
Source File: DownloadInfo.java    From Alite with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns the time when a download should be restarted.
 */
public long restartTime(long now) {
    if (mNumFailed == 0) {
        return now;
    }
    if (mRetryAfter > 0) {
        return mLastMod + mRetryAfter;
    }
    return mLastMod +
            Constants.RETRY_FIRST_DELAY *
            (1000 + mFuzz) * (1 << (mNumFailed - 1));
}
 
Example 5
Source File: DownloadInfo.java    From UnityOBBDownloader with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the time when a download should be restarted.
 */
public long restartTime(long now) {
    if (mNumFailed == 0) {
        return now;
    }
    if (mRetryAfter > 0) {
        return mLastMod + mRetryAfter;
    }
    return mLastMod +
            Constants.RETRY_FIRST_DELAY *
            (1000 + mFuzz) * (1 << (mNumFailed - 1));
}