Info Call to logging API

Description

List of all logging API calls in the application.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.android.providers.media.RingtonePickerActivity$LocalizedCursor.getString() calling method android.util.Log.e()


    public String getString(int p8)
    {
        String v0_1 = this.mCursor.getString(p8);
        if ((p8 == this.mTitleIndex) && (this.mNamePrefix != null)) {
            android.util.TypedValue v1_3 = new android.util.TypedValue();
            try {
                String v2_5 = this.mResources;
                String v3_1 = new StringBuilder();
                v3_1.append(this.mNamePrefix);
                v3_1.append(this.sanitize(v0_1));
                v2_5.getValue(v3_1.toString(), v1_3, 0);
            } catch (String v2) {
                return v0_1;
            }
            if (v1_3.type != 3) {
                String v3_5 = new StringBuilder();
                v3_5.append("Invalid value when looking up localized name, using ");
                v3_5.append(v0_1);
                android.util.Log.e("RingtonePickerActivity", v3_5.toString());
                return v0_1;
            } else {
                Object[] v5_1 = new Object[2];
                v5_1[0] = v0_1;
                v5_1[1] = v1_3.string.toString();
                android.util.Log.d("RingtonePickerActivity", String.format("Replacing name %s with %s", v5_1));
                return v1_3.string.toString();
            }
        } else {
            return v0_1;
        }
    }

Method com.android.providers.media.RingtonePickerActivity$LocalizedCursor.<init>() calling method android.util.Log.e()


    RingtonePickerActivity$LocalizedCursor(android.database.Cursor p7, android.content.res.Resources p8, String p9)
    {
        super(p7);
        super.mTitleIndex = super.mCursor.getColumnIndex(p9);
        super.mResources = p8;
        super.mSanitizePattern = java.util.regex.Pattern.compile("[^a-zA-Z0-9]");
        if (super.mTitleIndex != -1) {
            try {
                Object[] v2_2 = new Object[3];
                v2_2[0] = super.mResources.getResourcePackageName(2131165189);
                v2_2[1] = super.mResources.getResourceTypeName(2131165189);
                v2_2[2] = "sound_name_";
                super.mNamePrefix = String.format("%s:%s/%s", v2_2);
            } catch (android.content.res.Resources$NotFoundException v0) {
                super.mNamePrefix = 0;
            }
        } else {
            Object[] v2_4 = new StringBuilder();
            v2_4.append("No index for column ");
            v2_4.append(p9);
            android.util.Log.e("RingtonePickerActivity", v2_4.toString());
            super.mNamePrefix = 0;
        }
        return;
    }

Method com.android.providers.media.RingtonePickerActivity$2.doInBackground() calling method android.util.Log.e()


    protected varargs android.net.Uri doInBackground(android.net.Uri[] p4)
    {
        try {
            return com.android.providers.media.RingtonePickerActivity.access$800(this.this$0).addCustomExternalRingtone(p4[0], com.android.providers.media.RingtonePickerActivity.access$700(this.this$0));
        } catch (int v0_1) {
            android.util.Log.e("RingtonePickerActivity", "Unable to add new ringtone", v0_1);
            return 0;
        }
    }

Method com.android.providers.media.MtpService.startServer() calling method android.util.Log.e()


    private declared_synchronized void startServer(android.os.storage.StorageVolume p19, String[] p20)
    {
        void v1 = this;
        try {
            if (android.os.UserHandle.myUserId() == android.app.ActivityManager.getCurrentUser()) {
                try {
                    if (com.android.providers.media.MtpService.sServerHolder == null) {
                        String[] v4_2;
                        android.mtp.MtpDatabase v3_1 = new StringBuilder();
                        v3_1.append("starting MTP server in ");
                        if (!this.mPtpMode) {
                            v4_2 = "MTP mode";
                        } else {
                            v4_2 = "PTP mode";
                        }
                        String[] v4_6;
                        v3_1.append(v4_2);
                        v3_1.append(" with storage ");
                        v3_1.append(p19.getPath());
                        if (!this.mUnlocked) {
                            v4_6 = "";
                        } else {
                            v4_6 = " unlocked";
                        }
                        v3_1.append(v4_6);
                        v3_1.append(" as user ");
                        v3_1.append(android.os.UserHandle.myUserId());
                        android.util.Log.d("MtpService", v3_1.toString());
                        android.mtp.MtpDatabase v3_4 = new android.mtp.MtpDatabase(this, "external", p20);
                        android.os.ParcelFileDescriptor v0_5 = android.os.Build.getSerial();
                        if ("unknown".equals(v0_5)) {
                            v0_5 = "????????";
                        }
                        String v14 = v0_5;
                        android.hardware.usb.IUsbManager vtmp17 = android.hardware.usb.IUsbManager$Stub.asInterface(android.os.ServiceManager.getService("usb"));
                        try {
                            android.os.storage.StorageVolume v7_3;
                            if (!this.mPtpMode) {
                                v7_3 = 4;
                                android.os.ParcelFileDescriptor v0_12 = vtmp17.getControlFd(v7_3);
                            } else {
                                v7_3 = 16;
                            }
                        } catch (android.os.ParcelFileDescriptor v0_10) {
                            boolean v8_1 = new StringBuilder();
                            v8_1.append("Error communicating with UsbManager: ");
                            v8_1.append(v0_10);
                            android.util.Log.e("MtpService", v8_1.toString());
                            v0_12 = 0;
                        }
                        java.util.Iterator v6_8 = 0;
                        if (v0_12 != null) {
                            v6_8 = v0_12.getFileDescriptor();
                        } else {
                            android.util.Log.i("MtpService", "Couldn\'t get control FD!");
                        }
                        android.mtp.MtpServer v17 = new android.mtp.MtpServer;
                        v17(v3_4, v6_8, this.mPtpMode, new com.android.providers.media.MtpService$OnServerTerminated(this, 0), android.os.Build.MANUFACTURER, android.os.Build.MODEL, "1.0", v14);
                        android.mtp.MtpServer v5_0 = v17;
                        v3_4.setServer(v5_0);
                        com.android.providers.media.MtpService.sServerHolder = new com.android.providers.media.MtpService$ServerHolder(v5_0, v3_4);
                        if (this.mUnlocked) {
                            if (!this.mPtpMode) {
                                java.util.Iterator v6_6 = this.mVolumeMap.values().iterator();
                                while (v6_6.hasNext()) {
                                    v1 = v1.addStorage(((android.os.storage.StorageVolume) v6_6.next()));
                                }
                            } else {
                                this.addStorage(p19);
                            }
                        }
                        v5_0.start();
                        return;
                    } else {
                        return;
                    }
                } catch (android.os.ParcelFileDescriptor v0_0) {
                } catch (android.os.ParcelFileDescriptor v0_0) {
                }
                throw v0_0;
            } else {
                return;
            }
        } catch (android.os.ParcelFileDescriptor v0_1) {
            throw v0_1;
        }
    }

Method com.android.providers.media.MtpService$OnServerTerminated.run() calling method android.util.Log.e()


    public void run()
    {
        try {
            if (com.android.providers.media.MtpService.access$700() != null) {
                com.android.providers.media.MtpService.access$700().close();
                com.android.providers.media.MtpService.access$702(0);
                return;
            } else {
                android.util.Log.e("MtpService", "sServerHolder is unexpectedly null.");
                return;
            }
        } catch (int v1_1) {
            throw v1_1;
        }
    }

Method com.android.providers.media.MediaThumbRequest.execute() calling method android.util.Log.e()


    void execute()
    {
        android.media.MiniThumbFile v8 = android.media.MiniThumbFile.instance(this.mUri);
        long v2_2 = this.mMagic;
        if ((v2_2 != 0) && (v8.getMagic(this.mOrigId) == v2_2)) {
            android.os.ParcelFileDescriptor v10_1 = 0;
            int v11_1 = android.os.Binder.clearCallingIdentity();
            try {
                long v13_1 = this.mCr;
                android.net.Uri v14 = this.mThumbUri;
                IllegalStateException v0_15 = new StringBuilder();
                v0_15.append(this.mOrigColumnName);
                v0_15.append(" = ");
                v0_15.append(this.mOrigId);
                android.database.Cursor v9_0 = v13_1.query(v14, com.android.providers.media.MediaThumbRequest.THUMB_PROJECTION, v0_15.toString(), 0, 0);
            } catch (IllegalStateException v0_18) {
                android.os.Binder.restoreCallingIdentity(v11_1);
                if (v9_0 != null) {
                    v9_0.close();
                }
                if (0 == 0) {
                    throw v0_18;
                } else {
                    v10_1.close();
                    return;
                }
            } catch (IllegalStateException v0) {
                android.os.Binder.restoreCallingIdentity(v11_1);
                if (v9_0 != null) {
                    v9_0.close();
                }
                if (0 != 0) {
                    v10_1.close();
                    return;
                }
            }
            if ((v9_0 != null) && (v9_0.moveToFirst())) {
                v10_1 = this.mCr.openFileDescriptor(this.mThumbUri.buildUpon().appendPath(v9_0.getString(0)).build(), "r");
            }
            android.os.Binder.restoreCallingIdentity(v11_1);
            if (v9_0 != null) {
                v9_0.close();
            }
            if (v10_1 != null) {
                v10_1.close();
                return;
            }
        }
        IllegalStateException v0_22 = 0;
        if (this.mPath != null) {
            if (!this.mIsVideo) {
                v0_22 = android.media.ThumbnailUtils.createImageThumbnail(this.mPath, 1);
            } else {
                v0_22 = android.media.ThumbnailUtils.createVideoThumbnail(this.mPath, 1);
            }
            if (v0_22 != null) {
                String v4_20 = this.updateDatabase(v0_22);
                if (v4_20 != null) {
                    String v5_10 = this.mCr.openOutputStream(v4_20);
                    v0_22.compress(android.graphics.Bitmap$CompressFormat.JPEG, 85, v5_10);
                    v5_10.close();
                }
            } else {
                String v5_3 = new StringBuilder();
                v5_3.append("Can\'t create mini thumbnail for ");
                v5_3.append(this.mPath);
                android.util.Log.w("MediaThumbRequest", v5_3.toString());
                return;
            }
        }
        android.database.Cursor v9_1 = android.media.ThumbnailUtils.extractThumbnail(v0_22, 96, 96, 2);
        if (v9_1 == null) {
            android.util.Log.w("MediaThumbRequest", "can\'t create bitmap for thumbnail.");
        } else {
            android.os.ParcelFileDescriptor v10_0 = new java.io.ByteArrayOutputStream();
            v9_1.compress(android.graphics.Bitmap$CompressFormat.JPEG, 75, v10_0);
            v9_1.recycle();
            try {
                v10_0.close();
                IllegalStateException v0_5 = v10_0.toByteArray();
                android.net.Uri v12 = v0_5;
            } catch (IllegalStateException v0_6) {
                long v6_2 = new StringBuilder();
                v6_2.append("got exception ex ");
                v6_2.append(v0_6);
                android.util.Log.e("MediaThumbRequest", v6_2.toString());
                v12 = 0;
            }
            if (v12 == null) {
                v8.deactivate();
                return;
            }
            do {
                long v13_0 = com.android.providers.media.MediaThumbRequest.sRandom.nextLong();
            } while(v13_0 == 0);
            v8.saveMiniThumbToFile(v12, this.mOrigId, v13_0);
            long v2_1 = new android.content.ContentValues();
            v2_1.put("mini_thumb_magic", Long.valueOf(v13_0));
            try {
                this.mCr.update(this.mUri, v2_1, 0, 0);
                this.mMagic = v13_0;
            } catch (IllegalStateException v0_13) {
                String v4_5 = new StringBuilder();
                v4_5.append("got exception while updating database ");
                v4_5.append(v0_13);
                android.util.Log.e("MediaThumbRequest", v4_5.toString());
            }
        }
        v8.deactivate();
        return;
    }

Method com.android.providers.media.MediaScannerService.onStartCommand() calling method android.util.Log.e()


    public int onStartCommand(android.content.Intent p4, int p5, int p6)
    {
        while (this.mServiceHandler == null) {
            try {
                this.wait(100);
            } catch (InterruptedException v0_4) {
                throw v0_4;
            } catch (InterruptedException v0) {
            }
        }
        if (p4 != null) {
            InterruptedException v0_6 = this.mServiceHandler.obtainMessage();
            v0_6.arg1 = p6;
            v0_6.obj = p4.getExtras();
            this.mServiceHandler.sendMessage(v0_6);
            return 3;
        } else {
            android.util.Log.e("MediaScannerService", "Intent is null in onStartCommand: ", new NullPointerException());
            return 2;
        }
    }

Method com.android.providers.media.MediaScannerService.scanFile() calling method android.util.Log.e()


    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.MediaScannerService.scan() calling method android.util.Log.e()


    private void scan(String[] p9, String p10)
    {
        android.net.Uri v0_1 = new StringBuilder();
        v0_1.append("file://");
        v0_1.append(p9[0]);
        android.net.Uri v0_2 = android.net.Uri.parse(v0_1.toString());
        this.mWakeLock.acquire();
        try {
            android.os.PowerManager$WakeLock v1_2 = new android.content.ContentValues();
            v1_2.put("volume", p10);
            String v2_2 = this.getContentResolver().insert(android.provider.MediaStore.getMediaScannerUri(), v1_2);
            this.sendBroadcast(new android.content.Intent("android.intent.action.MEDIA_SCANNER_STARTED", v0_2));
            try {
                if (!p10.equals("external")) {
                    android.content.ContentResolver v4_4 = new android.media.MediaScanner(this, p10);
                    try {
                        v4_4.scanDirectories(p9);
                    } catch (Throwable v5_1) {
                        Throwable v6_1 = 0;
                        com.android.providers.media.MediaScannerService.$closeResource(v6_1, v4_4);
                        throw v5_1;
                    } catch (Throwable v5_0) {
                        try {
                            throw v5_0;
                        } catch (Throwable v6_0) {
                            v6_1 = v5_0;
                            v5_1 = v6_0;
                        }
                    }
                    com.android.providers.media.MediaScannerService.$closeResource(0, v4_4);
                } else {
                    this.openDatabase(p10);
                }
            } catch (android.content.ContentResolver v4_5) {
                android.util.Log.e("MediaScannerService", "exception in MediaScanner.scan()", v4_5);
            }
            this.getContentResolver().delete(v2_2, 0, 0);
            this.sendBroadcast(new android.content.Intent("android.intent.action.MEDIA_SCANNER_FINISHED", v0_2));
            this.mWakeLock.release();
            return;
        } catch (android.os.PowerManager$WakeLock v1_6) {
            this.sendBroadcast(new android.content.Intent("android.intent.action.MEDIA_SCANNER_FINISHED", v0_2));
            this.mWakeLock.release();
            throw v1_6;
        }
    }

Method com.android.providers.media.MediaScannerService$ServiceHandler.handleMessage() calling method android.util.Log.e()


    public void handleMessage(android.os.Message p9)
    {
        android.os.Bundle v0_1 = ((android.os.Bundle) p9.obj);
        if (v0_1 != null) {
            String v1_2 = v0_1.getString("filepath");
            if (v1_2 == null) {
                if (!v0_1.getBoolean("update_titles")) {
                    android.net.Uri v2_5 = v0_1.getString("volume");
                    String[] v3_3 = 0;
                    if (!"internal".equals(v2_5)) {
                        if ("external".equals(v2_5)) {
                            if (!((android.os.UserManager) this.this$0.getSystemService(android.os.UserManager)).isDemoUser()) {
                                v3_3 = com.android.providers.media.MediaScannerService.access$200(this.this$0);
                            } else {
                                v3_3 = ((String[]) com.android.internal.util.ArrayUtils.appendElement(String, com.android.providers.media.MediaScannerService.access$200(this.this$0), android.os.Environment.getDataPreloadsMediaDirectory().getAbsolutePath()));
                            }
                        }
                    } else {
                        String[] v4_16 = new String[3];
                        String v6_6 = new StringBuilder();
                        v6_6.append(android.os.Environment.getRootDirectory());
                        v6_6.append("/media");
                        v4_16[0] = v6_6.toString();
                        String v6_9 = new StringBuilder();
                        v6_9.append(android.os.Environment.getOemDirectory());
                        v6_9.append("/media");
                        v4_16[1] = v6_9.toString();
                        String v6_12 = new StringBuilder();
                        v6_12.append(android.os.Environment.getProductDirectory());
                        v6_12.append("/media");
                        v4_16[2] = v6_12.toString();
                        v3_3 = v4_16;
                    }
                    if (v3_3 != null) {
                        com.android.providers.media.MediaScannerService.access$300(this.this$0, v3_3, v2_5);
                    }
                } else {
                    this.this$0.getBaseContext().getContentResolver().acquireContentProviderClient("media").call("update_titles", 0, 0);
                }
            } else {
                String[] v4_0;
                String[] v3_10 = v0_1.getIBinder("listener");
                if (v3_10 != null) {
                    v4_0 = android.media.IMediaScannerListener$Stub.asInterface(v3_10);
                } else {
                    v4_0 = 0;
                }
                try {
                    android.net.Uri v2_0 = com.android.providers.media.MediaScannerService.access$100(this.this$0, v1_2, v0_1.getString("mimetype"));
                } catch (String[] v5_2) {
                    android.util.Log.e("MediaScannerService", "Exception scanning file", v5_2);
                }
                if (v4_0 != null) {
                    v4_0.scanCompleted(v1_2, v2_0);
                }
            }
            this.this$0.stopSelf(p9.arg1);
            return;
        } else {
            android.util.Log.e("MediaScannerService", "null intent, b/20953950");
            return;
        }
    }

Method com.android.providers.media.MediaScannerReceiver.onReceive() calling method android.util.Log.e()


    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 android.util.Log.e()


    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");
            }
            String v22_1;
            String v8_5;
            int v23;
            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 {
                            String v6_14;
                            android.content.ContentValues v5_19;
                            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 v12_0;
            String v42;
            int v13_1;
            Throwable v0_64;
            int v11_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:
                    int v13_2;
                    android.content.ContentValues v38;
                    long v34;
                    int v35;
                    int v25;
                    int v36;
                    int v31;
                    String v37;
                    int v32;
                    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 {
                            long v1_21;
                            String v33;
                            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)));
                    }
                    int v14_1;
                    String v40;
                    String v41;
                    String v39;
                    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 {
                        String v16_5;
                        void v9_3;
                        android.content.ContentValues v5_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.getAlbumArtOutputUri() calling method android.util.Log.e()


    android.net.Uri getAlbumArtOutputUri(com.android.providers.media.MediaProvider$DatabaseHelper p10, android.database.sqlite.SQLiteDatabase p11, long p12, android.net.Uri p14)
    {
        android.net.Uri v0 = 0;
        if (p14 != 0) {
            android.content.ContentValues v2_0 = this.query(p14, new String[] {"_data"}), 0, 0, 0);
            try {
                if ((v2_0 == null) || (!v2_0.moveToFirst())) {
                    p14 = 0;
                } else {
                    if (this.ensureFileExists(p14, v2_0.getString(0))) {
                        v0 = p14;
                    }
                }
            } catch (IllegalStateException v1_1) {
                libcore.io.IoUtils.closeQuietly(v2_0);
                throw v1_1;
            }
            libcore.io.IoUtils.closeQuietly(v2_0);
        }
        if (p14 == 0) {
            android.content.ContentValues v2_3 = new android.content.ContentValues();
            v2_3.put("album_id", Long.valueOf(p12));
            try {
                IllegalStateException v1_2 = this.ensureFile(0, v2_3, "", "Android/data/com.android.providers.media/albumthumbs");
                p10.mNumInserts = (p10.mNumInserts + 1);
                String v3_7 = p11.insert("album_art", "_data", v1_2);
            } catch (IllegalStateException v1) {
                android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "error creating album thumb file");
            }
            if (v3_7 > 0) {
                v0 = android.content.ContentUris.withAppendedId(com.android.providers.media.MediaProvider.ALBUMART_URI, v3_7);
                this.ensureFileExists(v0, v1_2.getAsString("_data"));
            }
        }
        return v0;
    }

Method com.android.providers.media.MediaProvider.updateDatabase() calling method android.util.Log.e()


    private static void updateDatabase(android.content.Context p7, android.database.sqlite.SQLiteDatabase p8, boolean p9, int p10, int p11)
    {
        int v0 = com.android.providers.media.MediaProvider.getDatabaseVersion(p7);
        if (p11 != v0) {
            String v2_5 = new StringBuilder();
            v2_5.append("Illegal update request. Got ");
            v2_5.append(p11);
            v2_5.append(", expected ");
            v2_5.append(v0);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v2_5.toString());
            throw new IllegalArgumentException();
        } else {
            if (p10 > p11) {
                String v2_2 = new StringBuilder();
                v2_2.append("Illegal update request: can\'t downgrade from ");
                v2_2.append(p10);
                v2_2.append(" to ");
                v2_2.append(p11);
                v2_2.append(". Did you forget to wipe data?");
                android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v2_2.toString());
                throw new IllegalArgumentException();
            } else {
                IllegalArgumentException v1_6 = android.os.SystemClock.currentTimeMicro();
                if (p10 >= 700) {
                    if (p10 >= 800) {
                        if (p10 < 900) {
                            com.android.providers.media.MediaProvider.updateFromOCSchema(p8);
                        }
                    } else {
                        com.android.providers.media.MediaProvider.updateFromKKSchema(p8);
                    }
                } else {
                    com.android.providers.media.MediaProvider.createLatestSchema(p8, p9);
                }
                com.android.providers.media.MediaProvider.sanityCheck(p8, p10);
                int v3_8 = ((android.os.SystemClock.currentTimeMicro() - v1_6) / 1000000);
                String v5_2 = new StringBuilder();
                v5_2.append("Database upgraded from version ");
                v5_2.append(p10);
                v5_2.append(" to ");
                v5_2.append(p11);
                v5_2.append(" in ");
                v5_2.append(v3_8);
                v5_2.append(" seconds");
                com.android.providers.media.MediaProvider.logToDb(p8, v5_2.toString());
                return;
            }
        }
    }

Method com.android.providers.media.MediaProvider.sanityCheck() calling method android.util.Log.e()


    private static void sanityCheck(android.database.sqlite.SQLiteDatabase p10, int p11)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0 = p10.query("audio_meta", new String[] {"count(*)"}), 0, 0, 0, 0, 0);
            v1 = p10.query("audio_meta", new String[] {"count(distinct _data)"}), 0, 0, 0, 0, 0);
            v0.moveToFirst();
            v1.moveToFirst();
            int v3_2 = v0.getInt(0);
            Throwable v2_7 = v1.getInt(0);
        } catch (Throwable v2_8) {
            libcore.io.IoUtils.closeQuietly(v0);
            libcore.io.IoUtils.closeQuietly(v1);
            throw v2_8;
        }
        if (v3_2 != v2_7) {
            String v5_2 = new StringBuilder();
            v5_2.append("audio_meta._data column is not unique while upgrading from schema ");
            v5_2.append(p11);
            v5_2.append(" : ");
            v5_2.append(v3_2);
            v5_2.append("/");
            v5_2.append(v2_7);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v5_2.toString());
            p10.execSQL("DELETE FROM audio_meta;");
        }
        libcore.io.IoUtils.closeQuietly(v0);
        libcore.io.IoUtils.closeQuietly(v1);
        return;
    }

Method com.android.providers.media.MediaProvider.localizeTitles() calling method android.util.Log.e()


    private void localizeTitles()
    {
        Throwable v0_2 = this.mDatabases.values().iterator();
        while (v0_2.hasNext()) {
            android.database.sqlite.SQLiteDatabase v10 = ((com.android.providers.media.MediaProvider$DatabaseHelper) v0_2.next()).getWritableDatabase();
            android.database.Cursor v2_2 = v10.query("files", new String[] {"_id", "title_resource_uri"}), "title_resource_uri IS NOT NULL", 0, 0, 0, 0);
            Throwable v3_1 = 0;
            try {
                while (v2_2.moveToNext()) {
                    String v5_1 = v2_2.getString(0);
                    String v7_1 = v2_2.getString(1);
                    android.content.ContentValues v8_2 = new android.content.ContentValues();
                    try {
                        String v9_1 = this.getLocalizedTitle(v7_1);
                        v8_2.put("title_key", android.provider.MediaStore$Audio.keyFor(v9_1));
                        v8_2.put("title", v9_1.trim());
                        String v6_2 = new String[1];
                        v6_2[0] = v5_1;
                        v10.update("files", v8_2, "_id=?", v6_2);
                    } catch (Exception v4) {
                        String v9_3 = new StringBuilder();
                        v9_3.append("Error updating localized title for ");
                        v9_3.append(v7_1);
                        v9_3.append(", keeping old localization");
                        android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v9_3.toString());
                    }
                }
            } catch (Throwable v0_4) {
                if (v2_2 != null) {
                    com.android.providers.media.MediaProvider.$closeResource(v3_1, v2_2);
                }
                throw v0_4;
            } catch (Throwable v0_3) {
                v3_1 = v0_3;
                throw v3_1;
            }
            if (v2_2 != null) {
                com.android.providers.media.MediaProvider.$closeResource(0, v2_2);
            }
        }
        return;
    }

