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 com.android.providers.media.MediaProvider.getCompressedAlbumArt() calling method java.io.FileInputStream.<init>()


    private static byte[] getCompressedAlbumArt(android.content.Context p19, String[] p20, String p21)
    {
        int v2_0 = 0;
        int v3 = 0;
        try {
            android.os.ParcelFileDescriptor v5 = android.os.ParcelFileDescriptor.open(new java.io.File(p21), 268435456);
            try {
                int v6_1 = new android.media.MediaScanner(p19, "internal");
                try {
                    v3 = v6_1.extractAlbumArt(v5.getFileDescriptor());
                } catch (int v0_36) {
                    com.android.providers.media.MediaProvider.$closeResource(v2_0, v6_1);
                    throw v0_36;
                } catch (int v0_35) {
                    v2_0 = v0_35;
                    try {
                        throw v2_0;
                    } catch (int v0_36) {
                    }
                } catch (int v0) {
                    return v3;
                }
                com.android.providers.media.MediaProvider.$closeResource(0, v6_1);
                v5.close();
                if ((v3 != 0) || (p21 == null)) {
                    return v3;
                } else {
                    int v6_2 = p21.lastIndexOf(47);
                    if (v6_2 <= 0) {
                        return v3;
                    } else {
                        String v8 = p21.substring(0, v6_2);
                        String vtmp7 = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
                        String v10 = 0;
                        try {
                            if (!com.android.providers.media.MediaProvider.sFolderArtMap.containsKey(v8)) {
                                if ((!com.android.providers.media.MediaProvider.isRootStorageDir(p20, v8)) && (!v8.equalsIgnoreCase(vtmp7))) {
                                    int v0_16 = new java.io.File(v8);
                                    String v13_2 = v0_16.list();
                                    if (v13_2 != null) {
                                        v10 = 0;
                                        int v14 = 1000;
                                        int v15_0 = (v13_2.length - 1);
                                        while (v15_0 >= 0) {
                                            int v2_4 = v13_2[v15_0].toLowerCase();
                                            if (!v2_4.equals("albumart.jpg")) {
                                                if ((!v2_4.startsWith("albumart")) || (!v2_4.endsWith("large.jpg"))) {
                                                    if ((!v2_4.contains("albumart")) || ((!v2_4.endsWith(".jpg")) || (v14 <= 2))) {
                                                        if ((!v2_4.endsWith(".jpg")) || (v14 <= 3)) {
                                                            if ((!v2_4.endsWith(".png")) || (v14 <= 4)) {
                                                                v15_0--;
                                                            } else {
                                                                v10 = v13_2[v15_0];
                                                                int v0_13 = 4;
                                                            }
                                                        } else {
                                                            v10 = v13_2[v15_0];
                                                            v0_13 = 3;
                                                        }
                                                    } else {
                                                        v10 = v13_2[v15_0];
                                                        v0_13 = 2;
                                                    }
                                                    v14 = v0_13;
                                                } else {
                                                    if (v14 <= 1) {
                                                    } else {
                                                        v10 = v13_2[v15_0];
                                                        v14 = 1;
                                                    }
                                                }
                                            } else {
                                                v10 = v13_2[v15_0];
                                            }
                                            com.android.providers.media.MediaProvider.sFolderArtMap.put(v8, v10);
                                        }
                                    } else {
                                        return 0;
                                    }
                                }
                            } else {
                                v10 = ((String) com.android.providers.media.MediaProvider.sFolderArtMap.get(v8));
                            }
                        } catch (int v0_19) {
                            throw v0_19;
                        } catch (int v0_19) {
                        }
                        if (v10 == null) {
                            return v3;
                        } else {
                            int v2_1 = new java.io.File(v8, v10);
                            if (!v2_1.exists()) {
                                return v3;
                            } else {
                                try {
                                    int v0_28 = new byte[((int) v2_1.length())];
                                    v3 = v0_28;
                                    java.io.FileInputStream v11_0 = new java.io.FileInputStream(v2_1);
                                    v11_0.read(v3);
                                } catch (int v0_32) {
                                    if (v11_0 != null) {
                                        v11_0.close();
                                    }
                                    throw v0_32;
                                } catch (int v0_31) {
                                    android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v0_31);
                                    v3 = 0;
                                    if (v11_0 == null) {
                                        return v3;
                                    } else {
                                    }
                                } catch (int v0) {
                                    v3 = 0;
                                    if (v11_0 == null) {
                                        return v3;
                                    } else {
                                    }
                                }
                                v11_0.close();
                                return v3;
                            }
                        }
                    }
                }
            } catch (int v0) {
                return v3;
            }
        } catch (int v0) {
            return v3;
        }
    }

Method com.android.providers.media.MediaScannerService.scanFile() calling method java.io.File.<init>()


    private android.net.Uri scanFile(String p8, String p9)
    {
        try {
            Exception v2_2 = new android.media.MediaScanner(this, "external");
            try {
                Throwable v4_5 = v2_2.scanSingleFile(new java.io.File(p8).getCanonicalPath(), p9);
            } catch (Throwable v3_1) {
                Throwable v4_1 = 0;
                com.android.providers.media.MediaScannerService.$closeResource(v4_1, v2_2);
                throw v3_1;
            } catch (Throwable v3_0) {
                try {
                    throw v3_0;
                } catch (Throwable v4_0) {
                    v4_1 = v3_0;
                    v3_1 = v4_0;
                }
            }
            com.android.providers.media.MediaScannerService.$closeResource(0, v2_2);
            return v4_5;
        } catch (Exception v2_1) {
            Throwable v4_3 = new StringBuilder();
            v4_3.append("bad path ");
            v4_3.append(p8);
            v4_3.append(" in scanFile()");
            android.util.Log.e("MediaScannerService", v4_3.toString(), v2_1);
            return 0;
        }
    }

Method com.android.providers.media.MediaScannerReceiver.onReceive() calling method java.io.File.<init>()


    public void onReceive(android.content.Context p10, android.content.Intent p11)
    {
        String v0 = p11.getAction();
        android.net.Uri v1 = p11.getData();
        if (!"android.intent.action.BOOT_COMPLETED".equals(v0)) {
            if (!"android.intent.action.LOCALE_CHANGED".equals(v0)) {
                if (v1.getScheme().equals("file")) {
                    String v2_3 = v1.getPath();
                    String v3_2 = android.os.Environment.getExternalStorageDirectory().getPath();
                    String v4_1 = android.os.Environment.getLegacyExternalStorageDirectory().getPath();
                    try {
                        String v2_4 = new java.io.File(v2_3).getCanonicalPath();
                    } catch (boolean v5) {
                        String v7_1 = new StringBuilder();
                        v7_1.append("couldn\'t canonicalize ");
                        v7_1.append(v2_4);
                        android.util.Log.e("MediaScannerReceiver", v7_1.toString());
                        return;
                    }
                    if (v2_4.startsWith(v4_1)) {
                        boolean v5_5 = new StringBuilder();
                        v5_5.append(v3_2);
                        v5_5.append(v2_4.substring(v4_1.length()));
                        v2_4 = v5_5.toString();
                    }
                    String v6_4 = new StringBuilder();
                    v6_4.append("action: ");
                    v6_4.append(v0);
                    v6_4.append(" path: ");
                    v6_4.append(v2_4);
                    android.util.Log.d("MediaScannerReceiver", v6_4.toString());
                    if (!"android.intent.action.MEDIA_MOUNTED".equals(v0)) {
                        if (("android.intent.action.MEDIA_SCANNER_SCAN_FILE".equals(v0)) && (v2_4 != null)) {
                            boolean v5_12 = new StringBuilder();
                            v5_12.append(v3_2);
                            v5_12.append("/");
                            if (v2_4.startsWith(v5_12.toString())) {
                                this.scanFile(p10, v2_4);
                            }
                        }
                    } else {
                        this.scan(p10, "external");
                    }
                }
            } else {
                this.scanTranslatable(p10);
            }
        } else {
            this.scan(p10, "internal");
        }
        return;
    }

