Snap v8.10.4版本的 MD5 值为:3f7a8892a522fef17767953dff16af57

以下内容为反编译后的 e.java 源代码,内容仅作参考


package c.f.b.g.r;

import a.a.a.a.g.j;
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import c.a.a.h.n;
import c.f.b.g.o.g;
import c.f.b.j.v;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
public class e {

    public static class a {
        public g f1462a;
        public Uri f1463b;
    }

    static {
        try {
            ((n) c.a.a.e.f322a).e("http://ns.google.com/photos/1.0/filter/", "AFltr");
        } catch (c.a.a.c e) {
            Log.e("XmpPresets", "Register XMP name space failed", e);
        }
    }

    public static a a(Context context, Uri uri) {
        InputStream inputStream;
        c.a.a.d dVar;
        a aVar = new a();
        InputStream inputStream2 = null;
        try {
            inputStream = context.getContentResolver().openInputStream(uri);
        } catch (FileNotFoundException unused) {
            inputStream = null;
        } catch (Throwable th) {
            th = th;
        }
        try {
            dVar = j.G(inputStream);
            c.f.b.d.j.i(inputStream);
        } catch (FileNotFoundException unused2) {
            c.f.b.d.j.i(inputStream);
            dVar = null;
            if (dVar != null) {
            }
        } catch (Throwable th2) {
            th = th2;
            inputStream2 = inputStream;
            c.f.b.d.j.i(inputStream2);
            throw th;
        }
        if (dVar != null) {
            return null;
        }
        try {
            String b2 = dVar.b("http://ns.google.com/photos/1.0/filter/", "SourceFileUri");
            if (b2 != null) {
                String b3 = dVar.b("http://ns.google.com/photos/1.0/filter/", "filterstack");
                aVar.f1463b = Uri.parse(b2);
                g gVar = new g();
                aVar.f1462a = gVar;
                if (gVar.r(b3)) {
                    return aVar;
                }
                return null;
            }
        } catch (c.a.a.c e) {
            e.printStackTrace();
        }
        return null;
    }

    public static void b(Context context, Uri uri, File file, g gVar) {
        Throwable th;
        c.a.a.d dVar;
        InputStream openInputStream;
        InputStream inputStream = null;
        c.a.a.d dVar2 = null;
        InputStream inputStream2 = null;
        try {
            openInputStream = context.getContentResolver().openInputStream(uri);
        } catch (FileNotFoundException unused) {
            dVar = null;
        } catch (Throwable th2) {
            th = th2;
        }
        try {
            dVar2 = j.G(openInputStream);
        } catch (FileNotFoundException unused2) {
        } catch (Throwable th3) {
            th = th3;
            inputStream = openInputStream;
            c.f.b.d.j.i(inputStream);
            throw th;
        }
        c.a.a.d dVar3 = dVar2;
        inputStream2 = openInputStream;
        dVar = dVar3;
        c.f.b.d.j.i(inputStream2);
        if (dVar == null) {
            dVar = c.a.a.e.a();
        }
        try {
            dVar.f("http://ns.google.com/photos/1.0/filter/", "SourceFileUri", uri.toString());
            dVar.f("http://ns.google.com/photos/1.0/filter/", "filterstack", gVar.k("Saved"));
            if (v.e(file.getAbsolutePath(), dVar)) {
                return;
            }
            StringBuilder h = c.b.a.a.a.h("Write XMP meta to file failed:");
            h.append(file.getAbsolutePath());
            Log.v("XmpPresets", h.toString());
        } catch (c.a.a.c e) {
            e.printStackTrace();
            Log.v("XmpPresets", "Write XMP meta to file failed:" + file.getAbsolutePath());
        }
    }
}