Method com.android.providers.media.MediaProvider.insertInternal() calling method android.util.Log.e()


    private android.net.Uri insertInternal(android.net.Uri p26, int p27, android.content.ContentValues p28, java.util.ArrayList p29)
    {
        void v8 = this;
        String v12 = com.android.providers.media.MediaProvider.getVolumeName(p26);
        if (p27 != 500) {
            int v0_4 = 0;
            long v1_7 = 0;
            if (p28 != null) {
                v0_4 = p28.getAsString("genre");
                p28.remove("genre");
                v1_7 = p28.getAsString("_data");
            }
            String v13 = v0_4;
            String v14 = v1_7;
            java.util.ArrayList v7_2 = this.getDatabaseForUri(p26);
            if ((v7_2 == null) && ((p27 != 300) && (p27 != 705))) {
                long v1_22 = new StringBuilder();
                v1_22.append("Unknown URI: ");
                v1_22.append(p26);
                throw new UnsupportedOperationException(v1_22.toString());
            } else {
                if ((p27 != 300) && (p27 != 705)) {
                    int v0_44 = v7_2.getWritableDatabase();
                } else {
                    v0_44 = 0;
                }
                android.net.Uri v15_1;
                android.net.Uri v15_2;
                int v18_1;
                android.net.Uri v23;
                java.util.ArrayList v19;
                android.net.Uri v15_0;
                int v0_1;
                int v10_0;
                int v6_1 = v0_44;
                switch (p27) {
                    case 1:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        int v0_45 = this.insertFile(v15_0, p26, p28, 1, 1, p29);
                        if (v0_45 <= 0) {
                            v0_1 = v23;
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 1, v0_45);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Images$Media.getContentUri(v12), v0_45);
                        }
                        break;
                    case 3:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        int v0_43 = this.ensureFile(v15_0.mInternal, p28, ".jpg", "DCIM/.thumbnails");
                        v15_0.mNumInserts = (v15_0.mNumInserts + 1);
                        long v1_37 = v10_0.insert("thumbnails", "name", v0_43);
                        if (v1_37 <= 0) {
                        } else {
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Images$Thumbnails.getContentUri(v12), v1_37);
                        }
                        break;
                    case 100:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        long v1_32 = this.insertFile(v7_2, p26, p28, 2, 1, p29);
                        if (v1_32 <= 0) {
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 2, v1_32);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Media.getContentUri(v12), v1_32);
                            if (v13 == null) {
                            } else {
                                v8 = this.updateGenre(v1_32, v13);
                            }
                        }
                        break;
                    case 102:
                        v10_0 = v6_1;
                        int v0_39 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(2))));
                        long v1_30 = new android.content.ContentValues(p28);
                        v1_30.put("audio_id", v0_39);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_42 = v10_0.insert("audio_genres_map", "genre_id", v1_30);
                        if (v2_42 <= 0) {
                            v23 = 0;
                            v15_0 = v7_2;
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_42);
                            v0_1 = v15_2;
                            v15_0 = v7_2;
                        }
                        break;
                    case 104:
                        v10_0 = v6_1;
                        int v0_35 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(2))));
                        long v1_26 = new android.content.ContentValues(p28);
                        v1_26.put("audio_id", v0_35);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_37 = v10_0.insert("audio_playlists_map", "playlist_id", v1_26);
                        if (v2_37 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_37);
                        }
                        break;
                    case 106:
                        v10_0 = v6_1;
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        int v0_31 = v10_0.insert("audio_genres", "audio_id", p28);
                        if (v0_31 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Genres.getContentUri(v12), v0_31);
                        }
                        break;
                    case 108:
                        int v22_1 = v6_1;
                        int v0_27 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(3))));
                        long v1_20 = new android.content.ContentValues(p28);
                        v1_20.put("genre_id", v0_27);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        v10_0 = v22_1;
                        String v2_29 = v10_0.insert("audio_genres_map", "genre_id", v1_20);
                        if (v2_29 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_29);
                        }
                        break;
                    case 110:
                        int v0_21 = new android.content.ContentValues(p28);
                        v0_21.put("date_added", Long.valueOf((System.currentTimeMillis() / 1000)));
                        int v22_0 = v6_1;
                        int v10_5 = v7_2;
                        long v1_18 = this.insertFile(v7_2, p26, v0_21, 4, 1, p29);
                        if (v1_18 <= 0) {
                            v23 = 0;
                            v15_0 = v10_5;
                            v10_0 = v22_0;
                        } else {
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Playlists.getContentUri(v12), v1_18);
                            v15_0 = v10_5;
                            v10_0 = v22_0;
                        }
                        break;
                    case 111:
                    case 112:
                        int v0_18 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(3))));
                        long v1_14 = new android.content.ContentValues(p28);
                        v1_14.put("playlist_id", v0_18);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_20 = v6_1.insert("audio_playlists_map", "playlist_id", v1_14);
                        if (v2_20 <= 0) {
                            v10_0 = v6_1;
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_20);
                            v10_0 = v6_1;
                        }
                        break;
                    case 119:
                        int v20_1 = v6_1;
                        if (v7_2.mInternal) {
                            throw new UnsupportedOperationException("no internal album art allowed");
                        } else {
                            try {
                                int v0_13 = this.ensureFile(0, p28, "", "Android/data/com.android.providers.media/albumthumbs");
                            } catch (int v0) {
                                v0_13 = p28;
                            }
                            v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                            v6_1 = v20_1;
                            long v1_12 = v6_1.insert("album_art", "_data", v0_13);
                            if (v1_12 <= 0) {
                            } else {
                                v15_2 = android.content.ContentUris.withAppendedId(p26, v1_12);
                            }
                        }
                        break;
                    case 200:
                        int v20_0 = v6_1;
                        java.util.ArrayList v21 = v7_2;
                        int v0_8 = this.insertFile(v7_2, p26, p28, 3, 1, p29);
                        if (v0_8 <= 0) {
                            v23 = 0;
                            v10_0 = v20_0;
                            v15_0 = v21;
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 3, v0_8);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Video$Media.getContentUri(v12), v0_8);
                            v10_0 = v20_0;
                            v15_0 = v21;
                        }
                        break;
                    case 202:
                        v19 = v7_2;
                        int v0_6 = this.ensureFile(v7_2.mInternal, p28, ".jpg", "DCIM/.thumbnails");
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        long v1_5 = v6_1.insert("videothumbnails", "name", v0_6);
                        if (v1_5 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Video$Thumbnails.getContentUri(v12), v1_5);
                        }
                        break;
                    case 300:
                        v19 = v7_2;
                        int v0_3 = p28.getAsString("name");
                        long v1_0 = this.attachVolume(v0_3);
                        if ((this.mMediaScannerVolume != null) && (this.mMediaScannerVolume.equals(v0_3))) {
                            String v2_5 = this.getDatabaseForUri(v1_0);
                            if (v2_5 != null) {
                                v2_5.mScanStartTime = android.os.SystemClock.currentTimeMicro();
                            } else {
                                String v4_1 = new StringBuilder();
                                v4_1.append("no database for attached volume ");
                                v4_1.append(v1_0);
                                android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v4_1.toString());
                            }
                        }
                        return v1_0;
                    case 700:
                        v18_1 = v6_1;
                        v19 = v7_2;
                        int v0_0 = this.insertFile(v19, p26, p28, 0, 1, p29);
                        if (v0_0 <= 0) {
                            v23 = 0;
                            v10_0 = v18_1;
                            v15_0 = v19;
                        } else {
                            v15_1 = android.provider.MediaStore$Files.getContentUri(v12, v0_0);
                            v0_1 = v15_1;
                            v10_0 = v18_1;
                            v15_0 = v19;
                        }
                        break;
                    case 702:
                        v18_1 = v6_1;
                        v19 = v7_2;
                        int v0_63 = this.insertFile(v7_2, p26, p28, 0, 0, p29);
                        if (v0_63 <= 0) {
                        } else {
                            v15_1 = android.provider.MediaStore$Files.getMtpObjectsUri(v12, v0_63);
                        }
                        break;
                    case 705:
                        if (this.mMtpService == null) {
                            int v0_60 = this.getContext();
                            v0_60.bindService(new android.content.Intent(v0_60, com.android.providers.media.MtpService), this.mMtpServiceConnection, 1);
                        }
                        this.fixParentIdIfNeeded();
                        break;
                    case 706:
                        int v0_57 = this.insertDirectory(v7_2, v7_2.getWritableDatabase(), p28.getAsString("_data"));
                        if (v0_57 <= 0) {
                        } else {
                            v15_2 = android.provider.MediaStore$Files.getContentUri(v12, v0_57);
                        }
                        break;
                    default:
                        v23 = 0;
                        long v1_43 = new StringBuilder();
                        v1_43.append("Invalid URI ");
                        v1_43.append(p26);
                        throw new UnsupportedOperationException(v1_43.toString());
                }
                if ((v14 != null) && (v14.toLowerCase(java.util.Locale.US).endsWith("/.nomedia"))) {
                    v8.processNewNoMediaPath(v15_0, v10_0, v14);
                }
                return v0_1;
            }
        } else {
            this.mMediaScannerVolume = p28.getAsString("volume");
            int v0_52 = new StringBuilder();
            v0_52.append("content://media/");
            v0_52.append(this.mMediaScannerVolume);
            v0_52.append("/audio");
            int v0_55 = this.getDatabaseForUri(android.net.Uri.parse(v0_52.toString()));
            if (v0_55 != 0) {
                v0_55.mScanStartTime = android.os.SystemClock.currentTimeMicro();
            } else {
                String v2_55 = new StringBuilder();
                v2_55.append("no database for scanned volume ");
                v2_55.append(this.mMediaScannerVolume);
                android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v2_55.toString());
            }
            return android.provider.MediaStore.getMediaScannerUri();
        }
    }

Method com.android.providers.media.MediaProvider.insertFile() calling method android.util.Log.e()


    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)
    {
        Long v5_2;
        com.android.providers.media.MediaProvider v7_2;
        com.android.providers.media.MediaProvider$DatabaseHelper v1_18;
        int v29;
        Long v21_0;
        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 {
                    String v23_1;
                    String v25;
                    String v26;
                    int v27;
                    int v14_1;
                    com.android.providers.media.MediaProvider$DatabaseHelper v1_1;
                    long v18_8;
                    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;
                            }
                            Throwable v15_1;
                            com.android.providers.media.MediaProvider$DatabaseHelper v1_16;
                            java.util.HashMap v30;
                            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.insertFile() calling method android.util.Log.e()


    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)
    {
        Long v21_0;
        Long v5_2;
        com.android.providers.media.MediaProvider v7_2;
        com.android.providers.media.MediaProvider$DatabaseHelper v1_18;
        int v29;
        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 {
                    com.android.providers.media.MediaProvider$DatabaseHelper v1_1;
                    String v26;
                    String v23_1;
                    String v25;
                    int v27;
                    int v14_1;
                    long v18_8;
                    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;
                            com.android.providers.media.MediaProvider$DatabaseHelper v1_16;
                            Throwable v15_1;
                            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.getTitleFromResourceUri() calling method android.util.Log.e()


    private String getTitleFromResourceUri(String p10, boolean p11)
    {
        if (!android.text.TextUtils.isEmpty(p10)) {
            android.net.Uri v0_1 = android.net.Uri.parse(p10);
            if ("android.resource".equals(v0_1.getScheme())) {
                java.util.List v3_1 = v0_1.getPathSegments();
                if (v3_1.size() == 2) {
                    String v5_2 = ((String) v3_1.get(0));
                    if ("string".equals(v5_2)) {
                        android.content.res.Resources v4_3;
                        String v1_1 = v0_1.getAuthority();
                        if (!p11) {
                            android.content.res.Resources v4_2 = this.getContext().createPackageContext(v1_1, 0);
                            String v6_4 = v4_2.getResources().getConfiguration();
                            v6_4.setLocale(java.util.Locale.US);
                            v4_3 = v4_2.createConfigurationContext(v6_4).getResources();
                        } else {
                            v4_3 = this.mPackageManager.getResourcesForApplication(v1_1);
                        }
                        return v4_3.getString(v4_3.getIdentifier(((String) v3_1.get(1)), v5_2, v1_1));
                    } else {
                        String v6_9 = new StringBuilder();
                        v6_9.append("Error getting localized title for ");
                        v6_9.append(p10);
                        v6_9.append(", first path segment must be \"string\"");
                        android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v6_9.toString());
                        return 0;
                    }
                } else {
                    String v5_4 = new StringBuilder();
                    v5_4.append("Error getting localized title for ");
                    v5_4.append(p10);
                    v5_4.append(", must have 2 path segments");
                    android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v5_4.toString());
                    return 0;
                }
            } else {
                return 0;
            }
        } else {
            return 0;
        }
    }

Method com.android.providers.media.MediaProvider.getParent() calling method android.util.Log.e()


    private long getParent(com.android.providers.media.MediaProvider$DatabaseHelper p20, android.database.sqlite.SQLiteDatabase p21, String p22)
    {
        int v4 = p22.lastIndexOf(47);
        if (v4 <= 0) {
            return 0;
        } else {
            String v7 = p22.substring(0, v4);
            int v8 = 0;
            while (v8 < this.mExternalStoragePaths.length) {
                if (!v7.equals(this.mExternalStoragePaths[v8])) {
                    v8++;
                } else {
                    return 0;
                }
            }
            try {
                Long v5_2 = ((Long) this.mDirectoryCache.get(v7));
            } catch (java.util.HashMap v0_4) {
                throw v0_4;
            }
            if (v5_2 == null) {
                long v11_2;
                String[] v15 = new String[1];
                v15[0] = v7;
                p20.mNumQueries = (p20.mNumQueries + 1);
                android.database.Cursor v9_4 = p21.query("files", com.android.providers.media.MediaProvider.sIdOnlyColumn, "_data=?", v15, 0, 0, 0);
                if (v9_4 == null) {
                    v11_2 = this.insertDirectory(p20, p21, v7);
                } else {
                    try {
                        if (v9_4.getCount() != 0) {
                            if (v9_4.getCount() > 1) {
                                android.database.sqlite.SQLiteDatabase v10_3 = new StringBuilder();
                                v10_3.append("more than one match for ");
                                v10_3.append(v7);
                                android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v10_3.toString());
                            }
                            v9_4.moveToFirst();
                            v11_2 = v9_4.getLong(0);
                        } else {
                        }
                    } catch (java.util.HashMap v0_2) {
                        libcore.io.IoUtils.closeQuietly(v9_4);
                        throw v0_2;
                    }
                }
                this.mDirectoryCache.put(v7, Long.valueOf(v11_2));
                libcore.io.IoUtils.closeQuietly(v9_4);
                return v11_2;
            } else {
                return v5_2.longValue();
            }
        }
    }

Method com.android.providers.media.MediaProvider.getLocalizedTitle() calling method android.util.Log.e()


    private String getLocalizedTitle(String p5)
    {
        try {
            return this.getTitleFromResourceUri(p5, 1);
        } catch (Exception v0_2) {
            String v2_2 = new StringBuilder();
            v2_2.append("Error getting localized title for ");
            v2_2.append(p5);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v2_2.toString(), v0_2);
            throw v0_2;
        }
    }

Method com.android.providers.media.MediaProvider.getKeyIdForName() calling method android.util.Log.e()


    private long getKeyIdForName(com.android.providers.media.MediaProvider$DatabaseHelper p31, android.database.sqlite.SQLiteDatabase p32, String p33, String p34, String p35, String p36, String p37, String p38, int p39, String p40, java.util.HashMap p41, android.net.Uri p42)
    {
        if ((p36 != null) && (p36.length() != 0)) {
            void v1_0 = p36;
        } else {
            v1_0 = "<unknown>";
        }
        Throwable v0_7 = android.provider.MediaStore$Audio.keyFor(v1_0);
        if (v0_7 != null) {
            boolean v18 = p33.equals("albums");
            boolean v19 = "<unknown>".equals(v1_0);
            if (v18) {
                android.database.Cursor v8_3 = new StringBuilder();
                v8_3.append(v0_7);
                v8_3.append(p39);
                v0_7 = v8_3.toString();
                if (v19) {
                    android.database.Cursor v8_6 = new StringBuilder();
                    v8_6.append(v0_7);
                    v8_6.append(p40);
                    v0_7 = v8_6.toString();
                }
            }
            android.content.ContentResolver v13_12 = v0_7;
            java.util.HashMap v12_1 = new String[1];
            v12_1[0] = v13_12;
            p31.mNumQueries = (p31.mNumQueries + 1);
            android.database.Cursor v8_10 = new StringBuilder();
            v8_10.append(p34);
            v8_10.append("=?");
            String v24 = v13_12;
            android.database.Cursor v8_12 = p32.query(p33, 0, v8_10.toString(), v12_1, 0, 0, 0);
            try {
                android.content.ContentResolver v13_11;
                java.util.HashMap v12_0;
                switch (v8_12.getCount()) {
                    case 0:
                        Throwable v0_11 = new android.content.ContentValues();
                        String v7_1;
                        v0_11.put(p34, v24);
                        v0_11.put(p35, v1_0);
                        p31.mNumInserts = (p31.mNumInserts + 1);
                        v13_11 = p32.insert(p33, "duration", v0_11);
                        if ((p38 == null) || ((!v18) || (v19))) {
                            v7_1 = p33;
                            v12_0 = p41;
                        } else {
                            v12_0 = p41;
                            v7_1 = p33;
                            this.makeThumbAsync(p31, p32, p38, v13_11);
                        }
                        if (v13_11 > 0) {
                            void v1_5 = p42.toString().substring(16, 24);
                            android.net.Uri v2_11 = new StringBuilder();
                            v2_11.append("content://media/");
                            v2_11.append(v1_5);
                            v2_11.append("/audio/");
                            v2_11.append(v7_1);
                            v2_11.append("/");
                            v2_11.append(v13_11);
                            this.getContext().getContentResolver().notifyChange(android.net.Uri.parse(v2_11.toString()), 0);
                        }
                        break;
                    case 1:
                        try {
                            v8_12.moveToFirst();
                            long v14_2 = v8_12.getLong(0);
                            Throwable v0_17 = v8_12.getString(2);
                            try {
                                String v10_5 = this.makeBestName(v1_0, v0_17);
                            } catch (Throwable v0_9) {
                                long v15 = v1_0;
                                java.util.HashMap v28 = v12_1;
                                java.util.HashMap v12 = p41;
                                libcore.io.IoUtils.closeQuietly(v8_12);
                                throw v0_9;
                            }
                            if (!v10_5.equals(v0_17)) {
                                android.content.ContentValues v11_1 = new android.content.ContentValues();
                                v11_1.put(p35, v10_5);
                                p31.mNumUpdates = (p31.mNumUpdates + 1);
                                android.content.ContentResolver v13_3 = new StringBuilder();
                                v13_3.append("rowid=");
                                v13_3.append(Integer.toString(((int) v14_2)));
                                p32.update(p33, v11_1, v13_3.toString(), 0);
                                try {
                                    Throwable v0_6 = p42.toString().substring(16, 24);
                                    android.net.Uri v2_2 = new StringBuilder();
                                    v2_2.append("content://media/");
                                    v2_2.append(v0_6);
                                    v2_2.append("/audio/");
                                    v2_2.append(p33);
                                    v2_2.append("/");
                                    v2_2.append(v14_2);
                                    this.getContext().getContentResolver().notifyChange(android.net.Uri.parse(v2_2.toString()), 0);
                                } catch (Throwable v0_9) {
                                    v15 = v1_0;
                                    v28 = v12_1;
                                    v12 = p41;
                                }
                            }
                            v28 = v12_1;
                            v13_11 = v14_2;
                            v12_0 = p41;
                        } catch (Throwable v0_9) {
                        }
                        break;
                    default:
                        v15 = v1_0;
                        String v10_1 = v24;
                        v12_0 = p41;
                        void v1_7 = new StringBuilder();
                        v1_7.append("Multiple entries in table ");
                        v1_7.append(p33);
                        v1_7.append(" for key ");
                        v1_7.append(v10_1);
                        android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v1_7.toString());
                        v13_11 = -1;
                }
            } catch (Throwable v0_9) {
                android.content.ContentResolver v3 = p37;
                String v7 = p33;
                String v10 = v24;
            } catch (Throwable v0_9) {
            }
            Throwable v0_13 = v13_11;
            libcore.io.IoUtils.closeQuietly(v8_12);
            if ((v12_0 != null) && (!v19)) {
                v12_0.put(p37, Long.valueOf(v0_13));
            }
            return v0_13;
        } else {
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, "null key", new Exception());
            return -1;
        }
    }