Method com.android.providers.media.MediaProvider.update() calling method java.io.File.<init>()


    public int update(android.net.Uri p44, android.content.ContentValues p45, String p46, String[] p47)
    {
        int v14_0 = this;
        String v12_3 = this.safeUncanonicalize(p44);
        int v11_6 = com.android.providers.media.MediaProvider.URI_MATCHER.match(v12_3);
        android.content.ContentValues v10_4 = this.getDatabaseForUri(v12_3);
        if (v10_4 == null) {
            String v4_0 = v12_3;
            void v9 = this;
            String v15 = v11_6;
            long v1_4 = new StringBuilder();
            v1_4.append("Unknown URI: ");
            v1_4.append(v4_0);
            throw new UnsupportedOperationException(v1_4.toString());
        } else {
            v10_4.mNumUpdates = (v10_4.mNumUpdates + 1);
            String v8_2 = v10_4.getWritableDatabase();
            Throwable v0_27 = 0;
            if (p45 != null) {
                v0_27 = p45.getAsString("genre");
                p45.remove("genre");
            }
            int v23;
            String v22_1;
            String v8_5;
            String v7_8;
            String v7_5 = v0_27;
            android.content.ContentValues v5_7 = this.getTableAndWhere(v12_3, v11_6, p46);
            if (!p45.containsKey("media_type")) {
                v22_1 = v5_7;
                v23 = v7_5;
                v7_8 = v8_2;
                v8_5 = 0;
            } else {
                String v16_6 = p45.getAsLong("media_type").longValue();
                v10_4.mNumQueries = (v10_4.mNumQueries + 1);
                v22_1 = v5_7;
                v23 = v7_5;
                android.content.ContentResolver v24_1 = v8_2;
                Throwable v0_85 = v8_2.query(v5_7.table, com.android.providers.media.MediaProvider.sMediaTableColumns, v5_7.where, p47, 0, 0, 0);
                while(true) {
                    long v1_45 = v0_85;
                    if ((v1_45 == 0) || (!v1_45.moveToNext())) {
                        break;
                    }
                    String v7_16;
                    String v2_31 = v1_45.getLong(1);
                    try {
                        if ((v2_31 != 1) || (v16_6 == 1)) {
                            v7_16 = v24_1;
                            if ((v2_31 == 3) && (v16_6 != 3)) {
                                String v4_30 = new StringBuilder();
                                v4_30.append("need to remove video thumbnail for id ");
                                v4_30.append(v1_45.getString(0));
                                android.util.Log.i(com.android.providers.media.MediaProvider.TAG, v4_30.toString());
                                v14_0 = v14_0.removeThumbnailFor(android.provider.MediaStore$Video$Media.EXTERNAL_CONTENT_URI, v7_16, v1_45.getLong(0));
                            }
                        } else {
                            String v4_34 = new StringBuilder();
                            v4_34.append("need to remove image thumbnail for id ");
                            v4_34.append(v1_45.getString(0));
                            android.util.Log.i(com.android.providers.media.MediaProvider.TAG, v4_34.toString());
                            v7_16 = v24_1;
                            v14_0 = v14_0.removeThumbnailFor(android.provider.MediaStore$Images$Media.EXTERNAL_CONTENT_URI, v7_16, v1_45.getLong(0));
                        }
                        v0_85 = v1_45;
                        v24_1 = v7_16;
                    } catch (Throwable v0_109) {
                        libcore.io.IoUtils.closeQuietly(v1_45);
                        throw v0_109;
                    }
                }
                v7_8 = v24_1;
                v8_5 = 0;
                libcore.io.IoUtils.closeQuietly(v1_45);
            }
            if ((v11_6 != 702) && ((v11_6 != 703) && (v11_6 != 706))) {
                long v1_0 = 5;
                String v17_0 = 1;
                void v9_0 = v22_1;
                String v8_0 = v7_8;
                String v7_0 = 3;
            } else {
                if ((p45 == null) || (((p45.size() != 1) || (!p45.containsKey("_data"))) && ((p45.size() != 2) || ((!p45.containsKey("_data")) || (!p45.containsKey("parent")))))) {
                    v1_0 = 5;
                    v17_0 = 1;
                    v9_0 = v22_1;
                    v8_0 = v7_8;
                    v7_0 = 3;
                } else {
                    String v16_0 = 0;
                    String v2_0 = p45.getAsString("_data");
                    v14_0.mDirectoryCache.remove(v2_0);
                    long v1_1 = new java.io.File(v2_0);
                    if ((v2_0 == null) || (!v1_1.isDirectory())) {
                        v17_0 = 1;
                        v9_0 = v22_1;
                        v8_0 = v7_8;
                        v7_0 = 3;
                        String v6 = v1_1;
                        v1_0 = 5;
                        android.content.ContentValues v5_0 = v2_0;
                        if (v5_0.toLowerCase(java.util.Locale.US).endsWith("/.nomedia")) {
                            v14_0 = v14_0.processNewNoMediaPath(v10_4, v8_0, v5_0);
                        }
                    } else {
                        v10_4.mNumQueries = (v10_4.mNumQueries + 1);
                        v9_0 = v22_1;
                        java.util.HashMap v26 = v1_1;
                        boolean v27 = v2_0;
                        long v28 = v7_8;
                        Throwable v0_17 = v8_5;
                        long v1_5 = v7_8.query(v9_0.table, com.android.providers.media.MediaProvider.PATH_PROJECTION, p46, p47, 0, 0, 0);
                        try {
                            if ((v1_5 != 0) && (v1_5.moveToNext())) {
                                v16_0 = v1_5.getString(1);
                            }
                        } catch (Throwable v0_18) {
                            libcore.io.IoUtils.closeQuietly(v1_5);
                            throw v0_18;
                        }
                        String v2_7 = v16_0;
                        libcore.io.IoUtils.closeQuietly(v1_5);
                        if (v2_7 == null) {
                            android.content.ContentValues v5 = v27;
                            v8_0 = v28;
                            v1_0 = 5;
                            v7_0 = 3;
                            v17_0 = 1;
                        } else {
                            android.content.ContentValues v5_19;
                            String v6_14;
                            v14_0.mDirectoryCache.remove(v2_7);
                            v10_4.mNumUpdates = (v10_4.mNumUpdates + 1);
                            String v8_11 = v28;
                            String v3_38 = v8_11.update(v9_0.table, p45, v9_0.where, p47);
                            if (v3_38 <= null) {
                                v6_14 = v26;
                                v5_19 = v27;
                            } else {
                                String v4_21 = new Object[6];
                                v5_19 = v27;
                                v4_21[v0_17] = v5_19;
                                v4_21[1] = Integer.valueOf((v2_7.length() + 1));
                                Throwable v0_90 = new StringBuilder();
                                v0_90.append(v2_7);
                                v0_90.append("/");
                                v4_21[2] = v0_90.toString();
                                Throwable v0_93 = new StringBuilder();
                                v0_93.append(v2_7);
                                v0_93.append("0");
                                v4_21[3] = v0_93.toString();
                                v6_14 = v26;
                                v4_21[4] = v6_14.getName();
                                v4_21[5] = Integer.valueOf(v6_14.toString().toLowerCase().hashCode());
                                Throwable v0_101 = v4_21;
                                v10_4.mNumUpdates = (v10_4.mNumUpdates + 1);
                                v8_11.execSQL("UPDATE files SET _data=?1||SUBSTR(_data, ?2),bucket_display_name=?5,bucket_id=?6 WHERE _data >= ?3 AND _data < ?4;", v0_101);
                            }
                            if ((v3_38 > null) && (!v8_11.inTransaction())) {
                                this.getContext().getContentResolver().notifyChange(v12_3, 0);
                            }
                            if (v6_14.getName().startsWith(".")) {
                                v14_0.processNewNoMediaPath(v10_4, v8_11, v5_19);
                            }
                            return v3_38;
                        }
                    }
                }
            }
            String v42;
            int v11_0;
            Throwable v0_64;
            int v13_1;
            String v12_0;
            switch (v11_6) {
                case 1:
                case 2:
                case 200:
                case 201:
                    int v11_5 = v17_0;
                    v13_1 = v8_0;
                    String v8_8 = v12_3;
                    String v12_6 = v9_0;
                    void v9_6 = v14_0;
                    android.content.ContentValues v5_14 = new android.content.ContentValues(p45);
                    v5_14.remove("bucket_id");
                    v5_14.remove("bucket_display_name");
                    String v4_13 = v5_14.getAsString("_data");
                    if (v4_13 != null) {
                        com.android.providers.media.MediaProvider.computeBucketValues(v4_13, v5_14);
                    }
                    com.android.providers.media.MediaProvider.computeTakenTime(v5_14);
                    v10_4.mNumUpdates = (v10_4.mNumUpdates + v11_5);
                    String v16_7 = v13_1.update(v12_6.table, v5_14, v12_6.where, p47);
                    if ((v16_7 <= null) || (v5_14.getAsString("_data") == null)) {
                        v42 = v8_8;
                    } else {
                        v10_4.mNumQueries = (v10_4.mNumQueries + v11_5);
                        v42 = v8_8;
                        String v7_11 = v13_1.query(v12_6.table, com.android.providers.media.MediaProvider.READY_FLAG_PROJECTION, v12_6.where, p47, 0, 0, 0);
                        if (v7_11 == null) {
                            v0_64 = v16_7;
                            String v3 = p47;
                        }
                        try {
                            while (v7_11.moveToNext()) {
                                if (v7_11.getLong(2) == 0) {
                                    v9_6.requestMediaThumbnail(v7_11.getString(v11_5), v42, 10, 0);
                                }
                            }
                        } catch (Throwable v0_81) {
                            libcore.io.IoUtils.closeQuietly(v7_11);
                            throw v0_81;
                        }
                        libcore.io.IoUtils.closeQuietly(v7_11);
                    }
                case 100:
                case 101:
                    String v37;
                    int v32;
                    android.content.ContentValues v38;
                    long v34;
                    int v35;
                    int v25;
                    int v13_2;
                    int v31;
                    int v36;
                    String v6_3 = new android.content.ContentValues(p45);
                    android.content.ContentValues v5_3 = v6_3.getAsString("album_artist");
                    String v3_6 = v6_3.getAsString("compilation");
                    v6_3.remove("compilation");
                    String v2_16 = v6_3.getAsString("artist");
                    v6_3.remove("artist");
                    if (v2_16 == null) {
                        v25 = v2_16;
                        v31 = v3_6;
                        v32 = v5_3;
                        v34 = v8_0;
                        v35 = v9_0;
                        v36 = v10_4;
                        v37 = v11_6;
                        v38 = v12_3;
                        v13_2 = v6_3;
                    } else {
                        long v1_20 = v10_4.mArtistCache;
                        try {
                            String v33;
                            long v1_21;
                            Throwable v0_25 = ((Long) v1_20.get(v2_16));
                        } catch (Throwable v0_26) {
                            v25 = v2_16;
                            v32 = v5_3;
                            v35 = v9_0;
                            v37 = v11_6;
                            v15 = p47;
                        }
                        if (v0_25 != null) {
                            v25 = v2_16;
                            v31 = v3_6;
                            v32 = v5_3;
                            v33 = v6_3;
                            v34 = v8_0;
                            v35 = v9_0;
                            v36 = v10_4;
                            v37 = v11_6;
                            v38 = v12_3;
                            try {
                                v1_21 = v0_25.longValue();
                            } catch (Throwable v0_26) {
                            }
                        } else {
                            try {
                                v25 = v2_16;
                                String v2_17 = v10_4;
                                v31 = v3_6;
                                v32 = v5_3;
                                v33 = v6_3;
                                v34 = v8_0;
                                v35 = v9_0;
                                v36 = v10_4;
                                v37 = v11_6;
                                v38 = v12_3;
                                int v13_3 = v38;
                                try {
                                    v1_21 = v14_0.getKeyIdForName(v2_17, v8_0, "artists", "artist_key", "artist", v25, v25, 0, 0, 0, v1_20, v13_3);
                                } catch (Throwable v0_26) {
                                }
                            } catch (Throwable v0_26) {
                                v25 = v2_17;
                                v32 = "artist_key";
                                v35 = 0;
                                v37 = 0;
                                v15 = v13_3;
                            }
                        }
                        v13_2 = v33;
                        v13_2.put("artist_id", Integer.toString(((int) v1_21)));
                    }
                    String v40;
                    String v41;
                    String v39;
                    int v14_1;
                    String v12_2 = v13_2.getAsString("album");
                    v13_2.remove("album");
                    if (v12_2 == null) {
                        v14_1 = v13_2;
                        int v21 = v32;
                        v39 = v36;
                        v41 = v37;
                        v40 = v38;
                    } else {
                        void v9_3;
                        android.content.ContentValues v5_5;
                        String v16_5;
                        String v7_6 = v13_2.getAsString("_data");
                        String v8_4 = 0;
                        int v11_2 = v32;
                        if (v11_2 == 0) {
                            android.content.ContentValues v10_1 = v31;
                            if ((v10_1 == null) || (!v10_1.equals("1"))) {
                                if (v7_6 != null) {
                                    v9_3 = v37;
                                    v5_5 = v38;
                                } else {
                                    v9_3 = v37;
                                    if (v9_3 != 100) {
                                        long v1_26 = v14_0.query(v38, new String[] {"_data"}), 0, 0, 0);
                                        if (v1_26 == 0) {
                                            v5_5 = v38;
                                        } else {
                                            try {
                                                Throwable v0_36 = v1_26.getCount();
                                            } catch (Throwable v0_38) {
                                                libcore.io.IoUtils.closeQuietly(v1_26);
                                                throw v0_38;
                                            }
                                            if (v0_36 != 1) {
                                                String v3_12 = new StringBuilder();
                                                v3_12.append("");
                                                v3_12.append(v0_36);
                                                v3_12.append(" rows for ");
                                                v5_5 = v38;
                                                try {
                                                    v3_12.append(v5_5);
                                                    android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v3_12.toString());
                                                } catch (Throwable v0_38) {
                                                }
                                            } else {
                                                try {
                                                    v1_26.moveToFirst();
                                                    v7_6 = v1_26.getString(0);
                                                    v5_5 = v38;
                                                } catch (Throwable v0_38) {
                                                }
                                            }
                                            libcore.io.IoUtils.closeQuietly(v1_26);
                                        }
                                    } else {
                                        android.util.Log.w(com.android.providers.media.MediaProvider.TAG, "Possible multi row album name update without path could give wrong album key");
                                        v5_5 = v38;
                                    }
                                }
                                if (v7_6 != null) {
                                    v8_4 = v7_6.substring(0, v7_6.lastIndexOf(47)).hashCode();
                                }
                                v16_5 = v7_6;
                            } else {
                                v16_5 = v7_6;
                                v9_3 = v37;
                                v5_5 = v38;
                            }
                        } else {
                            v8_4 = v11_2.hashCode();
                            v16_5 = v7_6;
                        }
                        String v7_7 = v12_2.toString();
                        String v4_9 = v36;
                        String v3_15 = v4_9.mAlbumCache;
                        try {
                            long v1_31;
                            Throwable v0_47 = new StringBuilder();
                            v0_47.append(v7_7);
                            v0_47.append(v8_4);
                            Throwable v0_48 = v0_47.toString();
                            String v2_23 = ((Long) v3_15.get(v0_48));
                        } catch (Throwable v0_49) {
                            v39 = v4_9;
                            String v17 = v7_7;
                            v41 = v9_3;
                            v21 = v11_2;
                            int v14 = v13_2;
                            throw v0_49;
                        } catch (Throwable v0_49) {
                        }
                        if (v2_23 != null) {
                            v39 = v4_9;
                            v40 = v5_5;
                            Throwable v18 = v8_4;
                            v41 = v9_3;
                            v21 = v11_2;
                            v14_1 = v13_2;
                            v1_31 = v2_23.longValue();
                        } else {
                            v39 = v4_9;
                            v40 = v5_5;
                            v41 = v9_3;
                            v14_1 = v13_2;
                            v1_31 = v14_0.getKeyIdForName(v4_9, v34, "albums", "album_key", "album", v7_7, v0_48, v16_5, v8_4, v25, v3_15, v40);
                        }
                        v14_1.put("album_id", Integer.toString(((int) v1_31)));
                    }
                    String v2_26;
                    void v9_5;
                    v14_1.remove("title_key");
                    long v1_33 = v14_1.getAsString("title");
                    if (v1_33 == 0) {
                        v2_26 = v14_1;
                        v9_5 = this;
                    } else {
                        v2_26 = v14_1;
                        v9_5 = this;
                        try {
                            Throwable v0_56 = this.getLocalizedTitle(v1_33);
                        } catch (Throwable v0) {
                            v2_26.put("title_resource_uri", v1_33);
                            v2_26.put("title_key", android.provider.MediaStore$Audio.keyFor(v1_33));
                            v2_26.put("title", v1_33.trim());
                        }
                        if (v0_56 == null) {
                            v2_26.putNull("title_resource_uri");
                        } else {
                            v2_26.put("title_resource_uri", v1_33);
                            v1_33 = v0_56;
                        }
                    }
                    String v8_7;
                    android.content.ContentValues v10_3 = v39;
                    v10_3.mNumUpdates = (v10_3.mNumUpdates + 1);
                    String v12_5 = v35;
                    v13_1 = v34;
                    v0_64 = v13_1.update(v12_5.table, v2_26, v12_5.where, p47);
                    int v14_2 = v23;
                    if (v14_2 == 0) {
                        v8_7 = v40;
                    } else {
                        String v15_2;
                        if (v0_64 != 1) {
                            v8_7 = v40;
                            v15_2 = v41;
                        } else {
                            v15_2 = v41;
                            if (v15_2 != 101) {
                                v8_7 = v40;
                            } else {
                                v8_7 = v40;
                                v9_5.updateGenre(Long.parseLong(((String) v8_7.getPathSegments().get(3))), v14_2);
                                v42 = v8_7;
                            }
                        }
                        android.content.ContentValues v5_10 = new StringBuilder();
                        v5_10.append("ignoring genre in update: count = ");
                        v5_10.append(v0_64);
                        v5_10.append(" match = ");
                        v5_10.append(v15_2);
                        android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v5_10.toString());
                    }
                    break;
                case 113:
                    if (v12_3.getQueryParameter("move") == null) {
                        v13_1 = v8_0;
                        v42 = v12_3;
                        v11_0 = v17_0;
                        v12_0 = v9_0;
                        v14 = v23;
                        v10_4.mNumUpdates = (v10_4.mNumUpdates + v11_0);
                        v0_64 = v13_1.update(v12_0.table, p45, v12_0.where, p47);
                    } else {
                        if (!p45.containsKey("play_order")) {
                            String v2_10 = new StringBuilder();
                            v2_10.append("Need to specify ");
                            v2_10.append("play_order");
                            v2_10.append(" when using \'move\' parameter");
                            throw new IllegalArgumentException(v2_10.toString());
                        } else {
                            String v16_1 = p45.getAsInteger("play_order").intValue();
                            String v4_2 = v12_3.getPathSegments();
                            v0 = "play_order";
                            return v14_0.movePlaylistEntry(v10_4, v8_0, Long.parseLong(((String) v4_2.get(v7_0))), Integer.parseInt(((String) v4_2.get(v1_0))), v16_1);
                        }
                    }
                default:
                    v13_1 = v8_0;
                    v42 = v12_3;
                    v11_0 = v17_0;
                    v12_0 = v9_0;
                    v14 = v23;
            }
            if ((v0_64 > null) && (!v13_1.inTransaction())) {
                this.getContext().getContentResolver().notifyChange(v42, 0);
            }
            return v0_64;
        }
    }

