diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-05-06 23:07:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-05-06 23:07:12 +0000 |
commit | d8ef2b30f4123ad79466eac42b64d8c903877b51 (patch) | |
tree | 00272c5a39f98d2a6fdcc6e1f1d89e4242b06db1 | |
parent | 6a075b5e8550f7c8221e7201a11dbd62870dbdd8 (diff) | |
parent | ebc8d5154a98d9c84b5707aa543e7e07a579ceca (diff) |
Merge "Add a default implementation of UiTranslationStateCallback#onResumed." into sc-dev
-rw-r--r-- | core/api/current.txt | 2 | ||||
-rw-r--r-- | core/java/android/view/translation/UiTranslationStateCallback.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 6290d7324cba..de92fd1af6ff 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -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); } diff --git a/core/java/android/view/translation/UiTranslationStateCallback.java b/core/java/android/view/translation/UiTranslationStateCallback.java index 968cbdcbd69d..1bae0efb632e 100644 --- a/core/java/android/view/translation/UiTranslationStateCallback.java +++ b/core/java/android/view/translation/UiTranslationStateCallback.java @@ -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. |