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

Commit 85397d8d authored by Jason Sams's avatar Jason Sams
Browse files

Simplify the way we get the version info.

Reduces startup overhead.

Change-Id: Id9556dfe553c23bf3f870a524ca5e687bb9fe777
parent 94d2f366
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;
    }

    /**