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

Method getTargetSdk

app/src/main/java/eu/faircode/email/Helper.java:1553–1564  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

1551 }
1552
1553 static int getTargetSdk(Context context) {
1554 if (targetSdk == null)
1555 try {
1556 PackageManager pm = context.getPackageManager();
1557 ApplicationInfo ai = pm.getApplicationInfo(BuildConfig.APPLICATION_ID, 0);
1558 targetSdk = ai.targetSdkVersion;
1559 } catch (Throwable ex) {
1560 Log.e(ex);
1561 targetSdk = Build.VERSION.SDK_INT;
1562 }
1563 return targetSdk;
1564 }
1565
1566 static boolean isSupportedDevice() {
1567 if ("Amazon".equals(Build.BRAND) && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {

Callers 1

getAppInfoMethod · 0.95

Calls 1

eMethod · 0.95

Tested by

no test coverage detected