Commit 8c6dfaa1 authored by Torsten Grote's avatar Torsten Grote

[android] Use @UiThread instead of @MainThread

parent 3cfb04b6
Pipeline #2888 passed with stage
in 10 minutes and 47 seconds
......@@ -14,9 +14,9 @@ import android.os.PowerManager;
import android.support.annotation.AttrRes;
import android.support.annotation.ColorInt;
import android.support.annotation.ColorRes;
import android.support.annotation.MainThread;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.annotation.UiThread;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
......@@ -342,7 +342,7 @@ public class UiUtils {
* If the LiveData's value is available, the {@link Observer} will be
* called right away.
*/
@MainThread
@UiThread
public static <T> void observeOnce(LiveData<T> liveData,
LifecycleOwner owner, Observer<T> observer) {
liveData.observe(owner, new Observer<T>() {
......@@ -360,7 +360,7 @@ public class UiUtils {
*
* Warning: Do NOT call from objects that have a lifecycle.
*/
@MainThread
@UiThread
public static <T> void observeForeverOnce(LiveData<T> liveData,
Observer<T> observer) {
liveData.observeForever(new Observer<T>() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment