导航菜单

页面标题

页面副标题

MX Player v1.97.8 - KeyValueProvider.java 源代码

正在查看: MX Player v1.97.8 应用的 KeyValueProvider.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mxtech.x.kv;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.vungle.ads.internal.protos.Sdk$SDKMetric;
import defpackage.b00;
import defpackage.dc5;
import defpackage.gz9;
import defpackage.so0;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import org.jetbrains.annotations.NotNull;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001:\u0002\u0004\u0005B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0006"}, d2 = {"Lcom/mxtech/x/kv/KeyValueProvider;", "Landroid/content/ContentProvider;", "<init>", "()V", "KeyValueGroup", "KeyValueMap", "kv_release"}, k = 1, mv = {1, 7, 1}, xi = Sdk$SDKMetric.b.AD_SHOW_TO_VALIDATION_DURATION_MS_VALUE)
public final class KeyValueProvider extends ContentProvider {

    @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u0000 \u00042\u00020\u0001:\u0001\u0005B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0006"}, d2 = {"Lcom/mxtech/x/kv/KeyValueProvider$KeyValueGroup;", "Landroid/os/Parcelable;", "<init>", "()V", "CREATOR", "a", "kv_release"}, k = 1, mv = {1, 7, 1}, xi = Sdk$SDKMetric.b.AD_SHOW_TO_VALIDATION_DURATION_MS_VALUE)
    public static final class KeyValueGroup implements Parcelable {

        @NotNull
        public static final Companion INSTANCE = new Companion();
        public String b;
        public int c;
        public int d;
        public boolean f;
        public float g;
        public long h;
        public String i;
        public Set<String> j;

        public static final class Companion implements Parcelable.Creator<KeyValueGroup> {
            @Override
            public final KeyValueGroup createFromParcel(Parcel parcel) {
                return new KeyValueGroup(parcel);
            }

            @Override
            public final KeyValueGroup[] newArray(int i) {
                return new KeyValueGroup[i];
            }
        }

        public KeyValueGroup() {
        }

        @Override
        public final int describeContents() {
            return 0;
        }

        @Override
        public final void writeToParcel(Parcel parcel, int i) {
            if (parcel == null) {
                return;
            }
            parcel.writeInt(this.c);
            parcel.writeString(this.b);
            int i2 = this.c;
            if (i2 == 1) {
                parcel.writeInt(this.d);
                return;
            }
            if (i2 == 2) {
                if (this.f) {
                    parcel.writeInt(1);
                    return;
                } else {
                    parcel.writeInt(0);
                    return;
                }
            }
            if (i2 == 4) {
                parcel.writeLong(this.h);
                return;
            }
            if (i2 == 3) {
                parcel.writeFloat(this.g);
                return;
            }
            if (i2 == 5) {
                parcel.writeString(this.i);
            } else if (i2 == 6) {
                Set<String> set = this.j;
                parcel.writeStringList(set != null ? CollectionsKt.d0(set) : null);
            }
        }

        public KeyValueGroup(@NotNull Parcel parcel) {
            this();
            this.c = parcel.readInt();
            this.b = parcel.readString();
            int i = this.c;
            if (i == 1) {
                this.d = parcel.readInt();
                return;
            }
            if (i == 2) {
                this.f = parcel.readInt() == 1;
                return;
            }
            if (i == 4) {
                this.h = parcel.readLong();
                return;
            }
            if (i == 3) {
                this.g = parcel.readFloat();
                return;
            }
            if (i == 5) {
                this.i = parcel.readString();
            } else if (i == 6) {
                ArrayList arrayList = new ArrayList();
                parcel.readStringList(arrayList);
                this.j = CollectionsKt.f0(arrayList);
            }
        }
    }

    @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u0000 \u00042\u00020\u0001:\u0001\u0005B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0006"}, d2 = {"Lcom/mxtech/x/kv/KeyValueProvider$KeyValueMap;", "Landroid/os/Parcelable;", "<init>", "()V", "CREATOR", "a", "kv_release"}, k = 1, mv = {1, 7, 1}, xi = Sdk$SDKMetric.b.AD_SHOW_TO_VALIDATION_DURATION_MS_VALUE)
    public static final class KeyValueMap implements Parcelable {

        @NotNull
        public static final Companion INSTANCE = new Companion();
        public Map<String, ? extends Object> b;

