belongs to Maven artifact com.android.support:support-emoji:28.0.0-alpha1
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
public
static
class
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
extends FontRequestEmojiCompatConfig.RetryPolicy
java.lang.Object | ||
↳ | android.support.text.emoji.FontRequestEmojiCompatConfig.RetryPolicy | |
↳ | android.support.text.emoji.FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy |
A retry policy implementation that doubles the amount of time in between retries.
If downloading hasn't finish within given amount of time, this policy give up and the
EmojiCompat will get into LOAD_STATE_FAILED
state.
Summary
Public constructors | |
---|---|
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy(long totalMs)
|
Public methods | |
---|---|
long
|
getRetryDelay()
Called each time the metadata loading fails. |
Inherited methods | |
---|---|
![]()
android.support.text.emoji.FontRequestEmojiCompatConfig.RetryPolicy
| |
![]()
java.lang.Object
|
Public constructors
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy (long totalMs)
Parameters | |
---|---|
totalMs |
long : A total amount of time to wait in milliseconds.
|
Public methods
getRetryDelay
long getRetryDelay ()
Called each time the metadata loading fails.
This is primarily due to a pending download of the font.
If a value larger than zero is returned, metadata loader will retry after the given
milliseconds.
If zero
is returned, metadata loader will retry immediately.
If a value less than 0 is returned, the metadata loader will stop retrying and
EmojiCompat will get into LOAD_STATE_FAILED
state.
Note that the retry may happen earlier than you specified if the font provider notifies that the download is completed.
Returns | |
---|---|
long |
long milliseconds to wait until next retry |
Interfaces
Classes
- EmojiCompat
- EmojiCompat.Config
- EmojiCompat.InitCallback
- EmojiCompat.MetadataRepoLoaderCallback
- EmojiSpan
- FontRequestEmojiCompatConfig
- FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
- FontRequestEmojiCompatConfig.RetryPolicy
- MetadataRepo
- R
- R.attr
- R.bool
- R.color
- R.dimen
- R.drawable
- R.id
- R.integer
- R.layout
- R.string
- R.style
- R.styleable