Info Call to External Storage API

Description

List of all external storage API calls. Insecure storage of sensitive information by setting insecure permissions or storing data without encryption might expose this information to an attacker.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method android.support.v4.content.FileProvider.<clinit>() calling method java.io.File.<init>()


    static FileProvider()
    {
        android.support.v4.content.FileProvider.COLUMNS = new String[] {"_display_name", "_size"});
        android.support.v4.content.FileProvider.DEVICE_ROOT = new java.io.File("/");
        android.support.v4.content.FileProvider.sCache = new java.util.HashMap();
        return;
    }

Method android.support.v4.content.FileProvider.buildPath() calling method java.io.File.<init>()


    private static varargs java.io.File buildPath(java.io.File p4, String[] p5)
    {
        int v1 = 0;
        while (v1 < p5.length) {
            String v2 = p5[v1];
            if (v2 != null) {
                p4 = new java.io.File(p4, v2);
            }
            v1++;
        }
        return p4;
    }

Method com.facebook.appevents.AppEventsLogger$PersistedAppSessionInfo.saveAppSessionInformation() calling method android.content.Context.openFileOutput()


    static void saveAppSessionInformation(android.content.Context p6)
    {
        try {
            if (com.facebook.appevents.AppEventsLogger$PersistedAppSessionInfo.hasChanges) {
                String v1_2 = 0;
                try {
                    String v2_0 = new java.io.ObjectOutputStream(new java.io.BufferedOutputStream(p6.openFileOutput("AppEventsLogger.persistedsessioninfo", 0)));
                    try {
                        v2_0.writeObject(com.facebook.appevents.AppEventsLogger$PersistedAppSessionInfo.appSessionInfoMap);
                        com.facebook.appevents.AppEventsLogger$PersistedAppSessionInfo.hasChanges = 0;
                        com.facebook.internal.Logger.log(com.facebook.LoggingBehavior.APP_EVENTS, "AppEvents", "App session info saved");
                    } catch (Exception v6_6) {
                        v1_2 = v2_0;
                        com.facebook.internal.Utility.closeQuietly(v1_2);
                        throw v6_6;
                    } catch (Exception v6_1) {
                        v1_2 = v2_0;
                        String v2_1 = com.facebook.appevents.AppEventsLogger.access$200();
                        StringBuilder v3_3 = new StringBuilder();
                        v3_3.append("Got unexpected exception while writing app session info: ");
                        v3_3.append(v6_1.toString());
                        android.util.Log.w(v2_1, v3_3.toString());
                        com.facebook.internal.Utility.closeQuietly(v1_2);
                    }
                    com.facebook.internal.Utility.closeQuietly(v2_0);
                } catch (Exception v6_6) {
                } catch (Exception v6_1) {
                }
            }
        } catch (Exception v6_7) {
            throw v6_7;
        }
        return;
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.getAttachmentsDirectoryForCall() calling method java.io.File.<init>()


    static java.io.File getAttachmentsDirectoryForCall(java.util.UUID p2, boolean p3)
    {
        java.io.File v0 = com.facebook.internal.NativeAppCallAttachmentStore.attachmentsDirectory;
        if (v0 != null) {
            java.io.File v1_1 = new java.io.File(v0, p2.toString());
            if ((p3) && (!v1_1.exists())) {
                v1_1.mkdirs();
            }
            return v1_1;
        } else {
            return 0;
        }
    }

Method android.support.v4.content.ContextCompat.buildPath() calling method java.io.File.<init>()


    private static varargs java.io.File buildPath(java.io.File p4, String[] p5)
    {
        int v0 = p5.length;
        int v1 = 0;
        while (v1 < v0) {
            String v2 = p5[v1];
            if (p4 != null) {
                if (v2 != null) {
                    p4 = new java.io.File(p4, v2);
                }
            } else {
                p4 = new java.io.File(v2);
            }
            v1++;
        }
        return p4;
    }

Method com.facebook.internal.FileLruCache$BufferFile.newFile() calling method java.io.File.<init>()


    static java.io.File newFile(java.io.File p3)
    {
        String v0_1 = new StringBuilder();
        v0_1.append("buffer");
        v0_1.append(Long.valueOf(com.facebook.internal.FileLruCache.access$300().incrementAndGet()).toString());
        return new java.io.File(p3, v0_1.toString());
    }

Method android.support.v7.widget.ActivityChooserModel$PersistHistoryAsyncTask.doInBackground() calling method android.content.Context.openFileOutput()

Couldn't retrieve source code

Method com.facebook.appevents.AppEventStore.saveEventsToDisk() calling method android.content.Context.openFileOutput()


    private static void saveEventsToDisk(com.facebook.appevents.PersistedEvents p6)
    {
        android.content.Context v1 = com.facebook.FacebookSdk.getApplicationContext();
        String v2 = 0;
        try {
            String v3_0 = new java.io.ObjectOutputStream(new java.io.BufferedOutputStream(v1.openFileOutput("AppEventsLogger.persistedevents", 0)));
            try {
                v3_0.writeObject(p6);
                com.facebook.internal.Utility.closeQuietly(v3_0);
            } catch (java.io.File v6_3) {
                v2 = v3_0;
                com.facebook.internal.Utility.closeQuietly(v2);
                throw v6_3;
            } catch (java.io.File v6_1) {
                v2 = v3_0;
                android.util.Log.w(com.facebook.appevents.AppEventStore.TAG, "Got unexpected exception while persisting events: ", v6_1);
                try {
                    v1.getFileStreamPath("AppEventsLogger.persistedevents").delete();
                } catch (Exception) {
                }
                com.facebook.internal.Utility.closeQuietly(v2);
            }
            return;
        } catch (java.io.File v6_3) {
        } catch (java.io.File v6_1) {
        }
    }

Method android.support.v4.content.ContextCompat.getCodeCacheDir() calling method java.io.File.<init>()


    public static java.io.File getCodeCacheDir(android.content.Context p2)
    {
        if (android.os.Build$VERSION.SDK_INT < 21) {
            return android.support.v4.content.ContextCompat.createFilesDir(new java.io.File(p2.getApplicationInfo().dataDir, "code_cache"));
        } else {
            return p2.getCodeCacheDir();
        }
    }

Method android.support.v4.content.ContextCompat.getDataDir() calling method java.io.File.<init>()


    public static java.io.File getDataDir(android.content.Context p2)
    {
        if (android.os.Build$VERSION.SDK_INT < 24) {
            int v0_1;
            String v2_3 = p2.getApplicationInfo().dataDir;
            if (v2_3 == null) {
                v0_1 = 0;
            } else {
                v0_1 = new java.io.File(v2_3);
            }
            return v0_1;
        } else {
            return p2.getDataDir();
        }
    }

Method android.support.v4.content.ContextCompat.getNoBackupFilesDir() calling method java.io.File.<init>()


    public static final java.io.File getNoBackupFilesDir(android.content.Context p2)
    {
        if (android.os.Build$VERSION.SDK_INT < 21) {
            return android.support.v4.content.ContextCompat.createFilesDir(new java.io.File(p2.getApplicationInfo().dataDir, "no_backup"));
        } else {
            return p2.getNoBackupFilesDir();
        }
    }

Method android.support.v4.graphics.TypefaceCompatUtil.getTempFile() calling method java.io.File.<init>()


    public static java.io.File getTempFile(android.content.Context p5)
    {
        String v0_1 = new StringBuilder();
        v0_1.append(".font");
        v0_1.append(android.os.Process.myPid());
        v0_1.append("-");
        v0_1.append(android.os.Process.myTid());
        v0_1.append("-");
        String v0_2 = v0_1.toString();
        int v1_0 = 0;
        while (v1_0 < 100) {
            boolean v3_0 = p5.getCacheDir();
            String v4_1 = new StringBuilder();
            v4_1.append(v0_2);
            v4_1.append(v1_0);
            java.io.File v2_3 = new java.io.File(v3_0, v4_1.toString());
            try {
                if (!v2_3.createNewFile()) {
                    v1_0++;
                } else {
                    return v2_3;
                }
            } catch (java.io.IOException) {
            }
        }
        return 0;
    }

Method android.support.v4.util.AtomicFile.<init>() calling method java.io.File.<init>()


    public AtomicFile(java.io.File p3)
    {
        this.mBaseName = p3;
        StringBuilder v1_1 = new StringBuilder();
        v1_1.append(p3.getPath());
        v1_1.append(".bak");
        this.mBackupName = new java.io.File(v1_1.toString());
        return;
    }

Method com.facebook.GraphRequest.newUploadPhotoRequest() calling method java.io.File.<init>()


    public static com.facebook.GraphRequest newUploadPhotoRequest(com.facebook.AccessToken p6, String p7, android.net.Uri p8, String p9, android.os.Bundle p10, com.facebook.GraphRequest$Callback p11)
    {
        java.io.File v2_0 = com.facebook.GraphRequest.getDefaultPhotoPathIfNull(p7);
        if (!com.facebook.internal.Utility.isFileUri(p8)) {
            if (!com.facebook.internal.Utility.isContentUri(p8)) {
                throw new com.facebook.FacebookException("The photo Uri must be either a file:// or content:// Uri");
            } else {
                android.os.Bundle v3_1 = new android.os.Bundle();
                if (p10 != null) {
                    v3_1.putAll(p10);
                }
                v3_1.putParcelable("picture", p8);
                if ((p9 != null) && (!p9.isEmpty())) {
                    v3_1.putString("caption", p9);
                }
                String v7_4 = new com.facebook.GraphRequest;
                v7_4(p6, v2_0, v3_1, com.facebook.HttpMethod.POST, p11);
                return v7_4;
            }
        } else {
            return com.facebook.GraphRequest.newUploadPhotoRequest(p6, v2_0, new java.io.File(p8.getPath()), p9, p10, p11);
        }
    }

Method com.facebook.internal.FileLruCache.<init>() calling method java.io.File.<init>()


    public FileLruCache(String p4, com.facebook.internal.FileLruCache$Limits p5)
    {
        this.lastClearCacheTime = new java.util.concurrent.atomic.AtomicLong(0);
        this.tag = p4;
        this.limits = p5;
        this.directory = new java.io.File(com.facebook.FacebookSdk.getCacheDir(), p4);
        this.lock = new Object();
        if ((this.directory.mkdirs()) || (this.directory.isDirectory())) {
            com.facebook.internal.FileLruCache$BufferFile.deleteAll(this.directory);
        }
        return;
    }

Method com.facebook.internal.FileLruCache.renameToTargetAndTrim() calling method java.io.File.<init>()


    private void renameToTargetAndTrim(String p3, java.io.File p4)
    {
        if (!p4.renameTo(new java.io.File(this.directory, com.facebook.internal.Utility.md5hash(p3)))) {
            p4.delete();
        }
        this.postTrim();
        return;
    }

Method com.facebook.internal.FileLruCache.get() calling method java.io.File.<init>()


    public java.io.InputStream get(String p7, String p8)
    {
        java.io.File v0_1 = new java.io.File(this.directory, com.facebook.internal.Utility.md5hash(p7));
        try {
            java.io.BufferedInputStream v3_0 = new java.io.BufferedInputStream(new java.io.FileInputStream(v0_1), 8192);
            try {
                String v2_0 = com.facebook.internal.FileLruCache$StreamHeader.readHeader(v3_0);
            } catch (long v7_8) {
                v3_0.close();
                throw v7_8;
            }
            if (v2_0 != null) {
                String v4_1 = v2_0.optString("key");
                if (v4_1 != null) {
                    if (v4_1.equals(p7)) {
                        long v7_3 = v2_0.optString("tag", 0);
                        if (((p8 != null) || (v7_3 == 0)) && ((p8 == null) || (p8.equals(v7_3)))) {
                            long v7_7 = new java.util.Date().getTime();
                            String v4_3 = new StringBuilder();
                            v4_3.append("Setting lastModified to ");
                            v4_3.append(Long.valueOf(v7_7));
                            v4_3.append(" for ");
                            v4_3.append(v0_1.getName());
                            com.facebook.internal.Logger.log(com.facebook.LoggingBehavior.CACHE, com.facebook.internal.FileLruCache.TAG, v4_3.toString());
                            v0_1.setLastModified(v7_7);
                            return v3_0;
                        } else {
                            v3_0.close();
                            return 0;
                        }
                    } else {
                    }
                }
                v3_0.close();
                return 0;
            } else {
                v3_0.close();
                return 0;
            }
        } catch (java.io.IOException) {
            return 0;
        }
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.getAttachmentFile() calling method java.io.File.<init>()


    static java.io.File getAttachmentFile(java.util.UUID p2, String p3, boolean p4)
    {
        java.io.File v2_1 = com.facebook.internal.NativeAppCallAttachmentStore.getAttachmentsDirectoryForCall(p2, p4);
        if (v2_1 != null) {
            try {
                return new java.io.File(v2_1, java.net.URLEncoder.encode(p3, "UTF-8"));
            } catch (java.io.UnsupportedEncodingException) {
                return 0;
            }
        } else {
            return 0;
        }
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.getAttachmentsDirectory() calling method java.io.File.<init>()


    static declared_synchronized java.io.File getAttachmentsDirectory()
    {
        try {
            if (com.facebook.internal.NativeAppCallAttachmentStore.attachmentsDirectory == null) {
                com.facebook.internal.NativeAppCallAttachmentStore.attachmentsDirectory = new java.io.File(com.facebook.FacebookSdk.getApplicationContext().getCacheDir(), "com.facebook.NativeAppCallAttachmentStore.files");
            }
        } catch (java.io.File v1_1) {
            throw v1_1;
        }
        return com.facebook.internal.NativeAppCallAttachmentStore.attachmentsDirectory;
    }

Method com.facebook.internal.Utility.refreshBestGuessNumberOfCPUCores() calling method java.io.File.<init>()


    private static int refreshBestGuessNumberOfCPUCores()
    {
        int v0_0 = com.facebook.internal.Utility.numCPUCores;
        if (v0_0 <= 0) {
            try {
                int v0_9 = new java.io.File("/sys/devices/system/cpu/").listFiles(new com.facebook.internal.Utility$2());
            } catch (Exception) {
                if (com.facebook.internal.Utility.numCPUCores <= 0) {
                    com.facebook.internal.Utility.numCPUCores = Math.max(Runtime.getRuntime().availableProcessors(), 1);
                }
                return com.facebook.internal.Utility.numCPUCores;
            }
            if (v0_9 == 0) {
            } else {
                com.facebook.internal.Utility.numCPUCores = v0_9.length;
            }
        } else {
            return v0_0;
        }
    }

Method com.facebook.share.internal.ShareInternalUtility.newUploadStagingResourceWithImageRequest() calling method java.io.File.<init>()


    public static com.facebook.GraphRequest newUploadStagingResourceWithImageRequest(com.facebook.AccessToken p8, android.net.Uri p9, com.facebook.GraphRequest$Callback p10)
    {
        if (!com.facebook.internal.Utility.isFileUri(p9)) {
            if (!com.facebook.internal.Utility.isContentUri(p9)) {
                throw new com.facebook.FacebookException("The image Uri must be either a file:// or content:// Uri");
            } else {
                com.facebook.GraphRequest$ParcelableResourceWithMimeType v0_2 = new com.facebook.GraphRequest$ParcelableResourceWithMimeType(p9, "image/png");
                android.os.Bundle v5_1 = new android.os.Bundle(1);
                v5_1.putParcelable("file", v0_2);
                String v9_3 = new com.facebook.GraphRequest;
                v9_3(p8, "me/staging_resources", v5_1, com.facebook.HttpMethod.POST, p10);
                return v9_3;
            }
        } else {
            return com.facebook.share.internal.ShareInternalUtility.newUploadStagingResourceWithImageRequest(p8, new java.io.File(p9.getPath()), p10);
        }
    }

Method com.facebook.share.internal.VideoUploader$UploadContext.initialize() calling method java.io.File.<init>()


    private void initialize()
    {
        try {
            if (!com.facebook.internal.Utility.isFileUri(this.videoUri)) {
                if (!com.facebook.internal.Utility.isContentUri(this.videoUri)) {
                    throw new com.facebook.FacebookException("Uri must be a content:// or file:// uri");
                } else {
                    this.videoSize = com.facebook.internal.Utility.getContentSize(this.videoUri);
                    this.videoStream = com.facebook.FacebookSdk.getApplicationContext().getContentResolver().openInputStream(this.videoUri);
                }
            } else {
                com.facebook.FacebookException v0_10 = android.os.ParcelFileDescriptor.open(new java.io.File(this.videoUri.getPath()), 268435456);
                this.videoSize = v0_10.getStatSize();
                this.videoStream = new android.os.ParcelFileDescriptor$AutoCloseInputStream(v0_10);
            }
        } catch (com.facebook.FacebookException v0_11) {
            com.facebook.internal.Utility.closeQuietly(this.videoStream);
            throw v0_11;
        }
        return;
    }

Method com.google.android.gms.common.util.SharedPreferencesUtils.publishWorldReadableSharedPreferences() calling method java.io.File.<init>()


    public static void publishWorldReadableSharedPreferences(android.content.Context p3, android.content.SharedPreferences$Editor p4, String p5)
    {
        java.io.File v0_1 = new java.io.File(p3.getApplicationInfo().dataDir, "shared_prefs");
        java.io.File v3_5 = v0_1.getParentFile();
        if (v3_5 != null) {
            v3_5.setExecutable(1, 0);
        }
        v0_1.setExecutable(1, 0);
        p4.commit();
        new java.io.File(v0_1, String.valueOf(p5).concat(".xml")).setReadable(1, 0);
        return;
    }

Method android.support.v4.content.FileProvider$SimplePathStrategy.getFileForUri() calling method java.io.File.<init>()


    public java.io.File getFileForUri(android.net.Uri p5)
    {
        String v0_0 = p5.getEncodedPath();
        String v2_4 = v0_0.indexOf(47, 1);
        String v3_1 = android.net.Uri.decode(v0_0.substring(1, v2_4));
        String vtmp6 = android.net.Uri.decode(v0_0.substring((v2_4 + 1)));
        StringBuilder v1_2 = ((java.io.File) this.mRoots.get(v3_1));
        if (v1_2 == null) {
            StringBuilder v1_5 = new StringBuilder();
            v1_5.append("Unable to find configured root for ");
            v1_5.append(p5);
            throw new IllegalArgumentException(v1_5.toString());
        } else {
            try {
                SecurityException v5_4 = new java.io.File(v1_2, vtmp6).getCanonicalFile();
            } catch (java.io.IOException) {
                StringBuilder v1_8 = new StringBuilder();
                v1_8.append("Failed to resolve canonical path for ");
                v1_8.append(v5_4);
                throw new IllegalArgumentException(v1_8.toString());
            }
            if (!v5_4.getPath().startsWith(v1_2.getPath())) {
                throw new SecurityException("Resolved path jumped beyond configured root");
            } else {
                return v5_4;
            }
        }
    }

Method android.support.v4.provider.RawDocumentFile.createDirectory() calling method java.io.File.<init>()


    public android.support.v4.provider.DocumentFile createDirectory(String p3)
    {
        java.io.File v0_1 = new java.io.File(this.mFile, p3);
        if ((!v0_1.isDirectory()) && (!v0_1.mkdir())) {
            return 0;
        } else {
            return new android.support.v4.provider.RawDocumentFile(this, v0_1);
        }
    }

Method android.support.v4.provider.RawDocumentFile.createFile() calling method java.io.File.<init>()


    public android.support.v4.provider.DocumentFile createFile(String p2, String p3)
    {
        int v2_5 = android.webkit.MimeTypeMap.getSingleton().getExtensionFromMimeType(p2);
        if (v2_5 != 0) {
            String v0_4 = new StringBuilder();
            v0_4.append(p3);
            v0_4.append(".");
            v0_4.append(v2_5);
            p3 = v0_4.toString();
        }
        int v2_2 = new java.io.File(this.mFile, p3);
        try {
            v2_2.createNewFile();
            return new android.support.v4.provider.RawDocumentFile(this, v2_2);
        } catch (int v2_3) {
            String v3_4 = new StringBuilder();
            v3_4.append("Failed to createFile: ");
            v3_4.append(v2_3);
            android.util.Log.w("DocumentFile", v3_4.toString());
            return 0;
        }
    }

Method android.support.v4.provider.RawDocumentFile.renameTo() calling method java.io.File.<init>()


    public boolean renameTo(String p3)
    {
        java.io.File v0_1 = new java.io.File(this.mFile.getParentFile(), p3);
        if (!this.mFile.renameTo(v0_1)) {
            return 0;
        } else {
            this.mFile = v0_1;
            return 1;
        }
    }

Method android.support.v4.graphics.TypefaceCompatApi21Impl.getFile() calling method java.io.File.<init>()


    private java.io.File getFile(android.os.ParcelFileDescriptor p4)
    {
        try {
            java.io.File v1_5 = new StringBuilder();
            v1_5.append("/proc/self/fd/");
            v1_5.append(p4.getFd());
            String v4_1 = android.system.Os.readlink(v1_5.toString());
        } catch (android.system.ErrnoException) {
            return 0;
        }
        if (!android.system.OsConstants.S_ISREG(android.system.Os.stat(v4_1).st_mode)) {
            return 0;
        } else {
            return new java.io.File(v4_1);
        }
    }

Method com.google.android.gms.common.util.ProcessUtils.zzj() calling method java.io.FileReader.<init>()


    private static java.io.BufferedReader zzj(String p3)
    {
        android.os.StrictMode$ThreadPolicy v0 = android.os.StrictMode.allowThreadDiskReads();
        try {
            java.io.BufferedReader v1_1 = new java.io.BufferedReader(new java.io.FileReader(p3));
            android.os.StrictMode.setThreadPolicy(v0);
            return v1_1;
        } catch (Throwable v3_1) {
            android.os.StrictMode.setThreadPolicy(v0);
            throw v3_1;
        }
    }

Method android.support.v4.graphics.TypefaceCompatUtil.mmap() calling method java.io.FileInputStream.<init>()


    public static java.nio.ByteBuffer mmap(android.content.Context p8, android.os.CancellationSignal p9, android.net.Uri p10)
    {
        try {
            Throwable v8_3 = p8.getContentResolver().openFileDescriptor(p10, "r", p9);
            try {
                Throwable v9_5 = new java.io.FileInputStream(v8_3.getFileDescriptor());
                try {
                    Throwable v1_0 = v9_5.getChannel();
                    Throwable v10_1 = v1_0.map(java.nio.channels.FileChannel$MapMode.READ_ONLY, 0, v1_0.size());
                } catch (Throwable v10_3) {
                    Throwable v1_2 = 0;
                    if (v1_2 == null) {
                        v9_5.close();
                    } else {
                        try {
                            v9_5.close();
                        } catch (Throwable v9_1) {
                            v1_2.addSuppressed(v9_1);
                        }
                    }
                    throw v10_3;
                } catch (Throwable v10_2) {
                    try {
                        throw v10_2;
                    } catch (Throwable v1_1) {
                        v1_2 = v10_2;
                        v10_3 = v1_1;
                    }
                }
                v9_5.close();
                if (v8_3 != null) {
                    v8_3.close();
                }
                return v10_1;
            } catch (Throwable v9_3) {
                Throwable v10_5 = 0;
                if (v8_3 != null) {
                    if (v10_5 == null) {
                        v8_3.close();
                    } else {
                        try {
                            v8_3.close();
                        } catch (Throwable v8_2) {
                            v10_5.addSuppressed(v8_2);
                        }
                    }
                }
                throw v9_3;
            } catch (Throwable v9_2) {
                try {
                    throw v9_2;
                } catch (Throwable v10_4) {
                    v10_5 = v9_2;
                    v9_3 = v10_4;
                }
            }
        } catch (java.io.IOException) {
            return 0;
        }
    }

Method android.support.v4.graphics.TypefaceCompatUtil.mmap() calling method java.io.FileInputStream.<init>()


    private static java.nio.ByteBuffer mmap(java.io.File p9)
    {
        try {
            Throwable v1_1 = new java.io.FileInputStream(p9);
            try {
                Throwable v2_2 = v1_1.getChannel();
                Throwable v9_1 = v2_2.map(java.nio.channels.FileChannel$MapMode.READ_ONLY, 0, v2_2.size());
            } catch (Throwable v9_3) {
                Throwable v2_1 = 0;
                if (v2_1 == null) {
                    v1_1.close();
                } else {
                    try {
                        v1_1.close();
                    } catch (Throwable v1_2) {
                        v2_1.addSuppressed(v1_2);
                    }
                }
                throw v9_3;
            } catch (Throwable v9_2) {
                try {
                    throw v9_2;
                } catch (Throwable v2_0) {
                    v2_1 = v9_2;
                    v9_3 = v2_0;
                }
            }
            v1_1.close();
            return v9_1;
        } catch (java.io.IOException) {
            return 0;
        }
    }

Method android.support.v4.util.AtomicFile.openRead() calling method java.io.FileInputStream.<init>()


    public java.io.FileInputStream openRead()
    {
        if (this.mBackupName.exists()) {
            this.mBaseName.delete();
            this.mBackupName.renameTo(this.mBaseName);
        }
        return new java.io.FileInputStream(this.mBaseName);
    }

Method com.facebook.internal.FileLruCache.get() calling method java.io.FileInputStream.<init>()


    public java.io.InputStream get(String p7, String p8)
    {
        java.io.File v0_1 = new java.io.File(this.directory, com.facebook.internal.Utility.md5hash(p7));
        try {
            java.io.BufferedInputStream v3_0 = new java.io.BufferedInputStream(new java.io.FileInputStream(v0_1), 8192);
            try {
                String v2_0 = com.facebook.internal.FileLruCache$StreamHeader.readHeader(v3_0);
            } catch (long v7_8) {
                v3_0.close();
                throw v7_8;
            }
            if (v2_0 != null) {
                String v4_1 = v2_0.optString("key");
                if (v4_1 != null) {
                    if (v4_1.equals(p7)) {
                        long v7_3 = v2_0.optString("tag", 0);
                        if (((p8 != null) || (v7_3 == 0)) && ((p8 == null) || (p8.equals(v7_3)))) {
                            long v7_7 = new java.util.Date().getTime();
                            String v4_3 = new StringBuilder();
                            v4_3.append("Setting lastModified to ");
                            v4_3.append(Long.valueOf(v7_7));
                            v4_3.append(" for ");
                            v4_3.append(v0_1.getName());
                            com.facebook.internal.Logger.log(com.facebook.LoggingBehavior.CACHE, com.facebook.internal.FileLruCache.TAG, v4_3.toString());
                            v0_1.setLastModified(v7_7);
                            return v3_0;
                        } else {
                            v3_0.close();
                            return 0;
                        }
                    } else {
                    }
                }
                v3_0.close();
                return 0;
            } else {
                v3_0.close();
                return 0;
            }
        } catch (java.io.IOException) {
            return 0;
        }
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.processAttachmentFile() calling method java.io.FileInputStream.<init>()


    private static void processAttachmentFile(android.net.Uri p1, boolean p2, java.io.File p3)
    {
        java.io.InputStream v2_1;
        java.io.FileOutputStream v0_1 = new java.io.FileOutputStream(p3);
        try {
            if (p2 != null) {
                v2_1 = com.facebook.FacebookSdk.getApplicationContext().getContentResolver().openInputStream(p1);
            } else {
                v2_1 = new java.io.FileInputStream(p1.getPath());
            }
        } catch (Throwable v1_2) {
            com.facebook.internal.Utility.closeQuietly(v0_1);
            throw v1_2;
        }
        com.facebook.internal.Utility.copyAndCloseInputStream(v2_1, v0_1);
        com.facebook.internal.Utility.closeQuietly(v0_1);
        return;
    }

Method com.unity3d.player.p.c() calling method java.io.FileInputStream.<init>()


    private void c()
    {
        java.io.FileInputStream v0_0 = this.q;
        if (v0_0 == null) {
            this.a(0);
            this.doCleanUp();
            try {
                this.q = new android.media.MediaPlayer();
            } catch (java.io.FileInputStream v0_14) {
                if (com.unity3d.player.p.a) {
                    android.media.MediaPlayer v1_8 = new StringBuilder("error: ");
                    v1_8.append(v0_14.getMessage());
                    v1_8.append(v0_14);
                    com.unity3d.player.p.b(v1_8.toString());
                }
                this.a(2);
                return;
            }
            if (!this.h) {
                if (this.j == 0) {
                    java.io.FileInputStream v0_8 = this.getResources().getAssets().openFd(this.e);
                    this.q.setDataSource(v0_8.getFileDescriptor(), v0_8.getStartOffset(), v0_8.getLength());
                    v0_8.close();
                    this.q.setDisplay(this.d);
                    this.q.setScreenOnWhilePlaying(1);
                    this.q.setOnBufferingUpdateListener(this);
                    this.q.setOnCompletionListener(this);
                    this.q.setOnPreparedListener(this);
                    this.q.setOnVideoSizeChangedListener(this);
                    this.q.setAudioStreamType(3);
                    this.q.prepareAsync();
                    this.y = new com.unity3d.player.p$b(this, this);
                    new Thread(this.y).start();
                    return;
                } else {
                    java.io.FileInputStream v0_10 = new java.io.FileInputStream(this.e);
                    this.q.setDataSource(v0_10.getFD(), this.i, this.j);
                }
                v0_10.close();
            } else {
                this.q.setDataSource(this.b, android.net.Uri.parse(this.e));
            }
            this.q.setDisplay(this.d);
            this.q.setScreenOnWhilePlaying(1);
            this.q.setOnBufferingUpdateListener(this);
            this.q.setOnCompletionListener(this);
            this.q.setOnPreparedListener(this);
            this.q.setOnVideoSizeChangedListener(this);
            this.q.setAudioStreamType(3);
            this.q.prepareAsync();
            this.y = new com.unity3d.player.p$b(this, this);
            new Thread(this.y).start();
            return;
        } else {
            v0_0.setDisplay(this.d);
            if (!this.v) {
                if (com.unity3d.player.p.a) {
                    com.unity3d.player.p.b("Resuming playback");
                }
                this.q.start();
            }
            return;
        }
    }

Method android.support.v4.graphics.TypefaceCompatApi21Impl.createFromFontInfo() calling method java.io.FileInputStream.<init>()


    public android.graphics.Typeface createFromFontInfo(android.content.Context p5, android.os.CancellationSignal p6, android.support.v4.provider.FontsContractCompat$FontInfo[] p7, int p8)
    {
        if (p7.length >= 1) {
            try {
                Throwable v6_1 = p5.getContentResolver().openFileDescriptor(this.findBestInfo(p7, p8).getUri(), "r", p6);
                try {
                    Throwable v7_1 = this.getFile(v6_1);
                } catch (Throwable v5_6) {
                    Throwable v7_7 = 0;
                    if (v6_1 != null) {
                        if (v7_7 == null) {
                            v6_1.close();
                        } else {
                            try {
                                v6_1.close();
                            } catch (Throwable v6_2) {
                                v7_7.addSuppressed(v6_2);
                            }
                        }
                    }
                    throw v5_6;
                } catch (Throwable v5_5) {
                    try {
                        throw v5_5;
                    } catch (Throwable v7_5) {
                        v7_7 = v5_5;
                        v5_6 = v7_5;
                    }
                }
                if (v7_1 != null) {
                    if (v7_1.canRead()) {
                        Throwable v5_1 = android.graphics.Typeface.createFromFile(v7_1);
                        if (v6_1 != null) {
                            v6_1.close();
                        }
                        return v5_1;
                    } else {
                    }
                }
                Throwable v7_3 = new java.io.FileInputStream(v6_1.getFileDescriptor());
                try {
                    Throwable v5_2 = super.createFromInputStream(p5, v7_3);
                } catch (Throwable v5_4) {
                    Throwable v8_4 = 0;
                    if (v8_4 == null) {
                        v7_3.close();
                    } else {
                        try {
                            v7_3.close();
                        } catch (Throwable v7_4) {
                            v8_4.addSuppressed(v7_4);
                        }
                    }
                    throw v5_4;
                } catch (Throwable v5_3) {
                    try {
                        throw v5_3;
                    } catch (Throwable v8_3) {
                        v8_4 = v5_3;
                        v5_4 = v8_3;
                    }
                }
                v7_3.close();
                if (v6_1 != null) {
                    v6_1.close();
                }
                return v5_2;
            } catch (java.io.IOException) {
                return 0;
            }
        } else {
            return 0;
        }
    }

Method android.support.v4.graphics.TypefaceCompatUtil.copyToFile() calling method java.io.FileOutputStream.<init>()


    public static boolean copyToFile(java.io.File p4, java.io.InputStream p5)
    {
        int v1_0 = 0;
        try {
            StringBuilder v2_3 = new java.io.FileOutputStream(p4, 0);
            try {
                int v4_7 = new byte[1024];
            } catch (int v4_4) {
                v1_0 = v2_3;
                android.support.v4.graphics.TypefaceCompatUtil.closeQuietly(v1_0);
                throw v4_4;
            } catch (int v4_1) {
                v1_0 = v2_3;
                StringBuilder v2_1 = new StringBuilder();
                v2_1.append("Error copying resource contents to temp file: ");
                v2_1.append(v4_1.getMessage());
                android.util.Log.e("TypefaceCompatUtil", v2_1.toString());
                android.support.v4.graphics.TypefaceCompatUtil.closeQuietly(v1_0);
                return 0;
            }
            while(true) {
                int v1_1 = p5.read(v4_7);
                if (v1_1 == -1) {
                    break;
                }
                v2_3.write(v4_7, 0, v1_1);
            }
            android.support.v4.graphics.TypefaceCompatUtil.closeQuietly(v2_3);
            return 1;
        } catch (int v4_4) {
        } catch (int v4_1) {
            v2_1 = new StringBuilder();
            v2_1.append("Error copying resource contents to temp file: ");
            v2_1.append(v4_1.getMessage());
            android.util.Log.e("TypefaceCompatUtil", v2_1.toString());
            android.support.v4.graphics.TypefaceCompatUtil.closeQuietly(v1_0);
            return 0;
        }
    }

Method android.support.v4.print.PrintHelper$PrintHelperApi19$2.doInBackground() calling method java.io.FileOutputStream.<init>()


    protected varargs Throwable doInBackground(Void[] p9)
    {
        try {
            if (!this.val$cancellationSignal.isCanceled()) {
                android.graphics.Bitmap v9_10 = new android.print.pdf.PrintedPdfDocument(this.this$0.mContext, this.val$pdfAttributes);
                android.graphics.Bitmap v1_1 = android.support.v4.print.PrintHelper$PrintHelperApi19.access$100(this.this$0, this.val$bitmap, this.val$pdfAttributes.getColorMode());
                if (!this.val$cancellationSignal.isCanceled()) {
                    try {
                        java.io.FileOutputStream v2_5;
                        java.io.FileDescriptor v3_2 = v9_10.startPage(1);
                    } catch (Throwable v0_1) {
                        v9_10.close();
                        if (this.val$fileDescriptor != null) {
                            this.val$fileDescriptor.close();
                        }
                        if (v1_1 != this.val$bitmap) {
                            v1_1.recycle();
                        }
                        throw v0_1;
                    }
                    if (!this.this$0.mIsMinMarginsHandlingCorrect) {
                        android.graphics.Matrix v4_3 = new android.print.pdf.PrintedPdfDocument(this.this$0.mContext, this.val$attributes);
                        java.io.FileOutputStream v2_4 = v4_3.startPage(1);
                        android.graphics.Canvas v5_3 = new android.graphics.RectF(v2_4.getInfo().getContentRect());
                        v4_3.finishPage(v2_4);
                        v4_3.close();
                        v2_5 = v5_3;
                    } else {
                        v2_5 = new android.graphics.RectF(v3_2.getInfo().getContentRect());
                    }
                    android.graphics.Matrix v4_7 = android.support.v4.print.PrintHelper$PrintHelperApi19.access$200(this.this$0, v1_1.getWidth(), v1_1.getHeight(), v2_5, this.val$fittingMode);
                    if (!this.this$0.mIsMinMarginsHandlingCorrect) {
                        v4_7.postTranslate(v2_5.left, v2_5.top);
                        v3_2.getCanvas().clipRect(v2_5);
                    } else {
                    }
                    v3_2.getCanvas().drawBitmap(v1_1, v4_7, 0);
                    v9_10.finishPage(v3_2);
                    if (!this.val$cancellationSignal.isCanceled()) {
                        v9_10.writeTo(new java.io.FileOutputStream(this.val$fileDescriptor.getFileDescriptor()));
                        v9_10.close();
                        if (this.val$fileDescriptor != null) {
                            this.val$fileDescriptor.close();
                        }
                        if (v1_1 != this.val$bitmap) {
                            v1_1.recycle();
                        }
                        return 0;
                    } else {
                        v9_10.close();
                        if (this.val$fileDescriptor != null) {
                            this.val$fileDescriptor.close();
                        }
                        if (v1_1 != this.val$bitmap) {
                            v1_1.recycle();
                        }
                        return 0;
                    }
                } else {
                    return 0;
                }
            } else {
                return 0;
            }
        } catch (android.graphics.Bitmap v9_4) {
            return v9_4;
        }
    }

Method android.support.v4.util.AtomicFile.startWrite() calling method java.io.FileOutputStream.<init>()

Couldn't retrieve source code

Method com.facebook.internal.FileLruCache.openPutStream() calling method java.io.FileOutputStream.<init>()


    public java.io.OutputStream openPutStream(String p10, String p11)
    {
        java.io.File v5 = com.facebook.internal.FileLruCache$BufferFile.newFile(this.directory);
        v5.delete();
        if (!v5.createNewFile()) {
            java.io.IOException v11_9 = new StringBuilder();
            v11_9.append("Could not create file at ");
            v11_9.append(v5.getAbsolutePath());
            throw new java.io.IOException(v11_9.toString());
        } else {
            try {
                java.io.FileOutputStream v7_1 = new java.io.FileOutputStream(v5);
                com.facebook.internal.FileLruCache$1 v8 = new com.facebook.internal.FileLruCache$1;
                v8(this, System.currentTimeMillis(), v5, p10);
                String v2_2 = new java.io.BufferedOutputStream(new com.facebook.internal.FileLruCache$CloseCallbackOutputStream(v7_1, v8), 8192);
                try {
                    String v1_5 = new org.json.JSONObject();
                    v1_5.put("key", p10);
                } catch (String v10_9) {
                    v2_2.close();
                    throw v10_9;
                } catch (String v10_6) {
                    String v3_5 = new StringBuilder();
                    v3_5.append("Error creating JSON header for cache file: ");
                    v3_5.append(v10_6);
                    com.facebook.internal.Logger.log(com.facebook.LoggingBehavior.CACHE, 5, com.facebook.internal.FileLruCache.TAG, v3_5.toString());
                    throw new java.io.IOException(v10_6.getMessage());
                }
                if (!com.facebook.internal.Utility.isNullOrEmpty(p11)) {
                    v1_5.put("tag", p11);
                }
                com.facebook.internal.FileLruCache$StreamHeader.writeHeader(v2_2, v1_5);
                return v2_2;
            } catch (String v10_2) {
                String v2_4 = new StringBuilder();
                v2_4.append("Error creating buffer output stream: ");
                v2_4.append(v10_2);
                com.facebook.internal.Logger.log(com.facebook.LoggingBehavior.CACHE, 5, com.facebook.internal.FileLruCache.TAG, v2_4.toString());
                throw new java.io.IOException(v10_2.getMessage());
            }
        }
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.processAttachmentBitmap() calling method java.io.FileOutputStream.<init>()


    private static void processAttachmentBitmap(android.graphics.Bitmap p2, java.io.File p3)
    {
        java.io.FileOutputStream v0_1 = new java.io.FileOutputStream(p3);
        try {
            p2.compress(android.graphics.Bitmap$CompressFormat.JPEG, 100, v0_1);
            com.facebook.internal.Utility.closeQuietly(v0_1);
            return;
        } catch (Throwable v2_1) {
            com.facebook.internal.Utility.closeQuietly(v0_1);
            throw v2_1;
        }
    }

Method com.facebook.internal.NativeAppCallAttachmentStore.processAttachmentFile() calling method java.io.FileOutputStream.<init>()


    private static void processAttachmentFile(android.net.Uri p1, boolean p2, java.io.File p3)
    {
        java.io.InputStream v2_1;
        java.io.FileOutputStream v0_1 = new java.io.FileOutputStream(p3);
        try {
            if (p2 != null) {
                v2_1 = com.facebook.FacebookSdk.getApplicationContext().getContentResolver().openInputStream(p1);
            } else {
                v2_1 = new java.io.FileInputStream(p1.getPath());
            }
        } catch (Throwable v1_2) {
            com.facebook.internal.Utility.closeQuietly(v0_1);
            throw v1_2;
        }
        com.facebook.internal.Utility.copyAndCloseInputStream(v2_1, v0_1);
        com.facebook.internal.Utility.closeQuietly(v0_1);
        return;
    }

Method com.google.android.gms.common.data.BitmapTeleporter.zabz() calling method java.io.FileOutputStream.<init>()


    private final java.io.FileOutputStream zabz()
    {
        IllegalStateException v0_0 = this.zali;
        if (v0_0 == null) {
            throw new IllegalStateException("setTempDir() must be called before writing this object to a parcel");
        } else {
            try {
                IllegalStateException v0_6 = java.io.File.createTempFile("teleporter", ".tmp", v0_0);
                try {
                    String v1_3 = new java.io.FileOutputStream(v0_6);
                    this.zalf = android.os.ParcelFileDescriptor.open(v0_6, 268435456);
                    v0_6.delete();
                    return v1_3;
                } catch (java.io.FileNotFoundException) {
                    throw new IllegalStateException("Temporary file is somehow already deleted");
                }
            } catch (IllegalStateException v0_1) {
                throw new IllegalStateException("Could not create temporary file", v0_1);
            }
            v1_3 = new java.io.FileOutputStream(v0_6);
            this.zalf = android.os.ParcelFileDescriptor.open(v0_6, 268435456);
            v0_6.delete();
            return v1_3;
        }
    }