Method com.android.providers.media.MediaProvider.getDefaultTitle() calling method android.util.Log.e()


    private String getDefaultTitle(String p5)
    {
        try {
            return this.getTitleFromResourceUri(p5, 0);
        } catch (Exception v0_2) {
            String v2_2 = new StringBuilder();
            v2_2.append("Error getting default title for ");
            v2_2.append(p5);
            android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v2_2.toString(), v0_2);
            throw v0_2;
        }
    }

Method com.android.providers.media.MediaProvider.ensureFileExists() calling method android.util.Log.e()


    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.detachVolume() calling method android.util.Log.e()


    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 android.util.Log.e()


    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.attachVolume() calling method android.util.Log.e()


    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$DatabaseHelper.getWritableDatabase() calling method android.util.Log.e()


    public declared_synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase()
    {
        try {
            this.mUpgradeAttempted = 0;
            try {
                android.database.sqlite.SQLiteDatabase v0_1 = super.getWritableDatabase();
            } catch (android.database.sqlite.SQLiteDatabase v1_5) {
                if (this.mUpgradeAttempted) {
                } else {
                    String v2_0 = com.android.providers.media.MediaProvider.access$400();
                    String v3_1 = new StringBuilder();
                    v3_1.append("failed to open database ");
                    v3_1.append(this.mName);
                    android.util.Log.e(v2_0, v3_1.toString(), v1_5);
                    return 0;
                }
            }
            if ((v0_1 == null) && (this.mUpgradeAttempted)) {
                this.mContext.deleteDatabase(this.mName);
                v0_1 = super.getWritableDatabase();
            }
            return v0_1;
        } catch (android.database.sqlite.SQLiteDatabase v0_0) {
            throw v0_0;
        }
    }

Method com.android.providers.media.MediaProvider$1.onReceive() calling method android.util.Log.e()


    public void onReceive(android.content.Context p12, android.content.Intent p13)
    {
        if ("android.intent.action.MEDIA_EJECT".equals(p13.getAction())) {
            android.os.storage.StorageVolume v0_4 = ((android.os.storage.StorageVolume) p13.getParcelableExtra("android.os.storage.extra.STORAGE_VOLUME"));
            if (!v0_4.getPath().equals(com.android.providers.media.MediaProvider.access$000(this.this$0)[0])) {
                com.android.providers.media.MediaProvider.access$300(this.this$0);
                Throwable v2_8 = ((com.android.providers.media.MediaProvider$DatabaseHelper) com.android.providers.media.MediaProvider.access$300(this.this$0).get("external"));
                android.net.Uri v1_7 = new StringBuilder();
                v1_7.append("file://");
                v1_7.append(v0_4.getPath());
                android.net.Uri v1_9 = android.net.Uri.parse(v1_7.toString());
                if (v2_8 != null) {
                    try {
                        p12.sendBroadcast(new android.content.Intent("android.intent.action.MEDIA_SCANNER_STARTED", v1_9));
                        String v4_10 = com.android.providers.media.MediaProvider.access$400();
                        String v5_12 = new StringBuilder();
                        v5_12.append("deleting all entries for storage ");
                        v5_12.append(v0_4);
                        android.util.Log.d(v4_10, v5_12.toString());
                        String v4_13 = android.provider.MediaStore$Files.getMtpObjectsUri("external").buildUpon();
                        v4_13.appendQueryParameter("deletedata", "false");
                        String v5_15 = this.this$0;
                        int v6_3 = v4_13.build();
                        String[] v8_1 = new String[3];
                        String v9_2 = new StringBuilder();
                        v9_2.append(v0_4.getPath());
                        v9_2.append("/%");
                        v8_1[0] = v9_2.toString();
                        v8_1[1] = Integer.toString((v0_4.getPath().length() + 1));
                        String v9_6 = new StringBuilder();
                        v9_6.append(v0_4.getPath());
                        v9_6.append("/");
                        v8_1[2] = v9_6.toString();
                        v5_15.delete(v6_3, "_data LIKE ?1 AND lower(substr(_data,1,?2))=lower(?3)", v8_1);
                        p12.getContentResolver().notifyChange(android.provider.MediaStore$Audio$Media.getContentUri("external"), 0);
                        p12.getContentResolver().notifyChange(android.provider.MediaStore$Images$Media.getContentUri("external"), 0);
                        p12.getContentResolver().notifyChange(android.provider.MediaStore$Video$Media.getContentUri("external"), 0);
                        p12.getContentResolver().notifyChange(android.provider.MediaStore$Files.getContentUri("external"), 0);
                        android.content.Intent v3_5 = new android.content.Intent("android.intent.action.MEDIA_SCANNER_FINISHED", v1_9);
                    } catch (android.content.Intent v3_8) {
                        p12.sendBroadcast(new android.content.Intent("android.intent.action.MEDIA_SCANNER_FINISHED", v1_9));
                        throw v3_8;
                    } catch (android.content.Intent v3_6) {
                        android.util.Log.e(com.android.providers.media.MediaProvider.access$400(), "exception deleting storage entries", v3_6);
                        v3_5 = new android.content.Intent("android.intent.action.MEDIA_SCANNER_FINISHED", v1_9);
                    }
                    p12.sendBroadcast(v3_5);
                }
            } else {
                com.android.providers.media.MediaProvider.access$100(this.this$0, android.net.Uri.parse("content://media/external"));
                com.android.providers.media.MediaProvider.access$200().clear();
                android.media.MiniThumbFile.reset();
            }
        }
        return;
    }

Method com.android.providers.media.MtpService.startServer() calling method android.util.Log.i()


    private declared_synchronized void startServer(android.os.storage.StorageVolume p19, String[] p20)
    {
        void v1 = this;
        try {
            if (android.os.UserHandle.myUserId() == android.app.ActivityManager.getCurrentUser()) {
                try {
                    if (com.android.providers.media.MtpService.sServerHolder == null) {
                        String[] v4_2;
                        android.mtp.MtpDatabase v3_1 = new StringBuilder();
                        v3_1.append("starting MTP server in ");
                        if (!this.mPtpMode) {
                            v4_2 = "MTP mode";
                        } else {
                            v4_2 = "PTP mode";
                        }
                        String[] v4_6;
                        v3_1.append(v4_2);
                        v3_1.append(" with storage ");
                        v3_1.append(p19.getPath());
                        if (!this.mUnlocked) {
                            v4_6 = "";
                        } else {
                            v4_6 = " unlocked";
                        }
                        v3_1.append(v4_6);
                        v3_1.append(" as user ");
                        v3_1.append(android.os.UserHandle.myUserId());
                        android.util.Log.d("MtpService", v3_1.toString());
                        android.mtp.MtpDatabase v3_4 = new android.mtp.MtpDatabase(this, "external", p20);
                        android.os.ParcelFileDescriptor v0_5 = android.os.Build.getSerial();
                        if ("unknown".equals(v0_5)) {
                            v0_5 = "????????";
                        }
                        String v14 = v0_5;
                        android.hardware.usb.IUsbManager vtmp17 = android.hardware.usb.IUsbManager$Stub.asInterface(android.os.ServiceManager.getService("usb"));
                        try {
                            android.os.storage.StorageVolume v7_3;
                            if (!this.mPtpMode) {
                                v7_3 = 4;
                                android.os.ParcelFileDescriptor v0_12 = vtmp17.getControlFd(v7_3);
                            } else {
                                v7_3 = 16;
                            }
                        } catch (android.os.ParcelFileDescriptor v0_10) {
                            boolean v8_1 = new StringBuilder();
                            v8_1.append("Error communicating with UsbManager: ");
                            v8_1.append(v0_10);
                            android.util.Log.e("MtpService", v8_1.toString());
                            v0_12 = 0;
                        }
                        java.util.Iterator v6_8 = 0;
                        if (v0_12 != null) {
                            v6_8 = v0_12.getFileDescriptor();
                        } else {
                            android.util.Log.i("MtpService", "Couldn\'t get control FD!");
                        }
                        android.mtp.MtpServer v17 = new android.mtp.MtpServer;
                        v17(v3_4, v6_8, this.mPtpMode, new com.android.providers.media.MtpService$OnServerTerminated(this, 0), android.os.Build.MANUFACTURER, android.os.Build.MODEL, "1.0", v14);
                        android.mtp.MtpServer v5_0 = v17;
                        v3_4.setServer(v5_0);
                        com.android.providers.media.MtpService.sServerHolder = new com.android.providers.media.MtpService$ServerHolder(v5_0, v3_4);
                        if (this.mUnlocked) {
                            if (!this.mPtpMode) {
                                java.util.Iterator v6_6 = this.mVolumeMap.values().iterator();
                                while (v6_6.hasNext()) {
                                    v1 = v1.addStorage(((android.os.storage.StorageVolume) v6_6.next()));
                                }
                            } else {
                                this.addStorage(p19);
                            }
                        }
                        v5_0.start();
                        return;
                    } else {
                        return;
                    }
                } catch (android.os.ParcelFileDescriptor v0_0) {
                } catch (android.os.ParcelFileDescriptor v0_0) {
                }
                throw v0_0;
            } else {
                return;
            }
        } catch (android.os.ParcelFileDescriptor v0_1) {
            throw v0_1;
        }
    }

Method com.android.providers.media.MediaProvider.update() calling method android.util.Log.i()


    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 v8_5;
            String v22_1;
            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 v12_0;
            int v13_1;
            int v11_0;
            Throwable v0_64;
            String v42;
            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 v13_2;
                    int v32;
                    android.content.ContentValues v38;
                    long v34;
                    int v35;
                    int v25;
                    int v36;
                    int v31;
                    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.update() calling method android.util.Log.i()


    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");
            }
            String v8_5;
            int v23;
            String v22_1;
            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 {
                            String v6_14;
                            android.content.ContentValues v5_19;
                            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 v12_0;
            Throwable v0_64;
            String v42;
            int v11_0;
            int v13_1;
            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:
                    int v32;
                    android.content.ContentValues v38;
                    long v34;
                    int v35;
                    int v36;
                    int v25;
                    int v31;
                    int v13_2;
                    String v37;
                    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)));
                    }
                    int v14_1;
                    String v40;
                    String v41;
                    String v39;
                    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;
                        String v16_5;
                        android.content.ContentValues v5_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.hidePath() calling method android.util.Log.i()


    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.attachVolume() calling method android.util.Log.i()


    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.MtpService.addStorage() calling method android.util.Log.v()


    private void addStorage(android.os.storage.StorageVolume p4)
    {
        String v1_1 = new StringBuilder();
        v1_1.append("Adding MTP storage:");
        v1_1.append(p4.getPath());
        android.util.Log.v("MtpService", v1_1.toString());
        try {
            if (com.android.providers.media.MtpService.sServerHolder != null) {
                com.android.providers.media.MtpService.sServerHolder.database.addStorage(p4);
            }
        } catch (android.mtp.MtpDatabase v0_4) {
            throw v0_4;
        }
        return;
    }

Method com.android.providers.media.MediaProvider.pruneThumbnails() calling method android.util.Log.v()


    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.MediaThumbRequest.updateDatabase() calling method android.util.Log.w()


    android.net.Uri updateDatabase(android.graphics.Bitmap p7)
    {
        android.database.Cursor v0_0 = this.mCr;
        android.net.Uri v1_0 = this.mThumbUri;
        Exception v3_5 = new StringBuilder();
        v3_5.append(this.mOrigColumnName);
        v3_5.append(" = ");
        v3_5.append(this.mOrigId);
        android.database.Cursor v0_1 = v0_0.query(v1_0, com.android.providers.media.MediaThumbRequest.THUMB_PROJECTION, v3_5.toString(), 0, 0);
        if (v0_1 != null) {
            try {
                if (!v0_1.moveToFirst()) {
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    android.content.ContentValues v2_3 = new android.content.ContentValues(4);
                    v2_3.put("kind", Integer.valueOf(1));
                    v2_3.put(this.mOrigColumnName, Long.valueOf(this.mOrigId));
                    v2_3.put("width", Integer.valueOf(p7.getWidth()));
                    v2_3.put("height", Integer.valueOf(p7.getHeight()));
                    try {
                        return this.mCr.insert(this.mThumbUri, v2_3);
                    } catch (Exception v3_10) {
                        android.util.Log.w("MediaThumbRequest", v3_10);
                        return 0;
                    }
                } else {
                    android.net.Uri v1_4 = android.content.ContentUris.withAppendedId(this.mThumbUri, v0_1.getLong(0));
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    return v1_4;
                }
            } catch (android.net.Uri v1_2) {
                if (v0_1 != null) {
                    v0_1.close();
                }
                throw v1_2;
            }
        } else {
            return 0;
        }
    }