Method com.android.providers.media.MediaProvider.queryForDataFile() calling method java.io.File.<init>()


    private java.io.File queryForDataFile(android.net.Uri p8)
    {
        android.database.Cursor v0_1 = this.query(p8, new String[] {"_data"}), 0, 0, 0);
        if (v0_1 == null) {
            java.io.FileNotFoundException v2_1 = new StringBuilder();
            v2_1.append("Missing cursor for ");
            v2_1.append(p8);
            throw new java.io.FileNotFoundException(v2_1.toString());
        } else {
            try {
                switch (v0_1.getCount()) {
                    case 0:
                        java.io.FileNotFoundException v2_11 = new StringBuilder();
                        v2_11.append("No entry for ");
                        v2_11.append(p8);
                        throw new java.io.FileNotFoundException(v2_11.toString());
                        break;
                    case 1:
                        if (!v0_1.moveToFirst()) {
                            java.io.FileNotFoundException v2_4 = new StringBuilder();
                            v2_4.append("Unable to read entry for ");
                            v2_4.append(p8);
                            throw new java.io.FileNotFoundException(v2_4.toString());
                        } else {
                            java.io.FileNotFoundException v1_7 = v0_1.getString(0);
                            if (v1_7 == null) {
                                String v3_4 = new StringBuilder();
                                v3_4.append("Null path for ");
                                v3_4.append(p8);
                                throw new java.io.FileNotFoundException(v3_4.toString());
                            } else {
                                java.io.FileNotFoundException v2_9 = new java.io.File(v1_7);
                                libcore.io.IoUtils.closeQuietly(v0_1);
                                return v2_9;
                            }
                        }
                    default:
                        java.io.FileNotFoundException v2_14 = new StringBuilder();
                        v2_14.append("Multiple items at ");
                        v2_14.append(p8);
                        throw new java.io.FileNotFoundException(v2_14.toString());
                }
            } catch (java.io.FileNotFoundException v1_13) {
            }
            libcore.io.IoUtils.closeQuietly(v0_1);
            throw v1_13;
        }
    }

Method com.android.providers.media.MediaProvider.pruneThumbnails() calling method java.io.File.<init>()


    private void pruneThumbnails()
    {
        android.util.Log.v(com.android.providers.media.MediaProvider.TAG, "pruneThumbnails ");
        android.database.sqlite.SQLiteDatabase v12 = this.getDatabaseForUri(android.provider.MediaStore$Images$Thumbnails.getContentUri("external")).getWritableDatabase();
        v12.execSQL("delete from thumbnails where image_id not in (select _id from images)");
        v12.execSQL("delete from videothumbnails where video_id not in (select _id from video)");
        java.util.HashSet v13 = new java.util.HashSet();
        try {
            String v4_2 = new java.io.File("/sdcard/DCIM/.thumbnails").getCanonicalFile();
            String v5_0 = v4_2.list();
        } catch (SecurityException v0) {
            return;
        }
        if (v5_0 == null) {
            String[] v6_0 = new String[0];
            v5_0 = v6_0;
        }
        String[] v6_1 = v4_2.getPath();
        int v7_0 = 0;
        while (v7_0 < v5_0.length) {
            if (v5_0[v7_0].endsWith(".jpg")) {
                int v8_5 = new StringBuilder();
                v8_5.append(v6_1);
                v8_5.append("/");
                v8_5.append(v5_0[v7_0]);
                v13.add(v8_5.toString());
            }
            v7_0++;
        }
        SecurityException v0_8 = new String[] {"thumbnails", "videothumbnails"});
        int v15 = v0_8.length;
        int v11_0 = 0;
        while (v11_0 < v15) {
            int v18 = v11_0;
            String v4_8 = v12.query(v0_8[v11_0], new String[] {"_data"}), 0, 0, 0, 0, 0);
            if ((v4_8 != null) && (v4_8.moveToFirst())) {
                do {
                    v13.remove(v4_8.getString(0));
                } while(v4_8.moveToNext());
            }
            libcore.io.IoUtils.closeQuietly(v4_8);
            v11_0 = (v18 + 1);
        }
        String v4_4 = v13.iterator();
        while (v4_4.hasNext()) {
            try {
                new java.io.File(((String) v4_4.next())).delete();
            } catch (SecurityException v0) {
            }
        }
        android.util.Log.v(com.android.providers.media.MediaProvider.TAG, "/pruneDeadThumbnailFiles... ");
        return;
    }

