mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 10:57:17 +01:00
49 lines
3 KiB
Java
49 lines
3 KiB
Java
package com.facebook.react.modules.reactdevtoolssettings;
|
|
|
|
import android.content.SharedPreferences;
|
|
import com.facebook.fbreact.specs.NativeReactDevToolsSettingsManagerSpec;
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
import com.facebook.react.module.annotations.ReactModule;
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@ReactModule(name = "ReactDevToolsSettingsManager")
|
|
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0001\u0018\u0000 \r2\u00020\u0001:\u0001\rB\u000f\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005J\u0010\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0016J\n\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lcom/facebook/react/modules/reactdevtoolssettings/ReactDevToolsSettingsManagerModule;", "Lcom/facebook/fbreact/specs/NativeReactDevToolsSettingsManagerSpec;", "reactContext", "Lcom/facebook/react/bridge/ReactApplicationContext;", "<init>", "(Lcom/facebook/react/bridge/ReactApplicationContext;)V", "sharedPreferences", "Landroid/content/SharedPreferences;", "setGlobalHookSettings", "", "settings", "", "getGlobalHookSettings", "Companion", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
|
/* loaded from: classes6.dex */
|
|
public final class ReactDevToolsSettingsManagerModule extends NativeReactDevToolsSettingsManagerSpec {
|
|
|
|
@NotNull
|
|
private static final String KEY_HOOK_SETTINGS = "HookSettings";
|
|
|
|
@NotNull
|
|
public static final String NAME = "ReactDevToolsSettingsManager";
|
|
|
|
@NotNull
|
|
private static final String SHARED_PREFERENCES_PREFIX = "ReactNative__DevToolsSettings";
|
|
|
|
@NotNull
|
|
private final SharedPreferences sharedPreferences;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public ReactDevToolsSettingsManagerModule(@NotNull ReactApplicationContext reactApplicationContext) {
|
|
super(reactApplicationContext);
|
|
reactApplicationContext.getClass();
|
|
SharedPreferences sharedPreferences = reactApplicationContext.getSharedPreferences(SHARED_PREFERENCES_PREFIX, 0);
|
|
sharedPreferences.getClass();
|
|
this.sharedPreferences = sharedPreferences;
|
|
}
|
|
|
|
@Override // com.facebook.fbreact.specs.NativeReactDevToolsSettingsManagerSpec
|
|
@Nullable
|
|
public String getGlobalHookSettings() {
|
|
return this.sharedPreferences.getString(KEY_HOOK_SETTINGS, null);
|
|
}
|
|
|
|
@Override // com.facebook.fbreact.specs.NativeReactDevToolsSettingsManagerSpec
|
|
public void setGlobalHookSettings(@NotNull String settings) {
|
|
settings.getClass();
|
|
this.sharedPreferences.edit().putString(KEY_HOOK_SETTINGS, settings).apply();
|
|
}
|
|
}
|