Method com.android.providers.media.MediaThumbRequest.execute() calling method android.util.Log.w()


    void execute()
    {
        android.media.MiniThumbFile v8 = android.media.MiniThumbFile.instance(this.mUri);
        long v2_2 = this.mMagic;
        if ((v2_2 != 0) && (v8.getMagic(this.mOrigId) == v2_2)) {
            android.os.ParcelFileDescriptor v10_1 = 0;
            int v11_1 = android.os.Binder.clearCallingIdentity();
            try {
                long v13_1 = this.mCr;
                android.net.Uri v14 = this.mThumbUri;
                IllegalStateException v0_15 = new StringBuilder();
                v0_15.append(this.mOrigColumnName);
                v0_15.append(" = ");
                v0_15.append(this.mOrigId);
                android.database.Cursor v9_0 = v13_1.query(v14, com.android.providers.media.MediaThumbRequest.THUMB_PROJECTION, v0_15.toString(), 0, 0);
            } catch (IllegalStateException v0_18) {
                android.os.Binder.restoreCallingIdentity(v11_1);
                if (v9_0 != null) {
                    v9_0.close();
                }
                if (0 == 0) {
                    throw v0_18;
                } else {
                    v10_1.close();
                    return;
                }
            } catch (IllegalStateException v0) {
                android.os.Binder.restoreCallingIdentity(v11_1);
                if (v9_0 != null) {
                    v9_0.close();
                }
                if (0 != 0) {
                    v10_1.close();
                    return;
                }
            }
            if ((v9_0 != null) && (v9_0.moveToFirst())) {
                v10_1 = this.mCr.openFileDescriptor(this.mThumbUri.buildUpon().appendPath(v9_0.getString(0)).build(), "r");
            }
            android.os.Binder.restoreCallingIdentity(v11_1);
            if (v9_0 != null) {
                v9_0.close();
            }
            if (v10_1 != null) {
                v10_1.close();
                return;
            }
        }
        IllegalStateException v0_22 = 0;
        if (this.mPath != null) {
            if (!this.mIsVideo) {
                v0_22 = android.media.ThumbnailUtils.createImageThumbnail(this.mPath, 1);
            } else {
                v0_22 = android.media.ThumbnailUtils.createVideoThumbnail(this.mPath, 1);
            }
            if (v0_22 != null) {
                String v4_20 = this.updateDatabase(v0_22);
                if (v4_20 != null) {
                    String v5_10 = this.mCr.openOutputStream(v4_20);
                    v0_22.compress(android.graphics.Bitmap$CompressFormat.JPEG, 85, v5_10);
                    v5_10.close();
                }
            } else {
                String v5_3 = new StringBuilder();
                v5_3.append("Can\'t create mini thumbnail for ");
                v5_3.append(this.mPath);
                android.util.Log.w("MediaThumbRequest", v5_3.toString());
                return;
            }
        }
        android.database.Cursor v9_1 = android.media.ThumbnailUtils.extractThumbnail(v0_22, 96, 96, 2);
        if (v9_1 == null) {
            android.util.Log.w("MediaThumbRequest", "can\'t create bitmap for thumbnail.");
        } else {
            android.os.ParcelFileDescriptor v10_0 = new java.io.ByteArrayOutputStream();
            v9_1.compress(android.graphics.Bitmap$CompressFormat.JPEG, 75, v10_0);
            v9_1.recycle();
            try {
                v10_0.close();
                IllegalStateException v0_5 = v10_0.toByteArray();
                android.net.Uri v12 = v0_5;
            } catch (IllegalStateException v0_6) {
                long v6_2 = new StringBuilder();
                v6_2.append("got exception ex ");
                v6_2.append(v0_6);
                android.util.Log.e("MediaThumbRequest", v6_2.toString());
                v12 = 0;
            }
            if (v12 == null) {
                v8.deactivate();
                return;
            }
            do {
                long v13_0 = com.android.providers.media.MediaThumbRequest.sRandom.nextLong();
            } while(v13_0 == 0);
            v8.saveMiniThumbToFile(v12, this.mOrigId, v13_0);
            long v2_1 = new android.content.ContentValues();
            v2_1.put("mini_thumb_magic", Long.valueOf(v13_0));
            try {
                this.mCr.update(this.mUri, v2_1, 0, 0);
                this.mMagic = v13_0;
            } catch (IllegalStateException v0_13) {
                String v4_5 = new StringBuilder();
                v4_5.append("got exception while updating database ");
                v4_5.append(v0_13);
                android.util.Log.e("MediaThumbRequest", v4_5.toString());
            }
        }
        v8.deactivate();
        return;
    }

Method com.android.providers.media.MediaScannerService.openDatabase() calling method android.util.Log.w()


    private void openDatabase(String p4)
    {
        try {
            IllegalArgumentException v0_1 = new android.content.ContentValues();
            v0_1.put("name", p4);
            this.getContentResolver().insert(android.net.Uri.parse("content://media/"), v0_1);
        } catch (IllegalArgumentException v0) {
            android.util.Log.w("MediaScannerService", "failed to open media database");
        }
        return;
    }

Method com.android.providers.media.MediaProvider.update() calling method android.util.Log.w()


    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 v8_5;
            String v7_8;
            String v22_1;
            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;
                        }
                    }
                }
            }
            int v11_0;
            Throwable v0_64;
            int v13_1;
            String v42;
            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 v25;
                    long v34;
                    int v36;
                    int v35;
                    int v31;
                    android.content.ContentValues v38;
                    int v13_2;
                    int v32;
                    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 v39;
                    String v41;
                    String v40;
                    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 {
                        String v16_5;
                        void v9_3;
                        android.content.ContentValues v5_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)));
                    }
                    void v9_5;
                    String v2_26;
                    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.update() calling method android.util.Log.w()


    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");
            }
            String v22_1;
            String v8_5;
            String v7_8;
            int v23;
            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 {
                            String v6_14;
                            android.content.ContentValues v5_19;
                            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;
                        }
                    }
                }
            }
            Throwable v0_64;
            String v42;
            int v11_0;
            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:
                    int v36;
                    int v25;
                    int v31;
                    String v37;
                    int v13_2;
                    int v32;
                    android.content.ContentValues v38;
                    long v34;
                    int v35;
                    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 v41;
                    String v39;
                    int v14_1;
                    String v40;
                    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)));
                    }
                    void v9_5;
                    String v2_26;
                    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.query() calling method android.util.Log.w()


    public android.database.Cursor query(android.net.Uri p28, String[] p29, String p30, String[] p31, String p32)
    {
        String v12_1 = p30;
        android.net.Uri v14 = this.safeUncanonicalize(p28);
        String v15_1 = com.android.providers.media.MediaProvider.URI_MATCHER.match(v14);
        int v9_1 = new java.util.ArrayList();
        if (v15_1 != 500) {
            if (v15_1 != 600) {
                if (v15_1 != 601) {
                    String v16 = 0;
                    String v8_1 = this.getDatabaseForUri(v14);
                    if (v8_1 != null) {
                        v8_1.mNumQueries = (v8_1.mNumQueries + 1);
                        int v7_1 = v8_1.getReadableDatabase();
                        if (v7_1 != 0) {
                            String[] v6_1;
                            boolean v5_4 = new android.database.sqlite.SQLiteQueryBuilder();
                            String v17 = v14.getQueryParameter("limit");
                            int v2_28 = v14.getQueryParameter("filter");
                            int v3_14 = 0;
                            if (v2_28 == 0) {
                                v6_1 = 0;
                            } else {
                                int v2_29 = android.net.Uri.decode(v2_28).trim();
                                if (!android.text.TextUtils.isEmpty(v2_29)) {
                                    boolean v4_12 = v2_29.split(" ");
                                    v3_14 = new String[v4_12.length];
                                    int v0_64 = 0;
                                    while (v0_64 < v4_12.length) {
                                        String v21 = v2_29;
                                        v3_14[v0_64] = android.provider.MediaStore$Audio.keyFor(v4_12[v0_64]).replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_");
                                        v0_64++;
                                        v2_29 = v21;
                                        String[] v6 = 0;
                                    }
                                }
                                v6_1 = v3_14;
                            }
                            if (v14.getQueryParameter("distinct") != null) {
                                v5_4.setDistinct(1);
                            }
                            int v9_0;
                            String v15_0;
                            int v24;
                            int v22 = 0;
                            if (v15_1 == 120) {
                                v24 = v7_1;
                                v15_0 = v9_1;
                                v9_0 = v5_4;
                                v9_0.setTables("album_art");
                                v9_0.appendWhere("album_id=?");
                                v15_0.add(((String) v14.getPathSegments().get(3)));
                            } else {
                                switch (v15_1) {
                                    case 1:
                                        v24 = v7_1;
                                        v15_0 = v9_1;
                                        v9_0 = v5_4;
                                        v9_0.setTables("images");
                                        if (v14.getQueryParameter("distinct") != null) {
                                            v9_0.setDistinct(1);
                                        }
                                        break;
                                    case 2:
                                        v24 = v7_1;
                                        v15_0 = v9_1;
                                        v9_0 = v5_4;
                                        v9_0.setTables("images");
                                        if (v14.getQueryParameter("distinct") != null) {
                                            v9_0.setDistinct(1);
                                        }
                                        v9_0.appendWhere("_id=?");
                                        v15_0.add(((String) v14.getPathSegments().get(3)));
                                        break;
                                    case 3:
                                        v24 = v7_1;
                                        v15_0 = v9_1;
                                        v9_0 = v5_4;
                                        break;
                                    case 4:
                                        v24 = v7_1;
                                        v15_0 = v9_1;
                                        v9_0 = v5_4;
                                        v22 = 1;
                                        break;
                                    default:
                                        switch (v15_1) {
                                            case 100:
                                                int v0_100;
                                                v24 = v7_1;
                                                String v8_0 = v6_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                if ((p29 == null) || ((p29.length != 1) || ((p31 != null) || ((p30 != null) && ((!p30.equalsIgnoreCase("is_music=1")) && (!p30.equalsIgnoreCase("is_podcast=1"))))))) {
                                                    v0_100 = 0;
                                                } else {
                                                    v0_100 = 0;
                                                    if ((p29[0].equalsIgnoreCase("count(*)")) && (v8_0 != null)) {
                                                        v9_0.setTables("audio_meta");
                                                        int v0_127 = v9_0.query(v24, p29, v12_1, this.combine(v15_0, p31), v16, 0, p32, v17);
                                                        if (v0_127 != 0) {
                                                            String v1_63 = v14.getQueryParameter("nonotify");
                                                            if ((v1_63 == null) || (!v1_63.equals("1"))) {
                                                                v0_127.setNotificationUri(this.getContext().getContentResolver(), v14);
                                                            }
                                                        }
                                                        return v0_127;
                                                    }
                                                }
                                                v9_0.setTables("audio");
                                                while ((v8_0 != null) && (v0_100 < v8_0.length)) {
                                                    if (v0_100 > 0) {
                                                        v9_0.appendWhere(" AND ");
                                                    }
                                                    v9_0.appendWhere("artist_key||album_key||title_key LIKE ? ESCAPE \'\\\'");
                                                    String v1_52 = new StringBuilder();
                                                    v1_52.append("%");
                                                    v1_52.append(v8_0[v0_100]);
                                                    v1_52.append("%");
                                                    v15_0.add(v1_52.toString());
                                                    v0_100++;
                                                }
                                            case 101:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 102:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_genres");
                                                v9_0.appendWhere("_id IN (SELECT genre_id FROM audio_genres_map WHERE audio_id=?)");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 103:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_genres");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(5)));
                                                break;
                                            case 104:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_playlists");
                                                v9_0.appendWhere("_id IN (SELECT playlist_id FROM audio_playlists_map WHERE audio_id=?)");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 105:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_playlists");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(5)));
                                                break;
                                            case 106:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_genres");
                                                break;
                                            case 107:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_genres");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 108:
                                            case 109:
                                                int v20_1;
                                                v24 = v7_1;
                                                int v7_0 = v15_1;
                                                v8_0 = v6_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                if ((v8_0 != null) || ((p29 == null) || ((p30 != null) && (!p30.equalsIgnoreCase("genre_id=?"))))) {
                                                    v20_1 = 0;
                                                } else {
                                                    v20_1 = 1;
                                                }
                                                int v0_61 = v20_1;
                                                if (p29 != null) {
                                                    int v2_30 = v0_61;
                                                    int v0_62 = 0;
                                                    while (v0_62 < p29.length) {
                                                        int v3_26 = p29[v0_62];
                                                        if (v3_26.equals("_id")) {
                                                            v2_30 = 0;
                                                        }
                                                        if ((v2_30 != 0) && ((!v3_26.equals("audio_id")) && (!v3_26.equals("genre_id")))) {
                                                            v2_30 = 0;
                                                        }
                                                        v0_62++;
                                                    }
                                                    v0_61 = v2_30;
                                                }
                                                if (v0_61 == 0) {
                                                    v9_0.setTables("audio_genres_map_noid, audio");
                                                    v9_0.appendWhere("audio._id = audio_id");
                                                    if (v7_0 == 108) {
                                                        v9_0.appendWhere(" AND genre_id=?");
                                                        v15_0.add(((String) v14.getPathSegments().get(3)));
                                                    }
                                                    int v18_4 = 0;
                                                    while(true) {
                                                        String v1_34 = v18_4;
                                                        if ((v8_0 == null) || (v1_34 >= v8_0.length)) {
                                                            break;
                                                        }
                                                        v9_0.appendWhere(" AND ");
                                                        v9_0.appendWhere("artist_key||album_key||title_key LIKE ? ESCAPE \'\\\'");
                                                        int v2_38 = new StringBuilder();
                                                        v2_38.append("%");
                                                        v2_38.append(v8_0[v1_34]);
                                                        v2_38.append("%");
                                                        v15_0.add(v2_38.toString());
                                                        v18_4 = (v1_34 + 1);
                                                    }
                                                } else {
                                                    v9_0.setTables("audio_genres_map_noid");
                                                    if (v7_0 == 108) {
                                                        v9_0.appendWhere("genre_id=?");
                                                        v15_0.add(((String) v14.getPathSegments().get(3)));
                                                    }
                                                }
                                                break;
                                            case 110:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_playlists");
                                                break;
                                            case 111:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("audio_playlists");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 112:
                                            case 113:
                                                int v20_0;
                                                v24 = v7_1;
                                                int v26_2 = v15_1;
                                                v8_0 = v6_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                if ((v8_0 != null) || ((p29 == null) || ((p30 != null) && (!p30.equalsIgnoreCase("playlist_id=?"))))) {
                                                    v20_0 = 0;
                                                } else {
                                                    v20_0 = 1;
                                                }
                                                int v2_25 = v20_0;
                                                if (p29 != null) {
                                                    int v3_5 = v2_25;
                                                    int v2_27 = 0;
                                                    while (v2_27 < p29.length) {
                                                        boolean v4_8 = p29[v2_27];
                                                        if ((v3_5 != 0) && ((!v4_8.equals("audio_id")) && ((!v4_8.equals("playlist_id")) && (!v4_8.equals("play_order"))))) {
                                                            v3_5 = 0;
                                                        }
                                                        if (v4_8.equals("_id")) {
                                                            p29[v2_27] = "audio_playlists_map._id AS _id";
                                                        }
                                                        v2_27++;
                                                    }
                                                    v2_25 = v3_5;
                                                }
                                                if (v2_25 == 0) {
                                                    v9_0.setTables("audio_playlists_map, audio");
                                                    v9_0.appendWhere("audio._id = audio_id AND playlist_id=?");
                                                    v15_0.add(((String) v14.getPathSegments().get(3)));
                                                    int v18_3 = 0;
                                                    while(true) {
                                                        String v1_26 = v18_3;
                                                        if ((v8_0 == null) || (v1_26 >= v8_0.length)) {
                                                            break;
                                                        }
                                                        v9_0.appendWhere(" AND ");
                                                        v9_0.appendWhere("artist_key||album_key||title_key LIKE ? ESCAPE \'\\\'");
                                                        int v3_13 = new StringBuilder();
                                                        v3_13.append("%");
                                                        v3_13.append(v8_0[v1_26]);
                                                        v3_13.append("%");
                                                        v15_0.add(v3_13.toString());
                                                        v18_3 = (v1_26 + 1);
                                                    }
                                                } else {
                                                    v9_0.setTables("audio_playlists_map");
                                                    v9_0.appendWhere("playlist_id=?");
                                                    v15_0.add(((String) v14.getPathSegments().get(3)));
                                                }
                                                if (v26_2 == 113) {
                                                    v9_0.appendWhere(" AND audio_playlists_map._id=?");
                                                    v15_0.add(((String) v14.getPathSegments().get(5)));
                                                }
                                                break;
                                            case 114:
                                                v24 = v7_1;
                                                v8_0 = v6_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                if (((p29 == null) || ((p29.length != 1) || ((p31 != null) || ((p30 != null) && (p30.length() != 0))))) || ((!p29[0].equalsIgnoreCase("count(*)")) || (v8_0 == null))) {
                                                    v9_0.setTables("artist_info");
                                                    int v18_2 = 0;
                                                    while(true) {
                                                        int v0_47 = v18_2;
                                                        if ((v8_0 == null) || (v0_47 >= v8_0.length)) {
                                                            break;
                                                        }
                                                        if (v0_47 > 0) {
                                                            v9_0.appendWhere(" AND ");
                                                        }
                                                        v9_0.appendWhere("artist_key LIKE ? ESCAPE \'\\\'");
                                                        String v1_21 = new StringBuilder();
                                                        v1_21.append("%");
                                                        v1_21.append(v8_0[v0_47]);
                                                        v1_21.append("%");
                                                        v15_0.add(v1_21.toString());
                                                        v18_2 = (v0_47 + 1);
                                                    }
                                                } else {
                                                    v9_0.setTables("audio_meta");
                                                    p29[0] = "count(distinct artist_id)";
                                                    v9_0.appendWhere("is_music=1");
                                                }
                                                break;
                                            case 115:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("artist_info");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 116:
                                                String v12_2 = v6_1;
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                if ((p29 == null) || ((p29.length != 1) || (p31 != null))) {
                                                    v8_0 = v12_2;
                                                    v12_1 = p30;
                                                } else {
                                                    v8_0 = v12_2;
                                                    v12_1 = p30;
                                                    if (((p30 == null) || (p30.length() == 0)) && ((p29[0].equalsIgnoreCase("count(*)")) && (v8_0 != null))) {
                                                        v9_0.setTables("audio_meta");
                                                        p29[0] = "count(distinct album_id)";
                                                        v9_0.appendWhere("is_music=1");
                                                    }
                                                }
                                                v9_0.setTables("album_info");
                                                int v18_1 = 0;
                                                while(true) {
                                                    int v0_32 = v18_1;
                                                    if ((v8_0 == null) || (v0_32 >= v8_0.length)) {
                                                        break;
                                                    }
                                                    if (v0_32 > 0) {
                                                        v9_0.appendWhere(" AND ");
                                                    }
                                                    v9_0.appendWhere("artist_key||album_key LIKE ? ESCAPE \'\\\'");
                                                    String v1_12 = new StringBuilder();
                                                    v1_12.append("%");
                                                    v1_12.append(v8_0[v0_32]);
                                                    v1_12.append("%");
                                                    v15_0.add(v1_12.toString());
                                                    v18_1 = (v0_32 + 1);
                                                }
                                                break;
                                            case 117:
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                v9_0.setTables("album_info");
                                                v9_0.appendWhere("_id=?");
                                                v15_0.add(((String) v14.getPathSegments().get(3)));
                                                break;
                                            case 118:
                                                String v12_0 = v6_1;
                                                v24 = v7_1;
                                                v15_0 = v9_1;
                                                v9_0 = v5_4;
                                                int v0_20 = ((String) v14.getPathSegments().get(3));
                                                v9_0.setTables("audio LEFT OUTER JOIN album_art ON audio.album_id=album_art.album_id");
                                                v9_0.appendWhere("is_music=1 AND audio.album_id IN (SELECT album_id FROM artists_albums_map WHERE artist_id=?)");
                                                v15_0.add(v0_20);
                                                int v18_0 = 0;
                                                while(true) {
                                                    String v1_4 = v18_0;
                                                    if ((v12_0 == null) || (v1_4 >= v12_0.length)) {
                                                        break;
                                                    }
                                                    v9_0.appendWhere(" AND ");
                                                    v9_0.appendWhere("artist_key||album_key LIKE ? ESCAPE \'\\\'");
                                                    int v2_10 = new StringBuilder();
                                                    v2_10.append("%");
                                                    v2_10.append(v12_0[v1_4]);
                                                    v2_10.append("%");
                                                    v15_0.add(v2_10.toString());
                                                    v18_0 = (v1_4 + 1);
                                                }
                                                boolean v4_2 = new StringBuilder();
                                                v4_2.append("count(CASE WHEN artist_id==");
                                                v4_2.append(v0_20);
                                                v4_2.append(" THEN \'foo\' ELSE NULL END) AS ");
                                                v4_2.append("numsongs_by_artist");
                                                com.android.providers.media.MediaProvider.sArtistAlbumsMap.put("numsongs_by_artist", v4_2.toString());
                                                v9_0.setProjectionMap(com.android.providers.media.MediaProvider.sArtistAlbumsMap);
                                                v16 = "audio.album_id";
                                                break;
                                            default:
                                                int v23_0;
                                                switch (v15_1) {
                                                    case 200:
                                                        v24 = v7_1;
                                                        v15_0 = v9_1;
                                                        v9_0 = v5_4;
                                                        v9_0.setTables("video");
                                                        v12_1 = p30;
                                                        break;
                                                    case 201:
                                                        v24 = v7_1;
                                                        v15_0 = v9_1;
                                                        v9_0 = v5_4;
                                                        v9_0.setTables("video");
                                                        v9_0.appendWhere("_id=?");
                                                        v15_0.add(((String) v14.getPathSegments().get(3)));
                                                        break;
                                                    case 202:
                                                        v23_0 = v5_4;
                                                        v24 = v7_1;
                                                        v15_0 = v9_1;
                                                        break;
                                                    case 203:
                                                        v23_0 = v5_4;
                                                        v24 = v7_1;
                                                        v15_0 = v9_1;
                                                        v22 = 1;
                                                        break;
                                                    default:
                                                        switch (v15_1) {
                                                            case 400:
                                                                android.util.Log.w(com.android.providers.media.MediaProvider.TAG, "Legacy media search Uri used. Please update your code.");
                                                            case 401:
                                                            case 402:
                                                                break;
                                                            case 401:
                                                            case 402:
                                                                break;
                                                            default:
                                                                switch (v15_1) {
                                                                    case 700:
                                                                    case 702:
                                                                        break;
                                                                    case 701:
                                                                    case 703:
                                                                        v5_4.appendWhere("_id=?");
                                                                        v9_1.add(((String) v14.getPathSegments().get(2)));
                                                                    case 700:
                                                                    case 702:
                                                                        break;
                                                                    case 704:
                                                                        return this.getObjectReferences(v8_1, v7_1, Integer.parseInt(((String) v14.getPathSegments().get(2))));
                                                                    default:
                                                                        String v1_65 = new StringBuilder();
                                                                        v1_65.append("Unknown URL: ");
                                                                        v1_65.append(v14.toString());
                                                                        throw new IllegalStateException(v1_65.toString());
                                                                }
                                                                v5_4.setTables("files");
                                                                v24 = v7_1;
                                                                v15_0 = v9_1;
                                                                v9_0 = v5_4;
                                                        }
                                                        String v15 = v9_1;
                                                        return this.doAudioSearch(v7_1, v5_4, v14, p29, p30, this.combine(v9_1, p31), p32, v15_1, v17);
                                                }
                                                if (this.queryThumbnail(v23_0, v14, "videothumbnails", "video_id", v22)) {
                                                    v9_0 = v23_0;
                                                } else {
                                                    return 0;
                                                }
                                        }
                                }
                                if (!this.queryThumbnail(v9_0, v14, "thumbnails", "image_id", v22)) {
                                    return 0;
                                }
                            }
                        } else {
                            return 0;
                        }
                    } else {
                        return 0;
                    }
                } else {
                    int v2_59 = new android.database.MatrixCursor(new String[] {"version"}));
                    String v1_71 = new Integer[1];
                    v1_71[0] = Integer.valueOf(com.android.providers.media.MediaProvider.getDatabaseVersion(this.getContext()));
                    v2_59.addRow(v1_71);
                    return v2_59;
                }
            } else {
                int v2_61 = new android.database.MatrixCursor(new String[] {"fsid"}));
                String v1_72 = new Integer[1];
                v1_72[0] = Integer.valueOf(this.mVolumeId);
                v2_61.addRow(v1_72);
                return v2_61;
            }
        } else {
            if (this.mMediaScannerVolume != null) {
                int v2_64 = new android.database.MatrixCursor(new String[] {"volume"}));
                String v1_73 = new String[1];
                v1_73[0] = this.mMediaScannerVolume;
                v2_64.addRow(v1_73);
                return v2_64;
            } else {
                return 0;
            }
        }
    }

