Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05f876e1 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Simplify the way we get the version info. Reduces startup overhead."

parents e0f2515b 85397d8d
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -865,13 +865,7 @@ public class RenderScript {
    }

    static int getTargetSdkVersion(Context ctx) {
        try {
            PackageManager pm = ctx.getPackageManager();
            ApplicationInfo app = pm.getApplicationInfo(ctx.getPackageName(), 0);
            return app.targetSdkVersion;
        } catch (Exception e) {
            throw new RSDriverException("Error calculating target SDK version for RS.");
        }
        return ctx.getApplicationInfo().targetSdkVersion;
    }

    /**