package com.google.android.gms.internal.ads; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.Iterator; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes3.dex */ final class zzbje implements zzbjp { @Override // com.google.android.gms.internal.ads.zzbjp public final /* bridge */ /* synthetic */ void zza(Object obj, Map map) { zzcex zzcexVar = (zzcex) obj; try { JSONObject jSONObject = new JSONObject((String) map.get("args")); Iterator keys = jSONObject.keys(); SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(zzcexVar.getContext()).edit(); while (keys.hasNext()) { String next = keys.next(); Object obj2 = jSONObject.get(next); if (obj2 instanceof Integer) { edit.putInt(next, ((Integer) obj2).intValue()); } else if (obj2 instanceof Long) { edit.putLong(next, ((Long) obj2).longValue()); } else if (obj2 instanceof Double) { edit.putFloat(next, ((Double) obj2).floatValue()); } else if (obj2 instanceof Float) { edit.putFloat(next, ((Float) obj2).floatValue()); } else if (obj2 instanceof Boolean) { edit.putBoolean(next, ((Boolean) obj2).booleanValue()); } else if (obj2 instanceof String) { edit.putString(next, (String) obj2); } } edit.apply(); } catch (JSONException e) { com.google.android.gms.ads.internal.zzv.zzp().zzw(e, "GMSG write local storage KV pairs handler"); } } }