Method com.android.providers.media.MediaProvider.delete() calling method android.util.Log.w()


    public int delete(android.net.Uri p40, String p41, String[] p42)
    {
        void v1 = this;
        android.net.Uri v11 = this.safeUncanonicalize(p40);
        android.database.sqlite.SQLiteDatabase v12_2 = com.android.providers.media.MediaProvider.URI_MATCHER.match(v11);
        android.database.sqlite.SQLiteDatabase v13_3 = 0;
        String v14_9 = 1;
        if (v12_2 != 500) {
            Throwable v0_10;
            if (v12_2 != 301) {
                if (v12_2 != 705) {
                    String v15 = com.android.providers.media.MediaProvider.getVolumeName(v11);
                    boolean v16 = "external".equals(v15);
                    android.database.sqlite.SQLiteDatabase v9_2 = this.getDatabaseForUri(v11);
                    if (v9_2 == null) {
                        int v38 = v12_2;
                        android.net.Uri v2_16 = new StringBuilder();
                        v2_16.append("Unknown URI: ");
                        v2_16.append(v11);
                        v2_16.append(" match: ");
                        v2_16.append(v38);
                        throw new UnsupportedOperationException(v2_16.toString());
                    } else {
                        String v14_0;
                        android.database.sqlite.SQLiteDatabase v9_0;
                        android.database.sqlite.SQLiteDatabase v13_0;
                        v9_2.mNumDeletes = (v9_2.mNumDeletes + 1);
                        String v8_14 = v9_2.getWritableDatabase();
                        android.media.MiniThumbFile v6_2 = this.getTableAndWhere(v11, v12_2, p41);
                        if (!v6_2.table.equals("files")) {
                            v14_0 = v6_2;
                            v13_0 = v9_2;
                            v9_0 = v8_14;
                        } else {
                            String v5_12 = v11.getQueryParameter("deletedata");
                            if ((v5_12 != null) && (v5_12.equals("false"))) {
                                v14_0 = v6_2;
                                v13_0 = v9_2;
                                v9_0 = v8_14;
                            } else {
                                v9_2.mNumQueries = (v9_2.mNumQueries + 1);
                                String v26 = v6_2;
                                android.database.sqlite.SQLiteDatabase v27 = v8_14;
                                android.database.sqlite.SQLiteDatabase v28 = v9_2;
                                android.net.Uri v2_35 = v8_14.query(v6_2.table, com.android.providers.media.MediaProvider.sMediaTypeDataId, v6_2.where, p42, 0, 0, 0);
                                String v3_26 = new String[] {""});
                                long v4_3 = new String[] {"", ""});
                                android.media.MiniThumbFile v6_1 = 0;
                                String v5_8 = 0;
                                try {
                                    while (v2_35.moveToNext()) {
                                        try {
                                            android.database.sqlite.SQLiteDatabase v13_1;
                                            android.database.sqlite.SQLiteDatabase v9_4;
                                            int v7_2 = v2_35.getInt(v13_3);
                                            String v8_3 = v2_35.getString(v14_9);
                                            long v29 = v2_35.getLong(2);
                                        } catch (Throwable v0_0) {
                                            android.database.sqlite.SQLiteDatabase v13 = v28;
                                            String v8_0 = v5_8;
                                            libcore.io.IoUtils.closeQuietly(v2_35);
                                            if (v6_1 != null) {
                                                v6_1.deactivate();
                                            }
                                            if (v8_0 != null) {
                                                v8_0.deactivate();
                                            }
                                            throw v0_0;
                                        }
                                        if (v7_2 != v14_9) {
                                            long v31_0 = v4_3;
                                            String v32_2 = v5_8;
                                            v9_4 = v27;
                                            v13_1 = v28;
                                            long v4_2 = v29;
                                            if (v7_2 != 3) {
                                                if (v7_2 != 2) {
                                                    v4_3 = v31_0;
                                                    v5_8 = v32_2;
                                                    v27 = v9_4;
                                                    v28 = v13_1;
                                                    v13_3 = 0;
                                                    v14_9 = 1;
                                                } else {
                                                    try {
                                                        if (v13_1.mInternal) {
                                                            v4_3 = v31_0;
                                                        } else {
                                                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreDelete(this.getContext(), v15, 2, v4_2);
                                                            v3_26[0] = String.valueOf(v4_2);
                                                            v13_1.mNumDeletes = (v13_1.mNumDeletes + 2);
                                                            v9_4.delete("audio_genres_map", "audio_id=?", v3_26);
                                                            Throwable v0_27 = v9_4.query("audio_playlists_map", com.android.providers.media.MediaProvider.sPlaylistIdPlayOrder, "audio_id=?", v3_26, 0, 0, 0);
                                                            while(true) {
                                                                String v8_10 = v0_27;
                                                                if (!v8_10.moveToNext()) {
                                                                    break;
                                                                }
                                                                Throwable v0_32 = new StringBuilder();
                                                                v0_32.append("");
                                                                long v36 = v4_2;
                                                                v0_32.append(v8_10.getLong(0));
                                                                v31_0[0] = v0_32.toString();
                                                                Throwable v0_35 = new StringBuilder();
                                                                v0_35.append("");
                                                                v0_35.append(v8_10.getInt(1));
                                                                v31_0[1] = v0_35.toString();
                                                                v13_1.mNumUpdates = (v13_1.mNumUpdates + 1);
                                                                long v4_7 = v31_0;
                                                                v9_4.execSQL("UPDATE audio_playlists_map SET play_order=play_order-1 WHERE playlist_id=? AND play_order>?", v4_7);
                                                                v31_0 = v4_7;
                                                                v0_27 = v8_10;
                                                                v4_2 = v36;
                                                            }
                                                            v4_3 = v31_0;
                                                            v9_4.delete("audio_playlists_map", "audio_id=?", v3_26);
                                                            libcore.io.IoUtils.closeQuietly(v8_10);
                                                        }
                                                    } catch (Throwable v0_0) {
                                                        String v14 = v26;
                                                        v8_0 = v32_2;
                                                    }
                                                }
                                            } else {
                                                try {
                                                    v1 = v1.deleteIfAllowed(v11, v8_3);
                                                    com.android.providers.media.MediaDocumentsProvider.onMediaStoreDelete(this.getContext(), v15, 3, v4_2);
                                                    v3_26[0] = String.valueOf(v4_2);
                                                    v13_1.mNumQueries = (v13_1.mNumQueries + 1);
                                                    Throwable v0_44 = v9_4.query("videothumbnails", com.android.providers.media.MediaProvider.sDataOnlyColumn, "video_id=?", v3_26, 0, 0, 0);
                                                } catch (Throwable v0_0) {
                                                    long v4 = v31_0;
                                                }
                                                while(true) {
                                                    String v14_7 = v0_44;
                                                    if (!v14_7.moveToNext()) {
                                                        break;
                                                    }
                                                    String v35 = v8_3;
                                                    v1 = v1.deleteIfAllowed(v11, v14_7.getString(0));
                                                    v0_44 = v14_7;
                                                    v8_3 = v35;
                                                }
                                                v13_1.mNumDeletes = (v13_1.mNumDeletes + 1);
                                                v9_4.delete("videothumbnails", "video_id=?", v3_26);
                                                libcore.io.IoUtils.closeQuietly(v14_7);
                                                if (v16) {
                                                    if (v32_2 != null) {
                                                        v8_0 = v32_2;
                                                    } else {
                                                        v8_0 = android.media.MiniThumbFile.instance(android.provider.MediaStore$Video$Media.EXTERNAL_CONTENT_URI);
                                                    }
                                                    try {
                                                        v8_0.eraseMiniThumb(v4_2);
                                                        v32_2 = v8_0;
                                                    } catch (Throwable v0_0) {
                                                        v4 = v31_0;
                                                    }
                                                }
                                                v4_3 = v31_0;
                                            }
                                            v8_0 = v32_2;
                                        } else {
                                            try {
                                                v1 = v1.deleteIfAllowed(v11, v8_3);
                                                long v31_1 = v4_3;
                                                String v32_3 = v5_8;
                                                long v4_8 = v29;
                                                try {
                                                    com.android.providers.media.MediaDocumentsProvider.onMediaStoreDelete(this.getContext(), v15, v14_9, v4_8);
                                                    v3_26[v13_3] = String.valueOf(v4_8);
                                                    v9_4 = v28;
                                                    try {
                                                        v9_4.mNumQueries = (v9_4.mNumQueries + v14_9);
                                                        Throwable v0_57 = v27.query("thumbnails", com.android.providers.media.MediaProvider.sDataOnlyColumn, "image_id=?", v3_26, 0, 0, 0);
                                                    } catch (Throwable v0_0) {
                                                        v14 = v26;
                                                        v8_0 = v32_3;
                                                    }
                                                    while(true) {
                                                        String v14_8 = v0_57;
                                                        if (!v14_8.moveToNext()) {
                                                            break;
                                                        }
                                                        try {
                                                            v1 = v1.deleteIfAllowed(v11, v14_8.getString(v13_3));
                                                            v0_57 = v14_8;
                                                            v14_8 = 1;
                                                        } catch (Throwable v0_62) {
                                                            libcore.io.IoUtils.closeQuietly(v14_8);
                                                            throw v0_62;
                                                        }
                                                    }
                                                    v9_4.mNumDeletes = (v9_4.mNumDeletes + 1);
                                                    android.database.sqlite.SQLiteDatabase v34_1 = v9_4;
                                                    v9_4 = v27;
                                                    v9_4.delete("thumbnails", "image_id=?", v3_26);
                                                    libcore.io.IoUtils.closeQuietly(v14_8);
                                                    if (v16) {
                                                        if (v6_1 == null) {
                                                            v6_1 = android.media.MiniThumbFile.instance(android.provider.MediaStore$Images$Media.EXTERNAL_CONTENT_URI);
                                                        }
                                                        v6_1.eraseMiniThumb(v4_8);
                                                    }
                                                    v4_3 = v31_1;
                                                    v5_8 = v32_3;
                                                    v13_1 = v34_1;
                                                } catch (Throwable v0_0) {
                                                    v14 = v26;
                                                    v4 = v31_1;
                                                    v8_0 = v32_3;
                                                }
                                            } catch (Throwable v0_0) {
                                                v14 = v26;
                                                v8_0 = v5_8;
                                            }
                                        }
                                    }
                                } catch (Throwable v0_0) {
                                    v8_0 = v5_8;
                                    android.database.sqlite.SQLiteDatabase v9 = v27;
                                }
                                String v32_0 = v5_8;
                                v9_0 = v27;
                                v13_0 = v28;
                                libcore.io.IoUtils.closeQuietly(v2_35);
                                if (v6_1 != null) {
                                    v6_1.deactivate();
                                }
                                if (v32_0 != null) {
                                    v32_0.deactivate();
                                }
                                v14_0 = v26;
                                if (android.text.TextUtils.isEmpty(v14_0.where)) {
                                    v14_0.where = "_id NOT IN (SELECT parent FROM files)";
                                    switch (v12_2) {
                                        case 3:
                                        case 4:
                                        case 202:
                                        case 203:
                                            android.database.sqlite.SQLiteDatabase v12_0 = v9_0;
                                            android.net.Uri v2_8 = v9_0.query(v14_0.table, com.android.providers.media.MediaProvider.sDataOnlyColumn, v14_0.where, p42, 0, 0, 0);
                                            if (v2_8 != null) {
                                                try {
                                                    while (v2_8.moveToNext()) {
                                                        v1 = v1.deleteIfAllowed(v11, v2_8.getString(0));
                                                    }
                                                } catch (Throwable v0_16) {
                                                    libcore.io.IoUtils.closeQuietly(v2_8);
                                                    throw v0_16;
                                                }
                                                libcore.io.IoUtils.closeQuietly(v2_8);
                                            }
                                            v13_0.mNumDeletes = (v13_0.mNumDeletes + 1);
                                            v0_10 = v12_0.delete(v14_0.table, v14_0.where, p42);
                                            break;
                                        case 108:
                                            v13_0.mNumDeletes = (v13_0.mNumDeletes + 1);
                                            v0_10 = v9_0.delete("audio_genres_map", v14_0.where, p42);
                                            android.database.sqlite.SQLiteDatabase v12 = v9_0;
                                            break;
                                        case 702:
                                        case 703:
                                            v13_0.mNumDeletes = (v13_0.mNumDeletes + 1);
                                            v0_10 = v9_0.delete("files", v14_0.where, p42);
                                            break;
                                        default:
                                            android.database.sqlite.SQLiteDatabase v12_1 = v9_0;
                                            v13_0.mNumDeletes = (v13_0.mNumDeletes + 1);
                                            v0_10 = v12_1.delete(v14_0.table, v14_0.where, p42);
                                    }
                                    android.net.Uri v2_12 = new StringBuilder();
                                    v2_12.append("content://media/");
                                    v2_12.append(v15);
                                    this.getContext().getContentResolver().notifyChange(android.net.Uri.parse(v2_12.toString()), 0);
                                    return v0_10;
                                } else {
                                    Throwable v0_5 = new StringBuilder();
                                    v0_5.append("(");
                                    v0_5.append(v14_0.where);
                                    v0_5.append(") AND (_id NOT IN (SELECT parent FROM files WHERE NOT (");
                                    v0_5.append(v14_0.where);
                                    v0_5.append(")))");
                                    v14_0.where = v0_5.toString();
                                }
                            }
                        }
                    }
                } else {
                    try {
                        if (this.mMtpService == null) {
                        } else {
                            this.getContext().unbindService(this.mMtpServiceConnection);
                            v13_3 = 1;
                            this.mMtpService = 0;
                        }
                    } catch (Throwable v0_66) {
                        throw v0_66;
                    }
                    v0_10 = v13_3;
                }
            } else {
                this.detachVolume(v11);
                v0_10 = 1;
            }
            return v0_10;
        } else {
            if (this.mMediaScannerVolume != null) {
                android.net.Uri v2_24 = new StringBuilder();
                v2_24.append("content://media/");
                v2_24.append(this.mMediaScannerVolume);
                v2_24.append("/audio");
                android.net.Uri v2_27 = this.getDatabaseForUri(android.net.Uri.parse(v2_24.toString()));
                if (v2_27 != null) {
                    v2_27.mScanStopTime = android.os.SystemClock.currentTimeMicro();
                    com.android.providers.media.MediaProvider.logToDb(v2_27.getWritableDatabase(), this.dump(v2_27, 0));
                } else {
                    long v4_12 = new StringBuilder();
                    v4_12.append("no database for scanned volume ");
                    v4_12.append(this.mMediaScannerVolume);
                    android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v4_12.toString());
                }
                if ("internal".equals(this.mMediaScannerVolume)) {
                    long v4_16 = this.getContext().getSharedPreferences("MediaScanBuild", 0).edit();
                    v4_16.putString("lastScanFingerprint", android.os.Build.FINGERPRINT);
                    v4_16.apply();
                }
                this.mMediaScannerVolume = 0;
                this.pruneThumbnails();
                return 1;
            } else {
                return 0;
            }
        }
    }

