MCPcopy Create free account
hub / github.com/afkT/DevUtils / getAuthority

Method getAuthority

lib/DevApp/src/main/java/dev/DevUtils.java:475–486  ·  view source on GitHub ↗

获取 FileProvider Authority @return FileProvider Authority

()

Source from the content-addressed store, hash-verified

473 * @return FileProvider Authority
474 */
475 public static String getAuthority() {
476 try {
477 final Context context = DevUtils.getContext();
478 if (context == null) {
479 return null;
480 }
481 return context.getPackageName() + "." + LIB_FILE_PROVIDER;
482 } catch (Exception e) {
483 LogPrintUtils.eTag(TAG, e, "getAuthority");
484 }
485 return null;
486 }
487
488 /**
489 * 获取 FileProvider File Uri

Callers 4

getUriForFileMethod · 0.95
getUriForPathMethod · 0.95
getUriForFileMethod · 0.95
getUriForPathMethod · 0.95

Calls 3

getContextMethod · 0.95
eTagMethod · 0.95
getPackageNameMethod · 0.45

Tested by

no test coverage detected