Method com.android.providers.media.MediaProvider.processNewNoMediaPath() calling method java.io.File.<init>()


    private void processNewNoMediaPath(com.android.providers.media.MediaProvider$DatabaseHelper p10, android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        java.io.File v0_1 = new java.io.File(p12);
        if (!v0_1.exists()) {
            com.android.providers.media.MediaProvider$5 v8 = new com.android.providers.media.MediaProvider$5;
            v8(this, v0_1, p10, p11, p12);
            new Thread(v8).start();
        } else {
            this.hidePath(p10, p11, p12);
        }
        return;
    }

Method com.android.providers.media.MediaProvider.insertFile() calling method java.io.File.<init>()


    private long insertFile(com.android.providers.media.MediaProvider$DatabaseHelper p36, android.net.Uri p37, android.content.ContentValues p38, int p39, boolean p40, java.util.ArrayList p41)
    {
        com.android.providers.media.MediaProvider v7_2;
        com.android.providers.media.MediaProvider$DatabaseHelper v1_18;
        Long v21_0;
        int v29;
        Long v5_2;
        int v11_3 = p36.getWritableDatabase();
        int v0_5 = 0;
        switch (p39) {
            case 1:
                v21_0 = 0;
                v29 = v11_3;
                v7_2 = this;
                v1_18 = p36;
                v5_2 = p38;
                v0_5 = this.ensureFile(p36.mInternal, p38, ".jpg", android.os.Environment.DIRECTORY_PICTURES);
                v0_5.put("date_added", Long.valueOf((System.currentTimeMillis() / 1000)));
                android.content.ContentValues v2_6 = v0_5.getAsString("_data");
                if (!v0_5.containsKey("_display_name")) {
                    com.android.providers.media.MediaProvider.computeDisplayName(v2_6, v0_5);
                }
                com.android.providers.media.MediaProvider.computeTakenTime(v0_5);
                break;
            case 2:
                int v0_25;
                android.database.sqlite.SQLiteDatabase v9_2 = new android.content.ContentValues(p38);
                long v8_7 = v9_2.getAsString("album_artist");
                com.android.providers.media.MediaProvider v7_3 = v9_2.getAsString("compilation");
                v9_2.remove("compilation");
                java.util.ArrayList v6_5 = v9_2.get("artist");
                if (v6_5 != null) {
                    v0_25 = v6_5.toString();
                } else {
                    v0_25 = "";
                }
                Long v5_8 = v0_25;
                v9_2.remove("artist");
                int v4_5 = p36.mArtistCache;
                java.util.HashMap v3_13 = v9_2.getAsString("_data");
                try {
                    int v14_1;
                    String v23_1;
                    com.android.providers.media.MediaProvider$DatabaseHelper v1_1;
                    String v25;
                    long v18_8;
                    String v26;
                    int v27;
                    int v0_48 = ((Long) v4_5.get(v5_8));
                } catch (int v0_0) {
                    Throwable v24 = v4_5;
                    String v19 = v6_5;
                    v26 = v8_7;
                    v29 = v11_3;
                }
                if (v0_48 != 0) {
                    v23_1 = v3_13;
                    v18_8 = v5_8;
                    v25 = v7_3;
                    v26 = v8_7;
                    v27 = v9_2;
                    v14_1 = 0;
                    v29 = v11_3;
                    try {
                        v1_1 = v0_48.longValue();
                    } catch (int v0_0) {
                        com.android.providers.media.MediaProvider v7 = this;
                    }
                } else {
                    try {
                        v23_1 = v3_13;
                        v18_8 = v5_8;
                        v25 = v7_3;
                        com.android.providers.media.MediaProvider v7_4 = v18_8;
                        v26 = v8_7;
                        v27 = v9_2;
                        android.database.sqlite.SQLiteDatabase v9_3 = v23_1;
                        v14_1 = 0;
                        v29 = v11_3;
                        try {
                            v1_1 = this.getKeyIdForName(p36, v11_3, "artists", "artist_key", "artist", v7_4, v18_8, v9_3, 0, 0, v4_5, p37);
                        } catch (int v0_0) {
                            v7 = this;
                        }
                    } catch (int v0_0) {
                        long v18 = "artist_key";
                        v29 = 0;
                        v25 = v7_4;
                        Throwable v15 = v9_3;
                    }
                }
                int v0_2;
                Long v12_1 = v1_1;
                int v11_1 = v18_8;
                Throwable v10_1 = v27;
                android.database.sqlite.SQLiteDatabase v9_0 = v10_1.get("album");
                if (v9_0 != null) {
                    v0_2 = v9_0.toString();
                } else {
                    v0_2 = "";
                }
                int v4_0;
                long v8_0 = v0_2;
                v10_1.remove("album");
                com.android.providers.media.MediaProvider v7_0 = p36.mAlbumCache;
                int v0_4 = 0;
                java.util.ArrayList v6_0 = v26;
                if (v6_0 == null) {
                    Long v5_0 = v25;
                    try {
                        if ((v5_0 == null) || (!v5_0.equals("1"))) {
                            v4_0 = v23_1;
                            try {
                                v0_4 = v4_0.substring(v14_1, v4_0.lastIndexOf(47)).hashCode();
                            } catch (int v0_6) {
                                v25 = v5_0;
                                com.android.providers.media.MediaProvider v20 = v7_0;
                                android.database.sqlite.SQLiteDatabase v28 = v9_0;
                                java.util.HashMap v3 = v12_1;
                            }
                            java.util.HashMap v30;
                            Throwable v15_1;
                            com.android.providers.media.MediaProvider$DatabaseHelper v1_16;
                            com.android.providers.media.MediaProvider$DatabaseHelper v1_12 = new StringBuilder();
                            v1_12.append(v8_0);
                            v1_12.append(v0_4);
                            java.util.HashMap v3_1 = v1_12.toString();
                            android.content.ContentValues v2_1 = ((Long) v7_0.get(v3_1));
                            if (v2_1 != null) {
                                String v23 = v4_0;
                                v26 = v6_0;
                                v27 = v8_0;
                                v15_1 = v10_1;
                                v30 = v12_1;
                                v21_0 = v14_1;
                                try {
                                    v1_16 = v2_1.longValue();
                                } catch (int v0_6) {
                                    v7 = this;
                                }
                            } else {
                                try {
                                    v21_0 = v14_1;
                                    com.android.providers.media.MediaProvider v7_1 = v8_0;
                                    android.database.sqlite.SQLiteDatabase v9_1 = v4_0;
                                    v15_1 = v10_1;
                                    v30 = v12_1;
                                    Long v12_2 = v7_0;
                                    try {
                                        v1_16 = this.getKeyIdForName(p36, v29, "albums", "album_key", "album", v7_1, v3_1, v9_1, v0_4, v11_1, v12_2, p37);
                                    } catch (int v0_6) {
                                    }
                                } catch (int v0_6) {
                                    v25 = "album_key";
                                    v20 = v7_1;
                                    v28 = v9_1;
                                    v3 = v12_2;
                                }
                            }
                            int v0_10;
                            v15_1.put("artist_id", Integer.toString(((int) v30)));
                            v15_1.put("album_id", Integer.toString(((int) v1_16)));
                            Long v5_7 = v15_1.getAsString("title");
                            if (v5_7 != null) {
                                v0_10 = v5_7.toString();
                            } else {
                                v0_10 = "";
                            }
                            java.util.ArrayList v6_2 = v0_10;
                            v7_2 = this;
                            try {
                                int v0_11 = this.getLocalizedTitle(v6_2);
                            } catch (int v0) {
                                v15_1.put("title_resource_uri", v6_2);
                                v15_1.put("title_key", android.provider.MediaStore$Audio.keyFor(v6_2));
                                v15_1.put("title", v6_2.trim());
                                com.android.providers.media.MediaProvider.computeDisplayName(v15_1.getAsString("_data"), v15_1);
                                v0_5 = v15_1;
                                v1_18 = p36;
                                v5_2 = p38;
                            }
                            if (v0_11 == 0) {
                                v15_1.putNull("title_resource_uri");
                            } else {
                                v15_1.put("title_resource_uri", v6_2);
                                v6_2 = v0_11;
                            }
                        } else {
                            v4_0 = v23_1;
                        }
                    } catch (int v0_6) {
                        v20 = v7_0;
                        v28 = v9_0;
                        v3 = v12_1;
                    }
                    while(true) {
                        throw v0_6;
                    }
                } else {
                    try {
                        v0_4 = v6_0.hashCode();
                        v4_0 = v23_1;
                    } catch (int v0_6) {
                    }
                }
                try {
                } catch (int v0_6) {
                }
                break;
            case 3:
                v0_5 = this.ensureFile(p36.mInternal, p38, ".3gp", "video");
                com.android.providers.media.MediaProvider.computeDisplayName(v0_5.getAsString("_data"), v0_5);
                com.android.providers.media.MediaProvider.computeTakenTime(v0_5);
                v21_0 = 0;
                v29 = v11_3;
                v5_2 = p38;
                v7_2 = this;
                v1_18 = p36;
                break;
            default:
                v21_0 = 0;
                v29 = v11_3;
                v5_2 = p38;
                v7_2 = this;
                v1_18 = p36;
        }
        if (v0_5 == 0) {
            v0_5 = new android.content.ContentValues(v5_2);
        }
        android.content.ContentValues v2_10 = v0_5.getAsString("_data");
        if (v2_10 != null) {
            com.android.providers.media.MediaProvider.computeBucketValues(v2_10, v0_5);
        }
        v0_5.put("date_added", Long.valueOf((System.currentTimeMillis() / 1000)));
        java.util.HashMap v3_11 = 0;
        java.util.ArrayList v6_4 = v0_5.getAsInteger("media_scanner_new_object_id");
        if (v6_4 != null) {
            v3_11 = ((long) v6_4.intValue());
            v0_5 = new android.content.ContentValues(v0_5);
            v0_5.remove("media_scanner_new_object_id");
        }
        long v8_14 = v3_11;
        java.util.HashMap v3_12 = v0_5;
        int v0_20 = v3_12.getAsString("title");
        if ((v0_20 == 0) && (v2_10 != null)) {
            v0_20 = android.media.MediaFile.getFileTitle(v2_10);
        }
        int v11_2;
        v3_12.put("title", v0_20);
        int v0_24 = v3_12.getAsString("mime_type");
        Throwable v10_4 = v3_12.getAsInteger("format");
        if (v10_4 != null) {
            v11_2 = v10_4.intValue();
        } else {
            v11_2 = v21_0;
        }
        Throwable v15_2;
        if (v11_2 != 0) {
            v15_2 = v29;
        } else {
            if (!android.text.TextUtils.isEmpty(v2_10)) {
                v15_2 = v29;
                v11_2 = android.media.MediaFile.getFormatCode(v2_10, v0_24);
            } else {
                if (p39 != 4) {
                    v15_2 = v29;
                    android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "path is empty in insertFile()");
                } else {
                    v3_12.put("format", Integer.valueOf(47621));
                    int v14_6 = new StringBuilder();
                    v14_6.append(v7_2.mExternalStoragePaths[v21_0]);
                    v14_6.append("/Playlists/");
                    v14_6.append(v3_12.getAsString("name"));
                    v2_10 = v14_6.toString();
                    v3_12.put("_data", v2_10);
                    v15_2 = v29;
                    v3_12.put("parent", Long.valueOf(v7_2.getParent(v1_18, v15_2, v2_10)));
                }
            }
        }
        if ((v2_10 == null) || (!v2_10.endsWith("/"))) {
            if (v11_2 != 0) {
                v3_12.put("format", Integer.valueOf(v11_2));
                if (v0_24 == 0) {
                    v0_24 = android.media.MediaFile.getMimeTypeForFormatCode(v11_2);
                }
            }
            if ((v0_24 == 0) && ((v2_10 != null) && (v11_2 != 12289))) {
                v0_24 = android.media.MediaFile.getMimeTypeForFile(v2_10);
            }
            int v14_11;
            String v13_7 = v0_24;
            if (v13_7 == null) {
                v14_11 = p39;
            } else {
                v3_12.put("mime_type", v13_7);
                if (v3_12.containsKey("media_type")) {
                } else {
                    v14_11 = p39;
                    if ((p39 == 0) && (!android.media.MediaScanner.isNoMediaPath(v2_10))) {
                        int v0_31 = android.media.MediaFile.getFileTypeForMimeType(v13_7);
                        if (!android.media.MediaFile.isAudioFileType(v0_31)) {
                            if (!android.media.MediaFile.isVideoFileType(v0_31)) {
                                if (!android.media.MediaFile.isImageFileType(v0_31)) {
                                    if (android.media.MediaFile.isPlayListFileType(v0_31)) {
                                        v14_11 = 4;
                                    }
                                } else {
                                    v14_11 = 1;
                                }
                            } else {
                                v14_11 = 3;
                            }
                        } else {
                            v14_11 = 2;
                        }
                    }
                }
            }
            v3_12.put("media_type", Integer.valueOf(v14_11));
            if (v8_14 != 0) {
                Exception v34 = v6_4;
                v1_18.mNumUpdates = (v1_18.mNumUpdates + 1);
                Long v5_10 = new String[1];
                v5_10[v21_0] = Long.toString(v8_14);
                v15_2.update("files", v3_12, "_id=?", v5_10);
            } else {
                if (v14_11 != 4) {
                    if (v2_10 == null) {
                        v34 = v6_4;
                        throw new IllegalArgumentException("no path was provided when inserting new file");
                    }
                } else {
                    if ((v3_12.getAsString("name") == null) && (v2_10 == null)) {
                        throw new IllegalArgumentException("no name was provided when inserting abstract playlist");
                    }
                }
                if (v2_10 == null) {
                    v34 = v6_4;
                } else {
                    int v0_46 = new java.io.File(v2_10);
                    if (!v0_46.exists()) {
                    } else {
                        v3_12.put("date_modified", Long.valueOf((v0_46.lastModified() / 1000)));
                        if (!v3_12.containsKey("_size")) {
                            v3_12.put("_size", Long.valueOf(v0_46.length()));
                        }
                        if ((v14_11 == 1) || (v14_11 == 3)) {
                            com.android.providers.media.MediaProvider.computeTakenTime(v3_12);
                        }
                    }
                }
                if ((v3_12.getAsLong("parent") == null) && (v2_10 != null)) {
                    v3_12.put("parent", Long.valueOf(v7_2.getParent(v1_18, v15_2, v2_10)));
                }
                v1_18.mNumInserts = (v1_18.mNumInserts + 1);
                v8_14 = v15_2.insert("files", "date_modified", v3_12);
                if ((v8_14 != -1) && (p40)) {
                    p41.add(Long.valueOf(v8_14));
                }
            }
            if (v11_2 == 12289) {
                try {
                    v7_2.mDirectoryCache.put(v2_10, Long.valueOf(v8_14));
                } catch (int v0_53) {
                    throw v0_53;
                }
            }
            return v8_14;
        } else {
            Long v12_18 = new StringBuilder();
            v12_18.append("directory has trailing slash: ");
            v12_18.append(v2_10);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v12_18.toString());
            return 0;
        }
    }

