public static String getExtension(String uri) {
        if (uri == null) {
            return null;
        }

        int dot = uri.lastIndexOf(".");
        if (dot >= 0) {
            return uri.substring(dot);
        } else {
            // No extension.
            return "";
        }
    }
Gets the extension of a file name, like ".png" or ".jpg".

@param uri
@return Extension including the dot("."); "" if there is no extension;
null if uri was null.
android/modules/module_common/src/main/java/github/tornaco/android/thanos/util/AndroidFileUtils.java