@Test public void testEscapePath() { Assert.assertEquals("", MediaUtils.escapePathForLikeSQLClause("")); Assert.assertEquals("path/name", MediaUtils.escapePathForLikeSQLClause("path/name")); Assert.assertEquals("escaped underscore !_", MediaUtils.escapePathForLikeSQLClause("escaped underscore _")); Assert.assertEquals("escaped default wildcard !%", MediaUtils.escapePathForLikeSQLClause("escaped default wildcard %")); Assert.assertEquals("escaped bang!!", MediaUtils.escapePathForLikeSQLClause("escaped bang!")); Assert.assertEquals("repeated!_!_escape", MediaUtils.escapePathForLikeSQLClause("repeated__escape")); }
protected static String escapePathForLikeSQLClause(String path) { String ep = path; ep = ep.replaceAll("\\!", "!!"); ep = ep.replaceAll("_", "!_"); ep = ep.replaceAll("%", "!%"); return ep; }
MediaUtils { protected static String escapePathForLikeSQLClause(String path) { String ep = path; ep = ep.replaceAll("\\!", "!!"); ep = ep.replaceAll("_", "!_"); ep = ep.replaceAll("%", "!%"); return ep; } }
MediaUtils { protected static String escapePathForLikeSQLClause(String path) { String ep = path; ep = ep.replaceAll("\\!", "!!"); ep = ep.replaceAll("_", "!_"); ep = ep.replaceAll("%", "!%"); return ep; }  }
MediaUtils { protected static String escapePathForLikeSQLClause(String path) { String ep = path; ep = ep.replaceAll("\\!", "!!"); ep = ep.replaceAll("_", "!_"); ep = ep.replaceAll("%", "!%"); return ep; }  static final Uri getImageUriFromMediaProvider(String imageFile); int deleteImageFileFromMediaProvider(String imageFile); static final int deleteImagesInFolderFromMediaProvider(File folder); static final Uri getAudioUriFromMediaProvider(String audioFile); static final int deleteAudioFileFromMediaProvider(String audioFile); static final int deleteAudioInFolderFromMediaProvider(File folder); static final Uri getVideoUriFromMediaProvider(String videoFile); static final int deleteVideoFileFromMediaProvider(String videoFile); static final int deleteVideoInFolderFromMediaProvider(File folder); static String getPathFromUri(Context ctxt, Uri uri, String pathKey); static String getPath(final Context context, final Uri uri); static File getFileFromUri(final Context context, final Uri uri, String pathKey, NetworkStateProvider connectivityProvider); static boolean isExternalStorageDocument(Uri uri); static boolean isDownloadsDocument(Uri uri); static boolean isMediaDocument(Uri uri); static boolean isGooglePhotosUri(Uri uri); static String getDataColumn(Context context, Uri uri,
                                       String selection, String[] selectionArgs); static String getFileNameFromUri(@NonNull Context context, Uri uri); }
MediaUtils { protected static String escapePathForLikeSQLClause(String path) { String ep = path; ep = ep.replaceAll("\\!", "!!"); ep = ep.replaceAll("_", "!_"); ep = ep.replaceAll("%", "!%"); return ep; }  static final Uri getImageUriFromMediaProvider(String imageFile); int deleteImageFileFromMediaProvider(String imageFile); static final int deleteImagesInFolderFromMediaProvider(File folder); static final Uri getAudioUriFromMediaProvider(String audioFile); static final int deleteAudioFileFromMediaProvider(String audioFile); static final int deleteAudioInFolderFromMediaProvider(File folder); static final Uri getVideoUriFromMediaProvider(String videoFile); static final int deleteVideoFileFromMediaProvider(String videoFile); static final int deleteVideoInFolderFromMediaProvider(File folder); static String getPathFromUri(Context ctxt, Uri uri, String pathKey); static String getPath(final Context context, final Uri uri); static File getFileFromUri(final Context context, final Uri uri, String pathKey, NetworkStateProvider connectivityProvider); static boolean isExternalStorageDocument(Uri uri); static boolean isDownloadsDocument(Uri uri); static boolean isMediaDocument(Uri uri); static boolean isGooglePhotosUri(Uri uri); static String getDataColumn(Context context, Uri uri,
                                       String selection, String[] selectionArgs); static String getFileNameFromUri(@NonNull Context context, Uri uri);  }