MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / from

Method from

core/java/android/net/Uri.java:2058–2077  ·  view source on GitHub ↗

Creates a part from the encoded and decoded strings. @param encoded part string @param decoded part string

(String encoded, String decoded)

Source from the content-addressed store, hash-verified

2056 * @param decoded part string
2057 */
2058 static Part from(String encoded, String decoded) {
2059 // We have to check both encoded and decoded in case one is
2060 // NOT_CACHED.
2061
2062 if (encoded == null) {
2063 return NULL;
2064 }
2065 if (encoded.length() == 0) {
2066 return EMPTY;
2067 }
2068
2069 if (decoded == null) {
2070 return NULL;
2071 }
2072 if (decoded .length() == 0) {
2073 return EMPTY;
2074 }
2075
2076 return new Part(encoded, decoded);
2077 }
2078
2079 private static class EmptyPart extends Part {
2080 public EmptyPart(String value) {

Callers 3

readFromMethod · 0.95
fromEncodedMethod · 0.95
fromDecodedMethod · 0.95

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected