package com.mbridge.msdk.foundation.tools; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import java.util.concurrent.atomic.AtomicInteger; /* loaded from: classes4.dex */ public final class at { private static final AtomicInteger a = new AtomicInteger(1); public static void a(View view) { if (view != null) { ViewParent parent = view.getParent(); if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView(view); } } } public static int a() { AtomicInteger atomicInteger; int i; int i2; do { atomicInteger = a; i = atomicInteger.get(); i2 = i + 1; if (i2 > 16777215) { i2 = 1; } } while (!atomicInteger.compareAndSet(i, i2)); return i; } }