        public static final class Companion implements Parcelable.Creator<KeyValueMap> {
            @Override
            public final KeyValueMap createFromParcel(Parcel parcel) {
                Set<String> set;
                KeyValueMap keyValueMap = new KeyValueMap();
                LinkedHashMap linkedHashMap = new LinkedHashMap();
                keyValueMap.b = linkedHashMap;
                int readInt = parcel.readInt();
                if (readInt != 0 && 1 <= readInt) {
                    int i = 1;
                    while (true) {
                        KeyValueGroup keyValueGroup = new KeyValueGroup(parcel);
                        int i2 = keyValueGroup.c;
                        if (i2 == 1) {
                            linkedHashMap.put(keyValueGroup.b, Integer.valueOf(keyValueGroup.d));
                        } else if (i2 == 2) {
                            linkedHashMap.put(keyValueGroup.b, Boolean.valueOf(keyValueGroup.f));
                        } else if (i2 == 4) {
                            linkedHashMap.put(keyValueGroup.b, Long.valueOf(keyValueGroup.h));
                        } else if (i2 == 3) {
                            linkedHashMap.put(keyValueGroup.b, Float.valueOf(keyValueGroup.g));
                        } else if (i2 == 5) {
                            String str = keyValueGroup.i;
                            if (str != null) {
                                linkedHashMap.put(keyValueGroup.b, str);
                            }
                        } else if (i2 == 6 && (set = keyValueGroup.j) != null) {
                            linkedHashMap.put(keyValueGroup.b, set);
                        }
                        if (i == readInt) {
                            break;
                        }
                        i++;
                    }
                }
                return keyValueMap;
            }

            @Override
            public final KeyValueMap[] newArray(int i) {
                return new KeyValueMap[i];
            }
        }

        public KeyValueMap() {
        }

        @Override
        public final int describeContents() {
            return 0;
        }

        @Override
        public final void writeToParcel(Parcel parcel, int i) {
            if (parcel == null) {
                return;
            }
            Map<String, ? extends Object> map = this.b;
            parcel.writeInt((map == null ? null : map).size());
            for (Map.Entry<String, ? extends Object> entry : (map != null ? map : null).entrySet()) {
                KeyValueGroup keyValueGroup = new KeyValueGroup();
                keyValueGroup.b = entry.getKey();
                Object value = entry.getValue();
                if (value instanceof Integer) {
                    keyValueGroup.c = 1;
                    keyValueGroup.d = ((Integer) value).intValue();
                } else if (value instanceof Boolean) {
                    keyValueGroup.c = 2;
                    keyValueGroup.f = ((Boolean) value).booleanValue();
                } else if (value instanceof Long) {
                    keyValueGroup.c = 4;
                    keyValueGroup.h = ((Long) value).longValue();
                } else if (value instanceof Float) {
                    keyValueGroup.c = 3;
                    keyValueGroup.g = ((Float) value).floatValue();
                } else if (value instanceof String) {
                    keyValueGroup.c = 5;
                    keyValueGroup.i = (String) value;
                } else if (value instanceof Set) {
                    keyValueGroup.c = 6;
                    keyValueGroup.j = (Set) value;
                }
                keyValueGroup.writeToParcel(parcel, 0);
            }
        }

        public KeyValueMap(@NotNull Map<String, ?> map) {
            this();
            this.b = map;
        }
    }