Method com.android.providers.media.MediaProvider.insertDirectory() calling method java.io.File.<init>()


    private long insertDirectory(com.android.providers.media.MediaProvider$DatabaseHelper p8, android.database.sqlite.SQLiteDatabase p9, String p10)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.put("format", Integer.valueOf(12289));
        v0_1.put("_data", p10);
        v0_1.put("parent", Long.valueOf(this.getParent(p8, p9, p10)));
        java.io.File v1_1 = new java.io.File(p10);
        if (v1_1.exists()) {
            v0_1.put("date_modified", Long.valueOf((v1_1.lastModified() / 1000)));
        }
        p8.mNumInserts = (p8.mNumInserts + 1);
        return p9.insert("files", "date_modified", v0_1);
    }

Method com.android.providers.media.MediaProvider.hidePath() calling method java.io.File.<init>()


    private void hidePath(com.android.providers.media.MediaProvider$DatabaseHelper p19, android.database.sqlite.SQLiteDatabase p20, String p21)
    {
        android.database.Cursor v1_1;
        int v10_4 = 1;
        android.media.MediaScanner.clearMediaPathCache(1, 0);
        java.io.File v13 = new java.io.File(p21);
        if (!v13.isDirectory()) {
            v1_1 = v13.getParent();
        } else {
            v1_1 = p21;
        }
        String v14 = v1_1;
        android.net.Uri v5_1 = new String[2];
        android.database.Cursor v1_4 = new StringBuilder();
        v1_4.append(v14);
        v1_4.append("/");
        v5_1[0] = v1_4.toString();
        android.database.Cursor v1_7 = new StringBuilder();
        v1_7.append(v14);
        v1_7.append("0");
        v5_1[1] = v1_7.toString();
        android.database.Cursor v1_10 = p20.query("files", new String[] {"_id", "media_type"}), "_data >= ? AND _data < ? AND (media_type=1 OR media_type=3) AND mini_thumb_magic IS NOT NULL", v5_1, 0, 0, 0);
        if (v1_10 != null) {
            if (v1_10.getCount() != 0) {
                android.content.ContentValues v2_3 = android.net.Uri.parse("content://media/external/images/media");
                int v3_3 = android.net.Uri.parse("content://media/external/videos/media");
                while (v1_10.moveToNext()) {
                    int v8_2;
                    long v4_0 = v1_10.getLong(0);
                    long v6_1 = v1_10.getLong(v10_4);
                    int v10_1 = new StringBuilder();
                    v10_1.append("hiding image ");
                    v10_1.append(v4_0);
                    v10_1.append(", removing thumbnail");
                    android.util.Log.i(com.android.providers.media.MediaProvider.TAG, v10_1.toString());
                    if (v6_1 != 1) {
                        v8_2 = v3_3;
                    } else {
                        v8_2 = v2_3;
                    }
                    this.removeThumbnailFor(v8_2, p20, v4_0);
                    v10_4 = 1;
                }
            }
            libcore.io.IoUtils.closeQuietly(v1_10);
        }
        android.content.ContentValues v2_5 = new android.content.ContentValues();
        v2_5.put("media_type", Integer.valueOf(0));
        android.net.Uri v5_3 = new String[2];
        long v6_6 = new StringBuilder();
        v6_6.append(v14);
        v6_6.append("/");
        v5_3[0] = v6_6.toString();
        long v6_9 = new StringBuilder();
        v6_9.append(v14);
        v6_9.append("0");
        v5_3[1] = v6_9.toString();
        p19.mNumUpdates = (p19.mNumUpdates + p20.update("files", v2_5, "_data >= ? AND _data < ?", v5_3));
        this.getContext().getContentResolver().notifyChange(android.net.Uri.parse("content://media/"), 0);
        return;
    }

