Rabbit-R1/android (non root)/java/sources/com/google/android/material/internal/ContextUtils.java

19 lines
528 B
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package com.google.android.material.internal;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
/* loaded from: classes2.dex */
public class ContextUtils {
public static Activity getActivity(Context context) {
while (context instanceof ContextWrapper) {
if (context instanceof Activity) {
return (Activity) context;
}
context = ((ContextWrapper) context).getBaseContext();
}
return null;
}
}