alexandroid/decompiled/jadx/sources/androidx/webkit/internal/ProfileStoreImpl.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

67 lines
2.8 KiB
Java

package androidx.webkit.internal;
import androidx.webkit.Profile;
import androidx.webkit.ProfileStore;
import java.lang.reflect.InvocationHandler;
import java.util.List;
import org.chromium.support_lib_boundary.ProfileBoundaryInterface;
import org.chromium.support_lib_boundary.ProfileStoreBoundaryInterface;
import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
public class ProfileStoreImpl implements ProfileStore {
private static ProfileStore sInstance;
private final ProfileStoreBoundaryInterface mProfileStoreImpl;
private ProfileStoreImpl() {
this.mProfileStoreImpl = null;
}
public static ProfileStore getInstance() {
if (sInstance == null) {
sInstance = new ProfileStoreImpl(WebViewGlueCommunicator.getFactory().getProfileStore());
}
return sInstance;
}
@Override // androidx.webkit.ProfileStore
public boolean deleteProfile(String str) throws IllegalStateException {
if (WebViewFeatureInternal.MULTI_PROFILE.isSupportedByWebView()) {
return this.mProfileStoreImpl.deleteProfile(str);
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
@Override // androidx.webkit.ProfileStore
public List<String> getAllProfileNames() {
if (WebViewFeatureInternal.MULTI_PROFILE.isSupportedByWebView()) {
return this.mProfileStoreImpl.getAllProfileNames();
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
@Override // androidx.webkit.ProfileStore
public Profile getOrCreateProfile(String str) {
if (WebViewFeatureInternal.MULTI_PROFILE.isSupportedByWebView()) {
return new ProfileImpl((ProfileBoundaryInterface) BoundaryInterfaceReflectionUtil.castToSuppLibClass(ProfileBoundaryInterface.class, this.mProfileStoreImpl.getOrCreateProfile(str)));
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
@Override // androidx.webkit.ProfileStore
public Profile getProfile(String str) {
if (!WebViewFeatureInternal.MULTI_PROFILE.isSupportedByWebView()) {
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
InvocationHandler profile = this.mProfileStoreImpl.getProfile(str);
if (profile != null) {
return new ProfileImpl((ProfileBoundaryInterface) BoundaryInterfaceReflectionUtil.castToSuppLibClass(ProfileBoundaryInterface.class, profile));
}
return null;
}
private ProfileStoreImpl(ProfileStoreBoundaryInterface profileStoreBoundaryInterface) {
this.mProfileStoreImpl = profileStoreBoundaryInterface;
}
}