Method com.android.providers.media.MediaProvider.waitForThumbnailReady() calling method android.util.Log.w()


    private boolean waitForThumbnailReady(android.net.Uri p12)
    {
        android.database.Cursor v0_1 = this.query(p12, new String[] {"_id", "_data", "mini_thumb_magic"}), 0, 0, 0);
        int v2_0 = 0;
        try {
            if ((v0_1 != null) && (v0_1.moveToFirst())) {
                v0_1.getLong(0);
                com.android.providers.media.MediaThumbRequest v1_4 = this.requestMediaThumbnail(v0_1.getString(1), p12, 5, v0_1.getLong(2));
                if (v1_4 != null) {
                    try {
                        while (v1_4.mState == com.android.providers.media.MediaThumbRequest$State.WAIT) {
                            v1_4.wait();
                        }
                    } catch (com.android.providers.media.MediaThumbRequest$State v5_2) {
                        android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v5_2);
                    }
                    if (v1_4.mState == com.android.providers.media.MediaThumbRequest$State.DONE) {
                        v2_0 = 1;
                    }
                }
            }
        } catch (com.android.providers.media.MediaThumbRequest v1_5) {
            libcore.io.IoUtils.closeQuietly(v0_1);
            throw v1_5;
        }
        libcore.io.IoUtils.closeQuietly(v0_1);
        return v2_0;
    }

Method com.android.providers.media.MediaProvider.requestMediaThumbnail() calling method android.util.Log.w()


    private com.android.providers.media.MediaThumbRequest requestMediaThumbnail(String p11, android.net.Uri p12, int p13, long p14)
    {
        Throwable v1 = 0;
        try {
            com.android.providers.media.MediaThumbRequest v9 = new com.android.providers.media.MediaThumbRequest;
            v9(this.getContext().getContentResolver(), p11, p12, p13, p14);
            Throwable v1_0 = v9;
            this.mMediaThumbQueue.add(v1_0);
            this.mThumbHandler.obtainMessage(2).sendToTarget();
        } catch (Throwable v1_1) {
            throw v1_1;
        } catch (Throwable v2_3) {
            android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v2_3);
        }
        return v1_0;
    }

Method com.android.providers.media.MediaProvider.queryThumbnail() calling method android.util.Log.w()


    private boolean queryThumbnail(android.database.sqlite.SQLiteQueryBuilder p27, android.net.Uri p28, String p29, String p30, boolean p31)
    {
        boolean v15_0 = this;
        p27.setTables(p29);
        if (!p31) {
            String v12 = p28.getQueryParameter("orig_id");
            if (v12 != null) {
                boolean v16 = "1".equals(p28.getQueryParameter("blocking"));
                boolean v17 = "1".equals(p28.getQueryParameter("cancel"));
                int v10_1 = p28.buildUpon().encodedPath(p28.getPath().replaceFirst("thumbnails", "media")).appendPath(v12).build();
                if ((!v16) || (this.waitForThumbnailReady(v10_1))) {
                    String v4_0;
                    if (!v17) {
                        v4_0 = v12;
                    } else {
                        com.android.providers.media.MediaThumbRequest v9_1 = p28.getQueryParameter("group_id");
                        boolean v18 = "video".equals(p28.getPathSegments().get(1));
                        int v19 = android.os.Binder.getCallingPid();
                        try {
                            String v4_3 = Long.parseLong(v12);
                            try {
                                long v6 = Long.parseLong(v9_1);
                                try {
                                    if (this.mCurrentThumbRequest == null) {
                                        com.android.providers.media.MediaThumbRequest v1_2 = this.mMediaThumbQueue.iterator();
                                        while (v1_2.hasNext()) {
                                            com.android.providers.media.MediaThumbRequest v2_8 = ((com.android.providers.media.MediaThumbRequest) v1_2.next());
                                            com.android.providers.media.MediaThumbRequest v23 = v9_1;
                                            int v24 = v10_1;
                                            String v3_2 = v12;
                                            com.android.providers.media.MediaThumbRequest v25 = v1_2;
                                            com.android.providers.media.MediaThumbRequest v1_3 = v15_0;
                                            if (v15_0.matchThumbRequest(v2_8, v19, v4_3, v6, v18)) {
                                                v2_8.mState = com.android.providers.media.MediaThumbRequest$State.CANCEL;
                                                v2_8.notifyAll();
                                                v1_3.mMediaThumbQueue.remove(v2_8);
                                            }
                                            String v11 = p29;
                                            v15_0 = v1_3;
                                            v12 = v3_2;
                                            v9_1 = v23;
                                            v10_1 = v24;
                                            v1_2 = v25;
                                        }
                                        v24 = v10_1;
                                        v4_0 = v12;
                                        if (v4_0 == null) {
                                            android.database.sqlite.SQLiteQueryBuilder v5 = p27;
                                        } else {
                                            com.android.providers.media.MediaThumbRequest v2_4 = new StringBuilder();
                                            v2_4.append(p30);
                                            v2_4.append(" = ");
                                            v2_4.append(v4_0);
                                            p27.appendWhere(v2_4.toString());
                                        }
                                        return 1;
                                    } else {
                                        try {
                                            try {
                                                if (!this.matchThumbRequest(this.mCurrentThumbRequest, v19, v4_3, v6, v18)) {
                                                } else {
                                                    this.mCurrentThumbRequest.mState = com.android.providers.media.MediaThumbRequest$State.CANCEL;
                                                    this.mCurrentThumbRequest.notifyAll();
                                                }
                                            } catch (Throwable v0_1) {
                                                v24 = v10_1;
                                                com.android.providers.media.MediaThumbRequest v1 = this;
                                            }
                                        } catch (Throwable v0_1) {
                                        }
                                    }
                                } catch (Throwable v0_1) {
                                }
                                throw v0_1;
                            } catch (Throwable v0) {
                                java.util.PriorityQueue v8_4 = 0;
                                v24 = v10_1;
                                com.android.providers.media.MediaThumbRequest v2 = v4_3;
                                return v8_4;
                            }
                        } catch (Throwable v0) {
                            v8_4 = 0;
                            v24 = v10_1;
                            v1 = this;
                            return v8_4;
                        }
                    }
                } else {
                    android.util.Log.w(com.android.providers.media.MediaProvider.TAG, "original media doesn\'t exist or it\'s canceled.");
                    return 0;
                }
            } else {
                return 1;
            }
        } else {
            com.android.providers.media.MediaThumbRequest v1_6 = new StringBuilder();
            v1_6.append("_id = ");
            v1_6.append(((String) p28.getPathSegments().get(3)));
            p27.appendWhere(v1_6.toString());
            return 1;
        }
    }

