MCPcopy Create free account
hub / github.com/M66B/FairEmail / getReleaseType

Method getReleaseType

app/src/main/java/eu/faircode/email/Log.java:306–328  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

304 }
305
306 static @NonNull String getReleaseType(Context context) {
307 if (Helper.hasValidFingerprint(context)) {
308 if (BuildConfig.PLAY_STORE_RELEASE) {
309 String installer = Helper.getInstallerName(context);
310 String type = "Play Store";
311 if (installer != null && !Helper.PLAY_PACKAGE_NAME.equals(installer))
312 type += " (" + installer + ")";
313 return type;
314 } else if (BuildConfig.FDROID_RELEASE)
315 return "Reproducible";
316 else if (BuildConfig.AMAZON_RELEASE)
317 return "Amazon";
318 else
319 return "GitHub";
320 } else if (Helper.isSignedByFDroid(context))
321 return "F-Droid";
322 else {
323 if (BuildConfig.APPLICATION_ID.startsWith("eu.faircode.email"))
324 return "Other";
325 else
326 return "Clone";
327 }
328 }
329
330 static boolean isTestRelease() {
331 return BuildConfig.TEST_RELEASE;

Callers 3

onCreateViewMethod · 0.95
onCreateViewMethod · 0.95
getAppInfoMethod · 0.95

Calls 4

hasValidFingerprintMethod · 0.95
getInstallerNameMethod · 0.95
isSignedByFDroidMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected