Info Call to Inter-Process-Communication (IPC) API

Description

List of all calls to Android IPC API.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.android.providers.media.MediaProvider.insertInternal() calling method android.content.Context.bindService()


    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 v23;
                int v18_1;
                android.net.Uri v15_2;
                int v10_0;
                java.util.ArrayList v19;
                int v0_1;
                android.net.Uri v15_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$1.onReceive() calling method android.content.Context.sendBroadcast()


    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.MtpReceiver.handleUsbState() calling method android.content.Context.stopService()


    private void handleUsbState(android.content.Context p12, android.content.Intent p13)
    {
        int v6_1;
        android.os.Bundle v0 = p13.getExtras();
        boolean v1_1 = v0.getBoolean("configured");
        boolean v2_1 = v0.getBoolean("connected");
        boolean v3_0 = v0.getBoolean("mtp");
        boolean v4_1 = v0.getBoolean("ptp");
        boolean v5_1 = v0.getBoolean("unlocked");
        if (android.os.UserHandle.myUserId() != android.app.ActivityManager.getCurrentUser()) {
            v6_1 = 0;
        } else {
            v6_1 = 1;
        }
        if ((!v1_1) || ((!v3_0) && (!v4_1))) {
            if ((!v2_1) || ((!v3_0) && (!v4_1))) {
                p12.stopService(new android.content.Intent(p12, com.android.providers.media.MtpService));
                p12.getContentResolver().delete(android.net.Uri.parse("content://media/none/mtp_connected"), 0, 0);
            }
        } else {
            if (v6_1 != 0) {
                p12.getContentResolver().insert(android.net.Uri.parse("content://media/none/mtp_connected"), 0);
                android.content.Intent v13_1 = new android.content.Intent(p12, com.android.providers.media.MtpService);
                v13_1.putExtra("unlocked", v5_1);
                if (v4_1) {
                    v13_1.putExtra("ptp", 1);
                }
                p12.startService(v13_1);
            } else {
                return;
            }
        }
        return;
    }

Method com.android.providers.media.MtpReceiver.handleUsbState() calling method android.content.Context.startService()


    private void handleUsbState(android.content.Context p12, android.content.Intent p13)
    {
        int v6_1;
        android.os.Bundle v0 = p13.getExtras();
        boolean v1_1 = v0.getBoolean("configured");
        boolean v2_1 = v0.getBoolean("connected");
        boolean v3_0 = v0.getBoolean("mtp");
        boolean v4_1 = v0.getBoolean("ptp");
        boolean v5_1 = v0.getBoolean("unlocked");
        if (android.os.UserHandle.myUserId() != android.app.ActivityManager.getCurrentUser()) {
            v6_1 = 0;
        } else {
            v6_1 = 1;
        }
        if ((!v1_1) || ((!v3_0) && (!v4_1))) {
            if ((!v2_1) || ((!v3_0) && (!v4_1))) {
                p12.stopService(new android.content.Intent(p12, com.android.providers.media.MtpService));
                p12.getContentResolver().delete(android.net.Uri.parse("content://media/none/mtp_connected"), 0, 0);
            }
        } else {
            if (v6_1 != 0) {
                p12.getContentResolver().insert(android.net.Uri.parse("content://media/none/mtp_connected"), 0);
                android.content.Intent v13_1 = new android.content.Intent(p12, com.android.providers.media.MtpService);
                v13_1.putExtra("unlocked", v5_1);
                if (v4_1) {
                    v13_1.putExtra("ptp", 1);
                }
                p12.startService(v13_1);
            } else {
                return;
            }
        }
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scanTranslatable() calling method android.content.Context.startService()


    private void scanTranslatable(android.content.Context p4)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putBoolean("update_titles", 1);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scanFile() calling method android.content.Context.startService()


    private void scanFile(android.content.Context p4, String p5)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putString("filepath", p5);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scan() calling method android.content.Context.startService()


    private void scan(android.content.Context p4, String p5)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putString("volume", p5);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.RingtonePickerActivity.setSuccessResultWithRingtone() calling method android.content.Intent.putExtra()


    private void setSuccessResultWithRingtone(android.net.Uri p3)
    {
        this.setResult(-1, new android.content.Intent().putExtra("android.intent.extra.ringtone.PICKED_URI", p3));
        return;
    }

Method com.android.providers.media.RingtonePickerActivity$1.onClick() calling method android.content.Intent.putExtra()


    public void onClick(android.content.DialogInterface p5, int p6)
    {
        if (p6 != (com.android.providers.media.RingtonePickerActivity.access$000(this.this$0).getCount() + com.android.providers.media.RingtonePickerActivity.access$100(this.this$0))) {
            com.android.providers.media.RingtonePickerActivity.access$200(this.this$0, p6);
            if (!com.android.providers.media.RingtonePickerActivity.access$300(this.this$0)) {
                com.android.providers.media.RingtonePickerActivity.access$500(this.this$0, com.android.providers.media.RingtonePickerActivity.access$400(this.this$0));
            }
            com.android.providers.media.RingtonePickerActivity.access$600(this.this$0, p6, 0);
            return;
        } else {
            com.android.providers.media.RingtonePickerActivity v0_8 = new android.content.Intent("android.intent.action.GET_CONTENT");
            v0_8.setType("audio/*");
            v0_8.putExtra("android.intent.extra.MIME_TYPES", new String[] {"audio/*", "application/ogg"}));
            this.this$0.startActivityForResult(v0_8, 300);
            return;
        }
    }

Method com.android.providers.media.MtpReceiver.handleUsbState() calling method android.content.Intent.putExtra()


    private void handleUsbState(android.content.Context p12, android.content.Intent p13)
    {
        int v6_1;
        android.os.Bundle v0 = p13.getExtras();
        boolean v1_1 = v0.getBoolean("configured");
        boolean v2_1 = v0.getBoolean("connected");
        boolean v3_0 = v0.getBoolean("mtp");
        boolean v4_1 = v0.getBoolean("ptp");
        boolean v5_1 = v0.getBoolean("unlocked");
        if (android.os.UserHandle.myUserId() != android.app.ActivityManager.getCurrentUser()) {
            v6_1 = 0;
        } else {
            v6_1 = 1;
        }
        if ((!v1_1) || ((!v3_0) && (!v4_1))) {
            if ((!v2_1) || ((!v3_0) && (!v4_1))) {
                p12.stopService(new android.content.Intent(p12, com.android.providers.media.MtpService));
                p12.getContentResolver().delete(android.net.Uri.parse("content://media/none/mtp_connected"), 0, 0);
            }
        } else {
            if (v6_1 != 0) {
                p12.getContentResolver().insert(android.net.Uri.parse("content://media/none/mtp_connected"), 0);
                android.content.Intent v13_1 = new android.content.Intent(p12, com.android.providers.media.MtpService);
                v13_1.putExtra("unlocked", v5_1);
                if (v4_1) {
                    v13_1.putExtra("ptp", 1);
                }
                p12.startService(v13_1);
            } else {
                return;
            }
        }
        return;
    }

Method com.android.providers.media.RingtonePickerActivity.setSuccessResultWithRingtone() calling method android.content.Intent.<init>()


    private void setSuccessResultWithRingtone(android.net.Uri p3)
    {
        this.setResult(-1, new android.content.Intent().putExtra("android.intent.extra.ringtone.PICKED_URI", p3));
        return;
    }

Method com.android.providers.media.RingtonePickerActivity$1.onClick() calling method android.content.Intent.<init>()


    public void onClick(android.content.DialogInterface p5, int p6)
    {
        if (p6 != (com.android.providers.media.RingtonePickerActivity.access$000(this.this$0).getCount() + com.android.providers.media.RingtonePickerActivity.access$100(this.this$0))) {
            com.android.providers.media.RingtonePickerActivity.access$200(this.this$0, p6);
            if (!com.android.providers.media.RingtonePickerActivity.access$300(this.this$0)) {
                com.android.providers.media.RingtonePickerActivity.access$500(this.this$0, com.android.providers.media.RingtonePickerActivity.access$400(this.this$0));
            }
            com.android.providers.media.RingtonePickerActivity.access$600(this.this$0, p6, 0);
            return;
        } else {
            com.android.providers.media.RingtonePickerActivity v0_8 = new android.content.Intent("android.intent.action.GET_CONTENT");
            v0_8.setType("audio/*");
            v0_8.putExtra("android.intent.extra.MIME_TYPES", new String[] {"audio/*", "application/ogg"}));
            this.this$0.startActivityForResult(v0_8, 300);
            return;
        }
    }

Method com.android.providers.media.MtpReceiver.handleUsbState() calling method android.content.Intent.<init>()


    private void handleUsbState(android.content.Context p12, android.content.Intent p13)
    {
        int v6_1;
        android.os.Bundle v0 = p13.getExtras();
        boolean v1_1 = v0.getBoolean("configured");
        boolean v2_1 = v0.getBoolean("connected");
        boolean v3_0 = v0.getBoolean("mtp");
        boolean v4_1 = v0.getBoolean("ptp");
        boolean v5_1 = v0.getBoolean("unlocked");
        if (android.os.UserHandle.myUserId() != android.app.ActivityManager.getCurrentUser()) {
            v6_1 = 0;
        } else {
            v6_1 = 1;
        }
        if ((!v1_1) || ((!v3_0) && (!v4_1))) {
            if ((!v2_1) || ((!v3_0) && (!v4_1))) {
                p12.stopService(new android.content.Intent(p12, com.android.providers.media.MtpService));
                p12.getContentResolver().delete(android.net.Uri.parse("content://media/none/mtp_connected"), 0, 0);
            }
        } else {
            if (v6_1 != 0) {
                p12.getContentResolver().insert(android.net.Uri.parse("content://media/none/mtp_connected"), 0);
                android.content.Intent v13_1 = new android.content.Intent(p12, com.android.providers.media.MtpService);
                v13_1.putExtra("unlocked", v5_1);
                if (v4_1) {
                    v13_1.putExtra("ptp", 1);
                }
                p12.startService(v13_1);
            } else {
                return;
            }
        }
        return;
    }

Method com.android.providers.media.MediaScannerService.scan() calling method android.content.Intent.<init>()


    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$1.requestScanFile() calling method android.content.Intent.<init>()


    public void requestScanFile(String p6, String p7, android.media.IMediaScannerListener p8)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putString("filepath", p6);
        v0_1.putString("mimetype", p7);
        if (p8 != null) {
            v0_1.putIBinder("listener", p8.asBinder());
        }
        this.this$0.startService(new android.content.Intent(this.this$0, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scanTranslatable() calling method android.content.Intent.<init>()


    private void scanTranslatable(android.content.Context p4)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putBoolean("update_titles", 1);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scanFile() calling method android.content.Intent.<init>()


    private void scanFile(android.content.Context p4, String p5)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putString("filepath", p5);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaScannerReceiver.scan() calling method android.content.Intent.<init>()


    private void scan(android.content.Context p4, String p5)
    {
        android.os.Bundle v0_1 = new android.os.Bundle();
        v0_1.putString("volume", p5);
        p4.startService(new android.content.Intent(p4, com.android.providers.media.MediaScannerService).putExtras(v0_1));
        return;
    }

Method com.android.providers.media.MediaProvider.insertInternal() calling method android.content.Intent.<init>()


    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 v10_0;
                android.net.Uri v15_1;
                int v18_1;
                java.util.ArrayList v19;
                android.net.Uri v15_2;
                android.net.Uri v15_0;
                int v0_1;
                android.net.Uri v23;
                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$1.onReceive() calling method android.content.Intent.<init>()


    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;
    }