Method com.android.providers.media.MediaProvider.getCompressedAlbumArt() calling method java.io.File.<init>()


    private static byte[] getCompressedAlbumArt(android.content.Context p19, String[] p20, String p21)
    {
        int v2_0 = 0;
        int v3 = 0;
        try {
            android.os.ParcelFileDescriptor v5 = android.os.ParcelFileDescriptor.open(new java.io.File(p21), 268435456);
            try {
                int v6_1 = new android.media.MediaScanner(p19, "internal");
                try {
                    v3 = v6_1.extractAlbumArt(v5.getFileDescriptor());
                } catch (int v0_36) {
                    com.android.providers.media.MediaProvider.$closeResource(v2_0, v6_1);
                    throw v0_36;
                } catch (int v0_35) {
                    v2_0 = v0_35;
                    try {
                        throw v2_0;
                    } catch (int v0_36) {
                    }
                } catch (int v0) {
                    return v3;
                }
                com.android.providers.media.MediaProvider.$closeResource(0, v6_1);
                v5.close();
                if ((v3 != 0) || (p21 == null)) {
                    return v3;
                } else {
                    int v6_2 = p21.lastIndexOf(47);
                    if (v6_2 <= 0) {
                        return v3;
                    } else {
                        String v8 = p21.substring(0, v6_2);
                        String vtmp7 = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
                        String v10 = 0;
                        try {
                            if (!com.android.providers.media.MediaProvider.sFolderArtMap.containsKey(v8)) {
                                if ((!com.android.providers.media.MediaProvider.isRootStorageDir(p20, v8)) && (!v8.equalsIgnoreCase(vtmp7))) {
                                    int v0_16 = new java.io.File(v8);
                                    String v13_2 = v0_16.list();
                                    if (v13_2 != null) {
                                        v10 = 0;
                                        int v14 = 1000;
                                        int v15_0 = (v13_2.length - 1);
                                        while (v15_0 >= 0) {
                                            int v2_4 = v13_2[v15_0].toLowerCase();
                                            if (!v2_4.equals("albumart.jpg")) {
                                                if ((!v2_4.startsWith("albumart")) || (!v2_4.endsWith("large.jpg"))) {
                                                    if ((!v2_4.contains("albumart")) || ((!v2_4.endsWith(".jpg")) || (v14 <= 2))) {
                                                        if ((!v2_4.endsWith(".jpg")) || (v14 <= 3)) {
                                                            if ((!v2_4.endsWith(".png")) || (v14 <= 4)) {
                                                                v15_0--;
                                                            } else {
                                                                v10 = v13_2[v15_0];
                                                                int v0_13 = 4;
                                                            }
                                                        } else {
                                                            v10 = v13_2[v15_0];
                                                            v0_13 = 3;
                                                        }
                                                    } else {
                                                        v10 = v13_2[v15_0];
                                                        v0_13 = 2;
                                                    }
                                                    v14 = v0_13;
                                                } else {
                                                    if (v14 <= 1) {
                                                    } else {
                                                        v10 = v13_2[v15_0];
                                                        v14 = 1;
                                                    }
                                                }
                                            } else {
                                                v10 = v13_2[v15_0];
                                            }
                                            com.android.providers.media.MediaProvider.sFolderArtMap.put(v8, v10);
                                        }
                                    } else {
                                        return 0;
                                    }
                                }
                            } else {
                                v10 = ((String) com.android.providers.media.MediaProvider.sFolderArtMap.get(v8));
                            }
                        } catch (int v0_19) {
                            throw v0_19;
                        } catch (int v0_19) {
                        }
                        if (v10 == null) {
                            return v3;
                        } else {
                            int v2_1 = new java.io.File(v8, v10);
                            if (!v2_1.exists()) {
                                return v3;
                            } else {
                                try {
                                    int v0_28 = new byte[((int) v2_1.length())];
                                    v3 = v0_28;
                                    java.io.FileInputStream v11_0 = new java.io.FileInputStream(v2_1);
                                    v11_0.read(v3);
                                } catch (int v0_32) {
                                    if (v11_0 != null) {
                                        v11_0.close();
                                    }
                                    throw v0_32;
                                } catch (int v0_31) {
                                    android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v0_31);
                                    v3 = 0;
                                    if (v11_0 == null) {
                                        return v3;
                                    } else {
                                    }
                                } catch (int v0) {
                                    v3 = 0;
                                    if (v11_0 == null) {
                                        return v3;
                                    } else {
                                    }
                                }
                                v11_0.close();
                                return v3;
                            }
                        }
                    }
                }
            } catch (int v0) {
                return v3;
            }
        } catch (int v0) {
            return v3;
        }
    }

Method com.android.providers.media.MediaProvider.generateFileName() calling method java.io.File.<init>()


    private String generateFileName(boolean p6, String p7, String p8)
    {
        String v0_1 = String.valueOf(System.currentTimeMillis());
        if (p6) {
            throw new UnsupportedOperationException("Writing to internal storage is not supported.");
        } else {
            UnsupportedOperationException v1_0 = new StringBuilder();
            v1_0.append(this.mExternalStoragePaths[0]);
            v1_0.append("/");
            v1_0.append(p8);
            UnsupportedOperationException v1_1 = v1_0.toString();
            new java.io.File(v1_1).mkdirs();
            String v3_2 = new StringBuilder();
            v3_2.append(v1_1);
            v3_2.append("/");
            v3_2.append(v0_1);
            v3_2.append(p7);
            return v3_2.toString();
        }
    }

Method com.android.providers.media.MediaProvider.fixParentIdIfNeeded() calling method java.io.File.<init>()


    private void fixParentIdIfNeeded()
    {
        com.android.providers.media.MediaProvider$DatabaseHelper v2 = this.getDatabaseForUri(android.net.Uri.parse("content://media/external/file"));
        if (v2 != null) {
            android.database.sqlite.SQLiteDatabase v12 = v2.getWritableDatabase();
            int v11_0 = 0;
            long v14 = -1;
            int v10_0 = 0;
            String v0_9 = 1;
            while(true) {
                android.net.Uri v3_9;
                int v16 = v0_9;
                String v0_11 = new StringBuilder();
                v0_11.append("parent != 0 AND parent NOT IN (SELECT _id FROM files)");
                if (v14 >= 0) {
                    android.net.Uri v3_8 = new StringBuilder();
                    v3_8.append(" AND _id > ");
                    v3_8.append(v14);
                    v3_9 = v3_8.toString();
                } else {
                    v3_9 = "";
                }
                v0_11.append(v3_9);
                int v18 = v10_0;
                int v13_4 = v11_0;
                android.net.Uri v3_11 = v12.query("files", com.android.providers.media.MediaProvider.sDataId, v0_11.toString(), 0, 0, 0, "_id ASC", "500");
                if (v3_11 != null) {
                    try {
                        if (v3_11.getCount() != 0) {
                            v11_0 = (v13_4 + v3_11.getCount());
                            if (v16 != 0) {
                                try {
                                } catch (String v0_5) {
                                    libcore.io.IoUtils.closeQuietly(v3_11);
                                    throw v0_5;
                                }
                                this.mDirectoryCache.clear();
                                v16 = 0;
                            }
                            v10_0 = v18;
                            try {
                                while (v3_11.moveToNext()) {
                                    String v4_9 = v3_11.getString(0);
                                    v14 = v3_11.getLong(1);
                                    if (!new java.io.File(v4_9).exists()) {
                                        String v5_10 = new StringBuilder();
                                        v5_10.append("_id=");
                                        v5_10.append(v14);
                                        v12.delete("files", v5_10.toString(), 0);
                                    } else {
                                        int v7_4 = this.getParent(v2, v12, v4_9);
                                        android.content.ContentValues v9_2 = new android.content.ContentValues();
                                        v9_2.put("parent", Long.valueOf(v7_4));
                                        int v13_2 = new StringBuilder();
                                        v13_2.append("_id=");
                                        v13_2.append(v14);
                                        String v0_4 = v12.update("files", v9_2, v13_2.toString(), 0);
                                        v2.mNumUpdates = (v2.mNumUpdates + v0_4);
                                        v10_0 += v0_4;
                                    }
                                }
                            } catch (String v0_5) {
                            }
                        } else {
                            String v5_5;
                            libcore.io.IoUtils.closeQuietly(v3_11);
                            if (v13_4 <= 0) {
                                v5_5 = v18;
                            } else {
                                android.net.Uri v3_1 = new StringBuilder();
                                v3_1.append("fixParentIdIfNeeded: found: ");
                                v3_1.append(v13_4);
                                v3_1.append(", fixed: ");
                                v5_5 = v18;
                                v3_1.append(v5_5);
                                android.util.Log.d(com.android.providers.media.MediaProvider.TAG, v3_1.toString());
                            }
                            if (v5_5 > null) {
                                this.getContext().getContentResolver().notifyChange(android.net.Uri.parse("content://media/"), 0);
                            }
                            return;
                        }
                    } catch (String v0_5) {
                    }
                }
            }
            libcore.io.IoUtils.closeQuietly(v3_11);
            v0_9 = v16;
        } else {
            return;
        }
    }

Method com.android.providers.media.MediaProvider.ensureFileExists() calling method java.io.File.<init>()


    private boolean ensureFileExists(android.net.Uri p9, String p10)
    {
        java.io.File v0_1 = new java.io.File(p10);
        if (!v0_1.exists()) {
            try {
                this.checkAccess(p9, v0_1, 939524096);
                java.io.FileNotFoundException v1_1 = p10.indexOf(47, 1);
            } catch (java.io.FileNotFoundException v1) {
                return 0;
            }
            if (v1_1 >= 1) {
                if (new java.io.File(p10.substring(0, v1_1)).exists()) {
                    v0_1.getParentFile().mkdirs();
                    try {
                        return v0_1.createNewFile();
                    } catch (java.io.IOException v5_3) {
                        android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "File creation failed", v5_3);
                        return 0;
                    }
                } else {
                    return 0;
                }
            } else {
                return 0;
            }
        } else {
            return 1;
        }
    }

Method com.android.providers.media.MediaProvider.ensureDefaultFolders() calling method java.io.File.<init>()


    private void ensureDefaultFolders(com.android.providers.media.MediaProvider$DatabaseHelper p10, android.database.sqlite.SQLiteDatabase p11)
    {
        String v1_1;
        android.os.storage.StorageVolume v0_1 = this.mStorageManager.getPrimaryVolume();
        if (!"emulated".equals(v0_1.getId())) {
            String v1_0 = new StringBuilder();
            v1_0.append("created_default_folders_");
            v1_0.append(v0_1.getUuid());
            v1_1 = v1_0.toString();
        } else {
            v1_1 = "created_default_folders";
        }
        android.content.SharedPreferences v2_3 = android.preference.PreferenceManager.getDefaultSharedPreferences(this.getContext());
        int v3_0 = 0;
        if (v2_3.getInt(v1_1, 0) == 0) {
            int v4_1 = com.android.providers.media.MediaProvider.sDefaultFolderNames;
            int v5 = v4_1.length;
            while (v3_0 < v5) {
                java.io.File v7_1 = new java.io.File(v0_1.getPathFile(), v4_1[v3_0]);
                if (!v7_1.exists()) {
                    v7_1.mkdirs();
                    this.insertDirectory(p10, p11, v7_1.getAbsolutePath());
                }
                v3_0++;
            }
            int v3_1 = v2_3.edit();
            v3_1.putInt(v1_1, 1);
            v3_1.commit();
        }
        return;
    }

Method com.android.providers.media.MediaProvider.detachVolume() calling method java.io.File.<init>()


    private void detachVolume(android.net.Uri p7)
    {
        if (android.os.Binder.getCallingPid() != android.os.Process.myPid()) {
            throw new SecurityException("Opening and closing databases not allowed.");
        } else {
            this.updateStoragePaths();
            SecurityException v0_3 = ((String) p7.getPathSegments().get(0));
            if ("internal".equals(v0_3)) {
                throw new UnsupportedOperationException("Deleting the internal volume is not allowed");
            } else {
                if (!"external".equals(v0_3)) {
                    int v2_2 = new StringBuilder();
                    v2_2.append("There is no volume named ");
                    v2_2.append(v0_3);
                    throw new IllegalArgumentException(v2_2.toString());
                } else {
                    int v2_6 = ((com.android.providers.media.MediaProvider$DatabaseHelper) this.mDatabases.get(v0_3));
                    if (v2_6 != 0) {
                        try {
                            new java.io.File(v2_6.getReadableDatabase().getPath()).setLastModified(System.currentTimeMillis());
                        } catch (java.util.HashMap v3_3) {
                            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "Can\'t touch database file", v3_3);
                        }
                        this.mDatabases.remove(v0_3);
                        v2_6.close();
                        this.getContext().getContentResolver().notifyChange(p7, 0);
                        return;
                    } else {
                        return;
                    }
                }
            }
        }
    }

