Merge "Add a default implementation of UiTranslationStateCallback#onResumed." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d8ef2b30f4
@@ -52964,7 +52964,7 @@ package android.view.translation {
|
||||
public interface UiTranslationStateCallback {
|
||||
method public void onFinished();
|
||||
method public void onPaused();
|
||||
method public void onResumed(@NonNull android.icu.util.ULocale, @NonNull android.icu.util.ULocale);
|
||||
method public default void onResumed(@NonNull android.icu.util.ULocale, @NonNull android.icu.util.ULocale);
|
||||
method @Deprecated public void onStarted(@NonNull String, @NonNull String);
|
||||
method public default void onStarted(@NonNull android.icu.util.ULocale, @NonNull android.icu.util.ULocale);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,9 @@ public interface UiTranslationStateCallback {
|
||||
* The system is requesting that the application restore from the temporarily paused state and
|
||||
* show the content in translated language.
|
||||
*/
|
||||
void onResumed(@NonNull ULocale sourceLocale, @NonNull ULocale targetLocale);
|
||||
// TODO: Remove the default implementation when clients have implemented this.
|
||||
default void onResumed(@NonNull ULocale sourceLocale, @NonNull ULocale targetLocale) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The UI Translation session has ended.
|
||||
|
||||
Reference in New Issue
Block a user