24 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| package androidx.lifecycle;
 | |
| 
 | |
| import kotlin.Deprecated;
 | |
| import kotlin.Metadata;
 | |
| import kotlin.Unit;
 | |
| import kotlin.jvm.functions.Function1;
 | |
| 
 | |
| /* compiled from: LiveData.kt */
 | |
| @Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u001a=\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0014\b\u0004\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u00020\b0\u0007H\u0087\b¨\u0006\t"}, d2 = {"observe", "Landroidx/lifecycle/Observer;", "T", "Landroidx/lifecycle/LiveData;", "owner", "Landroidx/lifecycle/LifecycleOwner;", "onChanged", "Lkotlin/Function1;", "", "lifecycle-livedata-core-ktx_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
 | |
| /* loaded from: classes.dex */
 | |
| public final class LiveDataKt {
 | |
|     @Deprecated(message = "This extension method is not required when using Kotlin 1.4. You should remove \"import androidx.lifecycle.observe\"")
 | |
|     public static final <T> Observer<T> observe(LiveData<T> liveData, LifecycleOwner lifecycleOwner, final Function1<? super T, Unit> function1) {
 | |
|         Observer<T> observer = new Observer() { // from class: androidx.lifecycle.LiveDataKt$observe$wrappedObserver$1
 | |
|             @Override // androidx.lifecycle.Observer
 | |
|             public final void onChanged(T t) {
 | |
|                 function1.invoke(t);
 | |
|             }
 | |
|         };
 | |
|         liveData.observe(lifecycleOwner, observer);
 | |
|         return observer;
 | |
|     }
 | |
| }
 |