public abstract class

FontRequestEmojiCompatConfig.RetryPolicy

extends java.lang.Object

 java.lang.Object

↳androidx.emoji.text.FontRequestEmojiCompatConfig.RetryPolicy

Subclasses:

FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy

Overview

Retry policy used when the font provider is not ready to give the font file. To control the thread the retries are handled on, see FontRequestEmojiCompatConfig.setHandler(Handler).

Summary

Constructors
publicRetryPolicy()

Methods
public abstract longgetRetryDelay()

Called each time the metadata loading fails.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public RetryPolicy()

Methods

public abstract 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 EmojiCompat.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 milliseconds to wait until next retry