Method com.android.providers.media.MediaProvider.deleteIfAllowed() calling method java.io.File.<init>()


    private void deleteIfAllowed(android.net.Uri p5, String p6)
    {
        try {
            Exception v0_1 = new java.io.File(p6);
            this.checkAccess(p5, v0_1, 536870912);
            v0_1.delete();
        } catch (Exception v0) {
            String v2_2 = new StringBuilder();
            v2_2.append("Couldn\'t delete ");
            v2_2.append(p6);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v2_2.toString());
        }
        return;
    }

Method com.android.providers.media.MediaProvider.computeBucketValues() calling method java.io.File.<init>()


    private static void computeBucketValues(String p5, android.content.ContentValues p6)
    {
        java.io.File v0_2 = new java.io.File(p5).getParentFile();
        if (v0_2 == null) {
            v0_2 = new java.io.File("/");
        }
        String v1_1 = v0_2.toString().toLowerCase();
        String v2_0 = v0_2.getName();
        p6.put("bucket_id", Integer.valueOf(v1_1.hashCode()));
        p6.put("bucket_display_name", v2_0);
        return;
    }

Method com.android.providers.media.MediaProvider.checkLeadingPathComponentsWorldExecutable() calling method java.io.File.<init>()


    private static void checkLeadingPathComponentsWorldExecutable(String p6)
    {
        int v1_2;
        java.io.File v0_2 = new java.io.File(p6).getParentFile();
        if (!p6.startsWith("/storage/")) {
            v1_2 = android.system.OsConstants.S_IXOTH;
        } else {
            v1_2 = android.system.OsConstants.S_IXGRP;
        }
        while (v0_2 != null) {
            if (!v0_2.exists()) {
                throw new java.io.FileNotFoundException("access denied");
            } else {
                try {
                    if ((android.system.Os.stat(v0_2.getPath()).st_mode & v1_2) != v1_2) {
                        String v4_1 = new StringBuilder();
                        v4_1.append("Can\'t access ");
                        v4_1.append(p6);
                        throw new java.io.FileNotFoundException(v4_1.toString());
                    } else {
                        v0_2 = v0_2.getParentFile();
                    }
                } catch (android.system.ErrnoException v2) {
                    String v4_4 = new StringBuilder();
                    v4_4.append("Can\'t access ");
                    v4_4.append(p6);
                    throw new java.io.FileNotFoundException(v4_4.toString());
                }
            }
        }
        return;
    }

Method com.android.providers.media.MediaProvider.attachVolume() calling method java.io.File.<init>()


    private android.net.Uri attachVolume(String p19)
    {
        if (android.os.Binder.getCallingPid() != android.os.Process.myPid()) {
            throw new SecurityException("Opening and closing databases not allowed.");
        } else {
            void v18_1 = this.updateStoragePaths();
            java.util.HashMap v9 = this.mDatabases;
            int v1_1 = ((com.android.providers.media.MediaProvider$DatabaseHelper) this.mDatabases.get(p19));
            if (v1_1 == 0) {
                String v10_5;
                int v6_0 = v18_1.getContext();
                if (!"internal".equals(p19)) {
                    if (!"external".equals(p19)) {
                        String v2_9 = new StringBuilder();
                        v2_9.append("There is no volume named ");
                        v2_9.append(p19);
                        throw new IllegalArgumentException(v2_9.toString());
                    } else {
                        int v1_0;
                        if (this.mStorageManager.getPrimaryPhysicalVolume() == null) {
                            String v2_12 = v6_0.getDatabasePath("external.db");
                            if ((!v2_12.exists()) && (android.os.Build$VERSION.SDK_INT < 14)) {
                                String v4_7 = v6_0.databaseList();
                                String v10_12 = v4_7.length;
                                java.io.File v11_1 = 0;
                                String v3_0 = 0;
                                while (v3_0 < v10_12) {
                                    String v12_1 = v4_7[v3_0];
                                    if ((v12_1.startsWith("external-")) && (v12_1.endsWith(".db"))) {
                                        java.io.File v13_5 = v6_0.getDatabasePath(v12_1);
                                        if (v11_1 != null) {
                                            if (v13_5.lastModified() <= v11_1.lastModified()) {
                                                v6_0.deleteDatabase(v13_5.getName());
                                            } else {
                                                v6_0.deleteDatabase(v11_1.getName());
                                                v11_1 = v13_5;
                                            }
                                        } else {
                                            v11_1 = v13_5;
                                        }
                                    }
                                    v3_0++;
                                }
                                if (v11_1 != null) {
                                    if (!v11_1.renameTo(v2_12)) {
                                        String v4_9 = new StringBuilder();
                                        v4_9.append("Failed to rename database ");
                                        v4_9.append(v11_1.getName());
                                        v4_9.append(" to ");
                                        v4_9.append("external.db");
                                        android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v4_9.toString());
                                        v2_12 = v11_1;
                                    } else {
                                        String v4_12 = new StringBuilder();
                                        v4_12.append("renamed database ");
                                        v4_12.append(v11_1.getName());
                                        v4_12.append(" to ");
                                        v4_12.append("external.db");
                                        android.util.Log.d(com.android.providers.media.MediaProvider.TAG, v4_12.toString());
                                    }
                                }
                            }
                            String v3_12 = new com.android.providers.media.MediaProvider$DatabaseHelper;
                            v3_12(v6_0, v2_12.getName(), 0, 0, this.mObjectRemovedCallback);
                            v1_0 = v3_12;
                        } else {
                            String v3_1 = this.mStorageManager.getPrimaryVolume().getFatVolumeId();
                            if (v3_1 != -1) {
                                String v4_2 = new StringBuilder();
                                v4_2.append("external-");
                                v4_2.append(Integer.toHexString(v3_1));
                                v4_2.append(".db");
                                String v4_3 = new com.android.providers.media.MediaProvider$DatabaseHelper;
                                v4_3(v6_0, v4_2.toString(), 0, 0, this.mObjectRemovedCallback);
                                v1_0 = v4_3;
                                this.mVolumeId = v3_1;
                            } else {
                                String v4_4 = android.os.Environment.getExternalStorageState();
                                if ("mounted".equals(v4_4)) {
                                    android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "Can\'t obtain external volume ID even though it\'s mounted.");
                                } else {
                                    if (!"mounted_ro".equals(v4_4)) {
                                        android.util.Log.i(com.android.providers.media.MediaProvider.TAG, "External volume is not (yet) mounted, cannot attach.");
                                    } else {
                                    }
                                }
                                String v10_9 = new StringBuilder();
                                v10_9.append("Can\'t obtain external volume ID for ");
                                v10_9.append(p19);
                                v10_9.append(" volume.");
                                throw new IllegalArgumentException(v10_9.toString());
                            }
                        }
                        v10_5 = v1_0;
                    }
                } else {
                    int v0_3 = new com.android.providers.media.MediaProvider$DatabaseHelper;
                    v0_3(v6_0, "internal.db", 1, 0, this.mObjectRemovedCallback);
                    v10_5 = v0_3;
                }
                try {
                    this.mDatabases.put(p19, v10_5);
                } catch (int v0_30) {
                    throw v0_30;
                }
                if (!v10_5.mInternal) {
                    java.io.File v11_6 = new java.io.File(this.mExternalStoragePaths[0], "Android/data/com.android.providers.media/albumthumbs").listFiles();
                    String v12_4 = new java.util.HashSet();
                    int v0_12 = 0;
                    while ((v11_6 != null) && (v0_12 < v11_6.length)) {
                        v12_4.add(v11_6[v0_12].getPath());
                        v0_12++;
                    }
                    int v0_16 = this.query(android.provider.MediaStore$Audio$Albums.EXTERNAL_CONTENT_URI, new String[] {"album_art"}), 0, 0, 0);
                    while(true) {
                        int v1_6 = v0_16;
                        if ((v1_6 == 0) || (!v1_6.moveToNext())) {
                            break;
                        }
                        v12_4.remove(v1_6.getString(0));
                        v0_16 = v1_6;
                    }
                    libcore.io.IoUtils.closeQuietly(v1_6);
                    int v0_19 = v12_4.iterator();
                    while (v0_19.hasNext()) {
                        new java.io.File(((String) v0_19.next())).delete();
                    }
                }
                if ("external".equals(p19)) {
                    this.ensureDefaultFolders(v10_5, v10_5.getWritableDatabase());
                }
                int v0_25 = new StringBuilder();
                v0_25.append("content://media/");
                v0_25.append(p19);
                return android.net.Uri.parse(v0_25.toString());
            } else {
                if ("external".equals(p19)) {
                    this.ensureDefaultFolders(v1_1, v1_1.getWritableDatabase());
                }
                int v0_35 = new StringBuilder();
                v0_35.append("content://media/");
                v0_35.append(p19);
                return android.net.Uri.parse(v0_35.toString());
            }
        }
    }

Method com.android.providers.media.MediaProvider$ScannerClient.onMediaScannerConnected() calling method java.io.File.<init>()


    public void onMediaScannerConnected()
    {
        android.database.Cursor v0_0 = this.mDb;
        java.io.File v2_0 = com.android.providers.media.MediaProvider.access$1300();
        int v4_2 = new String[2];
        int v5_6 = new StringBuilder();
        v5_6.append(this.mPath);
        v5_6.append("/");
        v4_2[0] = v5_6.toString();
        int v5_2 = new StringBuilder();
        v5_2.append(this.mPath);
        v5_2.append("0");
        v4_2[1] = v5_2.toString();
        android.database.Cursor v0_1 = v0_0.query("files", v2_0, "_data >= ? AND _data < ?", v4_2, 0, 0, 0);
        try {
            while (v0_1.moveToNext()) {
                android.media.MediaScannerConnection v1_3 = v0_1.getString(0);
                if (new java.io.File(v1_3).isFile()) {
                    this.mScannerConnection.scanFile(v1_3, 0);
                }
            }
        } catch (android.media.MediaScannerConnection v1_4) {
            libcore.io.IoUtils.closeQuietly(v0_1);
            throw v1_4;
        }
        this.mScannerConnection.disconnect();
        libcore.io.IoUtils.closeQuietly(v0_1);
        return;
    }

