We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e0f2515 + 85397d8 commit 05f876eCopy full SHA for 05f876e
graphics/java/android/renderscript/RenderScript.java
@@ -865,13 +865,7 @@ public final Context getApplicationContext() {
865
}
866
867
static int getTargetSdkVersion(Context ctx) {
868
- try {
869
- PackageManager pm = ctx.getPackageManager();
870
- ApplicationInfo app = pm.getApplicationInfo(ctx.getPackageName(), 0);
871
- return app.targetSdkVersion;
872
- } catch (Exception e) {
873
- throw new RSDriverException("Error calculating target SDK version for RS.");
874
- }
+ return ctx.getApplicationInfo().targetSdkVersion;
875
876
877
/**
0 commit comments