mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
19 lines
528 B
Java
19 lines
528 B
Java
|
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;
|
||
|
}
|
||
|
}
|