Method com.android.providers.media.MediaProvider$DatabaseHelper.onOpen() calling method java.io.File.<init>()


    public void onOpen(android.database.sqlite.SQLiteDatabase p23)
    {
        if (!this.mInternal) {
            if (!this.mEarlyUpgrade) {
                if (this.mObjectRemovedCallback != null) {
                    p23.addCustomFunction("_OBJECT_REMOVED", 1, this.mObjectRemovedCallback);
                }
                if (android.os.Environment.isExternalStorageRemovable()) {
                    java.io.File v1_3 = new java.io.File(p23.getPath());
                    long v2_1 = System.currentTimeMillis();
                    v1_3.setLastModified(v2_1);
                    String[] v5_1 = this.mContext.databaseList();
                    java.util.ArrayList v6_1 = new java.util.ArrayList();
                    android.content.Context v7_1 = v5_1.length;
                    int v9_1 = 0;
                    while (v9_1 < v7_1) {
                        long v10_0 = v5_1[v9_1];
                        if ((v10_0 != 0) && (v10_0.endsWith(".db"))) {
                            v6_1.add(v10_0);
                        }
                        v9_1++;
                    }
                    android.content.Context v7_2 = new String[0];
                    String[] v5_3 = ((String[]) v6_1.toArray(v7_2));
                    long v10_2 = (v2_1 - 2.561236308e-314);
                    int v12 = 3;
                    int v9_0 = v5_3.length;
                    android.content.Context v7_0 = 0;
                    while (v7_0 < v5_3.length) {
                        long v13_9 = this.mContext.getDatabasePath(v5_3[v7_0]);
                        if ((!"internal.db".equals(v5_3[v7_0])) && (!v1_3.equals(v13_9))) {
                            if (v13_9.lastModified() < v10_2) {
                                this.mContext.deleteDatabase(v5_3[v7_0]);
                                v5_3[v7_0] = 0;
                                v9_0--;
                            }
                        } else {
                            v5_3[v7_0] = 0;
                            v9_0--;
                            if (v1_3.equals(v13_9)) {
                                v12--;
                            }
                        }
                        v7_0++;
                    }
                    while (v9_0 > v12) {
                        long v16_0 = 0;
                        android.content.Context v8_2 = -1;
                        android.content.Context v7_6 = 0;
                        while (v7_6 < v5_3.length) {
                            if (v5_3[v7_6] != null) {
                                long v18 = this.mContext.getDatabasePath(v5_3[v7_6]).lastModified();
                                if ((v16_0 == 0) || (v18 < v16_0)) {
                                    v8_2 = v7_6;
                                    v16_0 = v18;
                                }
                            }
                            v7_6++;
                        }
                        if (v8_2 != -1) {
                            this.mContext.deleteDatabase(v5_3[v8_2]);
                            v5_3[v8_2] = 0;
                            v9_0--;
                        }
                    }
                    return;
                } else {
                    return;
                }
            } else {
                return;
            }
        } else {
            return;
        }
    }

Method com.android.providers.media.MediaProvider$4.handleMessage() calling method java.io.File.<init>()


    public void handleMessage(android.os.Message p11)
    {
        if (p11.what != 2) {
            if (p11.what == 1) {
                com.android.providers.media.MediaProvider.access$900(this.this$0);
                Throwable v1_8 = ((com.android.providers.media.MediaProvider$ThumbData) com.android.providers.media.MediaProvider.access$900(this.this$0).pop());
                libcore.io.IoUtils.closeQuietly(com.android.providers.media.MediaProvider.access$1000(this.this$0, v1_8));
                com.android.providers.media.MediaProvider.access$1100(this.this$0);
                try {
                    com.android.providers.media.MediaProvider.access$1100(this.this$0).remove(v1_8.path);
                } catch (Throwable v0_16) {
                    throw v0_16;
                }
            }
        } else {
            com.android.providers.media.MediaProvider.access$700(this.this$0);
            com.android.providers.media.MediaProvider.access$802(this.this$0, ((com.android.providers.media.MediaThumbRequest) com.android.providers.media.MediaProvider.access$700(this.this$0).poll()));
            if (com.android.providers.media.MediaProvider.access$800(this.this$0) != null) {
                try {
                    if (com.android.providers.media.MediaProvider.access$800(this.this$0).mPath == null) {
                        com.android.providers.media.MediaProvider.access$800(this.this$0);
                        try {
                            com.android.providers.media.MediaProvider.access$800(this.this$0).mState = com.android.providers.media.MediaThumbRequest$State.DONE;
                            com.android.providers.media.MediaProvider.access$800(this.this$0).notifyAll();
                        } catch (Throwable v1_6) {
                            throw v1_6;
                        }
                    } else {
                        Throwable v0_25 = new java.io.File(com.android.providers.media.MediaProvider.access$800(this.this$0).mPath);
                        if ((!v0_25.exists()) || (v0_25.length() <= 0)) {
                            com.android.providers.media.MediaProvider.access$700(this.this$0);
                            Throwable v2_13 = com.android.providers.media.MediaProvider.access$400();
                            String v3_4 = new StringBuilder();
                            v3_4.append("original file hasn\'t been stored yet: ");
                            v3_4.append(com.android.providers.media.MediaProvider.access$800(this.this$0).mPath);
                            android.util.Log.w(v2_13, v3_4.toString());
                        } else {
                            com.android.providers.media.MediaProvider.access$800(this.this$0).execute();
                            com.android.providers.media.MediaProvider.access$700(this.this$0);
                            Throwable v2_17 = com.android.providers.media.MediaProvider.access$700(this.this$0).iterator();
                            while (v2_17.hasNext()) {
                                com.android.providers.media.MediaThumbRequest v5_1 = ((com.android.providers.media.MediaThumbRequest) v2_17.next());
                                if ((v5_1.mOrigId == com.android.providers.media.MediaProvider.access$800(this.this$0).mOrigId) && ((v5_1.mIsVideo == com.android.providers.media.MediaProvider.access$800(this.this$0).mIsVideo) && ((v5_1.mMagic == 0) && (v5_1.mState == com.android.providers.media.MediaThumbRequest$State.WAIT)))) {
                                    v5_1.mMagic = com.android.providers.media.MediaProvider.access$800(this.this$0).mMagic;
                                }
                            }
                        }
                    }
                } catch (Throwable v0_11) {
                    com.android.providers.media.MediaProvider.access$800(this.this$0);
                    com.android.providers.media.MediaProvider.access$800(this.this$0).mState = com.android.providers.media.MediaThumbRequest$State.DONE;
                    com.android.providers.media.MediaProvider.access$800(this.this$0).notifyAll();
                    throw v0_11;
                } catch (Throwable v0_8) {
                    android.util.Log.w(com.android.providers.media.MediaProvider.access$400(), v0_8);
                    com.android.providers.media.MediaProvider.access$800(this.this$0);
                    com.android.providers.media.MediaProvider.access$800(this.this$0).mState = com.android.providers.media.MediaThumbRequest$State.DONE;
                    com.android.providers.media.MediaProvider.access$800(this.this$0).notifyAll();
                } catch (Throwable v0_5) {
                    android.util.Log.w(com.android.providers.media.MediaProvider.access$400(), v0_5);
                    com.android.providers.media.MediaProvider.access$800(this.this$0);
                    try {
                        com.android.providers.media.MediaProvider.access$800(this.this$0).mState = com.android.providers.media.MediaThumbRequest$State.DONE;
                        com.android.providers.media.MediaProvider.access$800(this.this$0).notifyAll();
                    } catch (Throwable v1_20) {
                        throw v1_20;
                    }
                } catch (Throwable v0_2) {
                    android.util.Log.w(com.android.providers.media.MediaProvider.access$400(), v0_2);
                    com.android.providers.media.MediaProvider.access$800(this.this$0);
                    try {
                        com.android.providers.media.MediaProvider.access$800(this.this$0).mState = com.android.providers.media.MediaThumbRequest$State.DONE;
                        com.android.providers.media.MediaProvider.access$800(this.this$0).notifyAll();
                    } catch (Throwable v1_14) {
                        throw v1_14;
                    }
                } catch (Throwable v1_26) {
                    throw v1_26;
                }
            } else {
                android.util.Log.w(com.android.providers.media.MediaProvider.access$400(), "Have message but no request?");
            }
        }
        return;
    }

Method com.android.providers.media.MediaDocumentsProvider.openVideoThumbnailCleared() calling method java.io.File.<init>()


    private android.content.res.AssetFileDescriptor openVideoThumbnailCleared(long p11, android.os.CancellationSignal p13)
    {
        android.content.ContentResolver v0_1 = this.getContext().getContentResolver();
        try {
            String v1_7 = new StringBuilder();
            v1_7.append("video_id=");
            v1_7.append(p11);
            android.database.Cursor v9 = v0_1.query(android.provider.MediaStore$Video$Thumbnails.EXTERNAL_CONTENT_URI, com.android.providers.media.MediaDocumentsProvider$VideoThumbnailQuery.PROJECTION, v1_7.toString(), 0, 0, p13);
        } catch (String v1_3) {
            libcore.io.IoUtils.closeQuietly(v9);
            throw v1_3;
        }
        if (!v9.moveToFirst()) {
            libcore.io.IoUtils.closeQuietly(v9);
            return 0;
        } else {
            android.content.res.AssetFileDescriptor v8_0 = new android.content.res.AssetFileDescriptor;
            v8_0(android.os.ParcelFileDescriptor.open(new java.io.File(v9.getString(0)), 268435456), 0, -1);
            libcore.io.IoUtils.closeQuietly(v9);
            return v8_0;
        }
    }

Method com.android.providers.media.MediaDocumentsProvider.openImageThumbnailCleared() calling method java.io.File.<init>()


    private android.os.ParcelFileDescriptor openImageThumbnailCleared(long p11, android.os.CancellationSignal p13)
    {
        android.content.ContentResolver v0_1 = this.getContext().getContentResolver();
        try {
            String v1_7 = new StringBuilder();
            v1_7.append("image_id=");
            v1_7.append(p11);
            android.database.Cursor v9 = v0_1.query(android.provider.MediaStore$Images$Thumbnails.EXTERNAL_CONTENT_URI, com.android.providers.media.MediaDocumentsProvider$ImageThumbnailQuery.PROJECTION, v1_7.toString(), 0, 0, p13);
        } catch (String v1_3) {
            libcore.io.IoUtils.closeQuietly(v9);
            throw v1_3;
        }
        if (!v9.moveToFirst()) {
            libcore.io.IoUtils.closeQuietly(v9);
            return 0;
        } else {
            android.os.ParcelFileDescriptor v2_2 = android.os.ParcelFileDescriptor.open(new java.io.File(v9.getString(0)), 268435456);
            libcore.io.IoUtils.closeQuietly(v9);
            return v2_2;
        }
    }