package com.tencent.luggage.sdk.launching;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.text.TextUtils;
import com.tencent.luggage.g.d;
import com.tencent.matrix.trace.core.AppMethodBeat;

final class OnWXAppResultXPCWrapper$SafeParcelableWrapper implements Parcelable {
    public static final Creator<OnWXAppResultXPCWrapper$SafeParcelableWrapper> CREATOR = new 1();
    private Parcelable bRi;

    OnWXAppResultXPCWrapper$SafeParcelableWrapper(Parcelable parcelable) {
        this.bRi = parcelable;
    }

    public final int describeContents() {
        return 0;
    }

    public final void writeToParcel(Parcel parcel, int i) {
        AppMethodBeat.i(101673);
        if (this.bRi == null) {
            parcel.writeString(null);
            AppMethodBeat.o(101673);
            return;
        }
        parcel.writeString(this.bRi.getClass().getName());
        parcel.writeParcelable(this.bRi, i);
        AppMethodBeat.o(101673);
    }

    OnWXAppResultXPCWrapper$SafeParcelableWrapper(Parcel parcel) {
        AppMethodBeat.i(101674);
        String readString = parcel.readString();
        if (TextUtils.isEmpty(readString)) {
            this.bRi = null;
            AppMethodBeat.o(101674);
            return;
        }
        try {
            this.bRi = parcel.readParcelable(Class.forName(readString).getClassLoader());
            AppMethodBeat.o(101674);
        } catch (ClassNotFoundException e) {
            d.e("Luggage.WxaSDK.OnWXAppResultXPCWrapper", "ClassNotFoundException with %s", new Object[]{readString});
            AppMethodBeat.o(101674);
        }
    }

    static {
        AppMethodBeat.i(101675);
        AppMethodBeat.o(101675);
    }
}
