ADD week 5
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.google.android.material.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
|
||||
/* loaded from: classes.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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user