Method com.android.providers.media.MediaProvider.insertInternal() calling method android.util.Log.w()


    private android.net.Uri insertInternal(android.net.Uri p26, int p27, android.content.ContentValues p28, java.util.ArrayList p29)
    {
        void v8 = this;
        String v12 = com.android.providers.media.MediaProvider.getVolumeName(p26);
        if (p27 != 500) {
            int v0_4 = 0;
            long v1_7 = 0;
            if (p28 != null) {
                v0_4 = p28.getAsString("genre");
                p28.remove("genre");
                v1_7 = p28.getAsString("_data");
            }
            String v13 = v0_4;
            String v14 = v1_7;
            java.util.ArrayList v7_2 = this.getDatabaseForUri(p26);
            if ((v7_2 == null) && ((p27 != 300) && (p27 != 705))) {
                long v1_22 = new StringBuilder();
                v1_22.append("Unknown URI: ");
                v1_22.append(p26);
                throw new UnsupportedOperationException(v1_22.toString());
            } else {
                if ((p27 != 300) && (p27 != 705)) {
                    int v0_44 = v7_2.getWritableDatabase();
                } else {
                    v0_44 = 0;
                }
                int v18_1;
                java.util.ArrayList v19;
                android.net.Uri v15_2;
                android.net.Uri v15_0;
                int v0_1;
                android.net.Uri v23;
                android.net.Uri v15_1;
                int v10_0;
                int v6_1 = v0_44;
                switch (p27) {
                    case 1:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        int v0_45 = this.insertFile(v15_0, p26, p28, 1, 1, p29);
                        if (v0_45 <= 0) {
                            v0_1 = v23;
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 1, v0_45);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Images$Media.getContentUri(v12), v0_45);
                        }
                        break;
                    case 3:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        int v0_43 = this.ensureFile(v15_0.mInternal, p28, ".jpg", "DCIM/.thumbnails");
                        v15_0.mNumInserts = (v15_0.mNumInserts + 1);
                        long v1_37 = v10_0.insert("thumbnails", "name", v0_43);
                        if (v1_37 <= 0) {
                        } else {
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Images$Thumbnails.getContentUri(v12), v1_37);
                        }
                        break;
                    case 100:
                        v10_0 = v6_1;
                        v23 = 0;
                        v15_0 = v7_2;
                        long v1_32 = this.insertFile(v7_2, p26, p28, 2, 1, p29);
                        if (v1_32 <= 0) {
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 2, v1_32);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Media.getContentUri(v12), v1_32);
                            if (v13 == null) {
                            } else {
                                v8 = this.updateGenre(v1_32, v13);
                            }
                        }
                        break;
                    case 102:
                        v10_0 = v6_1;
                        int v0_39 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(2))));
                        long v1_30 = new android.content.ContentValues(p28);
                        v1_30.put("audio_id", v0_39);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_42 = v10_0.insert("audio_genres_map", "genre_id", v1_30);
                        if (v2_42 <= 0) {
                            v23 = 0;
                            v15_0 = v7_2;
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_42);
                            v0_1 = v15_2;
                            v15_0 = v7_2;
                        }
                        break;
                    case 104:
                        v10_0 = v6_1;
                        int v0_35 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(2))));
                        long v1_26 = new android.content.ContentValues(p28);
                        v1_26.put("audio_id", v0_35);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_37 = v10_0.insert("audio_playlists_map", "playlist_id", v1_26);
                        if (v2_37 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_37);
                        }
                        break;
                    case 106:
                        v10_0 = v6_1;
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        int v0_31 = v10_0.insert("audio_genres", "audio_id", p28);
                        if (v0_31 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Genres.getContentUri(v12), v0_31);
                        }
                        break;
                    case 108:
                        int v22_1 = v6_1;
                        int v0_27 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(3))));
                        long v1_20 = new android.content.ContentValues(p28);
                        v1_20.put("genre_id", v0_27);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        v10_0 = v22_1;
                        String v2_29 = v10_0.insert("audio_genres_map", "genre_id", v1_20);
                        if (v2_29 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_29);
                        }
                        break;
                    case 110:
                        int v0_21 = new android.content.ContentValues(p28);
                        v0_21.put("date_added", Long.valueOf((System.currentTimeMillis() / 1000)));
                        int v22_0 = v6_1;
                        int v10_5 = v7_2;
                        long v1_18 = this.insertFile(v7_2, p26, v0_21, 4, 1, p29);
                        if (v1_18 <= 0) {
                            v23 = 0;
                            v15_0 = v10_5;
                            v10_0 = v22_0;
                        } else {
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Audio$Playlists.getContentUri(v12), v1_18);
                            v15_0 = v10_5;
                            v10_0 = v22_0;
                        }
                        break;
                    case 111:
                    case 112:
                        int v0_18 = Long.valueOf(Long.parseLong(((String) p26.getPathSegments().get(3))));
                        long v1_14 = new android.content.ContentValues(p28);
                        v1_14.put("playlist_id", v0_18);
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        String v2_20 = v6_1.insert("audio_playlists_map", "playlist_id", v1_14);
                        if (v2_20 <= 0) {
                            v10_0 = v6_1;
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(p26, v2_20);
                            v10_0 = v6_1;
                        }
                        break;
                    case 119:
                        int v20_1 = v6_1;
                        if (v7_2.mInternal) {
                            throw new UnsupportedOperationException("no internal album art allowed");
                        } else {
                            try {
                                int v0_13 = this.ensureFile(0, p28, "", "Android/data/com.android.providers.media/albumthumbs");
                            } catch (int v0) {
                                v0_13 = p28;
                            }
                            v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                            v6_1 = v20_1;
                            long v1_12 = v6_1.insert("album_art", "_data", v0_13);
                            if (v1_12 <= 0) {
                            } else {
                                v15_2 = android.content.ContentUris.withAppendedId(p26, v1_12);
                            }
                        }
                        break;
                    case 200:
                        int v20_0 = v6_1;
                        java.util.ArrayList v21 = v7_2;
                        int v0_8 = this.insertFile(v7_2, p26, p28, 3, 1, p29);
                        if (v0_8 <= 0) {
                            v23 = 0;
                            v10_0 = v20_0;
                            v15_0 = v21;
                        } else {
                            com.android.providers.media.MediaDocumentsProvider.onMediaStoreInsert(this.getContext(), v12, 3, v0_8);
                            v0_1 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Video$Media.getContentUri(v12), v0_8);
                            v10_0 = v20_0;
                            v15_0 = v21;
                        }
                        break;
                    case 202:
                        v19 = v7_2;
                        int v0_6 = this.ensureFile(v7_2.mInternal, p28, ".jpg", "DCIM/.thumbnails");
                        v7_2.mNumInserts = (v7_2.mNumInserts + 1);
                        long v1_5 = v6_1.insert("videothumbnails", "name", v0_6);
                        if (v1_5 <= 0) {
                        } else {
                            v15_2 = android.content.ContentUris.withAppendedId(android.provider.MediaStore$Video$Thumbnails.getContentUri(v12), v1_5);
                        }
                        break;
                    case 300:
                        v19 = v7_2;
                        int v0_3 = p28.getAsString("name");
                        long v1_0 = this.attachVolume(v0_3);
                        if ((this.mMediaScannerVolume != null) && (this.mMediaScannerVolume.equals(v0_3))) {
                            String v2_5 = this.getDatabaseForUri(v1_0);
                            if (v2_5 != null) {
                                v2_5.mScanStartTime = android.os.SystemClock.currentTimeMicro();
                            } else {
                                String v4_1 = new StringBuilder();
                                v4_1.append("no database for attached volume ");
                                v4_1.append(v1_0);
                                android.util.Log.e(com.android.providers.media.MediaProvider.TAG, v4_1.toString());
                            }
                        }
                        return v1_0;
                    case 700:
                        v18_1 = v6_1;
                        v19 = v7_2;
                        int v0_0 = this.insertFile(v19, p26, p28, 0, 1, p29);
                        if (v0_0 <= 0) {
                            v23 = 0;
                            v10_0 = v18_1;
                            v15_0 = v19;
                        } else {
                            v15_1 = android.provider.MediaStore$Files.getContentUri(v12, v0_0);
                            v0_1 = v15_1;
                            v10_0 = v18_1;
                            v15_0 = v19;
                        }
                        break;
                    case 702:
                        v18_1 = v6_1;
                        v19 = v7_2;
                        int v0_63 = this.insertFile(v7_2, p26, p28, 0, 0, p29);
                        if (v0_63 <= 0) {
                        } else {
                            v15_1 = android.provider.MediaStore$Files.getMtpObjectsUri(v12, v0_63);
                        }
                        break;
                    case 705:
                        if (this.mMtpService == null) {
                            int v0_60 = this.getContext();
                            v0_60.bindService(new android.content.Intent(v0_60, com.android.providers.media.MtpService), this.mMtpServiceConnection, 1);
                        }
                        this.fixParentIdIfNeeded();
                        break;
                    case 706:
                        int v0_57 = this.insertDirectory(v7_2, v7_2.getWritableDatabase(), p28.getAsString("_data"));
                        if (v0_57 <= 0) {
                        } else {
                            v15_2 = android.provider.MediaStore$Files.getContentUri(v12, v0_57);
                        }
                        break;
                    default:
                        v23 = 0;
                        long v1_43 = new StringBuilder();
                        v1_43.append("Invalid URI ");
                        v1_43.append(p26);
                        throw new UnsupportedOperationException(v1_43.toString());
                }
                if ((v14 != null) && (v14.toLowerCase(java.util.Locale.US).endsWith("/.nomedia"))) {
                    v8.processNewNoMediaPath(v15_0, v10_0, v14);
                }
                return v0_1;
            }
        } else {
            this.mMediaScannerVolume = p28.getAsString("volume");
            int v0_52 = new StringBuilder();
            v0_52.append("content://media/");
            v0_52.append(this.mMediaScannerVolume);
            v0_52.append("/audio");
            int v0_55 = this.getDatabaseForUri(android.net.Uri.parse(v0_52.toString()));
            if (v0_55 != 0) {
                v0_55.mScanStartTime = android.os.SystemClock.currentTimeMicro();
            } else {
                String v2_55 = new StringBuilder();
                v2_55.append("no database for scanned volume ");
                v2_55.append(this.mMediaScannerVolume);
                android.util.Log.w(com.android.providers.media.MediaProvider.TAG, v2_55.toString());
            }
            return android.provider.MediaStore.getMediaScannerUri();
        }
    }

Method com.android.providers.media.MediaProvider.getCompressedAlbumArt() calling method android.util.Log.w()


    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$5.run() calling method android.util.Log.w()


    public void run()
    {
        android.os.SystemClock.sleep(2000);
        if (!this.val$nomedia.exists()) {
            String v0_4 = com.android.providers.media.MediaProvider.access$400();
            String v1_3 = new StringBuilder();
            v1_3.append("does not exist: ");
            v1_3.append(this.val$path);
            android.util.Log.w(v0_4, v1_3.toString(), new Exception());
        } else {
            com.android.providers.media.MediaProvider.access$1200(this.this$0, this.val$helper, this.val$db, this.val$path);
        }
        return;
    }

Method com.android.providers.media.MediaProvider$4.handleMessage() calling method android.util.Log.w()


    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.queryOrientationForImage() calling method android.util.Log.w()


    private int queryOrientationForImage(long p10, android.os.CancellationSignal p12)
    {
        android.content.ContentResolver v0_1 = this.getContext().getContentResolver();
        try {
            String v1_8 = new StringBuilder();
            v1_8.append("_id=");
            v1_8.append(p10);
            android.database.Cursor v8 = v0_1.query(android.provider.MediaStore$Images$Media.EXTERNAL_CONTENT_URI, com.android.providers.media.MediaDocumentsProvider$ImageOrientationQuery.PROJECTION, v1_8.toString(), 0, 0, p12);
        } catch (String v1_4) {
            libcore.io.IoUtils.closeQuietly(v8);
            throw v1_4;
        }
        if (!v8.moveToFirst()) {
            String v3_1 = new StringBuilder();
            v3_1.append("Missing orientation data for ");
            v3_1.append(p10);
            android.util.Log.w("MediaDocumentsProvider", v3_1.toString());
            libcore.io.IoUtils.closeQuietly(v8);
            return 0;
        } else {
            String v1_6 = v8.getInt(0);
            libcore.io.IoUtils.closeQuietly(v8);
            return v1_6;
        }
    }

Method com.android.providers.media.MediaUpgradeReceiver.onReceive() calling method android.util.Log.wtf()


    public void onReceive(android.content.Context p20, android.content.Intent p21)
    {
        int v7_0 = p20;
        String v1_1 = 0;
        android.content.SharedPreferences v8 = p20.getSharedPreferences("MediaUpgradeReceiver", 0);
        int v9 = v8.getInt("db_version", 0);
        int v10 = com.android.providers.media.MediaProvider.getDatabaseVersion(p20);
        if (v9 != v10) {
            v8.edit().putInt("db_version", v10).commit();
            try {
                String[] v12 = p20.getDatabasePath("foo").getParentFile().list();
            } catch (String v0_1) {
                android.util.Log.wtf("MediaUpgradeReceiver", "Error during upgrade attempt.", v0_1);
                return;
            }
            if (v12 != null) {
                while(true) {
                    String v13 = v1_1;
                    if (v13 >= v12.length) {
                        break;
                    }
                    String v14 = v12[v13];
                    if (com.android.providers.media.MediaProvider.isMediaDatabaseName(v14)) {
                        String v1_4 = new StringBuilder();
                        v1_4.append("---> Start upgrade of media database ");
                        v1_4.append(v14);
                        android.util.Slog.i("MediaUpgradeReceiver", v1_4.toString());
                        try {
                            String v0_15 = new com.android.providers.media.MediaProvider$DatabaseHelper;
                            int v7_1 = 0;
                            try {
                                v0_15(v7_0, v14, com.android.providers.media.MediaProvider.isInternalMediaDatabaseName(v14), 0, 0);
                                int v6_2 = v0_15.getWritableDatabase();
                            } catch (String v0_16) {
                                String v2_5 = new StringBuilder();
                                v2_5.append("Error during upgrade of media db ");
                                v2_5.append(v14);
                                android.util.Log.wtf("MediaUpgradeReceiver", v2_5.toString(), v0_16);
                                if (v7_1 != 0) {
                                    v7_1.close();
                                }
                                String v1_10 = new StringBuilder();
                                v1_10.append("<--- Finished upgrade of media database ");
                                v1_10.append(v14);
                                v1_10.append(" in ");
                                v1_10.append((System.currentTimeMillis() - System.currentTimeMillis()));
                                v1_10.append("ms");
                                android.util.Slog.i("MediaUpgradeReceiver", v1_10.toString());
                            }
                            if (v6_2 == 0) {
                            } else {
                                v6_2.close();
                            }
                        } catch (String v0_17) {
                            v7_1 = 0;
                            if (v7_1 != 0) {
                                v7_1.close();
                            }
                            throw v0_17;
                        } catch (String v0_16) {
                            v7_1 = 0;
                        }
                    }
                    v1_1 = (v13 + 1);
                    v7_0 = p20;
                }
                return;
            } else {
                return;
            }
        } else {
            return;
        }
    }