    @Override
    public final Bundle call(@NotNull String str, String str2, Bundle bundle) {
        if (str.length() == 0) {
            return new Bundle();
        }
        if (bundle == null) {
            return new Bundle();
        }
        gz9 h = gz9.h(str);
        if (str2 != null) {
            switch (str2.hashCode()) {
                case -934610812:
                    if (str2.equals("remove")) {
                        String string = bundle.getString("__key__");
                        if (string == null) {
                            throw new RuntimeException("key shouldn't be null.");
                        }
                        h.m(string);
                        break;
                    }
                    break;
                case -567445985:
                    if (str2.equals("contains")) {
                        String string2 = bundle.getString("__key__");
                        if (string2 == null) {
                            throw new RuntimeException("key shouldn't be null.");
                        }
                        boolean c = h.c(string2);
                        Bundle bundle2 = new Bundle();
                        bundle2.putBoolean("contains", c);
                        return bundle2;
                    }
                    break;
                case 102230:
                    if (str2.equals("get")) {
                        String string3 = bundle.getString("__key__");
                        if (string3 == null) {
                            throw new RuntimeException("key shouldn't be null.");
                        }
                        int i = bundle.getInt("__type__", -1);
                        if (i == -1) {
                            throw new RuntimeException("type shouldn't be null.");
                        }
                        switch (i) {
                            case 1:
                                return b00.c(h.i(string3, bundle.getInt("__value__")), "__value__");
                            case 2:
                                boolean f = h.f(string3, bundle.getBoolean("__value__"));
                                Bundle bundle3 = new Bundle();
                                bundle3.putBoolean("__value__", f);
                                return bundle3;
                            case 3:
                                float g = h.g(string3, bundle.getFloat("__value__"));
                                Bundle bundle4 = new Bundle();
                                bundle4.putFloat("__value__", g);
                                return bundle4;
                            case 4:
                                long j = h.j(string3, bundle.getLong("__value__"));
                                Bundle bundle5 = new Bundle();
                                bundle5.putLong("__value__", j);
                                return bundle5;
                            case 5:
                                return uv5.a("__value__", h.k(string3));
                            case 6:
                                Set<String> l = h.l(string3);
                                Bundle bundle6 = new Bundle();
                                if (l != null) {
                                    bundle6.putStringArray("__value__", (String[]) l.toArray(new String[0]));
                                } else {
                                    bundle6.putStringArray("__value__", null);
                                }
                                return bundle6;
                            case 7:
                                KeyValueMap keyValueMap = new KeyValueMap(string3.equals("/|") ? h.d() : h.e(string3));
                                Bundle bundle7 = new Bundle();
                                bundle7.putParcelable("__value__", keyValueMap);
                                return bundle7;
                        }
                    }
                    break;
                case 113762:
                    if (str2.equals("set")) {
                        String string4 = bundle.getString("__key__");
                        if (string4 == null) {
                            throw new RuntimeException("key shouldn't be null.");
                        }
                        int i2 = bundle.getInt("__type__", -1);
                        if (i2 == -1) {
                            throw new RuntimeException("type shouldn't be null.");
                        }
                        switch (i2) {
                            case 1:
                                h.p(string4, bundle.getInt("__value__"));
                                break;
                            case 2:
                                h.n(string4, bundle.getBoolean("__value__"));
                                break;
                            case 3:
                                h.o(string4, bundle.getFloat("__value__"));
                                break;
                            case 4:
                                h.q(bundle.getLong("__value__"), string4);
                                break;
                            case 5:
                                h.r(string4, bundle.getString("__value__"));
                                break;
                            case 6:
                                String[] stringArray = bundle.getStringArray("__value__");
                                if (stringArray == null) {
                                    h.s(string4, dc5.b);
                                    break;
                                } else {
                                    h.s(string4, so0.A(stringArray));
                                    break;
                                }
                        }
                    }
                    break;
                case 94746189:
                    if (str2.equals("clear")) {
                        String string5 = bundle.getString("__key__");
                        if (string5 != null && string5.length() != 0) {
                            h.b(string5);
                            break;
                        } else {
                            h.a();
                            break;
                        }
                    }
                    break;
                case 97532676:
                    if (str2.equals("flush")) {
                        String string6 = bundle.getString("__prefix__");
                        KeyValueMap keyValueMap2 = (KeyValueMap) bundle.getParcelable("__value__");
                        if (string6 != null && string6.length() != 0) {
                            h.b(string6);
                            Map<String, ? extends Object> map = keyValueMap2.b;
                            for (Map.Entry<String, ? extends Object> entry : (map != null ? map : null).entrySet()) {
                                Object value = entry.getValue();
                                if (value != null) {
                                    String key = entry.getKey();
                                    if (value instanceof Integer) {
                                        h.p(rg2.d(string6, key), ((Number) value).intValue());
                                    } else if (value instanceof Long) {
                                        h.q(((Number) value).longValue(), rg2.d(string6, key));
                                    } else if (value instanceof Boolean) {
                                        h.n(rg2.d(string6, key), ((Boolean) value).booleanValue());
                                    } else if (value instanceof String) {
                                        h.r(rg2.d(string6, key), (String) value);
                                    } else if (value instanceof Set) {
                                        h.s(rg2.d(string6, key), (Set) value);
                                    } else if (value instanceof Float) {
                                        h.o(rg2.d(string6, key), ((Number) value).floatValue());
                                    }
                                }
                            }
                            break;
                        } else {
                            h.a();
                            Map<String, ? extends Object> map2 = keyValueMap2.b;
                            for (Map.Entry<String, ? extends Object> entry2 : (map2 != null ? map2 : null).entrySet()) {
                                Object value2 = entry2.getValue();
                                if (value2 != null) {
                                    String key2 = entry2.getKey();
                                    if (value2 instanceof Integer) {
                                        h.p(key2, ((Number) value2).intValue());
                                    } else if (value2 instanceof Long) {
                                        h.q(((Number) value2).longValue(), key2);
                                    } else if (value2 instanceof Boolean) {
                                        h.n(key2, ((Boolean) value2).booleanValue());
                                    } else if (value2 instanceof String) {
                                        h.r(key2, (String) value2);
                                    } else if (value2 instanceof Set) {
                                        h.s(key2, (Set) value2);
                                    } else if (value2 instanceof Float) {
                                        h.o(key2, ((Number) value2).floatValue());
                                    }
                                }
                            }
                            break;
                        }
                    }
                    break;
            }
        }
        return new Bundle();
    }

    @Override
    public final int delete(@NotNull Uri uri, String str, String[] strArr) {
        return 0;
    }

    @Override
    public final String getType(@NotNull Uri uri) {
        return null;
    }

    @Override
    public final Uri insert(@NotNull Uri uri, ContentValues contentValues) {
        return null;
    }

    @Override
    public final boolean onCreate() {
        synchronized (gz9.class) {
            gz9.b = true;
        }
        Context context = getContext();
        Context applicationContext = context != null ? context.getApplicationContext() : null;
        if (applicationContext == null) {
            applicationContext = getContext();
        }
        synchronized (gz9.class) {
            gz9.c = applicationContext;
        }
        return true;
    }

    @Override
    public final Cursor query(@NotNull Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
        return null;
    }

    @Override
    public final int update(@NotNull Uri uri, ContentValues contentValues, String str, String[] strArr) {
        return 0;
    }
}